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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
40,500 | ggml_add_rel_pos_impl | ngxson[P]ggml-easy/ggml/src/ggml.c | static struct ggml_tensor * ggml_add_rel_pos_impl(
struct ggml_context * ctx,
struct ggml_tensor * a,
struct ggml_tensor * pw,
struct ggml_tensor * ph,
bool inplace) {
GGML_ASSERT(ggml_are_same_shape(pw, ph));
GGML_ASSERT(ggml_is_contiguous(a));
GGML_ASSERT(ggml_is_contiguous(pw));
GGML_ASSERT(ggml_is_contiguous(ph));
GGML_ASSERT(ph->type == GGML_TYPE_F32);
GGML_ASSERT(pw->type == GGML_TYPE_F32);
GGML_ASSERT(pw->ne[3] == a->ne[2]);
GGML_ASSERT(pw->ne[0]*pw->ne[0] == a->ne[0]);
GGML_ASSERT(pw->ne[1]*pw->ne[2] == a->ne[1]);
struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a);
ggml_set_op_params_i32(result, 0, inplace ? 1 : 0);
result->op = GGML_OP_ADD_REL_POS;
result->src[0] = a;
result->src[1] = pw;
result->src[2] = ph;
return result;
} | O2 | c | ggml_add_rel_pos_impl:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %ebp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq %rdx, %rdi
movq %rcx, %rsi
callq 0x1e740
testb %al, %al
je 0x24824
movq %r15, %rdi
callq 0x1e930
testb %al, %al
je 0x24843
movq %r14, %rdi
callq 0x1e930
testb %al, %al
je 0x24862
movq %rbx, %rdi
callq 0x1e930
testb %al, %al
je 0x24881
cmpl $0x0, (%rbx)
jne 0x248a0
cmpl $0x0, (%r14)
jne 0x248bc
movq 0x28(%r14), %rax
cmpq 0x20(%r15), %rax
jne 0x248d8
movq 0x10(%r14), %rax
imulq %rax, %rax
cmpq 0x10(%r15), %rax
jne 0x248f4
movq 0x20(%r14), %rax
imulq 0x18(%r14), %rax
cmpq 0x18(%r15), %rax
jne 0x24910
movq %r12, %rdi
movq %r15, %rsi
testb %bpl, %bpl
je 0x247f3
callq 0x1c3e0
jmp 0x247f8
callq 0x1d660
movzbl %bpl, %ecx
movl %ecx, 0x54(%rax)
movl $0x46, 0x50(%rax)
movq %r15, 0x98(%rax)
movq %r14, 0xa0(%rax)
movq %rbx, 0xa8(%rax)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x26d58(%rip), %rdi # 0x4b583
leaq 0x26d9c(%rip), %rdx # 0x4b5ce
leaq 0x29099(%rip), %rcx # 0x4d8d2
movl $0x124d, %esi # imm = 0x124D
jmp 0x2492a
leaq 0x26d39(%rip), %rdi # 0x4b583
leaq 0x26d7d(%rip), %rdx # 0x4b5ce
leaq 0x270a8(%rip), %rcx # 0x4b900
movl $0x124e, %esi # imm = 0x124E
jmp 0x2492a
leaq 0x26d1a(%rip), %rdi # 0x4b583
leaq 0x26d5e(%rip), %rdx # 0x4b5ce
leaq 0x29077(%rip), %rcx # 0x4d8ee
movl $0x124f, %esi # imm = 0x124F
jmp 0x2492a
leaq 0x26cfb(%rip), %rdi # 0x4b583
leaq 0x26d3f(%rip), %rdx # 0x4b5ce
leaq 0x2906f(%rip), %rcx # 0x4d905
movl $0x1250, %esi # imm = 0x1250
jmp 0x2492a
leaq 0x26cdc(%rip), %rdi # 0x4b583
leaq 0x26d20(%rip), %rdx # 0x4b5ce
leaq 0x29067(%rip), %rcx # 0x4d91c
movl $0x1251, %esi # imm = 0x1251
jmp 0x2492a
leaq 0x26cc0(%rip), %rdi # 0x4b583
leaq 0x26d04(%rip), %rdx # 0x4b5ce
leaq 0x29065(%rip), %rcx # 0x4d936
movl $0x1252, %esi # imm = 0x1252
jmp 0x2492a
leaq 0x26ca4(%rip), %rdi # 0x4b583
leaq 0x26ce8(%rip), %rdx # 0x4b5ce
leaq 0x29063(%rip), %rcx # 0x4d950
movl $0x1253, %esi # imm = 0x1253
jmp 0x2492a
leaq 0x26c88(%rip), %rdi # 0x4b583
leaq 0x26ccc(%rip), %rdx # 0x4b5ce
leaq 0x2905d(%rip), %rcx # 0x4d966
movl $0x1254, %esi # imm = 0x1254
jmp 0x2492a
leaq 0x26c6c(%rip), %rdi # 0x4b583
leaq 0x26cb0(%rip), %rdx # 0x4b5ce
leaq 0x29061(%rip), %rcx # 0x4d986
movl $0x1255, %esi # imm = 0x1255
xorl %eax, %eax
callq 0x1e770
| ggml_add_rel_pos_impl:
push rbp
push r15
push r14
push r12
push rbx
mov ebp, r8d
mov rbx, rcx
mov r14, rdx
mov r15, rsi
mov r12, rdi
mov rdi, rdx
mov rsi, rcx
call _ggml_are_same_shape
test al, al
jz loc_24824
mov rdi, r15
call _ggml_is_contiguous_0
test al, al
jz loc_24843
mov rdi, r14
call _ggml_is_contiguous_0
test al, al
jz loc_24862
mov rdi, rbx
call _ggml_is_contiguous_0
test al, al
jz loc_24881
cmp dword ptr [rbx], 0
jnz loc_248A0
cmp dword ptr [r14], 0
jnz loc_248BC
mov rax, [r14+28h]
cmp rax, [r15+20h]
jnz loc_248D8
mov rax, [r14+10h]
imul rax, rax
cmp rax, [r15+10h]
jnz loc_248F4
mov rax, [r14+20h]
imul rax, [r14+18h]
cmp rax, [r15+18h]
jnz loc_24910
mov rdi, r12
mov rsi, r15
test bpl, bpl
jz short loc_247F3
call _ggml_view_tensor
jmp short loc_247F8
loc_247F3:
call _ggml_dup_tensor
loc_247F8:
movzx ecx, bpl
mov [rax+54h], ecx
mov dword ptr [rax+50h], 46h ; 'F'
mov [rax+98h], r15
mov [rax+0A0h], r14
mov [rax+0A8h], rbx
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_24824:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlAreSameSha_3; "ggml_are_same_shape(pw, ph)"
mov esi, 124Dh
jmp loc_2492A
loc_24843:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlIsContiguo_4; "ggml_is_contiguous(a)"
mov esi, 124Eh
jmp loc_2492A
loc_24862:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlIsContiguo_10; "ggml_is_contiguous(pw)"
mov esi, 124Fh
jmp loc_2492A
loc_24881:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlIsContiguo_11; "ggml_is_contiguous(ph)"
mov esi, 1250h
jmp loc_2492A
loc_248A0:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aPhTypeGgmlType; "ph->type == GGML_TYPE_F32"
mov esi, 1251h
jmp short loc_2492A
loc_248BC:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aPwTypeGgmlType; "pw->type == GGML_TYPE_F32"
mov esi, 1252h
jmp short loc_2492A
loc_248D8:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aPwNe3ANe2; "pw->ne[3] == a->ne[2]"
mov esi, 1253h
jmp short loc_2492A
loc_248F4:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aPwNe0PwNe0ANe0; "pw->ne[0]*pw->ne[0] == a->ne[0]"
mov esi, 1254h
jmp short loc_2492A
loc_24910:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aPwNe1PwNe2ANe1; "pw->ne[1]*pw->ne[2] == a->ne[1]"
mov esi, 1255h
loc_2492A:
xor eax, eax
call _ggml_abort
| long long ggml_add_rel_pos_impl(
long long a1,
long long a2,
_QWORD *a3,
_QWORD *a4,
unsigned __int8 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
double a10,
double a11,
__m128 a12,
__m128 a13)
{
long long v16; // r8
long long v17; // r9
__m128 v18; // xmm4
__m128 v19; // xmm5
long long result; // rax
const char *v21; // rcx
int v22; // esi
char v23; // [rsp+0h] [rbp-28h]
if ( !ggml_are_same_shape(a3, a4) )
{
v21 = "ggml_are_same_shape(pw, ph)";
v22 = 4685;
goto LABEL_23;
}
if ( !(unsigned __int8)ggml_is_contiguous_0(a2) )
{
v21 = "ggml_is_contiguous(a)";
v22 = 4686;
goto LABEL_23;
}
if ( !(unsigned __int8)ggml_is_contiguous_0(a3) )
{
v21 = "ggml_is_contiguous(pw)";
v22 = 4687;
goto LABEL_23;
}
if ( !(unsigned __int8)ggml_is_contiguous_0(a4) )
{
v21 = "ggml_is_contiguous(ph)";
v22 = 4688;
goto LABEL_23;
}
if ( *(_DWORD *)a4 )
{
v21 = "ph->type == GGML_TYPE_F32";
v22 = 4689;
goto LABEL_23;
}
if ( *(_DWORD *)a3 )
{
v21 = "pw->type == GGML_TYPE_F32";
v22 = 4690;
goto LABEL_23;
}
if ( a3[5] != *(_QWORD *)(a2 + 32) )
{
v21 = "pw->ne[3] == a->ne[2]";
v22 = 4691;
goto LABEL_23;
}
if ( a3[2] * a3[2] != *(_QWORD *)(a2 + 16) )
{
v21 = "pw->ne[0]*pw->ne[0] == a->ne[0]";
v22 = 4692;
goto LABEL_23;
}
if ( a3[3] * a3[4] != *(_QWORD *)(a2 + 24) )
{
v21 = "pw->ne[1]*pw->ne[2] == a->ne[1]";
v22 = 4693;
LABEL_23:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",
v22,
(long long)"GGML_ASSERT(%s) failed",
(long long)v21,
v16,
v17,
a6,
a7,
a8,
a9,
v18,
v19,
a12,
a13,
v23);
}
if ( a5 )
result = ggml_view_tensor(a1, a2, a6, a7, a8, a9, v18, v19, a12, a13);
else
result = ggml_dup_tensor(a1, (unsigned int *)a2);
*(_DWORD *)(result + 84) = a5;
*(_DWORD *)(result + 80) = 70;
*(_QWORD *)(result + 152) = a2;
*(_QWORD *)(result + 160) = a3;
*(_QWORD *)(result + 168) = a4;
return result;
}
| ggml_add_rel_pos_impl:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV EBP,R8D
MOV RBX,RCX
MOV R14,RDX
MOV R15,RSI
MOV R12,RDI
MOV RDI,RDX
MOV RSI,RCX
CALL 0x0011e740
TEST AL,AL
JZ 0x00124824
MOV RDI,R15
CALL 0x0011e930
TEST AL,AL
JZ 0x00124843
MOV RDI,R14
CALL 0x0011e930
TEST AL,AL
JZ 0x00124862
MOV RDI,RBX
CALL 0x0011e930
TEST AL,AL
JZ 0x00124881
CMP dword ptr [RBX],0x0
JNZ 0x001248a0
CMP dword ptr [R14],0x0
JNZ 0x001248bc
MOV RAX,qword ptr [R14 + 0x28]
CMP RAX,qword ptr [R15 + 0x20]
JNZ 0x001248d8
MOV RAX,qword ptr [R14 + 0x10]
IMUL RAX,RAX
CMP RAX,qword ptr [R15 + 0x10]
JNZ 0x001248f4
MOV RAX,qword ptr [R14 + 0x20]
IMUL RAX,qword ptr [R14 + 0x18]
CMP RAX,qword ptr [R15 + 0x18]
JNZ 0x00124910
MOV RDI,R12
MOV RSI,R15
TEST BPL,BPL
JZ 0x001247f3
CALL 0x0011c3e0
JMP 0x001247f8
LAB_001247f3:
CALL 0x0011d660
LAB_001247f8:
MOVZX ECX,BPL
MOV dword ptr [RAX + 0x54],ECX
MOV dword ptr [RAX + 0x50],0x46
MOV qword ptr [RAX + 0x98],R15
MOV qword ptr [RAX + 0xa0],R14
MOV qword ptr [RAX + 0xa8],RBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00124824:
LEA RDI,[0x14b583]
LEA RDX,[0x14b5ce]
LEA RCX,[0x14d8d2]
MOV ESI,0x124d
JMP 0x0012492a
LAB_00124843:
LEA RDI,[0x14b583]
LEA RDX,[0x14b5ce]
LEA RCX,[0x14b900]
MOV ESI,0x124e
JMP 0x0012492a
LAB_00124862:
LEA RDI,[0x14b583]
LEA RDX,[0x14b5ce]
LEA RCX,[0x14d8ee]
MOV ESI,0x124f
JMP 0x0012492a
LAB_00124881:
LEA RDI,[0x14b583]
LEA RDX,[0x14b5ce]
LEA RCX,[0x14d905]
MOV ESI,0x1250
JMP 0x0012492a
LAB_001248a0:
LEA RDI,[0x14b583]
LEA RDX,[0x14b5ce]
LEA RCX,[0x14d91c]
MOV ESI,0x1251
JMP 0x0012492a
LAB_001248bc:
LEA RDI,[0x14b583]
LEA RDX,[0x14b5ce]
LEA RCX,[0x14d936]
MOV ESI,0x1252
JMP 0x0012492a
LAB_001248d8:
LEA RDI,[0x14b583]
LEA RDX,[0x14b5ce]
LEA RCX,[0x14d950]
MOV ESI,0x1253
JMP 0x0012492a
LAB_001248f4:
LEA RDI,[0x14b583]
LEA RDX,[0x14b5ce]
LEA RCX,[0x14d966]
MOV ESI,0x1254
JMP 0x0012492a
LAB_00124910:
LEA RDI,[0x14b583]
LEA RDX,[0x14b5ce]
LEA RCX,[0x14d986]
MOV ESI,0x1255
LAB_0012492a:
XOR EAX,EAX
CALL 0x0011e770
|
void ggml_add_rel_pos_impl(int8 param_1,long param_2,int *param_3,int *param_4,byte param_5)
{
char cVar1;
long lVar2;
char *pcVar3;
int8 uVar4;
cVar1 = ggml_are_same_shape(param_3,param_4);
if (cVar1 == '\0') {
pcVar3 = "ggml_are_same_shape(pw, ph)";
uVar4 = 0x124d;
}
else {
cVar1 = ggml_is_contiguous_0(param_2);
if (cVar1 == '\0') {
pcVar3 = "ggml_is_contiguous(a)";
uVar4 = 0x124e;
}
else {
cVar1 = ggml_is_contiguous_0(param_3);
if (cVar1 == '\0') {
pcVar3 = "ggml_is_contiguous(pw)";
uVar4 = 0x124f;
}
else {
cVar1 = ggml_is_contiguous_0(param_4);
if (cVar1 == '\0') {
pcVar3 = "ggml_is_contiguous(ph)";
uVar4 = 0x1250;
}
else if (*param_4 == 0) {
if (*param_3 == 0) {
if (*(long *)(param_3 + 10) == *(long *)(param_2 + 0x20)) {
if (*(long *)(param_3 + 4) * *(long *)(param_3 + 4) - *(long *)(param_2 + 0x10) == 0)
{
if (*(long *)(param_3 + 8) * *(long *)(param_3 + 6) - *(long *)(param_2 + 0x18) == 0
) {
if (param_5 == 0) {
lVar2 = ggml_dup_tensor(param_1,param_2);
}
else {
lVar2 = ggml_view_tensor();
}
*(uint *)(lVar2 + 0x54) = (uint)param_5;
*(int4 *)(lVar2 + 0x50) = 0x46;
*(long *)(lVar2 + 0x98) = param_2;
*(int **)(lVar2 + 0xa0) = param_3;
*(int **)(lVar2 + 0xa8) = param_4;
return;
}
pcVar3 = "pw->ne[1]*pw->ne[2] == a->ne[1]";
uVar4 = 0x1255;
}
else {
pcVar3 = "pw->ne[0]*pw->ne[0] == a->ne[0]";
uVar4 = 0x1254;
}
}
else {
pcVar3 = "pw->ne[3] == a->ne[2]";
uVar4 = 0x1253;
}
}
else {
pcVar3 = "pw->type == GGML_TYPE_F32";
uVar4 = 0x1252;
}
}
else {
pcVar3 = "ph->type == GGML_TYPE_F32";
uVar4 = 0x1251;
}
}
}
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",uVar4,
"GGML_ASSERT(%s) failed",pcVar3);
}
| |
40,501 | arena_add_block | tsotchke[P]eshkol/src/core/memory/arena.c | static Block* arena_add_block(Arena* arena, size_t min_size) {
assert(arena != NULL);
assert(min_size > 0);
// Double the block size for each new block, but at least min_size
size_t new_size = arena->current->size * 2;
if (new_size < min_size) new_size = min_size;
// Allocate new block
size_t header_size = sizeof(Block);
Block* block = malloc(header_size + new_size);
if (!block) return NULL;
// Initialize the block
block->next = NULL;
block->size = new_size;
block->used = 0;
// Add to arena
arena->current->next = block;
arena->current = block;
return block;
} | O0 | c | arena_add_block:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x27a9
jmp 0x27c8
leaq 0x18b9(%rip), %rdi # 0x4069
leaq 0x21fa(%rip), %rsi # 0x49b1
movl $0x6e, %edx
leaq 0x23d3(%rip), %rcx # 0x4b96
callq 0x1070
cmpq $0x0, -0x18(%rbp)
jbe 0x27d1
jmp 0x27f0
leaq 0x23e6(%rip), %rdi # 0x4bbe
leaq 0x21d2(%rip), %rsi # 0x49b1
movl $0x6f, %edx
leaq 0x23ab(%rip), %rcx # 0x4b96
callq 0x1070
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
shlq %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x2814
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq $0x18, -0x28(%rbp)
movq -0x28(%rbp), %rdi
addq -0x20(%rbp), %rdi
callq 0x10b0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x283e
movq $0x0, -0x8(%rbp)
jmp 0x2882
movq -0x30(%rbp), %rax
movq $0x0, (%rax)
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| arena_add_block:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
cmp [rbp+var_10], 0
jz short loc_27A9
jmp short loc_27C8
loc_27A9:
lea rdi, aArenaNull; "arena != NULL"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov edx, 6Eh ; 'n'
lea rcx, aBlockArenaAddB; "Block *arena_add_block(Arena *, size_t)"
call ___assert_fail
loc_27C8:
cmp [rbp+var_18], 0
jbe short loc_27D1
jmp short loc_27F0
loc_27D1:
lea rdi, aMinSize0; "min_size > 0"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov edx, 6Fh ; 'o'
lea rcx, aBlockArenaAddB; "Block *arena_add_block(Arena *, size_t)"
call ___assert_fail
loc_27F0:
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+8]
shl rax, 1
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
cmp rax, [rbp+var_18]
jnb short loc_2814
mov rax, [rbp+var_18]
mov [rbp+var_20], rax
loc_2814:
mov [rbp+var_28], 18h
mov rdi, [rbp+var_28]
add rdi, [rbp+var_20]
call _malloc
mov [rbp+var_30], rax
cmp [rbp+var_30], 0
jnz short loc_283E
mov [rbp+var_8], 0
jmp short loc_2882
loc_283E:
mov rax, [rbp+var_30]
mov qword ptr [rax], 0
mov rcx, [rbp+var_20]
mov rax, [rbp+var_30]
mov [rax+8], rcx
mov rax, [rbp+var_30]
mov qword ptr [rax+10h], 0
mov rcx, [rbp+var_30]
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rax], rcx
mov rcx, [rbp+var_30]
mov rax, [rbp+var_10]
mov [rax], rcx
mov rax, [rbp+var_30]
mov [rbp+var_8], rax
loc_2882:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
| _QWORD * arena_add_block(long long a1, unsigned long long a2)
{
_QWORD *v3; // [rsp+0h] [rbp-30h]
unsigned long long v4; // [rsp+10h] [rbp-20h]
if ( !a1 )
__assert_fail(
"arena != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c",
110LL,
"Block *arena_add_block(Arena *, size_t)");
if ( !a2 )
__assert_fail(
"min_size > 0",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c",
111LL,
"Block *arena_add_block(Arena *, size_t)");
v4 = 2LL * *(_QWORD *)(*(_QWORD *)a1 + 8LL);
if ( v4 < a2 )
v4 = a2;
v3 = (_QWORD *)malloc(v4 + 24);
if ( !v3 )
return 0LL;
*v3 = 0LL;
v3[1] = v4;
v3[2] = 0LL;
**(_QWORD **)a1 = v3;
*(_QWORD *)a1 = v3;
return v3;
}
| arena_add_block:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
CMP qword ptr [RBP + -0x10],0x0
JZ 0x001027a9
JMP 0x001027c8
LAB_001027a9:
LEA RDI,[0x104069]
LEA RSI,[0x10499f]
MOV EDX,0x6e
LEA RCX,[0x104b72]
CALL 0x00101070
LAB_001027c8:
CMP qword ptr [RBP + -0x18],0x0
JBE 0x001027d1
JMP 0x001027f0
LAB_001027d1:
LEA RDI,[0x104b9a]
LEA RSI,[0x10499f]
MOV EDX,0x6f
LEA RCX,[0x104b72]
CALL 0x00101070
LAB_001027f0:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x8]
SHL RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x00102814
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x20],RAX
LAB_00102814:
MOV qword ptr [RBP + -0x28],0x18
MOV RDI,qword ptr [RBP + -0x28]
ADD RDI,qword ptr [RBP + -0x20]
CALL 0x001010b0
MOV qword ptr [RBP + -0x30],RAX
CMP qword ptr [RBP + -0x30],0x0
JNZ 0x0010283e
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00102882
LAB_0010283e:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],0x0
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0x10],0x0
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x8],RAX
LAB_00102882:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
int8 * arena_add_block(long *param_1,ulong param_2)
{
ulong local_28;
int8 *local_10;
if (param_1 == (long *)0x0) {
/* WARNING: Subroutine does not return */
__assert_fail("arena != NULL","/workspace/llm4binary/github2025/eshkol/src/core/memory/arena.c",
0x6e,"Block *arena_add_block(Arena *, size_t)");
}
if (param_2 != 0) {
local_28 = *(long *)(*param_1 + 8) << 1;
if (local_28 < param_2) {
local_28 = param_2;
}
local_10 = (int8 *)malloc(local_28 + 0x18);
if (local_10 == (int8 *)0x0) {
local_10 = (int8 *)0x0;
}
else {
*local_10 = 0;
local_10[1] = local_28;
local_10[2] = 0;
*(int8 **)*param_1 = local_10;
*param_1 = (long)local_10;
}
return local_10;
}
/* WARNING: Subroutine does not return */
__assert_fail("min_size > 0","/workspace/llm4binary/github2025/eshkol/src/core/memory/arena.c",
0x6f,"Block *arena_add_block(Arena *, size_t)");
}
| |
40,502 | mi_kpointer | eloqsql/storage/myisam/mi_search.c | void _mi_kpointer(register MI_INFO *info, register uchar *buff, my_off_t pos)
{
pos/=MI_MIN_KEY_BLOCK_LENGTH;
switch (info->s->base.key_reflength) {
#if SIZEOF_OFF_T > 4
case 7: mi_int7store(buff,pos); break;
case 6: mi_int6store(buff,pos); break;
case 5: mi_int5store(buff,pos); break;
#else
case 7: *buff++=0;
/* fall through */
case 6: *buff++=0;
/* fall through */
case 5: *buff++=0;
/* fall through */
#endif
case 4: mi_int4store(buff,pos); break;
case 3: mi_int3store(buff,pos); break;
case 2: mi_int2store(buff,(uint) pos); break;
case 1: buff[0]= (uchar) pos; break;
default: abort(); /* impossible */
}
} | O0 | c | mi_kpointer:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
shrq $0xa, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0x17c(%rax), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x68(%rbp)
subl $0x6, %eax
ja 0xc0896
movq -0x68(%rbp), %rax
leaq 0x98ebf(%rip), %rcx # 0x159538
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
shrq $0x20, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x6(%rax)
movq -0x20(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x5(%rax)
movq -0x20(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x4(%rax)
movq -0x20(%rbp), %rax
shrq $0x18, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x28(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x28(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x28(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
jmp 0xc089b
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
shrq $0x20, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x5(%rax)
movq -0x30(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x4(%rax)
movq -0x30(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x30(%rbp), %rax
shrq $0x18, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x38(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x38(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
jmp 0xc089b
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
shrq $0x20, %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x4(%rax)
movq -0x40(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x40(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x40(%rbp), %rax
shrq $0x18, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x48(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
jmp 0xc089b
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x50(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x50(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x50(%rbp), %rax
shrq $0x18, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
jmp 0xc089b
movq -0x18(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x58(%rbp), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x58(%rbp), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
jmp 0xc089b
movq -0x18(%rbp), %rax
movl %eax, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0x5c(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
jmp 0xc089b
movq -0x18(%rbp), %rax
movb %al, %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
jmp 0xc089b
callq 0x2a5d0
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _mi_kpointer:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_18]
shr rax, 0Ah
mov [rbp+var_18], rax
mov rax, [rbp+var_8]
mov rax, [rax]
mov eax, [rax+17Ch]
dec eax; switch 7 cases
mov ecx, eax
mov [rbp+var_68], rcx
sub eax, 6
ja def_C0680; jumptable 00000000000C0680 default case
mov rax, [rbp+var_68]
lea rcx, jpt_C0680
movsxd rax, ds:(jpt_C0680 - 159538h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_C0682:
mov rax, [rbp+var_18]; jumptable 00000000000C0680 case 7
mov [rbp+var_20], rax
mov rax, [rbp+var_18]
shr rax, 20h
mov [rbp+var_28], rax
mov rax, [rbp+var_20]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+6], cl
mov rax, [rbp+var_20]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+5], cl
mov rax, [rbp+var_20]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+4], cl
mov rax, [rbp+var_20]
shr rax, 18h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+3], cl
mov rax, [rbp+var_28]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+2], cl
mov rax, [rbp+var_28]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_28]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
jmp loc_C089B
loc_C0709:
mov rax, [rbp+var_18]; jumptable 00000000000C0680 case 6
mov [rbp+var_30], rax
mov rax, [rbp+var_18]
shr rax, 20h
mov [rbp+var_38], rax
mov rax, [rbp+var_30]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+5], cl
mov rax, [rbp+var_30]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+4], cl
mov rax, [rbp+var_30]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+3], cl
mov rax, [rbp+var_30]
shr rax, 18h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+2], cl
mov rax, [rbp+var_38]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_38]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
jmp loc_C089B
loc_C077F:
mov rax, [rbp+var_18]; jumptable 00000000000C0680 case 5
mov [rbp+var_40], rax
mov rax, [rbp+var_18]
shr rax, 20h
mov [rbp+var_48], rax
mov rax, [rbp+var_40]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+4], cl
mov rax, [rbp+var_40]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+3], cl
mov rax, [rbp+var_40]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+2], cl
mov rax, [rbp+var_40]
shr rax, 18h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_48]
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
jmp loc_C089B
loc_C07E4:
mov rax, [rbp+var_18]; jumptable 00000000000C0680 case 4
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+3], cl
mov rax, [rbp+var_50]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+2], cl
mov rax, [rbp+var_50]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_50]
shr rax, 18h
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
jmp short loc_C089B
loc_C082D:
mov rax, [rbp+var_18]; jumptable 00000000000C0680 case 3
mov [rbp+var_58], rax
mov rax, [rbp+var_58]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+2], cl
mov rax, [rbp+var_58]
shr rax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov rax, [rbp+var_58]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
jmp short loc_C089B
loc_C0865:
mov rax, [rbp+var_18]; jumptable 00000000000C0680 case 2
mov [rbp+var_5C], eax
mov eax, [rbp+var_5C]
mov cl, al
mov rax, [rbp+var_10]
mov [rax+1], cl
mov eax, [rbp+var_5C]
shr eax, 8
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
jmp short loc_C089B
loc_C0888:
mov rax, [rbp+var_18]; jumptable 00000000000C0680 case 1
mov cl, al
mov rax, [rbp+var_10]
mov [rax], cl
jmp short loc_C089B
def_C0680:
call _abort; jumptable 00000000000C0680 default case
loc_C089B:
add rsp, 70h
pop rbp
retn
| _BYTE * mi_kpointer(long long a1, _BYTE *a2, unsigned long long a3)
{
_BYTE *result; // rax
unsigned long long v4; // [rsp+58h] [rbp-18h]
v4 = a3 >> 10;
switch ( *(_DWORD *)(*(_QWORD *)a1 + 380LL) )
{
case 1:
result = a2;
*a2 = v4;
break;
case 2:
a2[1] = v4;
result = a2;
*a2 = BYTE1(v4);
break;
case 3:
a2[2] = v4;
a2[1] = BYTE1(v4);
result = a2;
*a2 = BYTE2(v4);
break;
case 4:
a2[3] = v4;
a2[2] = BYTE1(v4);
a2[1] = BYTE2(v4);
result = a2;
*a2 = BYTE3(v4);
break;
case 5:
a2[4] = v4;
a2[3] = BYTE1(v4);
a2[2] = BYTE2(v4);
a2[1] = BYTE3(v4);
result = a2;
*a2 = BYTE4(v4);
break;
case 6:
a2[5] = v4;
a2[4] = BYTE1(v4);
a2[3] = BYTE2(v4);
a2[2] = BYTE3(v4);
a2[1] = BYTE4(v4);
result = a2;
*a2 = BYTE5(v4);
break;
case 7:
a2[6] = v4;
a2[5] = BYTE1(v4);
a2[4] = BYTE2(v4);
a2[3] = BYTE3(v4);
a2[2] = BYTE4(v4);
a2[1] = BYTE5(v4);
result = a2;
*a2 = BYTE6(v4);
break;
default:
abort(a1, a2, a3);
}
return result;
}
| _mi_kpointer:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0xa
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x17c]
DEC EAX
MOV ECX,EAX
MOV qword ptr [RBP + -0x68],RCX
SUB EAX,0x6
JA 0x001c0896
MOV RAX,qword ptr [RBP + -0x68]
LEA RCX,[0x259538]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_7:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x20
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x6],CL
MOV RAX,qword ptr [RBP + -0x20]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x5],CL
MOV RAX,qword ptr [RBP + -0x20]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x4],CL
MOV RAX,qword ptr [RBP + -0x20]
SHR RAX,0x18
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x3],CL
MOV RAX,qword ptr [RBP + -0x28]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x28]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x28]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
JMP 0x001c089b
caseD_6:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x20
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x5],CL
MOV RAX,qword ptr [RBP + -0x30]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x4],CL
MOV RAX,qword ptr [RBP + -0x30]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x3],CL
MOV RAX,qword ptr [RBP + -0x30]
SHR RAX,0x18
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x38]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x38]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
JMP 0x001c089b
caseD_5:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x20
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x4],CL
MOV RAX,qword ptr [RBP + -0x40]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x3],CL
MOV RAX,qword ptr [RBP + -0x40]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x40]
SHR RAX,0x18
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x48]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
JMP 0x001c089b
caseD_4:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x3],CL
MOV RAX,qword ptr [RBP + -0x50]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x50]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x50]
SHR RAX,0x18
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
JMP 0x001c089b
caseD_3:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x58]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x58]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
JMP 0x001c089b
caseD_2:
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x5c],EAX
MOV EAX,dword ptr [RBP + -0x5c]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x1],CL
MOV EAX,dword ptr [RBP + -0x5c]
SHR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
JMP 0x001c089b
caseD_1:
MOV RAX,qword ptr [RBP + -0x18]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
JMP 0x001c089b
default:
CALL 0x0012a5d0
LAB_001c089b:
ADD RSP,0x70
POP RBP
RET
|
void _mi_kpointer(long *param_1,byte *param_2,ulong param_3)
{
byte bVar1;
byte bVar2;
byte bVar3;
byte bVar4;
byte bVar5;
byte bVar6;
ulong uVar7;
uVar7 = param_3 >> 10;
bVar1 = (byte)uVar7;
bVar2 = (byte)(uVar7 >> 8);
bVar3 = (byte)(uVar7 >> 0x10);
bVar4 = (byte)(uVar7 >> 0x18);
bVar5 = (byte)(uVar7 >> 0x20);
bVar6 = (byte)(uVar7 >> 0x28);
switch(*(int4 *)(*param_1 + 0x17c)) {
case 1:
*param_2 = bVar1;
break;
case 2:
param_2[1] = bVar1;
*param_2 = bVar2;
break;
case 3:
param_2[2] = bVar1;
param_2[1] = bVar2;
*param_2 = bVar3;
break;
case 4:
param_2[3] = bVar1;
param_2[2] = bVar2;
param_2[1] = bVar3;
*param_2 = bVar4;
break;
case 5:
param_2[4] = bVar1;
param_2[3] = bVar2;
param_2[2] = bVar3;
param_2[1] = bVar4;
*param_2 = bVar5;
break;
case 6:
param_2[5] = bVar1;
param_2[4] = bVar2;
param_2[3] = bVar3;
param_2[2] = bVar4;
param_2[1] = bVar5;
*param_2 = bVar6;
break;
case 7:
param_2[6] = bVar1;
param_2[5] = bVar2;
param_2[4] = bVar3;
param_2[3] = bVar4;
param_2[2] = bVar5;
param_2[1] = bVar6;
*param_2 = (byte)(param_3 >> 0x3a);
break;
default:
/* WARNING: Subroutine does not return */
abort();
}
return;
}
| |
40,503 | my_fill_mb2 | eloqsql/strings/ctype-ucs2.c | static void
my_fill_mb2(CHARSET_INFO *cs, char *s, size_t slen, int fill)
{
char buf[10], *last;
size_t buflen, remainder;
DBUG_ASSERT((slen % 2) == 0);
buflen= my_ci_wc_mb(cs, (my_wc_t) fill, (uchar*) buf,
(uchar*) buf + sizeof(buf));
DBUG_ASSERT(buflen > 0);
/*
"last" in the last position where a sequence of "buflen" bytes can start.
*/
for (last= s + slen - buflen; s <= last; s+= buflen)
{
/* Enough space for the character */
memcpy(s, buf, buflen);
}
/*
If there are some more space which is not enough
for the whole multibyte character, then add trailing zeros.
*/
if ((remainder= last + buflen - s) > 0)
bzero(s, (size_t) remainder);
} | O3 | c | my_fill_mb2:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq 0xb8(%rdi), %rax
movslq %ecx, %rsi
leaq -0x30(%rbp), %rcx
leaq -0x3a(%rbp), %rdx
callq *0x30(%rax)
movslq %eax, %r15
addq %r14, %rbx
movq %rbx, %r13
subq %r15, %r13
cmpq %r14, %r13
jb 0xce347
leaq -0x3a(%rbp), %r12
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x2a0a0
addq %r15, %r14
cmpq %r13, %r14
jbe 0xce331
subq %r14, %rbx
je 0xce359
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x2a2a0
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0xce377
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2a250
| my_fill_mb2:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rdx
mov r14, rsi
mov rax, fs:28h
mov [rbp+var_30], rax
mov rax, [rdi+0B8h]
movsxd rsi, ecx
lea rcx, [rbp+var_30]
lea rdx, [rbp+var_3A]
call qword ptr [rax+30h]
movsxd r15, eax
add rbx, r14
mov r13, rbx
sub r13, r15
cmp r13, r14
jb short loc_CE347
lea r12, [rbp+var_3A]
loc_CE331:
mov rdi, r14
mov rsi, r12
mov rdx, r15
call _memcpy
add r14, r15
cmp r14, r13
jbe short loc_CE331
loc_CE347:
sub rbx, r14
jz short loc_CE359
mov rdi, r14
xor esi, esi
mov rdx, rbx
call _memset
loc_CE359:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_CE377
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_CE377:
call ___stack_chk_fail
| unsigned long long my_fill_mb2(long long a1, unsigned long long a2, long long a3, int a4)
{
unsigned long long v5; // r14
long long v6; // r15
long long v7; // rbx
long long v8; // rbx
_BYTE v10[10]; // [rsp+6h] [rbp-3Ah] BYREF
unsigned long long v11[6]; // [rsp+10h] [rbp-30h] BYREF
v5 = a2;
v11[0] = __readfsqword(0x28u);
v6 = (*(int ( **)(long long, _QWORD, _BYTE *, unsigned long long *))(*(_QWORD *)(a1 + 184) + 48LL))(
a1,
a4,
v10,
v11);
v7 = a2 + a3;
if ( v7 - v6 >= a2 )
{
do
{
memcpy(v5, v10, v6);
v5 += v6;
}
while ( v5 <= v7 - v6 );
}
v8 = v7 - v5;
if ( v8 )
memset(v5, 0LL, v8);
return __readfsqword(0x28u);
}
| my_fill_mb2:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RDX
MOV R14,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RDI + 0xb8]
MOVSXD RSI,ECX
LEA RCX,[RBP + -0x30]
LEA RDX,[RBP + -0x3a]
CALL qword ptr [RAX + 0x30]
MOVSXD R15,EAX
ADD RBX,R14
MOV R13,RBX
SUB R13,R15
CMP R13,R14
JC 0x001ce347
LEA R12,[RBP + -0x3a]
LAB_001ce331:
MOV RDI,R14
MOV RSI,R12
MOV RDX,R15
CALL 0x0012a0a0
ADD R14,R15
CMP R14,R13
JBE 0x001ce331
LAB_001ce347:
SUB RBX,R14
JZ 0x001ce359
MOV RDI,R14
XOR ESI,ESI
MOV RDX,RBX
CALL 0x0012a2a0
LAB_001ce359:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001ce377
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001ce377:
CALL 0x0012a250
|
void my_fill_mb2(long param_1,void *param_2,long param_3,int param_4)
{
int iVar1;
void *pvVar2;
void *__dest;
size_t sVar3;
long in_FS_OFFSET;
int1 local_42 [10];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
iVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30))(param_1,(long)param_4,local_42,&local_38);
sVar3 = (size_t)iVar1;
pvVar2 = (void *)((long)param_2 + (param_3 - sVar3));
__dest = param_2;
if (param_2 <= pvVar2) {
do {
memcpy(__dest,local_42,sVar3);
__dest = (void *)((long)__dest + sVar3);
} while (__dest <= pvVar2);
}
sVar3 = (long)param_2 + (param_3 - (long)__dest);
if (sVar3 != 0) {
memset(__dest,0,sVar3);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
40,504 | set_data_file_type | eloqsql/storage/maria/ma_check.c | static void
set_data_file_type(MARIA_SORT_INFO *sort_info, MARIA_SHARE *share)
{
if ((sort_info->new_data_file_type=share->data_file_type) ==
COMPRESSED_RECORD && sort_info->param->testflag & T_UNPACK)
{
MARIA_SHARE tmp;
sort_info->new_data_file_type= share->state.header.org_data_file_type;
/* Set delete_function for sort_delete_record() */
tmp= *share;
tmp.state.header.data_file_type= tmp.state.header.org_data_file_type;
tmp.options= ~HA_OPTION_COMPRESS_RECORD;
_ma_setup_functions(&tmp);
share->delete_record=tmp.delete_record;
}
} | O0 | c | set_data_file_type:
pushq %rbp
movq %rsp, %rbp
subq $0xc50, %rsp # imm = 0xC50
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0xc48(%rbp)
movq %rsi, -0xc50(%rbp)
movq -0xc50(%rbp), %rax
movl 0x7d0(%rax), %eax
movq -0xc48(%rbp), %rcx
movl %eax, 0xf8(%rcx)
cmpl $0x2, %eax
jne 0xaa663
movq -0xc48(%rbp), %rax
movq 0x90(%rax), %rax
movq 0xb10(%rax), %rax
andq $0x4000000, %rax # imm = 0x4000000
cmpq $0x0, %rax
je 0xaa663
movq -0xc50(%rbp), %rax
movzbl 0x17(%rax), %ecx
movq -0xc48(%rbp), %rax
movl %ecx, 0xf8(%rax)
movq -0xc50(%rbp), %rsi
leaq -0xc40(%rbp), %rdi
movl $0xc38, %edx # imm = 0xC38
callq 0x2a0c0
movb -0xc29(%rbp), %al
movb %al, -0xc2a(%rbp)
movl $0xfffffffb, %eax # imm = 0xFFFFFFFB
movq %rax, -0x520(%rbp)
leaq -0xc40(%rbp), %rdi
callq 0x69710
movq -0x5a8(%rbp), %rcx
movq -0xc50(%rbp), %rax
movq %rcx, 0x698(%rax)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xaa67e
addq $0xc50, %rsp # imm = 0xC50
popq %rbp
retq
callq 0x2a290
nopw %cs:(%rax,%rax)
| set_data_file_type:
push rbp
mov rbp, rsp
sub rsp, 0C50h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_C48], rdi
mov [rbp+var_C50], rsi
mov rax, [rbp+var_C50]
mov eax, [rax+7D0h]
mov rcx, [rbp+var_C48]
mov [rcx+0F8h], eax
cmp eax, 2
jnz loc_AA663
mov rax, [rbp+var_C48]
mov rax, [rax+90h]
mov rax, [rax+0B10h]
and rax, 4000000h
cmp rax, 0
jz short loc_AA663
mov rax, [rbp+var_C50]
movzx ecx, byte ptr [rax+17h]
mov rax, [rbp+var_C48]
mov [rax+0F8h], ecx
mov rsi, [rbp+var_C50]
lea rdi, [rbp+var_C40]
mov edx, 0C38h
call _memcpy
mov al, [rbp+var_C29]
mov [rbp+var_C2A], al
mov eax, 0FFFFFFFBh
mov [rbp+var_520], rax
lea rdi, [rbp+var_C40]
call _ma_setup_functions
mov rcx, [rbp+var_5A8]
mov rax, [rbp+var_C50]
mov [rax+698h], rcx
loc_AA663:
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_AA67E
add rsp, 0C50h
pop rbp
retn
loc_AA67E:
call ___stack_chk_fail
| unsigned long long set_data_file_type(long long a1, long long a2)
{
int v2; // eax
_BYTE v4[1688]; // [rsp+10h] [rbp-C40h] BYREF
long long v5; // [rsp+6A8h] [rbp-5A8h]
long long v6; // [rsp+730h] [rbp-520h]
unsigned long long v7; // [rsp+C48h] [rbp-8h]
v7 = __readfsqword(0x28u);
v2 = *(_DWORD *)(a2 + 2000);
*(_DWORD *)(a1 + 248) = v2;
if ( v2 == 2 && (*(_QWORD *)(*(_QWORD *)(a1 + 144) + 2832LL) & 0x4000000LL) != 0 )
{
*(_DWORD *)(a1 + 248) = *(unsigned __int8 *)(a2 + 23);
memcpy(v4, a2, 3128LL);
v4[22] = v4[23];
v6 = 4294967291LL;
ma_setup_functions((long long)v4);
*(_QWORD *)(a2 + 1688) = v5;
}
return __readfsqword(0x28u);
}
| set_data_file_type:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xc50
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0xc48],RDI
MOV qword ptr [RBP + -0xc50],RSI
MOV RAX,qword ptr [RBP + -0xc50]
MOV EAX,dword ptr [RAX + 0x7d0]
MOV RCX,qword ptr [RBP + -0xc48]
MOV dword ptr [RCX + 0xf8],EAX
CMP EAX,0x2
JNZ 0x001aa663
MOV RAX,qword ptr [RBP + -0xc48]
MOV RAX,qword ptr [RAX + 0x90]
MOV RAX,qword ptr [RAX + 0xb10]
AND RAX,0x4000000
CMP RAX,0x0
JZ 0x001aa663
MOV RAX,qword ptr [RBP + -0xc50]
MOVZX ECX,byte ptr [RAX + 0x17]
MOV RAX,qword ptr [RBP + -0xc48]
MOV dword ptr [RAX + 0xf8],ECX
MOV RSI,qword ptr [RBP + -0xc50]
LEA RDI,[RBP + -0xc40]
MOV EDX,0xc38
CALL 0x0012a0c0
MOV AL,byte ptr [RBP + -0xc29]
MOV byte ptr [RBP + -0xc2a],AL
MOV EAX,0xfffffffb
MOV qword ptr [RBP + -0x520],RAX
LEA RDI,[RBP + -0xc40]
CALL 0x00169710
MOV RCX,qword ptr [RBP + -0x5a8]
MOV RAX,qword ptr [RBP + -0xc50]
MOV qword ptr [RAX + 0x698],RCX
LAB_001aa663:
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001aa67e
ADD RSP,0xc50
POP RBP
RET
LAB_001aa67e:
CALL 0x0012a290
|
void set_data_file_type(long param_1,void *param_2)
{
int iVar1;
long in_FS_OFFSET;
int1 local_c48 [22];
int1 local_c32;
int1 local_c31;
int8 local_5b0;
int8 local_528;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
iVar1 = *(int *)((long)param_2 + 2000);
*(int *)(param_1 + 0xf8) = iVar1;
if ((iVar1 == 2) && ((*(ulong *)(*(long *)(param_1 + 0x90) + 0xb10) & 0x4000000) != 0)) {
*(uint *)(param_1 + 0xf8) = (uint)*(byte *)((long)param_2 + 0x17);
memcpy(local_c48,param_2,0xc38);
local_c32 = local_c31;
local_528 = 0xfffffffb;
_ma_setup_functions(local_c48);
*(int8 *)((long)param_2 + 0x698) = local_5b0;
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
40,505 | lock_io_cache | eloqsql/mysys/mf_iocache.c | static int lock_io_cache(IO_CACHE *cache, my_off_t pos)
{
IO_CACHE_SHARE *cshare= cache->share;
DBUG_ENTER("lock_io_cache");
/* Enter the lock. */
mysql_mutex_lock(&cshare->mutex);
cshare->running_threads--;
DBUG_PRINT("io_cache_share", ("%s: %p pos: %lu running: %u",
(cache == cshare->source_cache) ?
"writer" : "reader", cache, (ulong) pos,
cshare->running_threads));
if (cshare->source_cache)
{
/* A write cache is synchronized to the read caches. */
if (cache == cshare->source_cache)
{
/* The writer waits until all readers are here. */
while (cshare->running_threads)
{
DBUG_PRINT("io_cache_share", ("writer waits in lock"));
mysql_cond_wait(&cshare->cond_writer, &cshare->mutex);
}
DBUG_PRINT("io_cache_share", ("writer awoke, going to copy"));
/* Stay locked. Leave the lock later by unlock_io_cache(). */
DBUG_RETURN(1);
}
/* The last thread wakes the writer. */
if (!cshare->running_threads)
{
DBUG_PRINT("io_cache_share", ("waking writer"));
mysql_cond_signal(&cshare->cond_writer);
}
/*
Readers wait until the data is copied from the writer. Another
reason to stop waiting is the removal of the write thread. If this
happens, we leave the lock with old data in the buffer.
*/
while ((!cshare->read_end || (cshare->pos_in_file < pos)) &&
cshare->source_cache)
{
DBUG_PRINT("io_cache_share", ("reader waits in lock"));
mysql_cond_wait(&cshare->cond, &cshare->mutex);
}
/*
If the writer was removed from the share while this thread was
asleep, we need to simulate an EOF condition. The writer cannot
reset the share variables as they might still be in use by readers
of the last block. When we awake here then because the last
joining thread signalled us. If the writer is not the last, it
will not signal. So it is safe to clear the buffer here.
*/
if (!cshare->read_end || (cshare->pos_in_file < pos))
{
DBUG_PRINT("io_cache_share", ("reader found writer removed. EOF"));
cshare->read_end= cshare->buffer; /* Empty buffer. */
cshare->error= 0; /* EOF is not an error. */
}
}
else
{
/*
There are read caches only. The last thread arriving in
lock_io_cache() continues with a locked cache and reads the block.
*/
if (!cshare->running_threads)
{
DBUG_PRINT("io_cache_share", ("last thread joined, going to read"));
/* Stay locked. Leave the lock later by unlock_io_cache(). */
DBUG_RETURN(1);
}
/*
All other threads wait until the requested block is read by the
last thread arriving. Another reason to stop waiting is the
removal of a thread. If this leads to all threads being in the
lock, we have to continue also. The first of the awaken threads
will then do the read.
*/
while ((!cshare->read_end || (cshare->pos_in_file < pos)) &&
cshare->running_threads)
{
DBUG_PRINT("io_cache_share", ("reader waits in lock"));
mysql_cond_wait(&cshare->cond, &cshare->mutex);
}
/* If the block is not yet read, continue with a locked cache and read. */
if (!cshare->read_end || (cshare->pos_in_file < pos))
{
DBUG_PRINT("io_cache_share", ("reader awoke, going to read"));
/* Stay locked. Leave the lock later by unlock_io_cache(). */
DBUG_RETURN(1);
}
/* Another thread did read the block already. */
}
DBUG_PRINT("io_cache_share", ("reader awoke, going to process %u bytes",
(uint) (cshare->read_end ? (size_t)
(cshare->read_end - cshare->buffer) :
0)));
/*
Leave the lock. Do not call unlock_io_cache() later. The thread that
filled the buffer did this and marked all threads as running.
*/
mysql_mutex_unlock(&cshare->mutex);
DBUG_RETURN(0);
} | O0 | c | lock_io_cache:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
leaq 0x713cb(%rip), %rsi # 0x1541a5
movl $0x3dd, %edx # imm = 0x3DD
callq 0xe1790
movq -0x20(%rbp), %rax
movl 0xd8(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0xd8(%rax)
jmp 0xe2df9
movq -0x20(%rbp), %rax
cmpq $0x0, 0xc0(%rax)
je 0xe2f34
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0xc0(%rcx), %rax
jne 0xe2e63
jmp 0xe2e1e
movq -0x20(%rbp), %rax
cmpl $0x0, 0xd8(%rax)
je 0xe2e51
jmp 0xe2e2d
jmp 0xe2e2f
movq -0x20(%rbp), %rdi
addq $0x80, %rdi
movq -0x20(%rbp), %rsi
leaq 0x71360(%rip), %rdx # 0x1541a5
movl $0x3ee, %ecx # imm = 0x3EE
callq 0xe3060
jmp 0xe2e1e
jmp 0xe2e53
jmp 0xe2e55
jmp 0xe2e57
movl $0x1, -0x4(%rbp)
jmp 0xe2ffa
movq -0x20(%rbp), %rax
cmpl $0x0, 0xd8(%rax)
jne 0xe2e84
jmp 0xe2e72
jmp 0xe2e74
movq -0x20(%rbp), %rdi
addq $0x80, %rdi
callq 0xe1800
jmp 0xe2e86
movq -0x20(%rbp), %rax
cmpq $0x0, 0xd0(%rax)
je 0xe2eaa
movq -0x20(%rbp), %rax
movq 0xb8(%rax), %rcx
xorl %eax, %eax
cmpq -0x18(%rbp), %rcx
movb %al, -0x21(%rbp)
jae 0xe2ebc
movq -0x20(%rbp), %rax
cmpq $0x0, 0xc0(%rax)
setne %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0xe2ec5
jmp 0xe2ee8
jmp 0xe2ec7
jmp 0xe2ec9
movq -0x20(%rbp), %rdi
addq $0x48, %rdi
movq -0x20(%rbp), %rsi
leaq 0x712c9(%rip), %rdx # 0x1541a5
movl $0x406, %ecx # imm = 0x406
callq 0xe3060
jmp 0xe2e86
movq -0x20(%rbp), %rax
cmpq $0x0, 0xd0(%rax)
je 0xe2f07
movq -0x20(%rbp), %rax
movq 0xb8(%rax), %rax
cmpq -0x18(%rbp), %rax
jae 0xe2f2f
jmp 0xe2f09
jmp 0xe2f0b
movq -0x20(%rbp), %rax
movq 0xc8(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0xd0(%rax)
movq -0x20(%rbp), %rax
movl $0x0, 0xe0(%rax)
jmp 0xe2fe6
movq -0x20(%rbp), %rax
cmpl $0x0, 0xd8(%rax)
jne 0xe2f53
jmp 0xe2f43
jmp 0xe2f45
jmp 0xe2f47
movl $0x1, -0x4(%rbp)
jmp 0xe2ffa
jmp 0xe2f55
movq -0x20(%rbp), %rax
cmpq $0x0, 0xd0(%rax)
je 0xe2f79
movq -0x20(%rbp), %rax
movq 0xb8(%rax), %rcx
xorl %eax, %eax
cmpq -0x18(%rbp), %rcx
movb %al, -0x22(%rbp)
jae 0xe2f8a
movq -0x20(%rbp), %rax
cmpl $0x0, 0xd8(%rax)
setne %al
movb %al, -0x22(%rbp)
movb -0x22(%rbp), %al
testb $0x1, %al
jne 0xe2f93
jmp 0xe2fb6
jmp 0xe2f95
jmp 0xe2f97
movq -0x20(%rbp), %rdi
addq $0x48, %rdi
movq -0x20(%rbp), %rsi
leaq 0x711fb(%rip), %rdx # 0x1541a5
movl $0x430, %ecx # imm = 0x430
callq 0xe3060
jmp 0xe2f55
movq -0x20(%rbp), %rax
cmpq $0x0, 0xd0(%rax)
je 0xe2fd5
movq -0x20(%rbp), %rax
movq 0xb8(%rax), %rax
cmpq -0x18(%rbp), %rax
jae 0xe2fe4
jmp 0xe2fd7
jmp 0xe2fd9
jmp 0xe2fdb
movl $0x1, -0x4(%rbp)
jmp 0xe2ffa
jmp 0xe2fe6
jmp 0xe2fe8
jmp 0xe2fea
movq -0x20(%rbp), %rdi
callq 0xe18c0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| lock_io_cache:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov rax, [rax+98h]
mov [rbp+var_20], rax
mov rdi, [rbp+var_20]
lea rsi, aWorkspaceLlm4b_35; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 3DDh
call inline_mysql_mutex_lock_23
mov rax, [rbp+var_20]
mov ecx, [rax+0D8h]
add ecx, 0FFFFFFFFh
mov [rax+0D8h], ecx
jmp short $+2
loc_E2DF9:
mov rax, [rbp+var_20]
cmp qword ptr [rax+0C0h], 0
jz loc_E2F34
mov rax, [rbp+var_10]
mov rcx, [rbp+var_20]
cmp rax, [rcx+0C0h]
jnz short loc_E2E63
jmp short $+2
loc_E2E1E:
mov rax, [rbp+var_20]
cmp dword ptr [rax+0D8h], 0
jz short loc_E2E51
jmp short $+2
loc_E2E2D:
jmp short $+2
loc_E2E2F:
mov rdi, [rbp+var_20]
add rdi, 80h
mov rsi, [rbp+var_20]
lea rdx, aWorkspaceLlm4b_35; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 3EEh
call inline_mysql_cond_wait_3
jmp short loc_E2E1E
loc_E2E51:
jmp short $+2
loc_E2E53:
jmp short $+2
loc_E2E55:
jmp short $+2
loc_E2E57:
mov [rbp+var_4], 1
jmp loc_E2FFA
loc_E2E63:
mov rax, [rbp+var_20]
cmp dword ptr [rax+0D8h], 0
jnz short loc_E2E84
jmp short $+2
loc_E2E72:
jmp short $+2
loc_E2E74:
mov rdi, [rbp+var_20]
add rdi, 80h
call inline_mysql_cond_signal_1
loc_E2E84:
jmp short $+2
loc_E2E86:
mov rax, [rbp+var_20]
cmp qword ptr [rax+0D0h], 0
jz short loc_E2EAA
mov rax, [rbp+var_20]
mov rcx, [rax+0B8h]
xor eax, eax
cmp rcx, [rbp+var_18]
mov [rbp+var_21], al
jnb short loc_E2EBC
loc_E2EAA:
mov rax, [rbp+var_20]
cmp qword ptr [rax+0C0h], 0
setnz al
mov [rbp+var_21], al
loc_E2EBC:
mov al, [rbp+var_21]
test al, 1
jnz short loc_E2EC5
jmp short loc_E2EE8
loc_E2EC5:
jmp short $+2
loc_E2EC7:
jmp short $+2
loc_E2EC9:
mov rdi, [rbp+var_20]
add rdi, 48h ; 'H'
mov rsi, [rbp+var_20]
lea rdx, aWorkspaceLlm4b_35; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 406h
call inline_mysql_cond_wait_3
jmp short loc_E2E86
loc_E2EE8:
mov rax, [rbp+var_20]
cmp qword ptr [rax+0D0h], 0
jz short loc_E2F07
mov rax, [rbp+var_20]
mov rax, [rax+0B8h]
cmp rax, [rbp+var_18]
jnb short loc_E2F2F
loc_E2F07:
jmp short $+2
loc_E2F09:
jmp short $+2
loc_E2F0B:
mov rax, [rbp+var_20]
mov rcx, [rax+0C8h]
mov rax, [rbp+var_20]
mov [rax+0D0h], rcx
mov rax, [rbp+var_20]
mov dword ptr [rax+0E0h], 0
loc_E2F2F:
jmp loc_E2FE6
loc_E2F34:
mov rax, [rbp+var_20]
cmp dword ptr [rax+0D8h], 0
jnz short loc_E2F53
jmp short $+2
loc_E2F43:
jmp short $+2
loc_E2F45:
jmp short $+2
loc_E2F47:
mov [rbp+var_4], 1
jmp loc_E2FFA
loc_E2F53:
jmp short $+2
loc_E2F55:
mov rax, [rbp+var_20]
cmp qword ptr [rax+0D0h], 0
jz short loc_E2F79
mov rax, [rbp+var_20]
mov rcx, [rax+0B8h]
xor eax, eax
cmp rcx, [rbp+var_18]
mov [rbp+var_22], al
jnb short loc_E2F8A
loc_E2F79:
mov rax, [rbp+var_20]
cmp dword ptr [rax+0D8h], 0
setnz al
mov [rbp+var_22], al
loc_E2F8A:
mov al, [rbp+var_22]
test al, 1
jnz short loc_E2F93
jmp short loc_E2FB6
loc_E2F93:
jmp short $+2
loc_E2F95:
jmp short $+2
loc_E2F97:
mov rdi, [rbp+var_20]
add rdi, 48h ; 'H'
mov rsi, [rbp+var_20]
lea rdx, aWorkspaceLlm4b_35; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 430h
call inline_mysql_cond_wait_3
jmp short loc_E2F55
loc_E2FB6:
mov rax, [rbp+var_20]
cmp qword ptr [rax+0D0h], 0
jz short loc_E2FD5
mov rax, [rbp+var_20]
mov rax, [rax+0B8h]
cmp rax, [rbp+var_18]
jnb short loc_E2FE4
loc_E2FD5:
jmp short $+2
loc_E2FD7:
jmp short $+2
loc_E2FD9:
jmp short $+2
loc_E2FDB:
mov [rbp+var_4], 1
jmp short loc_E2FFA
loc_E2FE4:
jmp short $+2
loc_E2FE6:
jmp short $+2
loc_E2FE8:
jmp short $+2
loc_E2FEA:
mov rdi, [rbp+var_20]
call inline_mysql_mutex_unlock_24
mov [rbp+var_4], 0
loc_E2FFA:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long lock_io_cache(long long a1, unsigned long long a2)
{
bool v3; // [rsp+Eh] [rbp-22h]
bool v4; // [rsp+Fh] [rbp-21h]
long long v5; // [rsp+10h] [rbp-20h]
v5 = *(_QWORD *)(a1 + 152);
inline_mysql_mutex_lock_23(v5, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 0x3DDu);
--*(_DWORD *)(v5 + 216);
if ( !*(_QWORD *)(v5 + 192) )
{
if ( !*(_DWORD *)(v5 + 216) )
return 1;
while ( 1 )
{
if ( !*(_QWORD *)(v5 + 208) || (v3 = 0, *(_QWORD *)(v5 + 184) < a2) )
v3 = *(_DWORD *)(v5 + 216) != 0;
if ( !v3 )
break;
inline_mysql_cond_wait_3(v5 + 72, v5, "/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 1072LL);
}
if ( !*(_QWORD *)(v5 + 208) || *(_QWORD *)(v5 + 184) < a2 )
return 1;
LABEL_27:
inline_mysql_mutex_unlock_24(v5);
return 0;
}
if ( a1 != *(_QWORD *)(v5 + 192) )
{
if ( !*(_DWORD *)(v5 + 216) )
inline_mysql_cond_signal_1(v5 + 128);
while ( 1 )
{
if ( !*(_QWORD *)(v5 + 208) || (v4 = 0, *(_QWORD *)(v5 + 184) < a2) )
v4 = *(_QWORD *)(v5 + 192) != 0LL;
if ( !v4 )
break;
inline_mysql_cond_wait_3(v5 + 72, v5, "/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 1030LL);
}
if ( !*(_QWORD *)(v5 + 208) || *(_QWORD *)(v5 + 184) < a2 )
{
*(_QWORD *)(v5 + 208) = *(_QWORD *)(v5 + 200);
*(_DWORD *)(v5 + 224) = 0;
}
goto LABEL_27;
}
while ( *(_DWORD *)(v5 + 216) )
inline_mysql_cond_wait_3(v5 + 128, v5, "/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 1006LL);
return 1;
}
| lock_io_cache:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x98]
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x20]
LEA RSI,[0x2541a5]
MOV EDX,0x3dd
CALL 0x001e1790
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX + 0xd8]
ADD ECX,-0x1
MOV dword ptr [RAX + 0xd8],ECX
JMP 0x001e2df9
LAB_001e2df9:
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX + 0xc0],0x0
JZ 0x001e2f34
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RCX + 0xc0]
JNZ 0x001e2e63
JMP 0x001e2e1e
LAB_001e2e1e:
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX + 0xd8],0x0
JZ 0x001e2e51
JMP 0x001e2e2d
LAB_001e2e2d:
JMP 0x001e2e2f
LAB_001e2e2f:
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x80
MOV RSI,qword ptr [RBP + -0x20]
LEA RDX,[0x2541a5]
MOV ECX,0x3ee
CALL 0x001e3060
JMP 0x001e2e1e
LAB_001e2e51:
JMP 0x001e2e53
LAB_001e2e53:
JMP 0x001e2e55
LAB_001e2e55:
JMP 0x001e2e57
LAB_001e2e57:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001e2ffa
LAB_001e2e63:
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX + 0xd8],0x0
JNZ 0x001e2e84
JMP 0x001e2e72
LAB_001e2e72:
JMP 0x001e2e74
LAB_001e2e74:
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x80
CALL 0x001e1800
LAB_001e2e84:
JMP 0x001e2e86
LAB_001e2e86:
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX + 0xd0],0x0
JZ 0x001e2eaa
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RAX + 0xb8]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x18]
MOV byte ptr [RBP + -0x21],AL
JNC 0x001e2ebc
LAB_001e2eaa:
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX + 0xc0],0x0
SETNZ AL
MOV byte ptr [RBP + -0x21],AL
LAB_001e2ebc:
MOV AL,byte ptr [RBP + -0x21]
TEST AL,0x1
JNZ 0x001e2ec5
JMP 0x001e2ee8
LAB_001e2ec5:
JMP 0x001e2ec7
LAB_001e2ec7:
JMP 0x001e2ec9
LAB_001e2ec9:
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x48
MOV RSI,qword ptr [RBP + -0x20]
LEA RDX,[0x2541a5]
MOV ECX,0x406
CALL 0x001e3060
JMP 0x001e2e86
LAB_001e2ee8:
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX + 0xd0],0x0
JZ 0x001e2f07
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0xb8]
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x001e2f2f
LAB_001e2f07:
JMP 0x001e2f09
LAB_001e2f09:
JMP 0x001e2f0b
LAB_001e2f0b:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RAX + 0xc8]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0xd0],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0xe0],0x0
LAB_001e2f2f:
JMP 0x001e2fe6
LAB_001e2f34:
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX + 0xd8],0x0
JNZ 0x001e2f53
JMP 0x001e2f43
LAB_001e2f43:
JMP 0x001e2f45
LAB_001e2f45:
JMP 0x001e2f47
LAB_001e2f47:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001e2ffa
LAB_001e2f53:
JMP 0x001e2f55
LAB_001e2f55:
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX + 0xd0],0x0
JZ 0x001e2f79
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RAX + 0xb8]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x18]
MOV byte ptr [RBP + -0x22],AL
JNC 0x001e2f8a
LAB_001e2f79:
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX + 0xd8],0x0
SETNZ AL
MOV byte ptr [RBP + -0x22],AL
LAB_001e2f8a:
MOV AL,byte ptr [RBP + -0x22]
TEST AL,0x1
JNZ 0x001e2f93
JMP 0x001e2fb6
LAB_001e2f93:
JMP 0x001e2f95
LAB_001e2f95:
JMP 0x001e2f97
LAB_001e2f97:
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x48
MOV RSI,qword ptr [RBP + -0x20]
LEA RDX,[0x2541a5]
MOV ECX,0x430
CALL 0x001e3060
JMP 0x001e2f55
LAB_001e2fb6:
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX + 0xd0],0x0
JZ 0x001e2fd5
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0xb8]
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x001e2fe4
LAB_001e2fd5:
JMP 0x001e2fd7
LAB_001e2fd7:
JMP 0x001e2fd9
LAB_001e2fd9:
JMP 0x001e2fdb
LAB_001e2fdb:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001e2ffa
LAB_001e2fe4:
JMP 0x001e2fe6
LAB_001e2fe6:
JMP 0x001e2fe8
LAB_001e2fe8:
JMP 0x001e2fea
LAB_001e2fea:
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x001e18c0
MOV dword ptr [RBP + -0x4],0x0
LAB_001e2ffa:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 lock_io_cache(long param_1,ulong param_2)
{
long lVar1;
bool bVar2;
lVar1 = *(long *)(param_1 + 0x98);
inline_mysql_mutex_lock(lVar1,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x3dd)
;
*(int *)(lVar1 + 0xd8) = *(int *)(lVar1 + 0xd8) + -1;
if (*(long *)(lVar1 + 0xc0) == 0) {
if (*(int *)(lVar1 + 0xd8) == 0) {
return 1;
}
while( true ) {
if ((*(long *)(lVar1 + 0xd0) == 0) || (bVar2 = false, *(ulong *)(lVar1 + 0xb8) < param_2)) {
bVar2 = *(int *)(lVar1 + 0xd8) != 0;
}
if (!bVar2) break;
inline_mysql_cond_wait
(lVar1 + 0x48,lVar1,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",
0x430);
}
if ((*(long *)(lVar1 + 0xd0) == 0) || (*(ulong *)(lVar1 + 0xb8) < param_2)) {
return 1;
}
}
else {
if (param_1 == *(long *)(lVar1 + 0xc0)) {
while (*(int *)(lVar1 + 0xd8) != 0) {
inline_mysql_cond_wait
(lVar1 + 0x80,lVar1,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",
0x3ee);
}
return 1;
}
if (*(int *)(lVar1 + 0xd8) == 0) {
inline_mysql_cond_signal(lVar1 + 0x80);
}
while( true ) {
if ((*(long *)(lVar1 + 0xd0) == 0) || (bVar2 = false, *(ulong *)(lVar1 + 0xb8) < param_2)) {
bVar2 = *(long *)(lVar1 + 0xc0) != 0;
}
if (!bVar2) break;
inline_mysql_cond_wait
(lVar1 + 0x48,lVar1,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",
0x406);
}
if ((*(long *)(lVar1 + 0xd0) == 0) || (*(ulong *)(lVar1 + 0xb8) < param_2)) {
*(int8 *)(lVar1 + 0xd0) = *(int8 *)(lVar1 + 200);
*(int4 *)(lVar1 + 0xe0) = 0;
}
}
inline_mysql_mutex_unlock(lVar1);
return 0;
}
| |
40,506 | sort_key_read | eloqsql/storage/maria/ma_check.c | static int sort_key_read(MARIA_SORT_PARAM *sort_param, uchar *key)
{
int error;
MARIA_SORT_INFO *sort_info= sort_param->sort_info;
MARIA_HA *info= sort_info->info;
MARIA_KEY int_key;
DBUG_ENTER("sort_key_read");
if ((error=sort_get_next_record(sort_param)))
DBUG_RETURN(error);
if (info->s->state.state.records == sort_info->max_records)
{
_ma_check_print_error(sort_info->param,
"Key %d - Found too many records; Can't continue",
sort_param->key+1);
DBUG_RETURN(1);
}
if (_ma_sort_write_record(sort_param))
DBUG_RETURN(1);
(*info->s->keyinfo[sort_param->key].make_key)(info, &int_key,
sort_param->key, key,
sort_param->record,
sort_param->current_filepos,
0);
sort_param->real_key_length= int_key.data_length + int_key.ref_length;
#ifdef HAVE_valgrind
bzero(key+sort_param->real_key_length,
(sort_param->key_length-sort_param->real_key_length));
#endif
DBUG_RETURN(0);
} | O3 | c | sort_key_read:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x380(%rdi), %r12
movq 0x80(%r12), %r15
callq 0x67620
testl %eax, %eax
jne 0x6c0f8
movq (%r15), %rax
movq 0x18(%rax), %rax
cmpq 0xd8(%r12), %rax
jne 0x6c091
movq 0x90(%r12), %rdi
movl 0x640(%rbx), %edx
incl %edx
leaq 0x9828d(%rip), %rsi # 0x104310
xorl %eax, %eax
callq 0x33f2d
movl $0x1, %eax
jmp 0x6c0f8
movq %rbx, %rdi
callq 0x68be1
movl %eax, %ecx
movl $0x1, %eax
testl %ecx, %ecx
jne 0x6c0f8
movq (%r15), %rax
movq 0x570(%rax), %rax
movl 0x640(%rbx), %edx
imulq $0x118, %rdx, %r10 # imm = 0x118
movq 0x3f0(%rbx), %r8
movq 0x638(%rbx), %r9
movq $0x0, (%rsp)
leaq -0x40(%rbp), %r12
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rcx
callq *0x110(%rax,%r10)
movl 0x14(%r12), %eax
addl 0x10(%r12), %eax
movl %eax, 0x648(%rbx)
xorl %eax, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| sort_key_read:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 30h
mov r14, rsi
mov rbx, rdi
mov r12, [rdi+380h]
mov r15, [r12+80h]
call sort_get_next_record
test eax, eax
jnz loc_6C0F8
mov rax, [r15]
mov rax, [rax+18h]
cmp rax, [r12+0D8h]
jnz short loc_6C091
mov rdi, [r12+90h]
mov edx, [rbx+640h]
inc edx
lea rsi, aKeyDFoundTooMa; "Key %d - Found too many records; Can't "...
xor eax, eax
call _ma_check_print_error
mov eax, 1
jmp short loc_6C0F8
loc_6C091:
mov rdi, rbx
call _ma_sort_write_record
mov ecx, eax
mov eax, 1
test ecx, ecx
jnz short loc_6C0F8
mov rax, [r15]
mov rax, [rax+570h]
mov edx, [rbx+640h]
imul r10, rdx, 118h
mov r8, [rbx+3F0h]
mov r9, [rbx+638h]
mov [rsp+50h+var_50], 0
lea r12, [rbp+var_40]
mov rdi, r15
mov rsi, r12
mov rcx, r14
call qword ptr [rax+r10+110h]
mov eax, [r12+14h]
add eax, [r12+10h]
mov [rbx+648h], eax
xor eax, eax
loc_6C0F8:
add rsp, 30h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long sort_key_read(
unsigned long long a1,
long long a2,
__m128i a3,
__m128 a4,
__m128 a5,
__m128 a6,
double a7,
double a8,
__m128 a9,
__m128 a10)
{
_QWORD *v10; // r12
long long v11; // r15
long long result; // rax
int v13; // ecx
_BYTE v14[16]; // [rsp+10h] [rbp-40h] BYREF
int v15; // [rsp+20h] [rbp-30h]
int v16; // [rsp+24h] [rbp-2Ch]
v10 = *(_QWORD **)(a1 + 896);
v11 = v10[16];
result = sort_get_next_record(a1, a3, a4, a5, a6, a7, a8, a9, a10);
if ( !(_DWORD)result )
{
if ( *(_QWORD *)(*(_QWORD *)v11 + 24LL) == v10[27] )
{
ma_check_print_error(
v10[18],
(long long)"Key %d - Found too many records; Can't continue",
*(_DWORD *)(a1 + 1600) + 1);
return 1LL;
}
else
{
v13 = ma_sort_write_record(a1);
result = 1LL;
if ( !v13 )
{
(*(void ( **)(long long, _BYTE *, _QWORD, long long, _QWORD, _QWORD, _QWORD))(*(_QWORD *)(*(_QWORD *)v11 + 1392LL)
+ 280LL
* *(unsigned int *)(a1 + 1600)
+ 272))(
v11,
v14,
*(unsigned int *)(a1 + 1600),
a2,
*(_QWORD *)(a1 + 1008),
*(_QWORD *)(a1 + 1592),
0LL);
*(_DWORD *)(a1 + 1608) = v15 + v16;
return 0LL;
}
}
}
return result;
}
| sort_key_read:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x30
MOV R14,RSI
MOV RBX,RDI
MOV R12,qword ptr [RDI + 0x380]
MOV R15,qword ptr [R12 + 0x80]
CALL 0x00167620
TEST EAX,EAX
JNZ 0x0016c0f8
MOV RAX,qword ptr [R15]
MOV RAX,qword ptr [RAX + 0x18]
CMP RAX,qword ptr [R12 + 0xd8]
JNZ 0x0016c091
MOV RDI,qword ptr [R12 + 0x90]
MOV EDX,dword ptr [RBX + 0x640]
INC EDX
LEA RSI,[0x204310]
XOR EAX,EAX
CALL 0x00133f2d
MOV EAX,0x1
JMP 0x0016c0f8
LAB_0016c091:
MOV RDI,RBX
CALL 0x00168be1
MOV ECX,EAX
MOV EAX,0x1
TEST ECX,ECX
JNZ 0x0016c0f8
MOV RAX,qword ptr [R15]
MOV RAX,qword ptr [RAX + 0x570]
MOV EDX,dword ptr [RBX + 0x640]
IMUL R10,RDX,0x118
MOV R8,qword ptr [RBX + 0x3f0]
MOV R9,qword ptr [RBX + 0x638]
MOV qword ptr [RSP],0x0
LEA R12,[RBP + -0x40]
MOV RDI,R15
MOV RSI,R12
MOV RCX,R14
CALL qword ptr [RAX + R10*0x1 + 0x110]
MOV EAX,dword ptr [R12 + 0x14]
ADD EAX,dword ptr [R12 + 0x10]
MOV dword ptr [RBX + 0x648],EAX
XOR EAX,EAX
LAB_0016c0f8:
ADD RSP,0x30
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int8 sort_key_read(long param_1,int8 param_2)
{
long lVar1;
long *plVar2;
int iVar3;
int8 uVar4;
int1 local_48 [16];
int local_38;
int local_34;
lVar1 = *(long *)(param_1 + 0x380);
plVar2 = *(long **)(lVar1 + 0x80);
uVar4 = sort_get_next_record();
if ((int)uVar4 == 0) {
if (*(long *)(*plVar2 + 0x18) == *(long *)(lVar1 + 0xd8)) {
_ma_check_print_error
(*(int8 *)(lVar1 + 0x90),"Key %d - Found too many records; Can\'t continue",
*(int *)(param_1 + 0x640) + 1);
uVar4 = 1;
}
else {
iVar3 = _ma_sort_write_record(param_1);
uVar4 = 1;
if (iVar3 == 0) {
(**(code **)(*(long *)(*plVar2 + 0x570) + 0x110 + (ulong)*(uint *)(param_1 + 0x640) * 0x118)
)(plVar2,local_48,(ulong)*(uint *)(param_1 + 0x640),param_2,*(int8 *)(param_1 + 0x3f0)
,*(int8 *)(param_1 + 0x638),0);
*(int *)(param_1 + 0x648) = local_34 + local_38;
uVar4 = 0;
}
}
}
return uVar4;
}
| |
40,507 | parse_device_list(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/arg.cpp | static std::vector<ggml_backend_dev_t> parse_device_list(const std::string & value) {
std::vector<ggml_backend_dev_t> devices;
auto dev_names = string_split<std::string>(value, ',');
if (dev_names.empty()) {
throw std::invalid_argument("no devices specified");
}
if (dev_names.size() == 1 && dev_names[0] == "none") {
devices.push_back(nullptr);
} else {
for (const auto & device : dev_names) {
auto * dev = ggml_backend_dev_by_name(device.c_str());
if (!dev || ggml_backend_dev_type(dev) != GGML_BACKEND_DEVICE_TYPE_GPU) {
throw std::invalid_argument(string_format("invalid device: %s", device.c_str()));
}
devices.push_back(dev);
}
devices.push_back(nullptr);
}
return devices;
} | O2 | cpp | parse_device_list(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movq %rsp, %rdi
pushq $0x2c
popq %rdx
callq 0x35115
movq (%rsp), %r14
movq 0x8(%rsp), %r12
cmpq %r12, %r14
je 0x36956
movq %r12, %rax
subq %r14, %rax
cmpq $0x20, %rax
jne 0x368a8
leaq 0x748d7(%rip), %rsi # 0xab157
movq %r14, %rdi
callq 0x38e8e
testb %al, %al
je 0x3689f
leaq 0x20(%rsp), %rsi
andq $0x0, (%rsi)
movq %rbx, %rdi
callq 0x45aec
jmp 0x368f3
movq (%rsp), %r14
movq 0x8(%rsp), %r12
leaq 0x18(%rsp), %r15
cmpq %r12, %r14
je 0x368e2
movq (%r14), %rdi
callq 0x23100
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0x3690b
movq %rax, %rdi
callq 0x23180
cmpl $0x1, %eax
jne 0x3690b
movq %rbx, %rdi
movq %r15, %rsi
callq 0x45ace
addq $0x20, %r14
jmp 0x368ad
leaq 0x20(%rsp), %rsi
andq $0x0, (%rsi)
movq %rbx, %rdi
callq 0x45aec
movq %rsp, %rdi
callq 0x26fb2
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x23460
movq %rax, %r15
movq (%r14), %rdx
leaq 0x798b8(%rip), %rsi # 0xb01d8
leaq 0x20(%rsp), %rdi
xorl %eax, %eax
callq 0x532b7
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r15, %rdi
callq 0x23f40
xorl %ebp, %ebp
movq 0xc568b(%rip), %rsi # 0xfbfd0
movq 0xc5664(%rip), %rdx # 0xfbfb0
movq %r15, %rdi
callq 0x23f20
jmp 0x36986
pushq $0x10
popq %rdi
callq 0x23460
movq %rax, %r15
leaq 0x7985b(%rip), %rsi # 0xb01c3
movq %rax, %rdi
callq 0x240d0
movq 0xc5659(%rip), %rsi # 0xfbfd0
movq 0xc5632(%rip), %rdx # 0xfbfb0
movq %r15, %rdi
callq 0x23f20
jmp 0x369b4
jmp 0x369b4
jmp 0x369a7
jmp 0x369b4
movq %rax, %r14
jmp 0x369bf
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x241d8
testb %bpl, %bpl
jne 0x369aa
jmp 0x369b7
movq %rax, %r14
movq %r15, %rdi
callq 0x236b0
jmp 0x369b7
movq %rax, %r14
movq %rsp, %rdi
callq 0x26fb2
movq %rbx, %rdi
callq 0x2768e
movq %r14, %rdi
callq 0x23fa0
nop
| _ZL17parse_device_listRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 40h
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
and qword ptr [rdi+10h], 0
mov rdi, rsp
push 2Ch ; ','
pop rdx
call _ZL12string_splitINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorIT_SaIS7_EERKS5_c; string_split<std::string>(std::string const&,char)
mov r14, [rsp+68h+var_68]
mov r12, [rsp+68h+var_60]
cmp r14, r12
jz loc_36956
mov rax, r12
sub rax, r14
cmp rax, 20h ; ' '
jnz short loc_368A8
lea rsi, aNone; "none"
mov rdi, r14
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz short loc_3689F
lea rsi, [rsp+68h+var_48]
and qword ptr [rsi], 0
mov rdi, rbx
call _ZNSt6vectorIP19ggml_backend_deviceSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<ggml_backend_device *>::emplace_back<ggml_backend_device *>(ggml_backend_device * &&)
jmp short loc_368F3
loc_3689F:
mov r14, [rsp+68h+var_68]
mov r12, [rsp+68h+var_60]
loc_368A8:
lea r15, [rsp+68h+var_50]
loc_368AD:
cmp r14, r12
jz short loc_368E2
mov rdi, [r14]
call _ggml_backend_dev_by_name
mov [rsp+68h+var_50], rax
test rax, rax
jz short loc_3690B
mov rdi, rax
call _ggml_backend_dev_type
cmp eax, 1
jnz short loc_3690B
mov rdi, rbx
mov rsi, r15
call _ZNSt6vectorIP19ggml_backend_deviceSaIS1_EE9push_backERKS1_; std::vector<ggml_backend_device *>::push_back(ggml_backend_device * const&)
add r14, 20h ; ' '
jmp short loc_368AD
loc_368E2:
lea rsi, [rsp+68h+var_48]
and qword ptr [rsi], 0
mov rdi, rbx
call _ZNSt6vectorIP19ggml_backend_deviceSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<ggml_backend_device *>::emplace_back<ggml_backend_device *>(ggml_backend_device * &&)
loc_368F3:
mov rdi, rsp
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rax, rbx
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_3690B:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r15, rax
mov rdx, [r14]
lea rsi, aInvalidDeviceS; "invalid device: %s"
lea rdi, [rsp+68h+var_48]
xor eax, eax
call _Z13string_formatB5cxx11PKcz; string_format(char const*,...)
mov bpl, 1
lea rsi, [rsp+68h+var_48]
mov rdi, r15
call __ZNSt16invalid_argumentC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::invalid_argument::invalid_argument(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt16invalid_argumentD1Ev_ptr; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
jmp short loc_36986
loc_36956:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aNoDevicesSpeci; "no devices specified"
mov rdi, rax; this
call __ZNSt16invalid_argumentC1EPKc; std::invalid_argument::invalid_argument(char const*)
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt16invalid_argumentD1Ev_ptr; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
loc_36986:
jmp short loc_369B4
jmp short loc_369B4
jmp short loc_369A7
jmp short loc_369B4
mov r14, rax
jmp short loc_369BF
mov r14, rax
lea rdi, [rsp+68h+var_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_369AA
jmp short loc_369B7
loc_369A7:
mov r14, rax
loc_369AA:
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_369B7
loc_369B4:
mov r14, rax
loc_369B7:
mov rdi, rsp
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
loc_369BF:
mov rdi, rbx
call _ZNSt12_Vector_baseIP19ggml_backend_deviceSaIS1_EED2Ev; std::_Vector_base<ggml_backend_device *>::~_Vector_base()
mov rdi, r14
call __Unwind_Resume
| long long parse_device_list(long long a1, long long a2)
{
_QWORD *v2; // r14
_QWORD *v3; // r12
long long v4; // rax
void *v6; // r15
int v7; // ecx
int v8; // r8d
int v9; // r9d
std::invalid_argument *exception; // r15
_QWORD *v11; // [rsp+0h] [rbp-68h] BYREF
_QWORD *v12; // [rsp+8h] [rbp-60h]
long long v13; // [rsp+18h] [rbp-50h] BYREF
_QWORD v14[9]; // [rsp+20h] [rbp-48h] BYREF
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
string_split<std::string>((long long)&v11, a2, 0x2Cu);
v2 = v11;
v3 = v12;
if ( v11 == v12 )
{
exception = (std::invalid_argument *)__cxa_allocate_exception(0x10uLL);
std::invalid_argument::invalid_argument(exception, "no devices specified");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::invalid_argument,
(void (*)(void *))&std::invalid_argument::~invalid_argument);
}
if ( (char *)v12 - (char *)v11 == 32 )
{
if ( (unsigned __int8)std::operator==<char>(v11, "none") )
goto LABEL_9;
v2 = v11;
v3 = v12;
}
while ( v2 != v3 )
{
v4 = ggml_backend_dev_by_name(*v2);
v13 = v4;
if ( !v4 || (unsigned int)ggml_backend_dev_type(v4) != 1 )
{
v6 = __cxa_allocate_exception(0x10uLL);
string_format[abi:cxx11]((unsigned int)v14, (unsigned int)"invalid device: %s", *v2, v7, v8, v9);
std::invalid_argument::invalid_argument(v6, v14);
__cxa_throw(
v6,
(struct type_info *)&`typeinfo for'std::invalid_argument,
(void (*)(void *))&std::invalid_argument::~invalid_argument);
}
std::vector<ggml_backend_device *>::push_back(a1, &v13);
v2 += 4;
}
LABEL_9:
v14[0] = 0LL;
std::vector<ggml_backend_device *>::emplace_back<ggml_backend_device *>(a1, v14);
std::vector<std::string>::~vector((long long)&v11);
return a1;
}
| parse_device_list:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
AND qword ptr [RDI + 0x10],0x0
LAB_00136850:
MOV RDI,RSP
PUSH 0x2c
POP RDX
CALL 0x00135115
MOV R14,qword ptr [RSP]
MOV R12,qword ptr [RSP + 0x8]
CMP R14,R12
JZ 0x00136956
MOV RAX,R12
SUB RAX,R14
CMP RAX,0x20
JNZ 0x001368a8
LEA RSI,[0x1ab157]
MOV RDI,R14
CALL 0x00138e8e
TEST AL,AL
JZ 0x0013689f
LEA RSI,[RSP + 0x20]
AND qword ptr [RSI],0x0
LAB_00136895:
MOV RDI,RBX
CALL 0x00145aec
JMP 0x001368f3
LAB_0013689f:
MOV R14,qword ptr [RSP]
MOV R12,qword ptr [RSP + 0x8]
LAB_001368a8:
LEA R15,[RSP + 0x18]
LAB_001368ad:
CMP R14,R12
JZ 0x001368e2
MOV RDI,qword ptr [R14]
LAB_001368b5:
CALL 0x00123100
MOV qword ptr [RSP + 0x18],RAX
TEST RAX,RAX
JZ 0x0013690b
MOV RDI,RAX
CALL 0x00123180
CMP EAX,0x1
JNZ 0x0013690b
MOV RDI,RBX
MOV RSI,R15
CALL 0x00145ace
ADD R14,0x20
JMP 0x001368ad
LAB_001368e2:
LEA RSI,[RSP + 0x20]
AND qword ptr [RSI],0x0
LAB_001368eb:
MOV RDI,RBX
CALL 0x00145aec
LAB_001368f3:
MOV RDI,RSP
CALL 0x00126fb2
MOV RAX,RBX
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0013690b:
PUSH 0x10
POP RDI
CALL 0x00123460
MOV R15,RAX
MOV RDX,qword ptr [R14]
LAB_00136919:
LEA RSI,[0x1b01d8]
LEA RDI,[RSP + 0x20]
XOR EAX,EAX
CALL 0x001532b7
MOV BPL,0x1
LAB_0013692f:
LEA RSI,[RSP + 0x20]
MOV RDI,R15
CALL 0x00123f40
XOR EBP,EBP
MOV RSI,qword ptr [0x001fbfd0]
MOV RDX,qword ptr [0x001fbfb0]
MOV RDI,R15
CALL 0x00123f20
LAB_00136956:
PUSH 0x10
POP RDI
CALL 0x00123460
MOV R15,RAX
LAB_00136961:
LEA RSI,[0x1b01c3]
MOV RDI,RAX
CALL 0x001240d0
LAB_00136970:
MOV RSI,qword ptr [0x001fbfd0]
MOV RDX,qword ptr [0x001fbfb0]
MOV RDI,R15
CALL 0x00123f20
|
/* parse_device_list(std::__cxx11::string const&) */
string * parse_device_list(string *param_1)
{
bool bVar1;
int iVar2;
invalid_argument *piVar3;
char in_SIL;
string *psVar4;
string *psVar5;
string *local_68;
string *local_60;
ggml_backend_device *local_50;
ggml_backend_device *local_48 [4];
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
/* try { // try from 00136850 to 0013685a has its CatchHandler @ 0013698e */
string_split<std::__cxx11::string>((string *)&local_68,in_SIL);
if (local_68 == local_60) {
piVar3 = (invalid_argument *)__cxa_allocate_exception(0x10);
/* try { // try from 00136961 to 0013696f has its CatchHandler @ 0013698a */
std::invalid_argument::invalid_argument(piVar3,"no devices specified");
/* try { // try from 00136970 to 00136985 has its CatchHandler @ 00136988 */
/* WARNING: Subroutine does not return */
__cxa_throw(piVar3,PTR_typeinfo_001fbfd0,PTR__invalid_argument_001fbfb0);
}
psVar4 = local_60;
psVar5 = local_68;
if (((long)local_60 - (long)local_68 == 0x20) &&
(bVar1 = std::operator==(local_68,"none"), psVar4 = local_60, psVar5 = local_68, bVar1)) {
local_48[0] = (ggml_backend_device *)0x0;
/* try { // try from 00136895 to 0013689c has its CatchHandler @ 00136986 */
std::vector<ggml_backend_device*,std::allocator<ggml_backend_device*>>::
emplace_back<ggml_backend_device*>
((vector<ggml_backend_device*,std::allocator<ggml_backend_device*>> *)param_1,local_48
);
}
else {
for (; psVar5 != psVar4; psVar5 = psVar5 + 0x20) {
/* try { // try from 001368b5 to 001368db has its CatchHandler @ 001369b4 */
local_50 = (ggml_backend_device *)ggml_backend_dev_by_name(*(int8 *)psVar5);
if ((local_50 == (ggml_backend_device *)0x0) ||
(iVar2 = ggml_backend_dev_type(local_50), iVar2 != 1)) {
piVar3 = (invalid_argument *)__cxa_allocate_exception(0x10);
/* try { // try from 00136919 to 0013692b has its CatchHandler @ 001369a7 */
string_format_abi_cxx11_((char *)local_48,"invalid device: %s",*(int8 *)psVar5);
/* try { // try from 0013692f to 00136953 has its CatchHandler @ 00136993 */
std::invalid_argument::invalid_argument(piVar3,(string *)local_48);
/* WARNING: Subroutine does not return */
__cxa_throw(piVar3,PTR_typeinfo_001fbfd0,PTR__invalid_argument_001fbfb0);
}
std::vector<ggml_backend_device*,std::allocator<ggml_backend_device*>>::push_back
((vector<ggml_backend_device*,std::allocator<ggml_backend_device*>> *)param_1,
&local_50);
}
local_48[0] = (ggml_backend_device *)0x0;
/* try { // try from 001368eb to 001368f2 has its CatchHandler @ 0013698c */
std::vector<ggml_backend_device*,std::allocator<ggml_backend_device*>>::
emplace_back<ggml_backend_device*>
((vector<ggml_backend_device*,std::allocator<ggml_backend_device*>> *)param_1,local_48
);
}
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_68);
return param_1;
}
| |
40,508 | glfwPlatformGetWindowSize | untodesu[P]riteg/build_O1/_deps/glfw-src/src/x11_window.c | void _glfwPlatformGetWindowSize(_GLFWwindow* window, int* width, int* height)
{
XWindowAttributes attribs;
XGetWindowAttributes(_glfw.x11.display, window->x11.handle, &attribs);
if (width)
*width = attribs.width;
if (height)
*height = attribs.height;
} | O1 | c | glfwPlatformGetWindowSize:
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rdx, %rbx
movq %rsi, %r14
leaq 0x81862(%rip), %rax # 0xa4638
movq 0x1fec0(%rax), %rax
movq 0x348(%rdi), %rsi
movq %rsp, %rdx
movq %rax, %rdi
callq 0xcf20
testq %r14, %r14
je 0x22dfb
movl 0x8(%rsp), %eax
movl %eax, (%r14)
testq %rbx, %rbx
je 0x22e06
movl 0xc(%rsp), %eax
movl %eax, (%rbx)
addq $0x88, %rsp
popq %rbx
popq %r14
retq
| _glfwPlatformGetWindowSize:
push r14
push rbx
sub rsp, 88h
mov rbx, rdx
mov r14, rsi
lea rax, _glfw
mov rax, [rax+1FEC0h]
mov rsi, [rdi+348h]
mov rdx, rsp
mov rdi, rax
call _XGetWindowAttributes
test r14, r14
jz short loc_22DFB
mov eax, [rsp+98h+var_90]
mov [r14], eax
loc_22DFB:
test rbx, rbx
jz short loc_22E06
mov eax, [rsp+98h+var_8C]
mov [rbx], eax
loc_22E06:
add rsp, 88h
pop rbx
pop r14
retn
| long long glfwPlatformGetWindowSize(long long a1, unsigned int *a2, unsigned int *a3)
{
long long result; // rax
long long v5; // [rsp+0h] [rbp-98h] BYREF
unsigned int v6; // [rsp+8h] [rbp-90h]
unsigned int v7; // [rsp+Ch] [rbp-8Ch]
result = XGetWindowAttributes(*(_QWORD *)&glfw[32688], *(_QWORD *)(a1 + 840), &v5);
if ( a2 )
{
result = v6;
*a2 = v6;
}
if ( a3 )
{
result = v7;
*a3 = v7;
}
return result;
}
| _glfwPlatformGetWindowSize:
PUSH R14
PUSH RBX
SUB RSP,0x88
MOV RBX,RDX
MOV R14,RSI
LEA RAX,[0x1a4638]
MOV RAX,qword ptr [RAX + 0x1fec0]
MOV RSI,qword ptr [RDI + 0x348]
MOV RDX,RSP
MOV RDI,RAX
CALL 0x0010cf20
TEST R14,R14
JZ 0x00122dfb
MOV EAX,dword ptr [RSP + 0x8]
MOV dword ptr [R14],EAX
LAB_00122dfb:
TEST RBX,RBX
JZ 0x00122e06
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [RBX],EAX
LAB_00122e06:
ADD RSP,0x88
POP RBX
POP R14
RET
|
void _glfwPlatformGetWindowSize(long param_1,int4 *param_2,int4 *param_3)
{
int1 auStack_98 [8];
int4 local_90;
int4 local_8c;
XGetWindowAttributes(DAT_001c44f8,*(int8 *)(param_1 + 0x348),auStack_98);
if (param_2 != (int4 *)0x0) {
*param_2 = local_90;
}
if (param_3 != (int4 *)0x0) {
*param_3 = local_8c;
}
return;
}
| |
40,509 | cs_leave | eloqsql/strings/ctype.c | static int cs_leave(MY_XML_PARSER *st,const char *attr, size_t len)
{
struct my_cs_file_info *i= (struct my_cs_file_info *)st->user_data;
const struct my_cs_file_section_st *s= cs_file_sec(attr,len);
int state= s ? s->state : 0;
int rc;
switch(state){
case _CS_COLLATION:
if (i->tailoring_length)
i->cs.tailoring= i->tailoring;
rc= i->loader->add_collation ? i->loader->add_collation(&i->cs) : MY_XML_OK;
break;
/* Rules: Logical Reset Positions */
case _CS_RESET_FIRST_NON_IGNORABLE:
rc= tailoring_append(st, "[first non-ignorable]", 0, NULL);
break;
case _CS_RESET_LAST_NON_IGNORABLE:
rc= tailoring_append(st, "[last non-ignorable]", 0, NULL);
break;
case _CS_RESET_FIRST_PRIMARY_IGNORABLE:
rc= tailoring_append(st, "[first primary ignorable]", 0, NULL);
break;
case _CS_RESET_LAST_PRIMARY_IGNORABLE:
rc= tailoring_append(st, "[last primary ignorable]", 0, NULL);
break;
case _CS_RESET_FIRST_SECONDARY_IGNORABLE:
rc= tailoring_append(st, "[first secondary ignorable]", 0, NULL);
break;
case _CS_RESET_LAST_SECONDARY_IGNORABLE:
rc= tailoring_append(st, "[last secondary ignorable]", 0, NULL);
break;
case _CS_RESET_FIRST_TERTIARY_IGNORABLE:
rc= tailoring_append(st, "[first tertiary ignorable]", 0, NULL);
break;
case _CS_RESET_LAST_TERTIARY_IGNORABLE:
rc= tailoring_append(st, "[last tertiary ignorable]", 0, NULL);
break;
case _CS_RESET_FIRST_TRAILING:
rc= tailoring_append(st, "[first trailing]", 0, NULL);
break;
case _CS_RESET_LAST_TRAILING:
rc= tailoring_append(st, "[last trailing]", 0, NULL);
break;
case _CS_RESET_FIRST_VARIABLE:
rc= tailoring_append(st, "[first variable]", 0, NULL);
break;
case _CS_RESET_LAST_VARIABLE:
rc= tailoring_append(st, "[last variable]", 0, NULL);
break;
default:
rc=MY_XML_OK;
}
return rc;
} | O0 | c | cs_leave:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x140(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xd7d00
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0xd6af6
movq -0x28(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x34(%rbp)
jmp 0xd6afd
xorl %eax, %eax
movl %eax, -0x34(%rbp)
jmp 0xd6afd
movl -0x34(%rbp), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x38(%rbp)
subl $0x9, %eax
je 0xd6bd7
jmp 0xd6b14
movl -0x38(%rbp), %eax
subl $0x191, %eax # imm = 0x191
je 0xd6c84
jmp 0xd6b24
movl -0x38(%rbp), %eax
subl $0x192, %eax # imm = 0x192
je 0xd6ca3
jmp 0xd6b34
movl -0x38(%rbp), %eax
subl $0x193, %eax # imm = 0x193
je 0xd6cc2
jmp 0xd6b44
movl -0x38(%rbp), %eax
subl $0x194, %eax # imm = 0x194
je 0xd6ce1
jmp 0xd6b54
movl -0x38(%rbp), %eax
subl $0x195, %eax # imm = 0x195
je 0xd6d00
jmp 0xd6b64
movl -0x38(%rbp), %eax
subl $0x196, %eax # imm = 0x196
je 0xd6d1f
jmp 0xd6b74
movl -0x38(%rbp), %eax
subl $0x197, %eax # imm = 0x197
je 0xd6d3b
jmp 0xd6b84
movl -0x38(%rbp), %eax
subl $0x198, %eax # imm = 0x198
je 0xd6d57
jmp 0xd6b94
movl -0x38(%rbp), %eax
subl $0x199, %eax # imm = 0x199
je 0xd6d73
jmp 0xd6ba4
movl -0x38(%rbp), %eax
subl $0x19a, %eax # imm = 0x19A
je 0xd6d8f
jmp 0xd6bb4
movl -0x38(%rbp), %eax
subl $0x19b, %eax # imm = 0x19B
je 0xd6c46
jmp 0xd6bc4
movl -0x38(%rbp), %eax
subl $0x19c, %eax # imm = 0x19C
je 0xd6c65
jmp 0xd6dab
movq -0x20(%rbp), %rax
cmpq $0x0, 0x690(%rax)
je 0xd6bfb
movq -0x20(%rbp), %rax
movq 0x688(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x718(%rax)
movq -0x20(%rbp), %rax
movq 0x7a8(%rax), %rax
cmpq $0x0, 0xa8(%rax)
je 0xd6c34
movq -0x20(%rbp), %rax
movq 0x7a8(%rax), %rax
movq 0xa8(%rax), %rax
movq -0x20(%rbp), %rdi
addq $0x6e0, %rdi # imm = 0x6E0
callq *%rax
movl %eax, -0x3c(%rbp)
jmp 0xd6c3b
xorl %eax, %eax
movl %eax, -0x3c(%rbp)
jmp 0xd6c3b
movl -0x3c(%rbp), %eax
movl %eax, -0x30(%rbp)
jmp 0xd6db2
movq -0x8(%rbp), %rdi
leaq 0x11d08(%rip), %rsi # 0xe8959
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0xd7d90
movl %eax, -0x30(%rbp)
jmp 0xd6db2
movq -0x8(%rbp), %rdi
leaq 0x11cff(%rip), %rsi # 0xe896f
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0xd7d90
movl %eax, -0x30(%rbp)
jmp 0xd6db2
movq -0x8(%rbp), %rdi
leaq 0x11cf5(%rip), %rsi # 0xe8984
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0xd7d90
movl %eax, -0x30(%rbp)
jmp 0xd6db2
movq -0x8(%rbp), %rdi
leaq 0x11cf0(%rip), %rsi # 0xe899e
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0xd7d90
movl %eax, -0x30(%rbp)
jmp 0xd6db2
movq -0x8(%rbp), %rdi
leaq 0x11cea(%rip), %rsi # 0xe89b7
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0xd7d90
movl %eax, -0x30(%rbp)
jmp 0xd6db2
movq -0x8(%rbp), %rdi
leaq 0x11ce7(%rip), %rsi # 0xe89d3
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0xd7d90
movl %eax, -0x30(%rbp)
jmp 0xd6db2
movq -0x8(%rbp), %rdi
leaq 0x11ce3(%rip), %rsi # 0xe89ee
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0xd7d90
movl %eax, -0x30(%rbp)
jmp 0xd6db2
movq -0x8(%rbp), %rdi
leaq 0x11cdf(%rip), %rsi # 0xe8a09
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0xd7d90
movl %eax, -0x30(%rbp)
jmp 0xd6db2
movq -0x8(%rbp), %rdi
leaq 0x11cdd(%rip), %rsi # 0xe8a23
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0xd7d90
movl %eax, -0x30(%rbp)
jmp 0xd6db2
movq -0x8(%rbp), %rdi
leaq 0x11cd2(%rip), %rsi # 0xe8a34
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0xd7d90
movl %eax, -0x30(%rbp)
jmp 0xd6db2
movq -0x8(%rbp), %rdi
leaq 0x11cc6(%rip), %rsi # 0xe8a44
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0xd7d90
movl %eax, -0x30(%rbp)
jmp 0xd6db2
movq -0x8(%rbp), %rdi
leaq 0x11cbb(%rip), %rsi # 0xe8a55
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0xd7d90
movl %eax, -0x30(%rbp)
jmp 0xd6db2
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| cs_leave:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_8]
mov rax, [rax+140h]
mov [rbp+var_20], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call cs_file_sec
mov [rbp+var_28], rax
cmp [rbp+var_28], 0
jz short loc_D6AF6
mov rax, [rbp+var_28]
mov eax, [rax]
mov [rbp+var_34], eax
jmp short loc_D6AFD
loc_D6AF6:
xor eax, eax
mov [rbp+var_34], eax
jmp short $+2
loc_D6AFD:
mov eax, [rbp+var_34]
mov [rbp+var_2C], eax
mov eax, [rbp+var_2C]
mov [rbp+var_38], eax
sub eax, 9
jz loc_D6BD7
jmp short $+2
loc_D6B14:
mov eax, [rbp+var_38]
sub eax, 191h
jz loc_D6C84
jmp short $+2
loc_D6B24:
mov eax, [rbp+var_38]
sub eax, 192h
jz loc_D6CA3
jmp short $+2
loc_D6B34:
mov eax, [rbp+var_38]
sub eax, 193h
jz loc_D6CC2
jmp short $+2
loc_D6B44:
mov eax, [rbp+var_38]
sub eax, 194h
jz loc_D6CE1
jmp short $+2
loc_D6B54:
mov eax, [rbp+var_38]
sub eax, 195h
jz loc_D6D00
jmp short $+2
loc_D6B64:
mov eax, [rbp+var_38]
sub eax, 196h
jz loc_D6D1F
jmp short $+2
loc_D6B74:
mov eax, [rbp+var_38]
sub eax, 197h
jz loc_D6D3B
jmp short $+2
loc_D6B84:
mov eax, [rbp+var_38]
sub eax, 198h
jz loc_D6D57
jmp short $+2
loc_D6B94:
mov eax, [rbp+var_38]
sub eax, 199h
jz loc_D6D73
jmp short $+2
loc_D6BA4:
mov eax, [rbp+var_38]
sub eax, 19Ah
jz loc_D6D8F
jmp short $+2
loc_D6BB4:
mov eax, [rbp+var_38]
sub eax, 19Bh
jz loc_D6C46
jmp short $+2
loc_D6BC4:
mov eax, [rbp+var_38]
sub eax, 19Ch
jz loc_D6C65
jmp loc_D6DAB
loc_D6BD7:
mov rax, [rbp+var_20]
cmp qword ptr [rax+690h], 0
jz short loc_D6BFB
mov rax, [rbp+var_20]
mov rcx, [rax+688h]
mov rax, [rbp+var_20]
mov [rax+718h], rcx
loc_D6BFB:
mov rax, [rbp+var_20]
mov rax, [rax+7A8h]
cmp qword ptr [rax+0A8h], 0
jz short loc_D6C34
mov rax, [rbp+var_20]
mov rax, [rax+7A8h]
mov rax, [rax+0A8h]
mov rdi, [rbp+var_20]
add rdi, 6E0h
call rax
mov [rbp+var_3C], eax
jmp short loc_D6C3B
loc_D6C34:
xor eax, eax
mov [rbp+var_3C], eax
jmp short $+2
loc_D6C3B:
mov eax, [rbp+var_3C]
mov [rbp+var_30], eax
jmp loc_D6DB2
loc_D6C46:
mov rdi, [rbp+var_8]
lea rsi, aFirstNonIgnora; "[first non-ignorable]"
xor eax, eax
mov ecx, eax
mov rdx, rcx
call tailoring_append
mov [rbp+var_30], eax
jmp loc_D6DB2
loc_D6C65:
mov rdi, [rbp+var_8]
lea rsi, aLastNonIgnorab; "[last non-ignorable]"
xor eax, eax
mov ecx, eax
mov rdx, rcx
call tailoring_append
mov [rbp+var_30], eax
jmp loc_D6DB2
loc_D6C84:
mov rdi, [rbp+var_8]
lea rsi, aFirstPrimaryIg; "[first primary ignorable]"
xor eax, eax
mov ecx, eax
mov rdx, rcx
call tailoring_append
mov [rbp+var_30], eax
jmp loc_D6DB2
loc_D6CA3:
mov rdi, [rbp+var_8]
lea rsi, aLastPrimaryIgn; "[last primary ignorable]"
xor eax, eax
mov ecx, eax
mov rdx, rcx
call tailoring_append
mov [rbp+var_30], eax
jmp loc_D6DB2
loc_D6CC2:
mov rdi, [rbp+var_8]
lea rsi, aFirstSecondary; "[first secondary ignorable]"
xor eax, eax
mov ecx, eax
mov rdx, rcx
call tailoring_append
mov [rbp+var_30], eax
jmp loc_D6DB2
loc_D6CE1:
mov rdi, [rbp+var_8]
lea rsi, aLastSecondaryI; "[last secondary ignorable]"
xor eax, eax
mov ecx, eax
mov rdx, rcx
call tailoring_append
mov [rbp+var_30], eax
jmp loc_D6DB2
loc_D6D00:
mov rdi, [rbp+var_8]
lea rsi, aFirstTertiaryI; "[first tertiary ignorable]"
xor eax, eax
mov ecx, eax
mov rdx, rcx
call tailoring_append
mov [rbp+var_30], eax
jmp loc_D6DB2
loc_D6D1F:
mov rdi, [rbp+var_8]
lea rsi, aLastTertiaryIg; "[last tertiary ignorable]"
xor eax, eax
mov ecx, eax
mov rdx, rcx
call tailoring_append
mov [rbp+var_30], eax
jmp short loc_D6DB2
loc_D6D3B:
mov rdi, [rbp+var_8]
lea rsi, aFirstTrailing; "[first trailing]"
xor eax, eax
mov ecx, eax
mov rdx, rcx
call tailoring_append
mov [rbp+var_30], eax
jmp short loc_D6DB2
loc_D6D57:
mov rdi, [rbp+var_8]
lea rsi, aLastTrailing; "[last trailing]"
xor eax, eax
mov ecx, eax
mov rdx, rcx
call tailoring_append
mov [rbp+var_30], eax
jmp short loc_D6DB2
loc_D6D73:
mov rdi, [rbp+var_8]
lea rsi, aFirstVariable; "[first variable]"
xor eax, eax
mov ecx, eax
mov rdx, rcx
call tailoring_append
mov [rbp+var_30], eax
jmp short loc_D6DB2
loc_D6D8F:
mov rdi, [rbp+var_8]
lea rsi, aLastVariable; "[last variable]"
xor eax, eax
mov ecx, eax
mov rdx, rcx
call tailoring_append
mov [rbp+var_30], eax
jmp short loc_D6DB2
loc_D6DAB:
mov [rbp+var_30], 0
loc_D6DB2:
mov eax, [rbp+var_30]
add rsp, 40h
pop rbp
retn
| long long cs_leave(long long a1, long long a2, long long a3)
{
int v5; // [rsp+Ch] [rbp-34h]
int *v7; // [rsp+18h] [rbp-28h]
_QWORD *v8; // [rsp+20h] [rbp-20h]
v8 = *(_QWORD **)(a1 + 320);
v7 = (int *)cs_file_sec(a2, a3);
if ( v7 )
v5 = *v7;
else
v5 = 0;
switch ( v5 )
{
case 9:
if ( v8[210] )
v8[227] = v8[209];
if ( *(_QWORD *)(v8[245] + 168LL) )
return (unsigned int)(*(long long ( **)(_QWORD *))(v8[245] + 168LL))(v8 + 220);
else
return 0;
case 401:
return (unsigned int)tailoring_append(a1, "[first primary ignorable]", 0LL);
case 402:
return (unsigned int)tailoring_append(a1, "[last primary ignorable]", 0LL);
case 403:
return (unsigned int)tailoring_append(a1, "[first secondary ignorable]", 0LL);
case 404:
return (unsigned int)tailoring_append(a1, "[last secondary ignorable]", 0LL);
case 405:
return (unsigned int)tailoring_append(a1, "[first tertiary ignorable]", 0LL);
case 406:
return (unsigned int)tailoring_append(a1, "[last tertiary ignorable]", 0LL);
case 407:
return (unsigned int)tailoring_append(a1, "[first trailing]", 0LL);
case 408:
return (unsigned int)tailoring_append(a1, "[last trailing]", 0LL);
case 409:
return (unsigned int)tailoring_append(a1, "[first variable]", 0LL);
case 410:
return (unsigned int)tailoring_append(a1, "[last variable]", 0LL);
case 411:
return (unsigned int)tailoring_append(a1, "[first non-ignorable]", 0LL);
case 412:
return (unsigned int)tailoring_append(a1, "[last non-ignorable]", 0LL);
default:
return 0;
}
}
| cs_leave:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x140]
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001d7d00
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x28],0x0
JZ 0x001d6af6
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x34],EAX
JMP 0x001d6afd
LAB_001d6af6:
XOR EAX,EAX
MOV dword ptr [RBP + -0x34],EAX
JMP 0x001d6afd
LAB_001d6afd:
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x2c],EAX
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x38],EAX
SUB EAX,0x9
JZ 0x001d6bd7
JMP 0x001d6b14
LAB_001d6b14:
MOV EAX,dword ptr [RBP + -0x38]
SUB EAX,0x191
JZ 0x001d6c84
JMP 0x001d6b24
LAB_001d6b24:
MOV EAX,dword ptr [RBP + -0x38]
SUB EAX,0x192
JZ 0x001d6ca3
JMP 0x001d6b34
LAB_001d6b34:
MOV EAX,dword ptr [RBP + -0x38]
SUB EAX,0x193
JZ 0x001d6cc2
JMP 0x001d6b44
LAB_001d6b44:
MOV EAX,dword ptr [RBP + -0x38]
SUB EAX,0x194
JZ 0x001d6ce1
JMP 0x001d6b54
LAB_001d6b54:
MOV EAX,dword ptr [RBP + -0x38]
SUB EAX,0x195
JZ 0x001d6d00
JMP 0x001d6b64
LAB_001d6b64:
MOV EAX,dword ptr [RBP + -0x38]
SUB EAX,0x196
JZ 0x001d6d1f
JMP 0x001d6b74
LAB_001d6b74:
MOV EAX,dword ptr [RBP + -0x38]
SUB EAX,0x197
JZ 0x001d6d3b
JMP 0x001d6b84
LAB_001d6b84:
MOV EAX,dword ptr [RBP + -0x38]
SUB EAX,0x198
JZ 0x001d6d57
JMP 0x001d6b94
LAB_001d6b94:
MOV EAX,dword ptr [RBP + -0x38]
SUB EAX,0x199
JZ 0x001d6d73
JMP 0x001d6ba4
LAB_001d6ba4:
MOV EAX,dword ptr [RBP + -0x38]
SUB EAX,0x19a
JZ 0x001d6d8f
JMP 0x001d6bb4
LAB_001d6bb4:
MOV EAX,dword ptr [RBP + -0x38]
SUB EAX,0x19b
JZ 0x001d6c46
JMP 0x001d6bc4
LAB_001d6bc4:
MOV EAX,dword ptr [RBP + -0x38]
SUB EAX,0x19c
JZ 0x001d6c65
JMP 0x001d6dab
LAB_001d6bd7:
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX + 0x690],0x0
JZ 0x001d6bfb
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RAX + 0x688]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x718],RCX
LAB_001d6bfb:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x7a8]
CMP qword ptr [RAX + 0xa8],0x0
JZ 0x001d6c34
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x7a8]
MOV RAX,qword ptr [RAX + 0xa8]
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x6e0
CALL RAX
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x001d6c3b
LAB_001d6c34:
XOR EAX,EAX
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x001d6c3b
LAB_001d6c3b:
MOV EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x30],EAX
JMP 0x001d6db2
LAB_001d6c46:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x1e8959]
XOR EAX,EAX
MOV ECX,EAX
MOV RDX,RCX
CALL 0x001d7d90
MOV dword ptr [RBP + -0x30],EAX
JMP 0x001d6db2
LAB_001d6c65:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x1e896f]
XOR EAX,EAX
MOV ECX,EAX
MOV RDX,RCX
CALL 0x001d7d90
MOV dword ptr [RBP + -0x30],EAX
JMP 0x001d6db2
LAB_001d6c84:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x1e8984]
XOR EAX,EAX
MOV ECX,EAX
MOV RDX,RCX
CALL 0x001d7d90
MOV dword ptr [RBP + -0x30],EAX
JMP 0x001d6db2
LAB_001d6ca3:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x1e899e]
XOR EAX,EAX
MOV ECX,EAX
MOV RDX,RCX
CALL 0x001d7d90
MOV dword ptr [RBP + -0x30],EAX
JMP 0x001d6db2
LAB_001d6cc2:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x1e89b7]
XOR EAX,EAX
MOV ECX,EAX
MOV RDX,RCX
CALL 0x001d7d90
MOV dword ptr [RBP + -0x30],EAX
JMP 0x001d6db2
LAB_001d6ce1:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x1e89d3]
XOR EAX,EAX
MOV ECX,EAX
MOV RDX,RCX
CALL 0x001d7d90
MOV dword ptr [RBP + -0x30],EAX
JMP 0x001d6db2
LAB_001d6d00:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x1e89ee]
XOR EAX,EAX
MOV ECX,EAX
MOV RDX,RCX
CALL 0x001d7d90
MOV dword ptr [RBP + -0x30],EAX
JMP 0x001d6db2
LAB_001d6d1f:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x1e8a09]
XOR EAX,EAX
MOV ECX,EAX
MOV RDX,RCX
CALL 0x001d7d90
MOV dword ptr [RBP + -0x30],EAX
JMP 0x001d6db2
LAB_001d6d3b:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x1e8a23]
XOR EAX,EAX
MOV ECX,EAX
MOV RDX,RCX
CALL 0x001d7d90
MOV dword ptr [RBP + -0x30],EAX
JMP 0x001d6db2
LAB_001d6d57:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x1e8a34]
XOR EAX,EAX
MOV ECX,EAX
MOV RDX,RCX
CALL 0x001d7d90
MOV dword ptr [RBP + -0x30],EAX
JMP 0x001d6db2
LAB_001d6d73:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x1e8a44]
XOR EAX,EAX
MOV ECX,EAX
MOV RDX,RCX
CALL 0x001d7d90
MOV dword ptr [RBP + -0x30],EAX
JMP 0x001d6db2
LAB_001d6d8f:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x1e8a55]
XOR EAX,EAX
MOV ECX,EAX
MOV RDX,RCX
CALL 0x001d7d90
MOV dword ptr [RBP + -0x30],EAX
JMP 0x001d6db2
LAB_001d6dab:
MOV dword ptr [RBP + -0x30],0x0
LAB_001d6db2:
MOV EAX,dword ptr [RBP + -0x30]
ADD RSP,0x40
POP RBP
RET
|
int4 cs_leave(long param_1,int8 param_2,int8 param_3)
{
long lVar1;
int *piVar2;
int4 local_44;
int local_3c;
int4 local_38;
lVar1 = *(long *)(param_1 + 0x140);
piVar2 = (int *)cs_file_sec(param_2,param_3);
if (piVar2 == (int *)0x0) {
local_3c = 0;
}
else {
local_3c = *piVar2;
}
if (local_3c == 9) {
if (*(long *)(lVar1 + 0x690) != 0) {
*(int8 *)(lVar1 + 0x718) = *(int8 *)(lVar1 + 0x688);
}
if (*(long *)(*(long *)(lVar1 + 0x7a8) + 0xa8) == 0) {
local_44 = 0;
}
else {
local_44 = (**(code **)(*(long *)(lVar1 + 0x7a8) + 0xa8))(lVar1 + 0x6e0);
}
local_38 = local_44;
}
else if (local_3c == 0x191) {
local_38 = tailoring_append(param_1,"[first primary ignorable]",0);
}
else if (local_3c == 0x192) {
local_38 = tailoring_append(param_1,"[last primary ignorable]",0);
}
else if (local_3c == 0x193) {
local_38 = tailoring_append(param_1,"[first secondary ignorable]",0);
}
else if (local_3c == 0x194) {
local_38 = tailoring_append(param_1,"[last secondary ignorable]",0);
}
else if (local_3c == 0x195) {
local_38 = tailoring_append(param_1,"[first tertiary ignorable]",0);
}
else if (local_3c == 0x196) {
local_38 = tailoring_append(param_1,"[last tertiary ignorable]",0);
}
else if (local_3c == 0x197) {
local_38 = tailoring_append(param_1,"[first trailing]",0);
}
else if (local_3c == 0x198) {
local_38 = tailoring_append(param_1,"[last trailing]",0);
}
else if (local_3c == 0x199) {
local_38 = tailoring_append(param_1,"[first variable]",0);
}
else if (local_3c == 0x19a) {
local_38 = tailoring_append(param_1,"[last variable]",0);
}
else if (local_3c == 0x19b) {
local_38 = tailoring_append(param_1,"[first non-ignorable]",0);
}
else if (local_3c == 0x19c) {
local_38 = tailoring_append(param_1,"[last non-ignorable]",0);
}
else {
local_38 = 0;
}
return local_38;
}
| |
40,510 | ma_write_keypage | eloqsql/storage/maria/ma_page.c | my_bool _ma_write_keypage(MARIA_PAGE *page, enum pagecache_page_lock lock,
int level)
{
MARIA_SHARE *share= page->info->s;
uint block_size= share->block_size;
uchar *buff= page->buff;
my_bool res;
MARIA_PINNED_PAGE page_link;
DBUG_ENTER("_ma_write_keypage");
/*
The following ensures that for transactional tables we have logged
all changes that changes the page size (as the logging code sets
page->org_size)
*/
DBUG_ASSERT(!share->now_transactional || page->size == page->org_size);
#ifdef EXTRA_DEBUG /* Safety check */
{
uint page_length, nod_flag;
page_length= _ma_get_page_used(share, buff);
nod_flag= _ma_test_if_nod(share, buff);
DBUG_ASSERT(page->size == page_length);
DBUG_ASSERT(page->size <= share->max_index_block_size);
DBUG_ASSERT(page->flag == _ma_get_keypage_flag(share, buff));
if (page->pos < share->base.keystart ||
page->pos+block_size > share->state.state.key_file_length ||
(page->pos & (maria_block_size-1)))
{
DBUG_PRINT("error",("Trying to write inside key status region: "
"key_start: %lu length: %lu page_pos: %lu",
(long) share->base.keystart,
(long) share->state.state.key_file_length,
(long) page->pos));
my_errno=EINVAL;
DBUG_ASSERT(0);
DBUG_RETURN(1);
}
DBUG_PRINT("page",("write page at: %lu",(ulong) (page->pos / block_size)));
DBUG_DUMP("buff", buff, page_length);
DBUG_ASSERT(page_length >= share->keypage_header + nod_flag +
page->keyinfo->minlength || maria_in_recovery);
}
#endif
/* Verify that keynr is correct */
DBUG_ASSERT(_ma_get_keynr(share, buff) == page->keyinfo->key_nr);
#if defined(EXTRA_DEBUG) && defined(HAVE_valgrind) && defined(WHEN_DEBUGGING)
MEM_CHECK_DEFINED(buff, block_size);
#endif
page_cleanup(share, page);
{
PAGECACHE_BLOCK_LINK **link;
enum pagecache_page_pin pin;
if (lock == PAGECACHE_LOCK_LEFT_WRITELOCKED)
{
pin= PAGECACHE_PIN_LEFT_PINNED;
link= &page_link.link;
}
else if (lock == PAGECACHE_LOCK_WRITE_UNLOCK)
{
pin= PAGECACHE_UNPIN;
/*
We unlock this page so link should be 0 to prevent it usage
even accidentally
*/
link= NULL;
}
else
{
pin= PAGECACHE_PIN;
link= &page_link.link;
}
res= pagecache_write(share->pagecache,
&share->kfile,
(pgcache_page_no_t) (page->pos / block_size),
level, buff, share->page_type,
lock, pin, PAGECACHE_WRITE_DELAY, link,
LSN_IMPOSSIBLE);
}
if (lock == PAGECACHE_LOCK_WRITE)
{
/* It was not locked before, we have to unlock it when we unpin pages */
page_link.unlock= PAGECACHE_LOCK_WRITE_UNLOCK;
page_link.changed= 1;
push_dynamic(&page->info->pinned_pages, (void*) &page_link);
}
DBUG_RETURN(res);
} | O0 | c | ma_write_keypage:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x90, %rsp
movq %rdi, -0x18(%rbp)
movl %esi, -0x1c(%rbp)
movl %edx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl 0x7bc(%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x3d251
jmp 0x3d253
jmp 0x3d255
jmp 0x3d257
jmp 0x3d259
cmpl $0x2, -0x1c(%rbp)
jne 0x3d270
movl $0x0, -0x64(%rbp)
leaq -0x58(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x3d298
cmpl $0x6, -0x1c(%rbp)
jne 0x3d287
movl $0x3, -0x64(%rbp)
movq $0x0, -0x60(%rbp)
jmp 0x3d296
movl $0x2, -0x64(%rbp)
leaq -0x58(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x3d298
movq -0x28(%rbp), %rax
movq 0x600(%rax), %rdi
movq -0x28(%rbp), %rsi
addq $0x750, %rsi # imm = 0x750
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x2c(%rbp), %ecx
xorl %edx, %edx
divq %rcx
movq %rax, %rdx
movl -0x20(%rbp), %ecx
movq -0x38(%rbp), %r8
movq -0x28(%rbp), %rax
movl 0x7d4(%rax), %r9d
movl -0x1c(%rbp), %ebx
movl -0x64(%rbp), %r11d
movq -0x60(%rbp), %r10
movq -0x28(%rbp), %rax
movq 0x600(%rax), %rax
movl 0x80(%rax), %eax
xorl %r14d, %r14d
xorl %r14d, %r14d
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
movq %r10, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
movl $0x0, 0x28(%rsp)
movl %eax, 0x30(%rsp)
callq 0x97450
movb %al, -0x39(%rbp)
cmpl $0x4, -0x1c(%rbp)
jne 0x3d34f
movl $0x6, -0x50(%rbp)
movb $0x1, -0x48(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
addq $0x2e8, %rdi # imm = 0x2E8
leaq -0x58(%rbp), %rsi
callq 0xdc270
jmp 0x3d351
movb -0x39(%rbp), %al
movb %al, -0x65(%rbp)
movb -0x65(%rbp), %al
addq $0x90, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ma_write_keypage:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 90h
mov [rbp+var_18], rdi
mov [rbp+var_1C], esi
mov [rbp+var_20], edx
mov rax, [rbp+var_18]
mov rax, [rax]
mov rax, [rax]
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov eax, [rax+7BCh]
mov [rbp+var_2C], eax
mov rax, [rbp+var_18]
mov rax, [rax+10h]
mov [rbp+var_38], rax
jmp short $+2
loc_3D251:
jmp short $+2
loc_3D253:
jmp short $+2
loc_3D255:
jmp short $+2
loc_3D257:
jmp short $+2
loc_3D259:
cmp [rbp+var_1C], 2
jnz short loc_3D270
mov [rbp+var_64], 0
lea rax, [rbp+var_58]
mov [rbp+var_60], rax
jmp short loc_3D298
loc_3D270:
cmp [rbp+var_1C], 6
jnz short loc_3D287
mov [rbp+var_64], 3
mov [rbp+var_60], 0
jmp short loc_3D296
loc_3D287:
mov [rbp+var_64], 2
lea rax, [rbp+var_58]
mov [rbp+var_60], rax
loc_3D296:
jmp short $+2
loc_3D298:
mov rax, [rbp+var_28]
mov rdi, [rax+600h]
mov rsi, [rbp+var_28]
add rsi, 750h
mov rax, [rbp+var_18]
mov rax, [rax+18h]
mov ecx, [rbp+var_2C]
xor edx, edx
div rcx
mov rdx, rax
mov ecx, [rbp+var_20]
mov r8, [rbp+var_38]
mov rax, [rbp+var_28]
mov r9d, [rax+7D4h]
mov ebx, [rbp+var_1C]
mov r11d, [rbp+var_64]
mov r10, [rbp+var_60]
mov rax, [rbp+var_28]
mov rax, [rax+600h]
mov eax, [rax+80h]
xor r14d, r14d
xor r14d, r14d
mov [rsp+0A0h+var_A0], ebx
mov [rsp+0A0h+var_98], r11d
mov [rsp+0A0h+var_90], 0
mov [rsp+0A0h+var_88], r10
mov [rsp+0A0h+var_80], 0
mov [rsp+0A0h+var_78], 0
mov [rsp+0A0h+var_70], eax
call pagecache_write_part
mov [rbp+var_39], al
cmp [rbp+var_1C], 4
jnz short loc_3D34F
mov [rbp+var_50], 6
mov [rbp+var_48], 1
mov rax, [rbp+var_18]
mov rdi, [rax]
add rdi, 2E8h
lea rsi, [rbp+var_58]
call insert_dynamic
loc_3D34F:
jmp short $+2
loc_3D351:
mov al, [rbp+var_39]
mov [rbp+var_65], al
mov al, [rbp+var_65]
add rsp, 90h
pop rbx
pop r14
pop rbp
retn
| char ma_write_keypage(long long **a1, int a2, int a3)
{
char v3; // al
char v5[8]; // [rsp+48h] [rbp-58h] BYREF
int v6; // [rsp+50h] [rbp-50h]
char v7; // [rsp+58h] [rbp-48h]
char v8; // [rsp+67h] [rbp-39h]
long long *v9; // [rsp+68h] [rbp-38h]
unsigned int v10; // [rsp+74h] [rbp-2Ch]
long long v11; // [rsp+78h] [rbp-28h]
int v12; // [rsp+80h] [rbp-20h]
int v13; // [rsp+84h] [rbp-1Ch]
long long **v14; // [rsp+88h] [rbp-18h]
v14 = a1;
v13 = a2;
v12 = a3;
v11 = **a1;
v10 = *(_DWORD *)(v11 + 1980);
v9 = a1[2];
if ( a2 == 2 )
{
v3 = pagecache_write_part(
*(_QWORD *)(v11 + 1536),
(int)v11 + 1872,
(unsigned long long)v14[3] / v10,
v12,
(_DWORD)v9,
*(_DWORD *)(v11 + 2004),
2,
0,
0,
(long long)v5,
0LL,
0,
*(_DWORD *)(*(_QWORD *)(v11 + 1536) + 128LL));
}
else if ( v13 == 6 )
{
v3 = pagecache_write_part(
*(_QWORD *)(v11 + 1536),
(int)v11 + 1872,
(unsigned long long)v14[3] / v10,
v12,
(_DWORD)v9,
*(_DWORD *)(v11 + 2004),
6,
3,
0,
0LL,
0LL,
0,
*(_DWORD *)(*(_QWORD *)(v11 + 1536) + 128LL));
}
else
{
v3 = pagecache_write_part(
*(_QWORD *)(v11 + 1536),
(int)v11 + 1872,
(unsigned long long)v14[3] / v10,
v12,
(_DWORD)v9,
*(_DWORD *)(v11 + 2004),
v13,
2,
0,
(long long)v5,
0LL,
0,
*(_DWORD *)(*(_QWORD *)(v11 + 1536) + 128LL));
}
v8 = v3;
if ( v13 == 4 )
{
v6 = 6;
v7 = 1;
insert_dynamic(*v14 + 93, v5);
}
return v8;
}
| _ma_write_keypage:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x90
MOV qword ptr [RBP + -0x18],RDI
MOV dword ptr [RBP + -0x1c],ESI
MOV dword ptr [RBP + -0x20],EDX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX + 0x7bc]
MOV dword ptr [RBP + -0x2c],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x0013d251
LAB_0013d251:
JMP 0x0013d253
LAB_0013d253:
JMP 0x0013d255
LAB_0013d255:
JMP 0x0013d257
LAB_0013d257:
JMP 0x0013d259
LAB_0013d259:
CMP dword ptr [RBP + -0x1c],0x2
JNZ 0x0013d270
MOV dword ptr [RBP + -0x64],0x0
LEA RAX,[RBP + -0x58]
MOV qword ptr [RBP + -0x60],RAX
JMP 0x0013d298
LAB_0013d270:
CMP dword ptr [RBP + -0x1c],0x6
JNZ 0x0013d287
MOV dword ptr [RBP + -0x64],0x3
MOV qword ptr [RBP + -0x60],0x0
JMP 0x0013d296
LAB_0013d287:
MOV dword ptr [RBP + -0x64],0x2
LEA RAX,[RBP + -0x58]
MOV qword ptr [RBP + -0x60],RAX
LAB_0013d296:
JMP 0x0013d298
LAB_0013d298:
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RAX + 0x600]
MOV RSI,qword ptr [RBP + -0x28]
ADD RSI,0x750
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x18]
MOV ECX,dword ptr [RBP + -0x2c]
XOR EDX,EDX
DIV RCX
MOV RDX,RAX
MOV ECX,dword ptr [RBP + -0x20]
MOV R8,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x28]
MOV R9D,dword ptr [RAX + 0x7d4]
MOV EBX,dword ptr [RBP + -0x1c]
MOV R11D,dword ptr [RBP + -0x64]
MOV R10,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x600]
MOV EAX,dword ptr [RAX + 0x80]
XOR R14D,R14D
XOR R14D,R14D
MOV dword ptr [RSP],EBX
MOV dword ptr [RSP + 0x8],R11D
MOV dword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],R10
MOV qword ptr [RSP + 0x20],0x0
MOV dword ptr [RSP + 0x28],0x0
MOV dword ptr [RSP + 0x30],EAX
CALL 0x00197450
MOV byte ptr [RBP + -0x39],AL
CMP dword ptr [RBP + -0x1c],0x4
JNZ 0x0013d34f
MOV dword ptr [RBP + -0x50],0x6
MOV byte ptr [RBP + -0x48],0x1
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX]
ADD RDI,0x2e8
LEA RSI,[RBP + -0x58]
CALL 0x001dc270
LAB_0013d34f:
JMP 0x0013d351
LAB_0013d351:
MOV AL,byte ptr [RBP + -0x39]
MOV byte ptr [RBP + -0x65],AL
MOV AL,byte ptr [RBP + -0x65]
ADD RSP,0x90
POP RBX
POP R14
POP RBP
RET
|
int1 _ma_write_keypage(long *param_1,int param_2,int4 param_3)
{
int4 local_6c;
int1 *local_68;
int1 local_60 [8];
int4 local_58;
int1 local_50;
int1 local_41;
long local_40;
uint local_34;
long local_30;
int4 local_28;
int local_24;
long *local_20;
local_30 = *(long *)*param_1;
local_34 = *(uint *)(local_30 + 0x7bc);
local_40 = param_1[2];
if (param_2 == 2) {
local_6c = 0;
local_68 = local_60;
}
else if (param_2 == 6) {
local_6c = 3;
local_68 = (int1 *)0x0;
}
else {
local_6c = 2;
local_68 = local_60;
}
local_28 = param_3;
local_24 = param_2;
local_20 = param_1;
local_41 = pagecache_write_part
(*(int8 *)(local_30 + 0x600),local_30 + 0x750,
(ulong)param_1[3] / (ulong)local_34,param_3,local_40,
*(int4 *)(local_30 + 0x7d4),param_2,local_6c,0,local_68,0,0,
*(int4 *)(*(long *)(local_30 + 0x600) + 0x80));
if (local_24 == 4) {
local_58 = 6;
local_50 = 1;
insert_dynamic(*local_20 + 0x2e8,local_60);
}
return local_41;
}
| |
40,511 | my_wc_mb_euc_jp | eloqsql/strings/ctype-ujis.c | static int
my_wc_mb_euc_jp(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
int jp;
if ((int) wc < 0x80) /* ASCII [00-7F] */
{
if (s >= e)
return MY_CS_TOOSMALL;
*s= (uchar) wc;
return 1;
}
if (wc > 0xFFFF)
return MY_CS_ILUNI;
if ((jp= unicode_to_jisx0208_eucjp[wc])) /* JIS-X-0208 */
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
MY_PUT_MB2(s, jp);
return 2;
}
if ((jp= unicode_to_jisx0212_eucjp[wc])) /* JIS-X-0212 */
{
if (s + 3 > e)
return MY_CS_TOOSMALL3;
s[0]= 0x8F;
MY_PUT_MB2(s + 1, jp);
return 3;
}
if (wc >= 0xFF61 && wc <= 0xFF9F) /* Half width Katakana */
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
s[0]= 0x8E;
s[1]= (uchar) (wc - 0xFEC0);
return 2;
}
return MY_CS_ILUNI;
} | O0 | c | my_wc_mb_euc_jp:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x80, %eax
jge 0x6309d
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x63085
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x631c5
movq -0x18(%rbp), %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x631c5
cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF
jbe 0x630b3
movl $0x0, -0x4(%rbp)
jmp 0x631c5
movq -0x18(%rbp), %rcx
leaq 0x2bbfd2(%rip), %rax # 0x31f090
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
je 0x6310f
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x630e4
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x631c5
movl -0x2c(%rbp), %eax
sarl $0x8, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl -0x2c(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x1(%rax)
movl $0x2, -0x4(%rbp)
jmp 0x631c5
movq -0x18(%rbp), %rcx
leaq 0x2dbf76(%rip), %rax # 0x33f090
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
je 0x63170
movq -0x20(%rbp), %rax
addq $0x3, %rax
cmpq -0x28(%rbp), %rax
jbe 0x63140
movl $0xffffff99, -0x4(%rbp) # imm = 0xFFFFFF99
jmp 0x631c5
movq -0x20(%rbp), %rax
movb $-0x71, (%rax)
movl -0x2c(%rbp), %eax
sarl $0x8, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0x2c(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x2(%rax)
movl $0x3, -0x4(%rbp)
jmp 0x631c5
cmpq $0xff61, -0x18(%rbp) # imm = 0xFF61
jb 0x631be
cmpq $0xff9f, -0x18(%rbp) # imm = 0xFF9F
ja 0x631be
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x6319b
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x631c5
movq -0x20(%rbp), %rax
movb $-0x72, (%rax)
movq -0x18(%rbp), %rax
subq $0xfec0, %rax # imm = 0xFEC0
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x1(%rax)
movl $0x2, -0x4(%rbp)
jmp 0x631c5
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
| my_wc_mb_euc_jp:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_18]
cmp eax, 80h
jge short loc_6309D
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_63085
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_631C5
loc_63085:
mov rax, [rbp+var_18]
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 1
jmp loc_631C5
loc_6309D:
cmp [rbp+var_18], 0FFFFh
jbe short loc_630B3
mov [rbp+var_4], 0
jmp loc_631C5
loc_630B3:
mov rcx, [rbp+var_18]
lea rax, unicode_to_jisx0208_eucjp
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_2C], eax
cmp eax, 0
jz short loc_6310F
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_630E4
mov [rbp+var_4], 0FFFFFF9Ah
jmp loc_631C5
loc_630E4:
mov eax, [rbp+var_2C]
sar eax, 8
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov eax, [rbp+var_2C]
and eax, 0FFh
mov cl, al
mov rax, [rbp+var_20]
mov [rax+1], cl
mov [rbp+var_4], 2
jmp loc_631C5
loc_6310F:
mov rcx, [rbp+var_18]
lea rax, unicode_to_jisx0212_eucjp
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_2C], eax
cmp eax, 0
jz short loc_63170
mov rax, [rbp+var_20]
add rax, 3
cmp rax, [rbp+var_28]
jbe short loc_63140
mov [rbp+var_4], 0FFFFFF99h
jmp loc_631C5
loc_63140:
mov rax, [rbp+var_20]
mov byte ptr [rax], 8Fh
mov eax, [rbp+var_2C]
sar eax, 8
mov cl, al
mov rax, [rbp+var_20]
mov [rax+1], cl
mov eax, [rbp+var_2C]
and eax, 0FFh
mov cl, al
mov rax, [rbp+var_20]
mov [rax+2], cl
mov [rbp+var_4], 3
jmp short loc_631C5
loc_63170:
cmp [rbp+var_18], 0FF61h
jb short loc_631BE
cmp [rbp+var_18], 0FF9Fh
ja short loc_631BE
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_6319B
mov [rbp+var_4], 0FFFFFF9Ah
jmp short loc_631C5
loc_6319B:
mov rax, [rbp+var_20]
mov byte ptr [rax], 8Eh
mov rax, [rbp+var_18]
sub rax, 0FEC0h
mov cl, al
mov rax, [rbp+var_20]
mov [rax+1], cl
mov [rbp+var_4], 2
jmp short loc_631C5
loc_631BE:
mov [rbp+var_4], 0
loc_631C5:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_wc_mb_euc_jp(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
__int16 v5; // [rsp+0h] [rbp-2Ch]
__int16 v6; // [rsp+0h] [rbp-2Ch]
if ( (int)a2 >= 128 )
{
if ( a2 <= 0xFFFF )
{
v5 = unicode_to_jisx0208_eucjp[a2];
if ( v5 )
{
if ( (unsigned long long)(a3 + 2) <= a4 )
{
*a3 = HIBYTE(v5);
a3[1] = v5;
return 2;
}
else
{
return (unsigned int)-102;
}
}
else
{
v6 = unicode_to_jisx0212_eucjp[a2];
if ( v6 )
{
if ( (unsigned long long)(a3 + 3) <= a4 )
{
*a3 = -113;
a3[1] = HIBYTE(v6);
a3[2] = v6;
return 3;
}
else
{
return (unsigned int)-103;
}
}
else if ( a2 < 0xFF61 || a2 > 0xFF9F )
{
return 0;
}
else if ( (unsigned long long)(a3 + 2) <= a4 )
{
*a3 = -114;
a3[1] = a2 + 64;
return 2;
}
else
{
return (unsigned int)-102;
}
}
}
else
{
return 0;
}
}
else if ( (unsigned long long)a3 < a4 )
{
*a3 = a2;
return 1;
}
else
{
return (unsigned int)-101;
}
}
| my_wc_mb_euc_jp:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x18]
CMP EAX,0x80
JGE 0x0016309d
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x00163085
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x001631c5
LAB_00163085:
MOV RAX,qword ptr [RBP + -0x18]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001631c5
LAB_0016309d:
CMP qword ptr [RBP + -0x18],0xffff
JBE 0x001630b3
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001631c5
LAB_001630b3:
MOV RCX,qword ptr [RBP + -0x18]
LEA RAX,[0x41f090]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JZ 0x0016310f
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x001630e4
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x001631c5
LAB_001630e4:
MOV EAX,dword ptr [RBP + -0x2c]
SAR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x2c]
AND EAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x1],CL
MOV dword ptr [RBP + -0x4],0x2
JMP 0x001631c5
LAB_0016310f:
MOV RCX,qword ptr [RBP + -0x18]
LEA RAX,[0x43f090]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JZ 0x00163170
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x3
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x00163140
MOV dword ptr [RBP + -0x4],0xffffff99
JMP 0x001631c5
LAB_00163140:
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],0x8f
MOV EAX,dword ptr [RBP + -0x2c]
SAR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x1],CL
MOV EAX,dword ptr [RBP + -0x2c]
AND EAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x2],CL
MOV dword ptr [RBP + -0x4],0x3
JMP 0x001631c5
LAB_00163170:
CMP qword ptr [RBP + -0x18],0xff61
JC 0x001631be
CMP qword ptr [RBP + -0x18],0xff9f
JA 0x001631be
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x0016319b
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x001631c5
LAB_0016319b:
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],0x8e
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,0xfec0
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x1],CL
MOV dword ptr [RBP + -0x4],0x2
JMP 0x001631c5
LAB_001631be:
MOV dword ptr [RBP + -0x4],0x0
LAB_001631c5:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_wc_mb_euc_jp(int8 param_1,ulong param_2,char *param_3,char *param_4)
{
short sVar1;
int4 local_c;
if ((int)param_2 < 0x80) {
if (param_3 < param_4) {
*param_3 = (char)param_2;
local_c = 1;
}
else {
local_c = 0xffffff9b;
}
}
else if (param_2 < 0x10000) {
sVar1 = *(short *)(unicode_to_jisx0208_eucjp + param_2 * 2);
if (sVar1 == 0) {
sVar1 = *(short *)(unicode_to_jisx0212_eucjp + param_2 * 2);
if (sVar1 == 0) {
if ((param_2 < 0xff61) || (0xff9f < param_2)) {
local_c = 0;
}
else if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else {
*param_3 = -0x72;
param_3[1] = (char)param_2 + '@';
local_c = 2;
}
}
else if (param_4 < param_3 + 3) {
local_c = 0xffffff99;
}
else {
*param_3 = -0x71;
param_3[1] = (char)((ushort)sVar1 >> 8);
param_3[2] = (char)sVar1;
local_c = 3;
}
}
else if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else {
*param_3 = (char)((ushort)sVar1 >> 8);
param_3[1] = (char)sVar1;
local_c = 2;
}
}
else {
local_c = 0;
}
return local_c;
}
| |
40,512 | my_wc_mb_euc_jp | eloqsql/strings/ctype-ujis.c | static int
my_wc_mb_euc_jp(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
int jp;
if ((int) wc < 0x80) /* ASCII [00-7F] */
{
if (s >= e)
return MY_CS_TOOSMALL;
*s= (uchar) wc;
return 1;
}
if (wc > 0xFFFF)
return MY_CS_ILUNI;
if ((jp= unicode_to_jisx0208_eucjp[wc])) /* JIS-X-0208 */
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
MY_PUT_MB2(s, jp);
return 2;
}
if ((jp= unicode_to_jisx0212_eucjp[wc])) /* JIS-X-0212 */
{
if (s + 3 > e)
return MY_CS_TOOSMALL3;
s[0]= 0x8F;
MY_PUT_MB2(s + 1, jp);
return 3;
}
if (wc >= 0xFF61 && wc <= 0xFF9F) /* Half width Katakana */
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
s[0]= 0x8E;
s[1]= (uchar) (wc - 0xFEC0);
return 2;
}
return MY_CS_ILUNI;
} | O3 | c | my_wc_mb_euc_jp:
cmpl $0x7f, %esi
jg 0x4cfaa
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x4cfdf
movb %sil, (%rdx)
movl $0x1, %eax
retq
xorl %eax, %eax
cmpq $0xffff, %rsi # imm = 0xFFFF
ja 0x4cfdf
leaq 0x246fc4(%rip), %rdi # 0x293f80
movzwl (%rdi,%rsi,2), %edi
testw %di, %di
je 0x4cfe0
leaq 0x2(%rdx), %rsi
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %rsi
ja 0x4cfdf
rolw $0x8, %di
movw %di, (%rdx)
movl $0x2, %eax
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
leaq 0x266f94(%rip), %rdi # 0x2b3f80
movzwl (%rdi,%rsi,2), %ebx
testw %bx, %bx
je 0x4d013
leaq 0x3(%rdx), %rsi
movl $0xffffff99, %eax # imm = 0xFFFFFF99
cmpq %rcx, %rsi
ja 0x4d03e
movb $-0x71, (%rdx)
movb %bh, 0x1(%rdx)
movb %bl, 0x2(%rdx)
movl $0x3, %eax
jmp 0x4d03e
leaq -0xff61(%rsi), %rdi
cmpq $0x3e, %rdi
ja 0x4d03e
leaq 0x2(%rdx), %rdi
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %rdi
ja 0x4d03e
movb $-0x72, (%rdx)
addb $0x40, %sil
movb %sil, 0x1(%rdx)
movl $0x2, %eax
popq %rbx
popq %rbp
retq
| my_wc_mb_euc_jp:
cmp esi, 7Fh
jg short loc_4CFAA
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short locret_4CFDF
mov [rdx], sil
mov eax, 1
retn
loc_4CFAA:
xor eax, eax
cmp rsi, 0FFFFh
ja short locret_4CFDF
lea rdi, unicode_to_jisx0208_eucjp
movzx edi, word ptr [rdi+rsi*2]
test di, di
jz short loc_4CFE0
lea rsi, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp rsi, rcx
ja short locret_4CFDF
rol di, 8
mov [rdx], di
mov eax, 2
locret_4CFDF:
retn
loc_4CFE0:
push rbp
mov rbp, rsp
push rbx
lea rdi, unicode_to_jisx0212_eucjp
movzx ebx, word ptr [rdi+rsi*2]
test bx, bx
jz short loc_4D013
lea rsi, [rdx+3]
mov eax, 0FFFFFF99h
cmp rsi, rcx
ja short loc_4D03E
mov byte ptr [rdx], 8Fh
mov [rdx+1], bh
mov [rdx+2], bl
mov eax, 3
jmp short loc_4D03E
loc_4D013:
lea rdi, [rsi-0FF61h]
cmp rdi, 3Eh ; '>'
ja short loc_4D03E
lea rdi, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp rdi, rcx
ja short loc_4D03E
mov byte ptr [rdx], 8Eh
add sil, 40h ; '@'
mov [rdx+1], sil
mov eax, 2
loc_4D03E:
pop rbx
pop rbp
retn
| long long my_wc_mb_euc_jp(long long a1, unsigned long long a2, unsigned long long a3, unsigned long long a4)
{
long long result; // rax
__int16 v5; // di
__int16 v6; // bx
if ( (int)a2 > 127 )
{
result = 0LL;
if ( a2 <= 0xFFFF )
{
v5 = unicode_to_jisx0208_eucjp[a2];
if ( v5 )
{
result = 4294967194LL;
if ( a3 + 2 <= a4 )
{
*(_WORD *)a3 = __ROL2__(v5, 8);
return 2LL;
}
}
else
{
v6 = unicode_to_jisx0212_eucjp[a2];
if ( v6 )
{
result = 4294967193LL;
if ( a3 + 3 <= a4 )
{
*(_BYTE *)a3 = -113;
*(_BYTE *)(a3 + 1) = HIBYTE(v6);
*(_BYTE *)(a3 + 2) = v6;
return 3LL;
}
}
else if ( a2 - 65377 <= 0x3E )
{
result = 4294967194LL;
if ( a3 + 2 <= a4 )
{
*(_BYTE *)a3 = -114;
*(_BYTE *)(a3 + 1) = a2 + 64;
return 2LL;
}
}
}
}
}
else
{
result = 4294967195LL;
if ( a3 < a4 )
{
*(_BYTE *)a3 = a2;
return 1LL;
}
}
return result;
}
| my_wc_mb_euc_jp:
CMP ESI,0x7f
JG 0x0014cfaa
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x0014cfdf
MOV byte ptr [RDX],SIL
MOV EAX,0x1
RET
LAB_0014cfaa:
XOR EAX,EAX
CMP RSI,0xffff
JA 0x0014cfdf
LEA RDI,[0x393f80]
MOVZX EDI,word ptr [RDI + RSI*0x2]
TEST DI,DI
JZ 0x0014cfe0
LEA RSI,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP RSI,RCX
JA 0x0014cfdf
ROL DI,0x8
MOV word ptr [RDX],DI
MOV EAX,0x2
LAB_0014cfdf:
RET
LAB_0014cfe0:
PUSH RBP
MOV RBP,RSP
PUSH RBX
LEA RDI,[0x3b3f80]
MOVZX EBX,word ptr [RDI + RSI*0x2]
TEST BX,BX
JZ 0x0014d013
LEA RSI,[RDX + 0x3]
MOV EAX,0xffffff99
CMP RSI,RCX
JA 0x0014d03e
MOV byte ptr [RDX],0x8f
MOV byte ptr [RDX + 0x1],BH
MOV byte ptr [RDX + 0x2],BL
MOV EAX,0x3
JMP 0x0014d03e
LAB_0014d013:
LEA RDI,[RSI + -0xff61]
CMP RDI,0x3e
JA 0x0014d03e
LEA RDI,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP RDI,RCX
JA 0x0014d03e
MOV byte ptr [RDX],0x8e
ADD SIL,0x40
MOV byte ptr [RDX + 0x1],SIL
MOV EAX,0x2
LAB_0014d03e:
POP RBX
POP RBP
RET
|
int8 my_wc_mb_euc_jp(int8 param_1,ulong param_2,ushort *param_3,ushort *param_4)
{
ushort uVar1;
short sVar2;
int8 uVar3;
if ((int)param_2 < 0x80) {
uVar3 = 0xffffff9b;
if (param_3 < param_4) {
*(char *)param_3 = (char)param_2;
return 1;
}
}
else {
uVar3 = 0;
if (param_2 < 0x10000) {
uVar1 = *(ushort *)(unicode_to_jisx0208_eucjp + param_2 * 2);
if (uVar1 == 0) {
sVar2 = *(short *)(unicode_to_jisx0212_eucjp + param_2 * 2);
if (sVar2 == 0) {
if ((param_2 - 0xff61 < 0x3f) && (uVar3 = 0xffffff9a, param_3 + 1 <= param_4)) {
*(char *)param_3 = -0x72;
*(char *)((long)param_3 + 1) = (char)param_2 + '@';
uVar3 = 2;
}
}
else {
uVar3 = 0xffffff99;
if ((ushort *)((long)param_3 + 3) <= param_4) {
*(char *)param_3 = -0x71;
*(char *)((long)param_3 + 1) = (char)((ushort)sVar2 >> 8);
*(char *)(param_3 + 1) = (char)sVar2;
uVar3 = 3;
}
}
return uVar3;
}
uVar3 = 0xffffff9a;
if (param_3 + 1 <= param_4) {
*param_3 = uVar1 << 8 | uVar1 >> 8;
uVar3 = 2;
}
}
}
return uVar3;
}
| |
40,513 | mariadb_get_socket | eloqsql/libmariadb/libmariadb/mariadb_lib.c | static my_socket mariadb_get_socket(MYSQL *mysql)
{
my_socket sock= INVALID_SOCKET;
if (mysql->net.pvio)
{
ma_pvio_get_handle(mysql->net.pvio, &sock);
}
/* if an asynchronous connect is in progress, we need to obtain
pvio handle from async_context until the connection was
successfully established.
*/
else if (mysql->options.extension && mysql->options.extension->async_context &&
mysql->options.extension->async_context->pvio)
{
ma_pvio_get_handle(mysql->options.extension->async_context->pvio, &sock);
}
return sock;
} | O0 | c | mariadb_get_socket:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0xffffffff, -0xc(%rbp) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x21fcf
movq -0x8(%rbp), %rax
movq (%rax), %rdi
leaq -0xc(%rbp), %rsi
callq 0x23a70
jmp 0x22023
movq -0x8(%rbp), %rax
cmpq $0x0, 0x480(%rax)
je 0x22021
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
cmpq $0x0, 0x28(%rax)
je 0x22021
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
cmpq $0x0, 0x18(%rax)
je 0x22021
movq -0x8(%rbp), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq 0x18(%rax), %rdi
leaq -0xc(%rbp), %rsi
callq 0x23a70
jmp 0x22023
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
| mariadb_get_socket:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_C], 0FFFFFFFFh
mov rax, [rbp+var_8]
cmp qword ptr [rax], 0
jz short loc_21FCF
mov rax, [rbp+var_8]
mov rdi, [rax]
lea rsi, [rbp+var_C]
call ma_pvio_get_handle
jmp short loc_22023
loc_21FCF:
mov rax, [rbp+var_8]
cmp qword ptr [rax+480h], 0
jz short loc_22021
mov rax, [rbp+var_8]
mov rax, [rax+480h]
cmp qword ptr [rax+28h], 0
jz short loc_22021
mov rax, [rbp+var_8]
mov rax, [rax+480h]
mov rax, [rax+28h]
cmp qword ptr [rax+18h], 0
jz short loc_22021
mov rax, [rbp+var_8]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov rdi, [rax+18h]
lea rsi, [rbp+var_C]
call ma_pvio_get_handle
loc_22021:
jmp short $+2
loc_22023:
mov eax, [rbp+var_C]
add rsp, 10h
pop rbp
retn
| long long mariadb_get_socket(_QWORD *a1)
{
unsigned int v2; // [rsp+4h] [rbp-Ch] BYREF
_QWORD *v3; // [rsp+8h] [rbp-8h]
v3 = a1;
v2 = -1;
if ( *a1 )
{
ma_pvio_get_handle(*v3, &v2);
}
else if ( v3[144] && *(_QWORD *)(v3[144] + 40LL) && *(_QWORD *)(*(_QWORD *)(v3[144] + 40LL) + 24LL) )
{
ma_pvio_get_handle(*(_QWORD *)(*(_QWORD *)(v3[144] + 40LL) + 24LL), &v2);
}
return v2;
}
| mariadb_get_socket:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],0xffffffff
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX],0x0
JZ 0x00121fcf
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX]
LEA RSI,[RBP + -0xc]
CALL 0x00123a70
JMP 0x00122023
LAB_00121fcf:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x480],0x0
JZ 0x00122021
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
CMP qword ptr [RAX + 0x28],0x0
JZ 0x00122021
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
CMP qword ptr [RAX + 0x18],0x0
JZ 0x00122021
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV RDI,qword ptr [RAX + 0x18]
LEA RSI,[RBP + -0xc]
CALL 0x00123a70
LAB_00122021:
JMP 0x00122023
LAB_00122023:
MOV EAX,dword ptr [RBP + -0xc]
ADD RSP,0x10
POP RBP
RET
|
int4 mariadb_get_socket(long *param_1)
{
int4 local_14;
long *local_10;
local_14 = 0xffffffff;
local_10 = param_1;
if (*param_1 == 0) {
if (((param_1[0x90] != 0) && (*(long *)(param_1[0x90] + 0x28) != 0)) &&
(*(long *)(*(long *)(param_1[0x90] + 0x28) + 0x18) != 0)) {
ma_pvio_get_handle(*(int8 *)(*(long *)(param_1[0x90] + 0x28) + 0x18),&local_14);
}
}
else {
ma_pvio_get_handle(*param_1,&local_14);
}
return local_14;
}
| |
40,514 | flush_cached_blocks | eloqsql/mysys/mf_keycache.c | static int flush_cached_blocks(SIMPLE_KEY_CACHE_CB *keycache,
File file, BLOCK_LINK **cache,
BLOCK_LINK **end,
enum flush_type type)
{
int error;
int last_errno= 0;
uint count= (uint) (end-cache);
/* Don't lock the cache during the flush */
keycache_pthread_mutex_unlock(&keycache->cache_lock);
/*
As all blocks referred in 'cache' are marked by BLOCK_IN_FLUSH
we are guarunteed no thread will change them
*/
my_qsort((uchar*) cache, count, sizeof(*cache), (qsort_cmp) cmp_sec_link);
keycache_pthread_mutex_lock(&keycache->cache_lock);
/*
Note: Do not break the loop. We have registered a request on every
block in 'cache'. These must be unregistered by free_block() or
unreg_request().
*/
for ( ; cache != end ; cache++)
{
BLOCK_LINK *block= *cache;
KEYCACHE_DBUG_PRINT("flush_cached_blocks",
("block %u to be flushed", BLOCK_NUMBER(block)));
/*
If the block contents is going to be changed, we abandon the flush
for this block. flush_key_blocks_int() will restart its search and
handle the block properly.
*/
if (!(block->status & BLOCK_FOR_UPDATE))
{
/* Blocks coming here must have a certain status. */
DBUG_ASSERT(block->hash_link);
DBUG_ASSERT(block->hash_link->block == block);
DBUG_ASSERT(block->hash_link->file == file);
DBUG_ASSERT((block->status & ~BLOCK_IN_EVICTION) ==
(BLOCK_READ | BLOCK_IN_FLUSH | BLOCK_CHANGED | BLOCK_IN_USE));
block->status|= BLOCK_IN_FLUSHWRITE;
keycache_pthread_mutex_unlock(&keycache->cache_lock);
error= (int)my_pwrite(file, block->buffer + block->offset,
block->length - block->offset,
block->hash_link->diskpos + block->offset,
MYF(MY_NABP | MY_WAIT_IF_FULL));
keycache_pthread_mutex_lock(&keycache->cache_lock);
keycache->global_cache_write++;
if (error)
{
block->status|= BLOCK_ERROR;
if (!last_errno)
last_errno= errno ? errno : -1;
}
block->status&= ~BLOCK_IN_FLUSHWRITE;
/* Block must not have changed status except BLOCK_FOR_UPDATE. */
DBUG_ASSERT(block->hash_link);
DBUG_ASSERT(block->hash_link->block == block);
DBUG_ASSERT(block->hash_link->file == file);
DBUG_ASSERT((block->status & ~(BLOCK_FOR_UPDATE | BLOCK_IN_EVICTION)) ==
(BLOCK_READ | BLOCK_IN_FLUSH | BLOCK_CHANGED | BLOCK_IN_USE));
/*
Set correct status and link in right queue for free or later use.
free_block() must not see BLOCK_CHANGED and it may need to wait
for readers of the block. These should not see the block in the
wrong hash. If not freeing the block, we need to have it in the
right queue anyway.
*/
link_to_file_list(keycache, block, file, 1);
}
block->status&= ~BLOCK_IN_FLUSH;
/*
Let to proceed for possible waiting requests to write to the block page.
It might happen only during an operation to resize the key cache.
*/
release_whole_queue(&block->wqueue[COND_FOR_SAVED]);
/* type will never be FLUSH_IGNORE_CHANGED here */
if (!(type == FLUSH_KEEP || type == FLUSH_FORCE_WRITE) &&
!(block->status & (BLOCK_IN_EVICTION | BLOCK_IN_SWITCH |
BLOCK_FOR_UPDATE)))
{
/*
Note that a request has been registered against the block in
flush_key_blocks_int().
*/
free_block(keycache, block);
}
else
{
/*
Link the block into the LRU ring if it's the last submitted
request for the block. This enables eviction for the block.
Note that a request has been registered against the block in
flush_key_blocks_int().
*/
unreg_request(keycache, block, 1);
}
} /* end of for ( ; cache != end ; cache++) */
return last_errno;
} | O3 | c | flush_cached_blocks:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %r14d
movq %rdx, %r15
movl %esi, -0x34(%rbp)
movq %rdi, %r13
movq %rcx, -0x40(%rbp)
movq %rcx, %rbx
subq %rdx, %rbx
shrq $0x3, %rbx
leaq 0xc0(%rdi), %r12
movq 0x100(%rdi), %rdi
testq %rdi, %rdi
jne 0x9a5ed
movq %r12, %rdi
callq 0x291e0
movl %ebx, %esi
leaq 0x1e9(%rip), %rcx # 0x9a61b
movl $0x8, %edx
movq %r15, %rdi
callq 0x9b710
cmpq $0x0, 0x100(%r13)
jne 0x9a602
movq %r12, %rdi
callq 0x29220
movq %r12, %rbx
cmpq -0x40(%rbp), %r15
je 0x9a5d4
movl $0x0, -0x2c(%rbp)
movq %rbx, -0x48(%rbp)
movl %r14d, -0x30(%rbp)
movq (%r15), %r12
movl 0x50(%r12), %eax
btl $0x9, %eax
jb 0x9a54f
orl $0x100, %eax # imm = 0x100
movl %eax, 0x50(%r12)
movq 0x100(%r13), %rdi
testq %rdi, %rdi
jne 0x9a5a6
movq %rbx, %rdi
callq 0x291e0
movl 0x48(%r12), %ecx
movq 0x40(%r12), %rsi
addq %rcx, %rsi
movl 0x4c(%r12), %edx
subl %ecx, %edx
movq 0x20(%r12), %rax
addq 0x20(%rax), %rcx
movl $0x24, %r8d
movl -0x34(%rbp), %edi
callq 0xa07ee
movq %rax, %r14
cmpq $0x0, 0x100(%r13)
jne 0x9a5bb
movq %rbx, %rdi
callq 0x29220
incq 0x148(%r13)
movl 0x50(%r12), %ebx
testl %r14d, %r14d
je 0x9a524
orl $0x1, %ebx
movl %ebx, 0x50(%r12)
cmpl $0x0, -0x2c(%rbp)
movl -0x30(%rbp), %r14d
jne 0x9a528
callq 0x297b0
movl (%rax), %eax
cmpl $0x1, %eax
movl $0x0, %ecx
sbbl %ecx, %ecx
orl %eax, %ecx
movl %ecx, -0x2c(%rbp)
jmp 0x9a528
movl -0x30(%rbp), %r14d
andl $0xfffffeff, %ebx # imm = 0xFFFFFEFF
movl %ebx, 0x50(%r12)
movq %r13, %rdi
movq %r12, %rsi
movl -0x34(%rbp), %edx
movl $0x1, %ecx
callq 0x9894e
movl 0x50(%r12), %eax
movq -0x48(%rbp), %rbx
andl $-0x11, %eax
movl %eax, 0x50(%r12)
leaq 0x30(%r12), %rdi
callq 0x989b9
testl %r14d, %r14d
je 0x9a579
cmpl $0x3, %r14d
je 0x9a579
movzwl 0x50(%r12), %eax
testl $0x284, %eax # imm = 0x284
je 0x9a599
movq %r13, %rdi
movq %r12, %rsi
movl $0x1, %edx
callq 0x980ac
addq $0x8, %r15
cmpq -0x40(%rbp), %r15
jne 0x9a471
jmp 0x9a5db
movq %r13, %rdi
movq %r12, %rsi
callq 0x981b4
jmp 0x9a589
leaq 0x2eba63(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x9a49d
movq %rbx, %rdi
leaq 0x41da6(%rip), %rsi # 0xdc36b
movl $0xee8, %edx # imm = 0xEE8
callq 0x2eb8f
jmp 0x9a4e9
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2eba1c(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x9a421
leaq 0x41d62(%rip), %rsi # 0xdc36b
movq %r12, %rdi
movl $0xec9, %edx # imm = 0xEC9
callq 0x2eb8f
jmp 0x9a455
| flush_cached_blocks_0:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r14d, r8d
mov r15, rdx
mov [rbp+var_34], esi
mov r13, rdi
mov [rbp+var_40], rcx
mov rbx, rcx
sub rbx, rdx
shr rbx, 3
lea r12, [rdi+0C0h]
mov rdi, [rdi+100h]
test rdi, rdi
jnz loc_9A5ED
loc_9A421:
mov rdi, r12
call _pthread_mutex_unlock
mov esi, ebx
lea rcx, cmp_sec_link_0
mov edx, 8
mov rdi, r15
call my_qsort
cmp qword ptr [r13+100h], 0
jnz loc_9A602
mov rdi, r12
call _pthread_mutex_lock
loc_9A455:
mov rbx, r12
cmp r15, [rbp+var_40]
jz loc_9A5D4
mov [rbp+var_2C], 0
mov [rbp+var_48], rbx
mov [rbp+var_30], r14d
loc_9A471:
mov r12, [r15]
mov eax, [r12+50h]
bt eax, 9
jb loc_9A54F
or eax, 100h
mov [r12+50h], eax
mov rdi, [r13+100h]
test rdi, rdi
jnz loc_9A5A6
loc_9A49D:
mov rdi, rbx
call _pthread_mutex_unlock
mov ecx, [r12+48h]
mov rsi, [r12+40h]
add rsi, rcx
mov edx, [r12+4Ch]
sub edx, ecx
mov rax, [r12+20h]
add rcx, [rax+20h]
mov r8d, 24h ; '$'
mov edi, [rbp+var_34]
call my_pwrite
mov r14, rax
cmp qword ptr [r13+100h], 0
jnz loc_9A5BB
mov rdi, rbx
call _pthread_mutex_lock
loc_9A4E9:
inc qword ptr [r13+148h]
mov ebx, [r12+50h]
test r14d, r14d
jz short loc_9A524
or ebx, 1
mov [r12+50h], ebx
cmp [rbp+var_2C], 0
mov r14d, [rbp+var_30]
jnz short loc_9A528
call ___errno_location
mov eax, [rax]
cmp eax, 1
mov ecx, 0
sbb ecx, ecx
or ecx, eax
mov [rbp+var_2C], ecx
jmp short loc_9A528
loc_9A524:
mov r14d, [rbp+var_30]
loc_9A528:
and ebx, 0FFFFFEFFh
mov [r12+50h], ebx
mov rdi, r13
mov rsi, r12
mov edx, [rbp+var_34]
mov ecx, 1
call link_to_file_list_0
mov eax, [r12+50h]
mov rbx, [rbp+var_48]
loc_9A54F:
and eax, 0FFFFFFEFh
mov [r12+50h], eax
lea rdi, [r12+30h]
call release_whole_queue
test r14d, r14d
jz short loc_9A579
cmp r14d, 3
jz short loc_9A579
movzx eax, word ptr [r12+50h]
test eax, 284h
jz short loc_9A599
loc_9A579:
mov rdi, r13
mov rsi, r12
mov edx, 1
call unreg_request_0
loc_9A589:
add r15, 8
cmp r15, [rbp+var_40]
jnz loc_9A471
jmp short loc_9A5DB
loc_9A599:
mov rdi, r13
mov rsi, r12
call free_block_0
jmp short loc_9A589
loc_9A5A6:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_9A49D
loc_9A5BB:
mov rdi, rbx
lea rsi, aWorkspaceLlm4b_39; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 0EE8h
call psi_mutex_lock
jmp loc_9A4E9
loc_9A5D4:
mov [rbp+var_2C], 0
loc_9A5DB:
mov eax, [rbp+var_2C]
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_9A5ED:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_9A421
loc_9A602:
lea rsi, aWorkspaceLlm4b_39; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, r12
mov edx, 0EC9h
call psi_mutex_lock
jmp loc_9A455
| long long flush_cached_blocks_0(_QWORD *a1, unsigned int a2, long long *a3, long long *a4, int a5)
{
long long *v6; // r15
unsigned long long v8; // rbx
long long v9; // r12
long long v10; // rbx
long long v11; // r12
int v12; // eax
int v13; // r14d
long long v14; // rdi
int v15; // ebx
_DWORD *v16; // rax
_QWORD *v18; // [rsp+8h] [rbp-48h]
int v20; // [rsp+20h] [rbp-30h]
unsigned int v21; // [rsp+24h] [rbp-2Ch]
v6 = a3;
v8 = (unsigned long long)((char *)a4 - (char *)a3) >> 3;
v9 = (long long)(a1 + 24);
if ( a1[32] )
PSI_server[44]();
pthread_mutex_unlock(v9);
my_qsort(v6, (unsigned int)v8, 8LL, cmp_sec_link_0);
if ( a1[32] )
psi_mutex_lock(v9, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0xEC9u);
else
pthread_mutex_lock(v9);
v10 = (long long)(a1 + 24);
if ( v6 == a4 )
{
return 0;
}
else
{
v21 = 0;
v18 = a1 + 24;
v20 = a5;
do
{
v11 = *v6;
v12 = *(_DWORD *)(*v6 + 80);
if ( (v12 & 0x200) == 0 )
{
*(_DWORD *)(v11 + 80) = v12 | 0x100;
if ( a1[32] )
PSI_server[44]();
pthread_mutex_unlock(v10);
v13 = my_pwrite(
a2,
*(unsigned int *)(v11 + 72) + *(_QWORD *)(v11 + 64),
(unsigned int)(*(_DWORD *)(v11 + 76) - *(_DWORD *)(v11 + 72)),
*(_QWORD *)(*(_QWORD *)(v11 + 32) + 32LL) + *(unsigned int *)(v11 + 72),
36LL);
v14 = v10;
if ( a1[32] )
psi_mutex_lock(v10, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0xEE8u);
else
pthread_mutex_lock(v10);
++a1[41];
v15 = *(_DWORD *)(v11 + 80);
if ( v13 )
{
v15 |= 1u;
*(_DWORD *)(v11 + 80) = v15;
a5 = v20;
if ( !v21 )
{
v16 = (_DWORD *)__errno_location(v14);
v21 = *v16 == 0 ? -1 : *v16;
}
}
else
{
a5 = v20;
}
*(_DWORD *)(v11 + 80) = v15 & 0xFFFFFEFF;
link_to_file_list_0((long long)a1, v11, a2, 1);
v12 = *(_DWORD *)(v11 + 80);
v10 = (long long)v18;
}
*(_DWORD *)(v11 + 80) = v12 & 0xFFFFFFEF;
release_whole_queue((long long *)(v11 + 48));
if ( !a5 || a5 == 3 || (*(_WORD *)(v11 + 80) & 0x284) != 0 )
unreg_request_0(a1, v11, 1LL);
else
free_block_0((long long)a1, v11);
++v6;
}
while ( v6 != a4 );
}
return v21;
}
| flush_cached_blocks:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14D,R8D
MOV R15,RDX
MOV dword ptr [RBP + -0x34],ESI
MOV R13,RDI
MOV qword ptr [RBP + -0x40],RCX
MOV RBX,RCX
SUB RBX,RDX
SHR RBX,0x3
LEA R12,[RDI + 0xc0]
MOV RDI,qword ptr [RDI + 0x100]
TEST RDI,RDI
JNZ 0x0019a5ed
LAB_0019a421:
MOV RDI,R12
CALL 0x001291e0
MOV ESI,EBX
LEA RCX,[0x19a61b]
MOV EDX,0x8
MOV RDI,R15
CALL 0x0019b710
CMP qword ptr [R13 + 0x100],0x0
JNZ 0x0019a602
MOV RDI,R12
CALL 0x00129220
LAB_0019a455:
MOV RBX,R12
CMP R15,qword ptr [RBP + -0x40]
JZ 0x0019a5d4
MOV dword ptr [RBP + -0x2c],0x0
MOV qword ptr [RBP + -0x48],RBX
MOV dword ptr [RBP + -0x30],R14D
LAB_0019a471:
MOV R12,qword ptr [R15]
MOV EAX,dword ptr [R12 + 0x50]
BT EAX,0x9
JC 0x0019a54f
OR EAX,0x100
MOV dword ptr [R12 + 0x50],EAX
MOV RDI,qword ptr [R13 + 0x100]
TEST RDI,RDI
JNZ 0x0019a5a6
LAB_0019a49d:
MOV RDI,RBX
CALL 0x001291e0
MOV ECX,dword ptr [R12 + 0x48]
MOV RSI,qword ptr [R12 + 0x40]
ADD RSI,RCX
MOV EDX,dword ptr [R12 + 0x4c]
SUB EDX,ECX
MOV RAX,qword ptr [R12 + 0x20]
ADD RCX,qword ptr [RAX + 0x20]
MOV R8D,0x24
MOV EDI,dword ptr [RBP + -0x34]
CALL 0x001a07ee
MOV R14,RAX
CMP qword ptr [R13 + 0x100],0x0
JNZ 0x0019a5bb
MOV RDI,RBX
CALL 0x00129220
LAB_0019a4e9:
INC qword ptr [R13 + 0x148]
MOV EBX,dword ptr [R12 + 0x50]
TEST R14D,R14D
JZ 0x0019a524
OR EBX,0x1
MOV dword ptr [R12 + 0x50],EBX
CMP dword ptr [RBP + -0x2c],0x0
MOV R14D,dword ptr [RBP + -0x30]
JNZ 0x0019a528
CALL 0x001297b0
MOV EAX,dword ptr [RAX]
CMP EAX,0x1
MOV ECX,0x0
SBB ECX,ECX
OR ECX,EAX
MOV dword ptr [RBP + -0x2c],ECX
JMP 0x0019a528
LAB_0019a524:
MOV R14D,dword ptr [RBP + -0x30]
LAB_0019a528:
AND EBX,0xfffffeff
MOV dword ptr [R12 + 0x50],EBX
MOV RDI,R13
MOV RSI,R12
MOV EDX,dword ptr [RBP + -0x34]
MOV ECX,0x1
CALL 0x0019894e
MOV EAX,dword ptr [R12 + 0x50]
MOV RBX,qword ptr [RBP + -0x48]
LAB_0019a54f:
AND EAX,0xffffffef
MOV dword ptr [R12 + 0x50],EAX
LEA RDI,[R12 + 0x30]
CALL 0x001989b9
TEST R14D,R14D
JZ 0x0019a579
CMP R14D,0x3
JZ 0x0019a579
MOVZX EAX,word ptr [R12 + 0x50]
TEST EAX,0x284
JZ 0x0019a599
LAB_0019a579:
MOV RDI,R13
MOV RSI,R12
MOV EDX,0x1
CALL 0x001980ac
LAB_0019a589:
ADD R15,0x8
CMP R15,qword ptr [RBP + -0x40]
JNZ 0x0019a471
JMP 0x0019a5db
LAB_0019a599:
MOV RDI,R13
MOV RSI,R12
CALL 0x001981b4
JMP 0x0019a589
LAB_0019a5a6:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x0019a49d
LAB_0019a5bb:
MOV RDI,RBX
LEA RSI,[0x1dc36b]
MOV EDX,0xee8
CALL 0x0012eb8f
JMP 0x0019a4e9
LAB_0019a5d4:
MOV dword ptr [RBP + -0x2c],0x0
LAB_0019a5db:
MOV EAX,dword ptr [RBP + -0x2c]
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0019a5ed:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x0019a421
LAB_0019a602:
LEA RSI,[0x1dc36b]
MOV RDI,R12
MOV EDX,0xec9
CALL 0x0012eb8f
JMP 0x0019a455
|
uint flush_cached_blocks(long param_1,int4 param_2,long *param_3,long *param_4,int param_5)
{
pthread_mutex_t *__mutex;
long lVar1;
int iVar2;
uint *puVar3;
uint uVar4;
uint local_34;
__mutex = (pthread_mutex_t *)(param_1 + 0xc0);
if (*(long *)(param_1 + 0x100) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
my_qsort(param_3,(ulong)((long)param_4 - (long)param_3) >> 3 & 0xffffffff,8,cmp_sec_link);
if (*(long *)(param_1 + 0x100) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",0xec9);
}
if (param_3 == param_4) {
local_34 = 0;
}
else {
local_34 = 0;
do {
lVar1 = *param_3;
uVar4 = *(uint *)(lVar1 + 0x50);
if ((uVar4 >> 9 & 1) == 0) {
*(uint *)(lVar1 + 0x50) = uVar4 | 0x100;
if (*(long *)(param_1 + 0x100) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
uVar4 = *(uint *)(lVar1 + 0x48);
iVar2 = my_pwrite(param_2,*(long *)(lVar1 + 0x40) + (ulong)uVar4,
*(int *)(lVar1 + 0x4c) - uVar4,
(ulong)uVar4 + *(long *)(*(long *)(lVar1 + 0x20) + 0x20),0x24);
if (*(long *)(param_1 + 0x100) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",
0xee8);
}
*(long *)(param_1 + 0x148) = *(long *)(param_1 + 0x148) + 1;
uVar4 = *(uint *)(lVar1 + 0x50);
if (iVar2 != 0) {
uVar4 = uVar4 | 1;
*(uint *)(lVar1 + 0x50) = uVar4;
if (local_34 == 0) {
puVar3 = (uint *)__errno_location();
local_34 = -(uint)(*puVar3 == 0) | *puVar3;
}
}
*(uint *)(lVar1 + 0x50) = uVar4 & 0xfffffeff;
link_to_file_list(param_1,lVar1,param_2,1);
uVar4 = *(uint *)(lVar1 + 0x50);
}
*(uint *)(lVar1 + 0x50) = uVar4 & 0xffffffef;
release_whole_queue(lVar1 + 0x30);
if (((param_5 == 0) || (param_5 == 3)) || ((*(ushort *)(lVar1 + 0x50) & 0x284) != 0)) {
unreg_request(param_1,lVar1,1);
}
else {
free_block(param_1,lVar1);
}
param_3 = param_3 + 1;
} while (param_3 != param_4);
}
return local_34;
}
| |
40,515 | parse_connection_string | eloqsql/libmariadb/libmariadb/mariadb_lib.c | static int parse_connection_string(MYSQL *mysql, const char *unused __attribute__((unused)),
const char *conn_str, ssize_t len)
{
char *conn_save,
*end, *pos,
*key= NULL, *val= NULL;
my_bool in_curly_brace= 0;
if (len == -1)
len= strlen(conn_str);
/* don't modify original dsn */
conn_save= (char *)malloc(len + 1);
memcpy(conn_save, conn_str, len);
conn_save[len]= 0;
/* start and end */
pos= conn_save;
end= conn_save + len;
while (pos <= end)
{
/* ignore white space, unless it is between curly braces */
if (isspace(*pos) && !in_curly_brace)
{
pos++;
continue;
}
switch (*pos) {
case '{':
if (!key)
goto error;
if (!in_curly_brace)
{
in_curly_brace= 1;
if (pos < end)
{
pos++;
val= pos;
continue;
}
}
break;
case '}':
if (in_curly_brace)
{
if (!key)
goto error;
if (pos < end && *(pos + 1) == '}')
{
memmove(pos, pos + 1, end - pos - 1);
end--;
pos += 2;
continue;
}
if (in_curly_brace)
in_curly_brace= 0;
else
goto error;
*pos++= 0;
continue;
}
break;
case '=':
if (in_curly_brace)
{
pos++;
continue;
}
if (!key)
goto error;
*pos++= 0;
if (pos < end)
val= pos;
continue;
break;
case ';':
if (in_curly_brace)
{
pos++;
continue;
}
if (!key)
goto error;
*pos++= 0;
if (key && strcasecmp(key, "connection") != 0)
_mariadb_set_conf_option(mysql, key, val);
key= val= NULL;
continue;
break;
}
if (!key && *pos)
key= pos;
pos++;
}
if (key && strcasecmp(key, "connection") != 0)
_mariadb_set_conf_option(mysql, key, val);
free(conn_save);
return 0;
error:
my_set_error(mysql, CR_CONNSTR_PARSE_ERROR, SQLSTATE_UNKNOWN, 0, pos - conn_save);
free(conn_save);
return 1;
} | O0 | c | parse_connection_string:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq $0x0, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
movb $0x0, -0x51(%rbp)
cmpq $-0x1, -0x28(%rbp)
jne 0x3e0b0
movq -0x20(%rbp), %rdi
callq 0x37400
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
addq $0x1, %rdi
callq 0x37920
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x370c0
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x38(%rbp), %rax
ja 0x3e334
callq 0x37130
movq (%rax), %rax
movq -0x40(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax # imm = 0x2000
cmpl $0x0, %eax
je 0x3e134
cmpb $0x0, -0x51(%rbp)
jne 0x3e134
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x3e0f2
movq -0x40(%rbp), %rax
movsbl (%rax), %eax
movl %eax, -0x58(%rbp)
subl $0x3b, %eax
je 0x3e291
jmp 0x3e149
movl -0x58(%rbp), %eax
subl $0x3d, %eax
je 0x3e245
jmp 0x3e157
movl -0x58(%rbp), %eax
subl $0x7b, %eax
je 0x3e16e
jmp 0x3e161
movl -0x58(%rbp), %eax
subl $0x7d, %eax
je 0x3e1ae
jmp 0x3e308
cmpq $0x0, -0x48(%rbp)
jne 0x3e17a
jmp 0x3e373
cmpb $0x0, -0x51(%rbp)
jne 0x3e1a9
movb $0x1, -0x51(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x3e1a7
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x3e0f2
jmp 0x3e1a9
jmp 0x3e308
cmpb $0x0, -0x51(%rbp)
je 0x3e240
cmpq $0x0, -0x48(%rbp)
jne 0x3e1c4
jmp 0x3e373
movq -0x40(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x3e218
movq -0x40(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x7d, %eax
jne 0x3e218
movq -0x40(%rbp), %rdi
movq -0x40(%rbp), %rsi
addq $0x1, %rsi
movq -0x38(%rbp), %rdx
movq -0x40(%rbp), %rax
subq %rax, %rdx
subq $0x1, %rdx
callq 0x37160
movq -0x38(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x40(%rbp)
jmp 0x3e0f2
cmpb $0x0, -0x51(%rbp)
je 0x3e224
movb $0x0, -0x51(%rbp)
jmp 0x3e229
jmp 0x3e373
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x40(%rbp)
movb $0x0, (%rax)
jmp 0x3e0f2
jmp 0x3e308
cmpb $0x0, -0x51(%rbp)
je 0x3e25c
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x3e0f2
cmpq $0x0, -0x48(%rbp)
jne 0x3e268
jmp 0x3e373
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x40(%rbp)
movb $0x0, (%rax)
movq -0x40(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x3e28c
movq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x3e0f2
cmpb $0x0, -0x51(%rbp)
je 0x3e2a8
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x3e0f2
cmpq $0x0, -0x48(%rbp)
jne 0x3e2b4
jmp 0x3e373
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x40(%rbp)
movb $0x0, (%rax)
cmpq $0x0, -0x48(%rbp)
je 0x3e2f3
movq -0x48(%rbp), %rdi
leaq 0x90a28(%rip), %rsi # 0xced00
callq 0x37840
cmpl $0x0, %eax
je 0x3e2f3
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdx
callq 0x3e3c0
movq $0x0, -0x50(%rbp)
movq $0x0, -0x48(%rbp)
jmp 0x3e0f2
cmpq $0x0, -0x48(%rbp)
jne 0x3e323
movq -0x40(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x3e323
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x3e0f2
cmpq $0x0, -0x48(%rbp)
je 0x3e361
movq -0x48(%rbp), %rdi
leaq 0x909ba(%rip), %rsi # 0xced00
callq 0x37840
cmpl $0x0, %eax
je 0x3e361
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdx
callq 0x3e3c0
movq -0x30(%rbp), %rdi
callq 0x371c0
movl $0x0, -0x4(%rbp)
jmp 0x3e3ac
movq -0x10(%rbp), %rdi
leaq 0x1f93d2(%rip), %rax # 0x237750
movq (%rax), %rdx
movq -0x40(%rbp), %r8
movq -0x30(%rbp), %rax
subq %rax, %r8
movl $0x1393, %esi # imm = 0x1393
xorl %eax, %eax
movl %eax, %ecx
movb $0x0, %al
callq 0x3ce90
movq -0x30(%rbp), %rdi
callq 0x371c0
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| parse_connection_string:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_48], 0
mov [rbp+var_50], 0
mov [rbp+var_51], 0
cmp [rbp+var_28], 0FFFFFFFFFFFFFFFFh
jnz short loc_3E0B0
mov rdi, [rbp+var_20]
call _strlen
mov [rbp+var_28], rax
loc_3E0B0:
mov rdi, [rbp+var_28]
add rdi, 1
call _malloc
mov [rbp+var_30], rax
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
call _memcpy
mov rax, [rbp+var_30]
mov rcx, [rbp+var_28]
mov byte ptr [rax+rcx], 0
mov rax, [rbp+var_30]
mov [rbp+var_40], rax
mov rax, [rbp+var_30]
add rax, [rbp+var_28]
mov [rbp+var_38], rax
loc_3E0F2:
mov rax, [rbp+var_40]
cmp rax, [rbp+var_38]
ja loc_3E334
call ___ctype_b_loc
mov rax, [rax]
mov rcx, [rbp+var_40]
movsx ecx, byte ptr [rcx]
movsxd rcx, ecx
movzx eax, word ptr [rax+rcx*2]
and eax, 2000h
cmp eax, 0
jz short loc_3E134
cmp [rbp+var_51], 0
jnz short loc_3E134
mov rax, [rbp+var_40]
add rax, 1
mov [rbp+var_40], rax
jmp short loc_3E0F2
loc_3E134:
mov rax, [rbp+var_40]
movsx eax, byte ptr [rax]
mov [rbp+var_58], eax
sub eax, 3Bh ; ';'
jz loc_3E291
jmp short $+2
loc_3E149:
mov eax, [rbp+var_58]
sub eax, 3Dh ; '='
jz loc_3E245
jmp short $+2
loc_3E157:
mov eax, [rbp+var_58]
sub eax, 7Bh ; '{'
jz short loc_3E16E
jmp short $+2
loc_3E161:
mov eax, [rbp+var_58]
sub eax, 7Dh ; '}'
jz short loc_3E1AE
jmp loc_3E308
loc_3E16E:
cmp [rbp+var_48], 0
jnz short loc_3E17A
jmp loc_3E373
loc_3E17A:
cmp [rbp+var_51], 0
jnz short loc_3E1A9
mov [rbp+var_51], 1
mov rax, [rbp+var_40]
cmp rax, [rbp+var_38]
jnb short loc_3E1A7
mov rax, [rbp+var_40]
add rax, 1
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
mov [rbp+var_50], rax
jmp loc_3E0F2
loc_3E1A7:
jmp short $+2
loc_3E1A9:
jmp loc_3E308
loc_3E1AE:
cmp [rbp+var_51], 0
jz loc_3E240
cmp [rbp+var_48], 0
jnz short loc_3E1C4
jmp loc_3E373
loc_3E1C4:
mov rax, [rbp+var_40]
cmp rax, [rbp+var_38]
jnb short loc_3E218
mov rax, [rbp+var_40]
movsx eax, byte ptr [rax+1]
cmp eax, 7Dh ; '}'
jnz short loc_3E218
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_40]
add rsi, 1
mov rdx, [rbp+var_38]
mov rax, [rbp+var_40]
sub rdx, rax
sub rdx, 1
call _memmove
mov rax, [rbp+var_38]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_38], rax
mov rax, [rbp+var_40]
add rax, 2
mov [rbp+var_40], rax
jmp loc_3E0F2
loc_3E218:
cmp [rbp+var_51], 0
jz short loc_3E224
mov [rbp+var_51], 0
jmp short loc_3E229
loc_3E224:
jmp loc_3E373
loc_3E229:
mov rax, [rbp+var_40]
mov rcx, rax
add rcx, 1
mov [rbp+var_40], rcx
mov byte ptr [rax], 0
jmp loc_3E0F2
loc_3E240:
jmp loc_3E308
loc_3E245:
cmp [rbp+var_51], 0
jz short loc_3E25C
mov rax, [rbp+var_40]
add rax, 1
mov [rbp+var_40], rax
jmp loc_3E0F2
loc_3E25C:
cmp [rbp+var_48], 0
jnz short loc_3E268
jmp loc_3E373
loc_3E268:
mov rax, [rbp+var_40]
mov rcx, rax
add rcx, 1
mov [rbp+var_40], rcx
mov byte ptr [rax], 0
mov rax, [rbp+var_40]
cmp rax, [rbp+var_38]
jnb short loc_3E28C
mov rax, [rbp+var_40]
mov [rbp+var_50], rax
loc_3E28C:
jmp loc_3E0F2
loc_3E291:
cmp [rbp+var_51], 0
jz short loc_3E2A8
mov rax, [rbp+var_40]
add rax, 1
mov [rbp+var_40], rax
jmp loc_3E0F2
loc_3E2A8:
cmp [rbp+var_48], 0
jnz short loc_3E2B4
jmp loc_3E373
loc_3E2B4:
mov rax, [rbp+var_40]
mov rcx, rax
add rcx, 1
mov [rbp+var_40], rcx
mov byte ptr [rax], 0
cmp [rbp+var_48], 0
jz short loc_3E2F3
mov rdi, [rbp+var_48]
lea rsi, aConnection; "connection"
call _strcasecmp
cmp eax, 0
jz short loc_3E2F3
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_48]
mov rdx, [rbp+var_50]
call _mariadb_set_conf_option
loc_3E2F3:
mov [rbp+var_50], 0
mov [rbp+var_48], 0
jmp loc_3E0F2
loc_3E308:
cmp [rbp+var_48], 0
jnz short loc_3E323
mov rax, [rbp+var_40]
movsx eax, byte ptr [rax]
cmp eax, 0
jz short loc_3E323
mov rax, [rbp+var_40]
mov [rbp+var_48], rax
loc_3E323:
mov rax, [rbp+var_40]
add rax, 1
mov [rbp+var_40], rax
jmp loc_3E0F2
loc_3E334:
cmp [rbp+var_48], 0
jz short loc_3E361
mov rdi, [rbp+var_48]
lea rsi, aConnection; "connection"
call _strcasecmp
cmp eax, 0
jz short loc_3E361
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_48]
mov rdx, [rbp+var_50]
call _mariadb_set_conf_option
loc_3E361:
mov rdi, [rbp+var_30]
call _free
mov [rbp+var_4], 0
jmp short loc_3E3AC
loc_3E373:
mov rdi, [rbp+var_10]
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov r8, [rbp+var_40]
mov rax, [rbp+var_30]
sub r8, rax
mov esi, 1393h
xor eax, eax
mov ecx, eax
mov al, 0
call my_set_error
mov rdi, [rbp+var_30]
call _free
mov [rbp+var_4], 1
loc_3E3AC:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
| long long parse_connection_string(long long a1, long long a2, long long a3, long long a4)
{
char *v4; // rax
char *v5; // rax
char *v6; // rax
int v8; // [rsp+8h] [rbp-58h]
char v9; // [rsp+Fh] [rbp-51h]
char *v10; // [rsp+10h] [rbp-50h]
char *v11; // [rsp+18h] [rbp-48h]
char *v12; // [rsp+20h] [rbp-40h]
unsigned long long v13; // [rsp+28h] [rbp-38h]
long long v14; // [rsp+30h] [rbp-30h]
long long v15; // [rsp+38h] [rbp-28h]
v15 = a4;
v11 = 0LL;
v10 = 0LL;
v9 = 0;
if ( a4 == -1 )
v15 = strlen(a3);
v14 = malloc(v15 + 1);
memcpy(v14, a3, v15);
*(_BYTE *)(v14 + v15) = 0;
v12 = (char *)v14;
v13 = v15 + v14;
while ( (unsigned long long)v12 <= v13 )
{
if ( (*(_WORD *)(*(_QWORD *)__ctype_b_loc() + 2LL * *v12) & 0x2000) == 0 || v9 )
{
v8 = *v12;
switch ( v8 )
{
case ';':
if ( v9 )
{
++v12;
}
else
{
if ( !v11 )
{
LABEL_45:
my_set_error(a1, 0x1393u, (long long)SQLSTATE_UNKNOWN, 0LL, &v12[-v14]);
free(v14);
return 1;
}
v6 = v12++;
*v6 = 0;
if ( (unsigned int)strcasecmp(v11, "connection") )
mariadb_set_conf_option(a1, v11, v10);
v10 = 0LL;
v11 = 0LL;
}
break;
case '=':
if ( v9 )
{
++v12;
}
else
{
if ( !v11 )
goto LABEL_45;
v5 = v12++;
*v5 = 0;
if ( (unsigned long long)v12 < v13 )
v10 = v12;
}
break;
case '{':
if ( !v11 )
goto LABEL_45;
if ( v9 || (v9 = 1, (unsigned long long)v12 >= v13) )
{
LABEL_37:
if ( !v11 )
{
if ( *v12 )
v11 = v12;
}
++v12;
}
else
{
v10 = ++v12;
}
break;
default:
if ( v8 != 125 || !v9 )
goto LABEL_37;
if ( !v11 )
goto LABEL_45;
if ( (unsigned long long)v12 < v13 && v12[1] == 125 )
{
memmove(v12, v12 + 1, v13 - (_QWORD)v12 - 1);
--v13;
v12 += 2;
}
else
{
v9 = 0;
v4 = v12++;
*v4 = 0;
}
break;
}
}
else
{
++v12;
}
}
if ( v11 && (unsigned int)strcasecmp(v11, "connection") )
mariadb_set_conf_option(a1, v11, v10);
free(v14);
return 0;
}
| parse_connection_string:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x48],0x0
MOV qword ptr [RBP + -0x50],0x0
MOV byte ptr [RBP + -0x51],0x0
CMP qword ptr [RBP + -0x28],-0x1
JNZ 0x0013e0b0
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00137400
MOV qword ptr [RBP + -0x28],RAX
LAB_0013e0b0:
MOV RDI,qword ptr [RBP + -0x28]
ADD RDI,0x1
CALL 0x00137920
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x001370c0
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + RCX*0x1],0x0
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x38],RAX
LAB_0013e0f2:
MOV RAX,qword ptr [RBP + -0x40]
CMP RAX,qword ptr [RBP + -0x38]
JA 0x0013e334
CALL 0x00137130
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x40]
MOVSX ECX,byte ptr [RCX]
MOVSXD RCX,ECX
MOVZX EAX,word ptr [RAX + RCX*0x2]
AND EAX,0x2000
CMP EAX,0x0
JZ 0x0013e134
CMP byte ptr [RBP + -0x51],0x0
JNZ 0x0013e134
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x1
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0013e0f2
LAB_0013e134:
MOV RAX,qword ptr [RBP + -0x40]
MOVSX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x58],EAX
SUB EAX,0x3b
JZ 0x0013e291
JMP 0x0013e149
LAB_0013e149:
MOV EAX,dword ptr [RBP + -0x58]
SUB EAX,0x3d
JZ 0x0013e245
JMP 0x0013e157
LAB_0013e157:
MOV EAX,dword ptr [RBP + -0x58]
SUB EAX,0x7b
JZ 0x0013e16e
JMP 0x0013e161
LAB_0013e161:
MOV EAX,dword ptr [RBP + -0x58]
SUB EAX,0x7d
JZ 0x0013e1ae
JMP 0x0013e308
LAB_0013e16e:
CMP qword ptr [RBP + -0x48],0x0
JNZ 0x0013e17a
JMP 0x0013e373
LAB_0013e17a:
CMP byte ptr [RBP + -0x51],0x0
JNZ 0x0013e1a9
MOV byte ptr [RBP + -0x51],0x1
MOV RAX,qword ptr [RBP + -0x40]
CMP RAX,qword ptr [RBP + -0x38]
JNC 0x0013e1a7
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x1
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x0013e0f2
LAB_0013e1a7:
JMP 0x0013e1a9
LAB_0013e1a9:
JMP 0x0013e308
LAB_0013e1ae:
CMP byte ptr [RBP + -0x51],0x0
JZ 0x0013e240
CMP qword ptr [RBP + -0x48],0x0
JNZ 0x0013e1c4
JMP 0x0013e373
LAB_0013e1c4:
MOV RAX,qword ptr [RBP + -0x40]
CMP RAX,qword ptr [RBP + -0x38]
JNC 0x0013e218
MOV RAX,qword ptr [RBP + -0x40]
MOVSX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x7d
JNZ 0x0013e218
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x40]
ADD RSI,0x1
MOV RDX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x40]
SUB RDX,RAX
SUB RDX,0x1
CALL 0x00137160
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x2
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0013e0f2
LAB_0013e218:
CMP byte ptr [RBP + -0x51],0x0
JZ 0x0013e224
MOV byte ptr [RBP + -0x51],0x0
JMP 0x0013e229
LAB_0013e224:
JMP 0x0013e373
LAB_0013e229:
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x40],RCX
MOV byte ptr [RAX],0x0
JMP 0x0013e0f2
LAB_0013e240:
JMP 0x0013e308
LAB_0013e245:
CMP byte ptr [RBP + -0x51],0x0
JZ 0x0013e25c
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x1
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0013e0f2
LAB_0013e25c:
CMP qword ptr [RBP + -0x48],0x0
JNZ 0x0013e268
JMP 0x0013e373
LAB_0013e268:
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x40],RCX
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x40]
CMP RAX,qword ptr [RBP + -0x38]
JNC 0x0013e28c
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x50],RAX
LAB_0013e28c:
JMP 0x0013e0f2
LAB_0013e291:
CMP byte ptr [RBP + -0x51],0x0
JZ 0x0013e2a8
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x1
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0013e0f2
LAB_0013e2a8:
CMP qword ptr [RBP + -0x48],0x0
JNZ 0x0013e2b4
JMP 0x0013e373
LAB_0013e2b4:
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x40],RCX
MOV byte ptr [RAX],0x0
CMP qword ptr [RBP + -0x48],0x0
JZ 0x0013e2f3
MOV RDI,qword ptr [RBP + -0x48]
LEA RSI,[0x1ced00]
CALL 0x00137840
CMP EAX,0x0
JZ 0x0013e2f3
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x50]
CALL 0x0013e3c0
LAB_0013e2f3:
MOV qword ptr [RBP + -0x50],0x0
MOV qword ptr [RBP + -0x48],0x0
JMP 0x0013e0f2
LAB_0013e308:
CMP qword ptr [RBP + -0x48],0x0
JNZ 0x0013e323
MOV RAX,qword ptr [RBP + -0x40]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x0013e323
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x48],RAX
LAB_0013e323:
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,0x1
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0013e0f2
LAB_0013e334:
CMP qword ptr [RBP + -0x48],0x0
JZ 0x0013e361
MOV RDI,qword ptr [RBP + -0x48]
LEA RSI,[0x1ced00]
CALL 0x00137840
CMP EAX,0x0
JZ 0x0013e361
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x50]
CALL 0x0013e3c0
LAB_0013e361:
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x001371c0
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0013e3ac
LAB_0013e373:
MOV RDI,qword ptr [RBP + -0x10]
LEA RAX,[0x337750]
MOV RDX,qword ptr [RAX]
MOV R8,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x30]
SUB R8,RAX
MOV ESI,0x1393
XOR EAX,EAX
MOV ECX,EAX
MOV AL,0x0
CALL 0x0013ce90
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x001371c0
MOV dword ptr [RBP + -0x4],0x1
LAB_0013e3ac:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
int4
parse_connection_string(int8 param_1,int8 param_2,char *param_3,size_t param_4)
{
char cVar1;
bool bVar2;
int iVar3;
char *__dest;
ushort **ppuVar4;
char *pcVar5;
char *local_58;
char *local_50;
char *local_48;
char *local_40;
size_t local_30;
local_50 = (char *)0x0;
local_58 = (char *)0x0;
bVar2 = false;
local_30 = param_4;
if (param_4 == 0xffffffffffffffff) {
local_30 = strlen(param_3);
}
__dest = (char *)malloc(local_30 + 1);
memcpy(__dest,param_3,local_30);
__dest[local_30] = '\0';
local_40 = __dest + local_30;
local_48 = __dest;
LAB_0013e0f2:
while( true ) {
while( true ) {
if (local_40 < local_48) {
if ((local_50 != (char *)0x0) && (iVar3 = strcasecmp(local_50,"connection"), iVar3 != 0)) {
_mariadb_set_conf_option(param_1,local_50,local_58);
}
free(__dest);
return 0;
}
ppuVar4 = __ctype_b_loc();
if ((((*ppuVar4)[(int)*local_48] & 0x2000) == 0) || (bVar2)) break;
local_48 = local_48 + 1;
}
cVar1 = *local_48;
if (cVar1 != ';') break;
if (bVar2) {
local_48 = local_48 + 1;
}
else {
if (local_50 == (char *)0x0) goto LAB_0013e373;
*local_48 = '\0';
if ((local_50 != (char *)0x0) && (iVar3 = strcasecmp(local_50,"connection"), iVar3 != 0)) {
_mariadb_set_conf_option(param_1,local_50,local_58);
}
local_58 = (char *)0x0;
local_50 = (char *)0x0;
local_48 = local_48 + 1;
}
}
if (cVar1 == '=') {
if (bVar2) {
local_48 = local_48 + 1;
goto LAB_0013e0f2;
}
if (local_50 != (char *)0x0) {
pcVar5 = local_48 + 1;
*local_48 = '\0';
local_48 = pcVar5;
if (pcVar5 < local_40) {
local_58 = pcVar5;
}
goto LAB_0013e0f2;
}
LAB_0013e373:
my_set_error(param_1,0x1393,SQLSTATE_UNKNOWN,0,(long)local_48 - (long)__dest);
free(__dest);
return 1;
}
if (cVar1 == '{') {
if (local_50 == (char *)0x0) goto LAB_0013e373;
if ((!bVar2) && (bVar2 = true, local_48 < local_40)) {
local_58 = local_48 + 1;
local_48 = local_48 + 1;
goto LAB_0013e0f2;
}
}
else if ((cVar1 == '}') && (bVar2)) {
if (local_50 == (char *)0x0) goto LAB_0013e373;
if ((local_48 < local_40) && (local_48[1] == '}')) {
memmove(local_48,local_48 + 1,(size_t)(local_40 + (-1 - (long)local_48)));
local_40 = local_40 + -1;
local_48 = local_48 + 2;
goto LAB_0013e0f2;
}
if (bVar2) {
bVar2 = false;
*local_48 = '\0';
local_48 = local_48 + 1;
goto LAB_0013e0f2;
}
goto LAB_0013e373;
}
if ((local_50 == (char *)0x0) && (*local_48 != '\0')) {
local_50 = local_48;
}
local_48 = local_48 + 1;
goto LAB_0013e0f2;
}
| |
40,516 | basicExample() | reaction/example/basic_example.cpp | void basicExample() {
// Create primary data sources
auto temperature = reaction::meta(25.0);
auto humidity = reaction::meta(60.0);
// Create computed data source (temperature + humidity)
auto tempHumidityIndex = reaction::data(
[](double temp, double hum) {
return temp + hum * 0.1; // Simple temperature-humidity index calculation
},
temperature, humidity);
// Create final display string
auto displayStr = reaction::data(
[](double thi) {
return "Current THI: " + std::to_string(thi);
},
tempHumidityIndex);
// Create final display action
auto displayAction = reaction::action(
[](double thi) {
std::cout << "Action Trigger, THI = " << thi << std::endl;
},
tempHumidityIndex);
std::cout << displayStr.get() << std::endl; // Initial value
// Update temperature data
*temperature = 30.0; // Action Trigger
std::cout << displayStr.get() << std::endl; // Automatically updated
// Update humidity data
*humidity = 70.0; // Action Trigger
std::cout << displayStr.get() << std::endl; // Automatically updated
} | O0 | cpp | basicExample():
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp # imm = 0x120
movabsq $0x4039000000000000, %rax # imm = 0x4039000000000000
movq %rax, -0x18(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0xaa60
movabsq $0x404e000000000000, %rax # imm = 0x404E000000000000
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0xaa60
jmp 0x34a3
leaq -0x50(%rbp), %rdi
leaq -0x51(%rbp), %rsi
leaq -0x10(%rbp), %rdx
leaq -0x28(%rbp), %rcx
callq 0x3750
jmp 0x34ba
leaq -0x68(%rbp), %rdi
leaq -0x69(%rbp), %rsi
leaq -0x50(%rbp), %rdx
callq 0x38a0
jmp 0x34cd
leaq -0x80(%rbp), %rdi
leaq -0x81(%rbp), %rsi
leaq -0x50(%rbp), %rdx
callq 0x39e0
jmp 0x34e3
leaq -0xa8(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x3a20
jmp 0x34f5
movq 0x36acc(%rip), %rdi # 0x39fc8
leaq -0xa8(%rbp), %rsi
callq 0x3170
movq %rax, -0x100(%rbp)
jmp 0x3511
movq -0x100(%rbp), %rdi
movq 0x36a79(%rip), %rsi # 0x39f98
callq 0x31b0
jmp 0x3526
leaq -0xa8(%rbp), %rdi
callq 0xab50
movabsq $0x403e000000000000, %rax # imm = 0x403E000000000000
movq %rax, -0xb0(%rbp)
leaq -0x10(%rbp), %rdi
callq 0xab90
movq %rax, -0x108(%rbp)
jmp 0x3555
movq -0x108(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0xac90
jmp 0x356a
leaq -0xd0(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x3a20
jmp 0x357c
movq 0x36a45(%rip), %rdi # 0x39fc8
leaq -0xd0(%rbp), %rsi
callq 0x3170
movq %rax, -0x110(%rbp)
jmp 0x3598
movq -0x110(%rbp), %rdi
movq 0x369f2(%rip), %rsi # 0x39f98
callq 0x31b0
jmp 0x35ad
leaq -0xd0(%rbp), %rdi
callq 0xab50
movabsq $0x4051800000000000, %rax # imm = 0x4051800000000000
movq %rax, -0xd8(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xab90
movq %rax, -0x118(%rbp)
jmp 0x35dc
movq -0x118(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0xac90
jmp 0x35f1
leaq -0xf8(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x3a20
jmp 0x3603
movq 0x369be(%rip), %rdi # 0x39fc8
leaq -0xf8(%rbp), %rsi
callq 0x3170
movq %rax, -0x120(%rbp)
jmp 0x361f
movq -0x120(%rbp), %rdi
movq 0x3696b(%rip), %rsi # 0x39f98
callq 0x31b0
jmp 0x3634
leaq -0xf8(%rbp), %rdi
callq 0xab50
leaq -0x80(%rbp), %rdi
callq 0x3aa0
leaq -0x68(%rbp), %rdi
callq 0x3b10
leaq -0x50(%rbp), %rdi
callq 0x3b80
leaq -0x28(%rbp), %rdi
callq 0xacf0
leaq -0x10(%rbp), %rdi
callq 0xacf0
addq $0x120, %rsp # imm = 0x120
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x3732
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x3729
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x3720
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x3717
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x370e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0xab50
jmp 0x370e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0xab50
jmp 0x370e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xf8(%rbp), %rdi
callq 0xab50
leaq -0x80(%rbp), %rdi
callq 0x3aa0
leaq -0x68(%rbp), %rdi
callq 0x3b10
leaq -0x50(%rbp), %rdi
callq 0x3b80
leaq -0x28(%rbp), %rdi
callq 0xacf0
leaq -0x10(%rbp), %rdi
callq 0xacf0
movq -0x38(%rbp), %rdi
callq 0x32a0
nopw %cs:(%rax,%rax)
| _Z12basicExamplev:
push rbp
mov rbp, rsp
sub rsp, 120h
mov rax, 4039000000000000h
mov [rbp+var_18], rax
lea rdi, [rbp+var_10]
lea rsi, [rbp+var_18]
call _ZN8reaction4metaITkNS_9TriggerCCENS_13AlwaysTriggerETkNS_9InvalidCCENS_21DirectFailureStrategyETkNS_9CompareCCEdEEDaOT1_
mov rax, 404E000000000000h
mov [rbp+var_30], rax
lea rdi, [rbp+var_28]
lea rsi, [rbp+var_30]
call _ZN8reaction4metaITkNS_9TriggerCCENS_13AlwaysTriggerETkNS_9InvalidCCENS_21DirectFailureStrategyETkNS_9CompareCCEdEEDaOT1_
jmp short $+2
loc_34A3:
lea rdi, [rbp+var_50]
lea rsi, [rbp+var_51]
lea rdx, [rbp+var_10]
lea rcx, [rbp+var_28]
call _ZN8reaction4dataITkNS_9TriggerCCENS_13AlwaysTriggerETkNS_9InvalidCCENS_21DirectFailureStrategyEZ12basicExamplevE3$_0JRNS_11DataWeakRefINS_10DataSourceIS1_S2_dJEEEEES8_EEEDaOT1_DpOT2_
jmp short $+2
loc_34BA:
lea rdi, [rbp+var_68]
lea rsi, [rbp+var_69]
lea rdx, [rbp+var_50]
call _ZN8reaction4dataITkNS_9TriggerCCENS_13AlwaysTriggerETkNS_9InvalidCCENS_21DirectFailureStrategyEZ12basicExamplevE3$_1JRNS_11DataWeakRefINS_10DataSourceIS1_S2_Z12basicExamplevE3$_0JNS5_IS1_S2_dJEEES7_EEEEEEEEDaOT1_DpOT2_
jmp short $+2
loc_34CD:
lea rdi, [rbp+var_80]
lea rsi, [rbp+var_81]
lea rdx, [rbp+var_50]
call _ZN8reaction6actionITkNS_9TriggerCCENS_13AlwaysTriggerETkNS_9InvalidCCENS_21DirectFailureStrategyEZ12basicExamplevE3$_2JRNS_11DataWeakRefINS_10DataSourceIS1_S2_Z12basicExamplevE3$_0JNS5_IS1_S2_dJEEES7_EEEEEEEEDaOT1_DpOT2_
jmp short $+2
loc_34E3:
lea rdi, [rbp+var_A8]
lea rsi, [rbp+var_68]
call _ZNK8reaction11DataWeakRefINS_10DataSourceINS_13AlwaysTriggerENS_21DirectFailureStrategyEZ12basicExamplevE3$_1JNS1_IS2_S3_Z12basicExamplevE3$_0JNS1_IS2_S3_dJEEES6_EEEEEEE3getB5cxx11EvQ12DataSourceCCIT_E
jmp short $+2
loc_34F5:
mov rdi, cs:_ZSt4cout_ptr
lea rsi, [rbp+var_A8]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov [rbp+var_100], rax
jmp short $+2
loc_3511:
mov rdi, [rbp+var_100]
mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr
call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &))
jmp short $+2
loc_3526:
lea rdi, [rbp+var_A8]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, 403E000000000000h
mov [rbp+var_B0], rax
lea rdi, [rbp+var_10]
call _ZNK8reaction11DataWeakRefINS_10DataSourceINS_13AlwaysTriggerENS_21DirectFailureStrategyEdJEEEEdeEv; reaction::DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>>::operator*(void)
mov [rbp+var_108], rax
jmp short $+2
loc_3555:
mov rdi, [rbp+var_108]
lea rsi, [rbp+var_B0]
call _ZN8reaction10DataSourceINS_13AlwaysTriggerENS_21DirectFailureStrategyEdJEEaSIdEERS3_OT_Qnt7ConstCCIT1_E
jmp short $+2
loc_356A:
lea rdi, [rbp+var_D0]
lea rsi, [rbp+var_68]
call _ZNK8reaction11DataWeakRefINS_10DataSourceINS_13AlwaysTriggerENS_21DirectFailureStrategyEZ12basicExamplevE3$_1JNS1_IS2_S3_Z12basicExamplevE3$_0JNS1_IS2_S3_dJEEES6_EEEEEEE3getB5cxx11EvQ12DataSourceCCIT_E
jmp short $+2
loc_357C:
mov rdi, cs:_ZSt4cout_ptr
lea rsi, [rbp+var_D0]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov [rbp+var_110], rax
jmp short $+2
loc_3598:
mov rdi, [rbp+var_110]
mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr
call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &))
jmp short $+2
loc_35AD:
lea rdi, [rbp+var_D0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, 4051800000000000h
mov [rbp+var_D8], rax
lea rdi, [rbp+var_28]
call _ZNK8reaction11DataWeakRefINS_10DataSourceINS_13AlwaysTriggerENS_21DirectFailureStrategyEdJEEEEdeEv; reaction::DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>>::operator*(void)
mov [rbp+var_118], rax
jmp short $+2
loc_35DC:
mov rdi, [rbp+var_118]
lea rsi, [rbp+var_D8]
call _ZN8reaction10DataSourceINS_13AlwaysTriggerENS_21DirectFailureStrategyEdJEEaSIdEERS3_OT_Qnt7ConstCCIT1_E
jmp short $+2
loc_35F1:
lea rdi, [rbp+var_F8]
lea rsi, [rbp+var_68]
call _ZNK8reaction11DataWeakRefINS_10DataSourceINS_13AlwaysTriggerENS_21DirectFailureStrategyEZ12basicExamplevE3$_1JNS1_IS2_S3_Z12basicExamplevE3$_0JNS1_IS2_S3_dJEEES6_EEEEEEE3getB5cxx11EvQ12DataSourceCCIT_E
jmp short $+2
loc_3603:
mov rdi, cs:_ZSt4cout_ptr
lea rsi, [rbp+var_F8]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov [rbp+var_120], rax
jmp short $+2
loc_361F:
mov rdi, [rbp+var_120]
mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr
call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &))
jmp short $+2
loc_3634:
lea rdi, [rbp+var_F8]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rbp+var_80]
call _ZN8reaction11DataWeakRefINS_10DataSourceINS_13AlwaysTriggerENS_21DirectFailureStrategyEZ12basicExamplevE3$_2JNS1_IS2_S3_Z12basicExamplevE3$_0JNS1_IS2_S3_dJEEES6_EEEEEEED2Ev; reaction::DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,basicExample(void)::$_2,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,basicExample(void)::$_0,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>>>>::~DataWeakRef()
lea rdi, [rbp+var_68]
call _ZN8reaction11DataWeakRefINS_10DataSourceINS_13AlwaysTriggerENS_21DirectFailureStrategyEZ12basicExamplevE3$_1JNS1_IS2_S3_Z12basicExamplevE3$_0JNS1_IS2_S3_dJEEES6_EEEEEEED2Ev; reaction::DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,basicExample(void)::$_1,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,basicExample(void)::$_0,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>>>>::~DataWeakRef()
lea rdi, [rbp+var_50]
call _ZN8reaction11DataWeakRefINS_10DataSourceINS_13AlwaysTriggerENS_21DirectFailureStrategyEZ12basicExamplevE3$_0JNS1_IS2_S3_dJEEES5_EEEED2Ev; reaction::DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,basicExample(void)::$_0,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>>>::~DataWeakRef()
lea rdi, [rbp+var_28]
call _ZN8reaction11DataWeakRefINS_10DataSourceINS_13AlwaysTriggerENS_21DirectFailureStrategyEdJEEEED2Ev; reaction::DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>>::~DataWeakRef()
lea rdi, [rbp+var_10]
call _ZN8reaction11DataWeakRefINS_10DataSourceINS_13AlwaysTriggerENS_21DirectFailureStrategyEdJEEEED2Ev; reaction::DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>>::~DataWeakRef()
add rsp, 120h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
jmp loc_3732
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
jmp loc_3729
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
jmp short loc_3720
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
jmp short loc_3717
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
jmp short loc_370E
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
lea rdi, [rbp+var_A8]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_370E
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
lea rdi, [rbp+var_D0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_370E
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
lea rdi, [rbp+var_F8]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_370E:
lea rdi, [rbp+var_80]
call _ZN8reaction11DataWeakRefINS_10DataSourceINS_13AlwaysTriggerENS_21DirectFailureStrategyEZ12basicExamplevE3$_2JNS1_IS2_S3_Z12basicExamplevE3$_0JNS1_IS2_S3_dJEEES6_EEEEEEED2Ev; reaction::DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,basicExample(void)::$_2,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,basicExample(void)::$_0,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>>>>::~DataWeakRef()
loc_3717:
lea rdi, [rbp+var_68]
call _ZN8reaction11DataWeakRefINS_10DataSourceINS_13AlwaysTriggerENS_21DirectFailureStrategyEZ12basicExamplevE3$_1JNS1_IS2_S3_Z12basicExamplevE3$_0JNS1_IS2_S3_dJEEES6_EEEEEEED2Ev; reaction::DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,basicExample(void)::$_1,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,basicExample(void)::$_0,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>>>>::~DataWeakRef()
loc_3720:
lea rdi, [rbp+var_50]
call _ZN8reaction11DataWeakRefINS_10DataSourceINS_13AlwaysTriggerENS_21DirectFailureStrategyEZ12basicExamplevE3$_0JNS1_IS2_S3_dJEEES5_EEEED2Ev; reaction::DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,basicExample(void)::$_0,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>>>::~DataWeakRef()
loc_3729:
lea rdi, [rbp+var_28]
call _ZN8reaction11DataWeakRefINS_10DataSourceINS_13AlwaysTriggerENS_21DirectFailureStrategyEdJEEEED2Ev; reaction::DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>>::~DataWeakRef()
loc_3732:
lea rdi, [rbp+var_10]
call _ZN8reaction11DataWeakRefINS_10DataSourceINS_13AlwaysTriggerENS_21DirectFailureStrategyEdJEEEED2Ev; reaction::DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>>::~DataWeakRef()
mov rdi, [rbp+var_38]
call __Unwind_Resume
| long long basicExample(void)
{
long long v1; // [rsp+0h] [rbp-120h]
long long v2; // [rsp+8h] [rbp-118h]
long long v3; // [rsp+10h] [rbp-110h]
long long v4; // [rsp+18h] [rbp-108h]
long long v5; // [rsp+20h] [rbp-100h]
_BYTE v6[32]; // [rsp+28h] [rbp-F8h] BYREF
long long v7; // [rsp+48h] [rbp-D8h] BYREF
_BYTE v8[32]; // [rsp+50h] [rbp-D0h] BYREF
long long v9; // [rsp+70h] [rbp-B0h] BYREF
_BYTE v10[39]; // [rsp+78h] [rbp-A8h] BYREF
char v11; // [rsp+9Fh] [rbp-81h] BYREF
_BYTE v12[23]; // [rsp+A0h] [rbp-80h] BYREF
char v13; // [rsp+B7h] [rbp-69h] BYREF
_BYTE v14[23]; // [rsp+B8h] [rbp-68h] BYREF
char v15; // [rsp+CFh] [rbp-51h] BYREF
_BYTE v16[20]; // [rsp+D0h] [rbp-50h] BYREF
long long v17; // [rsp+F0h] [rbp-30h] BYREF
_BYTE v18[16]; // [rsp+F8h] [rbp-28h] BYREF
long long v19; // [rsp+108h] [rbp-18h] BYREF
_BYTE v20[16]; // [rsp+110h] [rbp-10h] BYREF
v19 = 0x4039000000000000LL;
ZN8reaction4metaITkNS_9TriggerCCENS_13AlwaysTriggerETkNS_9InvalidCCENS_21DirectFailureStrategyETkNS_9CompareCCEdEEDaOT1_(
v20,
&v19);
v17 = 0x404E000000000000LL;
ZN8reaction4metaITkNS_9TriggerCCENS_13AlwaysTriggerETkNS_9InvalidCCENS_21DirectFailureStrategyETkNS_9CompareCCEdEEDaOT1_(
v18,
&v17);
ZN8reaction4dataITkNS_9TriggerCCENS_13AlwaysTriggerETkNS_9InvalidCCENS_21DirectFailureStrategyEZ12basicExamplevE3__0JRNS_11DataWeakRefINS_10DataSourceIS1_S2_dJEEEEES8_EEEDaOT1_DpOT2_(
v16,
&v15,
v20,
v18);
ZN8reaction4dataITkNS_9TriggerCCENS_13AlwaysTriggerETkNS_9InvalidCCENS_21DirectFailureStrategyEZ12basicExamplevE3__1JRNS_11DataWeakRefINS_10DataSourceIS1_S2_Z12basicExamplevE3__0JNS5_IS1_S2_dJEEES7_EEEEEEEEDaOT1_DpOT2_(
v14,
&v13,
v16);
ZN8reaction6actionITkNS_9TriggerCCENS_13AlwaysTriggerETkNS_9InvalidCCENS_21DirectFailureStrategyEZ12basicExamplevE3__2JRNS_11DataWeakRefINS_10DataSourceIS1_S2_Z12basicExamplevE3__0JNS5_IS1_S2_dJEEES7_EEEEEEEEDaOT1_DpOT2_(
v12,
&v11,
v16);
reaction::DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,basicExample(void)::$_1,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,basicExample(void)::$_0,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>>>>::get[abi:cxx11](
v10,
v14);
v5 = std::operator<<<char>(&std::cout, v10);
std::ostream::operator<<(v5, &std::endl<char,std::char_traits<char>>);
std::string::~string(v10);
v9 = 0x403E000000000000LL;
v4 = reaction::DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>>::operator*(v20);
reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>::operator=<double>(v4, &v9);
reaction::DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,basicExample(void)::$_1,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,basicExample(void)::$_0,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>>>>::get[abi:cxx11](
v8,
v14);
v3 = std::operator<<<char>(&std::cout, v8);
std::ostream::operator<<(v3, &std::endl<char,std::char_traits<char>>);
std::string::~string(v8);
v7 = 0x4051800000000000LL;
v2 = reaction::DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>>::operator*(v18);
reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>::operator=<double>(v2, &v7);
reaction::DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,basicExample(void)::$_1,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,basicExample(void)::$_0,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>>>>::get[abi:cxx11](
v6,
v14);
v1 = std::operator<<<char>(&std::cout, v6);
std::ostream::operator<<(v1, &std::endl<char,std::char_traits<char>>);
std::string::~string(v6);
reaction::DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,basicExample(void)::$_2,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,basicExample(void)::$_0,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>>>>::~DataWeakRef(v12);
reaction::DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,basicExample(void)::$_1,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,basicExample(void)::$_0,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>>>>::~DataWeakRef(v14);
reaction::DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,basicExample(void)::$_0,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>>>::~DataWeakRef(v16);
reaction::DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>>::~DataWeakRef(v18);
return reaction::DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>>::~DataWeakRef(v20);
}
| basicExample:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x120
MOV RAX,0x4039000000000000
MOV qword ptr [RBP + -0x18],RAX
LEA RDI,[RBP + -0x10]
LEA RSI,[RBP + -0x18]
CALL 0x0010aa60
MOV RAX,0x404e000000000000
MOV qword ptr [RBP + -0x30],RAX
LAB_00103494:
LEA RDI,[RBP + -0x28]
LEA RSI,[RBP + -0x30]
CALL 0x0010aa60
JMP 0x001034a3
LAB_001034a3:
LEA RDI,[RBP + -0x50]
LEA RSI,[RBP + -0x51]
LEA RDX,[RBP + -0x10]
LEA RCX,[RBP + -0x28]
CALL 0x00103750
JMP 0x001034ba
LAB_001034ba:
LEA RDI,[RBP + -0x68]
LEA RSI,[RBP + -0x69]
LEA RDX,[RBP + -0x50]
CALL 0x001038a0
JMP 0x001034cd
LAB_001034cd:
LEA RDI,[RBP + -0x80]
LEA RSI,[RBP + -0x81]
LEA RDX,[RBP + -0x50]
CALL 0x001039e0
JMP 0x001034e3
LAB_001034e3:
LEA RDI,[RBP + -0xa8]
LEA RSI,[RBP + -0x68]
CALL 0x00103a20
JMP 0x001034f5
LAB_001034f5:
MOV RDI,qword ptr [0x00139fc8]
LEA RSI,[RBP + -0xa8]
CALL 0x00103170
MOV qword ptr [RBP + -0x100],RAX
JMP 0x00103511
LAB_00103511:
MOV RDI,qword ptr [RBP + -0x100]
MOV RSI,qword ptr [0x00139f98]
CALL 0x001031b0
JMP 0x00103526
LAB_00103526:
LEA RDI,[RBP + -0xa8]
CALL 0x0010ab50
MOV RAX,0x403e000000000000
MOV qword ptr [RBP + -0xb0],RAX
LAB_00103543:
LEA RDI,[RBP + -0x10]
CALL 0x0010ab90
MOV qword ptr [RBP + -0x108],RAX
JMP 0x00103555
LAB_00103555:
MOV RDI,qword ptr [RBP + -0x108]
LEA RSI,[RBP + -0xb0]
CALL 0x0010ac90
JMP 0x0010356a
LAB_0010356a:
LEA RDI,[RBP + -0xd0]
LEA RSI,[RBP + -0x68]
CALL 0x00103a20
JMP 0x0010357c
LAB_0010357c:
MOV RDI,qword ptr [0x00139fc8]
LEA RSI,[RBP + -0xd0]
CALL 0x00103170
MOV qword ptr [RBP + -0x110],RAX
JMP 0x00103598
LAB_00103598:
MOV RDI,qword ptr [RBP + -0x110]
MOV RSI,qword ptr [0x00139f98]
CALL 0x001031b0
JMP 0x001035ad
LAB_001035ad:
LEA RDI,[RBP + -0xd0]
CALL 0x0010ab50
MOV RAX,0x4051800000000000
MOV qword ptr [RBP + -0xd8],RAX
LAB_001035ca:
LEA RDI,[RBP + -0x28]
CALL 0x0010ab90
MOV qword ptr [RBP + -0x118],RAX
JMP 0x001035dc
LAB_001035dc:
MOV RDI,qword ptr [RBP + -0x118]
LEA RSI,[RBP + -0xd8]
CALL 0x0010ac90
JMP 0x001035f1
LAB_001035f1:
LEA RDI,[RBP + -0xf8]
LEA RSI,[RBP + -0x68]
CALL 0x00103a20
JMP 0x00103603
LAB_00103603:
MOV RDI,qword ptr [0x00139fc8]
LEA RSI,[RBP + -0xf8]
CALL 0x00103170
MOV qword ptr [RBP + -0x120],RAX
JMP 0x0010361f
LAB_0010361f:
MOV RDI,qword ptr [RBP + -0x120]
MOV RSI,qword ptr [0x00139f98]
CALL 0x001031b0
LAB_00103632:
JMP 0x00103634
LAB_00103634:
LEA RDI,[RBP + -0xf8]
CALL 0x0010ab50
LEA RDI,[RBP + -0x80]
CALL 0x00103aa0
LEA RDI,[RBP + -0x68]
CALL 0x00103b10
LEA RDI,[RBP + -0x50]
CALL 0x00103b80
LEA RDI,[RBP + -0x28]
CALL 0x0010acf0
LEA RDI,[RBP + -0x10]
CALL 0x0010acf0
ADD RSP,0x120
POP RBP
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* basicExample() */
void basicExample(void)
{
ostream *poVar1;
int8 uVar2;
string local_100 [32];
int8 local_e0;
string local_d8 [32];
int8 local_b8;
string local_b0 [39];
int1 local_89;
DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,basicExample()::__2,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,basicExample()::__0,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>>>>
local_88 [23];
int1 local_71;
DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,basicExample()::__1,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,basicExample()::__0,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>>>>
local_70 [23];
int1 local_59;
DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,basicExample()::__0,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>>>
local_58 [32];
int8 local_38;
DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>>
local_30 [16];
int8 local_20;
DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>>
local_18 [16];
local_20 = 0x4039000000000000;
_ZN8reaction4metaITkNS_9TriggerCCENS_13AlwaysTriggerETkNS_9InvalidCCENS_21DirectFailureStrategyETkNS_9CompareCCEdEEDaOT1_
(local_18,&local_20);
local_38 = 0x404e000000000000;
/* try { // try from 00103494 to 001034a0 has its CatchHandler @ 00103676 */
_ZN8reaction4metaITkNS_9TriggerCCENS_13AlwaysTriggerETkNS_9InvalidCCENS_21DirectFailureStrategyETkNS_9CompareCCEdEEDaOT1_
(local_30,&local_38);
/* try { // try from 001034a3 to 001034b7 has its CatchHandler @ 00103687 */
_ZN8reaction4dataITkNS_9TriggerCCENS_13AlwaysTriggerETkNS_9InvalidCCENS_21DirectFailureStrategyEZ12basicExamplevE3__0JRNS_11DataWeakRefINS_10DataSourceIS1_S2_dJEEEEES8_EEEDaOT1_DpOT2_
(local_58,&local_59,local_18,local_30);
/* try { // try from 001034ba to 001034ca has its CatchHandler @ 00103698 */
_ZN8reaction4dataITkNS_9TriggerCCENS_13AlwaysTriggerETkNS_9InvalidCCENS_21DirectFailureStrategyEZ12basicExamplevE3__1JRNS_11DataWeakRefINS_10DataSourceIS1_S2_Z12basicExamplevE3__0JNS5_IS1_S2_dJEEES7_EEEEEEEEDaOT1_DpOT2_
(local_70,&local_71,local_58);
/* try { // try from 001034cd to 001034e0 has its CatchHandler @ 001036a6 */
_ZN8reaction6actionITkNS_9TriggerCCENS_13AlwaysTriggerETkNS_9InvalidCCENS_21DirectFailureStrategyEZ12basicExamplevE3__2JRNS_11DataWeakRefINS_10DataSourceIS1_S2_Z12basicExamplevE3__0JNS5_IS1_S2_dJEEES7_EEEEEEEEDaOT1_DpOT2_
(local_88,&local_89,local_58);
/* try { // try from 001034e3 to 001034f2 has its CatchHandler @ 001036b4 */
_ZNK8reaction11DataWeakRefINS_10DataSourceINS_13AlwaysTriggerENS_21DirectFailureStrategyEZ12basicExamplevE3__1JNS1_IS2_S3_Z12basicExamplevE3__0JNS1_IS2_S3_dJEEES6_EEEEEEE3getB5cxx11EvQ12DataSourceCCIT_E
(local_b0,local_70);
/* try { // try from 001034f5 to 00103523 has its CatchHandler @ 001036c2 */
poVar1 = std::operator<<((ostream *)PTR_cout_00139fc8,local_b0);
std::ostream::operator<<
(poVar1,(_func_ostream_ptr_ostream_ptr *)PTR_endl<char,std_char_traits<char>>_00139f98);
std::__cxx11::string::~string(local_b0);
local_b8 = 0x403e000000000000;
/* try { // try from 00103543 to 00103579 has its CatchHandler @ 001036b4 */
uVar2 = reaction::
DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>>
::operator*(local_18);
_ZN8reaction10DataSourceINS_13AlwaysTriggerENS_21DirectFailureStrategyEdJEEaSIdEERS3_OT_Qnt7ConstCCIT1_E
(uVar2,&local_b8);
_ZNK8reaction11DataWeakRefINS_10DataSourceINS_13AlwaysTriggerENS_21DirectFailureStrategyEZ12basicExamplevE3__1JNS1_IS2_S3_Z12basicExamplevE3__0JNS1_IS2_S3_dJEEES6_EEEEEEE3getB5cxx11EvQ12DataSourceCCIT_E
(local_d8,local_70);
/* try { // try from 0010357c to 001035aa has its CatchHandler @ 001036dc */
poVar1 = std::operator<<((ostream *)PTR_cout_00139fc8,local_d8);
std::ostream::operator<<
(poVar1,(_func_ostream_ptr_ostream_ptr *)PTR_endl<char,std_char_traits<char>>_00139f98);
std::__cxx11::string::~string(local_d8);
local_e0 = 0x4051800000000000;
/* try { // try from 001035ca to 00103600 has its CatchHandler @ 001036b4 */
uVar2 = reaction::
DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>>
::operator*(local_30);
_ZN8reaction10DataSourceINS_13AlwaysTriggerENS_21DirectFailureStrategyEdJEEaSIdEERS3_OT_Qnt7ConstCCIT1_E
(uVar2,&local_e0);
_ZNK8reaction11DataWeakRefINS_10DataSourceINS_13AlwaysTriggerENS_21DirectFailureStrategyEZ12basicExamplevE3__1JNS1_IS2_S3_Z12basicExamplevE3__0JNS1_IS2_S3_dJEEES6_EEEEEEE3getB5cxx11EvQ12DataSourceCCIT_E
(local_100,local_70);
/* try { // try from 00103603 to 00103631 has its CatchHandler @ 001036f6 */
poVar1 = std::operator<<((ostream *)PTR_cout_00139fc8,local_100);
std::ostream::operator<<
(poVar1,(_func_ostream_ptr_ostream_ptr *)PTR_endl<char,std_char_traits<char>>_00139f98);
std::__cxx11::string::~string(local_100);
reaction::
DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,basicExample()::$_2,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,basicExample()::$_0,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>>>>
::~DataWeakRef(local_88);
reaction::
DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,basicExample()::$_1,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,basicExample()::$_0,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>>>>
::~DataWeakRef(local_70);
reaction::
DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,basicExample()::$_0,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>,reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>>>
::~DataWeakRef(local_58);
reaction::
DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>>
::~DataWeakRef(local_30);
reaction::
DataWeakRef<reaction::DataSource<reaction::AlwaysTrigger,reaction::DirectFailureStrategy,double>>
::~DataWeakRef(local_18);
return;
}
| |
40,517 | ggml_vec_dot_iq4_xs_q8_K | monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu-quants.c | void ggml_vec_dot_iq4_xs_q8_K(int n, float * restrict s, size_t bs, const void * restrict vx, size_t bx, const void * restrict vy, size_t by, int nrc) {
assert(nrc == 1);
UNUSED(nrc);
UNUSED(bx);
UNUSED(by);
UNUSED(bs);
assert(n % QK_K == 0);
const block_iq4_xs * restrict x = vx;
const block_q8_K * restrict y = vy;
const int nb = n / QK_K;
#if defined __ARM_NEON
const int8x16_t values = vld1q_s8(kvalues_iq4nl);
const uint8x16_t m4b = vdupq_n_u8(0x0f);
ggml_uint8x16x2_t q4bits;
ggml_int8x16x4_t q4b;
ggml_int8x16x4_t q8b;
int32x4_t prod_1, prod_2;
float sumf = 0;
for (int ibl = 0; ibl < nb; ++ibl) {
const int8_t * q8 = y[ibl].qs;
const uint8_t * q4 = x[ibl].qs;
uint16_t h = x[ibl].scales_h;
int sumi1 = 0, sumi2 = 0;
for (int ib = 0; ib < QK_K/64; ++ib) {
q4bits = ggml_vld1q_u8_x2(q4); q4 += 32;
q8b = ggml_vld1q_s8_x4(q8); q8 += 64;
q4b.val[0] = ggml_vqtbl1q_s8(values, vandq_u8 (q4bits.val[0], m4b));
q4b.val[1] = ggml_vqtbl1q_s8(values, vshrq_n_u8(q4bits.val[0], 4));
q4b.val[2] = ggml_vqtbl1q_s8(values, vandq_u8 (q4bits.val[1], m4b));
q4b.val[3] = ggml_vqtbl1q_s8(values, vshrq_n_u8(q4bits.val[1], 4));
prod_1 = ggml_vdotq_s32(ggml_vdotq_s32(vdupq_n_s32(0), q4b.val[0], q8b.val[0]), q4b.val[1], q8b.val[1]);
prod_2 = ggml_vdotq_s32(ggml_vdotq_s32(vdupq_n_s32(0), q4b.val[2], q8b.val[2]), q4b.val[3], q8b.val[3]);
int ls1 = ((x[ibl].scales_l[ib] & 0xf) | ((h << 4) & 0x30)) - 32;
int ls2 = ((x[ibl].scales_l[ib] >> 4) | ((h << 2) & 0x30)) - 32;
h >>= 4;
sumi1 += vaddvq_s32(prod_1) * ls1;
sumi2 += vaddvq_s32(prod_2) * ls2;
}
sumf += GGML_FP16_TO_FP32(x[ibl].d) * y[ibl].d * (sumi1 + sumi2);
}
*s = sumf;
#elif defined __AVX2__
const __m128i values128 = _mm_loadu_si128((const __m128i*)kvalues_iq4nl);
const __m128i m4b = _mm_set1_epi8(0x0f);
__m256 accum = _mm256_setzero_ps();
for (int ibl = 0; ibl < nb; ++ibl) {
const uint8_t * qs = x[ibl].qs;
const int8_t * q8 = y[ibl].qs;
uint16_t sh = x[ibl].scales_h;
__m256i sumi1 = _mm256_setzero_si256();
__m256i sumi2 = _mm256_setzero_si256();
for (int ib = 0; ib < QK_K/32; ib += 2) {
const __m128i q4bits_1 = _mm_loadu_si128((const __m128i*)qs); qs += 16;
const __m128i q4bits_2 = _mm_loadu_si128((const __m128i*)qs); qs += 16;
const __m256i q8b_1 = _mm256_loadu_si256((const __m256i *)q8); q8 += 32;
const __m256i q8b_2 = _mm256_loadu_si256((const __m256i *)q8); q8 += 32;
const __m256i q4b_1 = MM256_SET_M128I(_mm_shuffle_epi8(values128, _mm_and_si128(_mm_srli_epi16(q4bits_1, 4), m4b)),
_mm_shuffle_epi8(values128, _mm_and_si128(q4bits_1, m4b)));
const __m256i q4b_2 = MM256_SET_M128I(_mm_shuffle_epi8(values128, _mm_and_si128(_mm_srli_epi16(q4bits_2, 4), m4b)),
_mm_shuffle_epi8(values128, _mm_and_si128(q4bits_2, m4b)));
const __m256i p16_1 = mul_add_epi8(q4b_1, q8b_1);
const __m256i p16_2 = mul_add_epi8(q4b_2, q8b_2);
const int16_t ls1 = ((x[ibl].scales_l[ib/2] & 0xf) | ((sh << 4) & 0x30)) - 32;
const int16_t ls2 = ((x[ibl].scales_l[ib/2] >> 4) | ((sh << 2) & 0x30)) - 32;
sh >>= 4;
const __m256i p_1 = _mm256_madd_epi16(p16_1, _mm256_set1_epi16(ls1));
const __m256i p_2 = _mm256_madd_epi16(p16_2, _mm256_set1_epi16(ls2));
sumi1 = _mm256_add_epi32(p_1, sumi1);
sumi2 = _mm256_add_epi32(p_2, sumi2);
}
accum = _mm256_fmadd_ps(_mm256_set1_ps(GGML_FP16_TO_FP32(x[ibl].d)*y[ibl].d),
_mm256_cvtepi32_ps(_mm256_add_epi32(sumi1, sumi2)), accum);
}
*s = hsum_float_8(accum);
#elif defined __AVX__
const __m128i values128 = _mm_loadu_si128((const __m128i*)kvalues_iq4nl);
const __m128i m4b = _mm_set1_epi8(0x0f);
__m256 accum = _mm256_setzero_ps();
for (int ibl = 0; ibl < nb; ++ibl) {
const uint8_t * qs = x[ibl].qs;
const int8_t * q8 = y[ibl].qs;
uint16_t sh = x[ibl].scales_h;
__m128i sumi1_0 = _mm_setzero_si128();
__m128i sumi1_1 = _mm_setzero_si128();
__m128i sumi2_0 = _mm_setzero_si128();
__m128i sumi2_1 = _mm_setzero_si128();
for (int ib = 0; ib < QK_K/32; ib += 2) {
const __m128i q4bits_1 = _mm_loadu_si128((const __m128i *)qs); qs += 16;
const __m128i q4bits_2 = _mm_loadu_si128((const __m128i *)qs); qs += 16;
const __m128i q8b_1_0 = _mm_loadu_si128((const __m128i *)q8); q8 += 16;
const __m128i q8b_1_1 = _mm_loadu_si128((const __m128i *)q8); q8 += 16;
const __m128i q8b_2_0 = _mm_loadu_si128((const __m128i *)q8); q8 += 16;
const __m128i q8b_2_1 = _mm_loadu_si128((const __m128i *)q8); q8 += 16;
const __m128i q4b_1_0 = _mm_shuffle_epi8(values128, _mm_and_si128(q4bits_1, m4b));
const __m128i q4b_1_1 = _mm_shuffle_epi8(values128, _mm_and_si128(_mm_srli_epi16(q4bits_1, 4), m4b));
const __m128i q4b_2_0 = _mm_shuffle_epi8(values128, _mm_and_si128(q4bits_2, m4b));
const __m128i q4b_2_1 = _mm_shuffle_epi8(values128, _mm_and_si128(_mm_srli_epi16(q4bits_2, 4), m4b));
const __m128i p16_1_0 = mul_add_epi8_sse(q4b_1_0, q8b_1_0);
const __m128i p16_1_1 = mul_add_epi8_sse(q4b_1_1, q8b_1_1);
const __m128i p16_2_0 = mul_add_epi8_sse(q4b_2_0, q8b_2_0);
const __m128i p16_2_1 = mul_add_epi8_sse(q4b_2_1, q8b_2_1);
const int16_t ls1 = ((x[ibl].scales_l[ib/2] & 0xf) | ((sh << 4) & 0x30)) - 32;
const int16_t ls2 = ((x[ibl].scales_l[ib/2] >> 4) | ((sh << 2) & 0x30)) - 32;
sh >>= 4;
const __m128i p_1_0 = _mm_madd_epi16(p16_1_0, _mm_set1_epi16(ls1));
const __m128i p_1_1 = _mm_madd_epi16(p16_1_1, _mm_set1_epi16(ls1));
const __m128i p_2_0 = _mm_madd_epi16(p16_2_0, _mm_set1_epi16(ls2));
const __m128i p_2_1 = _mm_madd_epi16(p16_2_1, _mm_set1_epi16(ls2));
sumi1_0 = _mm_add_epi32(p_1_0, sumi1_0);
sumi1_1 = _mm_add_epi32(p_1_1, sumi1_1);
sumi2_0 = _mm_add_epi32(p_2_0, sumi2_0);
sumi2_1 = _mm_add_epi32(p_2_1, sumi2_1);
}
__m128i sumi12_0 = _mm_add_epi32(sumi1_0, sumi2_0);
__m128i sumi12_1 = _mm_add_epi32(sumi1_1, sumi2_1);
accum = _mm256_add_ps(_mm256_mul_ps(_mm256_set1_ps(GGML_FP16_TO_FP32(x[ibl].d)*y[ibl].d),
_mm256_cvtepi32_ps(MM256_SET_M128I(sumi12_1, sumi12_0))), accum);
}
*s = hsum_float_8(accum);
#elif defined(__POWER9_VECTOR__)
const vector signed char lowMask = vec_splats((signed char)0xF);
const vector int v0 = vec_splats((int32_t)0);
const vector unsigned char v4 = vec_splats((unsigned char)0x4);
vector float vsumf0 = vec_splats(0.0f);
vector float vsumf1 = vec_splats(0.0f);
vector float vsumf2 = vec_splats(0.0f);
vector float vsumf3 = vec_splats(0.0f);
const vector signed char values = vec_xl( 0, kvalues_iq4nl);
for (int ibl = 0; ibl < nb; ++ibl) {
vector float vxd = vec_splats(GGML_FP16_TO_FP32(x[ibl].d));
vector float vyd = vec_splats(y[ibl].d);
vector float vd = vec_mul(vxd, vyd);
vector signed int vsumi0 = v0;
vector signed int vsumi1 = v0;
vector signed int vsumi2 = v0;
vector signed int vsumi3 = v0;
uint16_t h = x[ibl].scales_h;
const uint8_t * restrict q4 = x[ibl].qs;
const uint8_t * restrict sc = x[ibl].scales_l;
const int8_t * restrict q8 = y[ibl].qs;
for (int ib = 0; ib < QK_K/64; ib ++ ) {
__builtin_prefetch(q4, 0, 1);
__builtin_prefetch(q8, 0, 1);
vector signed char qxs0 = (vector signed char)vec_xl( 0, q4);
vector signed char qxs1 = (vector signed char)vec_xl(16, q4);
q4 += 32;
vector signed char q4x00 = (vector signed char)vec_and(qxs0, lowMask);
vector signed char q4x01 = (vector signed char)vec_sr(qxs0, v4);
vector signed char q4x10 = (vector signed char)vec_and(qxs1, lowMask);
vector signed char q4x11 = (vector signed char)vec_sr(qxs1, v4);
q4x00 = vec_perm(values, values, (vector unsigned char)q4x00);
q4x01 = vec_perm(values, values, (vector unsigned char)q4x01);
q4x10 = vec_perm(values, values, (vector unsigned char)q4x10);
q4x11 = vec_perm(values, values, (vector unsigned char)q4x11);
vector signed char q8y0 = vec_xl( 0, q8);
vector signed char q8y1 = vec_xl(16, q8);
vector signed char q8y2 = vec_xl(32, q8);
vector signed char q8y3 = vec_xl(48, q8);
q8 += 64;
vector signed short qv0 = vec_add(vec_mule(q4x00, q8y0), vec_mulo(q4x00, q8y0));
vector signed short qv1 = vec_add(vec_mule(q4x01, q8y1), vec_mulo(q4x01, q8y1));
vector signed short qv2 = vec_add(vec_mule(q4x10, q8y2), vec_mulo(q4x10, q8y2));
vector signed short qv3 = vec_add(vec_mule(q4x11, q8y3), vec_mulo(q4x11, q8y3));
const uint16_t ls0 = (uint16_t)(((sc[0] & 0xf) | ((h << 4) & 0x30)) - 32);
const uint16_t ls1 = (uint16_t)(((sc[0] >> 4) | ((h << 2) & 0x30)) - 32);
h >>= 4;
sc ++;
vector signed short vscales01 = vec_splats((int16_t)ls0);
vector signed short vscales23 = vec_splats((int16_t)ls1);
vsumi0 = vec_msum(qv0, vscales01, vsumi0);
vsumi1 = vec_msum(qv1, vscales01, vsumi1);
vsumi2 = vec_msum(qv2, vscales23, vsumi2);
vsumi3 = vec_msum(qv3, vscales23, vsumi3);
}
vsumf0 = vec_madd(vec_ctf(vsumi0, 0), vd, vsumf0);
vsumf1 = vec_madd(vec_ctf(vsumi1, 0), vd, vsumf1);
vsumf2 = vec_madd(vec_ctf(vsumi2, 0), vd, vsumf2);
vsumf3 = vec_madd(vec_ctf(vsumi3, 0), vd, vsumf3);
}
vsumf0 = vec_add(vsumf0, vsumf2);
vsumf1 = vec_add(vsumf1, vsumf3);
vsumf0 = vec_add(vsumf0, vsumf1);
vsumf0 = vec_add(vsumf0, vec_sld(vsumf0, vsumf0, 4));
vsumf0 = vec_add(vsumf0, vec_sld(vsumf0, vsumf0, 8));
*s = vec_extract(vsumf0, 0);
#elif defined(__loongarch_asx)
const __m128i values128 = __lsx_vld((const __m128i*)kvalues_iq4nl, 0);
const __m128i m4b = __lsx_vreplgr2vr_b(0x0f);
__m256 accum = (__m256)__lasx_xvldi(0);
__m256i tmp1;
__m128i tmp0, tmp2, tmp3, tmp4, mask_8f, mask;
mask_8f = __lsx_vreplgr2vr_b(0x8f);
for (int ibl = 0; ibl < nb; ++ibl) {
const uint8_t * qs = x[ibl].qs;
const int8_t * q8 = y[ibl].qs;
uint16_t sh = x[ibl].scales_h;
__m256i sumi1 = __lasx_xvldi(0);
__m256i sumi2 = __lasx_xvldi(0);
__m128i zero = __lsx_vldi(0);
for (int ib = 0; ib < QK_K/32; ib += 2) {
const __m128i q4bits_1 = __lsx_vld((const __m128i*)qs, 0); qs += 16;
const __m128i q4bits_2 = __lsx_vld((const __m128i*)qs, 0); qs += 16;
const __m256i q8b_1 = __lasx_xvld((const __m256i *)q8, 0); q8 += 32;
const __m256i q8b_2 = __lasx_xvld((const __m256i *)q8, 0); q8 += 32;
tmp2 = __lsx_vand_v(__lsx_vand_v(__lsx_vsrli_h(q4bits_1, 4), m4b), mask_8f);
tmp0 = __lsx_vori_b(tmp2, 0x10);
mask = __lsx_vsle_b(zero, tmp2);
tmp3 = __lsx_vand_v(tmp0, mask);
tmp3 = __lsx_vshuf_b(values128, zero, tmp3);
tmp2 = __lsx_vand_v(__lsx_vand_v(q4bits_1, m4b), mask_8f);
tmp0 = __lsx_vori_b(tmp2, 0x10);
mask = __lsx_vsle_b(zero, tmp2);
tmp4 = __lsx_vand_v(tmp0, mask);
tmp4 = __lsx_vshuf_b(values128, zero, tmp4);
const __m256i q4b_1 = lasx_insertf128(tmp3, tmp4);
tmp2 = __lsx_vand_v(__lsx_vand_v(__lsx_vsrli_h(q4bits_2, 4), m4b), mask_8f);
tmp0 = __lsx_vori_b(tmp2, 0x10);
mask = __lsx_vsle_b(zero, tmp2);
tmp3 = __lsx_vand_v(tmp0, mask);
tmp3 = __lsx_vshuf_b(values128, zero, tmp3);
tmp2 = __lsx_vand_v(__lsx_vand_v(q4bits_2, m4b), mask_8f);
tmp0 = __lsx_vori_b(tmp2, 0x10);
mask = __lsx_vsle_b(zero, tmp2);
tmp4 = __lsx_vand_v(tmp0, mask);
tmp4 = __lsx_vshuf_b(values128, zero, tmp4);
const __m256i q4b_2 = lasx_insertf128(tmp3, tmp4);
const __m256i p16_1 = mul_add_epi8(q4b_1, q8b_1);
const __m256i p16_2 = mul_add_epi8(q4b_2, q8b_2);
const int16_t ls1 = ((x[ibl].scales_l[ib/2] & 0xf) | ((sh << 4) & 0x30)) - 32;
const int16_t ls2 = ((x[ibl].scales_l[ib/2] >> 4) | ((sh << 2) & 0x30)) - 32;
sh >>= 4;
__m256i tmp5, tmp6;
tmp1 = __lasx_xvreplgr2vr_h(ls1);
tmp5 = __lasx_xvmulwev_w_h(p16_1, tmp1);
tmp6 = __lasx_xvmulwod_w_h(p16_1, tmp1);
const __m256i p_1 = __lasx_xvadd_w(tmp5, tmp6);
tmp1 = __lasx_xvreplgr2vr_h(ls2);
tmp5 = __lasx_xvmulwev_w_h(p16_2, tmp1);
tmp6 = __lasx_xvmulwod_w_h(p16_2, tmp1);
const __m256i p_2 = __lasx_xvadd_w(tmp5, tmp6);
sumi1 = __lasx_xvadd_w(p_1, sumi1);
sumi2 = __lasx_xvadd_w(p_2, sumi2);
}
accum = __lasx_xvfmadd_s(__lasx_xvreplfr2vr_s(GGML_FP16_TO_FP32(x[ibl].d)*y[ibl].d),
__lasx_xvffint_s_w(__lasx_xvadd_w(sumi1, sumi2)), accum);
}
*s = hsum_float_8(accum);
#else
float sumf = 0;
for (int ibl = 0; ibl < nb; ++ibl) {
const float d4d8 = GGML_FP16_TO_FP32(x[ibl].d) * y[ibl].d;
uint16_t h = x[ibl].scales_h;
const uint8_t * qs = x[ibl].qs;
const int8_t * q8 = y[ibl].qs;
for (int ib = 0; ib < QK_K/32; ib += 2) {
const uint8_t ls1 = (x[ibl].scales_l[ib/2] & 0xf) | ((h << 4) & 0x30);
const uint8_t ls2 = (x[ibl].scales_l[ib/2] >> 4) | ((h << 2) & 0x30);
h >>= 4;
const float d1 = d4d8*(ls1 - 32);
const float d2 = d4d8*(ls2 - 32);
int sumi1 = 0, sumi2 = 0;
for (int j = 0; j < 16; ++j) {
sumi1 += q8[j+ 0] * kvalues_iq4nl[qs[j] & 0xf];
sumi2 += q8[j+16] * kvalues_iq4nl[qs[j] >> 4];
}
sumf += d1 * (sumi1 + sumi2);
qs += 16;
q8 += 32;
sumi1 = sumi2 = 0;
for (int j = 0; j < 16; ++j) {
sumi1 += q8[j+ 0] * kvalues_iq4nl[qs[j] & 0xf];
sumi2 += q8[j+16] * kvalues_iq4nl[qs[j] >> 4];
}
sumf += d2 * (sumi1 + sumi2);
qs += 16;
q8 += 32;
}
}
*s = sumf;
#endif
} | O3 | c | ggml_vec_dot_iq4_xs_q8_K:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r9, -0x10(%rsp)
movq %rsi, -0x8(%rsp)
vpxor %xmm3, %xmm3, %xmm3
cmpl $0x100, %edi # imm = 0x100
jl 0x33718
shrl $0x8, %edi
leaq 0x4(%rcx), %r11
leaq 0x8(%rcx), %rdx
movq -0x10(%rsp), %rax
leaq 0x4(%rax), %r8
vxorps %xmm2, %xmm2, %xmm2
xorl %r10d, %r10d
vpbroadcastb 0x2204d(%rip), %ymm0 # 0x5561c
vbroadcasti128 0x21918(%rip), %ymm1 # ymm1 = mem[0,1,0,1]
movq %r10, %rax
shlq $0x7, %rax
leaq (%rax,%r10,8), %rax
leaq (%rcx,%rax), %r15
imulq $0x124, %r10, %r14 # imm = 0x124
addq -0x10(%rsp), %r14
movzwl 0x2(%rcx,%rax), %ebp
movq $-0x2, %r12
xorl %r13d, %r13d
movq %r11, %rax
vpxor %xmm3, %xmm3, %xmm3
vpxor %xmm4, %xmm4, %xmm4
vmovdqu (%rdx,%r13), %xmm5
vmovdqu 0x10(%rdx,%r13), %xmm6
vmovdqu (%r8,%r13,2), %ymm7
vmovdqu 0x20(%r8,%r13,2), %ymm8
vpsrlw $0x4, %xmm5, %xmm9
vpsrlw $0x4, %xmm6, %xmm10
vinserti128 $0x1, %xmm9, %ymm5, %ymm5
vpand %ymm0, %ymm5, %ymm5
vpshufb %ymm5, %ymm1, %ymm5
vpsignb %ymm5, %ymm5, %ymm9
vpsignb %ymm5, %ymm7, %ymm5
vpmaddubsw %ymm5, %ymm9, %ymm5
vinserti128 $0x1, %xmm10, %ymm6, %ymm6
vpand %ymm0, %ymm6, %ymm6
vpshufb %ymm6, %ymm1, %ymm6
vpsignb %ymm6, %ymm6, %ymm7
vpsignb %ymm6, %ymm8, %ymm6
vpmaddubsw %ymm6, %ymm7, %ymm6
movzbl (%rax), %ebx
movl %ebx, %esi
andl $0xf, %esi
movzwl %bp, %ebp
movl %ebp, %r9d
shll $0x4, %r9d
andl $0x30, %r9d
addl %r9d, %esi
addl $-0x20, %esi
shrl $0x4, %ebx
movl %ebp, %r9d
andl $0xc, %r9d
leal (%rbx,%r9,4), %r9d
addl $-0x20, %r9d
shrl $0x4, %ebp
vpbroadcastw %esi, %ymm7
vpmaddwd %ymm7, %ymm5, %ymm5
vpaddd %ymm3, %ymm5, %ymm3
vpbroadcastw %r9d, %ymm5
vpmaddwd %ymm5, %ymm6, %ymm5
vpaddd %ymm4, %ymm5, %ymm4
addq $0x2, %r12
incq %rax
addq $0x20, %r13
cmpq $0x6, %r12
jb 0x3360d
movzwl (%r15), %eax
movq 0x31896(%rip), %rsi # 0x64f70
vmovss (%rsi,%rax,4), %xmm5
vmulss (%r14), %xmm5, %xmm5
vbroadcastss %xmm5, %ymm5
vpaddd %ymm4, %ymm3, %ymm3
vcvtdq2ps %ymm3, %ymm3
vfmadd213ps %ymm2, %ymm5, %ymm3 # ymm3 = (ymm5 * ymm3) + ymm2
incq %r10
movl $0x88, %eax
addq %rax, %r11
addq %rax, %rdx
addq $0x124, %r8 # imm = 0x124
vmovaps %ymm3, %ymm2
cmpq %rdi, %r10
jne 0x335d8
vextracti128 $0x1, %ymm3, %xmm0
vaddps %xmm3, %xmm0, %xmm0
vshufpd $0x1, %xmm0, %xmm0, %xmm1 # xmm1 = xmm0[1,0]
vaddps %xmm1, %xmm0, %xmm0
vhaddps %xmm0, %xmm0, %xmm0
movq -0x8(%rsp), %rax
vmovss %xmm0, (%rax)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
vzeroupper
retq
| ggml_vec_dot_iq4_xs_q8_K:
push rbp
push r15
push r14
push r13
push r12
push rbx
mov [rsp+30h+var_40], r9
mov [rsp+30h+var_38], rsi
vpxor xmm3, xmm3, xmm3
cmp edi, 100h
jl loc_33718
shr edi, 8
lea r11, [rcx+4]
lea rdx, [rcx+8]
mov rax, [rsp+30h+var_40]
lea r8, [rax+4]
vxorps xmm2, xmm2, xmm2
xor r10d, r10d
vpbroadcastb ymm0, cs:byte_5561C
vbroadcasti128 ymm1, cs:kvalues_iq4nl
loc_335D8:
mov rax, r10
shl rax, 7
lea rax, [rax+r10*8]
lea r15, [rcx+rax]
imul r14, r10, 124h
add r14, [rsp+30h+var_40]
movzx ebp, word ptr [rcx+rax+2]
mov r12, 0FFFFFFFFFFFFFFFEh
xor r13d, r13d
mov rax, r11
vpxor xmm3, xmm3, xmm3
vpxor xmm4, xmm4, xmm4
loc_3360D:
vmovdqu xmm5, xmmword ptr [rdx+r13]
vmovdqu xmm6, xmmword ptr [rdx+r13+10h]
vmovdqu ymm7, ymmword ptr [r8+r13*2]
vmovdqu ymm8, ymmword ptr [r8+r13*2+20h]
vpsrlw xmm9, xmm5, 4
vpsrlw xmm10, xmm6, 4
vinserti128 ymm5, ymm5, xmm9, 1
vpand ymm5, ymm5, ymm0
vpshufb ymm5, ymm1, ymm5
vpsignb ymm9, ymm5, ymm5
vpsignb ymm5, ymm7, ymm5
vpmaddubsw ymm5, ymm9, ymm5
vinserti128 ymm6, ymm6, xmm10, 1
vpand ymm6, ymm6, ymm0
vpshufb ymm6, ymm1, ymm6
vpsignb ymm7, ymm6, ymm6
vpsignb ymm6, ymm8, ymm6
vpmaddubsw ymm6, ymm7, ymm6
movzx ebx, byte ptr [rax]
mov esi, ebx
and esi, 0Fh
movzx ebp, bp
mov r9d, ebp
shl r9d, 4
and r9d, 30h
add esi, r9d
add esi, 0FFFFFFE0h
shr ebx, 4
mov r9d, ebp
and r9d, 0Ch
lea r9d, [rbx+r9*4]
add r9d, 0FFFFFFE0h
shr ebp, 4
vpbroadcastw ymm7, esi
vpmaddwd ymm5, ymm5, ymm7
vpaddd ymm3, ymm5, ymm3
vpbroadcastw ymm5, r9d
vpmaddwd ymm5, ymm6, ymm5
vpaddd ymm4, ymm5, ymm4
add r12, 2
inc rax
add r13, 20h ; ' '
cmp r12, 6
jb loc_3360D
movzx eax, word ptr [r15]
mov rsi, cs:ggml_table_f32_f16_ptr
vmovss xmm5, dword ptr [rsi+rax*4]
vmulss xmm5, xmm5, dword ptr [r14]
vbroadcastss ymm5, xmm5
vpaddd ymm3, ymm3, ymm4
vcvtdq2ps ymm3, ymm3
vfmadd213ps ymm3, ymm5, ymm2
inc r10
mov eax, 88h
add r11, rax
add rdx, rax
add r8, 124h
vmovaps ymm2, ymm3
cmp r10, rdi
jnz loc_335D8
loc_33718:
vextracti128 xmm0, ymm3, 1
vaddps xmm0, xmm0, xmm3
vshufpd xmm1, xmm0, xmm0, 1
vaddps xmm0, xmm0, xmm1
vhaddps xmm0, xmm0, xmm0
mov rax, [rsp+30h+var_38]
vmovss dword ptr [rax], xmm0
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
vzeroupper
retn
| long long ggml_vec_dot_iq4_xs_q8_K(
int a1,
long long a2,
double a3,
double a4,
__m128 _XMM2,
__m128 _XMM3,
__m128 _XMM4,
long long a8,
long long a9,
long long a10,
long long a11)
{
long long v15; // rdi
_BYTE *v16; // r11
long long v20; // r10
unsigned __int16 *v23; // r15
int v24; // ebp
unsigned long long v25; // r12
_BYTE *v27; // rax
long long result; // rax
__asm { vpxor xmm3, xmm3, xmm3 }
if ( a1 >= 256 )
{
v15 = (unsigned int)a1 >> 8;
v16 = (_BYTE *)(a9 + 4);
_RDX = a9 + 8;
_R8 = a11 + 4;
__asm { vxorps xmm2, xmm2, xmm2 }
v20 = 0LL;
__asm
{
vpbroadcastb ymm0, cs:byte_5561C
vbroadcasti128 ymm1, cs:kvalues_iq4nl
}
do
{
v23 = (unsigned __int16 *)(a9 + 136 * v20);
LOWORD(v24) = v23[1];
v25 = -2LL;
_R13 = 0LL;
v27 = v16;
__asm
{
vpxor xmm3, xmm3, xmm3
vpxor xmm4, xmm4, xmm4
}
do
{
__asm
{
vmovdqu xmm5, xmmword ptr [rdx+r13]
vmovdqu xmm6, xmmword ptr [rdx+r13+10h]
vmovdqu ymm7, ymmword ptr [r8+r13*2]
vmovdqu ymm8, ymmword ptr [r8+r13*2+20h]
vpsrlw xmm9, xmm5, 4
vpsrlw xmm10, xmm6, 4
vinserti128 ymm5, ymm5, xmm9, 1
vpand ymm5, ymm5, ymm0
vpshufb ymm5, ymm1, ymm5
vpsignb ymm9, ymm5, ymm5
vpsignb ymm5, ymm7, ymm5
vpmaddubsw ymm5, ymm9, ymm5
vinserti128 ymm6, ymm6, xmm10, 1
vpand ymm6, ymm6, ymm0
vpshufb ymm6, ymm1, ymm6
vpsignb ymm7, ymm6, ymm6
vpsignb ymm6, ymm8, ymm6
vpmaddubsw ymm6, ymm7, ymm6
}
_ESI = ((16 * (_BYTE)v24) & 0x30) + (*v27 & 0xF) - 32;
_R9D = ((unsigned __int8)*v27 >> 4) + 4 * (v24 & 0xC) - 32;
v24 = (unsigned __int16)v24 >> 4;
__asm
{
vpbroadcastw ymm7, esi
vpmaddwd ymm5, ymm5, ymm7
vpaddd ymm3, ymm5, ymm3
vpbroadcastw ymm5, r9d
vpmaddwd ymm5, ymm6, ymm5
vpaddd ymm4, ymm5, ymm4
}
v25 += 2LL;
++v27;
_R13 += 32LL;
}
while ( v25 < 6 );
_RAX = *v23;
_RSI = &ggml_table_f32_f16;
__asm
{
vmovss xmm5, dword ptr [rsi+rax*4]
vmulss xmm5, xmm5, dword ptr [r14]
vbroadcastss ymm5, xmm5
vpaddd ymm3, ymm3, ymm4
vcvtdq2ps ymm3, ymm3
vfmadd213ps ymm3, ymm5, ymm2
}
++v20;
v16 += 136;
_RDX += 136LL;
_R8 += 292LL;
__asm { vmovaps ymm2, ymm3 }
}
while ( v20 != v15 );
}
__asm
{
vextracti128 xmm0, ymm3, 1
vaddps xmm0, xmm0, xmm3
vshufpd xmm1, xmm0, xmm0, 1
vaddps xmm0, xmm0, xmm1
vhaddps xmm0, xmm0, xmm0
}
result = a2;
__asm
{
vmovss dword ptr [rax], xmm0
vzeroupper
}
return result;
}
| ggml_vec_dot_iq4_xs_q8_K:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV qword ptr [RSP + -0x10],R9
MOV qword ptr [RSP + -0x8],RSI
VPXOR XMM3,XMM3,XMM3
CMP EDI,0x100
JL 0x00133718
SHR EDI,0x8
LEA R11,[RCX + 0x4]
LEA RDX,[RCX + 0x8]
MOV RAX,qword ptr [RSP + -0x10]
LEA R8,[RAX + 0x4]
VXORPS XMM2,XMM2,XMM2
XOR R10D,R10D
VPBROADCASTB YMM0,byte ptr [0x0015561c]
VBROADCASTI128 YMM1,xmmword ptr [0x00154ef0]
LAB_001335d8:
MOV RAX,R10
SHL RAX,0x7
LEA RAX,[RAX + R10*0x8]
LEA R15,[RCX + RAX*0x1]
IMUL R14,R10,0x124
ADD R14,qword ptr [RSP + -0x10]
MOVZX EBP,word ptr [RCX + RAX*0x1 + 0x2]
MOV R12,-0x2
XOR R13D,R13D
MOV RAX,R11
VPXOR XMM3,XMM3,XMM3
VPXOR XMM4,XMM4,XMM4
LAB_0013360d:
VMOVDQU XMM5,xmmword ptr [RDX + R13*0x1]
VMOVDQU XMM6,xmmword ptr [RDX + R13*0x1 + 0x10]
VMOVDQU YMM7,ymmword ptr [R8 + R13*0x2]
VMOVDQU YMM8,ymmword ptr [R8 + R13*0x2 + 0x20]
VPSRLW XMM9,XMM5,0x4
VPSRLW XMM10,XMM6,0x4
VINSERTI128 YMM5,YMM5,XMM9,0x1
VPAND YMM5,YMM5,YMM0
VPSHUFB YMM5,YMM1,YMM5
VPSIGNB YMM9,YMM5,YMM5
VPSIGNB YMM5,YMM7,YMM5
VPMADDUBSW YMM5,YMM9,YMM5
VINSERTI128 YMM6,YMM6,XMM10,0x1
VPAND YMM6,YMM6,YMM0
VPSHUFB YMM6,YMM1,YMM6
VPSIGNB YMM7,YMM6,YMM6
VPSIGNB YMM6,YMM8,YMM6
VPMADDUBSW YMM6,YMM7,YMM6
MOVZX EBX,byte ptr [RAX]
MOV ESI,EBX
AND ESI,0xf
MOVZX EBP,BP
MOV R9D,EBP
SHL R9D,0x4
AND R9D,0x30
ADD ESI,R9D
ADD ESI,-0x20
SHR EBX,0x4
MOV R9D,EBP
AND R9D,0xc
LEA R9D,[RBX + R9*0x4]
ADD R9D,-0x20
SHR EBP,0x4
VPBROADCASTW YMM7
VPMADDWD YMM5,YMM5,YMM7
VPADDD YMM3,YMM5,YMM3
VPBROADCASTW YMM5
VPMADDWD YMM5,YMM6,YMM5
VPADDD YMM4,YMM5,YMM4
ADD R12,0x2
INC RAX
ADD R13,0x20
CMP R12,0x6
JC 0x0013360d
MOVZX EAX,word ptr [R15]
MOV RSI,qword ptr [0x00164f70]
VMOVSS XMM5,dword ptr [RSI + RAX*0x4]
VMULSS XMM5,XMM5,dword ptr [R14]
VBROADCASTSS YMM5,XMM5
VPADDD YMM3,YMM3,YMM4
VCVTDQ2PS YMM3,YMM3
VFMADD213PS YMM3,YMM5,YMM2
INC R10
MOV EAX,0x88
ADD R11,RAX
ADD RDX,RAX
ADD R8,0x124
VMOVAPS YMM2,YMM3
CMP R10,RDI
JNZ 0x001335d8
LAB_00133718:
VEXTRACTI128 XMM0,YMM3,0x1
VADDPS XMM0,XMM0,XMM3
VSHUFPD XMM1,XMM0,XMM0,0x1
VADDPS XMM0,XMM0,XMM1
VHADDPS XMM0,XMM0,XMM0
MOV RAX,qword ptr [RSP + -0x8]
VMOVSS dword ptr [RAX],XMM0
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
VZEROUPPER
RET
|
void ggml_vec_dot_iq4_xs_q8_K
(uint param_1,int4 *param_2,int8 param_3,long param_4,int8 param_5,
long param_6)
{
float fVar1;
long lVar2;
long lVar3;
ulong uVar4;
ulong uVar5;
long lVar6;
int1 auVar7 [32];
int1 auVar8 [32];
int1 auVar9 [16];
int1 auVar10 [32];
int1 auVar11 [32];
int1 auVar12 [16];
int1 auVar13 [64];
int1 auVar14 [64];
int1 auVar15 [32];
int1 auVar16 [32];
int1 auVar17 [16];
int1 auVar18 [16];
auVar7 = SUB6432(ZEXT1664((int1 [16])0x0),0);
if (0xff < (int)param_1) {
lVar2 = param_4 + 8;
lVar3 = param_6 + 4;
auVar12 = ZEXT816(0) << 0x40;
uVar4 = 0;
auVar10[1] = DAT_0015561c;
auVar10[0] = DAT_0015561c;
auVar10[2] = DAT_0015561c;
auVar10[3] = DAT_0015561c;
auVar10[4] = DAT_0015561c;
auVar10[5] = DAT_0015561c;
auVar10[6] = DAT_0015561c;
auVar10[7] = DAT_0015561c;
auVar10[8] = DAT_0015561c;
auVar10[9] = DAT_0015561c;
auVar10[10] = DAT_0015561c;
auVar10[0xb] = DAT_0015561c;
auVar10[0xc] = DAT_0015561c;
auVar10[0xd] = DAT_0015561c;
auVar10[0xe] = DAT_0015561c;
auVar10[0xf] = DAT_0015561c;
auVar10[0x10] = DAT_0015561c;
auVar10[0x11] = DAT_0015561c;
auVar10[0x12] = DAT_0015561c;
auVar10[0x13] = DAT_0015561c;
auVar10[0x14] = DAT_0015561c;
auVar10[0x15] = DAT_0015561c;
auVar10[0x16] = DAT_0015561c;
auVar10[0x17] = DAT_0015561c;
auVar10[0x18] = DAT_0015561c;
auVar10[0x19] = DAT_0015561c;
auVar10[0x1a] = DAT_0015561c;
auVar10[0x1b] = DAT_0015561c;
auVar10[0x1c] = DAT_0015561c;
auVar10[0x1d] = DAT_0015561c;
auVar10[0x1e] = DAT_0015561c;
auVar10[0x1f] = DAT_0015561c;
auVar11._16_16_ = kvalues_iq4nl;
auVar11._0_16_ = kvalues_iq4nl;
do {
uVar5 = 0xfffffffffffffffe;
lVar6 = 0;
auVar13 = ZEXT1664((int1 [16])0x0);
auVar14 = ZEXT1664((int1 [16])0x0);
do {
auVar9 = *(int1 (*) [16])(lVar2 + 0x10 + lVar6);
auVar17 = vpsrlw_avx(*(int1 (*) [16])(lVar2 + lVar6),4);
auVar18 = vpsrlw_avx(auVar9,4);
auVar7._0_16_ = ZEXT116(0) * auVar17 + ZEXT116(1) * *(int1 (*) [16])(lVar2 + lVar6);
auVar7._16_16_ = ZEXT116(0) * SUB4816((int1 [48])0x0,0) + ZEXT116(1) * auVar17;
auVar7 = vpand_avx2(auVar7,auVar10);
auVar7 = vpshufb_avx2(auVar11,auVar7);
auVar8 = vpsignb_avx2(auVar7,auVar7);
auVar7 = vpsignb_avx2(*(int1 (*) [32])(lVar3 + lVar6 * 2),auVar7);
auVar8 = vpmaddubsw_avx2(auVar8,auVar7);
auVar16._0_16_ = ZEXT116(0) * auVar18 + ZEXT116(1) * auVar9;
auVar16._16_16_ = ZEXT116(0) * SUB4816((int1 [48])0x0,0) + ZEXT116(1) * auVar18;
auVar7 = vpand_avx2(auVar16,auVar10);
auVar7 = vpshufb_avx2(auVar11,auVar7);
auVar16 = vpsignb_avx2(auVar7,auVar7);
auVar7 = vpsignb_avx2(*(int1 (*) [32])(lVar3 + 0x20 + lVar6 * 2),auVar7);
auVar16 = vpmaddubsw_avx2(auVar16,auVar7);
auVar7 = vpbroadcastw_avx512vl();
auVar7 = vpmaddwd_avx2(auVar8,auVar7);
auVar7 = vpaddd_avx2(auVar7,auVar13._0_32_);
auVar13 = ZEXT3264(auVar7);
auVar8 = vpbroadcastw_avx512vl();
auVar8 = vpmaddwd_avx2(auVar16,auVar8);
auVar8 = vpaddd_avx2(auVar8,auVar14._0_32_);
auVar14 = ZEXT3264(auVar8);
uVar5 = uVar5 + 2;
lVar6 = lVar6 + 0x20;
} while (uVar5 < 6);
fVar1 = *(float *)(PTR_ggml_table_f32_f16_00164f70 +
(ulong)*(ushort *)(param_4 + uVar4 * 0x88) * 4) *
*(float *)(uVar4 * 0x124 + param_6);
auVar15._4_4_ = fVar1;
auVar15._0_4_ = fVar1;
auVar15._8_4_ = fVar1;
auVar15._12_4_ = fVar1;
auVar15._16_4_ = fVar1;
auVar15._20_4_ = fVar1;
auVar15._24_4_ = fVar1;
auVar15._28_4_ = fVar1;
auVar7 = vpaddd_avx2(auVar7,auVar8);
auVar7 = vcvtdq2ps_avx(auVar7);
auVar12 = vfmadd213ps_fma(auVar7,auVar15,ZEXT1632(auVar12));
auVar7 = ZEXT1632(auVar12);
uVar4 = uVar4 + 1;
lVar2 = lVar2 + 0x88;
lVar3 = lVar3 + 0x124;
} while (uVar4 != param_1 >> 8);
}
auVar9._0_4_ = auVar7._16_4_ + auVar7._0_4_;
auVar9._4_4_ = auVar7._20_4_ + auVar7._4_4_;
auVar9._8_4_ = auVar7._24_4_ + auVar7._8_4_;
auVar9._12_4_ = auVar7._28_4_ + auVar7._12_4_;
auVar12 = vshufpd_avx(auVar9,auVar9,1);
auVar17._0_4_ = auVar9._0_4_ + auVar12._0_4_;
auVar17._4_4_ = auVar9._4_4_ + auVar12._4_4_;
auVar17._8_4_ = auVar9._8_4_ + auVar12._8_4_;
auVar17._12_4_ = auVar9._12_4_ + auVar12._12_4_;
auVar12 = vhaddps_avx(auVar17,auVar17);
*param_2 = auVar12._0_4_;
return;
}
| |
40,518 | mi_rec_unpack | eloqsql/storage/myisam/mi_dynrec.c | size_t _mi_rec_unpack(register MI_INFO *info, register uchar *to, uchar *from,
ulong found_length)
{
uint flag,bit,length,rec_length,min_pack_length;
enum en_fieldtype type;
uchar *from_end,*to_end,*packpos;
reg3 MI_COLUMNDEF *rec,*end_field;
DBUG_ENTER("_mi_rec_unpack");
to_end=to + info->s->base.reclength;
from_end=from+found_length;
flag= (uchar) *from; bit=1; packpos=from;
if (found_length < info->s->base.min_pack_length)
goto err;
from+= info->s->base.pack_bits;
min_pack_length=info->s->base.min_pack_length - info->s->base.pack_bits;
for (rec=info->s->rec , end_field=rec+info->s->base.fields ;
rec < end_field ; to+= rec_length, rec++)
{
rec_length=rec->length;
if ((type = (enum en_fieldtype) rec->type) != FIELD_NORMAL &&
(type != FIELD_CHECK))
{
if (type == FIELD_VARCHAR)
{
uint pack_length= HA_VARCHAR_PACKLENGTH(rec_length-1);
if (pack_length == 1)
{
length= (uint) *(uchar*) from;
if (length > rec_length-1)
goto err;
*to= *from++;
}
else
{
get_key_length(length, from);
if (length > rec_length-2)
goto err;
int2store(to,length);
}
if (from+length > from_end)
goto err;
memcpy(to+pack_length, from, length);
from+= length;
min_pack_length--;
continue;
}
if (flag & bit)
{
if (type == FIELD_BLOB || type == FIELD_SKIP_ZERO)
bzero((uchar*) to,rec_length);
else if (type == FIELD_SKIP_ENDSPACE ||
type == FIELD_SKIP_PRESPACE)
{
if (rec->length > 255 && *from & 128)
{
if (from + 1 >= from_end)
goto err;
length= (*from & 127)+ ((uint) (uchar) *(from+1) << 7); from+=2;
}
else
{
if (from == from_end)
goto err;
length= (uchar) *from++;
}
min_pack_length--;
if (length >= rec_length ||
min_pack_length + length > (uint) (from_end - from))
goto err;
if (type == FIELD_SKIP_ENDSPACE)
{
memcpy(to,(uchar*) from,(size_t) length);
bfill((uchar*) to+length,rec_length-length,' ');
}
else
{
bfill((uchar*) to,rec_length-length,' ');
memcpy(to+rec_length-length,(uchar*) from,(size_t) length);
}
from+=length;
}
}
else if (type == FIELD_BLOB)
{
uint size_length=rec_length- portable_sizeof_char_ptr;
ulong blob_length=_mi_calc_blob_length(size_length,from);
ulong from_left= (ulong) (from_end - from);
if (from_left < size_length ||
from_left - size_length < blob_length ||
from_left - size_length - blob_length < min_pack_length)
goto err;
memcpy(to, from, (size_t) size_length);
from+=size_length;
memcpy(to+size_length, &from, sizeof(char*));
from+=blob_length;
}
else
{
if (type == FIELD_SKIP_ENDSPACE || type == FIELD_SKIP_PRESPACE)
min_pack_length--;
if (min_pack_length + rec_length > (uint) (from_end - from))
goto err;
memcpy(to,(uchar*) from,(size_t) rec_length); from+=rec_length;
}
if ((bit= bit << 1) >= 256)
{
flag= (uchar) *++packpos; bit=1;
}
}
else
{
if (min_pack_length > (uint) (from_end - from))
goto err;
min_pack_length-=rec_length;
memcpy(to, (uchar*) from, (size_t) rec_length);
from+=rec_length;
}
}
if (info->s->calc_checksum)
from++;
if (to == to_end && from == from_end && (bit == 1 || !(flag & ~(bit-1))))
DBUG_RETURN(found_length);
err:
my_errno= HA_ERR_WRONG_IN_RECORD;
DBUG_PRINT("error",("to_end: %p -> %p from_end: %p -> %p",
to, to_end, from, from_end));
DBUG_DUMP("from",(uchar*) info->rec_buff,info->s->base.min_pack_length);
DBUG_RETURN(MY_FILE_ERROR);
} | O3 | c | mi_rec_unpack:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, -0x58(%rbp)
movq %rdi, -0x70(%rbp)
movq (%rdi), %rax
movq 0x150(%rax), %r15
movq %rcx, -0x60(%rbp)
cmpq %rcx, %r15
jbe 0x79faf
callq 0xa2f56
movl $0x7f, (%rax)
movq $-0x1, -0x60(%rbp)
movq -0x60(%rbp), %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsi, %r14
movq 0x140(%rax), %rsi
addq %r14, %rsi
movq -0x60(%rbp), %rcx
movq -0x58(%rbp), %rdx
addq %rdx, %rcx
movq %rcx, -0x38(%rbp)
movzbl (%rdx), %ecx
movl %ecx, -0x44(%rbp)
movl 0x18c(%rax), %ecx
leaq (%rdx,%rcx), %r13
movq 0x168(%rax), %rdx
testq %rdx, %rdx
jle 0x7a2ec
movq %rsi, -0x68(%rbp)
movq 0x230(%rax), %rbx
leaq (%rdx,%rdx,2), %rax
shlq $0x4, %rax
addq %rbx, %rax
movq %rax, -0x78(%rbp)
subl %ecx, %r15d
movl $0x1, -0x2c(%rbp)
movzwl 0x4(%rbx), %r12d
movl (%rbx), %eax
testl %eax, %eax
je 0x7a05d
cmpl $0x9, %eax
je 0x7a05d
cmpl $0x8, %eax
jne 0x7a086
leal -0x1(%r12), %edx
cmpl $0x100, %edx # imm = 0x100
movl $0x2, %edi
sbbq $0x0, %rdi
movb (%r13), %cl
movzbl %cl, %eax
cmpl $0xff, %edx
ja 0x7a0a8
cmpl %eax, %edx
jb 0x79f89
incq %r13
movb %cl, (%r14)
movq %r13, %rsi
jmp 0x7a19b
movq -0x38(%rbp), %rax
subl %r13d, %eax
cmpl %eax, %r15d
ja 0x79f89
subl %r12d, %r15d
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x29080
addq %r12, %r13
jmp 0x7a2b5
movl -0x2c(%rbp), %ecx
testl %ecx, -0x44(%rbp)
je 0x7a0b9
leal -0x3(%rax), %ecx
cmpl $0x1, %ecx
ja 0x7a0ea
movq %r14, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x292a0
jmp 0x7a28b
cmpb $-0x1, %cl
je 0x7a176
incq %r13
jmp 0x7a186
cmpl $0x4, %eax
jne 0x7a1bb
leal -0x9(%r12), %eax
cmpl $0x3, %eax
ja 0x7a239
leaq 0x68d89(%rip), %rcx # 0xe2e60
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movzbl (%r13), %r8d
jmp 0x7a23c
cmpl $0x2, %eax
ja 0x7a28b
cmpl $0x100, %r12d # imm = 0x100
jb 0x7a109
movzbl (%r13), %ecx
testb %cl, %cl
js 0x7a2c8
cmpq -0x38(%rbp), %r13
je 0x79f89
movzbl (%r13), %esi
incq %r13
movl %r12d, %r8d
subl %esi, %r8d
jbe 0x79f89
decl %r15d
leal (%rsi,%r15), %ecx
movq -0x38(%rbp), %rdx
subl %r13d, %edx
cmpl %edx, %ecx
ja 0x79f89
cmpl $0x1, %eax
jne 0x7a1ed
movl %esi, %edx
movq %rdx, -0x40(%rbp)
movq %r14, %rdi
movq %r13, %rsi
movq %r8, -0x50(%rbp)
callq 0x29080
movq -0x40(%rbp), %rax
leaq (%r14,%rax), %rdi
movl $0x20, %esi
movq -0x50(%rbp), %rdx
callq 0x292a0
jmp 0x7a287
movzwl 0x1(%r13), %eax
rolw $0x8, %ax
movzwl %ax, %eax
addq $0x3, %r13
movq %r13, %rsi
movl %r12d, %ecx
addl $-0x2, %ecx
cmpl %ecx, %eax
ja 0x79f89
movw %ax, (%r14)
movl %eax, %edx
leaq (%rsi,%rdx), %r13
cmpq -0x38(%rbp), %r13
ja 0x79f89
addq %r14, %rdi
callq 0x29080
decl %r15d
jmp 0x7a2b5
cmpl $0x3, %eax
sbbl $0x0, %r15d
movl %r12d, %eax
addl %r15d, %eax
movq -0x38(%rbp), %rcx
subl %r13d, %ecx
cmpl %ecx, %eax
ja 0x79f89
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x29080
addq %r12, %r13
jmp 0x7a28b
movq %r14, %rdi
movq %rsi, -0x40(%rbp)
movl $0x20, %esi
movq %r8, %rdx
callq 0x292a0
leaq (%r14,%r12), %rdi
movl -0x40(%rbp), %edx
subq %rdx, %rdi
movq %r13, %rsi
movq %rdx, -0x40(%rbp)
callq 0x29080
jmp 0x7a287
movzwl (%r13), %eax
movzbl 0x2(%r13), %r8d
shll $0x10, %r8d
orq %rax, %r8
jmp 0x7a23c
movl (%r13), %r8d
jmp 0x7a23c
movzwl (%r13), %r8d
jmp 0x7a23c
xorl %r8d, %r8d
movl %r12d, %ecx
addl $-0x8, %ecx
movq -0x38(%rbp), %rax
subq %r13, %rax
movl %ecx, %edx
subq %rdx, %rax
jb 0x79f89
subq %r8, %rax
jb 0x79f89
movl %r15d, %ecx
cmpq %rcx, %rax
jb 0x79f89
movq %r14, %rdi
movq %r13, %rsi
movq %r8, -0x40(%rbp)
movq %rdx, -0x50(%rbp)
callq 0x29080
movq -0x50(%rbp), %rax
addq %rax, %r13
movq %r13, (%r14,%rax)
addq -0x40(%rbp), %r13
movl -0x2c(%rbp), %eax
addl %eax, %eax
cmpl $0x100, %eax # imm = 0x100
jae 0x7a29c
movl %eax, -0x2c(%rbp)
jmp 0x7a2b5
movq -0x58(%rbp), %rcx
movzbl 0x1(%rcx), %eax
movl %eax, -0x44(%rbp)
incq %rcx
movq %rcx, -0x58(%rbp)
movl $0x1, -0x2c(%rbp)
addq %r12, %r14
addq $0x30, %rbx
cmpq -0x78(%rbp), %rbx
jb 0x7a00f
jmp 0x7a2f5
leaq 0x1(%r13), %rdx
cmpq -0x38(%rbp), %rdx
jae 0x79f89
andl $0x7f, %ecx
movzbl 0x1(%r13), %esi
shll $0x7, %esi
orl %ecx, %esi
addq $0x2, %r13
jmp 0x7a11b
movl $0x1, -0x2c(%rbp)
jmp 0x7a300
movq -0x70(%rbp), %rax
movq (%rax), %rax
movq -0x68(%rbp), %rsi
cmpq $0x1, 0x2c8(%rax)
sbbq $-0x1, %r13
cmpq %rsi, %r14
jne 0x79f89
cmpq -0x38(%rbp), %r13
jne 0x79f89
movl -0x2c(%rbp), %eax
cmpl $0x1, %eax
je 0x79f9c
negl %eax
testl %eax, -0x44(%rbp)
jne 0x79f89
jmp 0x79f9c
| _mi_rec_unpack:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov [rbp+var_58], rdx
mov [rbp+var_70], rdi
mov rax, [rdi]
mov r15, [rax+150h]
mov [rbp+var_60], rcx
cmp r15, rcx
jbe short loc_79FAF
loc_79F89:
call _my_thread_var
mov dword ptr [rax], 7Fh
mov [rbp+var_60], 0FFFFFFFFFFFFFFFFh
loc_79F9C:
mov rax, [rbp+var_60]
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_79FAF:
mov r14, rsi
mov rsi, [rax+140h]
add rsi, r14
mov rcx, [rbp+var_60]
mov rdx, [rbp+var_58]
add rcx, rdx
mov [rbp+var_38], rcx
movzx ecx, byte ptr [rdx]
mov [rbp+var_44], ecx
mov ecx, [rax+18Ch]
lea r13, [rdx+rcx]
mov rdx, [rax+168h]
test rdx, rdx
jle loc_7A2EC
mov [rbp+var_68], rsi
mov rbx, [rax+230h]
lea rax, [rdx+rdx*2]
shl rax, 4
add rax, rbx
mov [rbp+var_78], rax
sub r15d, ecx
mov [rbp+var_2C], 1
loc_7A00F:
movzx r12d, word ptr [rbx+4]
mov eax, [rbx]
test eax, eax
jz short loc_7A05D
cmp eax, 9
jz short loc_7A05D
cmp eax, 8
jnz short loc_7A086
lea edx, [r12-1]
cmp edx, 100h
mov edi, 2
sbb rdi, 0
mov cl, [r13+0]
movzx eax, cl
cmp edx, 0FFh
ja short loc_7A0A8
cmp edx, eax
jb loc_79F89
inc r13
mov [r14], cl
mov rsi, r13
jmp loc_7A19B
loc_7A05D:
mov rax, [rbp+var_38]
sub eax, r13d
cmp r15d, eax
ja loc_79F89
sub r15d, r12d
mov rdi, r14
mov rsi, r13
mov rdx, r12
call _memcpy
add r13, r12
jmp loc_7A2B5
loc_7A086:
mov ecx, [rbp+var_2C]
test [rbp+var_44], ecx
jz short loc_7A0B9
lea ecx, [rax-3]
cmp ecx, 1
ja short loc_7A0EA
mov rdi, r14
xor esi, esi
mov rdx, r12
call _memset
jmp loc_7A28B
loc_7A0A8:
cmp cl, 0FFh
jz loc_7A176
inc r13
jmp loc_7A186
loc_7A0B9:
cmp eax, 4
jnz loc_7A1BB
lea eax, [r12-9]; switch 4 cases
cmp eax, 3
ja def_7A0DE; jumptable 000000000007A0DE default case
lea rcx, jpt_7A0DE
movsxd rax, ds:(jpt_7A0DE - 0E2E60h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_7A0E0:
movzx r8d, byte ptr [r13+0]; jumptable 000000000007A0DE case 9
jmp loc_7A23C
loc_7A0EA:
cmp eax, 2
ja loc_7A28B
cmp r12d, 100h
jb short loc_7A109
movzx ecx, byte ptr [r13+0]
test cl, cl
js loc_7A2C8
loc_7A109:
cmp r13, [rbp+var_38]
jz loc_79F89
movzx esi, byte ptr [r13+0]
inc r13
loc_7A11B:
mov r8d, r12d
sub r8d, esi
jbe loc_79F89
dec r15d
lea ecx, [rsi+r15]
mov rdx, [rbp+var_38]
sub edx, r13d
cmp ecx, edx
ja loc_79F89
cmp eax, 1
jnz loc_7A1ED
mov edx, esi
mov [rbp+var_40], rdx
mov rdi, r14
mov rsi, r13
mov [rbp+var_50], r8
call _memcpy
mov rax, [rbp+var_40]
lea rdi, [r14+rax]
mov esi, 20h ; ' '
mov rdx, [rbp+var_50]
call _memset
jmp loc_7A287
loc_7A176:
movzx eax, word ptr [r13+1]
rol ax, 8
movzx eax, ax
add r13, 3
loc_7A186:
mov rsi, r13
mov ecx, r12d
add ecx, 0FFFFFFFEh
cmp eax, ecx
ja loc_79F89
mov [r14], ax
loc_7A19B:
mov edx, eax
lea r13, [rsi+rdx]
cmp r13, [rbp+var_38]
ja loc_79F89
add rdi, r14
call _memcpy
dec r15d
jmp loc_7A2B5
loc_7A1BB:
cmp eax, 3
sbb r15d, 0
mov eax, r12d
add eax, r15d
mov rcx, [rbp+var_38]
sub ecx, r13d
cmp eax, ecx
ja loc_79F89
mov rdi, r14
mov rsi, r13
mov rdx, r12
call _memcpy
add r13, r12
jmp loc_7A28B
loc_7A1ED:
mov rdi, r14
mov [rbp+var_40], rsi
mov esi, 20h ; ' '
mov rdx, r8
call _memset
lea rdi, [r14+r12]
mov edx, dword ptr [rbp+var_40]
sub rdi, rdx
mov rsi, r13
mov [rbp+var_40], rdx
call _memcpy
jmp short loc_7A287
loc_7A219:
movzx eax, word ptr [r13+0]; jumptable 000000000007A0DE case 11
movzx r8d, byte ptr [r13+2]
shl r8d, 10h
or r8, rax
jmp short loc_7A23C
loc_7A22C:
mov r8d, [r13+0]; jumptable 000000000007A0DE case 12
jmp short loc_7A23C
loc_7A232:
movzx r8d, word ptr [r13+0]; jumptable 000000000007A0DE case 10
jmp short loc_7A23C
def_7A0DE:
xor r8d, r8d; jumptable 000000000007A0DE default case
loc_7A23C:
mov ecx, r12d
add ecx, 0FFFFFFF8h
mov rax, [rbp+var_38]
sub rax, r13
mov edx, ecx
sub rax, rdx
jb loc_79F89
sub rax, r8
jb loc_79F89
mov ecx, r15d
cmp rax, rcx
jb loc_79F89
mov rdi, r14
mov rsi, r13
mov [rbp+var_40], r8
mov [rbp+var_50], rdx
call _memcpy
mov rax, [rbp+var_50]
add r13, rax
mov [r14+rax], r13
loc_7A287:
add r13, [rbp+var_40]
loc_7A28B:
mov eax, [rbp+var_2C]
add eax, eax
cmp eax, 100h
jnb short loc_7A29C
mov [rbp+var_2C], eax
jmp short loc_7A2B5
loc_7A29C:
mov rcx, [rbp+var_58]
movzx eax, byte ptr [rcx+1]
mov [rbp+var_44], eax
inc rcx
mov [rbp+var_58], rcx
mov [rbp+var_2C], 1
loc_7A2B5:
add r14, r12
add rbx, 30h ; '0'
cmp rbx, [rbp+var_78]
jb loc_7A00F
jmp short loc_7A2F5
loc_7A2C8:
lea rdx, [r13+1]
cmp rdx, [rbp+var_38]
jnb loc_79F89
and ecx, 7Fh
movzx esi, byte ptr [r13+1]
shl esi, 7
or esi, ecx
add r13, 2
jmp loc_7A11B
loc_7A2EC:
mov [rbp+var_2C], 1
jmp short loc_7A300
loc_7A2F5:
mov rax, [rbp+var_70]
mov rax, [rax]
mov rsi, [rbp+var_68]
loc_7A300:
cmp qword ptr [rax+2C8h], 1
sbb r13, 0FFFFFFFFFFFFFFFFh
cmp r14, rsi
jnz loc_79F89
cmp r13, [rbp+var_38]
jnz loc_79F89
mov eax, [rbp+var_2C]
cmp eax, 1
jz loc_79F9C
neg eax
test [rbp+var_44], eax
jnz loc_79F89
jmp loc_79F9C
| long long mi_rec_unpack(long long a1, _WORD *a2, unsigned __int8 *a3, unsigned long long a4)
{
long long v4; // rax
unsigned long long v5; // r15
long long v7; // r14
_WORD *v8; // rsi
long long v9; // rcx
unsigned __int8 *v10; // r13
long long v11; // rdx
unsigned long long v12; // rbx
unsigned int v13; // r15d
long long v14; // r12
unsigned int v15; // eax
char v16; // cl
unsigned int v17; // eax
unsigned __int8 *v18; // rsi
unsigned __int8 *v19; // r13
unsigned long long v20; // r8
unsigned int v21; // esi
unsigned __int8 *v22; // r13
unsigned long long v23; // rdx
unsigned long long v24; // rax
bool v25; // cf
unsigned long long v26; // rax
long long v27; // rax
unsigned __int8 *v28; // r13
unsigned long long v29; // [rsp+8h] [rbp-78h]
long long *v30; // [rsp+10h] [rbp-70h]
_WORD *v31; // [rsp+18h] [rbp-68h]
unsigned long long v32; // [rsp+20h] [rbp-60h]
unsigned __int8 *v33; // [rsp+28h] [rbp-58h]
int v34; // [rsp+3Ch] [rbp-44h]
unsigned long long v35; // [rsp+40h] [rbp-40h]
unsigned long long v36; // [rsp+48h] [rbp-38h]
int v37; // [rsp+54h] [rbp-2Ch]
v33 = a3;
v30 = (long long *)a1;
v4 = *(_QWORD *)a1;
v5 = *(_QWORD *)(*(_QWORD *)a1 + 336LL);
v32 = a4;
if ( v5 > a4 )
{
LABEL_2:
*(_DWORD *)my_thread_var(a1) = 127;
return -1LL;
}
v7 = (long long)a2;
v8 = (_WORD *)((char *)a2 + *(_QWORD *)(v4 + 320));
v36 = (unsigned long long)&a3[a4];
v34 = *a3;
v9 = *(unsigned int *)(v4 + 396);
v10 = &a3[v9];
v11 = *(_QWORD *)(v4 + 360);
if ( v11 <= 0 )
{
v37 = 1;
goto LABEL_56;
}
v31 = v8;
v12 = *(_QWORD *)(v4 + 560);
v29 = v12 + 48 * v11;
v13 = v5 - v9;
v37 = 1;
do
{
v14 = *(unsigned __int16 *)(v12 + 4);
v15 = *(_DWORD *)v12;
if ( !*(_DWORD *)v12 || v15 == 9 )
{
if ( v13 > (int)v36 - (int)v10 )
goto LABEL_2;
v13 -= v14;
a1 = v7;
memcpy(v7, v10, *(unsigned __int16 *)(v12 + 4));
v10 += v14;
goto LABEL_51;
}
if ( v15 != 8 )
{
if ( (v37 & v34) != 0 )
{
if ( v15 - 3 <= 1 )
{
a1 = v7;
memset(v7, 0LL, *(unsigned __int16 *)(v12 + 4));
goto LABEL_48;
}
if ( v15 > 2 )
{
LABEL_48:
if ( (unsigned int)(2 * v37) >= 0x100 )
{
v34 = *++v33;
v37 = 1;
}
else
{
v37 *= 2;
}
goto LABEL_51;
}
if ( (unsigned int)v14 >= 0x100 && (*v10 & 0x80u) != 0 )
{
if ( (unsigned long long)(v10 + 1) >= v36 )
goto LABEL_2;
v21 = *v10 & 0x7F | (v10[1] << 7);
v22 = v10 + 2;
}
else
{
if ( v10 == (unsigned __int8 *)v36 )
goto LABEL_2;
v21 = *v10;
v22 = v10 + 1;
}
if ( (unsigned int)v14 <= v21 )
goto LABEL_2;
--v13;
if ( v21 + v13 > (int)v36 - (int)v22 )
goto LABEL_2;
if ( v15 == 1 )
{
v35 = v21;
memcpy(v7, v22, v21);
a1 = v7 + v21;
memset(a1, 32LL, (unsigned int)v14 - v21);
}
else
{
memset(v7, 32LL, (unsigned int)v14 - v21);
a1 = v7 + v14 - v21;
v35 = v21;
memcpy(a1, v22, v21);
}
}
else
{
if ( v15 != 4 )
{
v13 = (__PAIR64__(v13, v15) - 3) >> 32;
if ( v13 + (unsigned int)v14 > (int)v36 - (int)v10 )
goto LABEL_2;
a1 = v7;
memcpy(v7, v10, *(unsigned __int16 *)(v12 + 4));
v10 += v14;
goto LABEL_48;
}
switch ( *(_WORD *)(v12 + 4) )
{
case 9:
v20 = *v10;
break;
case 0xA:
v20 = *(unsigned __int16 *)v10;
break;
case 0xB:
v20 = *(unsigned __int16 *)v10 | (unsigned long long)(v10[2] << 16);
break;
case 0xC:
v20 = *(unsigned int *)v10;
break;
default:
v20 = 0LL;
break;
}
v23 = (unsigned int)(v14 - 8);
v24 = v36 - (_QWORD)v10 - v23;
if ( v36 - (unsigned long long)v10 < v23 )
goto LABEL_2;
v25 = v24 < v20;
v26 = v24 - v20;
if ( v25 || v26 < v13 )
goto LABEL_2;
a1 = v7;
v35 = v20;
memcpy(v7, v10, v23);
v27 = (unsigned int)(v14 - 8);
v22 = &v10[v27];
*(_QWORD *)(v7 + v27) = v22;
}
v10 = &v22[v35];
goto LABEL_48;
}
a1 = 2LL - ((unsigned int)(v14 - 1) < 0x100);
v16 = *v10;
v17 = *v10;
if ( (unsigned int)(v14 - 1) > 0xFF )
{
if ( v16 == -1 )
{
v17 = (unsigned __int16)__ROL2__(*(_WORD *)(v10 + 1), 8);
v19 = v10 + 3;
}
else
{
v19 = v10 + 1;
}
v18 = v19;
if ( v17 > (int)v14 - 2 )
goto LABEL_2;
*(_WORD *)v7 = v17;
}
else
{
if ( (int)v14 - 1 < v17 )
goto LABEL_2;
*(_BYTE *)v7 = v16;
v18 = v10 + 1;
}
v10 = &v18[v17];
if ( (unsigned long long)v10 > v36 )
goto LABEL_2;
a1 += v7;
memcpy(a1, v18, v17);
--v13;
LABEL_51:
v7 += v14;
v12 += 48LL;
}
while ( v12 < v29 );
v4 = *v30;
v8 = v31;
LABEL_56:
v28 = &v10[-(*(_QWORD *)(v4 + 712) == 0LL) + 1];
if ( (_WORD *)v7 != v8 || v28 != (unsigned __int8 *)v36 || v37 != 1 && (-v37 & v34) != 0 )
goto LABEL_2;
return v32;
}
| _mi_rec_unpack:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV qword ptr [RBP + -0x58],RDX
MOV qword ptr [RBP + -0x70],RDI
MOV RAX,qword ptr [RDI]
MOV R15,qword ptr [RAX + 0x150]
MOV qword ptr [RBP + -0x60],RCX
CMP R15,RCX
JBE 0x00179faf
LAB_00179f89:
CALL 0x001a2f56
MOV dword ptr [RAX],0x7f
MOV qword ptr [RBP + -0x60],-0x1
LAB_00179f9c:
MOV RAX,qword ptr [RBP + -0x60]
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00179faf:
MOV R14,RSI
MOV RSI,qword ptr [RAX + 0x140]
ADD RSI,R14
MOV RCX,qword ptr [RBP + -0x60]
MOV RDX,qword ptr [RBP + -0x58]
ADD RCX,RDX
MOV qword ptr [RBP + -0x38],RCX
MOVZX ECX,byte ptr [RDX]
MOV dword ptr [RBP + -0x44],ECX
MOV ECX,dword ptr [RAX + 0x18c]
LEA R13,[RDX + RCX*0x1]
MOV RDX,qword ptr [RAX + 0x168]
TEST RDX,RDX
JLE 0x0017a2ec
MOV qword ptr [RBP + -0x68],RSI
MOV RBX,qword ptr [RAX + 0x230]
LEA RAX,[RDX + RDX*0x2]
SHL RAX,0x4
ADD RAX,RBX
MOV qword ptr [RBP + -0x78],RAX
SUB R15D,ECX
MOV dword ptr [RBP + -0x2c],0x1
LAB_0017a00f:
MOVZX R12D,word ptr [RBX + 0x4]
MOV EAX,dword ptr [RBX]
TEST EAX,EAX
JZ 0x0017a05d
CMP EAX,0x9
JZ 0x0017a05d
CMP EAX,0x8
JNZ 0x0017a086
LEA EDX,[R12 + -0x1]
CMP EDX,0x100
MOV EDI,0x2
SBB RDI,0x0
MOV CL,byte ptr [R13]
MOVZX EAX,CL
CMP EDX,0xff
JA 0x0017a0a8
CMP EDX,EAX
JC 0x00179f89
INC R13
MOV byte ptr [R14],CL
MOV RSI,R13
JMP 0x0017a19b
LAB_0017a05d:
MOV RAX,qword ptr [RBP + -0x38]
SUB EAX,R13D
CMP R15D,EAX
JA 0x00179f89
SUB R15D,R12D
MOV RDI,R14
MOV RSI,R13
MOV RDX,R12
CALL 0x00129080
ADD R13,R12
JMP 0x0017a2b5
LAB_0017a086:
MOV ECX,dword ptr [RBP + -0x2c]
TEST dword ptr [RBP + -0x44],ECX
JZ 0x0017a0b9
LEA ECX,[RAX + -0x3]
CMP ECX,0x1
JA 0x0017a0ea
MOV RDI,R14
XOR ESI,ESI
MOV RDX,R12
CALL 0x001292a0
JMP 0x0017a28b
LAB_0017a0a8:
CMP CL,0xff
JZ 0x0017a176
INC R13
JMP 0x0017a186
LAB_0017a0b9:
CMP EAX,0x4
JNZ 0x0017a1bb
LEA EAX,[R12 + -0x9]
CMP EAX,0x3
JA 0x0017a239
LEA RCX,[0x1e2e60]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_9:
MOVZX R8D,byte ptr [R13]
JMP 0x0017a23c
LAB_0017a0ea:
CMP EAX,0x2
JA 0x0017a28b
CMP R12D,0x100
JC 0x0017a109
MOVZX ECX,byte ptr [R13]
TEST CL,CL
JS 0x0017a2c8
LAB_0017a109:
CMP R13,qword ptr [RBP + -0x38]
JZ 0x00179f89
MOVZX ESI,byte ptr [R13]
INC R13
LAB_0017a11b:
MOV R8D,R12D
SUB R8D,ESI
JBE 0x00179f89
DEC R15D
LEA ECX,[RSI + R15*0x1]
MOV RDX,qword ptr [RBP + -0x38]
SUB EDX,R13D
CMP ECX,EDX
JA 0x00179f89
CMP EAX,0x1
JNZ 0x0017a1ed
MOV EDX,ESI
MOV qword ptr [RBP + -0x40],RDX
MOV RDI,R14
MOV RSI,R13
MOV qword ptr [RBP + -0x50],R8
CALL 0x00129080
MOV RAX,qword ptr [RBP + -0x40]
LEA RDI,[R14 + RAX*0x1]
MOV ESI,0x20
MOV RDX,qword ptr [RBP + -0x50]
CALL 0x001292a0
JMP 0x0017a287
LAB_0017a176:
MOVZX EAX,word ptr [R13 + 0x1]
ROL AX,0x8
MOVZX EAX,AX
ADD R13,0x3
LAB_0017a186:
MOV RSI,R13
MOV ECX,R12D
ADD ECX,-0x2
CMP EAX,ECX
JA 0x00179f89
MOV word ptr [R14],AX
LAB_0017a19b:
MOV EDX,EAX
LEA R13,[RSI + RDX*0x1]
CMP R13,qword ptr [RBP + -0x38]
JA 0x00179f89
ADD RDI,R14
CALL 0x00129080
DEC R15D
JMP 0x0017a2b5
LAB_0017a1bb:
CMP EAX,0x3
SBB R15D,0x0
MOV EAX,R12D
ADD EAX,R15D
MOV RCX,qword ptr [RBP + -0x38]
SUB ECX,R13D
CMP EAX,ECX
JA 0x00179f89
MOV RDI,R14
MOV RSI,R13
MOV RDX,R12
CALL 0x00129080
ADD R13,R12
JMP 0x0017a28b
LAB_0017a1ed:
MOV RDI,R14
MOV qword ptr [RBP + -0x40],RSI
MOV ESI,0x20
MOV RDX,R8
CALL 0x001292a0
LEA RDI,[R14 + R12*0x1]
MOV EDX,dword ptr [RBP + -0x40]
SUB RDI,RDX
MOV RSI,R13
MOV qword ptr [RBP + -0x40],RDX
CALL 0x00129080
JMP 0x0017a287
caseD_b:
MOVZX EAX,word ptr [R13]
MOVZX R8D,byte ptr [R13 + 0x2]
SHL R8D,0x10
OR R8,RAX
JMP 0x0017a23c
caseD_c:
MOV R8D,dword ptr [R13]
JMP 0x0017a23c
caseD_a:
MOVZX R8D,word ptr [R13]
JMP 0x0017a23c
default:
XOR R8D,R8D
LAB_0017a23c:
MOV ECX,R12D
ADD ECX,-0x8
MOV RAX,qword ptr [RBP + -0x38]
SUB RAX,R13
MOV EDX,ECX
SUB RAX,RDX
JC 0x00179f89
SUB RAX,R8
JC 0x00179f89
MOV ECX,R15D
CMP RAX,RCX
JC 0x00179f89
MOV RDI,R14
MOV RSI,R13
MOV qword ptr [RBP + -0x40],R8
MOV qword ptr [RBP + -0x50],RDX
CALL 0x00129080
MOV RAX,qword ptr [RBP + -0x50]
ADD R13,RAX
MOV qword ptr [R14 + RAX*0x1],R13
LAB_0017a287:
ADD R13,qword ptr [RBP + -0x40]
LAB_0017a28b:
MOV EAX,dword ptr [RBP + -0x2c]
ADD EAX,EAX
CMP EAX,0x100
JNC 0x0017a29c
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x0017a2b5
LAB_0017a29c:
MOV RCX,qword ptr [RBP + -0x58]
MOVZX EAX,byte ptr [RCX + 0x1]
MOV dword ptr [RBP + -0x44],EAX
INC RCX
MOV qword ptr [RBP + -0x58],RCX
MOV dword ptr [RBP + -0x2c],0x1
LAB_0017a2b5:
ADD R14,R12
ADD RBX,0x30
CMP RBX,qword ptr [RBP + -0x78]
JC 0x0017a00f
JMP 0x0017a2f5
LAB_0017a2c8:
LEA RDX,[R13 + 0x1]
CMP RDX,qword ptr [RBP + -0x38]
JNC 0x00179f89
AND ECX,0x7f
MOVZX ESI,byte ptr [R13 + 0x1]
SHL ESI,0x7
OR ESI,ECX
ADD R13,0x2
JMP 0x0017a11b
LAB_0017a2ec:
MOV dword ptr [RBP + -0x2c],0x1
JMP 0x0017a300
LAB_0017a2f5:
MOV RAX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x68]
LAB_0017a300:
CMP qword ptr [RAX + 0x2c8],0x1
SBB R13,-0x1
CMP R14,RSI
JNZ 0x00179f89
CMP R13,qword ptr [RBP + -0x38]
JNZ 0x00179f89
MOV EAX,dword ptr [RBP + -0x2c]
CMP EAX,0x1
JZ 0x00179f9c
NEG EAX
TEST dword ptr [RBP + -0x44],EAX
JNZ 0x00179f89
JMP 0x00179f9c
|
ulong _mi_rec_unpack(long *param_1,byte *param_2,byte *param_3,ulong param_4)
{
byte bVar1;
ushort uVar2;
int iVar3;
uint uVar4;
int4 *puVar5;
uint *puVar6;
ulong uVar7;
long lVar8;
uint *puVar9;
uint uVar10;
ulong __n;
uint *puVar11;
byte *pbVar12;
uint uVar13;
ulong __n_00;
byte *__src;
ushort *__src_00;
uint *__src_01;
uint uVar14;
byte *local_60;
uint local_4c;
size_t local_48;
uint local_34;
lVar8 = *param_1;
if (*(ulong *)(lVar8 + 0x150) <= param_4) {
pbVar12 = param_2 + *(long *)(lVar8 + 0x140);
puVar9 = (uint *)(param_3 + param_4);
local_4c = (uint)*param_3;
__src_01 = (uint *)(param_3 + *(uint *)(lVar8 + 0x18c));
if (*(long *)(lVar8 + 0x168) < 1) {
local_34 = 1;
}
else {
puVar11 = *(uint **)(lVar8 + 0x230);
puVar6 = puVar11 + *(long *)(lVar8 + 0x168) * 0xc;
uVar14 = (int)*(ulong *)(lVar8 + 0x150) - *(uint *)(lVar8 + 0x18c);
local_34 = 1;
local_60 = param_3;
do {
uVar2 = (ushort)puVar11[1];
__n_00 = (ulong)uVar2;
uVar4 = *puVar11;
iVar3 = (int)puVar9;
if ((uVar4 == 0) || (uVar4 == 9)) {
if ((uint)(iVar3 - (int)__src_01) < uVar14) goto LAB_00179f89;
uVar14 = uVar14 - uVar2;
memcpy(param_2,__src_01,__n_00);
__src_01 = (uint *)((long)__src_01 + __n_00);
}
else if (uVar4 == 8) {
uVar10 = uVar2 - 1;
bVar1 = (byte)*__src_01;
uVar4 = (uint)bVar1;
if (uVar10 < 0x100) {
if (uVar10 < bVar1) goto LAB_00179f89;
__src = (byte *)((long)__src_01 + 1);
*param_2 = bVar1;
}
else {
if (bVar1 == 0xff) {
uVar4 = (uint)(ushort)(*(ushort *)((long)__src_01 + 1) << 8 |
*(ushort *)((long)__src_01 + 1) >> 8);
__src = (byte *)((long)__src_01 + 3);
}
else {
__src = (byte *)((long)__src_01 + 1);
}
if (uVar2 - 2 < uVar4) goto LAB_00179f89;
*(short *)param_2 = (short)uVar4;
}
__src_01 = (uint *)(__src + uVar4);
if (puVar9 < __src_01) goto LAB_00179f89;
memcpy(param_2 + (2 - (ulong)(uVar10 < 0x100)),__src,(ulong)uVar4);
uVar14 = uVar14 - 1;
}
else {
if ((local_4c & local_34) == 0) {
if (uVar4 == 4) {
switch(uVar2) {
case 9:
local_48 = (size_t)(byte)*__src_01;
break;
case 10:
local_48 = (size_t)(ushort)*__src_01;
break;
case 0xb:
local_48 = (size_t)(uint3)*__src_01;
break;
case 0xc:
local_48 = (size_t)*__src_01;
break;
default:
local_48 = 0;
}
__n = (ulong)(uVar2 - 8);
uVar7 = ((long)puVar9 - (long)__src_01) - __n;
if ((((ulong)((long)puVar9 - (long)__src_01) < __n) || (uVar7 < local_48)) ||
(uVar7 - local_48 < (ulong)uVar14)) goto LAB_00179f89;
memcpy(param_2,__src_01,__n);
__src_00 = (ushort *)((long)__src_01 + __n);
*(ushort **)(param_2 + __n) = __src_00;
LAB_0017a287:
__src_01 = (uint *)((long)__src_00 + local_48);
}
else {
uVar14 = uVar14 - (uVar4 < 3);
if ((uint)(iVar3 - (int)__src_01) < uVar2 + uVar14) goto LAB_00179f89;
memcpy(param_2,__src_01,__n_00);
__src_01 = (uint *)((long)__src_01 + __n_00);
}
}
else if (uVar4 - 3 < 2) {
memset(param_2,0,__n_00);
}
else if (uVar4 < 3) {
if ((uVar2 < 0x100) || (-1 < (char)(byte)*__src_01)) {
if (__src_01 == puVar9) goto LAB_00179f89;
local_48 = (size_t)(byte)*__src_01;
__src_00 = (ushort *)((long)__src_01 + 1);
}
else {
if (puVar9 <= (uint *)((long)__src_01 + 1U)) goto LAB_00179f89;
local_48 = (size_t)((uint)*(byte *)((long)__src_01 + 1) << 7 | (byte)*__src_01 & 0x7f)
;
__src_00 = (ushort *)((long)__src_01 + 2);
}
uVar10 = (uint)local_48;
uVar13 = uVar2 - uVar10;
if ((uVar10 <= uVar2 && uVar13 != 0) &&
(uVar14 = uVar14 - 1, uVar10 + uVar14 <= (uint)(iVar3 - (int)__src_00))) {
if (uVar4 == 1) {
memcpy(param_2,__src_00,local_48);
memset(param_2 + local_48,0x20,(ulong)uVar13);
}
else {
memset(param_2,0x20,(ulong)uVar13);
memcpy(param_2 + (__n_00 - local_48),__src_00,local_48);
}
goto LAB_0017a287;
}
goto LAB_00179f89;
}
local_34 = local_34 * 2;
if (0xff < local_34) {
local_4c = (uint)local_60[1];
local_60 = local_60 + 1;
local_34 = 1;
}
}
param_2 = param_2 + __n_00;
puVar11 = puVar11 + 0xc;
} while (puVar11 < puVar6);
lVar8 = *param_1;
}
if ((param_2 == pbVar12) &&
((uint *)((long)__src_01 + (ulong)(*(long *)(lVar8 + 0x2c8) != 0)) == puVar9)) {
if (local_34 == 1) {
return param_4;
}
if ((local_4c & -local_34) == 0) {
return param_4;
}
}
}
LAB_00179f89:
puVar5 = (int4 *)_my_thread_var();
*puVar5 = 0x7f;
return 0xffffffffffffffff;
}
| |
40,519 | minja::Value::Value(char const*) | monkey531[P]llama/common/./minja.hpp | Value(const char * v) : primitive_(std::string(v)) {} | O3 | cpp | minja::Value::Value(char const*):
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x20a94
leaq 0x40(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0x2d028
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x32342
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x197b0
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3236d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x197b0
jmp 0x3236d
movq %rax, %r14
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x3237b
callq 0x33e7e
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x32389
callq 0x33e7e
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x32397
callq 0x33e7e
movq %rbx, %rdi
callq 0x3e036
movq %r14, %rdi
callq 0x19e10
nop
| _ZN5minja5ValueC2EPKc:
push r14
push rbx
sub rsp, 28h
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi+30h], xmm0
movups xmmword ptr [rdi+20h], xmm0
movups xmmword ptr [rdi+10h], xmm0
movups xmmword ptr [rdi], xmm0
lea rdi, [rsp+38h+var_30]
lea rdx, [rsp+38h+var_31]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rdi, [rbx+40h]
lea rsi, [rsp+38h+var_30]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_
lea rax, [rsp+38h+var_20]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_32342
mov rsi, [rsp+38h+var_20]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_32342:
add rsp, 28h
pop rbx
pop r14
retn
mov r14, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_3236D
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_3236D
mov r14, rax
loc_3236D:
mov rdi, [rbx+38h]
test rdi, rdi
jz short loc_3237B
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_3237B:
mov rdi, [rbx+28h]
test rdi, rdi
jz short loc_32389
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_32389:
mov rdi, [rbx+18h]
test rdi, rdi
jz short loc_32397
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_32397:
mov rdi, rbx
call _ZNSt23enable_shared_from_thisIN5minja5ValueEED2Ev; std::enable_shared_from_this<minja::Value>::~enable_shared_from_this()
mov rdi, r14
call __Unwind_Resume
| void minja::Value::Value(minja::Value *this, const char *a2)
{
void *v2[2]; // [rsp+8h] [rbp-30h] BYREF
long long v3; // [rsp+18h] [rbp-20h] BYREF
*((_OWORD *)this + 3) = 0LL;
*((_OWORD *)this + 2) = 0LL;
*((_OWORD *)this + 1) = 0LL;
*(_OWORD *)this = 0LL;
std::string::basic_string<std::allocator<char>>(v2, (long long)a2);
ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_(
(long long)this + 64,
(long long)v2);
if ( v2[0] != &v3 )
operator delete(v2[0], v3 + 1);
}
| Value:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x30],XMM0
MOVUPS xmmword ptr [RDI + 0x20],XMM0
MOVUPS xmmword ptr [RDI + 0x10],XMM0
MOVUPS xmmword ptr [RDI],XMM0
LAB_0013230a:
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x7]
CALL 0x00120a94
LEA RDI,[RBX + 0x40]
LAB_0013231d:
LEA RSI,[RSP + 0x8]
CALL 0x0012d028
LAB_00132327:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00132342
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001197b0
LAB_00132342:
ADD RSP,0x28
POP RBX
POP R14
RET
|
/* minja::Value::Value(char const*) */
void __thiscall minja::Value::Value(Value *this,char *param_1)
{
allocator local_31;
long *local_30 [2];
long local_20 [2];
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
/* try { // try from 0013230a to 00132318 has its CatchHandler @ 0013236a */
std::__cxx11::string::string<std::allocator<char>>((string *)local_30,param_1,&local_31);
/* try { // try from 0013231d to 00132326 has its CatchHandler @ 0013234a */
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_
(this + 0x40,local_30);
if (local_30[0] != local_20) {
operator_delete(local_30[0],local_20[0] + 1);
}
return;
}
| |
40,520 | testing::internal::UniversalPrinter<unsigned int>::Print(unsigned int const&, std::ostream*) | AlayaLite/build_O0/_deps/googletest-src/googletest/include/gtest/gtest-printers.h | static void Print(const T& value, ::std::ostream* os) {
// By default, ::testing::internal::PrintTo() is used for printing
// the value.
//
// Thanks to Koenig look-up, if T is a class and has its own
// PrintTo() function defined in its namespace, that function will
// be visible here. Since it is more specific than the generic ones
// in ::testing::internal, it will be picked by the compiler in the
// following statement - exactly what we want.
PrintTo(value, os);
} | O0 | c | testing::internal::UniversalPrinter<unsigned int>::Print(unsigned int const&, std::ostream*):
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x2e800
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| _ZN7testing8internal16UniversalPrinterIjE5PrintERKjPSo:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov [rsp+18h+var_10], rsi
mov rdi, [rsp+18h+var_8]
mov rsi, [rsp+18h+var_10]
call _ZN7testing8internal7PrintToIjEEvRKT_PSo; testing::internal::PrintTo<uint>(uint const&,std::ostream *)
add rsp, 18h
retn
| long long testing::internal::UniversalPrinter<unsigned int>::Print(long long a1, long long a2)
{
return testing::internal::PrintTo<unsigned int>(a1, a2);
}
| Print:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x8],RSI
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x0012e800
ADD RSP,0x18
RET
|
/* testing::internal::UniversalPrinter<unsigned int>::Print(unsigned int const&, std::ostream*) */
void testing::internal::UniversalPrinter<unsigned_int>::Print(uint *param_1,ostream *param_2)
{
PrintTo<unsigned_int>(param_1,param_2);
return;
}
| |
40,521 | get_record_position | eloqsql/storage/maria/ma_blockrec.c | static uchar *get_record_position(MARIA_SHARE *share, uchar *buff,
uint record_number, uchar **end_of_data)
{
uint block_size= share->block_size;
uint number_of_records= (uint) buff[DIR_COUNT_OFFSET];
uchar *dir;
uchar *data;
uint offset, length;
#ifdef SANITY_CHECKS
if (record_number >= number_of_records ||
record_number > ((block_size - PAGE_HEADER_SIZE(share) - PAGE_SUFFIX_SIZE)
/ DIR_ENTRY_SIZE))
{
DBUG_PRINT("error",
("Wrong row number: record_number: %u number_of_records: %u",
record_number, number_of_records));
return 0;
}
#endif
dir= dir_entry_pos(buff, block_size, record_number);
offset= uint2korr(dir);
length= uint2korr(dir + 2);
#ifdef SANITY_CHECKS
if (offset < PAGE_HEADER_SIZE(share) ||
offset + length > (block_size -
number_of_records * DIR_ENTRY_SIZE -
PAGE_SUFFIX_SIZE))
{
DBUG_PRINT("error",
("Wrong row position: record_number: %u offset: %u "
"length: %u number_of_records: %u",
record_number, offset, length, number_of_records));
return 0;
}
#endif
data= buff + offset;
*end_of_data= data + length;
return data;
} | O3 | c | get_record_position:
pushq %rbp
movq %rsp, %rbp
movq %rsi, %rax
movzbl 0x8(%rsi), %esi
cmpl %edx, %esi
jbe 0x5e59f
movl 0x7bc(%rdi), %r8d
movl 0xc18(%rdi), %edi
movl %r8d, %r9d
subl %edi, %r9d
addl $-0x10, %r9d
shrl $0x2, %r9d
cmpl %edx, %r9d
jb 0x5e59f
addl $0xc, %edi
leaq (%rax,%r8), %r9
shll $0x2, %edx
subq %rdx, %r9
movzwl -0x8(%r9), %edx
cmpl %edx, %edi
ja 0x5e59f
movzwl -0x6(%r9), %edi
leal (%rdi,%rdx), %r9d
shll $0x2, %esi
subl %esi, %r8d
addl $-0x4, %r8d
cmpl %r8d, %r9d
jbe 0x5e5a3
xorl %eax, %eax
popq %rbp
retq
movl %edx, %edx
addq %rdx, %rax
movl %edi, %edx
addq %rax, %rdx
movq %rdx, (%rcx)
jmp 0x5e5a1
| get_record_position:
push rbp
mov rbp, rsp
mov rax, rsi
movzx esi, byte ptr [rsi+8]
cmp esi, edx
jbe short loc_5E59F
mov r8d, [rdi+7BCh]
mov edi, [rdi+0C18h]
mov r9d, r8d
sub r9d, edi
add r9d, 0FFFFFFF0h
shr r9d, 2
cmp r9d, edx
jb short loc_5E59F
add edi, 0Ch
lea r9, [rax+r8]
shl edx, 2
sub r9, rdx
movzx edx, word ptr [r9-8]
cmp edi, edx
ja short loc_5E59F
movzx edi, word ptr [r9-6]
lea r9d, [rdi+rdx]
shl esi, 2
sub r8d, esi
add r8d, 0FFFFFFFCh
cmp r9d, r8d
jbe short loc_5E5A3
loc_5E59F:
xor eax, eax
loc_5E5A1:
pop rbp
retn
loc_5E5A3:
mov edx, edx
add rax, rdx
mov edx, edi
add rdx, rax
mov [rcx], rdx
jmp short loc_5E5A1
| long long get_record_position(long long a1, long long a2, unsigned int a3, _QWORD *a4)
{
unsigned int v5; // esi
long long v6; // r8
int v7; // edi
long long v8; // r9
unsigned int v9; // edx
long long result; // rax
v5 = *(unsigned __int8 *)(a2 + 8);
if ( v5 <= a3 )
return 0LL;
v6 = *(unsigned int *)(a1 + 1980);
v7 = *(_DWORD *)(a1 + 3096);
if ( (unsigned int)(v6 - v7 - 16) >> 2 < a3 )
return 0LL;
v8 = a2 + v6 - 4 * a3;
v9 = *(unsigned __int16 *)(v8 - 8);
if ( v7 + 12 > v9 || *(unsigned __int16 *)(v8 - 6) + v9 > (unsigned int)v6 - 4 * v5 - 4 )
return 0LL;
result = *(unsigned __int16 *)(v8 - 8) + a2;
*a4 = result + *(unsigned __int16 *)(v8 - 6);
return result;
}
| get_record_position:
PUSH RBP
MOV RBP,RSP
MOV RAX,RSI
MOVZX ESI,byte ptr [RSI + 0x8]
CMP ESI,EDX
JBE 0x0015e59f
MOV R8D,dword ptr [RDI + 0x7bc]
MOV EDI,dword ptr [RDI + 0xc18]
MOV R9D,R8D
SUB R9D,EDI
ADD R9D,-0x10
SHR R9D,0x2
CMP R9D,EDX
JC 0x0015e59f
ADD EDI,0xc
LEA R9,[RAX + R8*0x1]
SHL EDX,0x2
SUB R9,RDX
MOVZX EDX,word ptr [R9 + -0x8]
CMP EDI,EDX
JA 0x0015e59f
MOVZX EDI,word ptr [R9 + -0x6]
LEA R9D,[RDI + RDX*0x1]
SHL ESI,0x2
SUB R8D,ESI
ADD R8D,-0x4
CMP R9D,R8D
JBE 0x0015e5a3
LAB_0015e59f:
XOR EAX,EAX
LAB_0015e5a1:
POP RBP
RET
LAB_0015e5a3:
MOV EDX,EDX
ADD RAX,RDX
MOV EDX,EDI
ADD RDX,RAX
MOV qword ptr [RCX],RDX
JMP 0x0015e5a1
|
long get_record_position(long param_1,long param_2,uint param_3,long *param_4)
{
ushort uVar1;
ushort uVar2;
uint uVar3;
long lVar4;
if (param_3 < *(byte *)(param_2 + 8)) {
uVar3 = *(uint *)(param_1 + 0x7bc);
if (param_3 <= (uVar3 - *(int *)(param_1 + 0xc18)) - 0x10 >> 2) {
lVar4 = (param_2 + (ulong)uVar3) - (ulong)(param_3 << 2);
uVar1 = *(ushort *)(lVar4 + -8);
if ((*(int *)(param_1 + 0xc18) + 0xcU <= (uint)uVar1) &&
(uVar2 = *(ushort *)(lVar4 + -6),
(uint)uVar2 + (uint)uVar1 <= (uVar3 + (uint)*(byte *)(param_2 + 8) * -4) - 4)) {
*param_4 = (ulong)uVar2 + param_2 + (ulong)uVar1;
return param_2 + (ulong)uVar1;
}
}
}
return 0;
}
| |
40,522 | inline_mysql_file_seek | eloqsql/include/mysql/psi/mysql_file.h | static inline my_off_t
inline_mysql_file_seek(
#ifdef HAVE_PSI_FILE_INTERFACE
const char *src_file, uint src_line,
#endif
File file, my_off_t pos, int whence, myf flags)
{
my_off_t result;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_SEEK);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
result= my_seek(file, pos, whence, flags);
PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
return result;
}
#endif
result= my_seek(file, pos, whence, flags);
return result;
} | O0 | c | inline_mysql_file_seek:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq %r9, -0x30(%rbp)
leaq 0x212d50(%rip), %rax # 0x2c1018
movq (%rax), %rax
movq 0x158(%rax), %rax
movl -0x18(%rbp), %esi
leaq -0x88(%rbp), %rdi
movl $0x8, %edx
callq *%rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0xae363
leaq 0x212d0a(%rip), %rax # 0x2c1018
movq (%rax), %rax
movq 0x210(%rax), %rax
movq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rdx
movl -0x14(%rbp), %ecx
xorl %esi, %esi
callq *%rax
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
movl -0x24(%rbp), %edx
movq -0x30(%rbp), %rcx
callq 0xf6710
movq %rax, -0x38(%rbp)
leaq 0x212cd3(%rip), %rax # 0x2c1018
movq (%rax), %rax
movq 0x218(%rax), %rax
movq -0x40(%rbp), %rdi
xorl %ecx, %ecx
movl %ecx, %esi
callq *%rax
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xae382
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
movl -0x24(%rbp), %edx
movq -0x30(%rbp), %rcx
callq 0xf6710
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nop
| inline_mysql_file_seek_3:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov [rbp+var_20], rcx
mov [rbp+var_24], r8d
mov [rbp+var_30], r9
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+158h]
mov esi, [rbp+var_18]
lea rdi, [rbp+var_88]
mov edx, 8
call rax
mov [rbp+var_40], rax
cmp [rbp+var_40], 0
setnz al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_AE363
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+210h]
mov rdi, [rbp+var_40]
mov rdx, [rbp+var_10]
mov ecx, [rbp+var_14]
xor esi, esi
call rax
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov edx, [rbp+var_24]
mov rcx, [rbp+var_30]
call my_seek
mov [rbp+var_38], rax
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+218h]
mov rdi, [rbp+var_40]
xor ecx, ecx
mov esi, ecx
call rax
mov rax, [rbp+var_38]
mov [rbp+var_8], rax
jmp short loc_AE382
loc_AE363:
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov edx, [rbp+var_24]
mov rcx, [rbp+var_30]
call my_seek
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov [rbp+var_8], rax
loc_AE382:
mov rax, [rbp+var_8]
add rsp, 90h
pop rbp
retn
| long long inline_mysql_file_seek_3(
long long a1,
unsigned int a2,
unsigned int a3,
long long a4,
unsigned int a5,
long long a6)
{
_BYTE v7[72]; // [rsp+8h] [rbp-88h] BYREF
long long v8; // [rsp+50h] [rbp-40h]
long long v9; // [rsp+58h] [rbp-38h]
long long v10; // [rsp+60h] [rbp-30h]
unsigned int v11; // [rsp+6Ch] [rbp-24h]
long long v12; // [rsp+70h] [rbp-20h]
unsigned int v13; // [rsp+78h] [rbp-18h]
unsigned int v14; // [rsp+7Ch] [rbp-14h]
long long v15; // [rsp+80h] [rbp-10h]
v15 = a1;
v14 = a2;
v13 = a3;
v12 = a4;
v11 = a5;
v10 = a6;
v8 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v7, a3, 8LL);
if ( !v8 )
return my_seek(v13, v12, v11, v10);
((void ( *)(long long, _QWORD, long long, _QWORD))PSI_server[66])(v8, 0LL, v15, v14);
v9 = my_seek(v13, v12, v11, v10);
((void ( *)(long long, _QWORD))PSI_server[67])(v8, 0LL);
return v9;
}
| inline_mysql_file_seek:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV qword ptr [RBP + -0x20],RCX
MOV dword ptr [RBP + -0x24],R8D
MOV qword ptr [RBP + -0x30],R9
LEA RAX,[0x3c1018]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x158]
MOV ESI,dword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x88]
MOV EDX,0x8
CALL RAX
MOV qword ptr [RBP + -0x40],RAX
CMP qword ptr [RBP + -0x40],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x001ae363
LEA RAX,[0x3c1018]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x210]
MOV RDI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x14]
XOR ESI,ESI
CALL RAX
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV EDX,dword ptr [RBP + -0x24]
MOV RCX,qword ptr [RBP + -0x30]
CALL 0x001f6710
MOV qword ptr [RBP + -0x38],RAX
LEA RAX,[0x3c1018]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x218]
MOV RDI,qword ptr [RBP + -0x40]
XOR ECX,ECX
MOV ESI,ECX
CALL RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001ae382
LAB_001ae363:
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV EDX,dword ptr [RBP + -0x24]
MOV RCX,qword ptr [RBP + -0x30]
CALL 0x001f6710
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x8],RAX
LAB_001ae382:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x90
POP RBP
RET
|
int8
inline_mysql_file_seek
(int8 param_1,int4 param_2,int4 param_3,int8 param_4,
int4 param_5,int8 param_6)
{
int1 local_90 [72];
long local_48;
int8 local_40;
int8 local_38;
int4 local_2c;
int8 local_28;
int4 local_20;
int4 local_1c;
int8 local_18;
int8 local_10;
local_38 = param_6;
local_2c = param_5;
local_28 = param_4;
local_20 = param_3;
local_1c = param_2;
local_18 = param_1;
local_48 = (**(code **)(PSI_server + 0x158))(local_90,param_3,8);
if (local_48 == 0) {
local_10 = my_seek(local_20,local_28,local_2c,local_38);
}
else {
(**(code **)(PSI_server + 0x210))(local_48,0,local_18,local_1c);
local_40 = my_seek(local_20,local_28,local_2c,local_38);
(**(code **)(PSI_server + 0x218))(local_48,0);
local_10 = local_40;
}
return local_10;
}
| |
40,523 | inline_mysql_file_seek | eloqsql/include/mysql/psi/mysql_file.h | static inline my_off_t
inline_mysql_file_seek(
#ifdef HAVE_PSI_FILE_INTERFACE
const char *src_file, uint src_line,
#endif
File file, my_off_t pos, int whence, myf flags)
{
my_off_t result;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_SEEK);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
result= my_seek(file, pos, whence, flags);
PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0);
return result;
}
#endif
result= my_seek(file, pos, whence, flags);
return result;
} | O3 | c | inline_mysql_file_seek:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x48, %rsp
movl %edi, %ebx
leaq 0x306326(%rip), %rax # 0x387050
movq (%rax), %rax
leaq -0x50(%rbp), %rdi
movl %ebx, %esi
movl $0x8, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x80d57
movl %ebx, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xa2218
addq $0x48, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rdi
movl %ebx, %esi
callq 0x2e2c4
jmp 0x80d50
| inline_mysql_file_seek_0:
push rbp
mov rbp, rsp
push rbx
sub rsp, 48h
mov ebx, edi
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_50]
mov esi, ebx
mov edx, 8
call qword ptr [rax+158h]
test rax, rax
jnz short loc_80D57
mov edi, ebx
xor esi, esi
xor edx, edx
xor ecx, ecx
call my_seek
loc_80D50:
add rsp, 48h
pop rbx
pop rbp
retn
loc_80D57:
mov rdi, rax
mov esi, ebx
call inline_mysql_file_seek_cold_1_0
jmp short loc_80D50
| long long inline_mysql_file_seek_0(unsigned int a1)
{
long long v1; // rax
_BYTE v3[80]; // [rsp+0h] [rbp-50h] BYREF
v1 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v3, a1, 8LL);
if ( v1 )
return inline_mysql_file_seek_cold_1_0(v1, a1);
else
return my_seek(a1, 0LL, 0LL, 0LL);
}
| inline_mysql_file_seek:
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x48
MOV EBX,EDI
LEA RAX,[0x487050]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x50]
MOV ESI,EBX
MOV EDX,0x8
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x00180d57
MOV EDI,EBX
XOR ESI,ESI
XOR EDX,EDX
XOR ECX,ECX
CALL 0x001a2218
LAB_00180d50:
ADD RSP,0x48
POP RBX
POP RBP
RET
LAB_00180d57:
MOV RDI,RAX
MOV ESI,EBX
CALL 0x0012e2c4
JMP 0x00180d50
|
void inline_mysql_file_seek(int4 param_1)
{
long lVar1;
int1 local_58 [72];
lVar1 = (**(code **)(PSI_server + 0x158))(local_58,param_1,8);
if (lVar1 == 0) {
my_seek(param_1,0,0,0);
}
else {
inline_mysql_file_seek_cold_1(lVar1,param_1);
}
return;
}
| |
40,524 | my_hash_first | eloqsql/mysys/hash.c | uchar* my_hash_first(const HASH *hash, const uchar *key, size_t length,
HASH_SEARCH_STATE *current_record)
{
uchar *res;
DBUG_ASSERT(my_hash_inited(hash));
res= my_hash_first_from_hash_value(hash,
hash->hash_function(hash->charset, key,
length ? length :
hash->key_length),
key, length, current_record);
return res;
} | O0 | c | my_hash_first:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
jmp 0xd82ba
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xd82f3
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0xd82ff
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x40(%rbp), %rax
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rdi
movq -0x50(%rbp), %rdx
callq *%rax
movq -0x48(%rbp), %rdi
movl %eax, %esi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %r8
callq 0xd8380
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_hash_first:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
jmp short $+2
loc_D82BA:
mov rax, [rbp+var_8]
mov [rbp+var_48], rax
mov rax, [rbp+var_8]
mov rax, [rax+58h]
mov [rbp+var_40], rax
mov rax, [rbp+var_8]
mov rax, [rax+68h]
mov [rbp+var_38], rax
mov rax, [rbp+var_10]
mov [rbp+var_30], rax
cmp [rbp+var_18], 0
jz short loc_D82F3
mov rax, [rbp+var_18]
mov [rbp+var_50], rax
jmp short loc_D82FF
loc_D82F3:
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov [rbp+var_50], rax
loc_D82FF:
mov rax, [rbp+var_40]
mov rsi, [rbp+var_30]
mov rdi, [rbp+var_38]
mov rdx, [rbp+var_50]
call rax
mov rdi, [rbp+var_48]
mov esi, eax
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_18]
mov r8, [rbp+var_20]
call my_hash_first_from_hash_value
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
add rsp, 50h
pop rbp
retn
| long long my_hash_first(_QWORD *a1, long long a2, long long a3, long long a4)
{
unsigned int v4; // eax
long long ( *v6)(long long, long long, long long); // [rsp+10h] [rbp-40h]
long long v7; // [rsp+18h] [rbp-38h]
v6 = (long long ( *)(long long, long long, long long))a1[11];
v7 = a1[13];
if ( a3 )
v4 = v6(v7, a2, a3);
else
v4 = v6(v7, a2, a1[1]);
return my_hash_first_from_hash_value(a1, v4, a2, a3, a4);
}
| my_hash_first:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
JMP 0x001d82ba
LAB_001d82ba:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x58]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x68]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x30],RAX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001d82f3
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x001d82ff
LAB_001d82f3:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x50],RAX
LAB_001d82ff:
MOV RAX,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDI,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x50]
CALL RAX
MOV RDI,qword ptr [RBP + -0x48]
MOV ESI,EAX
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x18]
MOV R8,qword ptr [RBP + -0x20]
CALL 0x001d8380
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RSP,0x50
POP RBP
RET
|
int8 my_hash_first(long param_1,int8 param_2,long param_3,int8 param_4)
{
int4 uVar1;
int8 uVar2;
int8 local_58;
local_58 = param_3;
if (param_3 == 0) {
local_58 = *(long *)(param_1 + 8);
}
uVar1 = (**(code **)(param_1 + 0x58))(*(int8 *)(param_1 + 0x68),param_2,local_58);
uVar2 = my_hash_first_from_hash_value(param_1,uVar1,param_2,param_3,param_4);
return uVar2;
}
| |
40,525 | set_default_charset | eloqsql/libmariadb/libmariadb/mariadb_charset.c | my_bool set_default_charset(uint cs, myf flags __attribute__((unused)))
{
MARIADB_CHARSET_INFO *new_charset;
new_charset = mysql_get_charset_by_nr(cs);
if (!new_charset)
{
return(TRUE); /* error */
}
ma_default_charset_info = new_charset;
return(FALSE);
} | O0 | c | set_default_charset:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0x8(%rbp), %edi
callq 0x50640
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x50707
movb $0x1, -0x1(%rbp)
jmp 0x50719
movq -0x18(%rbp), %rcx
leaq 0x1e766(%rip), %rax # 0x6ee78
movq %rcx, (%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| set_default_charset:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], edi
mov [rbp+var_C], esi
mov edi, [rbp+var_8]
call mysql_get_charset_by_nr
mov [rbp+var_18], rax
cmp [rbp+var_18], 0
jnz short loc_50707
mov [rbp+var_1], 1
jmp short loc_50719
loc_50707:
mov rcx, [rbp+var_18]
lea rax, ma_default_charset_info
mov [rax], rcx
mov [rbp+var_1], 0
loc_50719:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
| char set_default_charset(int a1)
{
char *charset_by_nr; // [rsp+8h] [rbp-18h]
charset_by_nr = mysql_get_charset_by_nr(a1);
if ( !charset_by_nr )
return 1;
ma_default_charset_info = charset_by_nr;
return 0;
}
| set_default_charset:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x8],EDI
MOV dword ptr [RBP + -0xc],ESI
MOV EDI,dword ptr [RBP + -0x8]
CALL 0x00150640
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x00150707
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00150719
LAB_00150707:
MOV RCX,qword ptr [RBP + -0x18]
LEA RAX,[0x16ee78]
MOV qword ptr [RAX],RCX
MOV byte ptr [RBP + -0x1],0x0
LAB_00150719:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
int8 set_default_charset(int4 param_1)
{
long lVar1;
int8 *puVar2;
bool local_9;
lVar1 = mysql_get_charset_by_nr(param_1);
if (lVar1 != 0) {
puVar2 = &ma_default_charset_info;
ma_default_charset_info = lVar1;
}
else {
puVar2 = (int8 *)0x0;
}
local_9 = lVar1 == 0;
return CONCAT71((int7)((ulong)puVar2 >> 8),local_9);
}
| |
40,526 | my_coll_parser_scan_logical_position | eloqsql/strings/ctype-uca.c | static int
my_coll_parser_scan_logical_position(MY_COLL_RULE_PARSER *p,
my_wc_t *pwc, size_t limit)
{
MY_COLL_RULES *rules= p->rules;
MY_COLL_LEXEM *lexem= my_coll_parser_curr(p);
if (!lex_cmp(lexem, C_STRING_WITH_LEN("[first non-ignorable]")))
lexem->code= rules->uca->first_non_ignorable;
else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[last non-ignorable]")))
lexem->code= rules->uca->last_non_ignorable;
else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[first primary ignorable]")))
lexem->code= rules->uca->first_primary_ignorable;
else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[last primary ignorable]")))
lexem->code= rules->uca->last_primary_ignorable;
else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[first secondary ignorable]")))
lexem->code= rules->uca->first_secondary_ignorable;
else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[last secondary ignorable]")))
lexem->code= rules->uca->last_secondary_ignorable;
else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[first tertiary ignorable]")))
lexem->code= rules->uca->first_tertiary_ignorable;
else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[last tertiary ignorable]")))
lexem->code= rules->uca->last_tertiary_ignorable;
else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[first trailing]")))
lexem->code= rules->uca->first_trailing;
else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[last trailing]")))
lexem->code= rules->uca->last_trailing;
else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[first variable]")))
lexem->code= rules->uca->first_variable;
else if (!lex_cmp(lexem, C_STRING_WITH_LEN("[last variable]")))
lexem->code= rules->uca->last_variable;
else
return 0; /* Don't scan the next token */
if (!my_coll_rule_expand(pwc, limit, lexem->code))
{
/*
Logical position can not be in a contraction,
so the above call should never fail.
Let's assert in debug version and print
a nice error message in production version.
*/
DBUG_ASSERT(0);
return my_coll_parser_too_long_error(p, "Logical position");
}
return my_coll_parser_scan(p);
} | O0 | c | my_coll_parser_scan_logical_position:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0xf0(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x50d90
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
leaq 0x2c3e4(%rip), %rsi # 0x7de4f
movl $0x15, %edx
callq 0x51510
cmpl $0x0, %eax
jne 0x51a94
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x70(%rax), %rax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0x51d04
movq -0x30(%rbp), %rdi
leaq 0x2c3c6(%rip), %rsi # 0x7de65
movl $0x14, %edx
callq 0x51510
cmpl $0x0, %eax
jne 0x51ac8
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x78(%rax), %rax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0x51d02
movq -0x30(%rbp), %rdi
leaq 0x2c3a7(%rip), %rsi # 0x7de7a
movl $0x19, %edx
callq 0x51510
cmpl $0x0, %eax
jne 0x51aff
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x80(%rax), %rax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0x51d00
movq -0x30(%rbp), %rdi
leaq 0x2c38a(%rip), %rsi # 0x7de94
movl $0x18, %edx
callq 0x51510
cmpl $0x0, %eax
jne 0x51b36
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x88(%rax), %rax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0x51cfe
movq -0x30(%rbp), %rdi
leaq 0x2c36c(%rip), %rsi # 0x7dead
movl $0x1b, %edx
callq 0x51510
cmpl $0x0, %eax
jne 0x51b6d
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x90(%rax), %rax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0x51cfc
movq -0x30(%rbp), %rdi
leaq 0x2c351(%rip), %rsi # 0x7dec9
movl $0x1a, %edx
callq 0x51510
cmpl $0x0, %eax
jne 0x51ba4
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x98(%rax), %rax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0x51cfa
movq -0x30(%rbp), %rdi
leaq 0x2c335(%rip), %rsi # 0x7dee4
movl $0x1a, %edx
callq 0x51510
cmpl $0x0, %eax
jne 0x51bdb
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq 0xa0(%rax), %rax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0x51cf8
movq -0x30(%rbp), %rdi
leaq 0x2c319(%rip), %rsi # 0x7deff
movl $0x19, %edx
callq 0x51510
cmpl $0x0, %eax
jne 0x51c12
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq 0xa8(%rax), %rax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0x51cf6
movq -0x30(%rbp), %rdi
leaq 0x2c2fc(%rip), %rsi # 0x7df19
movl $0x10, %edx
callq 0x51510
cmpl $0x0, %eax
jne 0x51c49
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq 0xb0(%rax), %rax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0x51cf4
movq -0x30(%rbp), %rdi
leaq 0x2c2d6(%rip), %rsi # 0x7df2a
movl $0xf, %edx
callq 0x51510
cmpl $0x0, %eax
jne 0x51c7d
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq 0xb8(%rax), %rax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0x51cf2
movq -0x30(%rbp), %rdi
leaq 0x2c2b2(%rip), %rsi # 0x7df3a
movl $0x10, %edx
callq 0x51510
cmpl $0x0, %eax
jne 0x51cb1
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq 0xc0(%rax), %rax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0x51cf0
movq -0x30(%rbp), %rdi
leaq 0x2c28f(%rip), %rsi # 0x7df4b
movl $0xf, %edx
callq 0x51510
cmpl $0x0, %eax
jne 0x51ce5
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq 0xc8(%rax), %rax
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x24(%rax)
jmp 0x51cee
movl $0x0, -0x4(%rbp)
jmp 0x51d43
jmp 0x51cf0
jmp 0x51cf2
jmp 0x51cf4
jmp 0x51cf6
jmp 0x51cf8
jmp 0x51cfa
jmp 0x51cfc
jmp 0x51cfe
jmp 0x51d00
jmp 0x51d02
jmp 0x51d04
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x30(%rbp), %rax
movslq 0x24(%rax), %rdx
callq 0x51e60
cmpl $0x0, %eax
jne 0x51d37
jmp 0x51d20
jmp 0x51d22
movq -0x10(%rbp), %rdi
leaq 0x2c22e(%rip), %rsi # 0x7df5b
callq 0x51ed0
movl %eax, -0x4(%rbp)
jmp 0x51d43
movq -0x10(%rbp), %rdi
callq 0x51570
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| my_coll_parser_scan_logical_position:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax+0F0h]
mov [rbp+var_28], rax
mov rdi, [rbp+var_10]
call my_coll_parser_curr
mov [rbp+var_30], rax
mov rdi, [rbp+var_30]
lea rsi, aFirstNonIgnora; "[first non-ignorable]"
mov edx, 15h
call lex_cmp
cmp eax, 0
jnz short loc_51A94
mov rax, [rbp+var_28]
mov rax, [rax+8]
mov rax, [rax+70h]
mov ecx, eax
mov rax, [rbp+var_30]
mov [rax+24h], ecx
jmp loc_51D04
loc_51A94:
mov rdi, [rbp+var_30]
lea rsi, aLastNonIgnorab; "[last non-ignorable]"
mov edx, 14h
call lex_cmp
cmp eax, 0
jnz short loc_51AC8
mov rax, [rbp+var_28]
mov rax, [rax+8]
mov rax, [rax+78h]
mov ecx, eax
mov rax, [rbp+var_30]
mov [rax+24h], ecx
jmp loc_51D02
loc_51AC8:
mov rdi, [rbp+var_30]
lea rsi, aFirstPrimaryIg; "[first primary ignorable]"
mov edx, 19h
call lex_cmp
cmp eax, 0
jnz short loc_51AFF
mov rax, [rbp+var_28]
mov rax, [rax+8]
mov rax, [rax+80h]
mov ecx, eax
mov rax, [rbp+var_30]
mov [rax+24h], ecx
jmp loc_51D00
loc_51AFF:
mov rdi, [rbp+var_30]
lea rsi, aLastPrimaryIgn; "[last primary ignorable]"
mov edx, 18h
call lex_cmp
cmp eax, 0
jnz short loc_51B36
mov rax, [rbp+var_28]
mov rax, [rax+8]
mov rax, [rax+88h]
mov ecx, eax
mov rax, [rbp+var_30]
mov [rax+24h], ecx
jmp loc_51CFE
loc_51B36:
mov rdi, [rbp+var_30]
lea rsi, aFirstSecondary; "[first secondary ignorable]"
mov edx, 1Bh
call lex_cmp
cmp eax, 0
jnz short loc_51B6D
mov rax, [rbp+var_28]
mov rax, [rax+8]
mov rax, [rax+90h]
mov ecx, eax
mov rax, [rbp+var_30]
mov [rax+24h], ecx
jmp loc_51CFC
loc_51B6D:
mov rdi, [rbp+var_30]
lea rsi, aLastSecondaryI; "[last secondary ignorable]"
mov edx, 1Ah
call lex_cmp
cmp eax, 0
jnz short loc_51BA4
mov rax, [rbp+var_28]
mov rax, [rax+8]
mov rax, [rax+98h]
mov ecx, eax
mov rax, [rbp+var_30]
mov [rax+24h], ecx
jmp loc_51CFA
loc_51BA4:
mov rdi, [rbp+var_30]
lea rsi, aFirstTertiaryI; "[first tertiary ignorable]"
mov edx, 1Ah
call lex_cmp
cmp eax, 0
jnz short loc_51BDB
mov rax, [rbp+var_28]
mov rax, [rax+8]
mov rax, [rax+0A0h]
mov ecx, eax
mov rax, [rbp+var_30]
mov [rax+24h], ecx
jmp loc_51CF8
loc_51BDB:
mov rdi, [rbp+var_30]
lea rsi, aLastTertiaryIg; "[last tertiary ignorable]"
mov edx, 19h
call lex_cmp
cmp eax, 0
jnz short loc_51C12
mov rax, [rbp+var_28]
mov rax, [rax+8]
mov rax, [rax+0A8h]
mov ecx, eax
mov rax, [rbp+var_30]
mov [rax+24h], ecx
jmp loc_51CF6
loc_51C12:
mov rdi, [rbp+var_30]
lea rsi, aFirstTrailing; "[first trailing]"
mov edx, 10h
call lex_cmp
cmp eax, 0
jnz short loc_51C49
mov rax, [rbp+var_28]
mov rax, [rax+8]
mov rax, [rax+0B0h]
mov ecx, eax
mov rax, [rbp+var_30]
mov [rax+24h], ecx
jmp loc_51CF4
loc_51C49:
mov rdi, [rbp+var_30]
lea rsi, aLastTrailing; "[last trailing]"
mov edx, 0Fh
call lex_cmp
cmp eax, 0
jnz short loc_51C7D
mov rax, [rbp+var_28]
mov rax, [rax+8]
mov rax, [rax+0B8h]
mov ecx, eax
mov rax, [rbp+var_30]
mov [rax+24h], ecx
jmp short loc_51CF2
loc_51C7D:
mov rdi, [rbp+var_30]
lea rsi, aFirstVariable; "[first variable]"
mov edx, 10h
call lex_cmp
cmp eax, 0
jnz short loc_51CB1
mov rax, [rbp+var_28]
mov rax, [rax+8]
mov rax, [rax+0C0h]
mov ecx, eax
mov rax, [rbp+var_30]
mov [rax+24h], ecx
jmp short loc_51CF0
loc_51CB1:
mov rdi, [rbp+var_30]
lea rsi, aLastVariable; "[last variable]"
mov edx, 0Fh
call lex_cmp
cmp eax, 0
jnz short loc_51CE5
mov rax, [rbp+var_28]
mov rax, [rax+8]
mov rax, [rax+0C8h]
mov ecx, eax
mov rax, [rbp+var_30]
mov [rax+24h], ecx
jmp short loc_51CEE
loc_51CE5:
mov [rbp+var_4], 0
jmp short loc_51D43
loc_51CEE:
jmp short $+2
loc_51CF0:
jmp short $+2
loc_51CF2:
jmp short $+2
loc_51CF4:
jmp short $+2
loc_51CF6:
jmp short $+2
loc_51CF8:
jmp short $+2
loc_51CFA:
jmp short $+2
loc_51CFC:
jmp short $+2
loc_51CFE:
jmp short $+2
loc_51D00:
jmp short $+2
loc_51D02:
jmp short $+2
loc_51D04:
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rax, [rbp+var_30]
movsxd rdx, dword ptr [rax+24h]
call my_coll_rule_expand
cmp eax, 0
jnz short loc_51D37
jmp short $+2
loc_51D20:
jmp short $+2
loc_51D22:
mov rdi, [rbp+var_10]
lea rsi, aLogicalPositio; "Logical position"
call my_coll_parser_too_long_error
mov [rbp+var_4], eax
jmp short loc_51D43
loc_51D37:
mov rdi, [rbp+var_10]
call my_coll_parser_scan
mov [rbp+var_4], eax
loc_51D43:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long my_coll_parser_scan_logical_position(long long a1, long long a2, long long a3)
{
long long v4; // [rsp+0h] [rbp-30h]
long long v5; // [rsp+8h] [rbp-28h]
v5 = *(_QWORD *)(a1 + 240);
v4 = my_coll_parser_curr(a1);
if ( (unsigned int)lex_cmp(v4, (long long)"[first non-ignorable]", 0x15uLL) )
{
if ( (unsigned int)lex_cmp(v4, (long long)"[last non-ignorable]", 0x14uLL) )
{
if ( (unsigned int)lex_cmp(v4, (long long)"[first primary ignorable]", 0x19uLL) )
{
if ( (unsigned int)lex_cmp(v4, (long long)"[last primary ignorable]", 0x18uLL) )
{
if ( (unsigned int)lex_cmp(v4, (long long)"[first secondary ignorable]", 0x1BuLL) )
{
if ( (unsigned int)lex_cmp(v4, (long long)"[last secondary ignorable]", 0x1AuLL) )
{
if ( (unsigned int)lex_cmp(v4, (long long)"[first tertiary ignorable]", 0x1AuLL) )
{
if ( (unsigned int)lex_cmp(v4, (long long)"[last tertiary ignorable]", 0x19uLL) )
{
if ( (unsigned int)lex_cmp(v4, (long long)"[first trailing]", 0x10uLL) )
{
if ( (unsigned int)lex_cmp(v4, (long long)"[last trailing]", 0xFuLL) )
{
if ( (unsigned int)lex_cmp(v4, (long long)"[first variable]", 0x10uLL) )
{
if ( (unsigned int)lex_cmp(v4, (long long)"[last variable]", 0xFuLL) )
return 0;
*(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 200LL);
}
else
{
*(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 192LL);
}
}
else
{
*(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 184LL);
}
}
else
{
*(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 176LL);
}
}
else
{
*(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 168LL);
}
}
else
{
*(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 160LL);
}
}
else
{
*(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 152LL);
}
}
else
{
*(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 144LL);
}
}
else
{
*(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 136LL);
}
}
else
{
*(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 128LL);
}
}
else
{
*(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 120LL);
}
}
else
{
*(_DWORD *)(v4 + 36) = *(_QWORD *)(*(_QWORD *)(v5 + 8) + 112LL);
}
if ( (unsigned int)my_coll_rule_expand(a2, a3, *(int *)(v4 + 36)) )
return (unsigned int)my_coll_parser_scan(a1);
else
return (unsigned int)my_coll_parser_too_long_error(a1, "Logical position");
}
| my_coll_parser_scan_logical_position:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xf0]
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00150d90
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x30]
LEA RSI,[0x17de4f]
MOV EDX,0x15
CALL 0x00151510
CMP EAX,0x0
JNZ 0x00151a94
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x70]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0x24],ECX
JMP 0x00151d04
LAB_00151a94:
MOV RDI,qword ptr [RBP + -0x30]
LEA RSI,[0x17de65]
MOV EDX,0x14
CALL 0x00151510
CMP EAX,0x0
JNZ 0x00151ac8
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x78]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0x24],ECX
JMP 0x00151d02
LAB_00151ac8:
MOV RDI,qword ptr [RBP + -0x30]
LEA RSI,[0x17de7a]
MOV EDX,0x19
CALL 0x00151510
CMP EAX,0x0
JNZ 0x00151aff
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x80]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0x24],ECX
JMP 0x00151d00
LAB_00151aff:
MOV RDI,qword ptr [RBP + -0x30]
LEA RSI,[0x17de94]
MOV EDX,0x18
CALL 0x00151510
CMP EAX,0x0
JNZ 0x00151b36
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x88]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0x24],ECX
JMP 0x00151cfe
LAB_00151b36:
MOV RDI,qword ptr [RBP + -0x30]
LEA RSI,[0x17dead]
MOV EDX,0x1b
CALL 0x00151510
CMP EAX,0x0
JNZ 0x00151b6d
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x90]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0x24],ECX
JMP 0x00151cfc
LAB_00151b6d:
MOV RDI,qword ptr [RBP + -0x30]
LEA RSI,[0x17dec9]
MOV EDX,0x1a
CALL 0x00151510
CMP EAX,0x0
JNZ 0x00151ba4
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x98]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0x24],ECX
JMP 0x00151cfa
LAB_00151ba4:
MOV RDI,qword ptr [RBP + -0x30]
LEA RSI,[0x17dee4]
MOV EDX,0x1a
CALL 0x00151510
CMP EAX,0x0
JNZ 0x00151bdb
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0xa0]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0x24],ECX
JMP 0x00151cf8
LAB_00151bdb:
MOV RDI,qword ptr [RBP + -0x30]
LEA RSI,[0x17deff]
MOV EDX,0x19
CALL 0x00151510
CMP EAX,0x0
JNZ 0x00151c12
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0xa8]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0x24],ECX
JMP 0x00151cf6
LAB_00151c12:
MOV RDI,qword ptr [RBP + -0x30]
LEA RSI,[0x17df19]
MOV EDX,0x10
CALL 0x00151510
CMP EAX,0x0
JNZ 0x00151c49
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0xb0]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0x24],ECX
JMP 0x00151cf4
LAB_00151c49:
MOV RDI,qword ptr [RBP + -0x30]
LEA RSI,[0x17df2a]
MOV EDX,0xf
CALL 0x00151510
CMP EAX,0x0
JNZ 0x00151c7d
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0xb8]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0x24],ECX
JMP 0x00151cf2
LAB_00151c7d:
MOV RDI,qword ptr [RBP + -0x30]
LEA RSI,[0x17df3a]
MOV EDX,0x10
CALL 0x00151510
CMP EAX,0x0
JNZ 0x00151cb1
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0xc0]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0x24],ECX
JMP 0x00151cf0
LAB_00151cb1:
MOV RDI,qword ptr [RBP + -0x30]
LEA RSI,[0x17df4b]
MOV EDX,0xf
CALL 0x00151510
CMP EAX,0x0
JNZ 0x00151ce5
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0xc8]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0x24],ECX
JMP 0x00151cee
LAB_00151ce5:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00151d43
LAB_00151cee:
JMP 0x00151cf0
LAB_00151cf0:
JMP 0x00151cf2
LAB_00151cf2:
JMP 0x00151cf4
LAB_00151cf4:
JMP 0x00151cf6
LAB_00151cf6:
JMP 0x00151cf8
LAB_00151cf8:
JMP 0x00151cfa
LAB_00151cfa:
JMP 0x00151cfc
LAB_00151cfc:
JMP 0x00151cfe
LAB_00151cfe:
JMP 0x00151d00
LAB_00151d00:
JMP 0x00151d02
LAB_00151d02:
JMP 0x00151d04
LAB_00151d04:
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x30]
MOVSXD RDX,dword ptr [RAX + 0x24]
CALL 0x00151e60
CMP EAX,0x0
JNZ 0x00151d37
JMP 0x00151d20
LAB_00151d20:
JMP 0x00151d22
LAB_00151d22:
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x17df5b]
CALL 0x00151ed0
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00151d43
LAB_00151d37:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00151570
MOV dword ptr [RBP + -0x4],EAX
LAB_00151d43:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 my_coll_parser_scan_logical_position(long param_1,int8 param_2,int8 param_3)
{
long lVar1;
int iVar2;
long lVar3;
int4 local_c;
lVar1 = *(long *)(param_1 + 0xf0);
lVar3 = my_coll_parser_curr(param_1);
iVar2 = lex_cmp(lVar3,"[first non-ignorable]",0x15);
if (iVar2 == 0) {
*(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0x70);
}
else {
iVar2 = lex_cmp(lVar3,"[last non-ignorable]",0x14);
if (iVar2 == 0) {
*(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0x78);
}
else {
iVar2 = lex_cmp(lVar3,"[first primary ignorable]",0x19);
if (iVar2 == 0) {
*(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0x80);
}
else {
iVar2 = lex_cmp(lVar3,"[last primary ignorable]",0x18);
if (iVar2 == 0) {
*(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0x88);
}
else {
iVar2 = lex_cmp(lVar3,"[first secondary ignorable]",0x1b);
if (iVar2 == 0) {
*(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0x90);
}
else {
iVar2 = lex_cmp(lVar3,"[last secondary ignorable]",0x1a);
if (iVar2 == 0) {
*(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0x98);
}
else {
iVar2 = lex_cmp(lVar3,"[first tertiary ignorable]",0x1a);
if (iVar2 == 0) {
*(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0xa0);
}
else {
iVar2 = lex_cmp(lVar3,"[last tertiary ignorable]",0x19);
if (iVar2 == 0) {
*(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0xa8);
}
else {
iVar2 = lex_cmp(lVar3,"[first trailing]",0x10);
if (iVar2 == 0) {
*(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0xb0);
}
else {
iVar2 = lex_cmp(lVar3,"[last trailing]",0xf);
if (iVar2 == 0) {
*(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0xb8);
}
else {
iVar2 = lex_cmp(lVar3,"[first variable]",0x10);
if (iVar2 == 0) {
*(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 0xc0);
}
else {
iVar2 = lex_cmp(lVar3,"[last variable]",0xf);
if (iVar2 != 0) {
return 0;
}
*(int *)(lVar3 + 0x24) = (int)*(int8 *)(*(long *)(lVar1 + 8) + 200);
}
}
}
}
}
}
}
}
}
}
}
iVar2 = my_coll_rule_expand(param_2,param_3,(long)*(int *)(lVar3 + 0x24));
if (iVar2 == 0) {
local_c = my_coll_parser_too_long_error(param_1,"Logical position");
}
else {
local_c = my_coll_parser_scan(param_1);
}
return local_c;
}
| |
40,527 | translog_purge | eloqsql/storage/maria/ma_loghandler.c | my_bool translog_purge(TRANSLOG_ADDRESS low)
{
uint32 last_need_file= LSN_FILE_NO(low);
uint32 min_unsync;
int soft;
TRANSLOG_ADDRESS horizon= translog_get_horizon();
int rc= 0;
DBUG_ENTER("translog_purge");
DBUG_PRINT("enter", ("low: " LSN_FMT, LSN_IN_PARTS(low)));
DBUG_ASSERT(translog_status == TRANSLOG_OK ||
translog_status == TRANSLOG_READONLY);
soft= soft_sync;
min_unsync= soft_sync_min;
DBUG_PRINT("info", ("min_unsync: %lu", (ulong) min_unsync));
if (soft && min_unsync < last_need_file)
{
last_need_file= min_unsync;
DBUG_PRINT("info", ("last_need_file set to %lu", (ulong)last_need_file));
}
mysql_mutex_lock(&log_descriptor.purger_lock);
DBUG_PRINT("info", ("last_lsn_checked file: %lu:",
(ulong) log_descriptor.last_lsn_checked));
if (LSN_FILE_NO(log_descriptor.last_lsn_checked) < last_need_file)
{
uint32 i;
uint32 min_file= translog_first_file(horizon, 1);
DBUG_ASSERT(min_file != 0); /* log is already started */
DBUG_PRINT("info", ("min_file: %lu:",(ulong) min_file));
for(i= min_file; i < last_need_file && rc == 0; i++)
{
LSN lsn= translog_get_file_max_lsn_stored(i);
if (lsn == LSN_IMPOSSIBLE)
break; /* files are still in writing */
if (lsn == LSN_ERROR)
{
rc= 1;
break;
}
if (cmp_translog_addr(lsn, low) >= 0)
break;
DBUG_PRINT("info", ("purge file %lu", (ulong) i));
/* remove file descriptor from the cache */
/*
log_descriptor.min_file can be changed only here during execution
and the function is serialized, so we can access it without problems
*/
if (i >= log_descriptor.min_file)
{
TRANSLOG_FILE *file;
mysql_rwlock_wrlock(&log_descriptor.open_files_lock);
DBUG_ASSERT(log_descriptor.max_file - log_descriptor.min_file + 1 ==
log_descriptor.open_files.elements);
DBUG_ASSERT(log_descriptor.min_file == i);
file= *((TRANSLOG_FILE **)pop_dynamic(&log_descriptor.open_files));
DBUG_PRINT("info", ("Files : %d", log_descriptor.open_files.elements));
DBUG_ASSERT(i == file->number);
log_descriptor.min_file++;
DBUG_ASSERT(log_descriptor.max_file - log_descriptor.min_file + 1 ==
log_descriptor.open_files.elements);
mysql_rwlock_unlock(&log_descriptor.open_files_lock);
translog_close_log_file(file);
}
if (log_purge_type == TRANSLOG_PURGE_IMMIDIATE && ! log_purge_disabled)
{
char path[FN_REFLEN], *file_name;
file_name= translog_filename_by_fileno(i, path);
rc= MY_TEST(mysql_file_delete(key_file_translog,
file_name, MYF(MY_WME)));
}
}
if (unlikely(rc == 1))
log_descriptor.min_need_file= 0; /* impossible value */
else
log_descriptor.min_need_file= i;
}
mysql_mutex_unlock(&log_descriptor.purger_lock);
DBUG_RETURN(rc);
} | O0 | c | translog_purge:
pushq %rbp
movq %rsp, %rbp
subq $0x260, %rsp # imm = 0x260
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x218(%rbp)
movq -0x218(%rbp), %rax
sarq $0x20, %rax
movl %eax, -0x21c(%rbp)
callq 0xaa630
movq %rax, -0x230(%rbp)
movl $0x0, -0x234(%rbp)
jmp 0xad038
jmp 0xad03a
jmp 0xad03c
movb 0xc2f6f6(%rip), %al # 0xcdc738
movsbl %al, %eax
movl %eax, -0x224(%rbp)
movl 0xc2f6eb(%rip), %eax # 0xcdc73c
movl %eax, -0x220(%rbp)
jmp 0xad059
cmpl $0x0, -0x224(%rbp)
je 0xad080
movl -0x220(%rbp), %eax
cmpl -0x21c(%rbp), %eax
jae 0xad080
movl -0x220(%rbp), %eax
movl %eax, -0x21c(%rbp)
jmp 0xad07e
jmp 0xad080
leaq 0x42e789(%rip), %rdi # 0x4db810
addq $0x800e80, %rdi # imm = 0x800E80
leaq 0xdf0fe(%rip), %rsi # 0x18c193
movl $0x21d4, %edx # imm = 0x21D4
callq 0xa5790
jmp 0xad0a1
movq 0xc2f630(%rip), %rax # 0xcdc6d8
sarq $0x20, %rax
cmpl -0x21c(%rbp), %eax
jae 0xad2ad
movq -0x230(%rbp), %rdi
movl $0x1, %esi
callq 0xa7970
movl %eax, -0x23c(%rbp)
jmp 0xad0d1
jmp 0xad0d3
jmp 0xad0d5
movl -0x23c(%rbp), %eax
movl %eax, -0x238(%rbp)
movl -0x238(%rbp), %ecx
xorl %eax, %eax
cmpl -0x21c(%rbp), %ecx
movb %al, -0x259(%rbp)
jae 0xad107
cmpl $0x0, -0x234(%rbp)
sete %al
movb %al, -0x259(%rbp)
movb -0x259(%rbp), %al
testb $0x1, %al
jne 0xad116
jmp 0xad271
movl -0x238(%rbp), %edi
callq 0xa5670
movq %rax, -0x248(%rbp)
cmpq $0x0, -0x248(%rbp)
jne 0xad137
jmp 0xad271
cmpq $0x1, -0x248(%rbp)
jne 0xad150
movl $0x1, -0x234(%rbp)
jmp 0xad271
movq -0x248(%rbp), %rax
subq -0x218(%rbp), %rax
cmpq $0x0, %rax
jl 0xad169
jmp 0xad271
jmp 0xad16b
jmp 0xad16d
movl -0x238(%rbp), %eax
cmpl 0x42e8eb(%rip), %eax # 0x4dba64
jb 0xad1f3
leaq 0x42e68e(%rip), %rdi # 0x4db810
addq $0x258, %rdi # imm = 0x258
leaq 0xdf003(%rip), %rsi # 0x18c193
movl $0x21f4, %edx # imm = 0x21F4
callq 0xad300
jmp 0xad19c
jmp 0xad19e
jmp 0xad1a0
leaq 0x42e669(%rip), %rdi # 0x4db810
addq $0x228, %rdi # imm = 0x228
callq 0x105050
movq (%rax), %rax
movq %rax, -0x250(%rbp)
jmp 0xad1bf
jmp 0xad1c1
jmp 0xad1c3
movl 0x42e89b(%rip), %eax # 0x4dba64
addl $0x1, %eax
movl %eax, 0x42e892(%rip) # 0x4dba64
jmp 0xad1d4
leaq 0x42e635(%rip), %rdi # 0x4db810
addq $0x258, %rdi # imm = 0x258
callq 0xad370
movq -0x250(%rbp), %rdi
callq 0xa9870
cmpq $0x0, 0x42d3ed(%rip) # 0x4da5e8
jne 0xad25b
cmpl $0x0, 0x42d3dc(%rip) # 0x4da5e0
jne 0xad25b
movl -0x238(%rbp), %edi
leaq -0x210(%rbp), %rsi
callq 0xa5290
movq %rax, -0x258(%rbp)
leaq 0x42cf3e(%rip), %rax # 0x4da164
movl (%rax), %edi
movq -0x258(%rbp), %rcx
leaq 0xdef5d(%rip), %rsi # 0x18c193
movl $0x2206, %edx # imm = 0x2206
movl $0x10, %r8d
callq 0xad3e0
movl %eax, %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x234(%rbp)
jmp 0xad25d
movl -0x238(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x238(%rbp)
jmp 0xad0e1
cmpl $0x1, -0x234(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0xad29f
movl $0x0, 0xc2f3eb(%rip) # 0xcdc688
jmp 0xad2ab
movl -0x238(%rbp), %eax
movl %eax, 0xc2f3dd(%rip) # 0xcdc688
jmp 0xad2ad
leaq 0x42e55c(%rip), %rdi # 0x4db810
addq $0x800e80, %rdi # imm = 0x800E80
callq 0xa5800
movl -0x234(%rbp), %eax
movb %al, -0x25a(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xad2ed
movb -0x25a(%rbp), %al
addq $0x260, %rsp # imm = 0x260
popq %rbp
retq
callq 0x2c290
nopw %cs:(%rax,%rax)
| translog_purge:
push rbp
mov rbp, rsp
sub rsp, 260h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_218], rdi
mov rax, [rbp+var_218]
sar rax, 20h
mov [rbp+var_21C], eax
call translog_get_horizon
mov [rbp+var_230], rax
mov [rbp+var_234], 0
jmp short $+2
loc_AD038:
jmp short $+2
loc_AD03A:
jmp short $+2
loc_AD03C:
mov al, cs:soft_sync
movsx eax, al
mov [rbp+var_224], eax
mov eax, cs:soft_sync_min
mov [rbp+var_220], eax
jmp short $+2
loc_AD059:
cmp [rbp+var_224], 0
jz short loc_AD080
mov eax, [rbp+var_220]
cmp eax, [rbp+var_21C]
jnb short loc_AD080
mov eax, [rbp+var_220]
mov [rbp+var_21C], eax
jmp short $+2
loc_AD07E:
jmp short $+2
loc_AD080:
lea rdi, log_descriptor
add rdi, 800E80h
lea rsi, aWorkspaceLlm4b_20; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 21D4h
call inline_mysql_mutex_lock_13
jmp short $+2
loc_AD0A1:
mov rax, cs:qword_CDC6D8
sar rax, 20h
cmp eax, [rbp+var_21C]
jnb loc_AD2AD
mov rdi, [rbp+var_230]
mov esi, 1
call translog_first_file
mov [rbp+var_23C], eax
jmp short $+2
loc_AD0D1:
jmp short $+2
loc_AD0D3:
jmp short $+2
loc_AD0D5:
mov eax, [rbp+var_23C]
mov [rbp+var_238], eax
loc_AD0E1:
mov ecx, [rbp+var_238]
xor eax, eax
cmp ecx, [rbp+var_21C]
mov [rbp+var_259], al
jnb short loc_AD107
cmp [rbp+var_234], 0
setz al
mov [rbp+var_259], al
loc_AD107:
mov al, [rbp+var_259]
test al, 1
jnz short loc_AD116
jmp loc_AD271
loc_AD116:
mov edi, [rbp+var_238]
call translog_get_file_max_lsn_stored
mov [rbp+var_248], rax
cmp [rbp+var_248], 0
jnz short loc_AD137
jmp loc_AD271
loc_AD137:
cmp [rbp+var_248], 1
jnz short loc_AD150
mov [rbp+var_234], 1
jmp loc_AD271
loc_AD150:
mov rax, [rbp+var_248]
sub rax, [rbp+var_218]
cmp rax, 0
jl short loc_AD169
jmp loc_AD271
loc_AD169:
jmp short $+2
loc_AD16B:
jmp short $+2
loc_AD16D:
mov eax, [rbp+var_238]
cmp eax, cs:dword_4DBA64
jb short loc_AD1F3
lea rdi, log_descriptor
add rdi, 258h
lea rsi, aWorkspaceLlm4b_20; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 21F4h
call inline_mysql_rwlock_wrlock_1
jmp short $+2
loc_AD19C:
jmp short $+2
loc_AD19E:
jmp short $+2
loc_AD1A0:
lea rdi, log_descriptor
add rdi, 228h
call pop_dynamic
mov rax, [rax]
mov [rbp+var_250], rax
jmp short $+2
loc_AD1BF:
jmp short $+2
loc_AD1C1:
jmp short $+2
loc_AD1C3:
mov eax, cs:dword_4DBA64
add eax, 1
mov cs:dword_4DBA64, eax
jmp short $+2
loc_AD1D4:
lea rdi, log_descriptor
add rdi, 258h
call inline_mysql_rwlock_unlock_2
mov rdi, [rbp+var_250]
call translog_close_log_file
loc_AD1F3:
cmp cs:log_purge_type, 0
jnz short loc_AD25B
cmp cs:log_purge_disabled, 0
jnz short loc_AD25B
mov edi, [rbp+var_238]
lea rsi, [rbp+var_210]
call translog_filename_by_fileno
mov [rbp+var_258], rax
lea rax, key_file_translog
mov edi, [rax]
mov rcx, [rbp+var_258]
lea rsi, aWorkspaceLlm4b_20; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 2206h
mov r8d, 10h
call inline_mysql_file_delete_2
mov edx, eax
xor eax, eax
mov ecx, 1
cmp edx, 0
cmovnz eax, ecx
mov [rbp+var_234], eax
loc_AD25B:
jmp short $+2
loc_AD25D:
mov eax, [rbp+var_238]
add eax, 1
mov [rbp+var_238], eax
jmp loc_AD0E1
loc_AD271:
cmp [rbp+var_234], 1
setz al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_AD29F
mov cs:dword_CDC688, 0
jmp short loc_AD2AB
loc_AD29F:
mov eax, [rbp+var_238]
mov cs:dword_CDC688, eax
loc_AD2AB:
jmp short $+2
loc_AD2AD:
lea rdi, log_descriptor
add rdi, 800E80h
call inline_mysql_mutex_unlock_14
mov eax, [rbp+var_234]
mov [rbp+var_25A], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_AD2ED
mov al, [rbp+var_25A]
add rsp, 260h
pop rbp
retn
loc_AD2ED:
call ___stack_chk_fail
| bool translog_purge(long long a1)
{
long long v1; // rdx
long long v2; // rcx
int v3; // r8d
int v4; // r9d
bool v6; // [rsp+7h] [rbp-259h]
long long v7; // [rsp+8h] [rbp-258h]
long long v8; // [rsp+10h] [rbp-250h]
unsigned long long file_max_lsn_stored; // [rsp+18h] [rbp-248h]
unsigned int i; // [rsp+28h] [rbp-238h]
BOOL v11; // [rsp+2Ch] [rbp-234h]
long long horizon; // [rsp+30h] [rbp-230h]
unsigned int v13; // [rsp+44h] [rbp-21Ch]
_BYTE v14[520]; // [rsp+50h] [rbp-210h] BYREF
unsigned long long v15; // [rsp+258h] [rbp-8h]
v15 = __readfsqword(0x28u);
v13 = HIDWORD(a1);
horizon = translog_get_horizon();
v11 = 0;
if ( soft_sync && (unsigned int)soft_sync_min < HIDWORD(a1) )
v13 = soft_sync_min;
inline_mysql_mutex_lock_13(
(long long)&log_descriptor[1049040],
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x21D4u);
if ( HIDWORD(qword_CDC6D8) < v13 )
{
for ( i = translog_first_file(horizon, 1); ; ++i )
{
v6 = 0;
if ( i < v13 )
v6 = !v11;
if ( !v6 )
break;
file_max_lsn_stored = translog_get_file_max_lsn_stored(i);
if ( !file_max_lsn_stored )
break;
if ( file_max_lsn_stored == 1 )
{
v11 = 1;
break;
}
if ( (long long)(file_max_lsn_stored - a1) >= 0 )
break;
if ( i >= dword_4DBA64 )
{
inline_mysql_rwlock_wrlock_1(
&log_descriptor[75],
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
8692LL);
v8 = *(_QWORD *)pop_dynamic(&log_descriptor[69]);
++dword_4DBA64;
inline_mysql_rwlock_unlock_2(&log_descriptor[75]);
translog_close_log_file(v8);
}
if ( !log_purge_type && !log_purge_disabled )
{
v7 = translog_filename_by_fileno(i, (long long)v14, v1, v2, v3, v4);
v11 = inline_mysql_file_delete_2(
key_file_translog,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
8710LL,
v7,
16LL) != 0;
}
}
if ( v11 )
dword_CDC688 = 0;
else
dword_CDC688 = i;
}
inline_mysql_mutex_unlock_14((long long)&log_descriptor[1049040]);
return v11;
}
| translog_purge:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x260
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x218],RDI
MOV RAX,qword ptr [RBP + -0x218]
SAR RAX,0x20
MOV dword ptr [RBP + -0x21c],EAX
CALL 0x001aa630
MOV qword ptr [RBP + -0x230],RAX
MOV dword ptr [RBP + -0x234],0x0
JMP 0x001ad038
LAB_001ad038:
JMP 0x001ad03a
LAB_001ad03a:
JMP 0x001ad03c
LAB_001ad03c:
MOV AL,byte ptr [0x00ddc738]
MOVSX EAX,AL
MOV dword ptr [RBP + -0x224],EAX
MOV EAX,dword ptr [0x00ddc73c]
MOV dword ptr [RBP + -0x220],EAX
JMP 0x001ad059
LAB_001ad059:
CMP dword ptr [RBP + -0x224],0x0
JZ 0x001ad080
MOV EAX,dword ptr [RBP + -0x220]
CMP EAX,dword ptr [RBP + -0x21c]
JNC 0x001ad080
MOV EAX,dword ptr [RBP + -0x220]
MOV dword ptr [RBP + -0x21c],EAX
JMP 0x001ad07e
LAB_001ad07e:
JMP 0x001ad080
LAB_001ad080:
LEA RDI,[0x5db810]
ADD RDI,0x800e80
LEA RSI,[0x28c193]
MOV EDX,0x21d4
CALL 0x001a5790
JMP 0x001ad0a1
LAB_001ad0a1:
MOV RAX,qword ptr [0x00ddc6d8]
SAR RAX,0x20
CMP EAX,dword ptr [RBP + -0x21c]
JNC 0x001ad2ad
MOV RDI,qword ptr [RBP + -0x230]
MOV ESI,0x1
CALL 0x001a7970
MOV dword ptr [RBP + -0x23c],EAX
JMP 0x001ad0d1
LAB_001ad0d1:
JMP 0x001ad0d3
LAB_001ad0d3:
JMP 0x001ad0d5
LAB_001ad0d5:
MOV EAX,dword ptr [RBP + -0x23c]
MOV dword ptr [RBP + -0x238],EAX
LAB_001ad0e1:
MOV ECX,dword ptr [RBP + -0x238]
XOR EAX,EAX
CMP ECX,dword ptr [RBP + -0x21c]
MOV byte ptr [RBP + -0x259],AL
JNC 0x001ad107
CMP dword ptr [RBP + -0x234],0x0
SETZ AL
MOV byte ptr [RBP + -0x259],AL
LAB_001ad107:
MOV AL,byte ptr [RBP + -0x259]
TEST AL,0x1
JNZ 0x001ad116
JMP 0x001ad271
LAB_001ad116:
MOV EDI,dword ptr [RBP + -0x238]
CALL 0x001a5670
MOV qword ptr [RBP + -0x248],RAX
CMP qword ptr [RBP + -0x248],0x0
JNZ 0x001ad137
JMP 0x001ad271
LAB_001ad137:
CMP qword ptr [RBP + -0x248],0x1
JNZ 0x001ad150
MOV dword ptr [RBP + -0x234],0x1
JMP 0x001ad271
LAB_001ad150:
MOV RAX,qword ptr [RBP + -0x248]
SUB RAX,qword ptr [RBP + -0x218]
CMP RAX,0x0
JL 0x001ad169
JMP 0x001ad271
LAB_001ad169:
JMP 0x001ad16b
LAB_001ad16b:
JMP 0x001ad16d
LAB_001ad16d:
MOV EAX,dword ptr [RBP + -0x238]
CMP EAX,dword ptr [0x005dba64]
JC 0x001ad1f3
LEA RDI,[0x5db810]
ADD RDI,0x258
LEA RSI,[0x28c193]
MOV EDX,0x21f4
CALL 0x001ad300
JMP 0x001ad19c
LAB_001ad19c:
JMP 0x001ad19e
LAB_001ad19e:
JMP 0x001ad1a0
LAB_001ad1a0:
LEA RDI,[0x5db810]
ADD RDI,0x228
CALL 0x00205050
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x250],RAX
JMP 0x001ad1bf
LAB_001ad1bf:
JMP 0x001ad1c1
LAB_001ad1c1:
JMP 0x001ad1c3
LAB_001ad1c3:
MOV EAX,dword ptr [0x005dba64]
ADD EAX,0x1
MOV dword ptr [0x005dba64],EAX
JMP 0x001ad1d4
LAB_001ad1d4:
LEA RDI,[0x5db810]
ADD RDI,0x258
CALL 0x001ad370
MOV RDI,qword ptr [RBP + -0x250]
CALL 0x001a9870
LAB_001ad1f3:
CMP qword ptr [0x005da5e8],0x0
JNZ 0x001ad25b
CMP dword ptr [0x005da5e0],0x0
JNZ 0x001ad25b
MOV EDI,dword ptr [RBP + -0x238]
LEA RSI,[RBP + -0x210]
CALL 0x001a5290
MOV qword ptr [RBP + -0x258],RAX
LEA RAX,[0x5da164]
MOV EDI,dword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x258]
LEA RSI,[0x28c193]
MOV EDX,0x2206
MOV R8D,0x10
CALL 0x001ad3e0
MOV EDX,EAX
XOR EAX,EAX
MOV ECX,0x1
CMP EDX,0x0
CMOVNZ EAX,ECX
MOV dword ptr [RBP + -0x234],EAX
LAB_001ad25b:
JMP 0x001ad25d
LAB_001ad25d:
MOV EAX,dword ptr [RBP + -0x238]
ADD EAX,0x1
MOV dword ptr [RBP + -0x238],EAX
JMP 0x001ad0e1
LAB_001ad271:
CMP dword ptr [RBP + -0x234],0x1
SETZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x001ad29f
MOV dword ptr [0x00ddc688],0x0
JMP 0x001ad2ab
LAB_001ad29f:
MOV EAX,dword ptr [RBP + -0x238]
MOV dword ptr [0x00ddc688],EAX
LAB_001ad2ab:
JMP 0x001ad2ad
LAB_001ad2ad:
LEA RDI,[0x5db810]
ADD RDI,0x800e80
CALL 0x001a5800
MOV EAX,dword ptr [RBP + -0x234]
MOV byte ptr [RBP + -0x25a],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001ad2ed
MOV AL,byte ptr [RBP + -0x25a]
ADD RSP,0x260
POP RBP
RET
LAB_001ad2ed:
CALL 0x0012c290
|
int8 translog_purge(long param_1)
{
int iVar1;
int8 uVar2;
long lVar3;
int8 *puVar4;
long in_FS_OFFSET;
bool bVar5;
uint local_240;
uint local_224;
int1 local_218 [520];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_224 = (uint)((ulong)param_1 >> 0x20);
uVar2 = translog_get_horizon();
bVar5 = false;
if ((soft_sync != '\0') && (soft_sync_min < local_224)) {
local_224 = soft_sync_min;
}
inline_mysql_mutex_lock
(&DAT_00ddc690,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x21d4);
if ((uint)((ulong)DAT_00ddc6d8 >> 0x20) < local_224) {
local_240 = translog_first_file(uVar2,1);
while( true ) {
if ((local_224 <= local_240 || bVar5) ||
(lVar3 = translog_get_file_max_lsn_stored(local_240), lVar3 == 0)) goto LAB_001ad271;
if (lVar3 == 1) break;
if (-1 < lVar3 - param_1) goto LAB_001ad271;
if (DAT_005dba64 <= local_240) {
inline_mysql_rwlock_wrlock
(&DAT_005dba68,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",0x21f4);
puVar4 = (int8 *)pop_dynamic(&DAT_005dba38);
uVar2 = *puVar4;
DAT_005dba64 = DAT_005dba64 + 1;
inline_mysql_rwlock_unlock(&DAT_005dba68);
translog_close_log_file(uVar2);
}
if ((log_purge_type == 0) && (log_purge_disabled == 0)) {
uVar2 = translog_filename_by_fileno(local_240,local_218);
iVar1 = inline_mysql_file_delete
(key_file_translog,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",
0x2206,uVar2,0x10);
bVar5 = iVar1 != 0;
}
local_240 = local_240 + 1;
}
bVar5 = true;
LAB_001ad271:
if (bVar5) {
DAT_00ddc688 = 0;
}
else {
DAT_00ddc688 = local_240;
}
}
inline_mysql_mutex_unlock(&DAT_00ddc690);
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),bVar5);
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
40,528 | glfwPlatformGetVideoMode | untodesu[P]riteg/build_O0/_deps/glfw-src/src/x11_monitor.c | void _glfwPlatformGetVideoMode(_GLFWmonitor* monitor, GLFWvidmode* mode)
{
if (_glfw.x11.randr.available && !_glfw.x11.randr.monitorBroken)
{
XRRScreenResources* sr;
XRRCrtcInfo* ci;
sr = XRRGetScreenResourcesCurrent(_glfw.x11.display, _glfw.x11.root);
ci = XRRGetCrtcInfo(_glfw.x11.display, sr, monitor->x11.crtc);
*mode = vidmodeFromModeInfo(getModeInfo(sr, ci->mode), ci);
XRRFreeCrtcInfo(ci);
XRRFreeScreenResources(sr);
}
else
{
mode->width = DisplayWidth(_glfw.x11.display, _glfw.x11.screen);
mode->height = DisplayHeight(_glfw.x11.display, _glfw.x11.screen);
mode->refreshRate = 0;
_glfwSplitBPP(DefaultDepth(_glfw.x11.display, _glfw.x11.screen),
&mode->redBits, &mode->greenBits, &mode->blueBits);
}
} | O0 | c | glfwPlatformGetVideoMode:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0xb1e01(%rip), %rax # 0xe0c68
cmpl $0x0, 0x20570(%rax)
je 0x2ef5a
leaq 0xb1ded(%rip), %rax # 0xe0c68
cmpl $0x0, 0x20594(%rax)
jne 0x2ef5a
leaq 0xb1dd9(%rip), %rax # 0xe0c68
movq 0x205e8(%rax), %rax
leaq 0xb1dcb(%rip), %rcx # 0xe0c68
movq 0x1fec0(%rcx), %rdi
leaq 0xb1dbd(%rip), %rcx # 0xe0c68
movq 0x1fed0(%rcx), %rsi
callq *%rax
movq %rax, -0x18(%rbp)
leaq 0xb1da9(%rip), %rax # 0xe0c68
movq 0x205d0(%rax), %rax
leaq 0xb1d9b(%rip), %rcx # 0xe0c68
movq 0x1fec0(%rcx), %rdi
movq -0x18(%rbp), %rsi
movq -0x8(%rbp), %rcx
movq 0x90(%rcx), %rdx
callq *%rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x2f020
movq %rax, %rsi
movq -0x20(%rbp), %rdx
leaq -0x38(%rbp), %rdi
callq 0x2f0c0
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rcx, (%rax)
movq -0x30(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0xb1d34(%rip), %rax # 0xe0c68
movq 0x205a0(%rax), %rax
movq -0x20(%rbp), %rdi
callq *%rax
leaq 0xb1d20(%rip), %rax # 0xe0c68
movq 0x205b8(%rax), %rax
movq -0x18(%rbp), %rdi
callq *%rax
jmp 0x2f016
leaq 0xb1d07(%rip), %rax # 0xe0c68
movq 0x1fec0(%rax), %rax
movq 0xe8(%rax), %rax
leaq 0xb1cf2(%rip), %rcx # 0xe0c68
movslq 0x1fec8(%rcx), %rcx
shlq $0x7, %rcx
addq %rcx, %rax
movl 0x18(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
leaq 0xb1cd4(%rip), %rax # 0xe0c68
movq 0x1fec0(%rax), %rax
movq 0xe8(%rax), %rax
leaq 0xb1cbf(%rip), %rcx # 0xe0c68
movslq 0x1fec8(%rcx), %rcx
shlq $0x7, %rcx
addq %rcx, %rax
movl 0x1c(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x14(%rax)
leaq 0xb1c95(%rip), %rax # 0xe0c68
movq 0x1fec0(%rax), %rax
movq 0xe8(%rax), %rax
leaq 0xb1c80(%rip), %rcx # 0xe0c68
movslq 0x1fec8(%rcx), %rcx
shlq $0x7, %rcx
addq %rcx, %rax
movl 0x38(%rax), %edi
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
movq -0x10(%rbp), %rdx
addq $0xc, %rdx
movq -0x10(%rbp), %rcx
addq $0x10, %rcx
callq 0x269f0
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
| _glfwPlatformGetVideoMode:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
lea rax, _glfw
cmp dword ptr ds:loc_20570[rax], 0
jz loc_2EF5A
lea rax, _glfw
cmp dword ptr ds:loc_20594[rax], 0
jnz loc_2EF5A
lea rax, _glfw
mov rax, [rax+205E8h]
lea rcx, _glfw
mov rdi, qword ptr ds:loc_1FEC0[rcx]
lea rcx, _glfw
mov rsi, [rcx+1FED0h]
call rax
mov [rbp+var_18], rax
lea rax, _glfw
mov rax, [rax+205D0h]
lea rcx, _glfw
mov rdi, qword ptr ds:loc_1FEC0[rcx]
mov rsi, [rbp+var_18]
mov rcx, [rbp+var_8]
mov rdx, [rcx+90h]
call rax
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov [rbp+var_40], rax
mov rdi, [rbp+var_18]
mov rax, [rbp+var_20]
mov rsi, [rax+18h]
call getModeInfo
mov rsi, rax
mov rdx, [rbp+var_20]
lea rdi, [rbp+var_38]
call vidmodeFromModeInfo
mov rax, [rbp+var_40]
mov rcx, [rbp+var_38]
mov [rax], rcx
mov rcx, [rbp+var_30]
mov [rax+8], rcx
mov rcx, [rbp+var_28]
mov [rax+10h], rcx
lea rax, _glfw
mov rax, qword ptr ds:loc_205A0[rax]
mov rdi, [rbp+var_20]
call rax
lea rax, _glfw
mov rax, [rax+205B8h]
mov rdi, [rbp+var_18]
call rax
jmp loc_2F016
loc_2EF5A:
lea rax, _glfw
mov rax, qword ptr ds:loc_1FEC0[rax]
mov rax, [rax+0E8h]
lea rcx, _glfw
movsxd rcx, dword ptr [rcx+1FEC8h]
shl rcx, 7
add rax, rcx
mov ecx, [rax+18h]
mov rax, [rbp+var_10]
mov [rax], ecx
lea rax, _glfw
mov rax, qword ptr ds:loc_1FEC0[rax]
mov rax, [rax+0E8h]
lea rcx, _glfw
movsxd rcx, dword ptr [rcx+1FEC8h]
shl rcx, 7
add rax, rcx
mov ecx, [rax+1Ch]
mov rax, [rbp+var_10]
mov [rax+4], ecx
mov rax, [rbp+var_10]
mov dword ptr [rax+14h], 0
lea rax, _glfw
mov rax, qword ptr ds:loc_1FEC0[rax]
mov rax, [rax+0E8h]
lea rcx, _glfw
movsxd rcx, dword ptr [rcx+1FEC8h]
shl rcx, 7
add rax, rcx
mov edi, [rax+38h]
mov rsi, [rbp+var_10]
add rsi, 8
mov rdx, [rbp+var_10]
add rdx, 0Ch
mov rcx, [rbp+var_10]
add rcx, 10h
call _glfwSplitBPP
loc_2F016:
add rsp, 40h
pop rbp
retn
| int * glfwPlatformGetVideoMode(long long a1, _DWORD *a2)
{
long long ModeInfo; // rsi
_QWORD *v4; // [rsp+0h] [rbp-40h]
_QWORD v5[3]; // [rsp+8h] [rbp-38h] BYREF
long long v6; // [rsp+20h] [rbp-20h]
long long v7; // [rsp+28h] [rbp-18h]
_DWORD *v8; // [rsp+30h] [rbp-10h]
long long v9; // [rsp+38h] [rbp-8h]
v9 = a1;
v8 = a2;
if ( !*(_DWORD *)((char *)&loc_20570 + (_QWORD)glfw) || *(_DWORD *)((char *)&loc_20594 + (_QWORD)glfw) )
{
*v8 = *(_DWORD *)(((long long)(int)glfw[32690] << 7)
+ *(_QWORD *)(*(_QWORD *)((char *)&loc_1FEC0 + (_QWORD)glfw) + 232LL)
+ 24);
v8[1] = *(_DWORD *)(((long long)(int)glfw[32690] << 7)
+ *(_QWORD *)(*(_QWORD *)((char *)&loc_1FEC0 + (_QWORD)glfw) + 232LL)
+ 28);
v8[5] = 0;
return glfwSplitBPP(
*(_DWORD *)(((long long)(int)glfw[32690] << 7)
+ *(_QWORD *)(*(_QWORD *)((char *)&loc_1FEC0 + (_QWORD)glfw) + 232LL)
+ 56),
v8 + 2,
v8 + 3,
v8 + 4);
}
else
{
v7 = (*(long long ( **)(_QWORD, _QWORD))&glfw[33146])(
*(_QWORD *)((char *)&loc_1FEC0 + (_QWORD)glfw),
*(_QWORD *)&glfw[32692]);
v6 = (*(long long ( **)(_QWORD, long long, _QWORD))&glfw[33140])(
*(_QWORD *)((char *)&loc_1FEC0 + (_QWORD)glfw),
v7,
*(_QWORD *)(v9 + 144));
v4 = v8;
ModeInfo = getModeInfo(v7, *(_QWORD *)(v6 + 24));
vidmodeFromModeInfo(v5, ModeInfo, v6);
*v4 = v5[0];
v4[1] = v5[1];
v4[2] = v5[2];
(*(void ( **)(long long))((char *)&loc_205A0 + (_QWORD)glfw))(v6);
return (int *)(*(long long ( **)(long long))&glfw[33134])(v7);
}
}
| _glfwPlatformGetVideoMode:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
LEA RAX,[0x1e0c68]
CMP dword ptr [RAX + 0x20570],0x0
JZ 0x0012ef5a
LEA RAX,[0x1e0c68]
CMP dword ptr [RAX + 0x20594],0x0
JNZ 0x0012ef5a
LEA RAX,[0x1e0c68]
MOV RAX,qword ptr [RAX + 0x205e8]
LEA RCX,[0x1e0c68]
MOV RDI,qword ptr [RCX + 0x1fec0]
LEA RCX,[0x1e0c68]
MOV RSI,qword ptr [RCX + 0x1fed0]
CALL RAX
MOV qword ptr [RBP + -0x18],RAX
LEA RAX,[0x1e0c68]
MOV RAX,qword ptr [RAX + 0x205d0]
LEA RCX,[0x1e0c68]
MOV RDI,qword ptr [RCX + 0x1fec0]
MOV RSI,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RCX + 0x90]
CALL RAX
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RAX + 0x18]
CALL 0x0012f020
MOV RSI,RAX
MOV RDX,qword ptr [RBP + -0x20]
LEA RDI,[RBP + -0x38]
CALL 0x0012f0c0
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + 0x8],RCX
MOV RCX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x10],RCX
LEA RAX,[0x1e0c68]
MOV RAX,qword ptr [RAX + 0x205a0]
MOV RDI,qword ptr [RBP + -0x20]
CALL RAX
LEA RAX,[0x1e0c68]
MOV RAX,qword ptr [RAX + 0x205b8]
MOV RDI,qword ptr [RBP + -0x18]
CALL RAX
JMP 0x0012f016
LAB_0012ef5a:
LEA RAX,[0x1e0c68]
MOV RAX,qword ptr [RAX + 0x1fec0]
MOV RAX,qword ptr [RAX + 0xe8]
LEA RCX,[0x1e0c68]
MOVSXD RCX,dword ptr [RCX + 0x1fec8]
SHL RCX,0x7
ADD RAX,RCX
MOV ECX,dword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX],ECX
LEA RAX,[0x1e0c68]
MOV RAX,qword ptr [RAX + 0x1fec0]
MOV RAX,qword ptr [RAX + 0xe8]
LEA RCX,[0x1e0c68]
MOVSXD RCX,dword ptr [RCX + 0x1fec8]
SHL RCX,0x7
ADD RAX,RCX
MOV ECX,dword ptr [RAX + 0x1c]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x4],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x14],0x0
LEA RAX,[0x1e0c68]
MOV RAX,qword ptr [RAX + 0x1fec0]
MOV RAX,qword ptr [RAX + 0xe8]
LEA RCX,[0x1e0c68]
MOVSXD RCX,dword ptr [RCX + 0x1fec8]
SHL RCX,0x7
ADD RAX,RCX
MOV EDI,dword ptr [RAX + 0x38]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x8
MOV RDX,qword ptr [RBP + -0x10]
ADD RDX,0xc
MOV RCX,qword ptr [RBP + -0x10]
ADD RCX,0x10
CALL 0x001269f0
LAB_0012f016:
ADD RSP,0x40
POP RBP
RET
|
void _glfwPlatformGetVideoMode(long param_1,int8 *param_2)
{
int8 *puVar1;
int8 uVar2;
int8 local_40;
int8 local_38;
int8 local_30;
long local_28;
int8 local_20;
int8 *local_18;
long local_10;
local_18 = param_2;
local_10 = param_1;
if ((DAT_002011d8 == 0) || (DAT_002011fc != 0)) {
*(int4 *)param_2 =
*(int4 *)(*(long *)(DAT_00200b28 + 0xe8) + (long)DAT_00200b30 * 0x80 + 0x18);
*(int4 *)((long)param_2 + 4) =
*(int4 *)(*(long *)(DAT_00200b28 + 0xe8) + (long)DAT_00200b30 * 0x80 + 0x1c);
*(int4 *)((long)param_2 + 0x14) = 0;
_glfwSplitBPP(*(int4 *)(*(long *)(DAT_00200b28 + 0xe8) + (long)DAT_00200b30 * 0x80 + 0x38)
,param_2 + 1,(int4 *)((long)param_2 + 0xc),param_2 + 2);
}
else {
local_20 = (*DAT_00201250)(DAT_00200b28,DAT_00200b38);
local_28 = (*DAT_00201238)(DAT_00200b28,local_20,*(int8 *)(local_10 + 0x90));
puVar1 = local_18;
uVar2 = getModeInfo(local_20,*(int8 *)(local_28 + 0x18));
vidmodeFromModeInfo(&local_40,uVar2,local_28);
*puVar1 = local_40;
puVar1[1] = local_38;
puVar1[2] = local_30;
(*DAT_00201208)(local_28);
(*DAT_00201220)(local_20);
}
return;
}
| |
40,529 | rtree_pick_key | eloqsql/storage/myisam/rt_index.c | static uchar *rtree_pick_key(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key,
uint key_length, uchar *page_buf, uint nod_flag)
{
double increase;
double UNINIT_VAR(best_incr);
double area;
double UNINIT_VAR(best_area);
uchar *best_key= NULL;
uchar *k = rt_PAGE_FIRST_KEY(page_buf, nod_flag);
uchar *last = rt_PAGE_END(page_buf);
for (; k < last; k = rt_PAGE_NEXT_KEY(k, key_length, nod_flag))
{
/* The following is safe as -1.0 is an exact number */
if ((increase = rtree_area_increase(keyinfo->seg, k, key, key_length,
&area)) == -1.0)
return NULL;
/* The following should be safe, even if we compare doubles */
if (!best_key || increase < best_incr ||
((increase == best_incr) && (area < best_area)))
{
best_key = k;
best_area = area;
best_incr = increase;
}
}
return best_key;
} | O0 | c | rtree_pick_key:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movl %r9d, -0x34(%rbp)
movsd -0x48(%rbp), %xmm0
movsd %xmm0, -0x48(%rbp)
movsd -0x58(%rbp), %xmm0
movsd %xmm0, -0x58(%rbp)
movq $0x0, -0x60(%rbp)
movq -0x30(%rbp), %rax
addq $0x2, %rax
movl -0x34(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
movq -0x30(%rbp), %rax
movq -0x30(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
movzwl %cx, %ecx
movq -0x30(%rbp), %rdx
movzbl (%rdx), %edx
movzwl %dx, %edx
shll $0x8, %edx
orl %edx, %ecx
movzwl %cx, %ecx
andl $0x7fff, %ecx # imm = 0x7FFF
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movq -0x68(%rbp), %rax
cmpq -0x70(%rbp), %rax
jae 0xd2610
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x68(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x24(%rbp), %ecx
leaq -0x50(%rbp), %r8
callq 0xd8070
movsd %xmm0, -0x40(%rbp)
movsd 0x85ad9(%rip), %xmm1 # 0x158040
ucomisd %xmm1, %xmm0
jne 0xd257c
jp 0xd257c
movq $0x0, -0x8(%rbp)
jmp 0xd2618
cmpq $0x0, -0x60(%rbp)
je 0xd25b1
movsd -0x40(%rbp), %xmm1
movsd -0x48(%rbp), %xmm0
ucomisd %xmm1, %xmm0
ja 0xd25b1
movsd -0x40(%rbp), %xmm0
ucomisd -0x48(%rbp), %xmm0
jne 0xd25cd
jp 0xd25cd
movsd -0x50(%rbp), %xmm1
movsd -0x58(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xd25cd
movq -0x68(%rbp), %rax
movq %rax, -0x60(%rbp)
movsd -0x50(%rbp), %xmm0
movsd %xmm0, -0x58(%rbp)
movsd -0x40(%rbp), %xmm0
movsd %xmm0, -0x48(%rbp)
jmp 0xd25cf
movq -0x68(%rbp), %rax
movl -0x24(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
cmpl $0x0, -0x34(%rbp)
je 0xd25eb
movl -0x34(%rbp), %eax
movl %eax, -0x7c(%rbp)
jmp 0xd25fb
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x178(%rax), %eax
movl %eax, -0x7c(%rbp)
movq -0x78(%rbp), %rax
movl -0x7c(%rbp), %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
jmp 0xd2530
movq -0x60(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| rtree_pick_key:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
mov [rbp+var_30], r8
mov [rbp+var_34], r9d
movsd xmm0, [rbp+var_48]
movsd [rbp+var_48], xmm0
movsd xmm0, [rbp+var_58]
movsd [rbp+var_58], xmm0
mov [rbp+var_60], 0
mov rax, [rbp+var_30]
add rax, 2
mov ecx, [rbp+var_34]
add rax, rcx
mov [rbp+var_68], rax
mov rax, [rbp+var_30]
mov rcx, [rbp+var_30]
movzx ecx, byte ptr [rcx+1]
movzx ecx, cx
mov rdx, [rbp+var_30]
movzx edx, byte ptr [rdx]
movzx edx, dx
shl edx, 8
or ecx, edx
movzx ecx, cx
and ecx, 7FFFh
mov ecx, ecx
add rax, rcx
mov [rbp+var_70], rax
loc_D2530:
mov rax, [rbp+var_68]
cmp rax, [rbp+var_70]
jnb loc_D2610
mov rax, [rbp+var_18]
mov rdi, [rax+28h]
mov rsi, [rbp+var_68]
mov rdx, [rbp+var_20]
mov ecx, [rbp+var_24]
lea r8, [rbp+var_50]
call rtree_area_increase
movsd [rbp+var_40], xmm0
movsd xmm1, cs:qword_158040
ucomisd xmm0, xmm1
jnz short loc_D257C
jp short loc_D257C
mov [rbp+var_8], 0
jmp loc_D2618
loc_D257C:
cmp [rbp+var_60], 0
jz short loc_D25B1
movsd xmm1, [rbp+var_40]
movsd xmm0, [rbp+var_48]
ucomisd xmm0, xmm1
ja short loc_D25B1
movsd xmm0, [rbp+var_40]
ucomisd xmm0, [rbp+var_48]
jnz short loc_D25CD
jp short loc_D25CD
movsd xmm1, [rbp+var_50]
movsd xmm0, [rbp+var_58]
ucomisd xmm0, xmm1
jbe short loc_D25CD
loc_D25B1:
mov rax, [rbp+var_68]
mov [rbp+var_60], rax
movsd xmm0, [rbp+var_50]
movsd [rbp+var_58], xmm0
movsd xmm0, [rbp+var_40]
movsd [rbp+var_48], xmm0
loc_D25CD:
jmp short $+2
loc_D25CF:
mov rax, [rbp+var_68]
mov ecx, [rbp+var_24]
add rax, rcx
mov [rbp+var_78], rax
cmp [rbp+var_34], 0
jz short loc_D25EB
mov eax, [rbp+var_34]
mov [rbp+var_7C], eax
jmp short loc_D25FB
loc_D25EB:
mov rax, [rbp+var_10]
mov rax, [rax]
mov eax, [rax+178h]
mov [rbp+var_7C], eax
loc_D25FB:
mov rax, [rbp+var_78]
mov ecx, [rbp+var_7C]
mov ecx, ecx
add rax, rcx
mov [rbp+var_68], rax
jmp loc_D2530
loc_D2610:
mov rax, [rbp+var_60]
mov [rbp+var_8], rax
loc_D2618:
mov rax, [rbp+var_8]
add rsp, 80h
pop rbp
retn
| unsigned long long rtree_pick_key(
long long a1,
long long a2,
long long a3,
unsigned int a4,
unsigned __int16 *a5,
unsigned int a6)
{
unsigned int v7; // [rsp+4h] [rbp-7Ch]
char *v8; // [rsp+10h] [rbp-70h]
unsigned long long v9; // [rsp+18h] [rbp-68h]
unsigned long long v10; // [rsp+20h] [rbp-60h]
double v11; // [rsp+28h] [rbp-58h]
double v12; // [rsp+30h] [rbp-50h] BYREF
double v13; // [rsp+38h] [rbp-48h]
double v14; // [rsp+40h] [rbp-40h]
unsigned int v15; // [rsp+4Ch] [rbp-34h]
unsigned __int16 *v16; // [rsp+50h] [rbp-30h]
unsigned int v17; // [rsp+5Ch] [rbp-24h]
long long v18; // [rsp+60h] [rbp-20h]
long long v19; // [rsp+68h] [rbp-18h]
long long v20; // [rsp+70h] [rbp-10h]
v20 = a1;
v19 = a2;
v18 = a3;
v17 = a4;
v16 = a5;
v15 = a6;
v10 = 0LL;
v9 = (unsigned long long)a5 + a6 + 2;
v8 = (char *)a5 + (_byteswap_ushort(*a5) & 0x7FFF);
while ( v9 < (unsigned long long)v8 )
{
v14 = rtree_area_increase(*(_QWORD *)(v19 + 40), v9, v18, v17, &v12);
if ( v14 == -1.0 )
return 0LL;
if ( !v10 || v13 > v14 || v14 == v13 && v11 > v12 )
{
v10 = v9;
v11 = v12;
v13 = v14;
}
if ( v15 )
v7 = v15;
else
v7 = *(_DWORD *)(*(_QWORD *)v20 + 376LL);
v9 += v7 + (unsigned long long)v17;
}
return v10;
}
| rtree_pick_key:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x24],ECX
MOV qword ptr [RBP + -0x30],R8
MOV dword ptr [RBP + -0x34],R9D
MOVSD XMM0,qword ptr [RBP + -0x48]
MOVSD qword ptr [RBP + -0x48],XMM0
MOVSD XMM0,qword ptr [RBP + -0x58]
MOVSD qword ptr [RBP + -0x58],XMM0
MOV qword ptr [RBP + -0x60],0x0
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x2
MOV ECX,dword ptr [RBP + -0x34]
ADD RAX,RCX
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x30]
MOVZX ECX,byte ptr [RCX + 0x1]
MOVZX ECX,CX
MOV RDX,qword ptr [RBP + -0x30]
MOVZX EDX,byte ptr [RDX]
MOVZX EDX,DX
SHL EDX,0x8
OR ECX,EDX
MOVZX ECX,CX
AND ECX,0x7fff
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x70],RAX
LAB_001d2530:
MOV RAX,qword ptr [RBP + -0x68]
CMP RAX,qword ptr [RBP + -0x70]
JNC 0x001d2610
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x28]
MOV RSI,qword ptr [RBP + -0x68]
MOV RDX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x24]
LEA R8,[RBP + -0x50]
CALL 0x001d8070
MOVSD qword ptr [RBP + -0x40],XMM0
MOVSD XMM1,qword ptr [0x00258040]
UCOMISD XMM0,XMM1
JNZ 0x001d257c
JP 0x001d257c
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001d2618
LAB_001d257c:
CMP qword ptr [RBP + -0x60],0x0
JZ 0x001d25b1
MOVSD XMM1,qword ptr [RBP + -0x40]
MOVSD XMM0,qword ptr [RBP + -0x48]
UCOMISD XMM0,XMM1
JA 0x001d25b1
MOVSD XMM0,qword ptr [RBP + -0x40]
UCOMISD XMM0,qword ptr [RBP + -0x48]
JNZ 0x001d25cd
JP 0x001d25cd
MOVSD XMM1,qword ptr [RBP + -0x50]
MOVSD XMM0,qword ptr [RBP + -0x58]
UCOMISD XMM0,XMM1
JBE 0x001d25cd
LAB_001d25b1:
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0x60],RAX
MOVSD XMM0,qword ptr [RBP + -0x50]
MOVSD qword ptr [RBP + -0x58],XMM0
MOVSD XMM0,qword ptr [RBP + -0x40]
MOVSD qword ptr [RBP + -0x48],XMM0
LAB_001d25cd:
JMP 0x001d25cf
LAB_001d25cf:
MOV RAX,qword ptr [RBP + -0x68]
MOV ECX,dword ptr [RBP + -0x24]
ADD RAX,RCX
MOV qword ptr [RBP + -0x78],RAX
CMP dword ptr [RBP + -0x34],0x0
JZ 0x001d25eb
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0x7c],EAX
JMP 0x001d25fb
LAB_001d25eb:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x178]
MOV dword ptr [RBP + -0x7c],EAX
LAB_001d25fb:
MOV RAX,qword ptr [RBP + -0x78]
MOV ECX,dword ptr [RBP + -0x7c]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x68],RAX
JMP 0x001d2530
LAB_001d2610:
MOV RAX,qword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x8],RAX
LAB_001d2618:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x80
POP RBP
RET
|
byte * rtree_pick_key(long *param_1,long param_2,int8 param_3,uint param_4,byte *param_5,
uint param_6)
{
byte bVar1;
byte bVar2;
uint local_84;
byte *local_70;
byte *local_68;
double local_60;
double local_58;
double local_50;
double local_48;
uint local_3c;
byte *local_38;
uint local_2c;
int8 local_28;
long local_20;
long *local_18;
local_68 = (byte *)0x0;
local_70 = param_5 + (ulong)param_6 + 2;
bVar1 = param_5[1];
bVar2 = *param_5;
local_3c = param_6;
local_38 = param_5;
local_2c = param_4;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
do {
if (param_5 + ((uint)bVar1 | (bVar2 & 0x7f) << 8) <= local_70) {
return local_68;
}
local_48 = (double)rtree_area_increase(*(int8 *)(local_20 + 0x28),local_70,local_28,
local_2c,&local_58);
if ((local_48 == DAT_00258040) && (!NAN(local_48) && !NAN(DAT_00258040))) {
return (byte *)0x0;
}
if ((local_68 == (byte *)0x0) || (local_48 < local_50)) {
LAB_001d25b1:
local_68 = local_70;
local_60 = local_58;
local_50 = local_48;
}
else if ((local_48 == local_50) && ((!NAN(local_48) && !NAN(local_50) && (local_58 < local_60)))
) goto LAB_001d25b1;
if (local_3c == 0) {
local_84 = *(uint *)(*local_18 + 0x178);
}
else {
local_84 = local_3c;
}
local_70 = local_70 + (ulong)local_84 + (ulong)local_2c;
} while( true );
}
| |
40,530 | default_reporter | eloqsql/mysys/my_getopt.c | static void default_reporter(enum loglevel level, const char *format, ...)
{
va_list args;
DBUG_ENTER("default_reporter");
va_start(args, format);
if (level == WARNING_LEVEL)
fprintf(stderr, "%s", "Warning: ");
else if (level == INFORMATION_LEVEL)
fprintf(stderr, "%s", "Info: ");
vfprintf(stderr, format, args);
va_end(args);
fputc('\n', stderr);
fflush(stderr);
DBUG_VOID_RETURN;
} | O0 | c | default_reporter:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
testb %al, %al
je 0x29718
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 $0x1, -0x4(%rbp)
jne 0x29786
movq 0x1af86c(%rip), %rax # 0x1d8fd8
movq (%rax), %rdi
leaq 0x5cf5e(%rip), %rsi # 0x866d4
leaq 0x59a97(%rip), %rdx # 0x83214
movb $0x0, %al
callq 0x254d0
jmp 0x297ad
cmpl $0x2, -0x4(%rbp)
jne 0x297ab
movq 0x1af845(%rip), %rax # 0x1d8fd8
movq (%rax), %rdi
leaq 0x5cf37(%rip), %rsi # 0x866d4
leaq 0x59a7a(%rip), %rdx # 0x8321e
movb $0x0, %al
callq 0x254d0
jmp 0x297ad
movq 0x1af824(%rip), %rax # 0x1d8fd8
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0x25480
leaq -0x30(%rbp), %rax
movq 0x1af809(%rip), %rax # 0x1d8fd8
movq (%rax), %rsi
movl $0xa, %edi
callq 0x25440
movq 0x1af7f5(%rip), %rax # 0x1d8fd8
movq (%rax), %rdi
callq 0x253e0
jmp 0x297ed
addq $0xe0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| default_reporter:
push rbp
mov rbp, rsp
sub rsp, 0E0h
test al, al
jz short loc_29718
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_29718:
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], 1
jnz short loc_29786
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aAtLineDPosDS+13h; "%s"
lea rdx, aWarning; "Warning: "
mov al, 0
call _fprintf
jmp short loc_297AD
loc_29786:
cmp [rbp+var_4], 2
jnz short loc_297AB
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aAtLineDPosDS+13h; "%s"
lea rdx, aInfo; "Info: "
mov al, 0
call _fprintf
loc_297AB:
jmp short $+2
loc_297AD:
mov rax, cs:stderr_ptr
mov rdi, [rax]
mov rsi, [rbp+var_10]
lea rdx, [rbp+var_30]
call _vfprintf
lea rax, [rbp+var_30]
mov rax, cs:stderr_ptr
mov rsi, [rax]
mov edi, 0Ah
call _fputc
mov rax, cs:stderr_ptr
mov rdi, [rax]
call _fflush
jmp short $+2
loc_297ED:
add rsp, 0E0h
pop rbp
retn
| long long default_reporter(int a1, long long a2, ...)
{
va_list va; // [rsp+B0h] [rbp-30h] BYREF
long long v4; // [rsp+D0h] [rbp-10h]
int v5; // [rsp+DCh] [rbp-4h]
va_start(va, a2);
v5 = a1;
v4 = a2;
if ( a1 == 1 )
{
fprintf(stderr, "%s", "Warning: ");
}
else if ( v5 == 2 )
{
fprintf(stderr, "%s", "Info: ");
}
vfprintf(stderr, v4, va);
fputc(10LL, stderr);
return fflush(stderr);
}
| default_reporter:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xe0
TEST AL,AL
JZ 0x00129718
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_00129718:
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],0x1
JNZ 0x00129786
MOV RAX,qword ptr [0x002d8fd8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x1866d4]
LEA RDX,[0x183214]
MOV AL,0x0
CALL 0x001254d0
JMP 0x001297ad
LAB_00129786:
CMP dword ptr [RBP + -0x4],0x2
JNZ 0x001297ab
MOV RAX,qword ptr [0x002d8fd8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x1866d4]
LEA RDX,[0x18321e]
MOV AL,0x0
CALL 0x001254d0
LAB_001297ab:
JMP 0x001297ad
LAB_001297ad:
MOV RAX,qword ptr [0x002d8fd8]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x10]
LEA RDX,[RBP + -0x30]
CALL 0x00125480
LEA RAX,[RBP + -0x30]
MOV RAX,qword ptr [0x002d8fd8]
MOV RSI,qword ptr [RAX]
MOV EDI,0xa
CALL 0x00125440
MOV RAX,qword ptr [0x002d8fd8]
MOV RDI,qword ptr [RAX]
CALL 0x001253e0
JMP 0x001297ed
LAB_001297ed:
ADD RSP,0xe0
POP RBP
RET
|
void default_reporter(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,char *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;
char *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;
local_d8 = param_11;
local_d0 = param_12;
local_c8 = param_13;
local_c0 = param_14;
local_18 = param_10;
local_c = param_9;
if (param_9 == 1) {
fprintf(*(FILE **)PTR_stderr_002d8fd8,"%s","Warning: ");
}
else if (param_9 == 2) {
fprintf(*(FILE **)PTR_stderr_002d8fd8,"%s","Info: ");
}
vfprintf(*(FILE **)PTR_stderr_002d8fd8,local_18,&local_38);
fputc(10,*(FILE **)PTR_stderr_002d8fd8);
fflush(*(FILE **)PTR_stderr_002d8fd8);
return;
}
| |
40,531 | nglog::LogDestination::LogToSinks(nglog::LogSeverity, char const*, char const*, int, nglog::LogMessageTime const&, char const*, unsigned long) | ng-log[P]ng-log/src/logging.cc | inline void LogDestination::LogToSinks(LogSeverity severity,
const char* full_filename,
const char* base_filename, int line,
const LogMessageTime& time,
const char* message,
size_t message_len) {
std::shared_lock<SinkMutex> l{sink_mutex_};
if (sinks_) {
for (size_t i = sinks_->size(); i-- > 0;) {
(*sinks_)[i]->send(severity, full_filename, base_filename, line, time,
message, message_len);
}
}
} | O2 | cpp | nglog::LogDestination::LogToSinks(nglog::LogSeverity, char const*, char const*, int, nglog::LogMessageTime const&, char const*, unsigned long):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, (%rsp)
movq %r8, %r14
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %r12
movl %edi, %r13d
leaq 0x21b8d(%rip), %rdi # 0x31cb8
movq %rdi, 0x8(%rsp)
movb $0x1, 0x10(%rsp)
callq 0x11188
movq 0x21b6f(%rip), %rax # 0x31cb0
testq %rax, %rax
je 0x10189
movq 0x8(%rax), %rbx
subq (%rax), %rbx
sarq $0x3, %rbx
subq $0x1, %rbx
jb 0x10189
movq 0x21b52(%rip), %rax # 0x31cb0
movq (%rax), %rax
movq (%rax,%rbx,8), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
movl %r13d, %esi
movq %r12, %rdx
movq %r15, %rcx
movl %ebp, %r8d
movq %r14, %r9
pushq 0x50(%rsp)
pushq 0x8(%rsp)
callq *%rax
popq %rax
popq %rcx
jmp 0x10151
leaq 0x8(%rsp), %rdi
callq 0x11178
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x11178
movq %rbx, %rdi
callq 0x8a40
nop
| _ZN5nglog14LogDestination10LogToSinksENS_11LogSeverityEPKcS3_iRKNS_14LogMessageTimeES3_m:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rsp+48h+var_48], r9
mov r14, r8
mov ebp, ecx
mov r15, rdx
mov r12, rsi
mov r13d, edi
lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; this
mov [rsp+48h+var_40], rdi
mov [rsp+48h+var_38], 1
call _ZNSt22__shared_mutex_pthread11lock_sharedEv; std::__shared_mutex_pthread::lock_shared(void)
mov rax, cs:_ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_
test rax, rax
jz short loc_10189
mov rbx, [rax+8]
sub rbx, [rax]
sar rbx, 3
loc_10151:
sub rbx, 1
jb short loc_10189
mov rax, cs:_ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_
mov rax, [rax]
mov rdi, [rax+rbx*8]
mov rax, [rdi]
mov rax, [rax+10h]
mov esi, r13d
mov rdx, r12
mov rcx, r15
mov r8d, ebp
mov r9, r14
push [rsp+48h+arg_0]
push [rsp+50h+var_48]
call rax
pop rax
pop rcx
jmp short loc_10151
loc_10189:
lea rdi, [rsp+48h+var_40]
call _ZNSt11shared_lockISt12shared_mutexED2Ev; std::shared_lock<std::shared_mutex>::~shared_lock()
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_0]
call _ZNSt11shared_lockISt12shared_mutexED2Ev; std::shared_lock<std::shared_mutex>::~shared_lock()
mov rdi, rbx
call __Unwind_Resume
| long long nglog::LogDestination::LogToSinks(
unsigned int a1,
long long a2,
long long a3,
unsigned int a4,
long long a5,
long long a6,
long long a7)
{
long long v10; // r12
long long i; // rbx
void *v15; // [rsp+8h] [rbp-40h] BYREF
char v16; // [rsp+10h] [rbp-38h]
v10 = a2;
v15 = &nglog::LogDestination::sink_mutex_;
v16 = 1;
std::__shared_mutex_pthread::lock_shared((std::__shared_mutex_pthread *)&nglog::LogDestination::sink_mutex_);
if ( nglog::LogDestination::sinks_ )
{
for ( i = (long long)(*(_QWORD *)(nglog::LogDestination::sinks_ + 8) - *(_QWORD *)nglog::LogDestination::sinks_) >> 3;
i-- != 0;
(*(void ( **)(_QWORD, _QWORD, long long, long long, _QWORD, long long, long long, long long))(**(_QWORD **)(*(_QWORD *)nglog::LogDestination::sinks_ + 8 * i) + 16LL))(
*(_QWORD *)(*(_QWORD *)nglog::LogDestination::sinks_ + 8 * i),
a1,
v10,
a3,
a4,
a5,
a6,
a7) )
{
a2 = a1;
}
}
return std::shared_lock<std::shared_mutex>::~shared_lock(&v15, a2);
}
| LogToSinks:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RSP],R9
MOV R14,R8
MOV EBP,ECX
MOV R15,RDX
MOV R12,RSI
MOV R13D,EDI
LEA RDI,[0x131cb8]
MOV qword ptr [RSP + 0x8],RDI
MOV byte ptr [RSP + 0x10],0x1
CALL 0x00111188
MOV RAX,qword ptr [0x00131cb0]
TEST RAX,RAX
JZ 0x00110189
MOV RBX,qword ptr [RAX + 0x8]
SUB RBX,qword ptr [RAX]
SAR RBX,0x3
LAB_00110151:
SUB RBX,0x1
JC 0x00110189
MOV RAX,qword ptr [0x00131cb0]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX + RBX*0x8]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x10]
LAB_0011016c:
MOV ESI,R13D
MOV RDX,R12
MOV RCX,R15
MOV R8D,EBP
MOV R9,R14
PUSH qword ptr [RSP + 0x50]
PUSH qword ptr [RSP + 0x8]
CALL RAX
POP RAX
POP RCX
LAB_00110187:
JMP 0x00110151
LAB_00110189:
LEA RDI,[RSP + 0x8]
CALL 0x00111178
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nglog::LogDestination::LogToSinks(nglog::LogSeverity, char const*, char const*, int,
nglog::LogMessageTime const&, char const*, unsigned long) */
void nglog::LogDestination::LogToSinks
(int4 param_1,int8 param_2,int8 param_3,int4 param_4,
int8 param_5,int8 param_6,int8 param_7)
{
long *plVar1;
long lVar2;
bool bVar3;
int1 *local_40;
int1 local_38;
local_40 = sink_mutex_;
local_38 = 1;
std::__shared_mutex_pthread::lock_shared((__shared_mutex_pthread *)sink_mutex_);
if (sinks_ != (long *)0x0) {
lVar2 = sinks_[1] - *sinks_ >> 3;
while (bVar3 = lVar2 != 0, lVar2 = lVar2 + -1, bVar3) {
plVar1 = *(long **)(*sinks_ + lVar2 * 8);
/* try { // try from 0011016c to 00110186 has its CatchHandler @ 001101a2 */
(**(code **)(*plVar1 + 0x10))(plVar1,param_1,param_2,param_3,param_4,param_5,param_6,param_7);
}
}
std::shared_lock<std::shared_mutex>::~shared_lock((shared_lock<std::shared_mutex> *)&local_40);
return;
}
| |
40,532 | testing::internal::GTestFlagSaver::GTestFlagSaver() | giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/src/gtest-internal-inl.h | GTestFlagSaver() {
also_run_disabled_tests_ = GTEST_FLAG_GET(also_run_disabled_tests);
break_on_failure_ = GTEST_FLAG_GET(break_on_failure);
catch_exceptions_ = GTEST_FLAG_GET(catch_exceptions);
color_ = GTEST_FLAG_GET(color);
death_test_style_ = GTEST_FLAG_GET(death_test_style);
death_test_use_fork_ = GTEST_FLAG_GET(death_test_use_fork);
fail_fast_ = GTEST_FLAG_GET(fail_fast);
filter_ = GTEST_FLAG_GET(filter);
internal_run_death_test_ = GTEST_FLAG_GET(internal_run_death_test);
list_tests_ = GTEST_FLAG_GET(list_tests);
output_ = GTEST_FLAG_GET(output);
brief_ = GTEST_FLAG_GET(brief);
print_time_ = GTEST_FLAG_GET(print_time);
print_utf8_ = GTEST_FLAG_GET(print_utf8);
random_seed_ = GTEST_FLAG_GET(random_seed);
repeat_ = GTEST_FLAG_GET(repeat);
recreate_environments_when_repeating_ =
GTEST_FLAG_GET(recreate_environments_when_repeating);
shuffle_ = GTEST_FLAG_GET(shuffle);
stack_trace_depth_ = GTEST_FLAG_GET(stack_trace_depth);
stream_result_to_ = GTEST_FLAG_GET(stream_result_to);
throw_on_failure_ = GTEST_FLAG_GET(throw_on_failure);
} | O3 | c | testing::internal::GTestFlagSaver::GTestFlagSaver():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %r13
addq $0x8, %rdi
leaq 0x18(%r13), %rax
movq %rax, 0x18(%rsp)
movq %rax, 0x8(%r13)
xorl %eax, %eax
movq %rax, 0x10(%r13)
movb %al, 0x18(%r13)
leaq 0x28(%r13), %rcx
movq %rcx, 0x28(%rsp)
leaq 0x38(%r13), %rcx
movq %rcx, 0x10(%rsp)
movq %rcx, 0x28(%r13)
movq %rax, 0x30(%r13)
movb %al, 0x38(%r13)
leaq 0x50(%r13), %rcx
movq %rcx, 0x20(%rsp)
leaq 0x60(%r13), %rcx
movq %rcx, 0x8(%rsp)
movq %rcx, 0x50(%r13)
movq %rax, 0x58(%r13)
movb %al, 0x60(%r13)
leaq 0x70(%r13), %r12
leaq 0x80(%r13), %rcx
movq %rcx, (%rsp)
movq %rcx, 0x70(%r13)
movq %rax, 0x78(%r13)
movb %al, 0x80(%r13)
leaq 0x98(%r13), %rbp
leaq 0xa8(%r13), %r15
movq %r15, 0x98(%r13)
movq %rax, 0xa0(%r13)
movb %al, 0xa8(%r13)
leaq 0xd0(%r13), %rbx
leaq 0xe0(%r13), %r14
movq %r14, 0xd0(%r13)
movq %rax, 0xd8(%r13)
movb %al, 0xe0(%r13)
movb 0x2583f(%rip), %al # 0x59683
movb %al, (%r13)
movb 0x25836(%rip), %al # 0x59684
movb %al, 0x1(%r13)
movb 0x2582d(%rip), %al # 0x59685
movb %al, 0x2(%r13)
leaq 0x25825(%rip), %rsi # 0x59688
movq %rdi, 0x30(%rsp)
callq 0x8290
leaq 0x25784(%rip), %rsi # 0x595f8
movq 0x28(%rsp), %rdi
callq 0x8290
movb 0x25794(%rip), %al # 0x59618
movb %al, 0x48(%r13)
movb 0x257f4(%rip), %al # 0x59682
movb %al, 0x49(%r13)
leaq 0x2580f(%rip), %rsi # 0x596a8
movq 0x20(%rsp), %rdi
callq 0x8290
leaq 0x25776(%rip), %rsi # 0x59620
movq %r12, %rdi
callq 0x8290
movb 0x25811(%rip), %al # 0x596c9
movb %al, 0x90(%r13)
leaq 0x2580a(%rip), %rsi # 0x596d0
movq %rbp, %rdi
callq 0x8290
movb 0x2581c(%rip), %al # 0x596f0
movb %al, 0xb8(%r13)
movb 0x25810(%rip), %al # 0x596f1
movb %al, 0xb9(%r13)
movb 0x25792(%rip), %al # 0x59680
movb %al, 0xba(%r13)
movl 0x257f9(%rip), %eax # 0x596f4
movl %eax, 0xbc(%r13)
movl 0x257f0(%rip), %eax # 0x596f8
movl %eax, 0xc0(%r13)
movb 0x257e7(%rip), %al # 0x596fc
movb %al, 0xc4(%r13)
movb 0x257dc(%rip), %al # 0x596fe
movb %al, 0xc5(%r13)
movl 0x257d1(%rip), %eax # 0x59700
movl %eax, 0xc8(%r13)
leaq 0x257cb(%rip), %rsi # 0x59708
movq %rbx, %rdi
callq 0x8290
movb 0x257dd(%rip), %al # 0x59728
movb %al, 0xf0(%r13)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r13
movq (%rbx), %rdi
cmpq %r14, %rdi
je 0x33f77
movq (%r14), %rsi
incq %rsi
callq 0x84e0
movq (%rbp), %rdi
cmpq %r15, %rdi
je 0x33f8b
movq (%r15), %rsi
incq %rsi
callq 0x84e0
movq (%r12), %rdi
cmpq (%rsp), %rdi
je 0x33fa4
movq (%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x84e0
movq 0x20(%rsp), %rax
movq (%rax), %rdi
cmpq 0x8(%rsp), %rdi
je 0x33fc3
movq 0x8(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x84e0
movq 0x28(%rsp), %rax
movq (%rax), %rdi
cmpq 0x10(%rsp), %rdi
je 0x33fe2
movq 0x10(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x84e0
movq 0x30(%rsp), %rax
movq (%rax), %rdi
cmpq 0x18(%rsp), %rdi
je 0x34001
movq 0x18(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x84e0
movq %r13, %rdi
callq 0x8990
nop
| _ZN7testing8internal14GTestFlagSaverC2Ev:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r13, rdi
add rdi, 8
lea rax, [r13+18h]
mov [rsp+68h+var_50], rax
mov [r13+8], rax
xor eax, eax
mov [r13+10h], rax
mov [r13+18h], al
lea rcx, [r13+28h]
mov [rsp+68h+var_40], rcx
lea rcx, [r13+38h]
mov [rsp+68h+var_58], rcx
mov [r13+28h], rcx
mov [r13+30h], rax
mov [r13+38h], al
lea rcx, [r13+50h]
mov [rsp+68h+var_48], rcx
lea rcx, [r13+60h]
mov [rsp+68h+var_60], rcx
mov [r13+50h], rcx
mov [r13+58h], rax
mov [r13+60h], al
lea r12, [r13+70h]
lea rcx, [r13+80h]
mov [rsp+68h+var_68], rcx
mov [r13+70h], rcx
mov [r13+78h], rax
mov [r13+80h], al
lea rbp, [r13+98h]
lea r15, [r13+0A8h]
mov [r13+98h], r15
mov [r13+0A0h], rax
mov [r13+0A8h], al
lea rbx, [r13+0D0h]
lea r14, [r13+0E0h]
mov [r13+0D0h], r14
mov [r13+0D8h], rax
mov [r13+0E0h], al
mov al, cs:_ZN7testing35FLAGS_gtest_also_run_disabled_testsE; testing::FLAGS_gtest_also_run_disabled_tests
mov [r13+0], al
mov al, cs:_ZN7testing28FLAGS_gtest_break_on_failureE; testing::FLAGS_gtest_break_on_failure
mov [r13+1], al
mov al, cs:_ZN7testing28FLAGS_gtest_catch_exceptionsE; testing::FLAGS_gtest_catch_exceptions
mov [r13+2], al
lea rsi, _ZN7testing17FLAGS_gtest_colorB5cxx11E; testing::FLAGS_gtest_color
mov [rsp+68h+var_38], rdi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
lea rsi, _ZN7testing28FLAGS_gtest_death_test_styleB5cxx11E; testing::FLAGS_gtest_death_test_style
mov rdi, [rsp+68h+var_40]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
mov al, cs:_ZN7testing31FLAGS_gtest_death_test_use_forkE; testing::FLAGS_gtest_death_test_use_fork
mov [r13+48h], al
mov al, cs:_ZN7testing21FLAGS_gtest_fail_fastE; testing::FLAGS_gtest_fail_fast
mov [r13+49h], al
lea rsi, _ZN7testing18FLAGS_gtest_filterB5cxx11E; testing::FLAGS_gtest_filter
mov rdi, [rsp+68h+var_48]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
lea rsi, _ZN7testing35FLAGS_gtest_internal_run_death_testB5cxx11E; testing::FLAGS_gtest_internal_run_death_test
mov rdi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
mov al, cs:_ZN7testing22FLAGS_gtest_list_testsE; testing::FLAGS_gtest_list_tests
mov [r13+90h], al
lea rsi, _ZN7testing18FLAGS_gtest_outputB5cxx11E; testing::FLAGS_gtest_output
mov rdi, rbp
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
mov al, cs:_ZN7testing17FLAGS_gtest_briefE; testing::FLAGS_gtest_brief
mov [r13+0B8h], al
mov al, cs:_ZN7testing22FLAGS_gtest_print_timeE; testing::FLAGS_gtest_print_time
mov [r13+0B9h], al
mov al, cs:_ZN7testing22FLAGS_gtest_print_utf8E; testing::FLAGS_gtest_print_utf8
mov [r13+0BAh], al
mov eax, cs:_ZN7testing23FLAGS_gtest_random_seedE; testing::FLAGS_gtest_random_seed
mov [r13+0BCh], eax
mov eax, cs:_ZN7testing18FLAGS_gtest_repeatE; testing::FLAGS_gtest_repeat
mov [r13+0C0h], eax
mov al, cs:_ZN7testing48FLAGS_gtest_recreate_environments_when_repeatingE; testing::FLAGS_gtest_recreate_environments_when_repeating
mov [r13+0C4h], al
mov al, cs:_ZN7testing19FLAGS_gtest_shuffleE; testing::FLAGS_gtest_shuffle
mov [r13+0C5h], al
mov eax, cs:_ZN7testing29FLAGS_gtest_stack_trace_depthE; testing::FLAGS_gtest_stack_trace_depth
mov [r13+0C8h], eax
lea rsi, _ZN7testing28FLAGS_gtest_stream_result_toB5cxx11E; testing::FLAGS_gtest_stream_result_to
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
mov al, cs:_ZN7testing28FLAGS_gtest_throw_on_failureE; testing::FLAGS_gtest_throw_on_failure
mov [r13+0F0h], al
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r13, rax
mov rdi, [rbx]; void *
cmp rdi, r14
jz short loc_33F77
mov rsi, [r14]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_33F77:
mov rdi, [rbp+0]; void *
cmp rdi, r15
jz short loc_33F8B
mov rsi, [r15]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_33F8B:
mov rdi, [r12]; void *
cmp rdi, [rsp+0]
jz short loc_33FA4
mov rax, [rsp+0]
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_33FA4:
mov rax, [rsp+arg_18]
mov rdi, [rax]; void *
cmp rdi, [rsp+arg_0]
jz short loc_33FC3
mov rax, [rsp+arg_0]
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_33FC3:
mov rax, [rsp+arg_20]
mov rdi, [rax]; void *
cmp rdi, [rsp+arg_8]
jz short loc_33FE2
mov rax, [rsp+arg_8]
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_33FE2:
mov rax, [rsp+arg_28]
mov rdi, [rax]; void *
cmp rdi, [rsp+arg_10]
jz short loc_34001
mov rax, [rsp+arg_10]
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_34001:
mov rdi, r13
call __Unwind_Resume
| char testing::internal::GTestFlagSaver::GTestFlagSaver(testing::internal::GTestFlagSaver *this)
{
char result; // al
*((_QWORD *)this + 1) = (char *)this + 24;
*((_QWORD *)this + 2) = 0LL;
*((_BYTE *)this + 24) = 0;
*((_QWORD *)this + 5) = (char *)this + 56;
*((_QWORD *)this + 6) = 0LL;
*((_BYTE *)this + 56) = 0;
*((_QWORD *)this + 10) = (char *)this + 96;
*((_QWORD *)this + 11) = 0LL;
*((_BYTE *)this + 96) = 0;
*((_QWORD *)this + 14) = (char *)this + 128;
*((_QWORD *)this + 15) = 0LL;
*((_BYTE *)this + 128) = 0;
*((_QWORD *)this + 19) = (char *)this + 168;
*((_QWORD *)this + 20) = 0LL;
*((_BYTE *)this + 168) = 0;
*((_QWORD *)this + 26) = (char *)this + 224;
*((_QWORD *)this + 27) = 0LL;
*((_BYTE *)this + 224) = 0;
*(_BYTE *)this = testing::FLAGS_gtest_also_run_disabled_tests;
*((_BYTE *)this + 1) = testing::FLAGS_gtest_break_on_failure;
*((_BYTE *)this + 2) = testing::FLAGS_gtest_catch_exceptions;
std::string::_M_assign((char *)this + 8, &testing::FLAGS_gtest_color[abi:cxx11]);
std::string::_M_assign((char *)this + 40, &testing::FLAGS_gtest_death_test_style[abi:cxx11]);
*((_BYTE *)this + 72) = testing::FLAGS_gtest_death_test_use_fork;
*((_BYTE *)this + 73) = testing::FLAGS_gtest_fail_fast;
std::string::_M_assign((char *)this + 80, &testing::FLAGS_gtest_filter[abi:cxx11]);
std::string::_M_assign((char *)this + 112, &testing::FLAGS_gtest_internal_run_death_test[abi:cxx11]);
*((_BYTE *)this + 144) = testing::FLAGS_gtest_list_tests;
std::string::_M_assign((char *)this + 152, &testing::FLAGS_gtest_output[abi:cxx11]);
*((_BYTE *)this + 184) = testing::FLAGS_gtest_brief;
*((_BYTE *)this + 185) = testing::FLAGS_gtest_print_time;
*((_BYTE *)this + 186) = testing::FLAGS_gtest_print_utf8;
*((_DWORD *)this + 47) = testing::FLAGS_gtest_random_seed;
*((_DWORD *)this + 48) = testing::FLAGS_gtest_repeat;
*((_BYTE *)this + 196) = testing::FLAGS_gtest_recreate_environments_when_repeating;
*((_BYTE *)this + 197) = testing::FLAGS_gtest_shuffle;
*((_DWORD *)this + 50) = testing::FLAGS_gtest_stack_trace_depth;
std::string::_M_assign((char *)this + 208, &testing::FLAGS_gtest_stream_result_to[abi:cxx11]);
result = testing::FLAGS_gtest_throw_on_failure;
*((_BYTE *)this + 240) = testing::FLAGS_gtest_throw_on_failure;
return result;
}
| GTestFlagSaver:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R13,RDI
ADD RDI,0x8
LEA RAX,[R13 + 0x18]
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [R13 + 0x8],RAX
XOR EAX,EAX
MOV qword ptr [R13 + 0x10],RAX
MOV byte ptr [R13 + 0x18],AL
LEA RCX,[R13 + 0x28]
MOV qword ptr [RSP + 0x28],RCX
LEA RCX,[R13 + 0x38]
MOV qword ptr [RSP + 0x10],RCX
MOV qword ptr [R13 + 0x28],RCX
MOV qword ptr [R13 + 0x30],RAX
MOV byte ptr [R13 + 0x38],AL
LEA RCX,[R13 + 0x50]
MOV qword ptr [RSP + 0x20],RCX
LEA RCX,[R13 + 0x60]
MOV qword ptr [RSP + 0x8],RCX
MOV qword ptr [R13 + 0x50],RCX
MOV qword ptr [R13 + 0x58],RAX
MOV byte ptr [R13 + 0x60],AL
LEA R12,[R13 + 0x70]
LEA RCX,[R13 + 0x80]
MOV qword ptr [RSP],RCX
MOV qword ptr [R13 + 0x70],RCX
MOV qword ptr [R13 + 0x78],RAX
MOV byte ptr [R13 + 0x80],AL
LEA RBP,[R13 + 0x98]
LEA R15,[R13 + 0xa8]
MOV qword ptr [R13 + 0x98],R15
MOV qword ptr [R13 + 0xa0],RAX
MOV byte ptr [R13 + 0xa8],AL
LEA RBX,[R13 + 0xd0]
LEA R14,[R13 + 0xe0]
MOV qword ptr [R13 + 0xd0],R14
MOV qword ptr [R13 + 0xd8],RAX
MOV byte ptr [R13 + 0xe0],AL
MOV AL,byte ptr [0x00159683]
MOV byte ptr [R13],AL
MOV AL,byte ptr [0x00159684]
MOV byte ptr [R13 + 0x1],AL
MOV AL,byte ptr [0x00159685]
MOV byte ptr [R13 + 0x2],AL
LAB_00133e5c:
LEA RSI,[0x159688]
MOV qword ptr [RSP + 0x30],RDI
CALL 0x00108290
LEA RSI,[0x1595f8]
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x00108290
MOV AL,byte ptr [0x00159618]
MOV byte ptr [R13 + 0x48],AL
MOV AL,byte ptr [0x00159682]
MOV byte ptr [R13 + 0x49],AL
LEA RSI,[0x1596a8]
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x00108290
LEA RSI,[0x159620]
MOV RDI,R12
CALL 0x00108290
MOV AL,byte ptr [0x001596c9]
MOV byte ptr [R13 + 0x90],AL
LEA RSI,[0x1596d0]
MOV RDI,RBP
CALL 0x00108290
MOV AL,byte ptr [0x001596f0]
MOV byte ptr [R13 + 0xb8],AL
MOV AL,byte ptr [0x001596f1]
MOV byte ptr [R13 + 0xb9],AL
MOV AL,byte ptr [0x00159680]
MOV byte ptr [R13 + 0xba],AL
MOV EAX,dword ptr [0x001596f4]
MOV dword ptr [R13 + 0xbc],EAX
MOV EAX,dword ptr [0x001596f8]
MOV dword ptr [R13 + 0xc0],EAX
MOV AL,byte ptr [0x001596fc]
MOV byte ptr [R13 + 0xc4],AL
MOV AL,byte ptr [0x001596fe]
MOV byte ptr [R13 + 0xc5],AL
MOV EAX,dword ptr [0x00159700]
MOV dword ptr [R13 + 0xc8],EAX
LEA RSI,[0x159708]
MOV RDI,RBX
CALL 0x00108290
LAB_00133f45:
MOV AL,byte ptr [0x00159728]
MOV byte ptr [R13 + 0xf0],AL
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* testing::internal::GTestFlagSaver::GTestFlagSaver() */
void __thiscall testing::internal::GTestFlagSaver::GTestFlagSaver(GTestFlagSaver *this)
{
*(GTestFlagSaver **)(this + 8) = this + 0x18;
*(int8 *)(this + 0x10) = 0;
this[0x18] = (GTestFlagSaver)0x0;
*(GTestFlagSaver **)(this + 0x28) = this + 0x38;
*(int8 *)(this + 0x30) = 0;
this[0x38] = (GTestFlagSaver)0x0;
*(GTestFlagSaver **)(this + 0x50) = this + 0x60;
*(int8 *)(this + 0x58) = 0;
this[0x60] = (GTestFlagSaver)0x0;
*(GTestFlagSaver **)(this + 0x70) = this + 0x80;
*(int8 *)(this + 0x78) = 0;
this[0x80] = (GTestFlagSaver)0x0;
*(GTestFlagSaver **)(this + 0x98) = this + 0xa8;
*(int8 *)(this + 0xa0) = 0;
this[0xa8] = (GTestFlagSaver)0x0;
*(GTestFlagSaver **)(this + 0xd0) = this + 0xe0;
*(int8 *)(this + 0xd8) = 0;
this[0xe0] = (GTestFlagSaver)0x0;
*this = FLAGS_gtest_also_run_disabled_tests;
this[1] = FLAGS_gtest_break_on_failure;
this[2] = FLAGS_gtest_catch_exceptions;
/* try { // try from 00133e5c to 00133f44 has its CatchHandler @ 00133f61 */
std::__cxx11::string::_M_assign((string *)(this + 8));
std::__cxx11::string::_M_assign((string *)(this + 0x28));
this[0x48] = FLAGS_gtest_death_test_use_fork;
this[0x49] = FLAGS_gtest_fail_fast;
std::__cxx11::string::_M_assign((string *)(this + 0x50));
std::__cxx11::string::_M_assign((string *)(this + 0x70));
this[0x90] = FLAGS_gtest_list_tests;
std::__cxx11::string::_M_assign((string *)(this + 0x98));
this[0xb8] = FLAGS_gtest_brief;
this[0xb9] = FLAGS_gtest_print_time;
this[0xba] = FLAGS_gtest_print_utf8;
*(int4 *)(this + 0xbc) = FLAGS_gtest_random_seed;
*(int4 *)(this + 0xc0) = FLAGS_gtest_repeat;
this[0xc4] = FLAGS_gtest_recreate_environments_when_repeating;
this[0xc5] = FLAGS_gtest_shuffle;
*(int4 *)(this + 200) = FLAGS_gtest_stack_trace_depth;
std::__cxx11::string::_M_assign((string *)(this + 0xd0));
this[0xf0] = FLAGS_gtest_throw_on_failure;
return;
}
| |
40,533 | minja::Value::contains(minja::Value const&) const | monkey531[P]llama/common/minja.hpp | bool contains(const Value & value) const {
if (is_null())
throw std::runtime_error("Undefined value or reference");
if (array_) {
for (const auto& item : *array_) {
if (item.to_bool() && item == value) return true;
}
return false;
} else if (object_) {
if (!value.is_hashable()) throw std::runtime_error("Unashable type: " + value.dump());
return object_->find(value.primitive_) != object_->end();
} else {
throw std::runtime_error("contains can only be called on arrays and objects: " + dump());
}
} | O1 | cpp | minja::Value::contains(minja::Value const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %r15
movq 0x10(%rdi), %rax
movq 0x20(%rdi), %r12
testq %r12, %r12
jne 0x9971e
testq %rax, %rax
jne 0x9971e
cmpb $0x0, 0x40(%r15)
jne 0x9971e
cmpq $0x0, 0x30(%r15)
je 0x997d2
testq %rax, %rax
je 0x99757
movq (%rax), %r15
movq 0x8(%rax), %r12
cmpq %r12, %r15
setne %bl
je 0x997c0
movq %r15, %rdi
callq 0x8c1f8
testb %al, %al
je 0x99751
movq %r15, %rdi
movq %r14, %rsi
callq 0x9ab8e
testb %al, %al
jne 0x997c0
addq $0x50, %r15
jmp 0x9972a
testq %r12, %r12
je 0x99804
cmpq $0x0, 0x10(%r14)
jne 0x99861
cmpq $0x0, 0x20(%r14)
jne 0x99861
cmpq $0x0, 0x30(%r14)
jne 0x99861
movq (%r12), %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
je 0x997b5
addq $0x40, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x93429
testb %al, %al
jne 0x997b2
addq $0x60, %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
jne 0x99793
jmp 0x997b5
movq %rbx, %rax
movq 0x20(%r15), %rcx
cmpq 0x8(%rcx), %rax
setne %bl
andb $0x1, %bl
movl %ebx, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x1b450
movq %rax, %rbx
leaq 0x5e66c(%rip), %rsi # 0xf7e52
movq %rax, %rdi
callq 0x1b330
movq 0x9a7f3(%rip), %rsi # 0x133fe8
movq 0x9a75c(%rip), %rdx # 0x133f58
movq %rbx, %rdi
callq 0x1bf60
movl $0x10, %edi
callq 0x1b450
movq %rax, %rbx
movq %rsp, %rdi
movq %r15, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x8c5e0
leaq 0x5f0dc(%rip), %rsi # 0xf8906
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x7e407
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x1be70
xorl %ebp, %ebp
movq 0x9a798(%rip), %rsi # 0x133fe8
movq 0x9a701(%rip), %rdx # 0x133f58
movq %rbx, %rdi
callq 0x1bf60
jmp 0x998bc
movl $0x10, %edi
callq 0x1b450
movq %rax, %rbx
movq %rsp, %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x8c5e0
leaq 0x5ebcf(%rip), %rsi # 0xf8456
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x7e407
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x1be70
xorl %ebp, %ebp
movq 0x9a73b(%rip), %rsi # 0x133fe8
movq 0x9a6a4(%rip), %rdx # 0x133f58
movq %rbx, %rdi
callq 0x1bf60
jmp 0x998c0
jmp 0x998e0
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x998e6
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1b910
jmp 0x998e6
movq %rax, %r14
movb $0x1, %bpl
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9990b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1b910
jmp 0x9990b
jmp 0x99905
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
jne 0x99915
jmp 0x9991d
movq %rax, %r14
movq %rbx, %rdi
callq 0x1b690
movq %r14, %rdi
callq 0x1bff0
nop
| _ZNK5minja5Value8containsERKS0_:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 40h
mov r14, rsi
mov r15, rdi
mov rax, [rdi+10h]
mov r12, [rdi+20h]
test r12, r12
jnz short loc_9971E
test rax, rax
jnz short loc_9971E
cmp byte ptr [r15+40h], 0
jnz short loc_9971E
cmp qword ptr [r15+30h], 0
jz loc_997D2
loc_9971E:
test rax, rax
jz short loc_99757
mov r15, [rax]
mov r12, [rax+8]
loc_9972A:
cmp r15, r12
setnz bl
jz loc_997C0
mov rdi, r15; this
call _ZNK5minja5Value7to_boolEv; minja::Value::to_bool(void)
test al, al
jz short loc_99751
mov rdi, r15
mov rsi, r14
call _ZNK5minja5ValueeqERKS0_; minja::Value::operator==(minja::Value const&)
test al, al
jnz short loc_997C0
loc_99751:
add r15, 50h ; 'P'
jmp short loc_9972A
loc_99757:
test r12, r12
jz loc_99804
cmp qword ptr [r14+10h], 0
jnz loc_99861
cmp qword ptr [r14+20h], 0
jnz loc_99861
cmp qword ptr [r14+30h], 0
jnz loc_99861
mov rbx, [r12]
mov rax, [r12+8]
cmp rbx, rax
jz short loc_997B5
add r14, 40h ; '@'
loc_99793:
mov rdi, rbx
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_3eqERKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEESF_; nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
test al, al
jnz short loc_997B2
add rbx, 60h ; '`'
mov rax, [r12+8]
cmp rbx, rax
jnz short loc_99793
jmp short loc_997B5
loc_997B2:
mov rax, rbx
loc_997B5:
mov rcx, [r15+20h]
cmp rax, [rcx+8]
setnz bl
loc_997C0:
and bl, 1
mov eax, ebx
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_997D2:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aUndefinedValue; "Undefined value or reference"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_99804:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, rsp
mov rsi, r15
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aContainsCanOnl; "contains can only be called on arrays a"...
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+var_48]
mov rdi, 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
jmp short loc_998BC
loc_99861:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, rsp
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aUnashableType; "Unashable type: "
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+var_48]
mov rdi, 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
loc_998BC:
jmp short loc_998C0
jmp short loc_998E0
loc_998C0:
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_998E6
mov rsi, [rsp+68h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_998E6
loc_998E0:
mov r14, rax
mov bpl, 1
loc_998E6:
lea rax, [rsp+68h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_9990B
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_9990B
jmp short $+2
loc_99905:
mov r14, rax
mov bpl, 1
loc_9990B:
test bpl, bpl
jnz short loc_99915
jmp short loc_9991D
mov r14, rax
loc_99915:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_9991D:
mov rdi, r14
call __Unwind_Resume
| long long minja::Value::contains(minja::Value *this, const minja::Value *a2, __m128d a3)
{
unsigned __int8 *v3; // rbx
minja::Value **v4; // rax
unsigned __int8 **v5; // r12
minja::Value *v6; // r15
minja::Value *v7; // r12
unsigned __int8 *v8; // rax
std::runtime_error *exception; // rbx
void *v11; // rbx
void *v12; // rbx
_BYTE v13[16]; // [rsp+0h] [rbp-68h] BYREF
_BYTE v14[16]; // [rsp+20h] [rbp-48h] BYREF
v4 = (minja::Value **)*((_QWORD *)this + 2);
v5 = (unsigned __int8 **)*((_QWORD *)this + 4);
if ( !v5 && !v4 && !*((_BYTE *)this + 64) && !*((_QWORD *)this + 6) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Undefined value or reference");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( v4 )
{
v6 = *v4;
v7 = v4[1];
while ( 1 )
{
LOBYTE(v3) = v6 != v7;
if ( v6 == v7 || (unsigned __int8)minja::Value::to_bool(v6) && (unsigned __int8)minja::Value::operator==(v6, a2) )
break;
v6 = (minja::Value *)((char *)v6 + 80);
}
}
else
{
if ( !v5 )
{
v11 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v13, (long long)this, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v14, (long long)"contains can only be called on arrays and objects: ", (long long)v13);
std::runtime_error::runtime_error(v11, v14);
__cxa_throw(
v11,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( *((_QWORD *)a2 + 2) || *((_QWORD *)a2 + 4) || *((_QWORD *)a2 + 6) )
{
v12 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v13, (long long)a2, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v14, (long long)"Unashable type: ", (long long)v13);
std::runtime_error::runtime_error(v12, v14);
__cxa_throw(
v12,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v3 = *v5;
v8 = v5[1];
if ( *v5 != v8 )
{
while ( !(unsigned __int8)nlohmann::json_abi_v3_11_3::operator==(v3, (unsigned __int8 *)a2 + 64, a3) )
{
v3 += 96;
v8 = v5[1];
if ( v3 == v8 )
goto LABEL_20;
}
v8 = v3;
}
LABEL_20:
LOBYTE(v3) = v8 != *(unsigned __int8 **)(*((_QWORD *)this + 4) + 8LL);
}
LOBYTE(v3) = (unsigned __int8)v3 & 1;
return (unsigned int)v3;
}
| contains:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R14,RSI
MOV R15,RDI
MOV RAX,qword ptr [RDI + 0x10]
MOV R12,qword ptr [RDI + 0x20]
TEST R12,R12
JNZ 0x0019971e
TEST RAX,RAX
JNZ 0x0019971e
CMP byte ptr [R15 + 0x40],0x0
JNZ 0x0019971e
CMP qword ptr [R15 + 0x30],0x0
JZ 0x001997d2
LAB_0019971e:
TEST RAX,RAX
JZ 0x00199757
MOV R15,qword ptr [RAX]
MOV R12,qword ptr [RAX + 0x8]
LAB_0019972a:
CMP R15,R12
SETNZ BL
JZ 0x001997c0
MOV RDI,R15
CALL 0x0018c1f8
TEST AL,AL
JZ 0x00199751
MOV RDI,R15
MOV RSI,R14
CALL 0x0019ab8e
TEST AL,AL
JNZ 0x001997c0
LAB_00199751:
ADD R15,0x50
JMP 0x0019972a
LAB_00199757:
TEST R12,R12
JZ 0x00199804
CMP qword ptr [R14 + 0x10],0x0
JNZ 0x00199861
CMP qword ptr [R14 + 0x20],0x0
JNZ 0x00199861
CMP qword ptr [R14 + 0x30],0x0
JNZ 0x00199861
MOV RBX,qword ptr [R12]
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JZ 0x001997b5
ADD R14,0x40
LAB_00199793:
MOV RDI,RBX
MOV RSI,R14
CALL 0x00193429
TEST AL,AL
JNZ 0x001997b2
ADD RBX,0x60
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JNZ 0x00199793
JMP 0x001997b5
LAB_001997b2:
MOV RAX,RBX
LAB_001997b5:
MOV RCX,qword ptr [R15 + 0x20]
CMP RAX,qword ptr [RCX + 0x8]
SETNZ BL
LAB_001997c0:
AND BL,0x1
MOV EAX,EBX
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001997d2:
MOV EDI,0x10
CALL 0x0011b450
MOV RBX,RAX
LAB_001997df:
LEA RSI,[0x1f7e52]
MOV RDI,RAX
CALL 0x0011b330
LAB_001997ee:
MOV RSI,qword ptr [0x00233fe8]
MOV RDX,qword ptr [0x00233f58]
MOV RDI,RBX
CALL 0x0011bf60
LAB_00199804:
MOV EDI,0x10
CALL 0x0011b450
MOV RBX,RAX
LAB_00199811:
MOV RDI,RSP
MOV RSI,R15
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x0018c5e0
LAB_00199823:
LEA RSI,[0x1f8906]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x0017e407
MOV BPL,0x1
LAB_0019983a:
LEA RSI,[RSP + 0x20]
MOV RDI,RBX
CALL 0x0011be70
XOR EBP,EBP
MOV RSI,qword ptr [0x00233fe8]
MOV RDX,qword ptr [0x00233f58]
MOV RDI,RBX
CALL 0x0011bf60
LAB_00199861:
MOV EDI,0x10
CALL 0x0011b450
MOV RBX,RAX
LAB_0019986e:
MOV RDI,RSP
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x0018c5e0
LAB_00199880:
LEA RSI,[0x1f8456]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x0017e407
MOV BPL,0x1
LAB_00199897:
LEA RSI,[RSP + 0x20]
MOV RDI,RBX
CALL 0x0011be70
XOR EBP,EBP
MOV RSI,qword ptr [0x00233fe8]
MOV RDX,qword ptr [0x00233f58]
MOV RDI,RBX
CALL 0x0011bf60
|
/* minja::Value::contains(minja::Value const&) const */
ulong __thiscall minja::Value::contains(Value *this,Value *param_1)
{
int8 *puVar1;
long *plVar2;
Value *pVVar3;
char cVar4;
basic_json *pbVar5;
runtime_error *prVar6;
ulong unaff_RBX;
basic_json *pbVar7;
Value *this_00;
int1 auStack_68 [32];
string local_48 [32];
puVar1 = *(int8 **)(this + 0x10);
plVar2 = *(long **)(this + 0x20);
if ((((plVar2 == (long *)0x0) && (puVar1 == (int8 *)0x0)) && (this[0x40] == (Value)0x0)) &&
(*(long *)(this + 0x30) == 0)) {
prVar6 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001997df to 001997ed has its CatchHandler @ 00199912 */
std::runtime_error::runtime_error(prVar6,"Undefined value or reference");
/* WARNING: Subroutine does not return */
__cxa_throw(prVar6,PTR_typeinfo_00233fe8,PTR__runtime_error_00233f58);
}
if (puVar1 == (int8 *)0x0) {
if (plVar2 == (long *)0x0) {
prVar6 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00199811 to 00199822 has its CatchHandler @ 00199905 */
dump_abi_cxx11_((int)auStack_68,SUB81(this,0));
/* try { // try from 00199823 to 00199836 has its CatchHandler @ 001998e0 */
std::operator+((char *)local_48,
(string *)"contains can only be called on arrays and objects: ");
/* try { // try from 0019983a to 0019985e has its CatchHandler @ 001998c0 */
std::runtime_error::runtime_error(prVar6,local_48);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar6,PTR_typeinfo_00233fe8,PTR__runtime_error_00233f58);
}
if (((*(long *)(param_1 + 0x10) != 0) || (*(long *)(param_1 + 0x20) != 0)) ||
(*(long *)(param_1 + 0x30) != 0)) {
prVar6 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0019986e to 0019987f has its CatchHandler @ 00199903 */
dump_abi_cxx11_((int)auStack_68,SUB81(param_1,0));
/* try { // try from 00199880 to 00199893 has its CatchHandler @ 001998be */
std::operator+((char *)local_48,(string *)"Unashable type: ");
/* try { // try from 00199897 to 001998bb has its CatchHandler @ 001998bc */
std::runtime_error::runtime_error(prVar6,local_48);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar6,PTR_typeinfo_00233fe8,PTR__runtime_error_00233f58);
}
pbVar7 = (basic_json *)*plVar2;
pbVar5 = (basic_json *)plVar2[1];
if (pbVar7 != pbVar5) {
do {
pbVar5 = pbVar7;
cVar4 = nlohmann::json_abi_v3_11_3::operator==(pbVar5,(basic_json *)(param_1 + 0x40));
pbVar7 = pbVar5;
if (cVar4 != '\0') break;
pbVar7 = pbVar5 + 0x60;
pbVar5 = (basic_json *)plVar2[1];
} while (pbVar7 != pbVar5);
}
unaff_RBX = CONCAT71((int7)((ulong)pbVar7 >> 8),
pbVar5 != *(basic_json **)(*(long *)(this + 0x20) + 8));
}
else {
this_00 = (Value *)*puVar1;
pVVar3 = (Value *)puVar1[1];
while ((unaff_RBX = CONCAT71((int7)(unaff_RBX >> 8),this_00 != pVVar3), this_00 != pVVar3 &&
((cVar4 = to_bool(this_00), cVar4 == '\0' ||
(cVar4 = operator==(this_00,param_1), cVar4 == '\0'))))) {
this_00 = this_00 + 0x50;
}
}
return unaff_RBX & 0xffffffff;
}
| |
40,534 | minja::Value::contains(minja::Value const&) const | monkey531[P]llama/common/minja.hpp | bool contains(const Value & value) const {
if (is_null())
throw std::runtime_error("Undefined value or reference");
if (array_) {
for (const auto& item : *array_) {
if (item.to_bool() && item == value) return true;
}
return false;
} else if (object_) {
if (!value.is_hashable()) throw std::runtime_error("Unashable type: " + value.dump());
return object_->find(value.primitive_) != object_->end();
} else {
throw std::runtime_error("contains can only be called on arrays and objects: " + dump());
}
} | O2 | cpp | minja::Value::contains(minja::Value const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %r15
callq 0x681ac
testb %al, %al
jne 0x71f77
movq 0x10(%r15), %rax
testq %rax, %rax
je 0x71f37
movq (%rax), %rbx
movq 0x8(%rax), %r15
cmpq %r15, %rbx
setne %bpl
je 0x71f6a
movq %rbx, %rdi
callq 0x6791a
testb %al, %al
je 0x71f31
movq %rbx, %rdi
movq %r14, %rsi
callq 0x72ec8
testb %al, %al
jne 0x71f6a
addq $0x50, %rbx
jmp 0x71f0d
cmpq $0x0, 0x20(%r15)
je 0x71fa7
movq %r14, %rdi
callq 0x67bb2
testb %al, %al
je 0x72004
movq 0x20(%r15), %rdi
addq $0x40, %r14
movq %r14, %rsi
callq 0x6fe72
movq 0x20(%r15), %rcx
cmpq 0x8(%rcx), %rax
setne %bpl
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x24470
movq %rax, %rbx
leaq 0x46ec9(%rip), %rsi # 0xb8e52
movq %rax, %rdi
callq 0x24330
movq 0x92058(%rip), %rsi # 0x103ff0
movq 0x91fb9(%rip), %rdx # 0x103f58
movq %rbx, %rdi
callq 0x24f50
pushq $0x10
popq %rdi
callq 0x24470
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
pushq $-0x1
popq %rdx
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x67bc2
leaq 0x4793b(%rip), %rsi # 0xb9906
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 0x91ffd(%rip), %rsi # 0x103ff0
movq 0x91f5e(%rip), %rdx # 0x103f58
movq %rbx, %rdi
callq 0x24f50
jmp 0x7205f
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 0x4742e(%rip), %rsi # 0xb9456
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 0x91fa0(%rip), %rsi # 0x103ff0
movq 0x91f01(%rip), %rdx # 0x103f58
movq %rbx, %rdi
callq 0x24f50
jmp 0x72063
jmp 0x72072
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x25258
jmp 0x72078
movq %rax, %r14
movb $0x1, %bpl
leaq 0x8(%rsp), %rdi
callq 0x25258
testb %bpl, %bpl
jne 0x72090
jmp 0x72098
jmp 0x7208d
jmp 0x7208d
movq %rax, %r14
movq %rbx, %rdi
callq 0x246b0
movq %r14, %rdi
callq 0x24fe0
| _ZNK5minja5Value8containsERKS0_:
push rbp
push r15
push r14
push rbx
sub rsp, 48h
mov r14, rsi
mov r15, rdi
call _ZNK5minja5Value7is_nullEv; minja::Value::is_null(void)
test al, al
jnz short loc_71F77
mov rax, [r15+10h]
test rax, rax
jz short loc_71F37
mov rbx, [rax]
mov r15, [rax+8]
loc_71F0D:
cmp rbx, r15
setnz bpl
jz short loc_71F6A
mov rdi, rbx; this
call _ZNK5minja5Value7to_boolEv; minja::Value::to_bool(void)
test al, al
jz short loc_71F31
mov rdi, rbx
mov rsi, r14
call _ZNK5minja5ValueeqERKS0_; minja::Value::operator==(minja::Value const&)
test al, al
jnz short loc_71F6A
loc_71F31:
add rbx, 50h ; 'P'
jmp short loc_71F0D
loc_71F37:
cmp qword ptr [r15+20h], 0
jz short loc_71FA7
mov rdi, r14; this
call _ZNK5minja5Value12is_primitiveEv; minja::Value::is_primitive(void)
test al, al
jz loc_72004
mov rdi, [r15+20h]
add r14, 40h ; '@'
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE4findERSJ_; nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::find(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
mov rcx, [r15+20h]
cmp rax, [rcx+8]
setnz bpl
loc_71F6A:
mov eax, ebp
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_71F77:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aUndefinedValue; "Undefined value or reference"
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
loc_71FA7:
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, r15
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aContainsCanOnl; "contains can only be called on arrays a"...
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
jmp short loc_7205F
loc_72004:
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, aUnashableType; "Unashable type: "
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
loc_7205F:
jmp short loc_72063
jmp short loc_72072
loc_72063:
mov r14, rax
lea rdi, [rsp+68h+var_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_72078
loc_72072:
mov r14, rax
mov bpl, 1
loc_72078:
lea rdi, [rsp+68h+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_72090
jmp short loc_72098
jmp short loc_7208D
jmp short $+2
loc_7208D:
mov r14, rax
loc_72090:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_72098:
mov rdi, r14
call __Unwind_Resume
| long long minja::Value::contains(char ***this, const minja::Value *a2, __m128d a3)
{
unsigned int v3; // ebp
char **v4; // rax
minja::Value *v5; // rbx
minja::Value *v6; // r15
std::runtime_error *exception; // rbx
void *v9; // rbx
void *v10; // rbx
_BYTE v11[32]; // [rsp+8h] [rbp-60h] BYREF
_BYTE v12[64]; // [rsp+28h] [rbp-40h] BYREF
if ( minja::Value::is_null((minja::Value *)this) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Undefined value or reference");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v4 = this[2];
if ( v4 )
{
v5 = (minja::Value *)*v4;
v6 = (minja::Value *)v4[1];
while ( 1 )
{
LOBYTE(v3) = v5 != v6;
if ( v5 == v6 || (unsigned __int8)minja::Value::to_bool(v5) && (unsigned __int8)minja::Value::operator==(v5, a2) )
break;
v5 = (minja::Value *)((char *)v5 + 80);
}
}
else
{
if ( !this[4] )
{
v9 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v11, (long long)this, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v12, (long long)"contains can only be called on arrays and objects: ", (long long)v11);
std::runtime_error::runtime_error(v9, v12);
__cxa_throw(
v9,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( !minja::Value::is_primitive(a2) )
{
v10 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v11, (long long)a2, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v12, (long long)"Unashable type: ", (long long)v11);
std::runtime_error::runtime_error(v10, v12);
__cxa_throw(
v10,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
LOBYTE(v3) = nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::find(
this[4],
(char *)a2 + 64,
a3) != this[4][1];
}
return v3;
}
| contains:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R14,RSI
MOV R15,RDI
CALL 0x001681ac
TEST AL,AL
JNZ 0x00171f77
MOV RAX,qword ptr [R15 + 0x10]
TEST RAX,RAX
JZ 0x00171f37
MOV RBX,qword ptr [RAX]
MOV R15,qword ptr [RAX + 0x8]
LAB_00171f0d:
CMP RBX,R15
SETNZ BPL
JZ 0x00171f6a
MOV RDI,RBX
CALL 0x0016791a
TEST AL,AL
JZ 0x00171f31
MOV RDI,RBX
MOV RSI,R14
CALL 0x00172ec8
TEST AL,AL
JNZ 0x00171f6a
LAB_00171f31:
ADD RBX,0x50
JMP 0x00171f0d
LAB_00171f37:
CMP qword ptr [R15 + 0x20],0x0
JZ 0x00171fa7
MOV RDI,R14
CALL 0x00167bb2
TEST AL,AL
JZ 0x00172004
MOV RDI,qword ptr [R15 + 0x20]
ADD R14,0x40
MOV RSI,R14
CALL 0x0016fe72
MOV RCX,qword ptr [R15 + 0x20]
CMP RAX,qword ptr [RCX + 0x8]
SETNZ BPL
LAB_00171f6a:
MOV EAX,EBP
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00171f77:
PUSH 0x10
POP RDI
CALL 0x00124470
MOV RBX,RAX
LAB_00171f82:
LEA RSI,[0x1b8e52]
MOV RDI,RAX
CALL 0x00124330
LAB_00171f91:
MOV RSI,qword ptr [0x00203ff0]
MOV RDX,qword ptr [0x00203f58]
MOV RDI,RBX
CALL 0x00124f50
LAB_00171fa7:
PUSH 0x10
POP RDI
CALL 0x00124470
MOV RBX,RAX
LAB_00171fb2:
LEA RDI,[RSP + 0x8]
PUSH -0x1
POP RDX
MOV RSI,R15
XOR ECX,ECX
CALL 0x00167bc2
LAB_00171fc4:
LEA RSI,[0x1b9906]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL 0x0015d362
MOV BPL,0x1
LAB_00171fdd:
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
LAB_00172004:
PUSH 0x10
POP RDI
CALL 0x00124470
MOV RBX,RAX
LAB_0017200f:
LEA RDI,[RSP + 0x8]
PUSH -0x1
POP RDX
MOV RSI,R14
XOR ECX,ECX
CALL 0x00167bc2
LAB_00172021:
LEA RSI,[0x1b9456]
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL 0x0015d362
MOV BPL,0x1
LAB_0017203a:
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::Value::contains(minja::Value const&) const */
ulong __thiscall minja::Value::contains(Value *this,Value *param_1)
{
int8 *puVar1;
Value *pVVar2;
char cVar3;
long lVar4;
runtime_error *prVar5;
Value *this_00;
ulong unaff_RBP;
int1 local_60 [32];
string local_40 [32];
cVar3 = is_null(this);
if (cVar3 != '\0') {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00171f82 to 00171f90 has its CatchHandler @ 0017208d */
std::runtime_error::runtime_error(prVar5,"Undefined value or reference");
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_00203ff0,PTR__runtime_error_00203f58);
}
puVar1 = *(int8 **)(this + 0x10);
if (puVar1 == (int8 *)0x0) {
if (*(long *)(this + 0x20) == 0) {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00171fb2 to 00171fc3 has its CatchHandler @ 0017208b */
dump_abi_cxx11_((int)local_60,SUB81(this,0));
/* try { // try from 00171fc4 to 00171fd9 has its CatchHandler @ 00172072 */
std::operator+((char *)local_40,
(string *)"contains can only be called on arrays and objects: ");
/* try { // try from 00171fdd to 00172001 has its CatchHandler @ 00172063 */
std::runtime_error::runtime_error(prVar5,local_40);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_00203ff0,PTR__runtime_error_00203f58);
}
cVar3 = is_primitive(param_1);
if (cVar3 == '\0') {
prVar5 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0017200f to 00172020 has its CatchHandler @ 00172089 */
dump_abi_cxx11_((int)local_60,SUB81(param_1,0));
/* try { // try from 00172021 to 00172036 has its CatchHandler @ 00172061 */
std::operator+((char *)local_40,(string *)"Unashable type: ");
/* try { // try from 0017203a to 0017205e has its CatchHandler @ 0017205f */
std::runtime_error::runtime_error(prVar5,local_40);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar5,PTR_typeinfo_00203ff0,PTR__runtime_error_00203f58);
}
lVar4 = nlohmann::json_abi_v3_11_3::
ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::find(*(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
**)(this + 0x20),param_1 + 0x40);
unaff_RBP = CONCAT71((int7)(unaff_RBP >> 8),lVar4 != *(long *)(*(long *)(this + 0x20) + 8));
}
else {
pVVar2 = (Value *)puVar1[1];
for (this_00 = (Value *)*puVar1; unaff_RBP = CONCAT71((int7)(unaff_RBP >> 8),this_00 != pVVar2),
this_00 != pVVar2; this_00 = this_00 + 0x50) {
cVar3 = to_bool(this_00);
if (cVar3 != '\0') {
cVar3 = operator==(this_00,param_1);
if (cVar3 != '\0') break;
}
}
}
return unaff_RBP & 0xffffffff;
}
| |
40,535 | LefDefParser::defiVia::layer(int, char**, int*, int*, int*, int*) const | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiVia.cpp | void defiVia::layer(int index, char** layer, int* xl, int* yl,
int* xh, int* yh) const {
if (index >= 0 && index < numLayers_) {
if (layer) *layer = layers_[index];
if (xl) *xl = xl_[index];
if (yl) *yl = yl_[index];
if (xh) *xh = xh_[index];
if (yh) *yh = yh_[index];
}
} | O0 | cpp | LefDefParser::defiVia::layer(int, char**, int*, int*, int*, int*) const:
movq 0x8(%rsp), %rax
movq %rdi, -0x8(%rsp)
movl %esi, -0xc(%rsp)
movq %rdx, -0x18(%rsp)
movq %rcx, -0x20(%rsp)
movq %r8, -0x28(%rsp)
movq %r9, -0x30(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x38(%rsp)
cmpl $0x0, -0xc(%rsp)
jl 0x4467d
movq -0x38(%rsp), %rcx
movl -0xc(%rsp), %eax
cmpl 0x54(%rcx), %eax
jge 0x4467d
cmpq $0x0, -0x18(%rsp)
je 0x445fb
movq -0x38(%rsp), %rax
movq 0x20(%rax), %rax
movslq -0xc(%rsp), %rcx
movq (%rax,%rcx,8), %rcx
movq -0x18(%rsp), %rax
movq %rcx, (%rax)
cmpq $0x0, -0x20(%rsp)
je 0x4461b
movq -0x38(%rsp), %rax
movq 0x30(%rax), %rax
movslq -0xc(%rsp), %rcx
movl (%rax,%rcx,4), %ecx
movq -0x20(%rsp), %rax
movl %ecx, (%rax)
cmpq $0x0, -0x28(%rsp)
je 0x4463b
movq -0x38(%rsp), %rax
movq 0x38(%rax), %rax
movslq -0xc(%rsp), %rcx
movl (%rax,%rcx,4), %ecx
movq -0x28(%rsp), %rax
movl %ecx, (%rax)
cmpq $0x0, -0x30(%rsp)
je 0x4465b
movq -0x38(%rsp), %rax
movq 0x40(%rax), %rax
movslq -0xc(%rsp), %rcx
movl (%rax,%rcx,4), %ecx
movq -0x30(%rsp), %rax
movl %ecx, (%rax)
cmpq $0x0, 0x8(%rsp)
je 0x4467b
movq -0x38(%rsp), %rax
movq 0x48(%rax), %rax
movslq -0xc(%rsp), %rcx
movl (%rax,%rcx,4), %ecx
movq 0x8(%rsp), %rax
movl %ecx, (%rax)
jmp 0x4467d
retq
nop
| _ZNK12LefDefParser7defiVia5layerEiPPcPiS3_S3_S3_:
mov rax, [rsp+arg_0]
mov [rsp+var_8], rdi
mov [rsp+var_C], esi
mov [rsp+var_18], rdx
mov [rsp+var_20], rcx
mov [rsp+var_28], r8
mov [rsp+var_30], r9
mov rax, [rsp+var_8]
mov [rsp+var_38], rax
cmp [rsp+var_C], 0
jl locret_4467D
mov rcx, [rsp+var_38]
mov eax, [rsp+var_C]
cmp eax, [rcx+54h]
jge locret_4467D
cmp [rsp+var_18], 0
jz short loc_445FB
mov rax, [rsp+var_38]
mov rax, [rax+20h]
movsxd rcx, [rsp+var_C]
mov rcx, [rax+rcx*8]
mov rax, [rsp+var_18]
mov [rax], rcx
loc_445FB:
cmp [rsp+var_20], 0
jz short loc_4461B
mov rax, [rsp+var_38]
mov rax, [rax+30h]
movsxd rcx, [rsp+var_C]
mov ecx, [rax+rcx*4]
mov rax, [rsp+var_20]
mov [rax], ecx
loc_4461B:
cmp [rsp+var_28], 0
jz short loc_4463B
mov rax, [rsp+var_38]
mov rax, [rax+38h]
movsxd rcx, [rsp+var_C]
mov ecx, [rax+rcx*4]
mov rax, [rsp+var_28]
mov [rax], ecx
loc_4463B:
cmp [rsp+var_30], 0
jz short loc_4465B
mov rax, [rsp+var_38]
mov rax, [rax+40h]
movsxd rcx, [rsp+var_C]
mov ecx, [rax+rcx*4]
mov rax, [rsp+var_30]
mov [rax], ecx
loc_4465B:
cmp [rsp+arg_0], 0
jz short loc_4467B
mov rax, [rsp+var_38]
mov rax, [rax+48h]
movsxd rcx, [rsp+var_C]
mov ecx, [rax+rcx*4]
mov rax, [rsp+arg_0]
mov [rax], ecx
loc_4467B:
jmp short $+2
locret_4467D:
retn
| unsigned long long LefDefParser::defiVia::layer(
LefDefParser::defiVia *this,
int a2,
char **a3,
int *a4,
int *a5,
int *a6,
int *a7)
{
unsigned long long result; // rax
result = (unsigned long long)this;
if ( a2 >= 0 )
{
result = (unsigned int)a2;
if ( a2 < *((_DWORD *)this + 21) )
{
if ( a3 )
{
result = (unsigned long long)a3;
*a3 = *(char **)(*((_QWORD *)this + 4) + 8LL * a2);
}
if ( a4 )
{
result = (unsigned long long)a4;
*a4 = *(_DWORD *)(*((_QWORD *)this + 6) + 4LL * a2);
}
if ( a5 )
{
result = (unsigned long long)a5;
*a5 = *(_DWORD *)(*((_QWORD *)this + 7) + 4LL * a2);
}
if ( a6 )
{
result = (unsigned long long)a6;
*a6 = *(_DWORD *)(*((_QWORD *)this + 8) + 4LL * a2);
}
if ( a7 )
{
result = (unsigned long long)a7;
*a7 = *(_DWORD *)(*((_QWORD *)this + 9) + 4LL * a2);
}
}
}
return result;
}
| layer:
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + -0x8],RDI
MOV dword ptr [RSP + -0xc],ESI
MOV qword ptr [RSP + -0x18],RDX
MOV qword ptr [RSP + -0x20],RCX
MOV qword ptr [RSP + -0x28],R8
MOV qword ptr [RSP + -0x30],R9
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RSP + -0x38],RAX
CMP dword ptr [RSP + -0xc],0x0
JL 0x0014467d
MOV RCX,qword ptr [RSP + -0x38]
MOV EAX,dword ptr [RSP + -0xc]
CMP EAX,dword ptr [RCX + 0x54]
JGE 0x0014467d
CMP qword ptr [RSP + -0x18],0x0
JZ 0x001445fb
MOV RAX,qword ptr [RSP + -0x38]
MOV RAX,qword ptr [RAX + 0x20]
MOVSXD RCX,dword ptr [RSP + -0xc]
MOV RCX,qword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RSP + -0x18]
MOV qword ptr [RAX],RCX
LAB_001445fb:
CMP qword ptr [RSP + -0x20],0x0
JZ 0x0014461b
MOV RAX,qword ptr [RSP + -0x38]
MOV RAX,qword ptr [RAX + 0x30]
MOVSXD RCX,dword ptr [RSP + -0xc]
MOV ECX,dword ptr [RAX + RCX*0x4]
MOV RAX,qword ptr [RSP + -0x20]
MOV dword ptr [RAX],ECX
LAB_0014461b:
CMP qword ptr [RSP + -0x28],0x0
JZ 0x0014463b
MOV RAX,qword ptr [RSP + -0x38]
MOV RAX,qword ptr [RAX + 0x38]
MOVSXD RCX,dword ptr [RSP + -0xc]
MOV ECX,dword ptr [RAX + RCX*0x4]
MOV RAX,qword ptr [RSP + -0x28]
MOV dword ptr [RAX],ECX
LAB_0014463b:
CMP qword ptr [RSP + -0x30],0x0
JZ 0x0014465b
MOV RAX,qword ptr [RSP + -0x38]
MOV RAX,qword ptr [RAX + 0x40]
MOVSXD RCX,dword ptr [RSP + -0xc]
MOV ECX,dword ptr [RAX + RCX*0x4]
MOV RAX,qword ptr [RSP + -0x30]
MOV dword ptr [RAX],ECX
LAB_0014465b:
CMP qword ptr [RSP + 0x8],0x0
JZ 0x0014467b
MOV RAX,qword ptr [RSP + -0x38]
MOV RAX,qword ptr [RAX + 0x48]
MOVSXD RCX,dword ptr [RSP + -0xc]
MOV ECX,dword ptr [RAX + RCX*0x4]
MOV RAX,qword ptr [RSP + 0x8]
MOV dword ptr [RAX],ECX
LAB_0014467b:
JMP 0x0014467d
LAB_0014467d:
RET
|
/* LefDefParser::defiVia::layer(int, char**, int*, int*, int*, int*) const */
void __thiscall
LefDefParser::defiVia::layer
(defiVia *this,int param_1,char **param_2,int *param_3,int *param_4,int *param_5,
int *param_6)
{
if ((-1 < param_1) && (param_1 < *(int *)(this + 0x54))) {
if (param_2 != (char **)0x0) {
*param_2 = *(char **)(*(long *)(this + 0x20) + (long)param_1 * 8);
}
if (param_3 != (int *)0x0) {
*param_3 = *(int *)(*(long *)(this + 0x30) + (long)param_1 * 4);
}
if (param_4 != (int *)0x0) {
*param_4 = *(int *)(*(long *)(this + 0x38) + (long)param_1 * 4);
}
if (param_5 != (int *)0x0) {
*param_5 = *(int *)(*(long *)(this + 0x40) + (long)param_1 * 4);
}
if (param_6 != (int *)0x0) {
*param_6 = *(int *)(*(long *)(this + 0x48) + (long)param_1 * 4);
}
}
return;
}
| |
40,536 | inline_mysql_file_close | eloqsql/include/mysql/psi/mysql_file.h | static inline int
inline_mysql_file_close(
#ifdef HAVE_PSI_FILE_INTERFACE
const char *src_file, uint src_line,
#endif
File file, myf flags)
{
int result;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_CLOSE);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line);
result= my_close(file, flags);
PSI_FILE_CALL(end_file_close_wait)(locker, result);
return result;
}
#endif
result= my_close(file, flags);
return result;
} | O0 | c | inline_mysql_file_close:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
leaq 0x1cdb60(%rip), %rax # 0x238fa0
movq (%rax), %rax
movq 0x158(%rax), %rax
movl -0x18(%rbp), %esi
leaq -0x78(%rbp), %rdi
movl $0x4, %edx
callq *%rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x6b4cb
leaq 0x1cdb1d(%rip), %rax # 0x238fa0
movq (%rax), %rax
movq 0x220(%rax), %rax
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq *%rax
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
callq 0x807f0
movl %eax, -0x24(%rbp)
leaq 0x1cdaf0(%rip), %rax # 0x238fa0
movq (%rax), %rax
movq 0x228(%rax), %rax
movq -0x30(%rbp), %rdi
movl -0x24(%rbp), %esi
callq *%rax
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x6b4e0
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
callq 0x807f0
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax)
| inline_mysql_file_close_3:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov [rbp+var_20], rcx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+158h]
mov esi, [rbp+var_18]
lea rdi, [rbp+var_78]
mov edx, 4
call rax
mov [rbp+var_30], rax
cmp [rbp+var_30], 0
setnz al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_6B4CB
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+220h]
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_10]
mov edx, [rbp+var_14]
call rax
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
call my_close
mov [rbp+var_24], eax
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+228h]
mov rdi, [rbp+var_30]
mov esi, [rbp+var_24]
call rax
mov eax, [rbp+var_24]
mov [rbp+var_4], eax
jmp short loc_6B4E0
loc_6B4CB:
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
call my_close
mov [rbp+var_24], eax
mov eax, [rbp+var_24]
mov [rbp+var_4], eax
loc_6B4E0:
mov eax, [rbp+var_4]
add rsp, 80h
pop rbp
retn
| long long inline_mysql_file_close_3(long long a1, unsigned int a2, unsigned int a3, long long a4)
{
_BYTE v5[72]; // [rsp+8h] [rbp-78h] BYREF
long long v6; // [rsp+50h] [rbp-30h]
unsigned int v7; // [rsp+5Ch] [rbp-24h]
long long v8; // [rsp+60h] [rbp-20h]
unsigned int v9; // [rsp+68h] [rbp-18h]
unsigned int v10; // [rsp+6Ch] [rbp-14h]
long long v11; // [rsp+70h] [rbp-10h]
v11 = a1;
v10 = a2;
v9 = a3;
v8 = a4;
v6 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v5, a3, 4LL);
if ( v6 )
{
((void ( *)(long long, long long, _QWORD))PSI_server[68])(v6, v11, v10);
v7 = my_close(v9, v8);
((void ( *)(long long, _QWORD))PSI_server[69])(v6, v7);
}
else
{
return (unsigned int)my_close(v9, v8);
}
return v7;
}
| inline_mysql_file_close:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV qword ptr [RBP + -0x20],RCX
LEA RAX,[0x338fa0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x158]
MOV ESI,dword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x78]
MOV EDX,0x4
CALL RAX
MOV qword ptr [RBP + -0x30],RAX
CMP qword ptr [RBP + -0x30],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x0016b4cb
LEA RAX,[0x338fa0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x220]
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x14]
CALL RAX
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001807f0
MOV dword ptr [RBP + -0x24],EAX
LEA RAX,[0x338fa0]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x228]
MOV RDI,qword ptr [RBP + -0x30]
MOV ESI,dword ptr [RBP + -0x24]
CALL RAX
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0016b4e0
LAB_0016b4cb:
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x001807f0
MOV dword ptr [RBP + -0x24],EAX
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4],EAX
LAB_0016b4e0:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x80
POP RBP
RET
|
int4
inline_mysql_file_close(int8 param_1,int4 param_2,int4 param_3,int8 param_4)
{
int1 local_80 [72];
long local_38;
int4 local_2c;
int8 local_28;
int4 local_20;
int4 local_1c;
int8 local_18;
int4 local_c;
local_28 = param_4;
local_20 = param_3;
local_1c = param_2;
local_18 = param_1;
local_38 = (**(code **)(PSI_server + 0x158))(local_80,param_3,4);
if (local_38 == 0) {
local_c = my_close(local_20,local_28);
}
else {
(**(code **)(PSI_server + 0x220))(local_38,local_18,local_1c);
local_2c = my_close(local_20,local_28);
(**(code **)(PSI_server + 0x228))(local_38,local_2c);
local_c = local_2c;
}
return local_c;
}
| |
40,537 | dtoa_alloc | eloqsql/strings/dtoa.c | static char *dtoa_alloc(int i, Stack_alloc *alloc)
{
char *rv;
int aligned_size= MY_ALIGN(i, SIZEOF_CHARP);
if (alloc->free + aligned_size <= alloc->end)
{
rv= alloc->free;
alloc->free+= aligned_size;
}
else
rv= malloc(i);
return rv;
} | O0 | c | dtoa_alloc:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl -0x4(%rbp), %eax
addl $0x8, %eax
subl $0x1, %eax
andl $-0x8, %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x1c(%rbp), %rcx
addq %rcx, %rax
movq -0x10(%rbp), %rcx
cmpq 0x10(%rcx), %rax
ja 0x3b97a
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movl -0x1c(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, 0x8(%rax)
jmp 0x3b987
movslq -0x4(%rbp), %rdi
callq 0x243b0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| dtoa_alloc:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov eax, [rbp+var_4]
add eax, 8
sub eax, 1
and eax, 0FFFFFFF8h
mov [rbp+var_1C], eax
mov rax, [rbp+var_10]
mov rax, [rax+8]
movsxd rcx, [rbp+var_1C]
add rax, rcx
mov rcx, [rbp+var_10]
cmp rax, [rcx+10h]
ja short loc_3B97A
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rbp+var_18], rax
mov edx, [rbp+var_1C]
mov rax, [rbp+var_10]
mov rcx, [rax+8]
movsxd rdx, edx
add rcx, rdx
mov [rax+8], rcx
jmp short loc_3B987
loc_3B97A:
movsxd rdi, [rbp+var_4]
call _malloc
mov [rbp+var_18], rax
loc_3B987:
mov rax, [rbp+var_18]
add rsp, 20h
pop rbp
retn
| long long dtoa_alloc(int a1, long long a2)
{
signed int v3; // [rsp+4h] [rbp-1Ch]
long long v4; // [rsp+8h] [rbp-18h]
v3 = (a1 + 7) & 0xFFFFFFF8;
if ( (unsigned long long)(v3 + *(_QWORD *)(a2 + 8)) > *(_QWORD *)(a2 + 16) )
return malloc(a1);
v4 = *(_QWORD *)(a2 + 8);
*(_QWORD *)(a2 + 8) = v3 + v4;
return v4;
}
| dtoa_alloc:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV EAX,dword ptr [RBP + -0x4]
ADD EAX,0x8
SUB EAX,0x1
AND EAX,0xfffffff8
MOV dword ptr [RBP + -0x1c],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOVSXD RCX,dword ptr [RBP + -0x1c]
ADD RAX,RCX
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x10]
JA 0x0013b97a
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x18],RAX
MOV EDX,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x8]
MOVSXD RDX,EDX
ADD RCX,RDX
MOV qword ptr [RAX + 0x8],RCX
JMP 0x0013b987
LAB_0013b97a:
MOVSXD RDI,dword ptr [RBP + -0x4]
CALL 0x001243b0
MOV qword ptr [RBP + -0x18],RAX
LAB_0013b987:
MOV RAX,qword ptr [RBP + -0x18]
ADD RSP,0x20
POP RBP
RET
|
void * dtoa_alloc(int param_1,long param_2)
{
uint uVar1;
int8 local_20;
uVar1 = param_1 + 7U & 0xfffffff8;
if (*(ulong *)(param_2 + 0x10) < (ulong)(*(long *)(param_2 + 8) + (long)(int)uVar1)) {
local_20 = malloc((long)param_1);
}
else {
local_20 = *(void **)(param_2 + 8);
*(long *)(param_2 + 8) = *(long *)(param_2 + 8) + (long)(int)uVar1;
}
return local_20;
}
| |
40,538 | resize_queue | eloqsql/mysys/queues.c | int resize_queue(QUEUE *queue, uint max_elements)
{
uchar **new_root;
DBUG_ENTER("resize_queue");
if (queue->max_elements == max_elements)
DBUG_RETURN(0);
if ((new_root= (uchar **) my_realloc(key_memory_QUEUE, (void *)queue->root,
(max_elements + 1)* sizeof(void*),
MYF(MY_WME))) == 0)
DBUG_RETURN(1);
set_if_smaller(queue->elements, max_elements);
queue->max_elements= max_elements;
queue->root= new_root;
DBUG_RETURN(0);
} | O3 | c | resize_queue:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
xorl %ebx, %ebx
cmpl %esi, 0x14(%rdi)
je 0x5c6cf
movl %esi, %r15d
movq %rdi, %r14
leaq 0x352d15(%rip), %rax # 0x3af3b0
movl (%rax), %edi
movq (%r14), %rsi
leal 0x1(%r15), %edx
shlq $0x3, %rdx
movl $0x10, %ecx
callq 0x5a4e8
testq %rax, %rax
je 0x5c6ca
cmpl %r15d, 0x10(%r14)
jbe 0x5c6c1
movl %r15d, 0x10(%r14)
movl %r15d, 0x14(%r14)
movq %rax, (%r14)
jmp 0x5c6cf
movl $0x1, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| resize_queue:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
xor ebx, ebx
cmp [rdi+14h], esi
jz short loc_5C6CF
mov r15d, esi
mov r14, rdi
lea rax, key_memory_QUEUE
mov edi, [rax]
mov rsi, [r14]
lea edx, [r15+1]
shl rdx, 3
mov ecx, 10h
call my_realloc
test rax, rax
jz short loc_5C6CA
cmp [r14+10h], r15d
jbe short loc_5C6C1
mov [r14+10h], r15d
loc_5C6C1:
mov [r14+14h], r15d
mov [r14], rax
jmp short loc_5C6CF
loc_5C6CA:
mov ebx, 1
loc_5C6CF:
mov eax, ebx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long resize_queue(long long a1, unsigned int a2)
{
unsigned int v2; // ebx
long long v3; // rax
v2 = 0;
if ( *(_DWORD *)(a1 + 20) != a2 )
{
v3 = my_realloc(key_memory_QUEUE, *(_QWORD *)a1, (const char *)(8LL * (a2 + 1)), 16);
if ( v3 )
{
if ( *(_DWORD *)(a1 + 16) > a2 )
*(_DWORD *)(a1 + 16) = a2;
*(_DWORD *)(a1 + 20) = a2;
*(_QWORD *)a1 = v3;
}
else
{
return 1;
}
}
return v2;
}
| resize_queue:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
XOR EBX,EBX
CMP dword ptr [RDI + 0x14],ESI
JZ 0x0015c6cf
MOV R15D,ESI
MOV R14,RDI
LEA RAX,[0x4af3b0]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [R14]
LEA EDX,[R15 + 0x1]
SHL RDX,0x3
MOV ECX,0x10
CALL 0x0015a4e8
TEST RAX,RAX
JZ 0x0015c6ca
CMP dword ptr [R14 + 0x10],R15D
JBE 0x0015c6c1
MOV dword ptr [R14 + 0x10],R15D
LAB_0015c6c1:
MOV dword ptr [R14 + 0x14],R15D
MOV qword ptr [R14],RAX
JMP 0x0015c6cf
LAB_0015c6ca:
MOV EBX,0x1
LAB_0015c6cf:
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int8 resize_queue(long *param_1,uint param_2)
{
long lVar1;
int8 uVar2;
uVar2 = 0;
if (*(uint *)((long)param_1 + 0x14) != param_2) {
lVar1 = my_realloc(key_memory_QUEUE,*param_1,(ulong)(param_2 + 1) << 3,0x10);
if (lVar1 == 0) {
uVar2 = 1;
}
else {
if (param_2 < *(uint *)(param_1 + 2)) {
*(uint *)(param_1 + 2) = param_2;
}
*(uint *)((long)param_1 + 0x14) = param_2;
*param_1 = lVar1;
}
}
return uVar2;
}
| |
40,539 | my_freopen | eloqsql/mysys/my_fopen.c | FILE *my_freopen(const char *path, const char *mode, FILE *stream)
{
FILE *result;
#if defined(_WIN32)
result= my_win_freopen(path, mode, stream);
#else
result= freopen(path, mode, stream);
#endif
return result;
} | O0 | c | my_freopen:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x242e0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_freopen:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
call _freopen64
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
add rsp, 20h
pop rbp
retn
| long long my_freopen(long long a1, long long a2, long long a3)
{
return freopen64(a1, a2, a3);
}
| my_freopen:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x001242e0
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RSP,0x20
POP RBP
RET
|
FILE * my_freopen(char *param_1,char *param_2,FILE *param_3)
{
FILE *pFVar1;
pFVar1 = freopen64(param_1,param_2,param_3);
return pFVar1;
}
| |
40,540 | progress_bar::layout() | untodesu[P]voxelius/game/client/progress_bar.cc | void progress_bar::layout(void)
{
const auto viewport = ImGui::GetMainViewport();
const auto window_start = ImVec2(0.0f, viewport->Size.y * 0.30f);
const auto window_size = ImVec2(viewport->Size.x, viewport->Size.y * 0.70f);
ImGui::SetNextWindowPos(window_start);
ImGui::SetNextWindowSize(window_size);
if(ImGui::Begin("###UIProgress", nullptr, WINDOW_FLAGS)) {
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(0.0f, 1.0f * globals::gui_scale));
const float title_width = ImGui::CalcTextSize(str_title.c_str()).x;
ImGui::SetCursorPosX(0.5f * (window_size.x - title_width));
ImGui::TextUnformatted(str_title.c_str());
ImGui::Dummy(ImVec2(0.0f, 8.0f * globals::gui_scale));
const ImVec2 cursor = ImGui::GetCursorPos();
const std::size_t num_bars = 32;
const float spinner_width = 0.8f * ImGui::CalcItemWidth();
const float bar_width = spinner_width / static_cast<float>(num_bars);
const float bar_height = 0.5f * ImGui::GetFrameHeight();
const float base_xpos = window_start.x + 0.5f * (window_size.x - spinner_width) + 0.5f;
const float base_ypos = window_start.y + cursor.y;
const float phase = 2.0f * ImGui::GetTime();
const ImVec4 &background = ImGui::GetStyleColorVec4(ImGuiCol_Button);
const ImVec4 &foreground = ImGui::GetStyleColorVec4(ImGuiCol_PlotHistogram);
for(std::size_t i = 0; i < num_bars; ++i) {
const float sinval = std::sin(M_PI * static_cast<float>(i) / static_cast<float>(num_bars) - phase);
const float modifier = std::exp(-8.0f * (0.5f + 0.5f * sinval));
ImVec4 color = {};
color.x = cxpr::lerp(background.x, foreground.x, modifier);
color.y = cxpr::lerp(background.y, foreground.y, modifier);
color.z = cxpr::lerp(background.z, foreground.z, modifier);
color.w = cxpr::lerp(background.w, foreground.w, modifier);
const ImVec2 start = ImVec2(base_xpos + bar_width * i, base_ypos);
const ImVec2 end = ImVec2(start.x + bar_width, start.y + bar_height);
ImGui::GetWindowDrawList()->AddRectFilled(start, end, ImGui::GetColorU32(color));
}
// The NewLine call tricks ImGui into correctly padding the
// next widget that comes after the progress_bar spinner; this
// is needed to ensure the button is located in the correct place
ImGui::NewLine();
if(!str_button.empty()) {
ImGui::Dummy(ImVec2(0.0f, 32.0f * globals::gui_scale));
const float button_width = 0.8f * ImGui::CalcItemWidth();
ImGui::SetCursorPosX(0.5f * (window_size.x - button_width));
if(ImGui::Button(str_button.c_str(), ImVec2(button_width, 0.0f))) {
if(button_action) {
button_action();
}
}
}
ImGui::PopStyleVar();
}
ImGui::End();
} | O3 | cpp | progress_bar::layout():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
callq 0x10507c
movss 0x14(%rax), %xmm0
movss 0x1385e2(%rip), %xmm1 # 0x198a34
mulss %xmm0, %xmm1
leaq 0x48(%rsp), %rdi
movl $0x0, (%rdi)
movss %xmm1, 0x4(%rdi)
movss 0x10(%rax), %xmm1
mulss 0x1385c5(%rip), %xmm0 # 0x198a38
leaq 0x18(%rsp), %r14
movss %xmm1, (%r14)
movss %xmm0, 0x4(%r14)
leaq 0x20(%rsp), %rdx
movq $0x0, (%rdx)
xorl %ebx, %ebx
xorl %esi, %esi
callq 0x10a02a
movq %r14, %rdi
xorl %esi, %esi
callq 0xffe11
leaq 0x138597(%rip), %rdi # 0x198a40
xorl %esi, %esi
movl $0xab, %edx
callq 0xffe5d
testb %al, %al
je 0x607bd
leaq 0x1f9b7c(%rip), %r14 # 0x25a040
movl (%r14), %eax
xorps %xmm0, %xmm0
cvtsi2ss %rax, %xmm0
leaq 0x20(%rsp), %r15
movl %ebx, (%r15)
movss %xmm0, 0x4(%r15)
movl $0xb, %edi
movq %r15, %rsi
callq 0xf56e2
movq 0x1fafbf(%rip), %rdi # 0x25b4b0
movss 0x132a93(%rip), %xmm0 # 0x192f8c
xorl %esi, %esi
xorl %edx, %edx
callq 0xf5fcc
movss 0x18(%rsp), %xmm1
subss %xmm0, %xmm1
mulss 0x131314(%rip), %xmm1 # 0x191828
movaps %xmm1, %xmm0
callq 0x10d0d2
movq 0x1faf8d(%rip), %rdi # 0x25b4b0
xorl %esi, %esi
callq 0xcc66d
movl (%r14), %eax
xorps %xmm0, %xmm0
cvtsi2ss %rax, %xmm0
mulss 0x135da7(%rip), %xmm0 # 0x1962e4
movl %ebx, (%r15)
movss %xmm0, 0x4(%r15)
leaq 0x20(%rsp), %rdi
callq 0xd034c
callq 0x10d025
movaps %xmm0, 0x50(%rsp)
callq 0x10d5aa
mulss 0x1384d5(%rip), %xmm0 # 0x198a3c
movss %xmm0, 0x8(%rsp)
movss 0x138fd3(%rip), %xmm1 # 0x199548
mulss %xmm0, %xmm1
movss %xmm1, 0x14(%rsp)
callq 0x10d652
movss 0x13129c(%rip), %xmm1 # 0x191828
mulss %xmm1, %xmm0
movss %xmm0, 0xc(%rsp)
movss 0x18(%rsp), %xmm0
subss 0x8(%rsp), %xmm0
mulss %xmm1, %xmm0
addss 0x48(%rsp), %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0x10(%rsp)
movaps 0x50(%rsp), %xmm0
shufps $0x55, %xmm0, %xmm0 # xmm0 = xmm0[1,1,1,1]
addss 0x4c(%rsp), %xmm0
movaps %xmm0, 0x50(%rsp)
callq 0xfa008
addsd %xmm0, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x8(%rsp)
movl $0x15, %edi
callq 0xf4d4a
movq %rax, %r14
movl $0x2a, %edi
callq 0xf4d4a
movq %rax, %r15
xorps %xmm0, %xmm0
cvtss2sd 0x8(%rsp), %xmm0
movsd %xmm0, 0x60(%rsp)
movss 0xc(%rsp), %xmm0
addss 0x50(%rsp), %xmm0
movss %xmm0, 0xc(%rsp)
leaq 0x40(%rsp), %r12
leaq 0x38(%rsp), %r13
xorps %xmm0, %xmm0
cvtsi2ss %rbx, %xmm0
movss %xmm0, 0x8(%rsp)
xorps %xmm0, %xmm0
cvtsi2sd %rbx, %xmm0
mulsd 0x138f10(%rip), %xmm0 # 0x199550
mulsd 0x138f10(%rip), %xmm0 # 0x199558
subsd 0x60(%rsp), %xmm0
callq 0x26150
cvtsd2ss %xmm0, %xmm0
movss 0x1311c9(%rip), %xmm1 # 0x191828
mulss %xmm1, %xmm0
addss %xmm1, %xmm0
mulss 0x138edd(%rip), %xmm0 # 0x19954c
callq 0x26ec0
movss 0x132518(%rip), %xmm1 # 0x192b94
subss %xmm0, %xmm1
movups (%r14), %xmm2
movups (%r15), %xmm3
shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0]
mulps %xmm3, %xmm0
shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0]
mulps %xmm2, %xmm1
addps %xmm0, %xmm1
movaps %xmm1, 0x20(%rsp)
movss 0x14(%rsp), %xmm1
movss 0x8(%rsp), %xmm2
mulss %xmm1, %xmm2
addss 0x10(%rsp), %xmm2
movss %xmm2, 0x40(%rsp)
movaps 0x50(%rsp), %xmm0
movss %xmm0, 0x44(%rsp)
addss %xmm1, %xmm2
movss %xmm2, 0x38(%rsp)
movss 0xc(%rsp), %xmm0
movss %xmm0, 0x3c(%rsp)
callq 0x10a175
movq %rax, %rbp
leaq 0x20(%rsp), %rdi
callq 0xf4d1a
xorps %xmm0, %xmm0
movq %rbp, %rdi
movq %r12, %rsi
movq %r13, %rdx
movl %eax, %ecx
xorl %r8d, %r8d
callq 0xbd0ee
incq %rbx
cmpq $0x20, %rbx
jne 0x60622
callq 0xd03ab
cmpq $0x0, 0x1fadbb(%rip) # 0x25b4d8
je 0x607b3
leaq 0x1f9916(%rip), %rax # 0x25a040
movl (%rax), %eax
xorps %xmm0, %xmm0
cvtsi2ss %rax, %xmm0
mulss 0x132454(%rip), %xmm0 # 0x192b90
xorl %ebp, %ebp
leaq 0x20(%rsp), %rbx
movl %ebp, (%rbx)
movss %xmm0, 0x4(%rbx)
movq %rbx, %rdi
callq 0xd034c
callq 0x10d5aa
movaps %xmm0, %xmm1
mulss 0x1382da(%rip), %xmm1 # 0x198a3c
movss %xmm1, 0x8(%rsp)
movss 0x18(%rsp), %xmm0
subss %xmm1, %xmm0
mulss 0x1310ae(%rip), %xmm0 # 0x191828
callq 0x10d0d2
movq 0x1fad4a(%rip), %rdi # 0x25b4d0
movss 0x8(%rsp), %xmm0
movss %xmm0, (%rbx)
movl %ebp, 0x4(%rbx)
leaq 0x20(%rsp), %rsi
callq 0xcd7cb
movq 0x1fad4c(%rip), %rcx # 0x25b4f0
testq %rcx, %rcx
setne %dl
andb %al, %dl
cmpb $0x1, %dl
jne 0x607b3
callq *%rcx
movl $0x1, %edi
callq 0xf5847
callq 0x1050b7
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN12progress_bar6layoutEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
call _ZN5ImGui15GetMainViewportEv; ImGui::GetMainViewport(void)
movss xmm0, dword ptr [rax+14h]
movss xmm1, cs:flt_198A34
mulss xmm1, xmm0
lea rdi, [rsp+98h+var_50]
mov dword ptr [rdi], 0
movss dword ptr [rdi+4], xmm1
movss xmm1, dword ptr [rax+10h]
mulss xmm0, cs:flt_198A38
lea r14, [rsp+98h+var_80]
movss dword ptr [r14], xmm1
movss dword ptr [r14+4], xmm0
lea rdx, [rsp+98h+var_78]
mov qword ptr [rdx], 0
xor ebx, ebx
xor esi, esi
call _ZN5ImGui16SetNextWindowPosERK6ImVec2iS2_; ImGui::SetNextWindowPos(ImVec2 const&,int,ImVec2 const&)
mov rdi, r14
xor esi, esi
call _ZN5ImGui17SetNextWindowSizeERK6ImVec2i; ImGui::SetNextWindowSize(ImVec2 const&,int)
lea rdi, aUiprogress; "###UIProgress"
xor esi, esi; char *
mov edx, (offset qword_A8+3); bool *
call _ZN5ImGui5BeginEPKcPbi; ImGui::Begin(char const*,bool *,int)
test al, al
jz loc_607BD
lea r14, _ZN7globals9gui_scaleE; globals::gui_scale
mov eax, [r14]
xorps xmm0, xmm0
cvtsi2ss xmm0, rax
lea r15, [rsp+98h+var_78]
mov [r15], ebx
movss dword ptr [r15+4], xmm0
mov edi, 0Bh
mov rsi, r15
call _ZN5ImGui12PushStyleVarEiRK6ImVec2; ImGui::PushStyleVar(int,ImVec2 const&)
mov rdi, cs:_ZL9str_titleB5cxx11_1; this
movss xmm0, cs:flt_192F8C; float
xor esi, esi; char *
xor edx, edx; char *
call _ZN5ImGui12CalcTextSizeEPKcS1_bf; ImGui::CalcTextSize(char const*,char const*,bool,float)
movss xmm1, [rsp+98h+var_80]
subss xmm1, xmm0
mulss xmm1, cs:flt_191828
movaps xmm0, xmm1; float
call _ZN5ImGui13SetCursorPosXEf; ImGui::SetCursorPosX(float)
mov rdi, cs:_ZL9str_titleB5cxx11_1; this
xor esi, esi; int
call _ZN5ImGui15TextUnformattedEPKcS1_; ImGui::TextUnformatted(char const*,char const*)
mov eax, [r14]
xorps xmm0, xmm0
cvtsi2ss xmm0, rax
mulss xmm0, cs:dword_1962E4
mov [r15], ebx
movss dword ptr [r15+4], xmm0
lea rdi, [rsp+98h+var_78]; this
call _ZN5ImGui5DummyERK6ImVec2; ImGui::Dummy(ImVec2 const&)
call _ZN5ImGui12GetCursorPosEv; ImGui::GetCursorPos(void)
movaps [rsp+98h+var_48], xmm0
call _ZN5ImGui13CalcItemWidthEv; ImGui::CalcItemWidth(void)
mulss xmm0, cs:flt_198A3C
movss [rsp+98h+var_90], xmm0
movss xmm1, cs:dword_199548
mulss xmm1, xmm0
movss [rsp+98h+var_84], xmm1
call _ZN5ImGui14GetFrameHeightEv; ImGui::GetFrameHeight(void)
movss xmm1, cs:flt_191828
mulss xmm0, xmm1
movss [rsp+98h+var_8C], xmm0
movss xmm0, [rsp+98h+var_80]
subss xmm0, [rsp+98h+var_90]
mulss xmm0, xmm1
addss xmm0, [rsp+98h+var_50]
addss xmm0, xmm1
movss [rsp+98h+var_88], xmm0
movaps xmm0, [rsp+98h+var_48]
shufps xmm0, xmm0, 55h ; 'U'
addss xmm0, [rsp+98h+var_4C]
movaps [rsp+98h+var_48], xmm0
call _ZN5ImGui7GetTimeEv; ImGui::GetTime(void)
addsd xmm0, xmm0
cvtsd2ss xmm0, xmm0
movss [rsp+98h+var_90], xmm0
mov edi, (offset dword_14+1); this
call _ZN5ImGui17GetStyleColorVec4Ei; ImGui::GetStyleColorVec4(int)
mov r14, rax
mov edi, (offset qword_28+2); this
call _ZN5ImGui17GetStyleColorVec4Ei; ImGui::GetStyleColorVec4(int)
mov r15, rax
xorps xmm0, xmm0
cvtss2sd xmm0, [rsp+98h+var_90]
movsd [rsp+98h+var_38], xmm0
movss xmm0, [rsp+98h+var_8C]
addss xmm0, dword ptr [rsp+98h+var_48]
movss [rsp+98h+var_8C], xmm0
lea r12, [rsp+98h+var_58]
lea r13, [rsp+98h+var_60]
loc_60622:
xorps xmm0, xmm0
cvtsi2ss xmm0, rbx
movss [rsp+98h+var_90], xmm0
xorps xmm0, xmm0
cvtsi2sd xmm0, rbx
mulsd xmm0, cs:qword_199550
mulsd xmm0, cs:qword_199558
subsd xmm0, [rsp+98h+var_38]
call _sin
cvtsd2ss xmm0, xmm0
movss xmm1, cs:flt_191828
mulss xmm0, xmm1
addss xmm0, xmm1
mulss xmm0, cs:dword_19954C
call _expf
movss xmm1, cs:flt_192B94
subss xmm1, xmm0
movups xmm2, xmmword ptr [r14]
movups xmm3, xmmword ptr [r15]
shufps xmm0, xmm0, 0
mulps xmm0, xmm3
shufps xmm1, xmm1, 0
mulps xmm1, xmm2
addps xmm1, xmm0
movaps xmmword ptr [rsp+98h+var_78], xmm1
movss xmm1, [rsp+98h+var_84]
movss xmm2, [rsp+98h+var_90]
mulss xmm2, xmm1
addss xmm2, [rsp+98h+var_88]
movss [rsp+98h+var_58], xmm2
movaps xmm0, [rsp+98h+var_48]
movss [rsp+98h+var_54], xmm0
addss xmm2, xmm1
movss [rsp+98h+var_60], xmm2
movss xmm0, [rsp+98h+var_8C]
movss [rsp+98h+var_5C], xmm0
call _ZN5ImGui17GetWindowDrawListEv; ImGui::GetWindowDrawList(void)
mov rbp, rax
lea rdi, [rsp+98h+var_78]
call _ZN5ImGui11GetColorU32ERK6ImVec4; ImGui::GetColorU32(ImVec4 const&)
xorps xmm0, xmm0
mov rdi, rbp; this
mov rsi, r12
mov rdx, r13
mov ecx, eax
xor r8d, r8d
call _ZN10ImDrawList13AddRectFilledERK6ImVec2S2_jfi; ImDrawList::AddRectFilled(ImVec2 const&,ImVec2 const&,uint,float,int)
inc rbx
cmp rbx, 20h ; ' '
jnz loc_60622
call _ZN5ImGui7NewLineEv; ImGui::NewLine(void)
cmp cs:qword_25B4D8, 0
jz loc_607B3
lea rax, _ZN7globals9gui_scaleE; globals::gui_scale
mov eax, [rax]
xorps xmm0, xmm0
cvtsi2ss xmm0, rax
mulss xmm0, cs:dword_192B90
xor ebp, ebp
lea rbx, [rsp+98h+var_78]
mov [rbx], ebp
movss dword ptr [rbx+4], xmm0
mov rdi, rbx; this
call _ZN5ImGui5DummyERK6ImVec2; ImGui::Dummy(ImVec2 const&)
call _ZN5ImGui13CalcItemWidthEv; ImGui::CalcItemWidth(void)
movaps xmm1, xmm0
mulss xmm1, cs:flt_198A3C
movss [rsp+98h+var_90], xmm1
movss xmm0, [rsp+98h+var_80]
subss xmm0, xmm1
mulss xmm0, cs:flt_191828; float
call _ZN5ImGui13SetCursorPosXEf; ImGui::SetCursorPosX(float)
mov rdi, cs:_ZL10str_buttonB5cxx11; str_button
movss xmm0, [rsp+98h+var_90]
movss dword ptr [rbx], xmm0
mov [rbx+4], ebp
lea rsi, [rsp+98h+var_78]; int
call _ZN5ImGui6ButtonEPKcRK6ImVec2; ImGui::Button(char const*,ImVec2 const&)
mov rcx, cs:_ZL13button_action; button_action
test rcx, rcx
setnz dl
and dl, al
cmp dl, 1
jnz short loc_607B3
call rcx ; button_action
loc_607B3:
mov edi, (offset dword_0+1); this
call _ZN5ImGui11PopStyleVarEi; ImGui::PopStyleVar(int)
loc_607BD:
call _ZN5ImGui3EndEv; ImGui::End(void)
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long progress_bar::layout(progress_bar *this)
{
long long MainViewport; // rax
float v2; // xmm0_4
long long v3; // rbx
ImGui *v4; // rdi
int v5; // ecx
ImGui *v6; // rdi
bool v7; // cl
const char *v8; // rdx
__m128 v9; // xmm0
__m128 v10; // xmm0
__m128 *StyleColorVec4; // r14
ImGui *v12; // rdi
__m128 *v13; // r15
__m128 v14; // xmm0
__m128 v15; // xmm1
ImDrawList *WindowDrawList; // rbp
int *v17; // rsi
int v18; // xmm0_4
float v20; // [rsp+Ch] [rbp-8Ch]
float v21; // [rsp+Ch] [rbp-8Ch]
float v22; // [rsp+10h] [rbp-88h]
float v23; // [rsp+14h] [rbp-84h]
float v24[2]; // [rsp+18h] [rbp-80h] BYREF
__m128 v25; // [rsp+20h] [rbp-78h] BYREF
float v26; // [rsp+38h] [rbp-60h]
float v27; // [rsp+3Ch] [rbp-5Ch]
float v28[2]; // [rsp+40h] [rbp-58h] BYREF
float v29; // [rsp+48h] [rbp-50h] BYREF
float v30; // [rsp+4Ch] [rbp-4Ch]
__m128 v31; // [rsp+50h] [rbp-48h]
double v32; // [rsp+60h] [rbp-38h]
MainViewport = ImGui::GetMainViewport(this);
v2 = *(float *)(MainViewport + 20);
v29 = 0.0;
v30 = 0.30000001 * v2;
v24[0] = *(float *)(MainViewport + 16);
v24[1] = v2 * 0.69999999;
v25.m128_u64[0] = 0LL;
v3 = 0LL;
ImGui::SetNextWindowPos(&v29, 0LL, &v25);
ImGui::SetNextWindowSize(v24, 0LL);
v4 = (ImGui *)"###UIProgress";
if ( (unsigned __int8)ImGui::Begin((ImGui *)"###UIProgress", 0LL, (bool *)&qword_A8 + 3, v5) )
{
v25.m128_i32[0] = 0;
v25.m128_f32[1] = (float)globals::gui_scale;
ImGui::PushStyleVar(11LL);
v6 = str_title[abi:cxx11];
ImGui::CalcTextSize(str_title[abi:cxx11], 0LL, 0LL, v7, -1.0);
ImGui::SetCursorPosX(v6, (float)(v24[0] - -1.0) * 0.5);
ImGui::TextUnformatted(str_title[abi:cxx11], 0LL, v8);
v9 = 0LL;
v9.m128_f32[0] = (float)globals::gui_scale * 8.0;
v25.m128_i32[0] = 0;
v25.m128_f32[1] = v9.m128_f32[0];
ImGui::Dummy(&v25);
ImGui::GetCursorPos((ImGui *)&v25);
v31 = v9;
ImGui::CalcItemWidth((ImGui *)&v25);
v23 = 0.03125 * (float)(v9.m128_f32[0] * 0.80000001);
ImGui::GetFrameHeight((ImGui *)&v25);
v20 = (float)(v9.m128_f32[0] * 0.80000001) * 0.5;
v22 = (float)((float)((float)(v24[0] - (float)(v9.m128_f32[0] * 0.80000001)) * 0.5) + v29) + 0.5;
v10 = _mm_shuffle_ps(v31, v31, 85);
v10.m128_f32[0] = v10.m128_f32[0] + v30;
v31 = v10;
ImGui::GetTime((ImGui *)&v25);
v10.m128_f32[0] = *(double *)v10.m128_u64 + *(double *)v10.m128_u64;
StyleColorVec4 = (__m128 *)ImGui::GetStyleColorVec4((ImGui *)((char *)&dword_14 + 1), 0);
v12 = (ImGui *)((char *)&qword_28 + 2);
v13 = (__m128 *)ImGui::GetStyleColorVec4((ImGui *)((char *)&qword_28 + 2), 0);
v32 = v10.m128_f32[0];
v21 = v20 + v31.m128_f32[0];
do
{
v14 = 0LL;
v14.m128_f32[0] = sin((double)(int)v3 * 3.141592653589793 * 0.03125 - v32);
*(double *)v14.m128_u64 = expf((float)((float)(v14.m128_f32[0] * 0.5) + 0.5) * -8.0);
v15 = (__m128)0x3F800000u;
v15.m128_f32[0] = 1.0 - v14.m128_f32[0];
v25 = _mm_add_ps(
_mm_mul_ps(_mm_shuffle_ps(v15, v15, 0), *StyleColorVec4),
_mm_mul_ps(_mm_shuffle_ps(v14, v14, 0), *v13));
v28[0] = (float)((float)(int)v3 * v23) + v22;
v28[1] = v31.m128_f32[0];
v26 = v28[0] + v23;
v27 = v21;
WindowDrawList = (ImDrawList *)ImGui::GetWindowDrawList(v12);
ImGui::GetColorU32(&v25);
v12 = WindowDrawList;
v17 = (int *)v28;
ImDrawList::AddRectFilled(WindowDrawList);
++v3;
}
while ( v3 != 32 );
ImGui::NewLine(WindowDrawList);
if ( qword_25B4D8 )
{
*(float *)&v18 = (float)globals::gui_scale * 32.0;
v25.m128_i32[0] = 0;
v25.m128_f32[1] = *(float *)&v18;
ImGui::Dummy(&v25);
ImGui::CalcItemWidth((ImGui *)&v25);
ImGui::SetCursorPosX((ImGui *)&v25, (float)(v24[0] - (float)(*(float *)&v18 * 0.80000001)) * 0.5);
v25.m128_f32[0] = *(float *)&v18 * 0.80000001;
v25.m128_i32[1] = 0;
v17 = (int *)&v25;
if ( ((unsigned __int8)ImGui::Button(str_button[abi:cxx11], &v25) & (button_action != 0LL)) == 1 )
button_action();
}
v4 = (ImGui *)((char *)&dword_0 + 1);
ImGui::PopStyleVar((ImGui *)((char *)&dword_0 + 1), (int)v17);
}
return ImGui::End(v4);
}
| layout:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
CALL 0x0020507c
MOVSS XMM0,dword ptr [RAX + 0x14]
MOVSS XMM1,dword ptr [0x00298a34]
MULSS XMM1,XMM0
LEA RDI,[RSP + 0x48]
MOV dword ptr [RDI],0x0
MOVSS dword ptr [RDI + 0x4],XMM1
MOVSS XMM1,dword ptr [RAX + 0x10]
MULSS XMM0,dword ptr [0x00298a38]
LEA R14,[RSP + 0x18]
MOVSS dword ptr [R14],XMM1
MOVSS dword ptr [R14 + 0x4],XMM0
LEA RDX,[RSP + 0x20]
MOV qword ptr [RDX],0x0
XOR EBX,EBX
XOR ESI,ESI
CALL 0x0020a02a
MOV RDI,R14
XOR ESI,ESI
CALL 0x001ffe11
LEA RDI,[0x298a40]
XOR ESI,ESI
MOV EDX,0xab
CALL 0x001ffe5d
TEST AL,AL
JZ 0x001607bd
LEA R14,[0x35a040]
MOV EAX,dword ptr [R14]
XORPS XMM0,XMM0
CVTSI2SS XMM0,RAX
LEA R15,[RSP + 0x20]
MOV dword ptr [R15],EBX
MOVSS dword ptr [R15 + 0x4],XMM0
MOV EDI,0xb
MOV RSI,R15
CALL 0x001f56e2
MOV RDI,qword ptr [0x0035b4b0]
MOVSS XMM0,dword ptr [0x00292f8c]
XOR ESI,ESI
XOR EDX,EDX
CALL 0x001f5fcc
MOVSS XMM1,dword ptr [RSP + 0x18]
SUBSS XMM1,XMM0
MULSS XMM1,dword ptr [0x00291828]
MOVAPS XMM0,XMM1
CALL 0x0020d0d2
MOV RDI,qword ptr [0x0035b4b0]
XOR ESI,ESI
CALL 0x001cc66d
MOV EAX,dword ptr [R14]
XORPS XMM0,XMM0
CVTSI2SS XMM0,RAX
MULSS XMM0,dword ptr [0x002962e4]
MOV dword ptr [R15],EBX
MOVSS dword ptr [R15 + 0x4],XMM0
LEA RDI,[RSP + 0x20]
CALL 0x001d034c
CALL 0x0020d025
MOVAPS xmmword ptr [RSP + 0x50],XMM0
CALL 0x0020d5aa
MULSS XMM0,dword ptr [0x00298a3c]
MOVSS dword ptr [RSP + 0x8],XMM0
MOVSS XMM1,dword ptr [0x00299548]
MULSS XMM1,XMM0
MOVSS dword ptr [RSP + 0x14],XMM1
CALL 0x0020d652
MOVSS XMM1,dword ptr [0x00291828]
MULSS XMM0,XMM1
MOVSS dword ptr [RSP + 0xc],XMM0
MOVSS XMM0,dword ptr [RSP + 0x18]
SUBSS XMM0,dword ptr [RSP + 0x8]
MULSS XMM0,XMM1
ADDSS XMM0,dword ptr [RSP + 0x48]
ADDSS XMM0,XMM1
MOVSS dword ptr [RSP + 0x10],XMM0
MOVAPS XMM0,xmmword ptr [RSP + 0x50]
SHUFPS XMM0,XMM0,0x55
ADDSS XMM0,dword ptr [RSP + 0x4c]
MOVAPS xmmword ptr [RSP + 0x50],XMM0
CALL 0x001fa008
ADDSD XMM0,XMM0
CVTSD2SS XMM0,XMM0
MOVSS dword ptr [RSP + 0x8],XMM0
MOV EDI,0x15
CALL 0x001f4d4a
MOV R14,RAX
MOV EDI,0x2a
CALL 0x001f4d4a
MOV R15,RAX
XORPS XMM0,XMM0
CVTSS2SD XMM0,dword ptr [RSP + 0x8]
MOVSD qword ptr [RSP + 0x60],XMM0
MOVSS XMM0,dword ptr [RSP + 0xc]
ADDSS XMM0,dword ptr [RSP + 0x50]
MOVSS dword ptr [RSP + 0xc],XMM0
LEA R12,[RSP + 0x40]
LEA R13,[RSP + 0x38]
LAB_00160622:
XORPS XMM0,XMM0
CVTSI2SS XMM0,RBX
MOVSS dword ptr [RSP + 0x8],XMM0
XORPS XMM0,XMM0
CVTSI2SD XMM0,RBX
MULSD XMM0,qword ptr [0x00299550]
MULSD XMM0,qword ptr [0x00299558]
SUBSD XMM0,qword ptr [RSP + 0x60]
CALL 0x00126150
CVTSD2SS XMM0,XMM0
MOVSS XMM1,dword ptr [0x00291828]
MULSS XMM0,XMM1
ADDSS XMM0,XMM1
MULSS XMM0,dword ptr [0x0029954c]
CALL 0x00126ec0
MOVSS XMM1,dword ptr [0x00292b94]
SUBSS XMM1,XMM0
MOVUPS XMM2,xmmword ptr [R14]
MOVUPS XMM3,xmmword ptr [R15]
SHUFPS XMM0,XMM0,0x0
MULPS XMM0,XMM3
SHUFPS XMM1,XMM1,0x0
MULPS XMM1,XMM2
ADDPS XMM1,XMM0
MOVAPS xmmword ptr [RSP + 0x20],XMM1
MOVSS XMM1,dword ptr [RSP + 0x14]
MOVSS XMM2,dword ptr [RSP + 0x8]
MULSS XMM2,XMM1
ADDSS XMM2,dword ptr [RSP + 0x10]
MOVSS dword ptr [RSP + 0x40],XMM2
MOVAPS XMM0,xmmword ptr [RSP + 0x50]
MOVSS dword ptr [RSP + 0x44],XMM0
ADDSS XMM2,XMM1
MOVSS dword ptr [RSP + 0x38],XMM2
MOVSS XMM0,dword ptr [RSP + 0xc]
MOVSS dword ptr [RSP + 0x3c],XMM0
CALL 0x0020a175
MOV RBP,RAX
LEA RDI,[RSP + 0x20]
CALL 0x001f4d1a
XORPS XMM0,XMM0
MOV RDI,RBP
MOV RSI,R12
MOV RDX,R13
MOV ECX,EAX
XOR R8D,R8D
CALL 0x001bd0ee
INC RBX
CMP RBX,0x20
JNZ 0x00160622
CALL 0x001d03ab
CMP qword ptr [0x0035b4d8],0x0
JZ 0x001607b3
LEA RAX,[0x35a040]
MOV EAX,dword ptr [RAX]
XORPS XMM0,XMM0
CVTSI2SS XMM0,RAX
MULSS XMM0,dword ptr [0x00292b90]
XOR EBP,EBP
LEA RBX,[RSP + 0x20]
MOV dword ptr [RBX],EBP
MOVSS dword ptr [RBX + 0x4],XMM0
MOV RDI,RBX
CALL 0x001d034c
CALL 0x0020d5aa
MOVAPS XMM1,XMM0
MULSS XMM1,dword ptr [0x00298a3c]
MOVSS dword ptr [RSP + 0x8],XMM1
MOVSS XMM0,dword ptr [RSP + 0x18]
SUBSS XMM0,XMM1
MULSS XMM0,dword ptr [0x00291828]
CALL 0x0020d0d2
MOV RDI,qword ptr [0x0035b4d0]
MOVSS XMM0,dword ptr [RSP + 0x8]
MOVSS dword ptr [RBX],XMM0
MOV dword ptr [RBX + 0x4],EBP
LEA RSI,[RSP + 0x20]
CALL 0x001cd7cb
MOV RCX,qword ptr [0x0035b4f0]
TEST RCX,RCX
SETNZ DL
AND DL,AL
CMP DL,0x1
JNZ 0x001607b3
CALL RCX
LAB_001607b3:
MOV EDI,0x1
CALL 0x001f5847
LAB_001607bd:
CALL 0x002050b7
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* progress_bar::layout() */
void progress_bar::layout(void)
{
char cVar1;
byte bVar2;
uint uVar3;
long lVar4;
float *pfVar5;
float *pfVar6;
ImDrawList *this;
float fVar7;
float fVar8;
float fVar9;
double dVar10;
float fVar11;
float fVar12;
float local_80;
float local_7c;
int8 local_78;
float fStack_70;
float fStack_6c;
float local_60;
float local_5c;
float local_58;
float local_54;
float local_50;
float local_4c;
int8 local_48;
float fStack_40;
float fStack_3c;
double local_38;
lVar4 = ImGui::GetMainViewport();
local_4c = DAT_00298a34 * *(float *)(lVar4 + 0x14);
local_50 = 0.0;
local_80 = *(float *)(lVar4 + 0x10);
local_7c = *(float *)(lVar4 + 0x14) * DAT_00298a38;
local_78 = 0;
lVar4 = 0;
ImGui::SetNextWindowPos((ImVec2 *)&local_50,0,(ImVec2 *)&local_78);
ImGui::SetNextWindowSize((ImVec2 *)&local_80,0);
cVar1 = ImGui::Begin("###UIProgress",(bool *)0x0,0xab);
if (cVar1 != '\0') {
local_78 = (ulong)(uint)(float)globals::gui_scale << 0x20;
ImGui::PushStyleVar(0xb,(ImVec2 *)&local_78);
fVar7 = (float)ImGui::CalcTextSize(str_title_abi_cxx11_,(char *)0x0,false,DAT_00292f8c);
ImGui::SetCursorPosX((local_80 - fVar7) * DAT_00291828);
ImGui::TextUnformatted(str_title_abi_cxx11_,(char *)0x0);
local_78 = (ulong)(uint)((float)globals::gui_scale * DAT_002962e4) << 0x20;
ImGui::Dummy((ImVec2 *)&local_78);
local_48 = ImGui::GetCursorPos();
fVar7 = (float)ImGui::CalcItemWidth();
fVar7 = fVar7 * _DAT_00298a3c;
fVar11 = DAT_00299548 * fVar7;
fVar8 = (float)ImGui::GetFrameHeight();
fVar8 = fVar8 * DAT_00291828;
fVar7 = (local_80 - fVar7) * DAT_00291828 + local_50 + DAT_00291828;
local_48._0_4_ = local_48._4_4_ + local_4c;
fStack_40 = local_48._4_4_;
fStack_3c = local_48._4_4_;
dVar10 = (double)ImGui::GetTime();
pfVar5 = (float *)ImGui::GetStyleColorVec4(0x15);
pfVar6 = (float *)ImGui::GetStyleColorVec4(0x2a);
local_38 = (double)(float)(dVar10 + dVar10);
fVar8 = fVar8 + (float)local_48;
do {
dVar10 = sin((double)lVar4 * _DAT_00299550 * _DAT_00299558 - local_38);
fVar9 = expf(((float)dVar10 * DAT_00291828 + DAT_00291828) * DAT_0029954c);
fVar12 = DAT_00292b94 - fVar9;
fStack_70 = fVar12 * pfVar5[2] + fVar9 * pfVar6[2];
fStack_6c = fVar12 * pfVar5[3] + fVar9 * pfVar6[3];
local_78 = CONCAT44(fVar12 * pfVar5[1] + fVar9 * pfVar6[1],fVar12 * *pfVar5 + fVar9 * *pfVar6)
;
local_58 = (float)lVar4 * fVar11 + fVar7;
local_54 = (float)local_48;
local_60 = local_58 + fVar11;
local_5c = fVar8;
this = (ImDrawList *)ImGui::GetWindowDrawList();
uVar3 = ImGui::GetColorU32((ImVec4 *)&local_78);
ImDrawList::AddRectFilled(this,(ImVec2 *)&local_58,(ImVec2 *)&local_60,uVar3,0.0,0);
lVar4 = lVar4 + 1;
} while (lVar4 != 0x20);
ImGui::NewLine();
if (_DAT_0035b4d8 != 0) {
local_78 = (ulong)(uint)((float)globals::gui_scale * _DAT_00292b90) << 0x20;
ImGui::Dummy((ImVec2 *)&local_78);
fVar7 = (float)ImGui::CalcItemWidth();
fVar7 = fVar7 * _DAT_00298a3c;
ImGui::SetCursorPosX((local_80 - fVar7) * DAT_00291828);
local_78 = (ulong)(uint)fVar7;
bVar2 = ImGui::Button(str_button_abi_cxx11_,(ImVec2 *)&local_78);
if ((button_action != (code *)0x0 & bVar2) == 1) {
(*button_action)();
}
}
ImGui::PopStyleVar(1);
}
ImGui::End();
return;
}
| |
40,541 | ma_write_blob_record | eloqsql/storage/maria/ma_dynrec.c | my_bool _ma_write_blob_record(MARIA_HA *info, const uchar *record)
{
uchar *rec_buff;
int error;
ulong reclength,reclength2,extra;
my_bool buff_alloced;
extra= (ALIGN_SIZE(MARIA_MAX_DYN_BLOCK_HEADER)+MARIA_SPLIT_LENGTH+
MARIA_DYN_DELETE_BLOCK_HEADER+1);
reclength= (info->s->base.pack_reclength +
_ma_calc_total_blob_length(info,record)+ extra);
alloc_on_stack(*info->stack_end_ptr, rec_buff, buff_alloced, reclength);
if (!rec_buff)
{
my_errno= HA_ERR_OUT_OF_MEM; /* purecov: inspected */
return(1);
}
reclength2= _ma_rec_pack(info,
rec_buff+ALIGN_SIZE(MARIA_MAX_DYN_BLOCK_HEADER),
record);
if (!reclength2)
{
error= 1;
goto err;
}
DBUG_PRINT("info",("reclength: %lu reclength2: %lu",
reclength, reclength2));
DBUG_ASSERT(reclength2 <= reclength);
error= write_dynamic_record(info,
rec_buff+ALIGN_SIZE(MARIA_MAX_DYN_BLOCK_HEADER),
reclength2);
err:
stack_alloc_free(rec_buff, buff_alloced);
return(error != 0);
} | O3 | c | ma_write_blob_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq (%rdi), %rax
movq 0x3a0(%rax), %r15
callq 0x3cf72
leaq (%r15,%rax), %rsi
addq $0x5d, %rsi
leaq -0x38(%rbp), %rcx
movq %rsi, (%rcx)
movq 0x78(%rbx), %rax
movq (%rax), %rax
subq %rcx, %rax
subq %rsi, %rax
jbe 0x3cef1
cmpq $0x10000, %rax # imm = 0x10000
ja 0x3cedb
cmpq $0x1000, %rsi # imm = 0x1000
jb 0x3cef1
cmpq $0x8001, %rax # imm = 0x8001
jb 0x3cef1
movq %rsp, %r15
addq $0xf, %rsi
andq $-0x10, %rsi
subq %rsi, %r15
movq %r15, %rsp
movb $0x1, %r13b
jmp 0x3cf08
xorl %r13d, %r13d
movl $0x10010, %edx # imm = 0x10010
xorl %edi, %edi
callq 0x9fdb1
testq %rax, %rax
je 0x3cf40
movq %rax, %r15
leaq 0x18(%r15), %r12
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x3c5e5
testl %eax, %eax
je 0x3cf2f
movl %eax, %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3c94d
movl %eax, %ebx
jmp 0x3cf31
movb $0x1, %bl
testb %r13b, %r13b
jne 0x3cf4d
movq %r15, %rdi
callq 0x9ffde
jmp 0x3cf4d
callq 0xa1b22
movl $0x80, (%rax)
movb $0x1, %bl
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x3cf6d
movl %ebx, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29270
| _ma_write_blob_record:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r14, rsi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov rax, [rdi]
mov r15, [rax+3A0h]
call _ma_calc_total_blob_length
lea rsi, [r15+rax]
add rsi, 5Dh ; ']'
lea rcx, [rbp+var_38]
mov [rcx], rsi
mov rax, [rbx+78h]
mov rax, [rax]
sub rax, rcx
sub rax, rsi
jbe short loc_3CEF1
cmp rax, offset stru_10000
ja short loc_3CEDB
cmp rsi, 1000h
jb short loc_3CEF1
cmp rax, 8001h
jb short loc_3CEF1
loc_3CEDB:
mov r15, rsp
add rsi, 0Fh
and rsi, 0FFFFFFFFFFFFFFF0h
sub r15, rsi
mov rsp, r15
mov r13b, 1
jmp short loc_3CF08
loc_3CEF1:
xor r13d, r13d
mov edx, 10010h
xor edi, edi
call my_malloc
test rax, rax
jz short loc_3CF40
mov r15, rax
loc_3CF08:
lea r12, [r15+18h]
mov rdi, rbx
mov rsi, r12
mov rdx, r14
call _ma_rec_pack
test eax, eax
jz short loc_3CF2F
mov edx, eax
mov rdi, rbx
mov rsi, r12
call write_dynamic_record
mov ebx, eax
jmp short loc_3CF31
loc_3CF2F:
mov bl, 1
loc_3CF31:
test r13b, r13b
jnz short loc_3CF4D
mov rdi, r15
call my_free
jmp short loc_3CF4D
loc_3CF40:
call _my_thread_var
mov dword ptr [rax], 80h
mov bl, 1
loc_3CF4D:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_3CF6D
mov eax, ebx
lea rsp, [rbp-28h]
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3CF6D:
call ___stack_chk_fail
| long long ma_write_blob_record(unsigned __int8 *a1, unsigned __int8 *a2)
{
unsigned int v3; // ebx
long long v4; // r15
unsigned long long v5; // rsi
unsigned long long v6; // rax
bool v7; // cc
unsigned long long v8; // rax
unsigned __int8 *v9; // r15
char v10; // r13
long long v11; // rax
long long v12; // rdx
long long v13; // rcx
long long v14; // r8
unsigned int v15; // eax
long long v16; // rcx
long long v17; // r8
_QWORD v20[7]; // [rsp+8h] [rbp-38h] BYREF
v3 = (unsigned int)a1;
v20[1] = __readfsqword(0x28u);
v4 = *(_QWORD *)(*(_QWORD *)a1 + 928LL);
v5 = v4 + ma_calc_total_blob_length() + 93;
v20[0] = v5;
v6 = **((_QWORD **)a1 + 15) - (_QWORD)v20;
v7 = v6 <= v5;
v8 = v6 - v5;
if ( v7 || v8 <= (unsigned long long)&stru_10000 && (v5 < 0x1000 || v8 < 0x8001) )
{
v10 = 0;
v11 = my_malloc(0LL, v5, 65552LL);
if ( !v11 )
{
*(_DWORD *)my_thread_var(0LL, v5, v12, v13, v14) = 128;
LOBYTE(v3) = 1;
return v3;
}
v9 = (unsigned __int8 *)v11;
}
else
{
v9 = (unsigned __int8 *)&v20[-1] - ((v5 + 15) & 0xFFFFFFFFFFFFFFF0LL);
v10 = 1;
}
v15 = ma_rec_pack(a1, v9 + 24, a2);
if ( v15 )
v3 = write_dynamic_record(a1, (long long)(v9 + 24), v15, v16, v17);
else
LOBYTE(v3) = 1;
if ( !v10 )
my_free(v9);
return v3;
}
| _ma_write_blob_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RDI]
MOV R15,qword ptr [RAX + 0x3a0]
CALL 0x0013cf72
LEA RSI,[R15 + RAX*0x1]
ADD RSI,0x5d
LEA RCX,[RBP + -0x38]
MOV qword ptr [RCX],RSI
MOV RAX,qword ptr [RBX + 0x78]
MOV RAX,qword ptr [RAX]
SUB RAX,RCX
SUB RAX,RSI
JBE 0x0013cef1
CMP RAX,0x10000
JA 0x0013cedb
CMP RSI,0x1000
JC 0x0013cef1
CMP RAX,0x8001
JC 0x0013cef1
LAB_0013cedb:
MOV R15,RSP
ADD RSI,0xf
AND RSI,-0x10
SUB R15,RSI
MOV RSP,R15
MOV R13B,0x1
JMP 0x0013cf08
LAB_0013cef1:
XOR R13D,R13D
MOV EDX,0x10010
XOR EDI,EDI
CALL 0x0019fdb1
TEST RAX,RAX
JZ 0x0013cf40
MOV R15,RAX
LAB_0013cf08:
LEA R12,[R15 + 0x18]
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R14
CALL 0x0013c5e5
TEST EAX,EAX
JZ 0x0013cf2f
MOV EDX,EAX
MOV RDI,RBX
MOV RSI,R12
CALL 0x0013c94d
MOV EBX,EAX
JMP 0x0013cf31
LAB_0013cf2f:
MOV BL,0x1
LAB_0013cf31:
TEST R13B,R13B
JNZ 0x0013cf4d
MOV RDI,R15
CALL 0x0019ffde
JMP 0x0013cf4d
LAB_0013cf40:
CALL 0x001a1b22
MOV dword ptr [RAX],0x80
MOV BL,0x1
LAB_0013cf4d:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0013cf6d
MOV EAX,EBX
LEA RSP,[RBP + -0x28]
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013cf6d:
CALL 0x00129270
|
ulong _ma_write_blob_record(long *param_1,int8 param_2)
{
long lVar1;
bool bVar2;
int1 *puVar3;
int iVar4;
uint uVar5;
long lVar6;
ulong uVar7;
int1 *puVar8;
int4 *puVar9;
int7 uVar10;
int1 *puVar11;
long in_FS_OFFSET;
int1 auStack_48 [8];
ulong local_40;
long local_38;
puVar11 = auStack_48;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
lVar1 = *(long *)(*param_1 + 0x3a0);
lVar6 = _ma_calc_total_blob_length();
lVar1 = lVar1 + lVar6;
local_40 = lVar1 + 0x5d;
uVar7 = (*(long *)param_1[0xf] - (long)&local_40) - local_40;
uVar10 = (int7)((ulong)param_1 >> 8);
if ((local_40 < (ulong)(*(long *)param_1[0xf] - (long)&local_40)) &&
((0x10000 < uVar7 || ((0xfff < local_40 && (0x8000 < uVar7)))))) {
puVar8 = auStack_48 + -(lVar1 + 0x6cU & 0xfffffffffffffff0);
bVar2 = true;
puVar3 = puVar8;
}
else {
bVar2 = false;
puVar8 = (int1 *)my_malloc(0,local_40,0x10010);
puVar3 = auStack_48;
if (puVar8 == (int1 *)0x0) {
puVar9 = (int4 *)_my_thread_var();
*puVar9 = 0x80;
uVar7 = CONCAT71(uVar10,1);
goto LAB_0013cf4d;
}
}
puVar11 = puVar3;
*(int8 *)(puVar11 + -8) = 0x13cf1a;
iVar4 = _ma_rec_pack(param_1,puVar8 + 0x18,param_2);
if (iVar4 == 0) {
uVar7 = CONCAT71(uVar10,1);
}
else {
*(int8 *)(puVar11 + -8) = 0x13cf2b;
uVar5 = write_dynamic_record(param_1,puVar8 + 0x18,iVar4);
uVar7 = (ulong)uVar5;
}
if (!bVar2) {
*(int8 *)(puVar11 + -8) = 0x13cf3e;
my_free(puVar8);
}
LAB_0013cf4d:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
*(code **)(puVar11 + -8) = _ma_calc_total_blob_length;
__stack_chk_fail();
}
return uVar7 & 0xffffffff;
}
| |
40,542 | minja::IfTemplateToken::~IfTemplateToken() | monkey531[P]llama/common/minja.hpp | IfTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, std::shared_ptr<Expression> && c) : TemplateToken(Type::If, location, pre, post), condition(std::move(c)) {} | O3 | cpp | minja::IfTemplateToken::~IfTemplateToken():
pushq %rbx
movq %rdi, %rbx
leaq 0x7368b(%rip), %rax # 0xe9cb0
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x38(%rdi), %rdi
testq %rdi, %rdi
je 0x7663a
callq 0x309ec
leaq 0x72e27(%rip), %rax # 0xe9468
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x76657
popq %rbx
jmp 0x309ec
popq %rbx
retq
nop
| _ZN5minja15IfTemplateTokenD2Ev:
push rbx
mov rbx, rdi
lea rax, _ZTVN5minja15IfTemplateTokenE; `vtable for'minja::IfTemplateToken
add rax, 10h
mov [rdi], rax
mov rdi, [rdi+38h]
test rdi, rdi
jz short loc_7663A
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_7663A:
lea rax, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken
add rax, 10h
mov [rbx], rax
mov rdi, [rbx+18h]
test rdi, rdi
jz short loc_76657
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_76657:
pop rbx
retn
| void minja::IfTemplateToken::~IfTemplateToken(minja::IfTemplateToken *this)
{
volatile signed __int32 *v2; // rdi
volatile signed __int32 *v3; // rdi
*(_QWORD *)this = &`vtable for'minja::IfTemplateToken + 2;
v2 = (volatile signed __int32 *)*((_QWORD *)this + 7);
if ( v2 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2);
*(_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);
}
| ~IfTemplateToken:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x1e9cb0]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x38]
TEST RDI,RDI
JZ 0x0017663a
CALL 0x001309ec
LAB_0017663a:
LEA RAX,[0x1e9468]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RBX + 0x18]
TEST RDI,RDI
JZ 0x00176657
POP RBX
JMP 0x001309ec
LAB_00176657:
POP RBX
RET
|
/* minja::IfTemplateToken::~IfTemplateToken() */
void __thiscall minja::IfTemplateToken::~IfTemplateToken(IfTemplateToken *this)
{
*(int ***)this = &PTR__IfTemplateToken_001e9cc0;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38) !=
(_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 + 0x38));
}
*(int ***)this = &PTR__TemplateToken_001e9478;
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;
}
| |
40,543 | mbedtls_ctr_drbg_write_seed_file | msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/ctr_drbg.c | int mbedtls_ctr_drbg_write_seed_file(mbedtls_ctr_drbg_context *ctx,
const char *path)
{
int ret = MBEDTLS_ERR_CTR_DRBG_FILE_IO_ERROR;
FILE *f;
unsigned char buf[MBEDTLS_CTR_DRBG_MAX_INPUT];
if ((f = fopen(path, "wb")) == NULL) {
return MBEDTLS_ERR_CTR_DRBG_FILE_IO_ERROR;
}
if ((ret = mbedtls_ctr_drbg_random(ctx, buf,
MBEDTLS_CTR_DRBG_MAX_INPUT)) != 0) {
goto exit;
}
if (fwrite(buf, 1, MBEDTLS_CTR_DRBG_MAX_INPUT, f) !=
MBEDTLS_CTR_DRBG_MAX_INPUT) {
ret = MBEDTLS_ERR_CTR_DRBG_FILE_IO_ERROR;
} else {
ret = 0;
}
exit:
mbedtls_platform_zeroize(buf, sizeof(buf));
fclose(f);
return ret;
} | O3 | c | mbedtls_ctr_drbg_write_seed_file:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x108, %rsp # imm = 0x108
movq %rsi, %rax
movq %rdi, %r14
leaq 0x28f48(%rip), %rsi # 0xac220
movq %rax, %rdi
callq 0xf540
testq %rax, %rax
je 0x83341
movq %rax, %rbx
xorl %r15d, %r15d
movq %rsp, %rsi
movl $0x100, %edx # imm = 0x100
movq %r14, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x83171
movl %eax, %ebp
testl %eax, %eax
jne 0x8332a
movq %rsp, %rdi
movl $0x1, %esi
movl $0x100, %edx # imm = 0x100
movq %rbx, %rcx
callq 0xf860
cmpq $0x100, %rax # imm = 0x100
movl $0xffffffc6, %ebp # imm = 0xFFFFFFC6
cmovel %r15d, %ebp
movq %rsp, %rdi
movl $0x100, %esi # imm = 0x100
callq 0x8db8c
movq %rbx, %rdi
callq 0xf450
jmp 0x83346
movl $0xffffffc6, %ebp # imm = 0xFFFFFFC6
movl %ebp, %eax
addq $0x108, %rsp # imm = 0x108
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| mbedtls_ctr_drbg_write_seed_file:
push rbp
push r15
push r14
push rbx
sub rsp, 108h
mov rax, rsi
mov r14, rdi
lea rsi, unk_AC220
mov rdi, rax
call _fopen
test rax, rax
jz short loc_83341
mov rbx, rax
xor r15d, r15d
mov rsi, rsp
mov edx, 100h
mov rdi, r14
xor ecx, ecx
xor r8d, r8d
call mbedtls_ctr_drbg_random_with_add
mov ebp, eax
test eax, eax
jnz short loc_8332A
mov rdi, rsp
mov esi, 1
mov edx, 100h
mov rcx, rbx
call _fwrite
cmp rax, 100h
mov ebp, 0FFFFFFC6h
cmovz ebp, r15d
loc_8332A:
mov rdi, rsp
mov esi, 100h
call mbedtls_platform_zeroize
mov rdi, rbx
call _fclose
jmp short loc_83346
loc_83341:
mov ebp, 0FFFFFFC6h
loc_83346:
mov eax, ebp
add rsp, 108h
pop rbx
pop r14
pop r15
pop rbp
retn
| long long mbedtls_ctr_drbg_write_seed_file(_DWORD *a1, long long a2)
{
long long v2; // rax
long long v3; // rbx
unsigned int v4; // ebp
_BYTE v6[296]; // [rsp+0h] [rbp-128h] BYREF
v2 = fopen(a2, &unk_AC220);
if ( v2 )
{
v3 = v2;
v4 = mbedtls_ctr_drbg_random_with_add(a1, (long long)v6, 0x100uLL, 0LL, 0LL);
if ( !v4 )
{
v4 = -58;
if ( fwrite(v6, 1LL, 256LL, v3) == 256 )
v4 = 0;
}
mbedtls_platform_zeroize(v6, 256LL);
fclose(v3);
}
else
{
return (unsigned int)-58;
}
return v4;
}
| mbedtls_ctr_drbg_write_seed_file:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x108
MOV RAX,RSI
MOV R14,RDI
LEA RSI,[0x1ac220]
MOV RDI,RAX
CALL 0x0010f540
TEST RAX,RAX
JZ 0x00183341
MOV RBX,RAX
XOR R15D,R15D
MOV RSI,RSP
MOV EDX,0x100
MOV RDI,R14
XOR ECX,ECX
XOR R8D,R8D
CALL 0x00183171
MOV EBP,EAX
TEST EAX,EAX
JNZ 0x0018332a
MOV RDI,RSP
MOV ESI,0x1
MOV EDX,0x100
MOV RCX,RBX
CALL 0x0010f860
CMP RAX,0x100
MOV EBP,0xffffffc6
CMOVZ EBP,R15D
LAB_0018332a:
MOV RDI,RSP
MOV ESI,0x100
CALL 0x0018db8c
MOV RDI,RBX
CALL 0x0010f450
JMP 0x00183346
LAB_00183341:
MOV EBP,0xffffffc6
LAB_00183346:
MOV EAX,EBP
ADD RSP,0x108
POP RBX
POP R14
POP R15
POP RBP
RET
|
int mbedtls_ctr_drbg_write_seed_file(int8 param_1,char *param_2)
{
int iVar1;
FILE *__s;
size_t sVar2;
int1 auStack_128 [264];
__s = fopen(param_2,"wb");
if (__s == (FILE *)0x0) {
iVar1 = -0x3a;
}
else {
iVar1 = mbedtls_ctr_drbg_random_with_add(param_1,auStack_128,0x100,0,0);
if (iVar1 == 0) {
sVar2 = fwrite(auStack_128,1,0x100,__s);
iVar1 = -0x3a;
if (sVar2 == 0x100) {
iVar1 = 0;
}
}
mbedtls_platform_zeroize(auStack_128,0x100);
fclose(__s);
}
return iVar1;
}
| |
40,544 | my_print_default_files | eloqsql/mysys/my_default.c | void my_print_default_files(const char *conf_file)
{
const char *empty_list[]= { "", 0 };
my_bool have_ext= fn_ext(conf_file)[0] != 0;
const char **exts_to_use= have_ext ? empty_list : f_extensions;
char name[FN_REFLEN], **ext;
puts("\nDefault options are read from the following files in the given order:");
if (my_defaults_file)
{
puts(my_defaults_file);
return;
}
if (dirname_length(conf_file))
fputs(conf_file,stdout);
else
{
const char **dirs;
MEM_ROOT alloc;
init_alloc_root(key_memory_defaults, &alloc, 512, 0, MYF(0));
if ((dirs= init_default_directories(&alloc)) == NULL)
{
fputs("Internal error initializing default directories list", stdout);
}
else
{
for ( ; *dirs; dirs++)
{
for (ext= (char**) exts_to_use; *ext; ext++)
{
const char *pos;
char *end;
if (**dirs)
pos= *dirs;
else if (my_defaults_extra_file)
{
pos= my_defaults_extra_file;
fputs(pos, stdout);
fputs(" ", stdout);
continue;
}
else
continue;
end= convert_dirname(name, pos, NullS);
if (name[0] == FN_HOMELIB) /* Add . to filenames in home */
*end++= '.';
strxmov(end, conf_file, *ext, " ", NullS);
fputs(name, stdout);
}
}
}
free_root(&alloc, MYF(0));
}
puts("");
} | O3 | c | my_print_default_files:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x258, %rsp # imm = 0x258
movq %rdi, %r15
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
callq 0x34830
cmpb $0x0, (%rax)
leaq 0x2bdad2(%rip), %rax # 0x2f1d20
leaq 0x2bdadb(%rip), %rbx # 0x2f1d30
cmoveq %rax, %rbx
leaq 0x31062(%rip), %rdi # 0x652c2
callq 0x245c0
leaq 0x345a7c(%rip), %rax # 0x379ce8
movq (%rax), %rdi
testq %rdi, %rdi
je 0x3429d
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x34419
addq $0x258, %rsp # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x245c0
movq %r15, %rdi
callq 0x2a654
testq %rax, %rax
je 0x342c1
movq 0x2c5cef(%rip), %rax # 0x2f9fa0
movq (%rax), %rsi
movq %r15, %rdi
callq 0x24400
jmp 0x343ee
leaq 0x3456f0(%rip), %rax # 0x3799b8
movl (%rax), %edi
leaq -0x280(%rbp), %r14
movl $0x200, %edx # imm = 0x200
movq %r14, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x35fe8
movq %r14, %rdi
callq 0x3410b
testq %rax, %rax
je 0x343ca
movq %rax, %r14
cmpq $0x0, (%rax)
je 0x343e0
movq (%rbx), %rax
movq %rax, -0x238(%rbp)
addq $0x8, %rbx
movq %rbx, -0x240(%rbp)
leaq -0x230(%rbp), %r12
cmpq $0x0, -0x238(%rbp)
je 0x343b9
movq -0x240(%rbp), %rbx
movq -0x238(%rbp), %r13
movq (%r14), %rsi
cmpb $0x0, (%rsi)
je 0x34379
movq %r12, %rdi
xorl %edx, %edx
callq 0x2a6cf
cmpb $0x7e, -0x230(%rbp)
jne 0x3435a
movb $0x2e, (%rax)
incq %rax
movq %rax, %rdi
movq %r15, %rsi
movq %r13, %rdx
leaq 0x3060f(%rip), %rcx # 0x64979
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x6322c
movq %r12, %rdi
jmp 0x3439e
leaq 0x345978(%rip), %rax # 0x379cf8
movq (%rax), %rdi
testq %rdi, %rdi
je 0x343ad
movq 0x2c5c11(%rip), %rax # 0x2f9fa0
movq (%rax), %rsi
callq 0x24400
leaq 0x305db(%rip), %rdi # 0x64979
movq 0x2c5bfb(%rip), %rax # 0x2f9fa0
movq (%rax), %rsi
callq 0x24400
movq (%rbx), %r13
addq $0x8, %rbx
testq %r13, %r13
jne 0x34339
cmpq $0x0, 0x8(%r14)
leaq 0x8(%r14), %r14
jne 0x3431d
jmp 0x343e0
movq 0x2c5bcf(%rip), %rax # 0x2f9fa0
movq (%rax), %rsi
leaq 0x30f2e(%rip), %rdi # 0x65309
callq 0x24400
leaq -0x280(%rbp), %rdi
xorl %esi, %esi
callq 0x363b7
movl $0xa, %edi
callq 0x244c0
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x34419
addq $0x258, %rsp # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x243e0
| my_print_default_files:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 258h
mov r15, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
call fn_ext
cmp byte ptr [rax], 0
lea rax, f_extensions
lea rbx, off_2F1D30; ""
cmovz rbx, rax
lea rdi, aDefaultOptions; "\nDefault options are read from the fol"...
call _puts
lea rax, my_defaults_file
mov rdi, [rax]
test rdi, rdi
jz short loc_3429D
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz loc_34419
add rsp, 258h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _puts
loc_3429D:
mov rdi, r15
call dirname_length
test rax, rax
jz short loc_342C1
mov rax, cs:stdout_ptr
mov rsi, [rax]
mov rdi, r15
call _fputs
jmp loc_343EE
loc_342C1:
lea rax, key_memory_defaults
mov edi, [rax]
lea r14, [rbp+var_280]
mov edx, 200h
mov rsi, r14
xor ecx, ecx
xor r8d, r8d
call init_alloc_root
mov rdi, r14
call init_default_directories
test rax, rax
jz loc_343CA
mov r14, rax
cmp qword ptr [rax], 0
jz loc_343E0
mov rax, [rbx]
mov [rbp+var_238], rax
add rbx, 8
mov [rbp+var_240], rbx
lea r12, [rbp+var_230]
loc_3431D:
cmp [rbp+var_238], 0
jz loc_343B9
mov rbx, [rbp+var_240]
mov r13, [rbp+var_238]
loc_34339:
mov rsi, [r14]
cmp byte ptr [rsi], 0
jz short loc_34379
mov rdi, r12
xor edx, edx
call convert_dirname
cmp [rbp+var_230], 7Eh ; '~'
jnz short loc_3435A
mov byte ptr [rax], 2Eh ; '.'
inc rax
loc_3435A:
mov rdi, rax
mov rsi, r15
mov rdx, r13
lea rcx, asc_64978+1; " "
xor r8d, r8d
xor eax, eax
call strxmov
mov rdi, r12
jmp short loc_3439E
loc_34379:
lea rax, my_defaults_extra_file
mov rdi, [rax]
test rdi, rdi
jz short loc_343AD
mov rax, cs:stdout_ptr
mov rsi, [rax]
call _fputs
lea rdi, asc_64978+1; " "
loc_3439E:
mov rax, cs:stdout_ptr
mov rsi, [rax]
call _fputs
loc_343AD:
mov r13, [rbx]
add rbx, 8
test r13, r13
jnz short loc_34339
loc_343B9:
cmp qword ptr [r14+8], 0
lea r14, [r14+8]
jnz loc_3431D
jmp short loc_343E0
loc_343CA:
mov rax, cs:stdout_ptr
mov rsi, [rax]
lea rdi, aInternalErrorI; "Internal error initializing default dir"...
call _fputs
loc_343E0:
lea rdi, [rbp+var_280]
xor esi, esi
call free_root
loc_343EE:
mov edi, 0Ah
call _putchar
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_34419
add rsp, 258h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_34419:
call ___stack_chk_fail
| long long my_print_default_files(_BYTE *a1)
{
int v1; // r15d
char **v2; // rbx
long long *inited; // rax
long long *v5; // r14
char **v6; // rbx
long long v7; // r13
_WORD *v8; // rax
int v9; // r9d
char *v10; // rdi
bool v11; // zf
_BYTE v12[64]; // [rsp+0h] [rbp-280h] BYREF
char **v13; // [rsp+40h] [rbp-240h]
char *v14; // [rsp+48h] [rbp-238h]
_WORD v15[256]; // [rsp+50h] [rbp-230h] BYREF
unsigned long long v16; // [rsp+250h] [rbp-30h]
v1 = (int)a1;
v16 = __readfsqword(0x28u);
v2 = (char **)&off_2F1D30;
if ( !*(_BYTE *)fn_ext() )
v2 = &f_extensions;
puts("\nDefault options are read from the following files in the given order:");
if ( my_defaults_file )
return puts(my_defaults_file);
if ( !dirname_length(a1) )
{
init_alloc_root(key_memory_defaults, v12, 512LL, 0LL, 0LL);
inited = (long long *)init_default_directories((long long)v12);
if ( inited )
{
v5 = inited;
if ( *inited )
{
v14 = *v2;
v13 = v2 + 1;
while ( !v14 )
{
LABEL_20:
v11 = v5[1] == 0;
++v5;
if ( v11 )
goto LABEL_23;
}
v6 = v13;
LODWORD(v7) = (_DWORD)v14;
while ( !*(_BYTE *)*v5 )
{
if ( my_defaults_extra_file )
{
fputs(my_defaults_extra_file, stdout);
v10 = " ";
LABEL_18:
fputs(v10, stdout);
}
v7 = (long long)*v6++;
if ( !v7 )
goto LABEL_20;
}
v8 = convert_dirname(v15, *v5, 0LL);
if ( LOBYTE(v15[0]) == 126 )
{
*(_BYTE *)v8 = 46;
LODWORD(v8) = (_DWORD)v8 + 1;
}
strxmov((_DWORD)v8, v1, v7, (unsigned int)" ", 0, v9);
v10 = (char *)v15;
goto LABEL_18;
}
}
else
{
fputs("Internal error initializing default directories list", stdout);
}
LABEL_23:
free_root(v12, 0LL);
goto LABEL_24;
}
fputs(a1, stdout);
LABEL_24:
putchar(10LL);
return __readfsqword(0x28u);
}
| my_print_default_files:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x258
MOV R15,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
CALL 0x00134830
CMP byte ptr [RAX],0x0
LEA RAX,[0x3f1d20]
LEA RBX,[0x3f1d30]
CMOVZ RBX,RAX
LEA RDI,[0x1652c2]
CALL 0x001245c0
LEA RAX,[0x479ce8]
MOV RDI,qword ptr [RAX]
TEST RDI,RDI
JZ 0x0013429d
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00134419
ADD RSP,0x258
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001245c0
LAB_0013429d:
MOV RDI,R15
CALL 0x0012a654
TEST RAX,RAX
JZ 0x001342c1
MOV RAX,qword ptr [0x003f9fa0]
MOV RSI,qword ptr [RAX]
MOV RDI,R15
CALL 0x00124400
JMP 0x001343ee
LAB_001342c1:
LEA RAX,[0x4799b8]
MOV EDI,dword ptr [RAX]
LEA R14,[RBP + -0x280]
MOV EDX,0x200
MOV RSI,R14
XOR ECX,ECX
XOR R8D,R8D
CALL 0x00135fe8
MOV RDI,R14
CALL 0x0013410b
TEST RAX,RAX
JZ 0x001343ca
MOV R14,RAX
CMP qword ptr [RAX],0x0
JZ 0x001343e0
MOV RAX,qword ptr [RBX]
MOV qword ptr [RBP + -0x238],RAX
ADD RBX,0x8
MOV qword ptr [RBP + -0x240],RBX
LEA R12,[RBP + -0x230]
LAB_0013431d:
CMP qword ptr [RBP + -0x238],0x0
JZ 0x001343b9
MOV RBX,qword ptr [RBP + -0x240]
MOV R13,qword ptr [RBP + -0x238]
LAB_00134339:
MOV RSI,qword ptr [R14]
CMP byte ptr [RSI],0x0
JZ 0x00134379
MOV RDI,R12
XOR EDX,EDX
CALL 0x0012a6cf
CMP byte ptr [RBP + -0x230],0x7e
JNZ 0x0013435a
MOV byte ptr [RAX],0x2e
INC RAX
LAB_0013435a:
MOV RDI,RAX
MOV RSI,R15
MOV RDX,R13
LEA RCX,[0x164979]
XOR R8D,R8D
XOR EAX,EAX
CALL 0x0016322c
MOV RDI,R12
JMP 0x0013439e
LAB_00134379:
LEA RAX,[0x479cf8]
MOV RDI,qword ptr [RAX]
TEST RDI,RDI
JZ 0x001343ad
MOV RAX,qword ptr [0x003f9fa0]
MOV RSI,qword ptr [RAX]
CALL 0x00124400
LEA RDI,[0x164979]
LAB_0013439e:
MOV RAX,qword ptr [0x003f9fa0]
MOV RSI,qword ptr [RAX]
CALL 0x00124400
LAB_001343ad:
MOV R13,qword ptr [RBX]
ADD RBX,0x8
TEST R13,R13
JNZ 0x00134339
LAB_001343b9:
CMP qword ptr [R14 + 0x8],0x0
LEA R14,[R14 + 0x8]
JNZ 0x0013431d
JMP 0x001343e0
LAB_001343ca:
MOV RAX,qword ptr [0x003f9fa0]
MOV RSI,qword ptr [RAX]
LEA RDI,[0x165309]
CALL 0x00124400
LAB_001343e0:
LEA RDI,[RBP + -0x280]
XOR ESI,ESI
CALL 0x001363b7
LAB_001343ee:
MOV EDI,0xa
CALL 0x001244c0
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00134419
ADD RSP,0x258
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00134419:
CALL 0x001243e0
|
void my_print_default_files(char *param_1)
{
long *plVar1;
int *puVar2;
char *pcVar3;
long lVar4;
long *plVar5;
int1 *puVar6;
int **ppuVar7;
long in_FS_OFFSET;
int1 local_288 [64];
int **local_248;
int *local_240;
char local_238 [512];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
pcVar3 = (char *)fn_ext();
ppuVar7 = &PTR_DAT_003f1d30;
if (*pcVar3 == '\0') {
ppuVar7 = (int **)f_extensions;
}
puts("\nDefault options are read from the following files in the given order:");
if (my_defaults_file == (char *)0x0) {
lVar4 = dirname_length(param_1);
if (lVar4 == 0) {
init_alloc_root(key_memory_defaults,local_288,0x200,0,0);
plVar5 = (long *)init_default_directories(local_288);
if (plVar5 == (long *)0x0) {
fputs("Internal error initializing default directories list",*(FILE **)PTR_stdout_003f9fa0);
}
else if (*plVar5 != 0) {
local_240 = *ppuVar7;
local_248 = ppuVar7 + 1;
ppuVar7 = local_248;
puVar2 = local_240;
do {
while (puVar2 != (int *)0x0) {
if (*(char *)*plVar5 == '\0') {
if (my_defaults_extra_file != (char *)0x0) {
fputs(my_defaults_extra_file,*(FILE **)PTR_stdout_003f9fa0);
pcVar3 = " ";
goto LAB_0013439e;
}
}
else {
puVar6 = (int1 *)convert_dirname(local_238,(char *)*plVar5,0);
if (local_238[0] == '~') {
*puVar6 = 0x2e;
puVar6 = puVar6 + 1;
}
strxmov(puVar6,param_1,puVar2,&DAT_00164979,0);
pcVar3 = local_238;
LAB_0013439e:
fputs(pcVar3,*(FILE **)PTR_stdout_003f9fa0);
}
puVar2 = *ppuVar7;
ppuVar7 = ppuVar7 + 1;
}
plVar1 = plVar5 + 1;
plVar5 = plVar5 + 1;
ppuVar7 = local_248;
puVar2 = local_240;
} while (*plVar1 != 0);
}
free_root(local_288,0);
}
else {
fputs(param_1,*(FILE **)PTR_stdout_003f9fa0);
}
putchar(10);
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return;
}
}
else if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
puts(my_defaults_file);
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
40,545 | aimrt::plugins::time_manipulator_plugin::TimeManipulatorExecutor::~TimeManipulatorExecutor() | aimrt_mujoco_sim/_deps/aimrt-src/src/plugins/time_manipulator_plugin/../time_manipulator_plugin/time_manipulator_executor.h | ~TimeManipulatorExecutor() override = default; | O3 | c | aimrt::plugins::time_manipulator_plugin::TimeManipulatorExecutor::~TimeManipulatorExecutor():
pushq %rbx
movq %rdi, %rbx
leaq 0x1fbcdb(%rip), %rax # 0x296e68
movq %rax, (%rdi)
movq 0x1d8(%rdi), %rdi
testq %rdi, %rdi
je 0x9b1b0
cmpq $0x0, (%rdi)
jne 0x9b26e
movl $0x8, %esi
callq 0x82190
movq $0x0, 0x1d8(%rbx)
leaq 0x1a0(%rbx), %rdi
callq 0x9b8dc
leaq 0x180(%rbx), %rdi
callq 0x9b8ac
movq 0xc8(%rbx), %rax
testq %rax, %rax
je 0x9b1f0
leaq 0xb8(%rbx), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x90(%rbx), %rdi
testq %rdi, %rdi
je 0x9b20b
movq 0xa0(%rbx), %rsi
subq %rdi, %rsi
callq 0x82190
movq 0x70(%rbx), %rdi
leaq 0x80(%rbx), %rax
cmpq %rax, %rdi
je 0x9b226
movq (%rax), %rsi
incq %rsi
callq 0x82190
movq 0x58(%rbx), %rdi
testq %rdi, %rdi
je 0x9b23b
movq 0x68(%rbx), %rsi
subq %rdi, %rsi
callq 0x82190
movq 0x28(%rbx), %rdi
leaq 0x38(%rbx), %rax
cmpq %rax, %rdi
je 0x9b253
movq (%rax), %rsi
incq %rsi
callq 0x82190
movq 0x8(%rbx), %rdi
addq $0x18, %rbx
cmpq %rbx, %rdi
je 0x9b26c
movq (%rbx), %rsi
incq %rsi
popq %rbx
jmp 0x82190
popq %rbx
retq
callq 0x807b0
movq %rax, %rdi
callq 0x8b40b
nop
| _ZN5aimrt7plugins23time_manipulator_plugin23TimeManipulatorExecutorD2Ev:
push rbx
mov rbx, rdi
lea rax, off_296E68
mov [rdi], rax
mov rdi, [rdi+1D8h]; void *
test rdi, rdi
jz short loc_9B1B0
cmp qword ptr [rdi], 0
jnz loc_9B26E
mov esi, 8; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9B1B0:
mov qword ptr [rbx+1D8h], 0
lea rdi, [rbx+1A0h]
call _ZNSt10_HashtableImSt4pairIKmNSt7__cxx114listIN5aimrt7plugins23time_manipulator_plugin23TimeManipulatorExecutor17TaskWithTimestampESaIS8_EEEESaISB_ENSt8__detail10_Select1stESt8equal_toImESt4hashImENSD_18_Mod_range_hashingENSD_20_Default_ranged_hashENSD_20_Prime_rehash_policyENSD_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<ulong,std::pair<ulong const,std::list<aimrt::plugins::time_manipulator_plugin::TimeManipulatorExecutor::TaskWithTimestamp>>,std::allocator<std::pair<ulong const,std::list<aimrt::plugins::time_manipulator_plugin::TimeManipulatorExecutor::TaskWithTimestamp>>>,std::__detail::_Select1st,std::equal_to<ulong>,std::hash<ulong>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable()
lea rdi, [rbx+180h]
call _ZNSt6vectorIN5aimrt7plugins23time_manipulator_plugin23TimeManipulatorExecutor15TimingWheelToolESaIS4_EED2Ev; std::vector<aimrt::plugins::time_manipulator_plugin::TimeManipulatorExecutor::TimingWheelTool>::~vector()
mov rax, [rbx+0C8h]
test rax, rax
jz short loc_9B1F0
lea rdi, [rbx+0B8h]
mov rsi, rdi
mov edx, 3
call rax
loc_9B1F0:
mov rdi, [rbx+90h]; void *
test rdi, rdi
jz short loc_9B20B
mov rsi, [rbx+0A0h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9B20B:
mov rdi, [rbx+70h]; void *
lea rax, [rbx+80h]
cmp rdi, rax
jz short loc_9B226
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9B226:
mov rdi, [rbx+58h]; void *
test rdi, rdi
jz short loc_9B23B
mov rsi, [rbx+68h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9B23B:
mov rdi, [rbx+28h]; void *
lea rax, [rbx+38h]
cmp rdi, rax
jz short loc_9B253
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9B253:
mov rdi, [rbx+8]; void *
add rbx, 18h
cmp rdi, rbx
jz short loc_9B26C
mov rsi, [rbx]
inc rsi; unsigned __int64
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
loc_9B26C:
pop rbx
retn
loc_9B26E:
call __ZSt9terminatev; std::terminate(void)
mov rdi, rax
call __clang_call_terminate
| void aimrt::plugins::time_manipulator_plugin::TimeManipulatorExecutor::~TimeManipulatorExecutor(
aimrt::plugins::time_manipulator_plugin::TimeManipulatorExecutor *this)
{
_QWORD *v2; // rdi
void ( *v3)(char *, char *, long long); // rax
void *v4; // rdi
char *v5; // rdi
void *v6; // rdi
char *v7; // rdi
_QWORD *v8; // rdi
_QWORD *v9; // rbx
*(_QWORD *)this = off_296E68;
v2 = (_QWORD *)*((_QWORD *)this + 59);
if ( v2 )
{
if ( *v2 )
std::terminate();
operator delete(v2, 8uLL);
}
*((_QWORD *)this + 59) = 0LL;
std::_Hashtable<unsigned long,std::pair<unsigned long const,std::list<aimrt::plugins::time_manipulator_plugin::TimeManipulatorExecutor::TaskWithTimestamp>>,std::allocator<std::pair<unsigned long const,std::list<aimrt::plugins::time_manipulator_plugin::TimeManipulatorExecutor::TaskWithTimestamp>>>,std::__detail::_Select1st,std::equal_to<unsigned long>,std::hash<unsigned long>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable((char *)this + 416);
std::vector<aimrt::plugins::time_manipulator_plugin::TimeManipulatorExecutor::TimingWheelTool>::~vector((char *)this + 384);
v3 = (void ( *)(char *, char *, long long))*((_QWORD *)this + 25);
if ( v3 )
v3((char *)this + 184, (char *)this + 184, 3LL);
v4 = (void *)*((_QWORD *)this + 18);
if ( v4 )
operator delete(v4, *((_QWORD *)this + 20) - (_QWORD)v4);
v5 = (char *)*((_QWORD *)this + 14);
if ( v5 != (char *)this + 128 )
operator delete(v5, *((_QWORD *)this + 16) + 1LL);
v6 = (void *)*((_QWORD *)this + 11);
if ( v6 )
operator delete(v6, *((_QWORD *)this + 13) - (_QWORD)v6);
v7 = (char *)*((_QWORD *)this + 5);
if ( v7 != (char *)this + 56 )
operator delete(v7, *((_QWORD *)this + 7) + 1LL);
v8 = (_QWORD *)*((_QWORD *)this + 1);
v9 = (_QWORD *)((char *)this + 24);
if ( v8 != v9 )
operator delete(v8, *v9 + 1LL);
}
| ~TimeManipulatorExecutor:
PUSH RBX
MOV RBX,RDI
LEA RAX,[0x396e68]
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x1d8]
TEST RDI,RDI
JZ 0x0019b1b0
CMP qword ptr [RDI],0x0
JNZ 0x0019b26e
MOV ESI,0x8
CALL 0x00182190
LAB_0019b1b0:
MOV qword ptr [RBX + 0x1d8],0x0
LEA RDI,[RBX + 0x1a0]
CALL 0x0019b8dc
LEA RDI,[RBX + 0x180]
CALL 0x0019b8ac
MOV RAX,qword ptr [RBX + 0xc8]
TEST RAX,RAX
JZ 0x0019b1f0
LEA RDI,[RBX + 0xb8]
LAB_0019b1e6:
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_0019b1f0:
MOV RDI,qword ptr [RBX + 0x90]
TEST RDI,RDI
JZ 0x0019b20b
MOV RSI,qword ptr [RBX + 0xa0]
SUB RSI,RDI
CALL 0x00182190
LAB_0019b20b:
MOV RDI,qword ptr [RBX + 0x70]
LEA RAX,[RBX + 0x80]
CMP RDI,RAX
JZ 0x0019b226
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x00182190
LAB_0019b226:
MOV RDI,qword ptr [RBX + 0x58]
TEST RDI,RDI
JZ 0x0019b23b
MOV RSI,qword ptr [RBX + 0x68]
SUB RSI,RDI
CALL 0x00182190
LAB_0019b23b:
MOV RDI,qword ptr [RBX + 0x28]
LEA RAX,[RBX + 0x38]
CMP RDI,RAX
JZ 0x0019b253
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x00182190
LAB_0019b253:
MOV RDI,qword ptr [RBX + 0x8]
ADD RBX,0x18
CMP RDI,RBX
JZ 0x0019b26c
MOV RSI,qword ptr [RBX]
INC RSI
POP RBX
JMP 0x00182190
LAB_0019b26c:
POP RBX
RET
LAB_0019b26e:
CALL 0x001807b0
|
/* aimrt::plugins::time_manipulator_plugin::TimeManipulatorExecutor::~TimeManipulatorExecutor() */
void __thiscall
aimrt::plugins::time_manipulator_plugin::TimeManipulatorExecutor::~TimeManipulatorExecutor
(TimeManipulatorExecutor *this)
{
long *plVar1;
void *pvVar2;
*(int ***)this = &PTR__TimeManipulatorExecutor_00396e68;
plVar1 = *(long **)(this + 0x1d8);
if (plVar1 != (long *)0x0) {
if (*plVar1 != 0) {
/* WARNING: Subroutine does not return */
std::terminate();
}
operator_delete(plVar1,8);
}
*(int8 *)(this + 0x1d8) = 0;
std::
_Hashtable<unsigned_long,std::pair<unsigned_long_const,std::__cxx11::list<aimrt::plugins::time_manipulator_plugin::TimeManipulatorExecutor::TaskWithTimestamp,std::allocator<aimrt::plugins::time_manipulator_plugin::TimeManipulatorExecutor::TaskWithTimestamp>>>,std::allocator<std::pair<unsigned_long_const,std::__cxx11::list<aimrt::plugins::time_manipulator_plugin::TimeManipulatorExecutor::TaskWithTimestamp,std::allocator<aimrt::plugins::time_manipulator_plugin::TimeManipulatorExecutor::TaskWithTimestamp>>>>,std::__detail::_Select1st,std::equal_to<unsigned_long>,std::hash<unsigned_long>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
::~_Hashtable((_Hashtable<unsigned_long,std::pair<unsigned_long_const,std::__cxx11::list<aimrt::plugins::time_manipulator_plugin::TimeManipulatorExecutor::TaskWithTimestamp,std::allocator<aimrt::plugins::time_manipulator_plugin::TimeManipulatorExecutor::TaskWithTimestamp>>>,std::allocator<std::pair<unsigned_long_const,std::__cxx11::list<aimrt::plugins::time_manipulator_plugin::TimeManipulatorExecutor::TaskWithTimestamp,std::allocator<aimrt::plugins::time_manipulator_plugin::TimeManipulatorExecutor::TaskWithTimestamp>>>>,std::__detail::_Select1st,std::equal_to<unsigned_long>,std::hash<unsigned_long>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>
*)(this + 0x1a0));
std::
vector<aimrt::plugins::time_manipulator_plugin::TimeManipulatorExecutor::TimingWheelTool,std::allocator<aimrt::plugins::time_manipulator_plugin::TimeManipulatorExecutor::TimingWheelTool>>
::~vector((vector<aimrt::plugins::time_manipulator_plugin::TimeManipulatorExecutor::TimingWheelTool,std::allocator<aimrt::plugins::time_manipulator_plugin::TimeManipulatorExecutor::TimingWheelTool>>
*)(this + 0x180));
if (*(code **)(this + 200) != (code *)0x0) {
/* try { // try from 0019b1e6 to 0019b1ef has its CatchHandler @ 0019b273 */
(**(code **)(this + 200))(this + 0xb8,this + 0xb8,3);
}
pvVar2 = *(void **)(this + 0x90);
if (pvVar2 != (void *)0x0) {
operator_delete(pvVar2,*(long *)(this + 0xa0) - (long)pvVar2);
}
if (*(TimeManipulatorExecutor **)(this + 0x70) != this + 0x80) {
operator_delete(*(TimeManipulatorExecutor **)(this + 0x70),*(long *)(this + 0x80) + 1);
}
pvVar2 = *(void **)(this + 0x58);
if (pvVar2 != (void *)0x0) {
operator_delete(pvVar2,*(long *)(this + 0x68) - (long)pvVar2);
}
if (*(TimeManipulatorExecutor **)(this + 0x28) != this + 0x38) {
operator_delete(*(TimeManipulatorExecutor **)(this + 0x28),*(long *)(this + 0x38) + 1);
}
if (*(TimeManipulatorExecutor **)(this + 8) != this + 0x18) {
operator_delete(*(TimeManipulatorExecutor **)(this + 8),*(long *)(this + 0x18) + 1);
return;
}
return;
}
| |
40,546 | bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) | seiftnesse[P]memoryallocator/build_O0/_deps/googletest-src/googletest/src/gtest.cc | Result HandleSehExceptionsInMethodIfSupported(T* object, Result (T::*method)(),
const char* location) {
#if GTEST_HAS_SEH
__try {
return (object->*method)();
} __except (internal::UnitTestOptions::GTestShouldProcessSEH( // NOLINT
GetExceptionCode())) {
// We create the exception message on the heap because VC++ prohibits
// creation of objects with destructors on stack in functions using __try
// (see error C2712).
std::string* exception_message =
FormatSehExceptionMessage(GetExceptionCode(), location);
internal::ReportFailureInUnknownLocation(TestPartResult::kFatalFailure,
*exception_message);
delete exception_message;
return static_cast<Result>(0);
}
#else
(void)location;
return (object->*method)();
#endif // GTEST_HAS_SEH
} | O0 | cpp | bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*):
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rsi, -0x10(%rbp)
movq %rdx, -0x8(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdx
movq %rdi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rax, -0x28(%rbp)
movq %rcx, -0x30(%rbp)
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rdx
addq %rdx, %rcx
movq %rcx, -0x38(%rbp)
andq $0x1, %rax
cmpq $0x0, %rax
je 0x6d9e2
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rax
movq (%rax), %rax
subq $0x1, %rcx
movq (%rax,%rcx), %rax
movq %rax, -0x48(%rbp)
jmp 0x6d9ea
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x38(%rbp), %rdi
movq -0x48(%rbp), %rax
callq *%rax
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
| _ZN7testing8internal38HandleSehExceptionsInMethodIfSupportedINS0_12UnitTestImplEbEET0_PT_MS4_FS3_vEPKc:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rsi
mov [rbp+var_8], rdx
mov rax, [rbp+var_10]
mov rdx, [rbp+var_8]
mov [rbp+var_18], rdi
mov [rbp+var_20], rdx
mov [rbp+var_28], rax
mov [rbp+var_30], rcx
mov rcx, [rbp+var_18]
mov rax, [rbp+var_28]
mov [rbp+var_40], rax
mov rdx, [rbp+var_20]
add rcx, rdx
mov [rbp+var_38], rcx
and rax, 1
cmp rax, 0
jz short loc_6D9E2
mov rcx, [rbp+var_40]
mov rax, [rbp+var_38]
mov rax, [rax]
sub rcx, 1
mov rax, [rax+rcx]
mov [rbp+var_48], rax
jmp short loc_6D9EA
loc_6D9E2:
mov rax, [rbp+var_40]
mov [rbp+var_48], rax
loc_6D9EA:
mov rdi, [rbp+var_38]
mov rax, [rbp+var_48]
call rax
and al, 1
add rsp, 50h
pop rbp
retn
| char testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,bool>(
long long a1,
long long ( *a2)(_QWORD),
long long a3)
{
char v3; // al
_QWORD *v5; // [rsp+18h] [rbp-38h]
v5 = (_QWORD *)(a3 + a1);
if ( ((unsigned __int8)a2 & 1) != 0 )
v3 = (*(long long ( **)(_QWORD *))((char *)a2 + *v5 - 1))(v5);
else
v3 = a2(v5);
return v3 & 1;
}
| HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,bool>:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x8],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RDI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RAX
MOV qword ptr [RBP + -0x30],RCX
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x40],RAX
MOV RDX,qword ptr [RBP + -0x20]
ADD RCX,RDX
MOV qword ptr [RBP + -0x38],RCX
AND RAX,0x1
CMP RAX,0x0
JZ 0x0016d9e2
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX]
SUB RCX,0x1
MOV RAX,qword ptr [RAX + RCX*0x1]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x0016d9ea
LAB_0016d9e2:
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x48],RAX
LAB_0016d9ea:
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x48]
CALL RAX
AND AL,0x1
ADD RSP,0x50
POP RBP
RET
|
/* bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,
bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*)
*/
bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,bool>
(UnitTestImpl *param_1,_func_bool *param_2,char *param_3)
{
bool bVar1;
_func_bool *local_50;
local_50 = param_2;
if (((ulong)param_2 & 1) != 0) {
local_50 = *(_func_bool **)(param_2 + *(long *)(param_1 + (long)param_3) + -1);
}
bVar1 = (*local_50)(param_1 + (long)param_3);
return bVar1;
}
| |
40,547 | Bfree | eloqsql/strings/dtoa.c | static void Bfree(Bigint *v, Stack_alloc *alloc)
{
char *gptr= (char*) v; /* generic pointer */
if (gptr < alloc->begin || gptr >= alloc->end)
free(gptr);
else if (v->k <= Kmax)
{
/*
Maintain free lists only for stack objects: this way we don't
have to bother with freeing lists in the end of dtoa;
heap should not be used normally anyway.
*/
v->p.next= alloc->freelist[v->k];
alloc->freelist[v->k]= v;
}
} | O3 | c | Bfree:
pushq %rbp
movq %rsp, %rbp
cmpq %rdi, (%rsi)
ja 0xf9e51
cmpq %rdi, 0x10(%rsi)
jbe 0xf9e51
movslq 0x8(%rdi), %rax
cmpq $0xf, %rax
jg 0xf9e4f
movq 0x18(%rsi,%rax,8), %rcx
movq %rcx, (%rdi)
movq %rdi, 0x18(%rsi,%rax,8)
popq %rbp
retq
popq %rbp
jmp 0x2b190
| Bfree:
push rbp
mov rbp, rsp
cmp [rsi], rdi
ja short loc_F9E51
cmp [rsi+10h], rdi
jbe short loc_F9E51
movsxd rax, dword ptr [rdi+8]
cmp rax, 0Fh
jg short loc_F9E4F
mov rcx, [rsi+rax*8+18h]
mov [rdi], rcx
mov [rsi+rax*8+18h], rdi
loc_F9E4F:
pop rbp
retn
loc_F9E51:
pop rbp
jmp _free
| long long Bfree(unsigned long long a1, unsigned long long *a2)
{
long long result; // rax
if ( *a2 > a1 || a2[2] <= a1 )
return free(a1);
result = *(int *)(a1 + 8);
if ( result <= 15 )
{
*(_QWORD *)a1 = a2[result + 3];
a2[result + 3] = a1;
}
return result;
}
| Bfree:
PUSH RBP
MOV RBP,RSP
CMP qword ptr [RSI],RDI
JA 0x001f9e51
CMP qword ptr [RSI + 0x10],RDI
JBE 0x001f9e51
MOVSXD RAX,dword ptr [RDI + 0x8]
CMP RAX,0xf
JG 0x001f9e4f
MOV RCX,qword ptr [RSI + RAX*0x8 + 0x18]
MOV qword ptr [RDI],RCX
MOV qword ptr [RSI + RAX*0x8 + 0x18],RDI
LAB_001f9e4f:
POP RBP
RET
LAB_001f9e51:
POP RBP
JMP 0x0012b190
|
void Bfree(ulong *param_1,ulong *param_2)
{
long lVar1;
if (((ulong *)*param_2 <= param_1) && (param_1 < (ulong *)param_2[2])) {
lVar1 = (long)(int)param_1[1];
if (lVar1 < 0x10) {
*param_1 = param_2[lVar1 + 3];
param_2[lVar1 + 3] = (ulong)param_1;
}
return;
}
free(param_1);
return;
}
| |
40,548 | my_hash_update | eloqsql/mysys/hash.c | my_bool my_hash_update(HASH *hash, uchar *record, uchar *old_key,
size_t old_key_length)
{
uint new_index, new_pos_index, org_index, records, idx;
size_t length, empty, blength;
my_hash_value_type hash_nr;
HASH_LINK org_link,*data,*previous,*pos;
uchar *new_key;
DBUG_ENTER("my_hash_update");
new_key= (uchar*) my_hash_key(hash, record, &length, 1);
hash_nr= hash->hash_function(hash->charset, new_key, length);
if (HASH_UNIQUE & hash->flags)
{
HASH_SEARCH_STATE state;
uchar *found;
if ((found= my_hash_first_from_hash_value(hash, hash_nr, new_key, length,
&state)))
{
do
{
if (found != record)
DBUG_RETURN(1); /* Duplicate entry */
}
while ((found= my_hash_next(hash, new_key, length, &state)));
}
}
data=dynamic_element(&hash->array,0,HASH_LINK*);
blength=hash->blength; records=hash->records;
/* Search after record with key */
idx= my_hash_mask(hash->hash_function(hash->charset, old_key,
(old_key_length ? old_key_length :
hash->key_length)),
blength, records);
org_index= idx;
new_index= my_hash_mask(hash_nr, blength, records);
previous=0;
for (;;)
{
if ((pos= data+idx)->data == record)
break;
previous=pos;
if ((idx=pos->next) == NO_RECORD)
DBUG_RETURN(1); /* Not found in links */
}
if (org_index == new_index)
{
data[idx].hash_nr= hash_nr; /* Hash number may have changed */
DBUG_RETURN(0); /* Record is in right position */
}
org_link= *pos;
empty=idx;
/* Relink record from current chain */
if (!previous)
{
if (pos->next != NO_RECORD)
{
empty=pos->next;
*pos= data[pos->next];
}
}
else
previous->next=pos->next; /* unlink pos */
/* Move data to correct position */
if (new_index == empty)
{
/*
At this point record is unlinked from the old chain, thus it holds
random position. By the chance this position is equal to position
for the first element in the new chain. That means updated record
is the only record in the new chain.
*/
if (empty != idx)
{
/*
Record was moved while unlinking it from the old chain.
Copy data to a new position.
*/
data[empty]= org_link;
}
data[empty].next= NO_RECORD;
data[empty].hash_nr= hash_nr;
DBUG_RETURN(0);
}
pos=data+new_index;
new_pos_index= my_hash_rec_mask(pos, blength, records);
if (new_index != new_pos_index)
{ /* Other record in wrong position */
data[empty]= *pos;
movelink(data,new_index,new_pos_index, (uint) empty);
org_link.next=NO_RECORD;
data[new_index]= org_link;
data[new_index].hash_nr= hash_nr;
}
else
{ /* Link in chain at right position */
org_link.next=data[new_index].next;
data[empty]=org_link;
data[empty].hash_nr= hash_nr;
data[new_index].next= (uint) empty;
}
DBUG_RETURN(0);
} | O3 | c | my_hash_update:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, -0x60(%rbp)
movq %rsi, %r14
movq %rdi, %r13
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq 0x50(%rdi), %rax
testq %rax, %rax
movq %rdx, -0x58(%rbp)
je 0x254fd
leaq -0x48(%rbp), %r12
movq %r14, %rdi
movq %r12, %rsi
movl $0x1, %edx
callq *%rax
movq %rax, %rbx
movq (%r12), %rdx
jmp 0x2550c
movq 0x8(%r13), %rdx
movq %rdx, -0x48(%rbp)
movq (%r13), %rbx
addq %r14, %rbx
movq 0x68(%r13), %rdi
movq %rbx, %rsi
callq *0x58(%r13)
testb $0x1, 0x20(%r13)
je 0x25562
movq -0x48(%rbp), %rcx
leaq -0x40(%rbp), %r8
movq %r13, %rdi
movl %eax, %r15d
movl %eax, %esi
movq %rbx, %rdx
callq 0x24d61
testq %rax, %rax
je 0x2555f
leaq -0x40(%rbp), %r12
cmpq %r14, %rax
jne 0x2560a
movq -0x48(%rbp), %rdx
movq %r13, %rdi
movq %rbx, %rsi
movq %r12, %rcx
callq 0x24eba
testq %rax, %rax
jne 0x2553f
movl %r15d, %eax
movl %eax, -0x4c(%rbp)
movq 0x28(%r13), %rbx
movq 0x10(%r13), %r12
movl 0x18(%r13), %r15d
movq 0x58(%r13), %rax
movq 0x68(%r13), %rdi
movq -0x60(%rbp), %rdx
testq %rdx, %rdx
jne 0x25586
movq 0x8(%r13), %rdx
movq -0x58(%rbp), %rsi
callq *%rax
movl $0xffffffff, %edi # imm = 0xFFFFFFFF
leaq (%r12,%rdi), %rsi
movl %esi, %ecx
andl %eax, %ecx
shrq %r12
decl %r12d
andl %r12d, %eax
cmpl %r15d, %ecx
cmovbl %ecx, %eax
movl %esi, %ecx
movl -0x4c(%rbp), %r11d
andl %r11d, %ecx
movl %r11d, %edx
andl %r12d, %edx
cmpl %r15d, %ecx
cmovbl %ecx, %edx
movq %rax, %rcx
shlq $0x4, %rcx
leaq (%rbx,%rcx), %r8
cmpq %r14, 0x8(%rbx,%rcx)
je 0x2560e
movl (%r8), %ecx
cmpq %rdi, %rcx
je 0x2560a
movq %r8, %r9
movq %rcx, %r10
shlq $0x4, %r10
leaq (%rbx,%r10), %r8
cmpq %r14, 0x8(%rbx,%r10)
jne 0x255cf
cmpl %edx, %eax
je 0x25615
movl (%r8), %eax
movl 0xc(%r8), %edi
movl %edi, -0x38(%rbp)
movq 0x4(%r8), %rdi
movq %rdi, -0x40(%rbp)
movl %eax, (%r9)
movq %rcx, %rax
jmp 0x25647
movb $0x1, %al
jmp 0x25678
cmpl %edx, %eax
jne 0x2561b
movq %rax, %rcx
shlq $0x4, %rcx
jmp 0x25671
movl (%r8), %ecx
movl 0xc(%r8), %r9d
movl %r9d, -0x38(%rbp)
movq 0x4(%r8), %r9
movq %r9, -0x40(%rbp)
cmpq %rdi, %rcx
je 0x25644
movq %rcx, %rdi
shlq $0x4, %rdi
movups (%rbx,%rdi), %xmm0
movups %xmm0, (%r8)
jmp 0x25647
movq %rax, %rcx
cmpl %edx, %ecx
jne 0x2569a
cmpl %eax, %ecx
je 0x25666
movq %rcx, %rax
shlq $0x4, %rax
movl -0x38(%rbp), %edx
movl %edx, 0xc(%rbx,%rax)
movq -0x40(%rbp), %rdx
movq %rdx, 0x4(%rbx,%rax)
shlq $0x4, %rcx
movl $0xffffffff, (%rbx,%rcx) # imm = 0xFFFFFFFF
movl %r11d, 0x4(%rbx,%rcx)
xorl %eax, %eax
movq %fs:0x28, %rcx
cmpq -0x30(%rbp), %rcx
jne 0x25727
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %edx, %edi
shlq $0x4, %rdi
leaq (%rbx,%rdi), %rax
movl 0x4(%rbx,%rdi), %r8d
andl %r8d, %esi
andl %r8d, %r12d
cmpl %r15d, %esi
cmovbl %esi, %r12d
cmpl %r12d, %edx
jne 0x256e0
movl (%rax), %edx
movq %rcx, %rsi
shlq $0x4, %rsi
movl %edx, (%rbx,%rsi)
movq -0x40(%rbp), %rdx
movq %rdx, 0x4(%rbx,%rsi)
movl -0x38(%rbp), %edx
movl %edx, 0xc(%rbx,%rsi)
movl %r11d, 0x4(%rbx,%rsi)
movl %ecx, (%rax)
jmp 0x25676
leaq (%rbx,%rdi), %rsi
addq $0x4, %rsi
movq %rcx, %rdi
shlq $0x4, %rdi
movups (%rax), %xmm0
movups %xmm0, (%rbx,%rdi)
movl %r12d, %edi
shlq $0x4, %rdi
movl (%rbx,%rdi), %r12d
cmpl %edx, %r12d
jne 0x256f6
addq %rdi, %rbx
movl %ecx, (%rbx)
movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF
movl -0x38(%rbp), %ecx
movl %ecx, 0x8(%rsi)
movq -0x40(%rbp), %rcx
movq %rcx, (%rsi)
movl %r11d, 0x4(%rax)
jmp 0x25676
callq 0x242e0
| my_hash_update:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov [rbp+var_60], rcx
mov r14, rsi
mov r13, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov rax, [rdi+50h]
test rax, rax
mov [rbp+var_58], rdx
jz short loc_254FD
lea r12, [rbp+var_48]
mov rdi, r14
mov rsi, r12
mov edx, 1
call rax
mov rbx, rax
mov rdx, [r12]
jmp short loc_2550C
loc_254FD:
mov rdx, [r13+8]
mov [rbp+var_48], rdx
mov rbx, [r13+0]
add rbx, r14
loc_2550C:
mov rdi, [r13+68h]
mov rsi, rbx
call qword ptr [r13+58h]
test byte ptr [r13+20h], 1
jz short loc_25562
mov rcx, [rbp+var_48]
lea r8, [rbp+var_40]
mov rdi, r13
mov r15d, eax
mov esi, eax
mov rdx, rbx
call my_hash_first_from_hash_value
test rax, rax
jz short loc_2555F
lea r12, [rbp+var_40]
loc_2553F:
cmp rax, r14
jnz loc_2560A
mov rdx, [rbp+var_48]
mov rdi, r13
mov rsi, rbx
mov rcx, r12
call my_hash_next
test rax, rax
jnz short loc_2553F
loc_2555F:
mov eax, r15d
loc_25562:
mov [rbp+var_4C], eax
mov rbx, [r13+28h]
mov r12, [r13+10h]
mov r15d, [r13+18h]
mov rax, [r13+58h]
mov rdi, [r13+68h]
mov rdx, [rbp+var_60]
test rdx, rdx
jnz short loc_25586
mov rdx, [r13+8]
loc_25586:
mov rsi, [rbp+var_58]
call rax
mov edi, 0FFFFFFFFh
lea rsi, [r12+rdi]
mov ecx, esi
and ecx, eax
shr r12, 1
dec r12d
and eax, r12d
cmp ecx, r15d
cmovb eax, ecx
mov ecx, esi
mov r11d, [rbp+var_4C]
and ecx, r11d
mov edx, r11d
and edx, r12d
cmp ecx, r15d
cmovb edx, ecx
mov rcx, rax
shl rcx, 4
lea r8, [rbx+rcx]
cmp [rbx+rcx+8], r14
jz short loc_2560E
loc_255CF:
mov ecx, [r8]
cmp rcx, rdi
jz short loc_2560A
mov r9, r8
mov r10, rcx
shl r10, 4
lea r8, [rbx+r10]
cmp [rbx+r10+8], r14
jnz short loc_255CF
cmp eax, edx
jz short loc_25615
mov eax, [r8]
mov edi, [r8+0Ch]
mov [rbp+var_38], edi
mov rdi, [r8+4]
mov [rbp+var_40], rdi
mov [r9], eax
mov rax, rcx
jmp short loc_25647
loc_2560A:
mov al, 1
jmp short loc_25678
loc_2560E:
cmp eax, edx
jnz short loc_2561B
mov rcx, rax
loc_25615:
shl rcx, 4
jmp short loc_25671
loc_2561B:
mov ecx, [r8]
mov r9d, [r8+0Ch]
mov [rbp+var_38], r9d
mov r9, [r8+4]
mov [rbp+var_40], r9
cmp rcx, rdi
jz short loc_25644
mov rdi, rcx
shl rdi, 4
movups xmm0, xmmword ptr [rbx+rdi]
movups xmmword ptr [r8], xmm0
jmp short loc_25647
loc_25644:
mov rcx, rax
loc_25647:
cmp ecx, edx
jnz short loc_2569A
cmp ecx, eax
jz short loc_25666
mov rax, rcx
shl rax, 4
mov edx, [rbp+var_38]
mov [rbx+rax+0Ch], edx
mov rdx, [rbp+var_40]
mov [rbx+rax+4], rdx
loc_25666:
shl rcx, 4
mov dword ptr [rbx+rcx], 0FFFFFFFFh
loc_25671:
mov [rbx+rcx+4], r11d
loc_25676:
xor eax, eax
loc_25678:
mov rcx, fs:28h
cmp rcx, [rbp+var_30]
jnz loc_25727
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2569A:
mov edi, edx
shl rdi, 4
lea rax, [rbx+rdi]
mov r8d, [rbx+rdi+4]
and esi, r8d
and r12d, r8d
cmp esi, r15d
cmovb r12d, esi
cmp edx, r12d
jnz short loc_256E0
mov edx, [rax]
mov rsi, rcx
shl rsi, 4
mov [rbx+rsi], edx
mov rdx, [rbp+var_40]
mov [rbx+rsi+4], rdx
mov edx, [rbp+var_38]
mov [rbx+rsi+0Ch], edx
mov [rbx+rsi+4], r11d
mov [rax], ecx
jmp short loc_25676
loc_256E0:
lea rsi, [rbx+rdi]
add rsi, 4
mov rdi, rcx
shl rdi, 4
movups xmm0, xmmword ptr [rax]
movups xmmword ptr [rbx+rdi], xmm0
loc_256F6:
mov edi, r12d
shl rdi, 4
mov r12d, [rbx+rdi]
cmp r12d, edx
jnz short loc_256F6
add rbx, rdi
mov [rbx], ecx
mov dword ptr [rax], 0FFFFFFFFh
mov ecx, [rbp+var_38]
mov [rsi+8], ecx
mov rcx, [rbp+var_40]
mov [rsi], rcx
mov [rax+4], r11d
jmp loc_25676
loc_25727:
call ___stack_chk_fail
| char my_hash_update(long long a1, long long a2, long long a3)
{
long long ( *v4)(long long, long long *, long long); // rax
long long v5; // rbx
long long v6; // rdx
int v7; // eax
int v8; // r15d
long long v9; // rax
long long v10; // rbx
unsigned long long v11; // r12
unsigned int v12; // r15d
unsigned int v13; // eax
unsigned int v14; // esi
unsigned int v15; // ecx
int v16; // r12d
long long v17; // rax
unsigned int v18; // edx
unsigned int *v19; // r8
long long v20; // rcx
_DWORD *v21; // r9
int v22; // eax
long long v24; // rcx
long long v25; // rax
long long v26; // rdi
_DWORD *v27; // rax
int v28; // r8d
unsigned int v29; // esi
unsigned int v30; // r12d
long long v31; // rsi
long long v32; // rsi
long long v33; // rdi
int v35; // [rsp+14h] [rbp-4Ch]
long long v36; // [rsp+18h] [rbp-48h] BYREF
long long v37; // [rsp+20h] [rbp-40h] BYREF
unsigned int v38; // [rsp+28h] [rbp-38h]
unsigned long long v39; // [rsp+30h] [rbp-30h]
v39 = __readfsqword(0x28u);
v4 = *(long long ( **)(long long, long long *, long long))(a1 + 80);
if ( v4 )
{
v5 = v4(a2, &v36, 1LL);
v6 = v36;
}
else
{
v6 = *(_QWORD *)(a1 + 8);
v36 = v6;
v5 = a2 + *(_QWORD *)a1;
}
v7 = (*(long long ( **)(_QWORD, long long, long long))(a1 + 88))(*(_QWORD *)(a1 + 104), v5, v6);
if ( (*(_BYTE *)(a1 + 32) & 1) != 0 )
{
v8 = v7;
v9 = my_hash_first_from_hash_value((_QWORD *)a1, v7, v5, v36, (unsigned int *)&v37);
if ( v9 )
{
while ( v9 == a2 )
{
v9 = my_hash_next((_QWORD *)a1, v5, v36, &v37);
if ( !v9 )
goto LABEL_8;
}
return 1;
}
LABEL_8:
v7 = v8;
}
v35 = v7;
v10 = *(_QWORD *)(a1 + 40);
v11 = *(_QWORD *)(a1 + 16);
v12 = *(_DWORD *)(a1 + 24);
v13 = (*(long long ( **)(_QWORD, long long))(a1 + 88))(*(_QWORD *)(a1 + 104), a3);
v14 = v11 - 1;
v15 = v13 & (v11 - 1);
v16 = (v11 >> 1) - 1;
v17 = v16 & v13;
if ( v15 < v12 )
v17 = v15;
v18 = v16 & v35;
if ( (v35 & v14) < v12 )
v18 = v35 & v14;
v19 = (unsigned int *)(v10 + 16 * v17);
if ( *((_QWORD *)v19 + 1) != a2 )
{
while ( 1 )
{
v20 = *v19;
if ( v20 == 0xFFFFFFFFLL )
return 1;
v21 = v19;
v19 = (unsigned int *)(v10 + 16 * v20);
if ( *((_QWORD *)v19 + 1) == a2 )
{
if ( (_DWORD)v17 == v18 )
goto LABEL_21;
v22 = *v19;
v38 = v19[3];
v37 = *(_QWORD *)(v19 + 1);
*v21 = v22;
LODWORD(v17) = v20;
goto LABEL_25;
}
}
}
if ( (_DWORD)v17 == v18 )
{
v20 = v17;
LABEL_21:
v24 = 16 * v20;
}
else
{
v20 = *v19;
v38 = v19[3];
v37 = *(_QWORD *)(v19 + 1);
if ( v20 == 0xFFFFFFFFLL )
v20 = v17;
else
*(_OWORD *)v19 = *(_OWORD *)(v10 + 16 * v20);
LABEL_25:
if ( (_DWORD)v20 != v18 )
{
v26 = 16LL * v18;
v27 = (_DWORD *)(v10 + v26);
v28 = *(_DWORD *)(v10 + v26 + 4);
v29 = v28 & v14;
v30 = v28 & v16;
if ( v29 < v12 )
v30 = v29;
if ( v18 == v30 )
{
v31 = 16 * v20;
*(_DWORD *)(v10 + v31) = *v27;
*(_QWORD *)(v10 + v31 + 4) = v37;
*(_DWORD *)(v10 + v31 + 12) = v38;
*(_DWORD *)(v10 + v31 + 4) = v35;
*v27 = v20;
}
else
{
v32 = v10 + v26 + 4;
*(_OWORD *)(v10 + 16 * v20) = *(_OWORD *)v27;
do
{
v33 = 16LL * v30;
v30 = *(_DWORD *)(v10 + v33);
}
while ( v30 != v18 );
*(_DWORD *)(v33 + v10) = v20;
*v27 = -1;
*(_DWORD *)(v32 + 8) = v38;
*(_QWORD *)v32 = v37;
v27[1] = v35;
}
return 0;
}
if ( (_DWORD)v20 != (_DWORD)v17 )
{
v25 = 16 * v20;
*(_DWORD *)(v10 + v25 + 12) = v38;
*(_QWORD *)(v10 + v25 + 4) = v37;
}
v24 = 16 * v20;
*(_DWORD *)(v10 + v24) = -1;
}
*(_DWORD *)(v10 + v24 + 4) = v35;
return 0;
}
| my_hash_update:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x60],RCX
MOV R14,RSI
MOV R13,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RDI + 0x50]
TEST RAX,RAX
MOV qword ptr [RBP + -0x58],RDX
JZ 0x001254fd
LEA R12,[RBP + -0x48]
MOV RDI,R14
MOV RSI,R12
MOV EDX,0x1
CALL RAX
MOV RBX,RAX
MOV RDX,qword ptr [R12]
JMP 0x0012550c
LAB_001254fd:
MOV RDX,qword ptr [R13 + 0x8]
MOV qword ptr [RBP + -0x48],RDX
MOV RBX,qword ptr [R13]
ADD RBX,R14
LAB_0012550c:
MOV RDI,qword ptr [R13 + 0x68]
MOV RSI,RBX
CALL qword ptr [R13 + 0x58]
TEST byte ptr [R13 + 0x20],0x1
JZ 0x00125562
MOV RCX,qword ptr [RBP + -0x48]
LEA R8,[RBP + -0x40]
MOV RDI,R13
MOV R15D,EAX
MOV ESI,EAX
MOV RDX,RBX
CALL 0x00124d61
TEST RAX,RAX
JZ 0x0012555f
LEA R12,[RBP + -0x40]
LAB_0012553f:
CMP RAX,R14
JNZ 0x0012560a
MOV RDX,qword ptr [RBP + -0x48]
MOV RDI,R13
MOV RSI,RBX
MOV RCX,R12
CALL 0x00124eba
TEST RAX,RAX
JNZ 0x0012553f
LAB_0012555f:
MOV EAX,R15D
LAB_00125562:
MOV dword ptr [RBP + -0x4c],EAX
MOV RBX,qword ptr [R13 + 0x28]
MOV R12,qword ptr [R13 + 0x10]
MOV R15D,dword ptr [R13 + 0x18]
MOV RAX,qword ptr [R13 + 0x58]
MOV RDI,qword ptr [R13 + 0x68]
MOV RDX,qword ptr [RBP + -0x60]
TEST RDX,RDX
JNZ 0x00125586
MOV RDX,qword ptr [R13 + 0x8]
LAB_00125586:
MOV RSI,qword ptr [RBP + -0x58]
CALL RAX
MOV EDI,0xffffffff
LEA RSI,[R12 + RDI*0x1]
MOV ECX,ESI
AND ECX,EAX
SHR R12,0x1
DEC R12D
AND EAX,R12D
CMP ECX,R15D
CMOVC EAX,ECX
MOV ECX,ESI
MOV R11D,dword ptr [RBP + -0x4c]
AND ECX,R11D
MOV EDX,R11D
AND EDX,R12D
CMP ECX,R15D
CMOVC EDX,ECX
MOV RCX,RAX
SHL RCX,0x4
LEA R8,[RBX + RCX*0x1]
CMP qword ptr [RBX + RCX*0x1 + 0x8],R14
JZ 0x0012560e
LAB_001255cf:
MOV ECX,dword ptr [R8]
CMP RCX,RDI
JZ 0x0012560a
MOV R9,R8
MOV R10,RCX
SHL R10,0x4
LEA R8,[RBX + R10*0x1]
CMP qword ptr [RBX + R10*0x1 + 0x8],R14
JNZ 0x001255cf
CMP EAX,EDX
JZ 0x00125615
MOV EAX,dword ptr [R8]
MOV EDI,dword ptr [R8 + 0xc]
MOV dword ptr [RBP + -0x38],EDI
MOV RDI,qword ptr [R8 + 0x4]
MOV qword ptr [RBP + -0x40],RDI
MOV dword ptr [R9],EAX
MOV RAX,RCX
JMP 0x00125647
LAB_0012560a:
MOV AL,0x1
JMP 0x00125678
LAB_0012560e:
CMP EAX,EDX
JNZ 0x0012561b
MOV RCX,RAX
LAB_00125615:
SHL RCX,0x4
JMP 0x00125671
LAB_0012561b:
MOV ECX,dword ptr [R8]
MOV R9D,dword ptr [R8 + 0xc]
MOV dword ptr [RBP + -0x38],R9D
MOV R9,qword ptr [R8 + 0x4]
MOV qword ptr [RBP + -0x40],R9
CMP RCX,RDI
JZ 0x00125644
MOV RDI,RCX
SHL RDI,0x4
MOVUPS XMM0,xmmword ptr [RBX + RDI*0x1]
MOVUPS xmmword ptr [R8],XMM0
JMP 0x00125647
LAB_00125644:
MOV RCX,RAX
LAB_00125647:
CMP ECX,EDX
JNZ 0x0012569a
CMP ECX,EAX
JZ 0x00125666
MOV RAX,RCX
SHL RAX,0x4
MOV EDX,dword ptr [RBP + -0x38]
MOV dword ptr [RBX + RAX*0x1 + 0xc],EDX
MOV RDX,qword ptr [RBP + -0x40]
MOV qword ptr [RBX + RAX*0x1 + 0x4],RDX
LAB_00125666:
SHL RCX,0x4
MOV dword ptr [RBX + RCX*0x1],0xffffffff
LAB_00125671:
MOV dword ptr [RBX + RCX*0x1 + 0x4],R11D
LAB_00125676:
XOR EAX,EAX
LAB_00125678:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x30]
JNZ 0x00125727
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012569a:
MOV EDI,EDX
SHL RDI,0x4
LEA RAX,[RBX + RDI*0x1]
MOV R8D,dword ptr [RBX + RDI*0x1 + 0x4]
AND ESI,R8D
AND R12D,R8D
CMP ESI,R15D
CMOVC R12D,ESI
CMP EDX,R12D
JNZ 0x001256e0
MOV EDX,dword ptr [RAX]
MOV RSI,RCX
SHL RSI,0x4
MOV dword ptr [RBX + RSI*0x1],EDX
MOV RDX,qword ptr [RBP + -0x40]
MOV qword ptr [RBX + RSI*0x1 + 0x4],RDX
MOV EDX,dword ptr [RBP + -0x38]
MOV dword ptr [RBX + RSI*0x1 + 0xc],EDX
MOV dword ptr [RBX + RSI*0x1 + 0x4],R11D
MOV dword ptr [RAX],ECX
JMP 0x00125676
LAB_001256e0:
LEA RSI,[RBX + RDI*0x1]
ADD RSI,0x4
MOV RDI,RCX
SHL RDI,0x4
MOVUPS XMM0,xmmword ptr [RAX]
MOVUPS xmmword ptr [RBX + RDI*0x1],XMM0
LAB_001256f6:
MOV EDI,R12D
SHL RDI,0x4
MOV R12D,dword ptr [RBX + RDI*0x1]
CMP R12D,EDX
JNZ 0x001256f6
ADD RBX,RDI
MOV dword ptr [RBX],ECX
MOV dword ptr [RAX],0xffffffff
MOV ECX,dword ptr [RBP + -0x38]
MOV dword ptr [RSI + 0x8],ECX
MOV RCX,qword ptr [RBP + -0x40]
MOV qword ptr [RSI],RCX
MOV dword ptr [RAX + 0x4],R11D
JMP 0x00125676
LAB_00125727:
CALL 0x001242e0
|
int8 my_hash_update(long *param_1,long param_2,int8 param_3,long param_4)
{
uint *puVar1;
uint uVar2;
uint uVar3;
uint uVar4;
uint uVar5;
uint uVar6;
uint uVar7;
long lVar8;
long lVar9;
ulong uVar10;
int8 uVar11;
uint uVar12;
ulong uVar13;
uint uVar14;
uint *puVar15;
uint uVar16;
long in_FS_OFFSET;
long local_50;
int8 local_48;
uint local_40;
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
if ((code *)param_1[10] == (code *)0x0) {
local_50 = param_1[1];
lVar8 = *param_1 + param_2;
}
else {
lVar8 = (*(code *)param_1[10])(param_2,&local_50,1);
}
uVar5 = (*(code *)param_1[0xb])(param_1[0xd],lVar8,local_50);
if (((*(byte *)(param_1 + 4) & 1) != 0) &&
(lVar9 = my_hash_first_from_hash_value(param_1,uVar5,lVar8,local_50,&local_48), lVar9 != 0)) {
do {
if (lVar9 != param_2) goto LAB_0012560a;
lVar9 = my_hash_next(param_1,lVar8,local_50,&local_48);
} while (lVar9 != 0);
}
lVar8 = param_1[5];
uVar10 = param_1[2];
uVar2 = *(uint *)(param_1 + 3);
if (param_4 == 0) {
param_4 = param_1[1];
}
uVar6 = (*(code *)param_1[0xb])(param_1[0xd],param_3,param_4);
uVar14 = (int)uVar10 - 1;
uVar16 = (int)(uVar10 >> 1) - 1;
uVar7 = uVar6 & uVar16;
if ((uVar14 & uVar6) < uVar2) {
uVar7 = uVar14 & uVar6;
}
uVar10 = (ulong)uVar7;
uVar6 = uVar5 & uVar16;
if ((uVar14 & uVar5) < uVar2) {
uVar6 = uVar14 & uVar5;
}
puVar1 = (uint *)(lVar8 + uVar10 * 0x10);
if (*(long *)(lVar8 + 8 + uVar10 * 0x10) == param_2) {
if (uVar7 != uVar6) {
uVar13 = (ulong)*puVar1;
local_40 = puVar1[3];
local_48 = *(int8 *)(puVar1 + 1);
if (uVar13 != 0xffffffff) {
puVar15 = (uint *)(lVar8 + uVar13 * 0x10);
uVar12 = puVar15[1];
uVar3 = puVar15[2];
uVar4 = puVar15[3];
*puVar1 = *puVar15;
puVar1[1] = uVar12;
puVar1[2] = uVar3;
puVar1[3] = uVar4;
uVar10 = uVar13;
}
goto LAB_00125647;
}
LAB_00125615:
lVar9 = uVar10 << 4;
LAB_00125671:
*(uint *)(lVar8 + 4 + lVar9) = uVar5;
}
else {
do {
puVar15 = puVar1;
uVar12 = *puVar15;
uVar10 = (ulong)uVar12;
if (uVar10 == 0xffffffff) goto LAB_0012560a;
puVar1 = (uint *)(lVar8 + uVar10 * 0x10);
} while (*(long *)(lVar8 + 8 + uVar10 * 0x10) != param_2);
if (uVar7 == uVar6) goto LAB_00125615;
local_40 = puVar1[3];
local_48 = *(int8 *)(puVar1 + 1);
*puVar15 = *puVar1;
uVar7 = uVar12;
LAB_00125647:
uVar12 = (uint)uVar10;
if (uVar12 == uVar6) {
if (uVar12 != uVar7) {
*(uint *)(lVar8 + 0xc + uVar10 * 0x10) = local_40;
*(int8 *)(lVar8 + 4 + uVar10 * 0x10) = local_48;
}
lVar9 = uVar10 * 0x10;
*(int4 *)(lVar8 + lVar9) = 0xffffffff;
goto LAB_00125671;
}
lVar9 = (ulong)uVar6 * 0x10;
puVar1 = (uint *)(lVar8 + lVar9);
uVar7 = *(uint *)(lVar8 + 4 + lVar9);
uVar14 = uVar14 & uVar7;
uVar7 = uVar16 & uVar7;
if (uVar14 < uVar2) {
uVar7 = uVar14;
}
if (uVar6 == uVar7) {
lVar9 = uVar10 * 0x10;
*(uint *)(lVar8 + lVar9) = *puVar1;
*(int8 *)(lVar8 + 4 + lVar9) = local_48;
*(uint *)(lVar8 + 0xc + lVar9) = local_40;
*(uint *)(lVar8 + 4 + lVar9) = uVar5;
*puVar1 = uVar12;
}
else {
uVar2 = puVar1[1];
uVar14 = puVar1[2];
uVar16 = puVar1[3];
puVar15 = (uint *)(lVar8 + uVar10 * 0x10);
*puVar15 = *puVar1;
puVar15[1] = uVar2;
puVar15[2] = uVar14;
puVar15[3] = uVar16;
do {
uVar10 = (ulong)uVar7;
uVar7 = *(uint *)(lVar8 + uVar10 * 0x10);
} while (uVar7 != uVar6);
*(uint *)(lVar8 + uVar10 * 0x10) = uVar12;
*puVar1 = 0xffffffff;
*(uint *)(lVar8 + lVar9 + 0xc) = local_40;
*(int8 *)(lVar8 + lVar9 + 4) = local_48;
puVar1[1] = uVar5;
}
}
uVar11 = 0;
LAB_00125678:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar11;
LAB_0012560a:
uVar11 = 1;
goto LAB_00125678;
}
| |
40,549 | google::protobuf::compiler::csharp::FieldGeneratorBase::type_name[abi:cxx11](google::protobuf::FieldDescriptor const*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/csharp/csharp_field_base.cc | std::string FieldGeneratorBase::type_name(const FieldDescriptor* descriptor) {
switch (descriptor->type()) {
case FieldDescriptor::TYPE_ENUM:
return GetClassName(descriptor->enum_type());
case FieldDescriptor::TYPE_MESSAGE:
case FieldDescriptor::TYPE_GROUP:
if (IsWrapperType(descriptor)) {
const FieldDescriptor* wrapped_field =
descriptor->message_type()->field(0);
std::string wrapped_field_type_name = type_name(wrapped_field);
// String and ByteString go to the same type; other wrapped types
// go to the nullable equivalent.
if (wrapped_field->type() == FieldDescriptor::TYPE_STRING ||
wrapped_field->type() == FieldDescriptor::TYPE_BYTES) {
return wrapped_field_type_name;
} else {
return wrapped_field_type_name + "?";
}
}
return GetClassName(descriptor->message_type());
case FieldDescriptor::TYPE_DOUBLE:
return "double";
case FieldDescriptor::TYPE_FLOAT:
return "float";
case FieldDescriptor::TYPE_INT64:
return "long";
case FieldDescriptor::TYPE_UINT64:
return "ulong";
case FieldDescriptor::TYPE_INT32:
return "int";
case FieldDescriptor::TYPE_FIXED64:
return "ulong";
case FieldDescriptor::TYPE_FIXED32:
return "uint";
case FieldDescriptor::TYPE_BOOL:
return "bool";
case FieldDescriptor::TYPE_STRING:
return "string";
case FieldDescriptor::TYPE_BYTES:
return "pb::ByteString";
case FieldDescriptor::TYPE_UINT32:
return "uint";
case FieldDescriptor::TYPE_SFIXED32:
return "int";
case FieldDescriptor::TYPE_SFIXED64:
return "long";
case FieldDescriptor::TYPE_SINT32:
return "int";
case FieldDescriptor::TYPE_SINT64:
return "long";
default:
GOOGLE_LOG(FATAL)<< "Unknown field type.";
return "";
}
} | O3 | cpp | google::protobuf::compiler::csharp::FieldGeneratorBase::type_name[abi:cxx11](google::protobuf::FieldDescriptor const*):
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq 0x18(%rdx), %rdi
testq %rdi, %rdi
je 0xa1365
leaq 0x988e4(%rip), %rax # 0x139c34
leaq 0x18(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x8(%rsp), %rdx
movq %r15, (%rdx)
callq 0x2f19d
movzbl 0x2(%r15), %eax
leal -0x1(%rax), %ecx
cmpl $0x11, %ecx
ja 0xa14f2
leaq 0x117127(%rip), %rdx # 0x1b84a4
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x14f233(%rip), %rsi # 0x1f05c7
leaq 0x14f230(%rip), %rdx # 0x1f05cb
jmp 0xa14dd
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x101eac(%rip), %rsi # 0x1a325a
leaq 0x101ea8(%rip), %rdx # 0x1a325d
jmp 0xa14dd
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x1172b1(%rip), %rsi # 0x1b8679
leaq 0x1172af(%rip), %rdx # 0x1b867e
jmp 0xa14dd
movq 0x18(%r15), %rdi
testq %rdi, %rdi
je 0xa13fd
leaq 0x98850(%rip), %rax # 0x139c34
leaq 0x18(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x8(%rsp), %rdx
movq %r15, (%rdx)
callq 0x2f19d
movb 0x2(%r15), %al
cmpb $0xb, %al
jne 0xa1425
movq %r15, %rdi
callq 0x11d7ce
movq 0x10(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0xfc467(%rip), %rsi # 0x19d87f
callq 0x1f130
testl %eax, %eax
je 0xa154c
movq %r15, %rdi
callq 0x11d7ce
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3d206
jmp 0xa14e5
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x117234(%rip), %rsi # 0x1b867f
leaq 0x117231(%rip), %rdx # 0x1b8683
jmp 0xa14dd
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x11721f(%rip), %rsi # 0x1b8684
leaq 0x117226(%rip), %rdx # 0x1b8692
jmp 0xa14dd
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0xfc1dd(%rip), %rsi # 0x19d659
leaq 0xfc1da(%rip), %rdx # 0x19d65d
jmp 0xa14dd
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0xfc1b9(%rip), %rsi # 0x19d64c
leaq 0xfc1b8(%rip), %rdx # 0x19d652
jmp 0xa14dd
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0xfc1a9(%rip), %rsi # 0x19d653
leaq 0xfc1a7(%rip), %rdx # 0x19d658
jmp 0xa14dd
movq %r15, %rdi
callq 0x11fc2c
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3d2f9
jmp 0xa14e5
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x14ea9f(%rip), %rsi # 0x1eff75
leaq 0x14ea9e(%rip), %rdx # 0x1eff7b
movq %rbx, %rdi
callq 0x250b2
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x11719a(%rip), %rdx # 0x1b8693
leaq 0x18(%rsp), %r14
movq %r14, %rdi
movl $0x3, %esi
movl $0x10a, %ecx # imm = 0x10A
callq 0x1072ba
leaq 0xfce26(%rip), %rsi # 0x19e33d
movq %r14, %rdi
callq 0x106db8
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x106e92
leaq 0x18(%rsp), %rdi
callq 0x1072d8
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0xf9065(%rip), %rdx # 0x19a5a9
movq %rbx, %rdi
movq %rdx, %rsi
jmp 0xa14e0
movq %r15, %rdi
callq 0x11d7ce
movq 0x28(%rax), %r15
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xa132e
movq 0x18(%r15), %rdi
testq %rdi, %rdi
je 0xa158d
leaq 0x986bc(%rip), %rax # 0x139c34
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x10(%rsp), %rdx
movq %r15, (%rdx)
callq 0x2f19d
movb 0x2(%r15), %al
cmpb $0x9, %al
je 0xa15c2
movq 0x18(%r15), %rdi
testq %rdi, %rdi
je 0xa15be
leaq 0x9868f(%rip), %rax # 0x139c34
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x10(%rsp), %rdx
movq %r15, (%rdx)
callq 0x2f19d
movb 0x2(%r15), %al
cmpb $0xc, %al
jne 0xa15f9
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x28(%rsp), %rcx
movq -0x10(%rcx), %rdx
cmpq %rcx, %rdx
je 0xa15e5
movq %rdx, (%rbx)
movq 0x28(%rsp), %rax
movq %rax, 0x10(%rbx)
jmp 0xa15eb
movups (%rcx), %xmm0
movups %xmm0, (%rax)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rbx)
jmp 0xa14e5
leaq 0xfc164(%rip), %rdx # 0x19d764
leaq 0x18(%rsp), %rsi
movq %rbx, %rdi
callq 0x2dd41
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa14e5
callq 0x1f4a0
jmp 0xa14e5
movq %rax, %rbx
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa1650
callq 0x1f4a0
jmp 0xa1650
jmp 0xa1643
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x1072d8
movq %rbx, %rdi
callq 0x1f860
| _ZN6google8protobuf8compiler6csharp18FieldGeneratorBase9type_nameB5cxx11EPKNS0_15FieldDescriptorE:
push r15
push r14
push rbx
sub rsp, 50h
mov r15, rdx
mov r14, rsi
mov rbx, rdi
mov rdi, [rdx+18h]
test rdi, rdi
jz short loc_A1365
lea rax, _ZN6google8protobuf15FieldDescriptor12TypeOnceInitEPKS1_; google::protobuf::FieldDescriptor::TypeOnceInit(google::protobuf::FieldDescriptor const*)
lea rsi, [rsp+68h+var_50]
mov [rsi], rax
lea rdx, [rsp+68h+var_60]
mov [rdx], r15
call _ZSt9call_onceIPFvPKN6google8protobuf15FieldDescriptorEEJS4_EEvRSt9once_flagOT_DpOT0_; std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(std::once_flag &,void (*)(google::protobuf::FieldDescriptor const*) &&,google::protobuf::FieldDescriptor const* &&)
loc_A1365:
movzx eax, byte ptr [r15+2]
lea ecx, [rax-1]; switch 18 cases
cmp ecx, 11h
ja def_A1384; jumptable 00000000000A1384 default case
lea rdx, jpt_A1384
movsxd rcx, ds:(jpt_A1384 - 1B84A4h)[rdx+rcx*4]
add rcx, rdx
jmp rcx; switch jump
loc_A1386:
lea rax, [rbx+10h]; jumptable 00000000000A1384 cases 3,16,18
mov [rbx], rax
lea rsi, aPackageNameIsT+14h; "long"
lea rdx, aPackageNameIsT+18h; ""
jmp loc_A14DD
loc_A13A0:
lea rax, [rbx+10h]; jumptable 00000000000A1384 cases 5,15,17
mov [rbx], rax
lea rsi, aInternalaccess+21h; "int"
lea rdx, aInternalaccess+24h; ""
jmp loc_A14DD
loc_A13BA:
lea rax, [rbx+10h]; jumptable 00000000000A1384 cases 4,6
mov [rbx], rax
lea rsi, aUlong; "ulong"
lea rdx, aUlong+5; ""
jmp loc_A14DD
loc_A13D4:
mov rdi, [r15+18h]; jumptable 00000000000A1384 cases 10,11
test rdi, rdi
jz short loc_A13FD
lea rax, _ZN6google8protobuf15FieldDescriptor12TypeOnceInitEPKS1_; google::protobuf::FieldDescriptor::TypeOnceInit(google::protobuf::FieldDescriptor const*)
lea rsi, [rsp+68h+var_50]
mov [rsi], rax
lea rdx, [rsp+68h+var_60]
mov [rdx], r15
call _ZSt9call_onceIPFvPKN6google8protobuf15FieldDescriptorEEJS4_EEvRSt9once_flagOT_DpOT0_; std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(std::once_flag &,void (*)(google::protobuf::FieldDescriptor const*) &&,google::protobuf::FieldDescriptor const* &&)
mov al, [r15+2]
loc_A13FD:
cmp al, 0Bh
jnz short loc_A1425
mov rdi, r15; this
call _ZNK6google8protobuf15FieldDescriptor12message_typeEv; google::protobuf::FieldDescriptor::message_type(void)
mov rax, [rax+10h]
mov rdi, [rax+8]
lea rsi, aGoogleProtobuf_10; "google/protobuf/wrappers.proto"
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_A154C
loc_A1425:
mov rdi, r15; this
call _ZNK6google8protobuf15FieldDescriptor12message_typeEv; google::protobuf::FieldDescriptor::message_type(void)
mov rdi, rbx
mov rsi, rax
call _ZN6google8protobuf8compiler6csharp12GetClassNameB5cxx11EPKNS0_10DescriptorE; google::protobuf::compiler::csharp::GetClassName(google::protobuf::Descriptor const*)
jmp loc_A14E5
loc_A143D:
lea rax, [rbx+10h]; jumptable 00000000000A1384 cases 7,13
mov [rbx], rax
lea rsi, aUint; "uint"
lea rdx, aUint+4; ""
jmp loc_A14DD
loc_A1457:
lea rax, [rbx+10h]; jumptable 00000000000A1384 case 12
mov [rbx], rax
lea rsi, aPbBytestring; "pb::ByteString"
lea rdx, aPbBytestring+0Eh; ""
jmp short loc_A14DD
loc_A146E:
lea rax, [rbx+10h]; jumptable 00000000000A1384 case 8
mov [rbx], rax
lea rsi, aBool; "bool"
lea rdx, aBool+4; ""
jmp short loc_A14DD
loc_A1485:
lea rax, [rbx+10h]; jumptable 00000000000A1384 case 1
mov [rbx], rax
lea rsi, aDouble; "double"
lea rdx, aDouble+6; ""
jmp short loc_A14DD
loc_A149C:
lea rax, [rbx+10h]; jumptable 00000000000A1384 case 2
mov [rbx], rax
lea rsi, aFloat; "float"
lea rdx, aFloat+5; ""
jmp short loc_A14DD
loc_A14B3:
mov rdi, r15; jumptable 00000000000A1384 case 14
call _ZNK6google8protobuf15FieldDescriptor9enum_typeEv; google::protobuf::FieldDescriptor::enum_type(void)
mov rdi, rbx
mov rsi, rax
call _ZN6google8protobuf8compiler6csharp12GetClassNameB5cxx11EPKNS0_14EnumDescriptorE; google::protobuf::compiler::csharp::GetClassName(google::protobuf::EnumDescriptor const*)
jmp short loc_A14E5
loc_A14C8:
lea rax, [rbx+10h]; jumptable 00000000000A1384 case 9
mov [rbx], rax
lea rsi, aCanTGetHereFai+2Fh; "string"
lea rdx, aCanTGetHereFai+35h; ""
loc_A14DD:
mov rdi, rbx
loc_A14E0:
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)
loc_A14E5:
mov rax, rbx
add rsp, 50h
pop rbx
pop r14
pop r15
retn
def_A1384:
lea rdx, aWorkspaceLlm4b_21; jumptable 00000000000A1384 default case
lea r14, [rsp+68h+var_50]
mov rdi, r14
mov esi, 3
mov ecx, 10Ah
call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int)
lea rsi, aUnknownFieldTy; "Unknown field type."
mov rdi, r14
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
lea rdi, [rsp+68h+var_60]
mov rsi, rax
call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &)
lea rdi, [rsp+68h+var_50]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
lea rax, [rbx+10h]
mov [rbx], rax
lea rdx, asc_19A5A7+2; ""
mov rdi, rbx
mov rsi, rdx
jmp short loc_A14E0
loc_A154C:
mov rdi, r15; this
call _ZNK6google8protobuf15FieldDescriptor12message_typeEv; google::protobuf::FieldDescriptor::message_type(void)
mov r15, [rax+28h]
lea rdi, [rsp+68h+var_50]
mov rsi, r14
mov rdx, r15
call _ZN6google8protobuf8compiler6csharp18FieldGeneratorBase9type_nameB5cxx11EPKNS0_15FieldDescriptorE; google::protobuf::compiler::csharp::FieldGeneratorBase::type_name(google::protobuf::FieldDescriptor const*)
mov rdi, [r15+18h]
test rdi, rdi
jz short loc_A158D
lea rax, _ZN6google8protobuf15FieldDescriptor12TypeOnceInitEPKS1_; google::protobuf::FieldDescriptor::TypeOnceInit(google::protobuf::FieldDescriptor const*)
lea rsi, [rsp+68h+var_60]
mov [rsi], rax
lea rdx, [rsp+68h+var_58]
mov [rdx], r15
call _ZSt9call_onceIPFvPKN6google8protobuf15FieldDescriptorEEJS4_EEvRSt9once_flagOT_DpOT0_; std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(std::once_flag &,void (*)(google::protobuf::FieldDescriptor const*) &&,google::protobuf::FieldDescriptor const* &&)
loc_A158D:
mov al, [r15+2]
cmp al, 9
jz short loc_A15C2
mov rdi, [r15+18h]
test rdi, rdi
jz short loc_A15BE
lea rax, _ZN6google8protobuf15FieldDescriptor12TypeOnceInitEPKS1_; google::protobuf::FieldDescriptor::TypeOnceInit(google::protobuf::FieldDescriptor const*)
lea rsi, [rsp+68h+var_60]
mov [rsi], rax
lea rdx, [rsp+68h+var_58]
mov [rdx], r15
call _ZSt9call_onceIPFvPKN6google8protobuf15FieldDescriptorEEJS4_EEvRSt9once_flagOT_DpOT0_; std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(std::once_flag &,void (*)(google::protobuf::FieldDescriptor const*) &&,google::protobuf::FieldDescriptor const* &&)
mov al, [r15+2]
loc_A15BE:
cmp al, 0Ch
jnz short loc_A15F9
loc_A15C2:
lea rax, [rbx+10h]
mov [rbx], rax
lea rcx, [rsp+68h+var_40]
mov rdx, [rcx-10h]
cmp rdx, rcx
jz short loc_A15E5
mov [rbx], rdx
mov rax, [rsp+68h+var_40]
mov [rbx+10h], rax
jmp short loc_A15EB
loc_A15E5:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rax], xmm0
loc_A15EB:
mov rax, [rsp+68h+var_48]
mov [rbx+8], rax
jmp loc_A14E5
loc_A15F9:
lea rdx, asc_19D763+1; "?"
lea rsi, [rsp+68h+var_50]
mov rdi, rbx
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*)
lea rax, [rsp+68h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz loc_A14E5
call __ZdlPv; operator delete(void *)
jmp loc_A14E5
mov rbx, rax
lea rax, [rsp+arg_20]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A1650
call __ZdlPv; operator delete(void *)
jmp short loc_A1650
jmp short $+2
loc_A1643:
mov rbx, rax
lea rdi, [rsp+arg_10]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_A1650:
mov rdi, rbx
call __Unwind_Resume
| long long google::protobuf::compiler::csharp::FieldGeneratorBase::type_name[abi:cxx11](
long long a1,
int a2,
long long a3)
{
long long v5; // rdi
char v6; // al
char *v7; // rsi
char *v8; // rdx
long long v9; // rdi
long long v10; // rax
long long v11; // rax
long long v12; // rax
long long v13; // rdi
long long v15; // rax
long long v16; // r15
int v17; // ecx
int v18; // r8d
int v19; // r9d
long long v20; // rdi
char v21; // al
long long v22; // rdi
long long ( *v23)(google::protobuf::FieldDescriptor *__hidden, const google::protobuf::FieldDescriptor *); // [rsp+8h] [rbp-60h] BYREF
long long v24; // [rsp+10h] [rbp-58h] BYREF
void *v25[2]; // [rsp+18h] [rbp-50h] BYREF
_OWORD v26[4]; // [rsp+28h] [rbp-40h] BYREF
v5 = *(_QWORD *)(a3 + 24);
if ( v5 )
{
v25[0] = google::protobuf::FieldDescriptor::TypeOnceInit;
v23 = (long long ( *)(google::protobuf::FieldDescriptor *__hidden, const google::protobuf::FieldDescriptor *))a3;
std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(
v5,
(long long)v25,
(long long)&v23);
}
v6 = *(_BYTE *)(a3 + 2);
switch ( v6 )
{
case 1:
*(_QWORD *)a1 = a1 + 16;
v7 = "double";
v8 = "";
goto LABEL_19;
case 2:
*(_QWORD *)a1 = a1 + 16;
v7 = "float";
v8 = "";
goto LABEL_19;
case 3:
case 16:
case 18:
*(_QWORD *)a1 = a1 + 16;
v7 = "long";
v8 = "";
goto LABEL_19;
case 4:
case 6:
*(_QWORD *)a1 = a1 + 16;
v7 = "ulong";
v8 = "";
goto LABEL_19;
case 5:
case 15:
case 17:
*(_QWORD *)a1 = a1 + 16;
v7 = "int";
v8 = "";
goto LABEL_19;
case 7:
case 13:
*(_QWORD *)a1 = a1 + 16;
v7 = "uint";
v8 = "";
goto LABEL_19;
case 8:
*(_QWORD *)a1 = a1 + 16;
v7 = "bool";
v8 = "";
goto LABEL_19;
case 9:
*(_QWORD *)a1 = a1 + 16;
v7 = "string";
v8 = "";
goto LABEL_19;
case 10:
case 11:
v9 = *(_QWORD *)(a3 + 24);
if ( v9 )
{
v25[0] = google::protobuf::FieldDescriptor::TypeOnceInit;
v23 = (long long ( *)(google::protobuf::FieldDescriptor *__hidden, const google::protobuf::FieldDescriptor *))a3;
std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(
v9,
(long long)v25,
(long long)&v23);
v6 = *(_BYTE *)(a3 + 2);
}
if ( v6 == 11
&& (v10 = google::protobuf::FieldDescriptor::message_type((google::protobuf::FieldDescriptor *)a3),
!(unsigned int)std::string::compare(
*(_QWORD *)(*(_QWORD *)(v10 + 16) + 8LL),
"google/protobuf/wrappers.proto")) )
{
v16 = *(_QWORD *)(google::protobuf::FieldDescriptor::message_type((google::protobuf::FieldDescriptor *)a3) + 40);
google::protobuf::compiler::csharp::FieldGeneratorBase::type_name[abi:cxx11](
(unsigned int)v25,
a2,
v16,
v17,
v18,
v19);
v20 = *(_QWORD *)(v16 + 24);
if ( v20 )
{
v23 = google::protobuf::FieldDescriptor::TypeOnceInit;
v24 = v16;
std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(
v20,
(long long)&v23,
(long long)&v24);
}
v21 = *(_BYTE *)(v16 + 2);
if ( v21 == 9 )
goto LABEL_29;
v22 = *(_QWORD *)(v16 + 24);
if ( v22 )
{
v23 = google::protobuf::FieldDescriptor::TypeOnceInit;
v24 = v16;
std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(
v22,
(long long)&v23,
(long long)&v24);
v21 = *(_BYTE *)(v16 + 2);
}
if ( v21 == 12 )
{
LABEL_29:
*(_QWORD *)a1 = a1 + 16;
if ( v25[0] == v26 )
{
*(_OWORD *)(a1 + 16) = v26[0];
}
else
{
*(void **)a1 = v25[0];
*(_QWORD *)(a1 + 16) = *(_QWORD *)&v26[0];
}
*(void **)(a1 + 8) = v25[1];
}
else
{
std::operator+<char>((_QWORD *)a1, (long long)v25, (long long)"?");
if ( v25[0] != v26 )
operator delete(v25[0]);
}
}
else
{
v11 = google::protobuf::FieldDescriptor::message_type((google::protobuf::FieldDescriptor *)a3);
google::protobuf::compiler::csharp::GetClassName[abi:cxx11](a1, v11);
}
return a1;
case 12:
*(_QWORD *)a1 = a1 + 16;
v7 = "pb::ByteString";
v8 = "";
LABEL_19:
v13 = a1;
goto LABEL_20;
case 14:
v12 = google::protobuf::FieldDescriptor::enum_type((google::protobuf::FieldDescriptor *)a3);
google::protobuf::compiler::csharp::GetClassName[abi:cxx11](a1, v12);
return a1;
default:
google::protobuf::internal::LogMessage::LogMessage(
v25,
3LL,
"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/csharp/csharp_field_base.cc",
266LL);
v15 = google::protobuf::internal::LogMessage::operator<<(v25, "Unknown field type.");
google::protobuf::internal::LogFinisher::operator=(&v23, v15);
google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v25);
*(_QWORD *)a1 = a1 + 16;
v8 = "";
v13 = a1;
v7 = "";
LABEL_20:
std::string::_M_construct<char const*>(v13, v7, (long long)v8);
return a1;
}
}
| type_name[abi:cxx11]:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
MOV RDI,qword ptr [RDX + 0x18]
TEST RDI,RDI
JZ 0x001a1365
LEA RAX,[0x239c34]
LEA RSI,[RSP + 0x18]
MOV qword ptr [RSI],RAX
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],R15
CALL 0x0012f19d
LAB_001a1365:
MOVZX EAX,byte ptr [R15 + 0x2]
LEA ECX,[RAX + -0x1]
CMP ECX,0x11
JA 0x001a14f2
LEA RDX,[0x2b84a4]
MOVSXD RCX,dword ptr [RDX + RCX*0x4]
ADD RCX,RDX
switchD:
JMP RCX
caseD_3:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RSI,[0x2f05c7]
LEA RDX,[0x2f05cb]
JMP 0x001a14dd
caseD_5:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RSI,[0x2a325a]
LEA RDX,[0x2a325d]
JMP 0x001a14dd
caseD_4:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RSI,[0x2b8679]
LEA RDX,[0x2b867e]
JMP 0x001a14dd
caseD_a:
MOV RDI,qword ptr [R15 + 0x18]
TEST RDI,RDI
JZ 0x001a13fd
LEA RAX,[0x239c34]
LEA RSI,[RSP + 0x18]
MOV qword ptr [RSI],RAX
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],R15
CALL 0x0012f19d
MOV AL,byte ptr [R15 + 0x2]
LAB_001a13fd:
CMP AL,0xb
JNZ 0x001a1425
MOV RDI,R15
CALL 0x0021d7ce
MOV RAX,qword ptr [RAX + 0x10]
MOV RDI,qword ptr [RAX + 0x8]
LEA RSI,[0x29d87f]
CALL 0x0011f130
TEST EAX,EAX
JZ 0x001a154c
LAB_001a1425:
MOV RDI,R15
CALL 0x0021d7ce
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0013d206
JMP 0x001a14e5
caseD_7:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RSI,[0x2b867f]
LEA RDX,[0x2b8683]
JMP 0x001a14dd
caseD_c:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RSI,[0x2b8684]
LEA RDX,[0x2b8692]
JMP 0x001a14dd
caseD_8:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RSI,[0x29d659]
LEA RDX,[0x29d65d]
JMP 0x001a14dd
caseD_1:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RSI,[0x29d64c]
LEA RDX,[0x29d652]
JMP 0x001a14dd
caseD_2:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RSI,[0x29d653]
LEA RDX,[0x29d658]
JMP 0x001a14dd
caseD_e:
MOV RDI,R15
CALL 0x0021fc2c
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0013d2f9
JMP 0x001a14e5
caseD_9:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RSI,[0x2eff75]
LEA RDX,[0x2eff7b]
LAB_001a14dd:
MOV RDI,RBX
LAB_001a14e0:
CALL 0x001250b2
LAB_001a14e5:
MOV RAX,RBX
ADD RSP,0x50
POP RBX
POP R14
POP R15
RET
default:
LEA RDX,[0x2b8693]
LEA R14,[RSP + 0x18]
MOV RDI,R14
MOV ESI,0x3
MOV ECX,0x10a
CALL 0x002072ba
LAB_001a1510:
LEA RSI,[0x29e33d]
MOV RDI,R14
CALL 0x00206db8
LAB_001a151f:
LEA RDI,[RSP + 0x8]
MOV RSI,RAX
CALL 0x00206e92
LAB_001a152c:
LEA RDI,[RSP + 0x18]
CALL 0x002072d8
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RDX,[0x29a5a9]
MOV RDI,RBX
MOV RSI,RDX
JMP 0x001a14e0
LAB_001a154c:
MOV RDI,R15
CALL 0x0021d7ce
MOV R15,qword ptr [RAX + 0x28]
LEA RDI,[RSP + 0x18]
MOV RSI,R14
MOV RDX,R15
CALL 0x001a132e
MOV RDI,qword ptr [R15 + 0x18]
TEST RDI,RDI
JZ 0x001a158d
LEA RAX,[0x239c34]
LEA RSI,[RSP + 0x8]
MOV qword ptr [RSI],RAX
LEA RDX,[RSP + 0x10]
MOV qword ptr [RDX],R15
LAB_001a1588:
CALL 0x0012f19d
LAB_001a158d:
MOV AL,byte ptr [R15 + 0x2]
CMP AL,0x9
JZ 0x001a15c2
MOV RDI,qword ptr [R15 + 0x18]
TEST RDI,RDI
JZ 0x001a15be
LEA RAX,[0x239c34]
LEA RSI,[RSP + 0x8]
MOV qword ptr [RSI],RAX
LEA RDX,[RSP + 0x10]
MOV qword ptr [RDX],R15
CALL 0x0012f19d
MOV AL,byte ptr [R15 + 0x2]
LAB_001a15be:
CMP AL,0xc
JNZ 0x001a15f9
LAB_001a15c2:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RBX],RAX
LEA RCX,[RSP + 0x28]
MOV RDX,qword ptr [RCX + -0x10]
CMP RDX,RCX
JZ 0x001a15e5
MOV qword ptr [RBX],RDX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RBX + 0x10],RAX
JMP 0x001a15eb
LAB_001a15e5:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RAX],XMM0
LAB_001a15eb:
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RBX + 0x8],RAX
JMP 0x001a14e5
LAB_001a15f9:
LEA RDX,[0x29d764]
LEA RSI,[RSP + 0x18]
MOV RDI,RBX
CALL 0x0012dd41
LAB_001a160d:
LEA RAX,[RSP + 0x28]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001a14e5
CALL 0x0011f4a0
JMP 0x001a14e5
|
/* google::protobuf::compiler::csharp::FieldGeneratorBase::type_name[abi:cxx11](google::protobuf::FieldDescriptor
const*) */
FieldDescriptor *
google::protobuf::compiler::csharp::FieldGeneratorBase::type_name_abi_cxx11_
(FieldDescriptor *param_1)
{
FieldDescriptor *pFVar1;
FieldDescriptor FVar2;
int iVar3;
long lVar4;
Descriptor *pDVar5;
EnumDescriptor *pEVar6;
LogMessage *pLVar7;
FieldDescriptor *in_RDX;
char *pcVar8;
char *pcVar9;
FieldDescriptor *local_60;
FieldDescriptor *local_58;
code *local_50;
int8 local_48;
int8 local_40;
int8 uStack_38;
if (*(once_flag **)(in_RDX + 0x18) != (once_flag *)0x0) {
local_50 = FieldDescriptor::TypeOnceInit;
local_60 = in_RDX;
std::
call_once<void(*)(google::protobuf::FieldDescriptor_const*),google::protobuf::FieldDescriptor_const*>
(*(once_flag **)(in_RDX + 0x18),(_func_void_FieldDescriptor_ptr *)&local_50,&local_60)
;
}
FVar2 = in_RDX[2];
switch(FVar2) {
case (FieldDescriptor)0x1:
*(FieldDescriptor **)param_1 = param_1 + 0x10;
pcVar9 = "double";
pcVar8 = "";
break;
case (FieldDescriptor)0x2:
*(FieldDescriptor **)param_1 = param_1 + 0x10;
pcVar9 = "float";
pcVar8 = "";
break;
case (FieldDescriptor)0x3:
case (FieldDescriptor)0x10:
case (FieldDescriptor)0x12:
*(FieldDescriptor **)param_1 = param_1 + 0x10;
pcVar9 = "long";
pcVar8 = "";
break;
case (FieldDescriptor)0x4:
case (FieldDescriptor)0x6:
*(FieldDescriptor **)param_1 = param_1 + 0x10;
pcVar9 = "ulong";
pcVar8 = "";
break;
case (FieldDescriptor)0x5:
case (FieldDescriptor)0xf:
case (FieldDescriptor)0x11:
*(FieldDescriptor **)param_1 = param_1 + 0x10;
pcVar9 = "int";
pcVar8 = "";
break;
case (FieldDescriptor)0x7:
case (FieldDescriptor)0xd:
*(FieldDescriptor **)param_1 = param_1 + 0x10;
pcVar9 = "uint";
pcVar8 = "";
break;
case (FieldDescriptor)0x8:
*(FieldDescriptor **)param_1 = param_1 + 0x10;
pcVar9 = "bool";
pcVar8 = "";
break;
case (FieldDescriptor)0x9:
*(FieldDescriptor **)param_1 = param_1 + 0x10;
pcVar9 = "string";
pcVar8 = "";
break;
case (FieldDescriptor)0xa:
case (FieldDescriptor)0xb:
if (*(once_flag **)(in_RDX + 0x18) != (once_flag *)0x0) {
local_50 = FieldDescriptor::TypeOnceInit;
local_60 = in_RDX;
std::
call_once<void(*)(google::protobuf::FieldDescriptor_const*),google::protobuf::FieldDescriptor_const*>
(*(once_flag **)(in_RDX + 0x18),(_func_void_FieldDescriptor_ptr *)&local_50,
&local_60);
FVar2 = in_RDX[2];
}
if (FVar2 == (FieldDescriptor)0xb) {
lVar4 = FieldDescriptor::message_type(in_RDX);
iVar3 = std::__cxx11::string::compare(*(char **)(*(long *)(lVar4 + 0x10) + 8));
if (iVar3 == 0) {
lVar4 = FieldDescriptor::message_type(in_RDX);
pFVar1 = *(FieldDescriptor **)(lVar4 + 0x28);
type_name_abi_cxx11_((FieldDescriptor *)&local_50);
if (*(once_flag **)(pFVar1 + 0x18) != (once_flag *)0x0) {
local_60 = (FieldDescriptor *)FieldDescriptor::TypeOnceInit;
local_58 = pFVar1;
/* try { // try from 001a1588 to 001a160c has its CatchHandler @ 001a1629 */
std::
call_once<void(*)(google::protobuf::FieldDescriptor_const*),google::protobuf::FieldDescriptor_const*>
(*(once_flag **)(pFVar1 + 0x18),(_func_void_FieldDescriptor_ptr *)&local_60,
&local_58);
}
FVar2 = pFVar1[2];
if (FVar2 != (FieldDescriptor)0x9) {
if (*(once_flag **)(pFVar1 + 0x18) != (once_flag *)0x0) {
local_60 = (FieldDescriptor *)FieldDescriptor::TypeOnceInit;
local_58 = pFVar1;
std::
call_once<void(*)(google::protobuf::FieldDescriptor_const*),google::protobuf::FieldDescriptor_const*>
(*(once_flag **)(pFVar1 + 0x18),(_func_void_FieldDescriptor_ptr *)&local_60,
&local_58);
FVar2 = pFVar1[2];
}
if (FVar2 != (FieldDescriptor)0xc) {
std::operator+((string *)param_1,(char *)&local_50);
if (local_50 == (code *)&local_40) {
return param_1;
}
operator_delete(local_50);
return param_1;
}
}
*(FieldDescriptor **)param_1 = param_1 + 0x10;
if (local_50 == (code *)&local_40) {
*(int8 *)(param_1 + 0x10) = local_40;
*(int8 *)(param_1 + 0x18) = uStack_38;
}
else {
*(code **)param_1 = local_50;
*(int8 *)(param_1 + 0x10) = local_40;
}
*(int8 *)(param_1 + 8) = local_48;
return param_1;
}
}
pDVar5 = (Descriptor *)FieldDescriptor::message_type(in_RDX);
GetClassName_abi_cxx11_((csharp *)param_1,pDVar5);
return param_1;
case (FieldDescriptor)0xc:
*(FieldDescriptor **)param_1 = param_1 + 0x10;
pcVar9 = "pb::ByteString";
pcVar8 = "";
break;
case (FieldDescriptor)0xe:
pEVar6 = (EnumDescriptor *)FieldDescriptor::enum_type(in_RDX);
GetClassName_abi_cxx11_((csharp *)param_1,pEVar6);
return param_1;
default:
internal::LogMessage::LogMessage
((LogMessage *)&local_50,3,
"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/csharp/csharp_field_base.cc"
,0x10a);
/* try { // try from 001a1510 to 001a151e has its CatchHandler @ 001a1643 */
pLVar7 = (LogMessage *)
internal::LogMessage::operator<<((LogMessage *)&local_50,"Unknown field type.");
/* try { // try from 001a151f to 001a152b has its CatchHandler @ 001a1641 */
internal::LogFinisher::operator=((LogFinisher *)&local_60,pLVar7);
internal::LogMessage::~LogMessage((LogMessage *)&local_50);
*(FieldDescriptor **)param_1 = param_1 + 0x10;
pcVar8 = "";
pcVar9 = pcVar8;
}
std::__cxx11::string::_M_construct<char_const*>(param_1,pcVar9,pcVar8);
return param_1;
}
| |
40,550 | minja::Context::make(minja::Value&&, std::shared_ptr<minja::Context> const&) | monkey531[P]llama/common/minja.hpp | inline std::shared_ptr<Context> Context::make(Value && values, const std::shared_ptr<Context> & parent) {
return std::make_shared<Context>(values.is_null() ? Value::object() : std::move(values), parent);
} | O3 | cpp | minja::Context::make(minja::Value&&, std::shared_ptr<minja::Context> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq 0x10(%rsi), %rdx
movq 0x20(%rsi), %rax
movq %rax, %rcx
orq %rdx, %rcx
sete %cl
cmpb $0x0, 0x40(%rsi)
movq %rdi, %rbx
sete %sil
andb %cl, %sil
movq 0x30(%r15), %rcx
testq %rcx, %rcx
sete %bpl
andb %sil, %bpl
cmpb $0x1, %bpl
jne 0x9ff0e
movl $0x30, %edi
callq 0x1ba40
movabsq $0x100000001, %rcx # imm = 0x100000001
movq %rcx, 0x8(%rax)
leaq 0x8e55c(%rip), %rcx # 0x12e438
addq $0x10, %rcx
movq %rcx, (%rax)
leaq 0x10(%rax), %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movq $0x0, 0x20(%rax)
leaq 0x10(%rsp), %rsi
movq %rax, 0x8(%rsi)
movq %rcx, (%rsi)
leaq 0x20(%rsp), %rdi
callq 0x928d6
jmp 0x9ff8a
leaq 0x40(%r15), %rdi
xorps %xmm0, %xmm0
leaq 0x60(%rsp), %r12
movaps %xmm0, -0x40(%r12)
movq %rdx, -0x30(%r12)
movq 0x18(%r15), %rdx
xorl %r13d, %r13d
movq %r13, 0x18(%r15)
movq %rdx, -0x28(%r12)
movq %r13, 0x10(%r15)
movq %rax, -0x20(%r12)
movq 0x28(%r15), %rax
movq %r13, 0x28(%r15)
movq %rax, -0x18(%r12)
movq %r13, 0x20(%r15)
movq %rcx, -0x10(%r12)
movq 0x38(%r15), %rax
movq %r13, 0x38(%r15)
movq %rax, -0x8(%r12)
movq %r13, 0x30(%r15)
movups (%rdi), %xmm0
movaps %xmm0, (%r12)
xorl %esi, %esi
callq 0x5c5ee
movb $0x0, 0x40(%r15)
movq %r13, 0x48(%r15)
movq %r12, %rdi
movl $0x1, %esi
callq 0x5c5ee
leaq 0xf(%rsp), %rsi
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rcx
callq 0xa02d4
leaq 0x60(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x5c5ee
movq %r14, %rdi
callq 0x61a6a
movq -0x8(%r14), %rdi
testq %rdi, %rdi
je 0x9ffc4
callq 0x7140a
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x9ffd3
callq 0x7140a
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x9ffe2
callq 0x7140a
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0xa0018
movq 0x8ff85(%rip), %rax # 0x12ff78
cmpb $0x0, (%rax)
je 0xa0003
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0xa000d
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0xa0018
movq (%rdi), %rax
callq *0x18(%rax)
testb %bpl, %bpl
je 0xa002c
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0xa002c
callq 0x7140a
movq %rbx, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x89da6
testb %bpl, %bpl
je 0xa005f
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0xa005f
callq 0x7140a
movq %rbx, %rdi
callq 0x1c250
nop
| _ZN5minja7Context4makeEONS_5ValueERKSt10shared_ptrIS0_E:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov r14, rdx
mov r15, rsi
mov rdx, [rsi+10h]
mov rax, [rsi+20h]
mov rcx, rax
or rcx, rdx
setz cl
cmp byte ptr [rsi+40h], 0
mov rbx, rdi
setz sil
and sil, cl
mov rcx, [r15+30h]
test rcx, rcx
setz bpl
and bpl, sil
cmp bpl, 1
jnz short loc_9FF0E
mov edi, 30h ; '0'; unsigned __int64
call __Znwm; operator new(ulong)
mov rcx, 100000001h
mov [rax+8], rcx
lea rcx, _ZTVSt23_Sp_counted_ptr_inplaceIN8nlohmann16json_abi_v3_11_311ordered_mapINS1_10basic_jsonIS2_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueESt4lessISE_ESaISt4pairIKSE_SG_EEEESaISN_ELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>,std::allocator<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>>,(__gnu_cxx::_Lock_policy)2>
add rcx, 10h
mov [rax], rcx
lea rcx, [rax+10h]
xorps xmm0, xmm0
movups xmmword ptr [rax+10h], xmm0
mov qword ptr [rax+20h], 0
lea rsi, [rsp+0A8h+var_98]
mov [rsi+8], rax
mov [rsi], rcx
lea rdi, [rsp+0A8h+var_88]
call _ZN5minja5ValueC2ERKSt10shared_ptrIN8nlohmann16json_abi_v3_11_311ordered_mapINS3_10basic_jsonIS4_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEES0_St4lessISG_ESaISt4pairIKSG_S0_EEEEE; minja::Value::Value(std::shared_ptr<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>> const&)
jmp short loc_9FF8A
loc_9FF0E:
lea rdi, [r15+40h]
xorps xmm0, xmm0
lea r12, [rsp+0A8h+var_48]
movaps xmmword ptr [r12-40h], xmm0
mov [r12-30h], rdx
mov rdx, [r15+18h]
xor r13d, r13d
mov [r15+18h], r13
mov [r12-28h], rdx
mov [r15+10h], r13
mov [r12-20h], rax
mov rax, [r15+28h]
mov [r15+28h], r13
mov [r12-18h], rax
mov [r15+20h], r13
mov [r12-10h], rcx
mov rax, [r15+38h]
mov [r15+38h], r13
mov [r12-8], rax
mov [r15+30h], r13
movups xmm0, xmmword ptr [rdi]
movaps xmmword ptr [r12], xmm0
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov byte ptr [r15+40h], 0
mov [r15+48h], r13
mov rdi, r12
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
loc_9FF8A:
lea rsi, [rsp+0A8h+var_99]
lea rdx, [rsp+0A8h+var_88]
mov rdi, rbx
mov rcx, r14
call _ZNSt12__shared_ptrIN5minja7ContextELN9__gnu_cxx12_Lock_policyE2EEC2ISaIS1_EJNS0_5ValueERKSt10shared_ptrIS1_EEEESt20_Sp_alloc_shared_tagIT_EDpOT0_; std::__shared_ptr<minja::Context,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<minja::Context>,minja::Value,std::shared_ptr<minja::Context> const&>(std::_Sp_alloc_shared_tag<std::allocator<minja::Context>>,minja::Value,std::shared_ptr<minja::Context> const&)
lea r14, [rsp+0A8h+var_48]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [r14-8]
test rdi, rdi
jz short loc_9FFC4
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9FFC4:
mov rdi, [rsp+0A8h+var_60]
test rdi, rdi
jz short loc_9FFD3
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9FFD3:
mov rdi, [rsp+0A8h+var_70]
test rdi, rdi
jz short loc_9FFE2
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9FFE2:
mov rdi, [rsp+0A8h+var_80]
test rdi, rdi
jz short loc_A0018
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_A0003
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_A000D
loc_A0003:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_A000D:
cmp eax, 1
jnz short loc_A0018
mov rax, [rdi]
call qword ptr [rax+18h]
loc_A0018:
test bpl, bpl
jz short loc_A002C
mov rdi, [rsp+0A8h+var_90]
test rdi, rdi
jz short loc_A002C
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A002C:
mov rax, rbx
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_18]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
test bpl, bpl
jz short loc_A005F
mov rdi, [rsp+arg_10]
test rdi, rdi
jz short loc_A005F
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A005F:
mov rdi, rbx
call __Unwind_Resume
| long long minja::Context::make(long long a1, long long a2, long long a3)
{
__int128 v4; // rax
long long v6; // rcx
bool v7; // bp
long long v8; // rax
volatile signed __int32 *v9; // rax
volatile signed __int32 *v10; // rax
long long v11; // rdi
signed __int32 v12; // eax
char v14; // [rsp+Fh] [rbp-99h] BYREF
long long v15; // [rsp+10h] [rbp-98h] BYREF
volatile signed __int32 *v16; // [rsp+18h] [rbp-90h]
__int128 v17; // [rsp+20h] [rbp-88h] BYREF
long long v18; // [rsp+30h] [rbp-78h]
volatile signed __int32 *v19; // [rsp+38h] [rbp-70h]
long long v20; // [rsp+40h] [rbp-68h]
volatile signed __int32 *v21; // [rsp+48h] [rbp-60h]
long long v22; // [rsp+50h] [rbp-58h]
volatile signed __int32 *v23; // [rsp+58h] [rbp-50h]
_OWORD v24[4]; // [rsp+60h] [rbp-48h] BYREF
*((_QWORD *)&v4 + 1) = *(_QWORD *)(a2 + 16);
*(_QWORD *)&v4 = *(_QWORD *)(a2 + 32);
v6 = *(_QWORD *)(a2 + 48);
v7 = v4 == 0 && *(_BYTE *)(a2 + 64) == 0 && v6 == 0;
if ( v7 )
{
v8 = operator new(0x30uLL);
*(_QWORD *)(v8 + 8) = 0x100000001LL;
*(_QWORD *)v8 = &`vtable for'std::_Sp_counted_ptr_inplace<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>,std::allocator<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>>,(__gnu_cxx::_Lock_policy)2>
+ 2;
*(_OWORD *)(v8 + 16) = 0LL;
*(_QWORD *)(v8 + 32) = 0LL;
v16 = (volatile signed __int32 *)v8;
v15 = v8 + 16;
minja::Value::Value((long long)&v17, &v15);
}
else
{
v17 = 0LL;
v18 = *((_QWORD *)&v4 + 1);
*((_QWORD *)&v4 + 1) = *(_QWORD *)(a2 + 24);
*(_QWORD *)(a2 + 24) = 0LL;
v19 = (volatile signed __int32 *)*((_QWORD *)&v4 + 1);
*(_QWORD *)(a2 + 16) = 0LL;
v20 = v4;
v9 = *(volatile signed __int32 **)(a2 + 40);
*(_QWORD *)(a2 + 40) = 0LL;
v21 = v9;
*(_QWORD *)(a2 + 32) = 0LL;
v22 = v6;
v10 = *(volatile signed __int32 **)(a2 + 56);
*(_QWORD *)(a2 + 56) = 0LL;
v23 = v10;
*(_QWORD *)(a2 + 48) = 0LL;
v24[0] = *(_OWORD *)(a2 + 64);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)(a2 + 64));
*(_BYTE *)(a2 + 64) = 0;
*(_QWORD *)(a2 + 72) = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v24);
}
std::__shared_ptr<minja::Context,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<minja::Context>,minja::Value,std::shared_ptr<minja::Context> const&>(
a1,
&v14,
&v17,
a3);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v24);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v24);
if ( v23 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v23);
if ( v21 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v21);
if ( v19 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v19);
v11 = *((_QWORD *)&v17 + 1);
if ( *((_QWORD *)&v17 + 1) )
{
if ( _libc_single_threaded )
{
v12 = *(_DWORD *)(*((_QWORD *)&v17 + 1) + 12LL);
*(_DWORD *)(*((_QWORD *)&v17 + 1) + 12LL) = v12 - 1;
}
else
{
v12 = _InterlockedExchangeAdd((volatile signed __int32 *)(*((_QWORD *)&v17 + 1) + 12LL), 0xFFFFFFFF);
}
if ( v12 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v11 + 24LL))(v11, 0LL);
}
if ( v7 && v16 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v16);
return a1;
}
| make:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x78
MOV R14,RDX
MOV R15,RSI
MOV RDX,qword ptr [RSI + 0x10]
MOV RAX,qword ptr [RSI + 0x20]
MOV RCX,RAX
OR RCX,RDX
SETZ CL
CMP byte ptr [RSI + 0x40],0x0
MOV RBX,RDI
SETZ SIL
AND SIL,CL
MOV RCX,qword ptr [R15 + 0x30]
TEST RCX,RCX
SETZ BPL
AND BPL,SIL
CMP BPL,0x1
JNZ 0x0019ff0e
MOV EDI,0x30
CALL 0x0011ba40
MOV RCX,0x100000001
MOV qword ptr [RAX + 0x8],RCX
LEA RCX,[0x22e438]
ADD RCX,0x10
MOV qword ptr [RAX],RCX
LEA RCX,[RAX + 0x10]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + 0x10],XMM0
MOV qword ptr [RAX + 0x20],0x0
LEA RSI,[RSP + 0x10]
MOV qword ptr [RSI + 0x8],RAX
MOV qword ptr [RSI],RCX
LEA RDI,[RSP + 0x20]
CALL 0x001928d6
JMP 0x0019ff8a
LAB_0019ff0e:
LEA RDI,[R15 + 0x40]
XORPS XMM0,XMM0
LEA R12,[RSP + 0x60]
MOVAPS xmmword ptr [R12 + -0x40],XMM0
MOV qword ptr [R12 + -0x30],RDX
MOV RDX,qword ptr [R15 + 0x18]
XOR R13D,R13D
MOV qword ptr [R15 + 0x18],R13
MOV qword ptr [R12 + -0x28],RDX
MOV qword ptr [R15 + 0x10],R13
MOV qword ptr [R12 + -0x20],RAX
MOV RAX,qword ptr [R15 + 0x28]
MOV qword ptr [R15 + 0x28],R13
MOV qword ptr [R12 + -0x18],RAX
MOV qword ptr [R15 + 0x20],R13
MOV qword ptr [R12 + -0x10],RCX
MOV RAX,qword ptr [R15 + 0x38]
MOV qword ptr [R15 + 0x38],R13
MOV qword ptr [R12 + -0x8],RAX
MOV qword ptr [R15 + 0x30],R13
MOVUPS XMM0,xmmword ptr [RDI]
MOVAPS xmmword ptr [R12],XMM0
XOR ESI,ESI
CALL 0x0015c5ee
MOV byte ptr [R15 + 0x40],0x0
MOV qword ptr [R15 + 0x48],R13
MOV RDI,R12
MOV ESI,0x1
CALL 0x0015c5ee
LAB_0019ff8a:
LEA RSI,[RSP + 0xf]
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV RCX,R14
CALL 0x001a02d4
LAB_0019ff9f:
LEA R14,[RSP + 0x60]
MOV RDI,R14
XOR ESI,ESI
CALL 0x0015c5ee
MOV RDI,R14
CALL 0x00161a6a
MOV RDI,qword ptr [R14 + -0x8]
TEST RDI,RDI
JZ 0x0019ffc4
CALL 0x0017140a
LAB_0019ffc4:
MOV RDI,qword ptr [RSP + 0x48]
TEST RDI,RDI
JZ 0x0019ffd3
CALL 0x0017140a
LAB_0019ffd3:
MOV RDI,qword ptr [RSP + 0x38]
TEST RDI,RDI
JZ 0x0019ffe2
CALL 0x0017140a
LAB_0019ffe2:
MOV RDI,qword ptr [RSP + 0x28]
TEST RDI,RDI
JZ 0x001a0018
MOV RAX,qword ptr [0x0022ff78]
CMP byte ptr [RAX],0x0
JZ 0x001a0003
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001a000d
LAB_001a0003:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001a000d:
CMP EAX,0x1
JNZ 0x001a0018
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001a0018:
TEST BPL,BPL
JZ 0x001a002c
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x001a002c
CALL 0x0017140a
LAB_001a002c:
MOV RAX,RBX
ADD RSP,0x78
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* minja::Context::make(minja::Value&&, std::shared_ptr<minja::Context> const&) */
Context * __thiscall minja::Context::make(Context *this,Value *param_1,shared_ptr *param_2)
{
int *piVar1;
Value VVar2;
long lVar3;
long lVar4;
long lVar5;
int iVar6;
int1 local_99;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_98;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_90;
int8 local_88;
long *plStack_80;
long local_78;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_70;
long local_68;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_60;
long local_58;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_50;
int8 local_48;
int8 uStack_40;
lVar3 = *(long *)(param_1 + 0x10);
lVar4 = *(long *)(param_1 + 0x20);
VVar2 = param_1[0x40];
lVar5 = *(long *)(param_1 + 0x30);
if (lVar5 != 0 || (VVar2 != (Value)0x0 || (lVar4 != 0 || lVar3 != 0))) {
local_88 = 0;
plStack_80 = (long *)0x0;
local_70 = *(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(param_1 + 0x18);
*(int8 *)(param_1 + 0x18) = 0;
*(int8 *)(param_1 + 0x10) = 0;
local_60 = *(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(param_1 + 0x28);
*(int8 *)(param_1 + 0x28) = 0;
*(int8 *)(param_1 + 0x20) = 0;
local_50 = *(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(param_1 + 0x38);
*(int8 *)(param_1 + 0x38) = 0;
*(int8 *)(param_1 + 0x30) = 0;
local_48 = *(int8 *)(param_1 + 0x40);
uStack_40 = *(int8 *)(param_1 + 0x48);
local_78 = lVar3;
local_68 = lVar4;
local_58 = lVar5;
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(param_1 + 0x40,0));
param_1[0x40] = (Value)0x0;
*(int8 *)(param_1 + 0x48) = 0;
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(&local_48,0));
}
else {
local_90 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)operator_new(0x30);
*(int8 *)(local_90 + 8) = 0x100000001;
*(int ***)local_90 = &PTR___Sp_counted_ptr_inplace_0022e448;
local_98 = local_90 + 0x10;
*(int8 *)(local_90 + 0x10) = 0;
*(int8 *)(local_90 + 0x18) = 0;
*(int8 *)(local_90 + 0x20) = 0;
Value::Value((Value *)&local_88,(shared_ptr *)&local_98);
}
/* try { // try from 0019ff8a to 0019ff9e has its CatchHandler @ 001a003e */
std::__shared_ptr<minja::Context,(__gnu_cxx::_Lock_policy)2>::
__shared_ptr<std::allocator<minja::Context>,minja::Value,std::shared_ptr<minja::Context>const&>
((__shared_ptr<minja::Context,(__gnu_cxx::_Lock_policy)2> *)this,&local_99,&local_88,
param_2);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81((data *)&local_48,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data((data *)&local_48);
if (local_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_50);
}
if (local_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_60);
}
if (local_70 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_70);
}
if (plStack_80 != (long *)0x0) {
if (*PTR___libc_single_threaded_0022ff78 == '\0') {
LOCK();
piVar1 = (int *)((long)plStack_80 + 0xc);
iVar6 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar6 = *(int *)((long)plStack_80 + 0xc);
*(int *)((long)plStack_80 + 0xc) = iVar6 + -1;
}
if (iVar6 == 1) {
(**(code **)(*plStack_80 + 0x18))();
}
}
if ((lVar5 == 0 && (VVar2 == (Value)0x0 && (lVar4 == 0 && lVar3 == 0))) &&
(local_90 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0)) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_90);
}
return this;
}
| |
40,551 | safe_hash_set | eloqsql/mysys/my_safehash.c | my_bool safe_hash_set(SAFE_HASH *hash, const uchar *key, uint length,
uchar *data)
{
SAFE_HASH_ENTRY *entry;
my_bool error= 0;
DBUG_ENTER("safe_hash_set");
DBUG_PRINT("enter",("key: %.*s data: %p", length, key, data));
mysql_rwlock_wrlock(&hash->mutex);
entry= (SAFE_HASH_ENTRY*) my_hash_search(&hash->hash, key, length);
if (data == hash->default_value)
{
/*
The key is to be associated with the default entry. In this case
we can just delete the entry (if it existed) from the hash as a
search will return the default entry
*/
if (!entry) /* nothing to do */
goto end;
/* unlink entry from list */
if ((*entry->prev= entry->next))
entry->next->prev= entry->prev;
my_hash_delete(&hash->hash, (uchar*) entry);
goto end;
}
if (entry)
{
/* Entry existed; Just change the pointer to point at the new data */
entry->data= data;
}
else
{
if (!(entry= (SAFE_HASH_ENTRY *) my_malloc(key_memory_SAFE_HASH_ENTRY,
sizeof(*entry) + length,
MYF(MY_WME))))
{
error= 1;
goto end;
}
entry->key= (uchar*) (entry +1);
memcpy((char*) entry->key, (char*) key, length);
entry->length= length;
entry->data= data;
/* Link entry to list */
if ((entry->next= hash->root))
entry->next->prev= &entry->next;
entry->prev= &hash->root;
hash->root= entry;
if (my_hash_insert(&hash->hash, (uchar*) entry))
{
/* This can only happen if hash got out of memory */
my_free(entry);
error= 1;
goto end;
}
}
end:
mysql_rwlock_unlock(&hash->mutex);
DBUG_RETURN(error);
} | O0 | c | safe_hash_set:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movb $0x0, -0x29(%rbp)
jmp 0xfea5d
movq -0x8(%rbp), %rdi
leaq 0x55d19(%rip), %rsi # 0x154781
movl $0xcf, %edx
callq 0xfec10
movq -0x8(%rbp), %rdi
addq $0x98, %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %eax
movl %eax, %edx
callq 0xde070
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x108(%rcx), %rax
jne 0xfeaf2
cmpq $0x0, -0x28(%rbp)
jne 0xfeaac
jmp 0xfebed
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x28(%rbp), %rcx
movq 0x20(%rcx), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
je 0xfead9
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rdi
addq $0x98, %rdi
movq -0x28(%rbp), %rsi
callq 0xdea50
jmp 0xfebed
cmpq $0x0, -0x28(%rbp)
je 0xfeb0a
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0xfebeb
leaq 0xb847c3(%rip), %rax # 0xc832d4
movl (%rax), %edi
movl -0x14(%rbp), %eax
movl %eax, %esi
addq $0x28, %rsi
movl $0x10, %edx
callq 0xf3830
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0xfeb39
movb $0x1, -0x29(%rbp)
jmp 0xfebed
movq -0x28(%rbp), %rcx
addq $0x28, %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %eax
movl %eax, %edx
callq 0x2a090
movl -0x14(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x110(%rax), %rax
movq -0x28(%rbp), %rcx
movq %rax, 0x18(%rcx)
cmpq $0x0, %rax
je 0xfeba0
movq -0x28(%rbp), %rcx
addq $0x18, %rcx
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rcx
addq $0x110, %rcx # imm = 0x110
movq -0x28(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x28(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x110(%rax)
movq -0x8(%rbp), %rdi
addq $0x98, %rdi
movq -0x28(%rbp), %rsi
callq 0xde460
cmpb $0x0, %al
je 0xfebe9
movq -0x28(%rbp), %rdi
callq 0xf3bb0
movb $0x1, -0x29(%rbp)
jmp 0xfebed
jmp 0xfebeb
jmp 0xfebed
movq -0x8(%rbp), %rdi
callq 0xfe9d0
movb -0x29(%rbp), %al
movb %al, -0x2a(%rbp)
movb -0x2a(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| safe_hash_set:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_20], rcx
mov [rbp+var_29], 0
jmp short $+2
loc_FEA5D:
mov rdi, [rbp+var_8]
lea rsi, aWorkspaceLlm4b_40; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 0CFh
call inline_mysql_rwlock_wrlock_4
mov rdi, [rbp+var_8]
add rdi, 98h
mov rsi, [rbp+var_10]
mov eax, [rbp+var_14]
mov edx, eax
call my_hash_search
mov [rbp+var_28], rax
mov rax, [rbp+var_20]
mov rcx, [rbp+var_8]
cmp rax, [rcx+108h]
jnz short loc_FEAF2
cmp [rbp+var_28], 0
jnz short loc_FEAAC
jmp loc_FEBED
loc_FEAAC:
mov rax, [rbp+var_28]
mov rax, [rax+18h]
mov rcx, [rbp+var_28]
mov rcx, [rcx+20h]
mov [rcx], rax
cmp rax, 0
jz short loc_FEAD9
mov rax, [rbp+var_28]
mov rcx, [rax+20h]
mov rax, [rbp+var_28]
mov rax, [rax+18h]
mov [rax+20h], rcx
loc_FEAD9:
mov rdi, [rbp+var_8]
add rdi, 98h
mov rsi, [rbp+var_28]
call my_hash_delete
jmp loc_FEBED
loc_FEAF2:
cmp [rbp+var_28], 0
jz short loc_FEB0A
mov rcx, [rbp+var_20]
mov rax, [rbp+var_28]
mov [rax+10h], rcx
jmp loc_FEBEB
loc_FEB0A:
lea rax, key_memory_SAFE_HASH_ENTRY
mov edi, [rax]
mov eax, [rbp+var_14]
mov esi, eax
add rsi, 28h ; '('
mov edx, 10h
call my_malloc
mov [rbp+var_28], rax
cmp rax, 0
jnz short loc_FEB39
mov [rbp+var_29], 1
jmp loc_FEBED
loc_FEB39:
mov rcx, [rbp+var_28]
add rcx, 28h ; '('
mov rax, [rbp+var_28]
mov [rax], rcx
mov rax, [rbp+var_28]
mov rdi, [rax]
mov rsi, [rbp+var_10]
mov eax, [rbp+var_14]
mov edx, eax
call _memcpy
mov ecx, [rbp+var_14]
mov rax, [rbp+var_28]
mov [rax+8], ecx
mov rcx, [rbp+var_20]
mov rax, [rbp+var_28]
mov [rax+10h], rcx
mov rax, [rbp+var_8]
mov rax, [rax+110h]
mov rcx, [rbp+var_28]
mov [rcx+18h], rax
cmp rax, 0
jz short loc_FEBA0
mov rcx, [rbp+var_28]
add rcx, 18h
mov rax, [rbp+var_28]
mov rax, [rax+18h]
mov [rax+20h], rcx
loc_FEBA0:
mov rcx, [rbp+var_8]
add rcx, 110h
mov rax, [rbp+var_28]
mov [rax+20h], rcx
mov rcx, [rbp+var_28]
mov rax, [rbp+var_8]
mov [rax+110h], rcx
mov rdi, [rbp+var_8]
add rdi, 98h
mov rsi, [rbp+var_28]
call my_hash_insert
cmp al, 0
jz short loc_FEBE9
mov rdi, [rbp+var_28]
call my_free
mov [rbp+var_29], 1
jmp short loc_FEBED
loc_FEBE9:
jmp short $+2
loc_FEBEB:
jmp short $+2
loc_FEBED:
mov rdi, [rbp+var_8]
call inline_mysql_rwlock_unlock_8
mov al, [rbp+var_29]
mov [rbp+var_2A], al
mov al, [rbp+var_2A]
add rsp, 30h
pop rbp
retn
| char safe_hash_set(long long a1, long long a2, unsigned int a3, long long a4)
{
long long v4; // rax
long long v5; // rax
char v7; // [rsp+7h] [rbp-29h]
long long v8; // [rsp+8h] [rbp-28h]
long long v9; // [rsp+8h] [rbp-28h]
v7 = 0;
inline_mysql_rwlock_wrlock_4(a1, "/workspace/llm4binary/github2025/eloqsql/mysys/my_safehash.c", 207LL);
v8 = my_hash_search(a1 + 152, a2, a3);
if ( a4 == *(_QWORD *)(a1 + 264) )
{
if ( v8 )
{
v4 = *(_QWORD *)(v8 + 24);
**(_QWORD **)(v8 + 32) = v4;
if ( v4 )
*(_QWORD *)(*(_QWORD *)(v8 + 24) + 32LL) = *(_QWORD *)(v8 + 32);
my_hash_delete(a1 + 152, v8);
}
}
else if ( v8 )
{
*(_QWORD *)(v8 + 16) = a4;
}
else
{
v9 = my_malloc(key_memory_SAFE_HASH_ENTRY, (const char *)(a3 + 40LL), 16);
if ( v9 )
{
*(_QWORD *)v9 = v9 + 40;
memcpy(*(_QWORD *)v9, a2, a3);
*(_DWORD *)(v9 + 8) = a3;
*(_QWORD *)(v9 + 16) = a4;
v5 = *(_QWORD *)(a1 + 272);
*(_QWORD *)(v9 + 24) = v5;
if ( v5 )
*(_QWORD *)(*(_QWORD *)(v9 + 24) + 32LL) = v9 + 24;
*(_QWORD *)(v9 + 32) = a1 + 272;
*(_QWORD *)(a1 + 272) = v9;
if ( my_hash_insert(a1 + 152, v9) )
{
my_free(v9);
v7 = 1;
}
}
else
{
v7 = 1;
}
}
inline_mysql_rwlock_unlock_8(a1);
return v7;
}
| safe_hash_set:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV qword ptr [RBP + -0x20],RCX
MOV byte ptr [RBP + -0x29],0x0
JMP 0x001fea5d
LAB_001fea5d:
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x254781]
MOV EDX,0xcf
CALL 0x001fec10
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x98
MOV RSI,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x14]
MOV EDX,EAX
CALL 0x001de070
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0x108]
JNZ 0x001feaf2
CMP qword ptr [RBP + -0x28],0x0
JNZ 0x001feaac
JMP 0x001febed
LAB_001feaac:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x18]
MOV RCX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RCX + 0x20]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JZ 0x001fead9
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RAX + 0x20],RCX
LAB_001fead9:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x98
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x001dea50
JMP 0x001febed
LAB_001feaf2:
CMP qword ptr [RBP + -0x28],0x0
JZ 0x001feb0a
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x10],RCX
JMP 0x001febeb
LAB_001feb0a:
LEA RAX,[0xd832d4]
MOV EDI,dword ptr [RAX]
MOV EAX,dword ptr [RBP + -0x14]
MOV ESI,EAX
ADD RSI,0x28
MOV EDX,0x10
CALL 0x001f3830
MOV qword ptr [RBP + -0x28],RAX
CMP RAX,0x0
JNZ 0x001feb39
MOV byte ptr [RBP + -0x29],0x1
JMP 0x001febed
LAB_001feb39:
MOV RCX,qword ptr [RBP + -0x28]
ADD RCX,0x28
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x14]
MOV EDX,EAX
CALL 0x0012a090
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0x8],ECX
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x110]
MOV RCX,qword ptr [RBP + -0x28]
MOV qword ptr [RCX + 0x18],RAX
CMP RAX,0x0
JZ 0x001feba0
MOV RCX,qword ptr [RBP + -0x28]
ADD RCX,0x18
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RAX + 0x20],RCX
LAB_001feba0:
MOV RCX,qword ptr [RBP + -0x8]
ADD RCX,0x110
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x20],RCX
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x110],RCX
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x98
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x001de460
CMP AL,0x0
JZ 0x001febe9
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x001f3bb0
MOV byte ptr [RBP + -0x29],0x1
JMP 0x001febed
LAB_001febe9:
JMP 0x001febeb
LAB_001febeb:
JMP 0x001febed
LAB_001febed:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001fe9d0
MOV AL,byte ptr [RBP + -0x29]
MOV byte ptr [RBP + -0x2a],AL
MOV AL,byte ptr [RBP + -0x2a]
ADD RSP,0x30
POP RBP
RET
|
int1 safe_hash_set(long param_1,void *param_2,uint param_3,long param_4)
{
long lVar1;
char cVar2;
long lVar3;
int8 *puVar4;
int1 local_31;
local_31 = 0;
inline_mysql_rwlock_wrlock
(param_1,"/workspace/llm4binary/github2025/eloqsql/mysys/my_safehash.c",0xcf);
lVar3 = my_hash_search(param_1 + 0x98,param_2,param_3);
if (param_4 == *(long *)(param_1 + 0x108)) {
if (lVar3 != 0) {
lVar1 = *(long *)(lVar3 + 0x18);
**(long **)(lVar3 + 0x20) = lVar1;
if (lVar1 != 0) {
*(int8 *)(*(long *)(lVar3 + 0x18) + 0x20) = *(int8 *)(lVar3 + 0x20);
}
my_hash_delete(param_1 + 0x98,lVar3);
}
}
else if (lVar3 == 0) {
puVar4 = (int8 *)my_malloc(key_memory_SAFE_HASH_ENTRY,(ulong)param_3 + 0x28,0x10);
if (puVar4 == (int8 *)0x0) {
local_31 = 1;
}
else {
*puVar4 = puVar4 + 5;
memcpy((void *)*puVar4,param_2,(ulong)param_3);
*(uint *)(puVar4 + 1) = param_3;
puVar4[2] = param_4;
lVar3 = *(long *)(param_1 + 0x110);
puVar4[3] = lVar3;
if (lVar3 != 0) {
*(int8 **)(puVar4[3] + 0x20) = puVar4 + 3;
}
puVar4[4] = param_1 + 0x110;
*(int8 **)(param_1 + 0x110) = puVar4;
cVar2 = my_hash_insert(param_1 + 0x98,puVar4);
if (cVar2 != '\0') {
my_free(puVar4);
local_31 = 1;
}
}
}
else {
*(long *)(lVar3 + 0x10) = param_4;
}
inline_mysql_rwlock_unlock(param_1);
return local_31;
}
| |
40,552 | set_numa_thread_affinity | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c | static void set_numa_thread_affinity(int thread_n) {
if (!ggml_is_numa()) {
return;
}
int node_num;
int rv;
size_t setsize = CPU_ALLOC_SIZE(g_state.numa.total_cpus);
switch(g_state.numa.numa_strategy) {
case GGML_NUMA_STRATEGY_DISTRIBUTE:
// run thread on node_num thread_n / (threads per node)
node_num = thread_n % g_state.numa.n_nodes;
break;
case GGML_NUMA_STRATEGY_ISOLATE:
// run thread on current_node
node_num = g_state.numa.current_node;
break;
case GGML_NUMA_STRATEGY_NUMACTL:
// use the cpuset that numactl gave us
rv = pthread_setaffinity_np(pthread_self(), setsize, &g_state.numa.cpuset);
if (rv) {
fprintf(stderr, "warning: pthread_setaffinity_np() failed: %s\n",strerror(rv));
}
return;
default:
return;
}
struct ggml_numa_node * node = &g_state.numa.nodes[node_num];
cpu_set_t * cpus = CPU_ALLOC(g_state.numa.total_cpus);
CPU_ZERO_S(setsize, cpus);
for (size_t i = 0; i < node->n_cpus; ++i) {
CPU_SET_S(node->cpus[i], setsize, cpus);
}
rv = pthread_setaffinity_np(pthread_self(), setsize, cpus);
if (rv) {
fprintf(stderr, "warning: pthread_setaffinity_np() failed: %s\n", strerror(rv));
}
CPU_FREE(cpus);
} | O0 | c | set_numa_thread_affinity:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl %edi, -0x4(%rbp)
callq 0xe6f8
testb $0x1, %al
jne 0x136d9
jmp 0x13899
movl 0x7b559(%rip), %eax # 0x8ec38
addq $0x3f, %rax
shrq $0x3, %rax
andl $-0x8, %eax
movq %rax, -0x18(%rbp)
movl 0x7751c(%rip), %eax # 0x8ac10
movl %eax, -0x44(%rbp)
subl $0x1, %eax
je 0x13712
jmp 0x136fe
movl -0x44(%rbp), %eax
subl $0x2, %eax
je 0x13722
jmp 0x13708
movl -0x44(%rbp), %eax
subl $0x3, %eax
je 0x1372d
jmp 0x13785
movl -0x4(%rbp), %eax
xorl %edx, %edx
divl 0x7b517(%rip) # 0x8ec34
movl %edx, -0x8(%rbp)
jmp 0x1378a
movl 0x7b514(%rip), %eax # 0x8ec3c
movl %eax, -0x8(%rbp)
jmp 0x1378a
callq 0xd980
movq %rax, %rdi
movq -0x18(%rbp), %rsi
leaq 0x774d0(%rip), %rdx # 0x8ac10
addq $0x4030, %rdx # imm = 0x4030
callq 0xe3a0
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x13780
movq 0x76854(%rip), %rax # 0x89fb0
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movl -0xc(%rbp), %edi
callq 0xd2c0
movq -0x50(%rbp), %rdi
movq %rax, %rdx
leaq 0x60a64(%rip), %rsi # 0x741dd
movb $0x0, %al
callq 0xdf30
jmp 0x13899
jmp 0x13899
movslq -0x8(%rbp), %rcx
leaq 0x7747b(%rip), %rax # 0x8ac10
addq $0x4, %rax
imulq $0x804, %rcx, %rcx # imm = 0x804
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movl 0x7b48b(%rip), %eax # 0x8ec38
movl %eax, %edi
callq 0xd960
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rdx
xorl %esi, %esi
callq 0xd560
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x20(%rbp), %rcx
movl 0x800(%rcx), %ecx
cmpq %rcx, %rax
jae 0x13847
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
shrq $0x3, %rax
cmpq -0x18(%rbp), %rax
jae 0x13829
movq -0x38(%rbp), %rcx
andq $0x3f, %rcx
movl $0x1, %eax
shlq %cl, %rax
movq -0x28(%rbp), %rcx
movq -0x38(%rbp), %rdx
shrq $0x6, %rdx
orq (%rcx,%rdx,8), %rax
movq %rax, (%rcx,%rdx,8)
movq %rax, -0x58(%rbp)
jmp 0x13831
xorl %eax, %eax
movq %rax, -0x58(%rbp)
jmp 0x13831
movq -0x58(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x137cf
callq 0xd980
movq %rax, %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0xe3a0
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x13890
movq 0x76744(%rip), %rax # 0x89fb0
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movl -0xc(%rbp), %edi
callq 0xd2c0
movq -0x60(%rbp), %rdi
movq %rax, %rdx
leaq 0x60954(%rip), %rsi # 0x741dd
movb $0x0, %al
callq 0xdf30
movq -0x28(%rbp), %rdi
callq 0xdeb0
addq $0x60, %rsp
popq %rbp
retq
nop
| set_numa_thread_affinity:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_4], edi
call j_ggml_is_numa
test al, 1
jnz short loc_136D9
jmp loc_13899
loc_136D9:
mov eax, cs:dword_8EC38
add rax, 3Fh ; '?'
shr rax, 3
and eax, 0FFFFFFF8h
mov [rbp+var_18], rax
mov eax, cs:g_state
mov [rbp+var_44], eax
sub eax, 1
jz short loc_13712
jmp short $+2
loc_136FE:
mov eax, [rbp+var_44]
sub eax, 2
jz short loc_13722
jmp short $+2
loc_13708:
mov eax, [rbp+var_44]
sub eax, 3
jz short loc_1372D
jmp short loc_13785
loc_13712:
mov eax, [rbp+var_4]
xor edx, edx
div cs:dword_8EC34
mov [rbp+var_8], edx
jmp short loc_1378A
loc_13722:
mov eax, cs:dword_8EC3C
mov [rbp+var_8], eax
jmp short loc_1378A
loc_1372D:
call _pthread_self
mov rdi, rax
mov rsi, [rbp+var_18]
lea rdx, g_state
add rdx, 4030h
call _pthread_setaffinity_np
mov [rbp+var_C], eax
cmp [rbp+var_C], 0
jz short loc_13780
mov rax, cs:stderr_ptr
mov rax, [rax]
mov [rbp+var_50], rax
mov edi, [rbp+var_C]
call _strerror
mov rdi, [rbp+var_50]
mov rdx, rax
lea rsi, aWarningPthread; "warning: pthread_setaffinity_np() faile"...
mov al, 0
call _fprintf
loc_13780:
jmp loc_13899
loc_13785:
jmp loc_13899
loc_1378A:
movsxd rcx, [rbp+var_8]
lea rax, g_state
add rax, 4
imul rcx, 804h
add rax, rcx
mov [rbp+var_20], rax
mov eax, cs:dword_8EC38
mov edi, eax
call ___sched_cpualloc
mov [rbp+var_28], rax
mov rdi, [rbp+var_28]
mov rdx, [rbp+var_18]
xor esi, esi
call _memset
mov [rbp+var_30], 0
loc_137CF:
mov rax, [rbp+var_30]
mov rcx, [rbp+var_20]
mov ecx, [rcx+800h]
cmp rax, rcx
jnb short loc_13847
mov rax, [rbp+var_20]
mov rcx, [rbp+var_30]
mov eax, [rax+rcx*4]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
shr rax, 3
cmp rax, [rbp+var_18]
jnb short loc_13829
mov rcx, [rbp+var_38]
and rcx, 3Fh
mov eax, 1
shl rax, cl
mov rcx, [rbp+var_28]
mov rdx, [rbp+var_38]
shr rdx, 6
or rax, [rcx+rdx*8]
mov [rcx+rdx*8], rax
mov [rbp+var_58], rax
jmp short loc_13831
loc_13829:
xor eax, eax
mov [rbp+var_58], rax
jmp short $+2
loc_13831:
mov rax, [rbp+var_58]
mov [rbp+var_40], rax
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
jmp short loc_137CF
loc_13847:
call _pthread_self
mov rdi, rax
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_28]
call _pthread_setaffinity_np
mov [rbp+var_C], eax
cmp [rbp+var_C], 0
jz short loc_13890
mov rax, cs:stderr_ptr
mov rax, [rax]
mov [rbp+var_60], rax
mov edi, [rbp+var_C]
call _strerror
mov rdi, [rbp+var_60]
mov rdx, rax
lea rsi, aWarningPthread; "warning: pthread_setaffinity_np() faile"...
mov al, 0
call _fprintf
loc_13890:
mov rdi, [rbp+var_28]
call ___sched_cpufree
loc_13899:
add rsp, 60h
pop rbp
retn
| long long set_numa_thread_affinity(unsigned int a1)
{
long long result; // rax
long long v2; // rax
const char *v3; // rax
long long v4; // rax
const char *v5; // rax
long long v6; // [rsp+0h] [rbp-60h]
long long v7; // [rsp+10h] [rbp-50h]
unsigned long long v8; // [rsp+28h] [rbp-38h]
unsigned long long i; // [rsp+30h] [rbp-30h]
long long v10; // [rsp+38h] [rbp-28h]
int *v11; // [rsp+40h] [rbp-20h]
unsigned long long v12; // [rsp+48h] [rbp-18h]
unsigned int v13; // [rsp+54h] [rbp-Ch]
unsigned int v14; // [rsp+58h] [rbp-8h]
result = j_ggml_is_numa();
if ( (result & 1) == 0 )
return result;
v12 = (((unsigned long long)(unsigned int)dword_8EC38 + 63) >> 3) & 0xFFFFFFF8;
if ( g_state[0] == 1 )
{
v14 = a1 % dword_8EC34;
}
else
{
if ( g_state[0] != 2 )
{
result = (unsigned int)(g_state[0] - 3);
if ( g_state[0] == 3 )
{
v2 = pthread_self();
result = pthread_setaffinity_np(v2, v12, &g_state[4108]);
if ( (_DWORD)result )
{
v7 = stderr;
v3 = (const char *)strerror((unsigned int)result);
return fprintf(v7, "warning: pthread_setaffinity_np() failed: %s\n", v3);
}
}
return result;
}
v14 = dword_8EC3C;
}
v11 = &g_state[513 * v14 + 1];
v10 = __sched_cpualloc((unsigned int)dword_8EC38);
memset(v10, 0LL, v12);
for ( i = 0LL; i < (unsigned int)v11[512]; ++i )
{
v8 = (unsigned int)v11[i];
if ( v8 >> 3 < v12 )
*(_QWORD *)(v10 + 8 * (v8 >> 6)) |= 1LL << (v8 & 0x3F);
}
v4 = pthread_self();
v13 = pthread_setaffinity_np(v4, v12, v10);
if ( v13 )
{
v6 = stderr;
v5 = (const char *)strerror(v13);
fprintf(v6, "warning: pthread_setaffinity_np() failed: %s\n", v5);
}
return __sched_cpufree(v10);
}
| set_numa_thread_affinity:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV dword ptr [RBP + -0x4],EDI
CALL 0x0010e6f8
TEST AL,0x1
JNZ 0x001136d9
JMP 0x00113899
LAB_001136d9:
MOV EAX,dword ptr [0x0018ec38]
ADD RAX,0x3f
SHR RAX,0x3
AND EAX,0xfffffff8
MOV qword ptr [RBP + -0x18],RAX
MOV EAX,dword ptr [0x0018ac10]
MOV dword ptr [RBP + -0x44],EAX
SUB EAX,0x1
JZ 0x00113712
JMP 0x001136fe
LAB_001136fe:
MOV EAX,dword ptr [RBP + -0x44]
SUB EAX,0x2
JZ 0x00113722
JMP 0x00113708
LAB_00113708:
MOV EAX,dword ptr [RBP + -0x44]
SUB EAX,0x3
JZ 0x0011372d
JMP 0x00113785
LAB_00113712:
MOV EAX,dword ptr [RBP + -0x4]
XOR EDX,EDX
DIV dword ptr [0x0018ec34]
MOV dword ptr [RBP + -0x8],EDX
JMP 0x0011378a
LAB_00113722:
MOV EAX,dword ptr [0x0018ec3c]
MOV dword ptr [RBP + -0x8],EAX
JMP 0x0011378a
LAB_0011372d:
CALL 0x0010d980
MOV RDI,RAX
MOV RSI,qword ptr [RBP + -0x18]
LEA RDX,[0x18ac10]
ADD RDX,0x4030
CALL 0x0010e3a0
MOV dword ptr [RBP + -0xc],EAX
CMP dword ptr [RBP + -0xc],0x0
JZ 0x00113780
MOV RAX,qword ptr [0x00189fb0]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x50],RAX
MOV EDI,dword ptr [RBP + -0xc]
CALL 0x0010d2c0
MOV RDI,qword ptr [RBP + -0x50]
MOV RDX,RAX
LEA RSI,[0x1741dd]
MOV AL,0x0
CALL 0x0010df30
LAB_00113780:
JMP 0x00113899
LAB_00113785:
JMP 0x00113899
LAB_0011378a:
MOVSXD RCX,dword ptr [RBP + -0x8]
LEA RAX,[0x18ac10]
ADD RAX,0x4
IMUL RCX,RCX,0x804
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV EAX,dword ptr [0x0018ec38]
MOV EDI,EAX
CALL 0x0010d960
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x18]
XOR ESI,ESI
CALL 0x0010d560
MOV qword ptr [RBP + -0x30],0x0
LAB_001137cf:
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RCX + 0x800]
CMP RAX,RCX
JNC 0x00113847
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
SHR RAX,0x3
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x00113829
MOV RCX,qword ptr [RBP + -0x38]
AND RCX,0x3f
MOV EAX,0x1
SHL RAX,CL
MOV RCX,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x38]
SHR RDX,0x6
OR RAX,qword ptr [RCX + RDX*0x8]
MOV qword ptr [RCX + RDX*0x8],RAX
MOV qword ptr [RBP + -0x58],RAX
JMP 0x00113831
LAB_00113829:
XOR EAX,EAX
MOV qword ptr [RBP + -0x58],RAX
JMP 0x00113831
LAB_00113831:
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001137cf
LAB_00113847:
CALL 0x0010d980
MOV RDI,RAX
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x0010e3a0
MOV dword ptr [RBP + -0xc],EAX
CMP dword ptr [RBP + -0xc],0x0
JZ 0x00113890
MOV RAX,qword ptr [0x00189fb0]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x60],RAX
MOV EDI,dword ptr [RBP + -0xc]
CALL 0x0010d2c0
MOV RDI,qword ptr [RBP + -0x60]
MOV RDX,RAX
LEA RSI,[0x1741dd]
MOV AL,0x0
CALL 0x0010df30
LAB_00113890:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x0010deb0
LAB_00113899:
ADD RSP,0x60
POP RBP
RET
|
void set_numa_thread_affinity(uint param_1)
{
uint uVar1;
FILE *pFVar2;
int iVar3;
ulong uVar4;
pthread_t pVar5;
char *pcVar6;
cpu_set_t *__cpuset;
ulong local_38;
uint local_10;
uVar4 = ggml_is_numa();
if ((uVar4 & 1) != 0) {
uVar4 = (ulong)((uint)((ulong)DAT_0018ec38 + 0x3f >> 3) & 0xfffffff8);
if (g_state == 1) {
local_10 = param_1 % DAT_0018ec34;
}
else {
if (g_state != 2) {
if (g_state != 3) {
return;
}
pVar5 = pthread_self();
iVar3 = pthread_setaffinity_np(pVar5,uVar4,(cpu_set_t *)&DAT_0018ec40);
if (iVar3 == 0) {
return;
}
pFVar2 = *(FILE **)PTR_stderr_00189fb0;
pcVar6 = strerror(iVar3);
fprintf(pFVar2,"warning: pthread_setaffinity_np() failed: %s\n",pcVar6);
return;
}
local_10 = DAT_0018ec3c;
}
__cpuset = __sched_cpualloc((ulong)DAT_0018ec38);
memset(__cpuset,0,uVar4);
for (local_38 = 0; local_38 < *(uint *)(&DAT_0018b414 + (long)(int)local_10 * 0x804);
local_38 = local_38 + 1) {
uVar1 = *(uint *)((long)(int)local_10 * 0x804 + 0x18ac14 + local_38 * 4);
if (uVar1 >> 3 < uVar4) {
__cpuset->__bits[uVar1 >> 6] = 1L << ((byte)uVar1 & 0x3f) | __cpuset->__bits[uVar1 >> 6];
}
}
pVar5 = pthread_self();
iVar3 = pthread_setaffinity_np(pVar5,uVar4,__cpuset);
if (iVar3 != 0) {
pFVar2 = *(FILE **)PTR_stderr_00189fb0;
pcVar6 = strerror(iVar3);
fprintf(pFVar2,"warning: pthread_setaffinity_np() failed: %s\n",pcVar6);
}
__sched_cpufree(__cpuset);
}
return;
}
| |
40,553 | set_numa_thread_affinity | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c | static void set_numa_thread_affinity(int thread_n) {
if (!ggml_is_numa()) {
return;
}
int node_num;
int rv;
size_t setsize = CPU_ALLOC_SIZE(g_state.numa.total_cpus);
switch(g_state.numa.numa_strategy) {
case GGML_NUMA_STRATEGY_DISTRIBUTE:
// run thread on node_num thread_n / (threads per node)
node_num = thread_n % g_state.numa.n_nodes;
break;
case GGML_NUMA_STRATEGY_ISOLATE:
// run thread on current_node
node_num = g_state.numa.current_node;
break;
case GGML_NUMA_STRATEGY_NUMACTL:
// use the cpuset that numactl gave us
rv = pthread_setaffinity_np(pthread_self(), setsize, &g_state.numa.cpuset);
if (rv) {
fprintf(stderr, "warning: pthread_setaffinity_np() failed: %s\n",strerror(rv));
}
return;
default:
return;
}
struct ggml_numa_node * node = &g_state.numa.nodes[node_num];
cpu_set_t * cpus = CPU_ALLOC(g_state.numa.total_cpus);
CPU_ZERO_S(setsize, cpus);
for (size_t i = 0; i < node->n_cpus; ++i) {
CPU_SET_S(node->cpus[i], setsize, cpus);
}
rv = pthread_setaffinity_np(pthread_self(), setsize, cpus);
if (rv) {
fprintf(stderr, "warning: pthread_setaffinity_np() failed: %s\n", strerror(rv));
}
CPU_FREE(cpus);
} | O3 | c | set_numa_thread_affinity:
pushq %rbx
movq 0x4029d(%rip), %rax # 0x48fc0
movq (%rax), %rbx
callq 0x81d0
leaq 0x2e147(%rip), %rsi # 0x36e79
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
popq %rbx
jmp 0x8830
| ggml_graph_compute_thread_cold_1:
push rbx
mov rax, cs:stderr_ptr
mov rbx, [rax]
call _strerror
lea rsi, aWarningPthread; "warning: pthread_setaffinity_np() faile"...
mov rdi, rbx
mov rdx, rax
xor eax, eax
pop rbx
jmp _fprintf
| long long ggml_graph_compute_thread_cold_1()
{
long long v0; // rbx
const char *v1; // rax
v0 = stderr;
v1 = (const char *)strerror();
return fprintf(v0, "warning: pthread_setaffinity_np() failed: %s\n", v1);
}
| ggml_graph_compute_thread.cold.1:
PUSH RBX
MOV RAX,qword ptr [0x00148fc0]
MOV RBX,qword ptr [RAX]
CALL 0x001081d0
LEA RSI,[0x136e79]
MOV RDI,RBX
MOV RDX,RAX
XOR EAX,EAX
POP RBX
JMP 0x00108830
|
void ggml_graph_compute_thread_cold_1(int param_1)
{
FILE *__stream;
char *pcVar1;
__stream = *(FILE **)PTR_stderr_00148fc0;
pcVar1 = strerror(param_1);
fprintf(__stream,"warning: pthread_setaffinity_np() failed: %s\n",pcVar1);
return;
}
| |
40,554 | my_uca_copy_page | eloqsql/strings/ctype-uca.c | static my_bool
my_uca_copy_page(MY_CHARSET_LOADER *loader,
const MY_UCA_WEIGHT_LEVEL *src,
MY_UCA_WEIGHT_LEVEL *dst,
size_t page)
{
uint chc, size= 256 * dst->lengths[page] * sizeof(uint16);
if (!(dst->weights[page]= (uint16 *) (loader->once_alloc)(size)))
return TRUE;
DBUG_ASSERT(src->lengths[page] <= dst->lengths[page]);
memset(dst->weights[page], 0, size);
for (chc=0 ; chc < 256; chc++)
{
memcpy(dst->weights[page] + chc * dst->lengths[page],
src->weights[page] + chc * src->lengths[page],
src->lengths[page] * sizeof(uint16));
}
return FALSE;
} | O0 | c | my_uca_copy_page:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x28(%rbp), %rcx
movzbl (%rax,%rcx), %eax
shll $0x8, %eax
cltq
shlq %rax
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rax
movl -0x30(%rbp), %ecx
movl %ecx, %edi
callq *%rax
movq -0x20(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq -0x28(%rbp), %rdx
movq %rax, (%rcx,%rdx,8)
cmpq $0x0, %rax
jne 0x5f604
movb $0x1, -0x1(%rbp)
jmp 0x5f6c0
jmp 0x5f606
jmp 0x5f608
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl -0x30(%rbp), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x291e0
movl $0x0, -0x2c(%rbp)
cmpl $0x100, -0x2c(%rbp) # imm = 0x100
jae 0x5f6bc
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl -0x2c(%rbp), %eax
movq -0x20(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq -0x28(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
imull %ecx, %eax
movl %eax, %eax
shlq %rax
addq %rax, %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movl -0x2c(%rbp), %eax
movq -0x18(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq -0x28(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
imull %ecx, %eax
movl %eax, %eax
shlq %rax
addq %rax, %rsi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x28(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, %edx
shlq %rdx
callq 0x29270
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x5f62b
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| my_uca_copy_page:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov rcx, [rbp+var_28]
movzx eax, byte ptr [rax+rcx]
shl eax, 8
cdqe
shl rax, 1
mov [rbp+var_30], eax
mov rax, [rbp+var_10]
mov rax, [rax+80h]
mov ecx, [rbp+var_30]
mov edi, ecx
call rax
mov rcx, [rbp+var_20]
mov rcx, [rcx+10h]
mov rdx, [rbp+var_28]
mov [rcx+rdx*8], rax
cmp rax, 0
jnz short loc_5F604
mov [rbp+var_1], 1
jmp loc_5F6C0
loc_5F604:
jmp short $+2
loc_5F606:
jmp short $+2
loc_5F608:
mov rax, [rbp+var_20]
mov rax, [rax+10h]
mov rcx, [rbp+var_28]
mov rdi, [rax+rcx*8]
mov eax, [rbp+var_30]
mov edx, eax
xor esi, esi
call _memset
mov [rbp+var_2C], 0
loc_5F62B:
cmp [rbp+var_2C], 100h
jnb loc_5F6BC
mov rax, [rbp+var_20]
mov rax, [rax+10h]
mov rcx, [rbp+var_28]
mov rdi, [rax+rcx*8]
mov eax, [rbp+var_2C]
mov rcx, [rbp+var_20]
mov rcx, [rcx+8]
mov rdx, [rbp+var_28]
movzx ecx, byte ptr [rcx+rdx]
imul eax, ecx
mov eax, eax
shl rax, 1
add rdi, rax
mov rax, [rbp+var_18]
mov rax, [rax+10h]
mov rcx, [rbp+var_28]
mov rsi, [rax+rcx*8]
mov eax, [rbp+var_2C]
mov rcx, [rbp+var_18]
mov rcx, [rcx+8]
mov rdx, [rbp+var_28]
movzx ecx, byte ptr [rcx+rdx]
imul eax, ecx
mov eax, eax
shl rax, 1
add rsi, rax
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov rcx, [rbp+var_28]
movzx eax, byte ptr [rax+rcx]
mov edx, eax
shl rdx, 1
call _memcpy
mov eax, [rbp+var_2C]
add eax, 1
mov [rbp+var_2C], eax
jmp loc_5F62B
loc_5F6BC:
mov [rbp+var_1], 0
loc_5F6C0:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
| char my_uca_copy_page(long long a1, long long a2, long long a3, long long a4)
{
long long v4; // rax
unsigned int v6; // [rsp+0h] [rbp-30h]
unsigned int i; // [rsp+4h] [rbp-2Ch]
v6 = *(unsigned __int8 *)(*(_QWORD *)(a3 + 8) + a4) << 9;
v4 = (*(long long ( **)(_QWORD))(a1 + 128))(v6);
*(_QWORD *)(*(_QWORD *)(a3 + 16) + 8 * a4) = v4;
if ( !v4 )
return 1;
memset(*(_QWORD *)(*(_QWORD *)(a3 + 16) + 8 * a4), 0LL, v6);
for ( i = 0; i < 0x100; ++i )
memcpy(
2LL * *(unsigned __int8 *)(*(_QWORD *)(a3 + 8) + a4) * i + *(_QWORD *)(*(_QWORD *)(a3 + 16) + 8 * a4),
2LL * *(unsigned __int8 *)(*(_QWORD *)(a2 + 8) + a4) * i + *(_QWORD *)(*(_QWORD *)(a2 + 16) + 8 * a4),
2LL * *(unsigned __int8 *)(*(_QWORD *)(a2 + 8) + a4));
return 0;
}
| my_uca_copy_page:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x28]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
SHL EAX,0x8
CDQE
SHL RAX,0x1
MOV dword ptr [RBP + -0x30],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x80]
MOV ECX,dword ptr [RBP + -0x30]
MOV EDI,ECX
CALL RAX
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX + 0x10]
MOV RDX,qword ptr [RBP + -0x28]
MOV qword ptr [RCX + RDX*0x8],RAX
CMP RAX,0x0
JNZ 0x0015f604
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0015f6c0
LAB_0015f604:
JMP 0x0015f606
LAB_0015f606:
JMP 0x0015f608
LAB_0015f608:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RAX + RCX*0x8]
MOV EAX,dword ptr [RBP + -0x30]
MOV EDX,EAX
XOR ESI,ESI
CALL 0x001291e0
MOV dword ptr [RBP + -0x2c],0x0
LAB_0015f62b:
CMP dword ptr [RBP + -0x2c],0x100
JNC 0x0015f6bc
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RAX + RCX*0x8]
MOV EAX,dword ptr [RBP + -0x2c]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX + 0x8]
MOV RDX,qword ptr [RBP + -0x28]
MOVZX ECX,byte ptr [RCX + RDX*0x1]
IMUL EAX,ECX
MOV EAX,EAX
SHL RAX,0x1
ADD RDI,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RAX + RCX*0x8]
MOV EAX,dword ptr [RBP + -0x2c]
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX + 0x8]
MOV RDX,qword ptr [RBP + -0x28]
MOVZX ECX,byte ptr [RCX + RDX*0x1]
IMUL EAX,ECX
MOV EAX,EAX
SHL RAX,0x1
ADD RSI,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x28]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV EDX,EAX
SHL RDX,0x1
CALL 0x00129270
MOV EAX,dword ptr [RBP + -0x2c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x0015f62b
LAB_0015f6bc:
MOV byte ptr [RBP + -0x1],0x0
LAB_0015f6c0:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 my_uca_copy_page(long param_1,long param_2,long param_3,long param_4)
{
size_t __n;
long lVar1;
int4 local_34;
int1 local_9;
__n = (long)(int)((uint)*(byte *)(*(long *)(param_3 + 8) + param_4) << 8) << 1;
lVar1 = (**(code **)(param_1 + 0x80))(__n);
*(long *)(*(long *)(param_3 + 0x10) + param_4 * 8) = lVar1;
if (lVar1 == 0) {
local_9 = 1;
}
else {
memset(*(void **)(*(long *)(param_3 + 0x10) + param_4 * 8),0,__n);
for (local_34 = 0; local_34 < 0x100; local_34 = local_34 + 1) {
memcpy((void *)(*(long *)(*(long *)(param_3 + 0x10) + param_4 * 8) +
(ulong)(local_34 * *(byte *)(*(long *)(param_3 + 8) + param_4)) * 2),
(void *)(*(long *)(*(long *)(param_2 + 0x10) + param_4 * 8) +
(ulong)(local_34 * *(byte *)(*(long *)(param_2 + 8) + param_4)) * 2),
(ulong)*(byte *)(*(long *)(param_2 + 8) + param_4) << 1);
}
local_9 = 0;
}
return local_9;
}
| |
40,555 | ggml_backend_tensor_set | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp | void ggml_backend_tensor_set(struct ggml_tensor * tensor, const void * data, size_t offset, size_t size) {
GGML_ASSERT(tensor);
ggml_backend_buffer_t buf = tensor->view_src ? tensor->view_src->buffer : tensor->buffer;
if (size == 0) {
return;
}
GGML_ASSERT(buf != NULL && "tensor buffer not set");
GGML_ASSERT(tensor->data != NULL && "tensor not allocated");
GGML_ASSERT(offset + size <= ggml_nbytes(tensor) && "tensor write out of bounds");
buf->iface.set_tensor(buf, tensor, data, offset, size);
} | O2 | cpp | ggml_backend_tensor_set:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2b6a8
movq %rcx, %rbx
movq %rdi, %r12
movq 0xe8(%rdi), %rax
testq %rax, %rax
cmoveq %rdi, %rax
testq %rcx, %rcx
je 0x2b699
movq 0x8(%rax), %r13
testq %r13, %r13
je 0x2b6c4
cmpq $0x0, 0xf8(%r12)
je 0x2b6e0
movq %rdx, %r14
movq %rsi, %r15
leaq (%rbx,%rdx), %rbp
movq %r12, %rdi
callq 0x1d300
cmpq %rax, %rbp
ja 0x2b6fc
movq 0x20(%r13), %rax
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %rbx, %r8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x260d5(%rip), %rdi # 0x51784
leaq 0x22f1f(%rip), %rdx # 0x4e5d5
leaq 0x253f8(%rip), %rcx # 0x50ab5
movl $0xff, %esi
jmp 0x2b716
leaq 0x260b9(%rip), %rdi # 0x51784
leaq 0x22f03(%rip), %rdx # 0x4e5d5
leaq 0x2624e(%rip), %rcx # 0x51927
movl $0x106, %esi # imm = 0x106
jmp 0x2b716
leaq 0x2609d(%rip), %rdi # 0x51784
leaq 0x22ee7(%rip), %rdx # 0x4e5d5
leaq 0x2617a(%rip), %rcx # 0x5186f
movl $0x107, %esi # imm = 0x107
jmp 0x2b716
leaq 0x26081(%rip), %rdi # 0x51784
leaq 0x22ecb(%rip), %rdx # 0x4e5d5
leaq 0x2618d(%rip), %rcx # 0x5189e
movl $0x108, %esi # imm = 0x108
xorl %eax, %eax
callq 0x1f9b0
| ggml_backend_tensor_set:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
test rdi, rdi
jz short loc_2B6A8
mov rbx, rcx
mov r12, rdi
mov rax, [rdi+0E8h]
test rax, rax
cmovz rax, rdi
test rcx, rcx
jz short loc_2B699
mov r13, [rax+8]
test r13, r13
jz short loc_2B6C4
cmp qword ptr [r12+0F8h], 0
jz loc_2B6E0
mov r14, rdx
mov r15, rsi
lea rbp, [rbx+rdx]
mov rdi, r12
call _ggml_nbytes
cmp rbp, rax
ja loc_2B6FC
mov rax, [r13+20h]
mov rdi, r13
mov rsi, r12
mov rdx, r15
mov rcx, r14
mov r8, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp rax
loc_2B699:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_2B6A8:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCgraphNodesCgr+26h; "tensor"
mov esi, 0FFh
jmp short loc_2B716
loc_2B6C4:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aBufNullTensorB; "buf != NULL && \"tensor buffer not set"...
mov esi, 106h
jmp short loc_2B716
loc_2B6E0:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTensorDataNull; "tensor->data != NULL && \"tensor not al"...
mov esi, 107h
jmp short loc_2B716
loc_2B6FC:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aOffsetSizeGgml; "offset + size <= ggml_nbytes(tensor) &&"...
mov esi, 108h
loc_2B716:
xor eax, eax
call _ggml_abort
| long long ggml_backend_tensor_set(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
char v14; // al
long long result; // rax
long long v17; // r13
char *v19; // rcx
int v20; // esi
char v21; // [rsp-8h] [rbp-38h]
v21 = v14;
if ( !a1 )
{
v19 = "tensor";
v20 = 255;
goto LABEL_14;
}
result = *(_QWORD *)(a1 + 232);
if ( !result )
result = a1;
if ( a4 )
{
v17 = *(_QWORD *)(result + 8);
if ( v17 )
{
if ( *(_QWORD *)(a1 + 248) )
{
if ( a4 + a3 <= ggml_nbytes((unsigned int *)a1) )
return (*(long long ( **)(long long, long long, long long, long long, long long))(v17 + 32))(
v17,
a1,
a2,
a3,
a4);
v19 = "offset + size <= ggml_nbytes(tensor) && \"tensor write out of bounds\"";
v20 = 264;
}
else
{
v19 = "tensor->data != NULL && \"tensor not allocated\"";
v20 = 263;
}
}
else
{
v19 = "buf != NULL && \"tensor buffer not set\"";
v20 = 262;
}
LABEL_14:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp",
v20,
(long long)"GGML_ASSERT(%s) failed",
(long long)v19,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v21);
}
return result;
}
| ggml_backend_tensor_set:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
TEST RDI,RDI
JZ 0x0012b6a8
MOV RBX,RCX
MOV R12,RDI
MOV RAX,qword ptr [RDI + 0xe8]
TEST RAX,RAX
CMOVZ RAX,RDI
TEST RCX,RCX
JZ 0x0012b699
MOV R13,qword ptr [RAX + 0x8]
TEST R13,R13
JZ 0x0012b6c4
CMP qword ptr [R12 + 0xf8],0x0
JZ 0x0012b6e0
MOV R14,RDX
MOV R15,RSI
LEA RBP,[RBX + RDX*0x1]
MOV RDI,R12
CALL 0x0011d300
CMP RBP,RAX
JA 0x0012b6fc
MOV RAX,qword ptr [R13 + 0x20]
MOV RDI,R13
MOV RSI,R12
MOV RDX,R15
MOV RCX,R14
MOV R8,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP RAX
LAB_0012b699:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0012b6a8:
LEA RDI,[0x151784]
LEA RDX,[0x14e5d5]
LEA RCX,[0x150ab5]
MOV ESI,0xff
JMP 0x0012b716
LAB_0012b6c4:
LEA RDI,[0x151784]
LEA RDX,[0x14e5d5]
LEA RCX,[0x151927]
MOV ESI,0x106
JMP 0x0012b716
LAB_0012b6e0:
LEA RDI,[0x151784]
LEA RDX,[0x14e5d5]
LEA RCX,[0x15186f]
MOV ESI,0x107
JMP 0x0012b716
LAB_0012b6fc:
LEA RDI,[0x151784]
LEA RDX,[0x14e5d5]
LEA RCX,[0x15189e]
MOV ESI,0x108
LAB_0012b716:
XOR EAX,EAX
CALL 0x0011f9b0
|
void ggml_backend_tensor_set(long param_1,int8 param_2,long param_3,long param_4)
{
long lVar1;
ulong uVar2;
char *pcVar3;
int8 uVar4;
if (param_1 == 0) {
pcVar3 = "tensor";
uVar4 = 0xff;
}
else {
lVar1 = *(long *)(param_1 + 0xe8);
if (*(long *)(param_1 + 0xe8) == 0) {
lVar1 = param_1;
}
if (param_4 == 0) {
return;
}
lVar1 = *(long *)(lVar1 + 8);
if (lVar1 == 0) {
pcVar3 = "buf != NULL && \"tensor buffer not set\"";
uVar4 = 0x106;
}
else if (*(long *)(param_1 + 0xf8) == 0) {
pcVar3 = "tensor->data != NULL && \"tensor not allocated\"";
uVar4 = 0x107;
}
else {
uVar2 = ggml_nbytes(param_1);
if ((ulong)(param_4 + param_3) <= uVar2) {
/* WARNING: Could not recover jumptable at 0x0012b697. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(lVar1 + 0x20))(lVar1,param_1,param_2,param_3,param_4);
return;
}
pcVar3 = "offset + size <= ggml_nbytes(tensor) && \"tensor write out of bounds\"";
uVar4 = 0x108;
}
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp"
,uVar4,"GGML_ASSERT(%s) failed",pcVar3);
}
| |
40,556 | ggml_backend_tensor_set | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp | void ggml_backend_tensor_set(struct ggml_tensor * tensor, const void * data, size_t offset, size_t size) {
GGML_ASSERT(tensor);
ggml_backend_buffer_t buf = tensor->view_src ? tensor->view_src->buffer : tensor->buffer;
if (size == 0) {
return;
}
GGML_ASSERT(buf != NULL && "tensor buffer not set");
GGML_ASSERT(tensor->data != NULL && "tensor not allocated");
GGML_ASSERT(offset + size <= ggml_nbytes(tensor) && "tensor write out of bounds");
buf->iface.set_tensor(buf, tensor, data, offset, size);
} | O3 | cpp | ggml_backend_tensor_set:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x25ae5
movq %rcx, %rbx
movq %rdi, %r12
movq 0xe8(%rdi), %rax
testq %rax, %rax
cmoveq %rdi, %rax
testq %rcx, %rcx
je 0x25ad6
movq 0x8(%rax), %r13
testq %r13, %r13
je 0x25b01
cmpq $0x0, 0xf8(%r12)
je 0x25b1d
movq %rdx, %r14
movq %rsi, %r15
leaq (%rbx,%rdx), %rbp
movq %r12, %rdi
callq 0x161c0
cmpq %rax, %rbp
ja 0x25b39
movq 0x20(%r13), %rax
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
movq %rbx, %r8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x29d28(%rip), %rdi # 0x4f814
leaq 0x26b72(%rip), %rdx # 0x4c665
leaq 0x2904b(%rip), %rcx # 0x4eb45
movl $0xff, %esi
jmp 0x25b53
leaq 0x29d0c(%rip), %rdi # 0x4f814
leaq 0x26b56(%rip), %rdx # 0x4c665
leaq 0x29ea1(%rip), %rcx # 0x4f9b7
movl $0x106, %esi # imm = 0x106
jmp 0x25b53
leaq 0x29cf0(%rip), %rdi # 0x4f814
leaq 0x26b3a(%rip), %rdx # 0x4c665
leaq 0x29dcd(%rip), %rcx # 0x4f8ff
movl $0x107, %esi # imm = 0x107
jmp 0x25b53
leaq 0x29cd4(%rip), %rdi # 0x4f814
leaq 0x26b1e(%rip), %rdx # 0x4c665
leaq 0x29de0(%rip), %rcx # 0x4f92e
movl $0x108, %esi # imm = 0x108
xorl %eax, %eax
callq 0x17cd0
| ggml_backend_tensor_set:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
test rdi, rdi
jz short loc_25AE5
mov rbx, rcx
mov r12, rdi
mov rax, [rdi+0E8h]
test rax, rax
cmovz rax, rdi
test rcx, rcx
jz short loc_25AD6
mov r13, [rax+8]
test r13, r13
jz short loc_25B01
cmp qword ptr [r12+0F8h], 0
jz loc_25B1D
mov r14, rdx
mov r15, rsi
lea rbp, [rbx+rdx]
mov rdi, r12
call _ggml_nbytes
cmp rbp, rax
ja loc_25B39
mov rax, [r13+20h]
mov rdi, r13
mov rsi, r12
mov rdx, r15
mov rcx, r14
mov r8, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp rax
loc_25AD6:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_25AE5:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aCgraphNodesCgr+26h; "tensor"
mov esi, 0FFh
jmp short loc_25B53
loc_25B01:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aBufNullTensorB; "buf != NULL && \"tensor buffer not set"...
mov esi, 106h
jmp short loc_25B53
loc_25B1D:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aTensorDataNull; "tensor->data != NULL && \"tensor not al"...
mov esi, 107h
jmp short loc_25B53
loc_25B39:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aOffsetSizeGgml; "offset + size <= ggml_nbytes(tensor) &&"...
mov esi, 108h
loc_25B53:
xor eax, eax
call _ggml_abort
| long long ggml_backend_tensor_set(long long a1, long long a2, long long a3, long long a4, int a5, int a6)
{
long long result; // rax
long long v8; // r13
char *v10; // rcx
int v11; // esi
if ( !a1 )
{
v10 = "tensor";
v11 = 255;
goto LABEL_14;
}
result = *(_QWORD *)(a1 + 232);
if ( !result )
result = a1;
if ( a4 )
{
v8 = *(_QWORD *)(result + 8);
if ( v8 )
{
if ( *(_QWORD *)(a1 + 248) )
{
if ( a4 + a3 <= ggml_nbytes((unsigned int *)a1) )
return (*(long long ( **)(long long, long long, long long, long long, long long))(v8 + 32))(v8, a1, a2, a3, a4);
v10 = "offset + size <= ggml_nbytes(tensor) && \"tensor write out of bounds\"";
v11 = 264;
}
else
{
v10 = "tensor->data != NULL && \"tensor not allocated\"";
v11 = 263;
}
}
else
{
v10 = "buf != NULL && \"tensor buffer not set\"";
v11 = 262;
}
LABEL_14:
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp",
v11,
(unsigned int)"GGML_ASSERT(%s) failed",
(_DWORD)v10,
a5,
a6);
}
return result;
}
| ggml_backend_tensor_set:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
TEST RDI,RDI
JZ 0x00125ae5
MOV RBX,RCX
MOV R12,RDI
MOV RAX,qword ptr [RDI + 0xe8]
TEST RAX,RAX
CMOVZ RAX,RDI
TEST RCX,RCX
JZ 0x00125ad6
MOV R13,qword ptr [RAX + 0x8]
TEST R13,R13
JZ 0x00125b01
CMP qword ptr [R12 + 0xf8],0x0
JZ 0x00125b1d
MOV R14,RDX
MOV R15,RSI
LEA RBP,[RBX + RDX*0x1]
MOV RDI,R12
CALL 0x001161c0
CMP RBP,RAX
JA 0x00125b39
MOV RAX,qword ptr [R13 + 0x20]
MOV RDI,R13
MOV RSI,R12
MOV RDX,R15
MOV RCX,R14
MOV R8,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP RAX
LAB_00125ad6:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00125ae5:
LEA RDI,[0x14f814]
LEA RDX,[0x14c665]
LEA RCX,[0x14eb45]
MOV ESI,0xff
JMP 0x00125b53
LAB_00125b01:
LEA RDI,[0x14f814]
LEA RDX,[0x14c665]
LEA RCX,[0x14f9b7]
MOV ESI,0x106
JMP 0x00125b53
LAB_00125b1d:
LEA RDI,[0x14f814]
LEA RDX,[0x14c665]
LEA RCX,[0x14f8ff]
MOV ESI,0x107
JMP 0x00125b53
LAB_00125b39:
LEA RDI,[0x14f814]
LEA RDX,[0x14c665]
LEA RCX,[0x14f92e]
MOV ESI,0x108
LAB_00125b53:
XOR EAX,EAX
CALL 0x00117cd0
|
void ggml_backend_tensor_set(long param_1,int8 param_2,long param_3,long param_4)
{
long lVar1;
ulong uVar2;
char *pcVar3;
int8 uVar4;
if (param_1 == 0) {
pcVar3 = "tensor";
uVar4 = 0xff;
}
else {
lVar1 = *(long *)(param_1 + 0xe8);
if (*(long *)(param_1 + 0xe8) == 0) {
lVar1 = param_1;
}
if (param_4 == 0) {
return;
}
lVar1 = *(long *)(lVar1 + 8);
if (lVar1 == 0) {
pcVar3 = "buf != NULL && \"tensor buffer not set\"";
uVar4 = 0x106;
}
else if (*(long *)(param_1 + 0xf8) == 0) {
pcVar3 = "tensor->data != NULL && \"tensor not allocated\"";
uVar4 = 0x107;
}
else {
uVar2 = ggml_nbytes(param_1);
if ((ulong)(param_4 + param_3) <= uVar2) {
/* WARNING: Could not recover jumptable at 0x00125ad4. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(lVar1 + 0x20))(lVar1,param_1,param_2,param_3,param_4);
return;
}
pcVar3 = "offset + size <= ggml_nbytes(tensor) && \"tensor write out of bounds\"";
uVar4 = 0x108;
}
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-backend.cpp"
,uVar4,"GGML_ASSERT(%s) failed",pcVar3);
}
| |
40,557 | my_strnxfrm_latin1_de | eloqsql/strings/ctype-latin1.c | static size_t
my_strnxfrm_latin1_de(CHARSET_INFO *cs,
uchar *dst, size_t dstlen, uint nweights,
const uchar* src, size_t srclen, uint flags)
{
uchar *de= dst + dstlen;
const uchar *se= src + srclen;
uchar *d0= dst;
for ( ; src < se && dst < de && nweights; src++, nweights--)
{
uchar chr= combo1map[*src];
*dst++= chr;
if ((chr= combo2map[*src]) && dst < de && nweights > 1)
{
*dst++= chr;
nweights--;
}
}
return my_strxfrm_pad_desc_and_reverse(cs, d0, dst, de, nweights, flags, 0);
} | O0 | c | my_strnxfrm_latin1_de:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rcx
xorl %eax, %eax
cmpq -0x40(%rbp), %rcx
movb %al, -0x4a(%rbp)
jae 0x3fd2a
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq -0x38(%rbp), %rcx
movb %al, -0x4a(%rbp)
jae 0x3fd2a
cmpl $0x0, -0x1c(%rbp)
setne %al
movb %al, -0x4a(%rbp)
movb -0x4a(%rbp), %al
testb $0x1, %al
jne 0x3fd36
jmp 0x3fdc7
movq -0x28(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0xfed0a(%rip), %rax # 0x13ea50
movb (%rax,%rcx), %al
movb %al, -0x49(%rbp)
movb -0x49(%rbp), %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movq -0x28(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0xfede0(%rip), %rax # 0x13eb50
movb (%rax,%rcx), %al
movb %al, -0x49(%rbp)
movzbl %al, %eax
cmpl $0x0, %eax
je 0x3fdab
movq -0x10(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x3fdab
cmpl $0x1, -0x1c(%rbp)
jbe 0x3fdab
movb -0x49(%rbp), %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x3fdad
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x3fd02
movq -0x8(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x38(%rbp), %rcx
movl -0x1c(%rbp), %r8d
movl 0x10(%rbp), %r9d
xorl %eax, %eax
movl $0x0, (%rsp)
callq 0x42dd0
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| my_strnxfrm_latin1_de:
push rbp
mov rbp, rsp
sub rsp, 60h
mov eax, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_38], rax
mov rax, [rbp+var_28]
add rax, [rbp+var_30]
mov [rbp+var_40], rax
mov rax, [rbp+var_10]
mov [rbp+var_48], rax
loc_3FD02:
mov rcx, [rbp+var_28]
xor eax, eax
cmp rcx, [rbp+var_40]
mov [rbp+var_4A], al
jnb short loc_3FD2A
mov rcx, [rbp+var_10]
xor eax, eax
cmp rcx, [rbp+var_38]
mov [rbp+var_4A], al
jnb short loc_3FD2A
cmp [rbp+var_1C], 0
setnz al
mov [rbp+var_4A], al
loc_3FD2A:
mov al, [rbp+var_4A]
test al, 1
jnz short loc_3FD36
jmp loc_3FDC7
loc_3FD36:
mov rax, [rbp+var_28]
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, combo1map
mov al, [rax+rcx]
mov [rbp+var_49], al
mov cl, [rbp+var_49]
mov rax, [rbp+var_10]
mov rdx, rax
add rdx, 1
mov [rbp+var_10], rdx
mov [rax], cl
mov rax, [rbp+var_28]
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, combo2map
mov al, [rax+rcx]
mov [rbp+var_49], al
movzx eax, al
cmp eax, 0
jz short loc_3FDAB
mov rax, [rbp+var_10]
cmp rax, [rbp+var_38]
jnb short loc_3FDAB
cmp [rbp+var_1C], 1
jbe short loc_3FDAB
mov cl, [rbp+var_49]
mov rax, [rbp+var_10]
mov rdx, rax
add rdx, 1
mov [rbp+var_10], rdx
mov [rax], cl
mov eax, [rbp+var_1C]
add eax, 0FFFFFFFFh
mov [rbp+var_1C], eax
loc_3FDAB:
jmp short $+2
loc_3FDAD:
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
mov eax, [rbp+var_1C]
add eax, 0FFFFFFFFh
mov [rbp+var_1C], eax
jmp loc_3FD02
loc_3FDC7:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_48]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_38]
mov r8d, [rbp+var_1C]
mov r9d, [rbp+arg_0]
xor eax, eax
mov [rsp+60h+var_60], 0
call my_strxfrm_pad_desc_and_reverse
add rsp, 60h
pop rbp
retn
| long long my_strnxfrm_latin1_de(
int a1,
unsigned __int8 *a2,
long long a3,
unsigned int a4,
unsigned __int8 *a5,
long long a6,
int a7)
{
unsigned __int8 *v7; // rax
unsigned __int8 *v8; // rax
bool v10; // [rsp+16h] [rbp-4Ah]
unsigned __int8 v11; // [rsp+17h] [rbp-49h]
unsigned long long v12; // [rsp+28h] [rbp-38h]
unsigned __int8 *v13; // [rsp+38h] [rbp-28h]
unsigned __int8 *v15; // [rsp+50h] [rbp-10h]
v15 = a2;
v13 = a5;
v12 = (unsigned long long)&a2[a3];
while ( 1 )
{
v10 = 0;
if ( v13 < &a5[a6] )
{
v10 = 0;
if ( (unsigned long long)v15 < v12 )
v10 = a4 != 0;
}
if ( !v10 )
break;
v7 = v15++;
*v7 = combo1map[*v13];
v11 = combo2map[*v13];
if ( v11 && (unsigned long long)v15 < v12 && a4 > 1 )
{
v8 = v15++;
*v8 = v11;
--a4;
}
++v13;
--a4;
}
return my_strxfrm_pad_desc_and_reverse(a1, (_DWORD)a2, (_DWORD)v15, v12, a4, a7, 0);
}
| my_strnxfrm_latin1_de:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV EAX,dword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x48],RAX
LAB_0013fd02:
MOV RCX,qword ptr [RBP + -0x28]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x40]
MOV byte ptr [RBP + -0x4a],AL
JNC 0x0013fd2a
MOV RCX,qword ptr [RBP + -0x10]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x38]
MOV byte ptr [RBP + -0x4a],AL
JNC 0x0013fd2a
CMP dword ptr [RBP + -0x1c],0x0
SETNZ AL
MOV byte ptr [RBP + -0x4a],AL
LAB_0013fd2a:
MOV AL,byte ptr [RBP + -0x4a]
TEST AL,0x1
JNZ 0x0013fd36
JMP 0x0013fdc7
LAB_0013fd36:
MOV RAX,qword ptr [RBP + -0x28]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x23ea50]
MOV AL,byte ptr [RAX + RCX*0x1]
MOV byte ptr [RBP + -0x49],AL
MOV CL,byte ptr [RBP + -0x49]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x10],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x28]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x23eb50]
MOV AL,byte ptr [RAX + RCX*0x1]
MOV byte ptr [RBP + -0x49],AL
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x0013fdab
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x38]
JNC 0x0013fdab
CMP dword ptr [RBP + -0x1c],0x1
JBE 0x0013fdab
MOV CL,byte ptr [RBP + -0x49]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x10],RDX
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x1c],EAX
LAB_0013fdab:
JMP 0x0013fdad
LAB_0013fdad:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x0013fd02
LAB_0013fdc7:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x38]
MOV R8D,dword ptr [RBP + -0x1c]
MOV R9D,dword ptr [RBP + 0x10]
XOR EAX,EAX
MOV dword ptr [RSP],0x0
CALL 0x00142dd0
ADD RSP,0x60
POP RBP
RET
|
void my_strnxfrm_latin1_de
(int8 param_1,char *param_2,long param_3,uint param_4,byte *param_5,
long param_6,int4 param_7)
{
char *pcVar1;
char *pcVar2;
bool bVar3;
byte *local_30;
uint local_24;
char *local_18;
pcVar1 = param_2 + param_3;
local_30 = param_5;
local_24 = param_4;
local_18 = param_2;
while( true ) {
bVar3 = false;
if ((local_30 < param_5 + param_6) && (bVar3 = false, local_18 < pcVar1)) {
bVar3 = local_24 != 0;
}
if (!bVar3) break;
pcVar2 = local_18 + 1;
*local_18 = combo1map[*local_30];
if (((combo2map[*local_30] != '\0') && (pcVar2 < pcVar1)) && (1 < local_24)) {
*pcVar2 = combo2map[*local_30];
local_24 = local_24 - 1;
pcVar2 = local_18 + 2;
}
local_18 = pcVar2;
local_30 = local_30 + 1;
local_24 = local_24 - 1;
}
my_strxfrm_pad_desc_and_reverse(param_1,param_2,local_18,pcVar1,local_24,param_7,0);
return;
}
| |
40,558 | ggml_compute_forward_silu_f32(ggml_compute_params const*, ggml_tensor*) | ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp | static void ggml_compute_forward_silu_f32(
const ggml_compute_params * params,
ggml_tensor * dst) {
const ggml_tensor * src0 = dst->src[0];
assert(ggml_is_contiguous_1(src0));
assert(ggml_is_contiguous_1(dst));
assert(ggml_are_same_shape(src0, dst));
const int ith = params->ith;
const int nth = params->nth;
const int nc = src0->ne[0];
const int nr = ggml_nrows(src0);
// rows per thread
const int dr = (nr + nth - 1)/nth;
// row range for this thread
const int ir0 = dr*ith;
const int ir1 = MIN(ir0 + dr, nr);
for (int i1 = ir0; i1 < ir1; i1++) {
ggml_vec_silu_f32(nc,
(float *) ((char *) dst->data + i1*( dst->nb[1])),
(float *) ((char *) src0->data + i1*(src0->nb[1])));
#ifndef NDEBUG
for (int k = 0; k < nc; k++) {
const float x = ((float *) ((char *) dst->data + i1*(dst->nb[1])))[k];
GGML_UNUSED(x);
assert(!isnan(x));
assert(!isinf(x));
}
#endif
}
} | O0 | cpp | ggml_compute_forward_silu_f32(ggml_compute_params const*, ggml_tensor*):
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq 0x38(%rsp), %rax
movq 0x98(%rax), %rax
movq %rax, 0x30(%rsp)
movq 0x40(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x2c(%rsp)
movq 0x40(%rsp), %rax
movl 0x4(%rax), %eax
movl %eax, 0x28(%rsp)
movq 0x30(%rsp), %rax
movq 0x10(%rax), %rax
movl %eax, 0x24(%rsp)
movq 0x30(%rsp), %rdi
callq 0xfee0
movl %eax, 0x20(%rsp)
movl 0x20(%rsp), %eax
addl 0x28(%rsp), %eax
subl $0x1, %eax
cltd
idivl 0x28(%rsp)
movl %eax, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
imull 0x2c(%rsp), %eax
movl %eax, 0x18(%rsp)
movl 0x18(%rsp), %eax
addl 0x1c(%rsp), %eax
cmpl 0x20(%rsp), %eax
jge 0xaa2ae
movl 0x18(%rsp), %eax
addl 0x1c(%rsp), %eax
movl %eax, 0xc(%rsp)
jmp 0xaa2b6
movl 0x20(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
movl %eax, 0x14(%rsp)
movl 0x18(%rsp), %eax
movl %eax, 0x10(%rsp)
movl 0x10(%rsp), %eax
cmpl 0x14(%rsp), %eax
jge 0xaa322
movl 0x24(%rsp), %edi
movq 0x38(%rsp), %rax
movq 0xf8(%rax), %rsi
movslq 0x10(%rsp), %rax
movq 0x38(%rsp), %rcx
imulq 0x38(%rcx), %rax
addq %rax, %rsi
movq 0x30(%rsp), %rax
movq 0xf8(%rax), %rdx
movslq 0x10(%rsp), %rax
movq 0x30(%rsp), %rcx
imulq 0x38(%rcx), %rax
addq %rax, %rdx
callq 0xff10
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0xaa2c6
addq $0x48, %rsp
retq
nopw (%rax,%rax)
| _ZL29ggml_compute_forward_silu_f32PK19ggml_compute_paramsP11ggml_tensor:
sub rsp, 48h
mov [rsp+48h+var_8], rdi
mov [rsp+48h+var_10], rsi
mov rax, [rsp+48h+var_10]
mov rax, [rax+98h]
mov [rsp+48h+var_18], rax
mov rax, [rsp+48h+var_8]
mov eax, [rax]
mov [rsp+48h+var_1C], eax
mov rax, [rsp+48h+var_8]
mov eax, [rax+4]
mov [rsp+48h+var_20], eax
mov rax, [rsp+48h+var_18]
mov rax, [rax+10h]
mov [rsp+48h+var_24], eax
mov rdi, [rsp+48h+var_18]
call _ggml_nrows
mov [rsp+48h+var_28], eax
mov eax, [rsp+48h+var_28]
add eax, [rsp+48h+var_20]
sub eax, 1
cdq
idiv [rsp+48h+var_20]
mov [rsp+48h+var_2C], eax
mov eax, [rsp+48h+var_2C]
imul eax, [rsp+48h+var_1C]
mov [rsp+48h+var_30], eax
mov eax, [rsp+48h+var_30]
add eax, [rsp+48h+var_2C]
cmp eax, [rsp+48h+var_28]
jge short loc_AA2AE
mov eax, [rsp+48h+var_30]
add eax, [rsp+48h+var_2C]
mov [rsp+48h+var_3C], eax
jmp short loc_AA2B6
loc_AA2AE:
mov eax, [rsp+48h+var_28]
mov [rsp+48h+var_3C], eax
loc_AA2B6:
mov eax, [rsp+48h+var_3C]
mov [rsp+48h+var_34], eax
mov eax, [rsp+48h+var_30]
mov [rsp+48h+var_38], eax
loc_AA2C6:
mov eax, [rsp+48h+var_38]
cmp eax, [rsp+48h+var_34]
jge short loc_AA322
mov edi, [rsp+48h+var_24]
mov rax, [rsp+48h+var_10]
mov rsi, [rax+0F8h]
movsxd rax, [rsp+48h+var_38]
mov rcx, [rsp+48h+var_10]
imul rax, [rcx+38h]
add rsi, rax
mov rax, [rsp+48h+var_18]
mov rdx, [rax+0F8h]
movsxd rax, [rsp+48h+var_38]
mov rcx, [rsp+48h+var_18]
imul rax, [rcx+38h]
add rdx, rax
call _ggml_vec_silu_f32
mov eax, [rsp+48h+var_38]
add eax, 1
mov [rsp+48h+var_38], eax
jmp short loc_AA2C6
loc_AA322:
add rsp, 48h
retn
| long long ggml_compute_forward_silu_f32(int *a1, _QWORD *a2)
{
long long result; // rax
int v3; // [rsp+Ch] [rbp-3Ch]
int i; // [rsp+10h] [rbp-38h]
int v5; // [rsp+1Ch] [rbp-2Ch]
int v6; // [rsp+20h] [rbp-28h]
int v7; // [rsp+24h] [rbp-24h]
int v8; // [rsp+28h] [rbp-20h]
int v9; // [rsp+2Ch] [rbp-1Ch]
_QWORD *v10; // [rsp+30h] [rbp-18h]
v10 = (_QWORD *)a2[19];
v9 = *a1;
v8 = a1[1];
v7 = v10[2];
v6 = ggml_nrows(v10);
v5 = (v8 + v6 - 1) / v8;
if ( v5 + v9 * v5 >= v6 )
v3 = v6;
else
v3 = v5 + v9 * v5;
for ( i = v9 * v5; ; ++i )
{
result = (unsigned int)i;
if ( i >= v3 )
break;
ggml_vec_silu_f32(v7, a2[7] * i + a2[31], v10[7] * i + v10[31]);
}
return result;
}
| ggml_compute_forward_silu_f32:
SUB RSP,0x48
MOV qword ptr [RSP + 0x40],RDI
MOV qword ptr [RSP + 0x38],RSI
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX + 0x98]
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [RSP + 0x40]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0x2c],EAX
MOV RAX,qword ptr [RSP + 0x40]
MOV EAX,dword ptr [RAX + 0x4]
MOV dword ptr [RSP + 0x28],EAX
MOV RAX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RAX + 0x10]
MOV dword ptr [RSP + 0x24],EAX
MOV RDI,qword ptr [RSP + 0x30]
CALL 0x0010fee0
MOV dword ptr [RSP + 0x20],EAX
MOV EAX,dword ptr [RSP + 0x20]
ADD EAX,dword ptr [RSP + 0x28]
SUB EAX,0x1
CDQ
IDIV dword ptr [RSP + 0x28]
MOV dword ptr [RSP + 0x1c],EAX
MOV EAX,dword ptr [RSP + 0x1c]
IMUL EAX,dword ptr [RSP + 0x2c]
MOV dword ptr [RSP + 0x18],EAX
MOV EAX,dword ptr [RSP + 0x18]
ADD EAX,dword ptr [RSP + 0x1c]
CMP EAX,dword ptr [RSP + 0x20]
JGE 0x001aa2ae
MOV EAX,dword ptr [RSP + 0x18]
ADD EAX,dword ptr [RSP + 0x1c]
MOV dword ptr [RSP + 0xc],EAX
JMP 0x001aa2b6
LAB_001aa2ae:
MOV EAX,dword ptr [RSP + 0x20]
MOV dword ptr [RSP + 0xc],EAX
LAB_001aa2b6:
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [RSP + 0x14],EAX
MOV EAX,dword ptr [RSP + 0x18]
MOV dword ptr [RSP + 0x10],EAX
LAB_001aa2c6:
MOV EAX,dword ptr [RSP + 0x10]
CMP EAX,dword ptr [RSP + 0x14]
JGE 0x001aa322
MOV EDI,dword ptr [RSP + 0x24]
MOV RAX,qword ptr [RSP + 0x38]
MOV RSI,qword ptr [RAX + 0xf8]
MOVSXD RAX,dword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x38]
IMUL RAX,qword ptr [RCX + 0x38]
ADD RSI,RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RAX + 0xf8]
MOVSXD RAX,dword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x30]
IMUL RAX,qword ptr [RCX + 0x38]
ADD RDX,RAX
CALL 0x0010ff10
MOV EAX,dword ptr [RSP + 0x10]
ADD EAX,0x1
MOV dword ptr [RSP + 0x10],EAX
JMP 0x001aa2c6
LAB_001aa322:
ADD RSP,0x48
RET
|
/* ggml_compute_forward_silu_f32(ggml_compute_params const*, ggml_tensor*) */
void ggml_compute_forward_silu_f32(ggml_compute_params *param_1,ggml_tensor *param_2)
{
long lVar1;
int8 uVar2;
int iVar3;
int local_3c;
int local_38;
lVar1 = *(long *)(param_2 + 0x98);
local_38 = *(int *)param_1;
iVar3 = *(int *)(param_1 + 4);
uVar2 = *(int8 *)(lVar1 + 0x10);
local_3c = ggml_nrows(lVar1);
iVar3 = (local_3c + iVar3 + -1) / iVar3;
local_38 = iVar3 * local_38;
if (local_38 + iVar3 < local_3c) {
local_3c = local_38 + iVar3;
}
for (; local_38 < local_3c; local_38 = local_38 + 1) {
ggml_vec_silu_f32((int)uVar2,
*(long *)(param_2 + 0xf8) + (long)local_38 * *(long *)(param_2 + 0x38),
*(long *)(lVar1 + 0xf8) + (long)local_38 * *(long *)(lVar1 + 0x38));
}
return;
}
| |
40,559 | close_cached_file | eloqsql/mysys/mf_cache.c | void close_cached_file(IO_CACHE *cache)
{
DBUG_ENTER("close_cached_file");
if (my_b_inited(cache))
{
File file=cache->file;
cache->file= -1; /* Don't flush data */
(void) end_io_cache(cache);
if (file >= 0)
{
(void) my_close(file,MYF(0));
#ifdef CANT_DELETE_OPEN_FILES
if (cache->file_name)
{
(void) my_delete(cache->file_name, MYF(MY_WME));
my_free(cache->file_name);
}
#endif
}
}
DBUG_VOID_RETURN;
} | O3 | c | close_cached_file:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpq $0x0, 0x20(%rdi)
je 0xaf809
movl 0xd4(%rdi), %ebx
movl $0xffffffff, 0xd4(%rdi) # imm = 0xFFFFFFFF
callq 0x99f67
testl %ebx, %ebx
js 0xaf809
movl %ebx, %edi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xa6bb9
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| close_cached_file:
push rbp
mov rbp, rsp
push rbx
push rax
cmp qword ptr [rdi+20h], 0
jz short loc_AF809
mov ebx, [rdi+0D4h]
mov dword ptr [rdi+0D4h], 0FFFFFFFFh
call end_io_cache
test ebx, ebx
js short loc_AF809
mov edi, ebx
xor esi, esi
add rsp, 8
pop rbx
pop rbp
jmp my_close
loc_AF809:
add rsp, 8
pop rbx
pop rbp
retn
| long long close_cached_file(long long a1)
{
int v1; // ebx
long long result; // rax
if ( *(_QWORD *)(a1 + 32) )
{
v1 = *(_DWORD *)(a1 + 212);
*(_DWORD *)(a1 + 212) = -1;
result = end_io_cache(a1);
if ( v1 >= 0 )
return my_close((unsigned int)v1, 0);
}
return result;
}
| close_cached_file:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
CMP qword ptr [RDI + 0x20],0x0
JZ 0x001af809
MOV EBX,dword ptr [RDI + 0xd4]
MOV dword ptr [RDI + 0xd4],0xffffffff
CALL 0x00199f67
TEST EBX,EBX
JS 0x001af809
MOV EDI,EBX
XOR ESI,ESI
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x001a6bb9
LAB_001af809:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void close_cached_file(long param_1)
{
int iVar1;
if (*(long *)(param_1 + 0x20) != 0) {
iVar1 = *(int *)(param_1 + 0xd4);
*(int4 *)(param_1 + 0xd4) = 0xffffffff;
end_io_cache();
if (-1 < iVar1) {
my_close(iVar1,0);
return;
}
}
return;
}
| |
40,560 | cmp_users | eloqsql/plugin/server_audit/server_audit.c | static int cmp_users(const void *ia, const void *ib)
{
const struct user_name *a= (const struct user_name *) ia;
const struct user_name *b= (const struct user_name *) ib;
int dl= (int)(a->name_len - b->name_len);
if (dl != 0)
return dl;
return strncmp(a->name, b->name, a->name_len);
} | O3 | c | cmp_users:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rdx
movl (%rsi), %ecx
movl %edx, %eax
subl %ecx, %eax
je 0x5de8
popq %rbp
retq
movq 0x8(%rdi), %rdi
movq 0x8(%rsi), %rsi
popq %rbp
jmp 0x3070
| cmp_users:
push rbp
mov rbp, rsp
mov rdx, [rdi]
mov ecx, [rsi]
mov eax, edx
sub eax, ecx
jz short loc_5DE8
pop rbp
retn
loc_5DE8:
mov rdi, [rdi+8]
mov rsi, [rsi+8]
pop rbp
jmp _strncmp
| long long cmp_users(_QWORD *a1, long long a2)
{
long long result; // rax
result = (unsigned int)*a1 - *(_DWORD *)a2;
if ( !(_DWORD)result )
return strncmp(a1[1], *(_QWORD *)(a2 + 8), *a1);
return result;
}
| cmp_users:
PUSH RBP
MOV RBP,RSP
MOV RDX,qword ptr [RDI]
MOV ECX,dword ptr [RSI]
MOV EAX,EDX
SUB EAX,ECX
JZ 0x00105de8
POP RBP
RET
LAB_00105de8:
MOV RDI,qword ptr [RDI + 0x8]
MOV RSI,qword ptr [RSI + 0x8]
POP RBP
JMP 0x00103070
|
void cmp_users(size_t *param_1,int *param_2)
{
if ((int)*param_1 != *param_2) {
return;
}
strncmp((char *)param_1[1],*(char **)(param_2 + 2),*param_1);
return;
}
| |
40,561 | DrawTextCodepoint | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtext.c | void DrawTextCodepoint(Font font, int codepoint, Vector2 position, float fontSize, Color tint)
{
// Character index position in sprite font
// NOTE: In case a codepoint is not available in the font, index returned points to '?'
int index = GetGlyphIndex(font, codepoint);
float scaleFactor = fontSize/font.baseSize; // Character quad scaling factor
// Character destination rectangle on screen
// NOTE: We consider glyphPadding on drawing
Rectangle dstRec = { position.x + font.glyphs[index].offsetX*scaleFactor - (float)font.glyphPadding*scaleFactor,
position.y + font.glyphs[index].offsetY*scaleFactor - (float)font.glyphPadding*scaleFactor,
(font.recs[index].width + 2.0f*font.glyphPadding)*scaleFactor,
(font.recs[index].height + 2.0f*font.glyphPadding)*scaleFactor };
// Character source rectangle from font texture atlas
// NOTE: We consider chars padding when drawing, it could be required for outline/glow shader effects
Rectangle srcRec = { font.recs[index].x - (float)font.glyphPadding, font.recs[index].y - (float)font.glyphPadding,
font.recs[index].width + 2.0f*font.glyphPadding, font.recs[index].height + 2.0f*font.glyphPadding };
// Draw the character texture on the screen
DrawTexturePro(font.texture, srcRec, dstRec, (Vector2){ 0, 0 }, 0.0f, tint);
} | O1 | c | DrawTextCodepoint:
subq $0x38, %rsp
leaq 0x40(%rsp), %rax
movslq 0x4(%rax), %r8
testq %r8, %r8
jle 0x8a606
movq 0x28(%rax), %r9
xorl %ecx, %ecx
xorl %edx, %edx
movl %edx, %r10d
movl (%r9), %r11d
cmpl $0x3f, %r11d
movl %ecx, %edx
cmovnel %r10d, %edx
cmpl %edi, %r11d
je 0x8a60a
incq %rcx
addq $0x28, %r9
cmpq %rcx, %r8
jne 0x8a5e1
xorl %ecx, %ecx
jmp 0x8a60a
xorl %ecx, %ecx
xorl %edx, %edx
testl %ecx, %ecx
jne 0x8a61d
movq 0x28(%rax), %rcx
xorl %r8d, %r8d
cmpl %edi, (%rcx)
cmovel %r8d, %edx
movl %edx, %ecx
cvtsi2ssl (%rax), %xmm2
divss %xmm2, %xmm1
movq 0x20(%rax), %rdx
movq 0x28(%rax), %rdi
movslq %ecx, %rcx
leaq (%rcx,%rcx,4), %r8
xorps %xmm2, %xmm2
cvtsi2ssl 0x4(%rdi,%r8,8), %xmm2
mulss %xmm1, %xmm2
addss %xmm0, %xmm2
cvtsi2ssl 0x8(%rax), %xmm3
movaps 0x4f56e(%rip), %xmm4 # 0xd9bc0
xorps %xmm3, %xmm4
mulss %xmm1, %xmm4
addss %xmm4, %xmm2
shufps $0x55, %xmm0, %xmm0 # xmm0 = xmm0[1,1,1,1]
cvtsi2ssl 0x8(%rdi,%r8,8), %xmm5
mulss %xmm1, %xmm5
addss %xmm0, %xmm5
addss %xmm4, %xmm5
unpcklps %xmm5, %xmm2 # xmm2 = xmm2[0],xmm5[0],xmm2[1],xmm5[1]
shlq $0x4, %rcx
movss (%rdx,%rcx), %xmm0
movss 0x4(%rdx,%rcx), %xmm4
subss %xmm3, %xmm0
subss %xmm3, %xmm4
movaps %xmm3, %xmm5
addss %xmm3, %xmm5
movss 0x8(%rdx,%rcx), %xmm6
addss %xmm5, %xmm6
movaps %xmm1, %xmm3
addss 0xc(%rdx,%rcx), %xmm5
mulss %xmm6, %xmm3
mulss %xmm5, %xmm1
unpcklps %xmm1, %xmm3 # xmm3 = xmm3[0],xmm1[0],xmm3[1],xmm1[1]
unpcklps %xmm4, %xmm0 # xmm0 = xmm0[0],xmm4[0],xmm0[1],xmm4[1]
movl 0x1c(%rax), %ecx
movl %ecx, 0x30(%rsp)
movups 0xc(%rax), %xmm1
movaps %xmm1, 0x20(%rsp)
movl 0x30(%rsp), %eax
movl %eax, 0x10(%rsp)
movaps 0x20(%rsp), %xmm1
movups %xmm1, (%rsp)
unpcklps %xmm5, %xmm6 # xmm6 = xmm6[0],xmm5[0],xmm6[1],xmm5[1]
xorps %xmm4, %xmm4
xorps %xmm5, %xmm5
movaps %xmm6, %xmm1
movl %esi, %edi
callq 0xa1841
addq $0x38, %rsp
retq
| DrawTextCodepoint:
sub rsp, 38h
lea rax, [rsp+38h+arg_0]
movsxd r8, dword ptr [rax+4]
test r8, r8
jle short loc_8A606
mov r9, [rax+28h]
xor ecx, ecx
xor edx, edx
loc_8A5E1:
mov r10d, edx
mov r11d, [r9]
cmp r11d, 3Fh ; '?'
mov edx, ecx
cmovnz edx, r10d
cmp r11d, edi
jz short loc_8A60A
inc rcx
add r9, 28h ; '('
cmp r8, rcx
jnz short loc_8A5E1
xor ecx, ecx
jmp short loc_8A60A
loc_8A606:
xor ecx, ecx
xor edx, edx
loc_8A60A:
test ecx, ecx
jnz short loc_8A61D
mov rcx, [rax+28h]
xor r8d, r8d
cmp [rcx], edi
cmovz edx, r8d
mov ecx, edx
loc_8A61D:
cvtsi2ss xmm2, dword ptr [rax]
divss xmm1, xmm2
mov rdx, [rax+20h]
mov rdi, [rax+28h]
movsxd rcx, ecx
lea r8, [rcx+rcx*4]
xorps xmm2, xmm2
cvtsi2ss xmm2, dword ptr [rdi+r8*8+4]
mulss xmm2, xmm1
addss xmm2, xmm0
cvtsi2ss xmm3, dword ptr [rax+8]
movaps xmm4, cs:xmmword_D9BC0
xorps xmm4, xmm3
mulss xmm4, xmm1
addss xmm2, xmm4
shufps xmm0, xmm0, 55h ; 'U'
cvtsi2ss xmm5, dword ptr [rdi+r8*8+8]
mulss xmm5, xmm1
addss xmm5, xmm0
addss xmm5, xmm4
unpcklps xmm2, xmm5
shl rcx, 4
movss xmm0, dword ptr [rdx+rcx]
movss xmm4, dword ptr [rdx+rcx+4]
subss xmm0, xmm3
subss xmm4, xmm3
movaps xmm5, xmm3
addss xmm5, xmm3
movss xmm6, dword ptr [rdx+rcx+8]
addss xmm6, xmm5
movaps xmm3, xmm1
addss xmm5, dword ptr [rdx+rcx+0Ch]
mulss xmm3, xmm6
mulss xmm1, xmm5
unpcklps xmm3, xmm1
unpcklps xmm0, xmm4
mov ecx, [rax+1Ch]
mov [rsp+38h+var_8], ecx
movups xmm1, xmmword ptr [rax+0Ch]
movaps [rsp+38h+var_18], xmm1
mov eax, [rsp+38h+var_8]
mov [rsp+38h+var_28], eax
movaps xmm1, [rsp+38h+var_18]
movups [rsp+38h+var_38], xmm1
unpcklps xmm6, xmm5
xorps xmm4, xmm4
xorps xmm5, xmm5
movaps xmm1, xmm6
mov edi, esi
call DrawTexturePro
add rsp, 38h
retn
| long long DrawTextCodepoint(
int a1,
int a2,
long long a3,
long long a4,
long long a5,
_DWORD *a6,
long long a7,
long long a8,
long long a9,
long long a10,
int a11,
_DWORD *a12)
{
long long v12; // rcx
int v13; // edx
int v14; // r10d
if ( SHIDWORD(a7) <= 0LL )
{
LODWORD(v12) = 0;
v13 = 0;
}
else
{
a6 = a12;
v12 = 0LL;
v13 = 0;
while ( 1 )
{
v14 = v13;
v13 = v12;
if ( *a6 != 63 )
v13 = v14;
if ( *a6 == a1 )
break;
++v12;
a6 += 10;
if ( SHIDWORD(a7) == v12 )
{
LODWORD(v12) = 0;
break;
}
}
}
if ( !(_DWORD)v12 )
{
if ( *a12 == a1 )
v13 = 0;
LODWORD(v12) = v13;
}
return DrawTexturePro(a2, a2, a11, HIDWORD(a10), 5 * (int)v12, (_DWORD)a6, HIDWORD(a8));
}
| DrawTextCodepoint:
SUB RSP,0x38
LEA RAX,[RSP + 0x40]
MOVSXD R8,dword ptr [RAX + 0x4]
TEST R8,R8
JLE 0x0018a606
MOV R9,qword ptr [RAX + 0x28]
XOR ECX,ECX
XOR EDX,EDX
LAB_0018a5e1:
MOV R10D,EDX
MOV R11D,dword ptr [R9]
CMP R11D,0x3f
MOV EDX,ECX
CMOVNZ EDX,R10D
CMP R11D,EDI
JZ 0x0018a60a
INC RCX
ADD R9,0x28
CMP R8,RCX
JNZ 0x0018a5e1
XOR ECX,ECX
JMP 0x0018a60a
LAB_0018a606:
XOR ECX,ECX
XOR EDX,EDX
LAB_0018a60a:
TEST ECX,ECX
JNZ 0x0018a61d
MOV RCX,qword ptr [RAX + 0x28]
XOR R8D,R8D
CMP dword ptr [RCX],EDI
CMOVZ EDX,R8D
MOV ECX,EDX
LAB_0018a61d:
CVTSI2SS XMM2,dword ptr [RAX]
DIVSS XMM1,XMM2
MOV RDX,qword ptr [RAX + 0x20]
MOV RDI,qword ptr [RAX + 0x28]
MOVSXD RCX,ECX
LEA R8,[RCX + RCX*0x4]
XORPS XMM2,XMM2
CVTSI2SS XMM2,dword ptr [RDI + R8*0x8 + 0x4]
MULSS XMM2,XMM1
ADDSS XMM2,XMM0
CVTSI2SS XMM3,dword ptr [RAX + 0x8]
MOVAPS XMM4,xmmword ptr [0x001d9bc0]
XORPS XMM4,XMM3
MULSS XMM4,XMM1
ADDSS XMM2,XMM4
SHUFPS XMM0,XMM0,0x55
CVTSI2SS XMM5,dword ptr [RDI + R8*0x8 + 0x8]
MULSS XMM5,XMM1
ADDSS XMM5,XMM0
ADDSS XMM5,XMM4
UNPCKLPS XMM2,XMM5
SHL RCX,0x4
MOVSS XMM0,dword ptr [RDX + RCX*0x1]
MOVSS XMM4,dword ptr [RDX + RCX*0x1 + 0x4]
SUBSS XMM0,XMM3
SUBSS XMM4,XMM3
MOVAPS XMM5,XMM3
ADDSS XMM5,XMM3
MOVSS XMM6,dword ptr [RDX + RCX*0x1 + 0x8]
ADDSS XMM6,XMM5
MOVAPS XMM3,XMM1
ADDSS XMM5,dword ptr [RDX + RCX*0x1 + 0xc]
MULSS XMM3,XMM6
MULSS XMM1,XMM5
UNPCKLPS XMM3,XMM1
UNPCKLPS XMM0,XMM4
MOV ECX,dword ptr [RAX + 0x1c]
MOV dword ptr [RSP + 0x30],ECX
MOVUPS XMM1,xmmword ptr [RAX + 0xc]
MOVAPS xmmword ptr [RSP + 0x20],XMM1
MOV EAX,dword ptr [RSP + 0x30]
MOV dword ptr [RSP + 0x10],EAX
MOVAPS XMM1,xmmword ptr [RSP + 0x20]
MOVUPS xmmword ptr [RSP],XMM1
UNPCKLPS XMM6,XMM5
XORPS XMM4,XMM4
XORPS XMM5,XMM5
MOVAPS XMM1,XMM6
MOV EDI,ESI
CALL 0x001a1841
ADD RSP,0x38
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void DrawTextCodepoint(float param_1,float param_2,int param_3,int4 param_4)
{
int iVar1;
long lVar2;
int iVar3;
int *piVar4;
float fVar5;
float fVar6;
int iStack0000000000000008;
int iStack000000000000000c;
int in_stack_00000010;
long in_stack_00000028;
int *in_stack_00000030;
if ((long)iStack000000000000000c < 1) {
lVar2 = 0;
iVar3 = 0;
}
else {
lVar2 = 0;
iVar3 = 0;
piVar4 = in_stack_00000030;
do {
iVar1 = (int)lVar2;
if (*piVar4 != 0x3f) {
iVar1 = iVar3;
}
iVar3 = iVar1;
if (*piVar4 == param_3) goto LAB_0018a60a;
lVar2 = lVar2 + 1;
piVar4 = piVar4 + 10;
} while (iStack000000000000000c != lVar2);
lVar2 = 0;
}
LAB_0018a60a:
iVar1 = (int)lVar2;
if (((int)lVar2 == 0) && (iVar1 = iVar3, *in_stack_00000030 == param_3)) {
iVar1 = 0;
}
param_2 = param_2 / (float)iStack0000000000000008;
fVar5 = (float)in_stack_00000010;
lVar2 = (long)iVar1 * 0x10;
fVar6 = *(float *)(in_stack_00000028 + 8 + lVar2) + fVar5 + fVar5;
DrawTexturePro(*(float *)(in_stack_00000028 + lVar2) - fVar5,fVar6,
(float)in_stack_00000030[(long)iVar1 * 10 + 1] * param_2 + param_1 +
(float)(_DAT_001d9bc0 ^ (uint)fVar5) * param_2,param_2 * fVar6,0,0,param_4);
return;
}
| |
40,562 | mysql_autocommit_start_internal | eloqsql/libmariadb/libmariadb/mariadb_async.c | static void
mysql_autocommit_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_autocommit,
(parms->mysql, parms->auto_mode),
parms->mysql,
my_bool,
r_my_bool)
} | O0 | c | mysql_autocommit_start_internal:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movsbl 0x8(%rax), %esi
callq 0x227b0
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %cl
movq -0x20(%rbp), %rax
movb %cl, 0x8(%rax)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| mysql_autocommit_start_internal:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rdi, [rax]
mov rax, [rbp+var_10]
movsx esi, byte ptr [rax+8]
call mysql_autocommit
mov [rbp+var_11], al
mov cl, [rbp+var_11]
mov rax, [rbp+var_20]
mov [rax+8], cl
mov rax, [rbp+var_20]
mov dword ptr [rax], 0
add rsp, 20h
pop rbp
retn
| long long mysql_autocommit_start_internal(long long a1)
{
long long result; // rax
long long v2; // [rsp+0h] [rbp-20h]
v2 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 1152LL) + 40LL);
*(_BYTE *)(v2 + 8) = mysql_autocommit(*(_QWORD *)a1, *(_BYTE *)(a1 + 8));
result = v2;
*(_DWORD *)v2 = 0;
return result;
}
| mysql_autocommit_start_internal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOVSX ESI,byte ptr [RAX + 0x8]
CALL 0x001227b0
MOV byte ptr [RBP + -0x11],AL
MOV CL,byte ptr [RBP + -0x11]
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x8],CL
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],0x0
ADD RSP,0x20
POP RBP
RET
|
void mysql_autocommit_start_internal(long *param_1)
{
int4 *puVar1;
int1 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_autocommit(*param_1,(int)(char)param_1[1]);
*(int1 *)(puVar1 + 2) = uVar2;
*puVar1 = 0;
return;
}
| |
40,563 | harvest_pins | eloqsql/mysys/lf_alloc-pin.c | static int harvest_pins(LF_PINS *el, struct st_harvester *hv)
{
int i;
LF_PINS *el_end= el+MY_MIN(hv->npins, LF_DYNARRAY_LEVEL_LENGTH);
for (; el < el_end; el++)
{
for (i= 0; i < LF_PINBOX_PINS; i++)
{
void *p= el->pin[i];
if (p)
*hv->granary++= p;
}
}
/*
hv->npins may become negative below, but it means that
we're on the last dynarray page and harvest_pins() won't be
called again. We don't bother to make hv->npins() correct
(that is 0) in this case.
*/
hv->npins-= LF_DYNARRAY_LEVEL_LENGTH;
return 0;
} | O0 | c | harvest_pins:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x100, 0x8(%rax) # imm = 0x100
jge 0xfe50d
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x34(%rbp)
jmp 0xfe517
movl $0x100, %eax # imm = 0x100
movl %eax, -0x34(%rbp)
jmp 0xfe517
movq -0x30(%rbp), %rax
movl -0x34(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x78, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0xfe58f
movl $0x0, -0x14(%rbp)
cmpl $0x4, -0x14(%rbp)
jge 0xfe57f
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0xfe572
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rdx
movq (%rdx), %rax
movq %rax, %rsi
addq $0x8, %rsi
movq %rsi, (%rdx)
movq %rcx, (%rax)
jmp 0xfe574
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xfe53d
jmp 0xfe581
movq -0x8(%rbp), %rax
addq $0x78, %rax
movq %rax, -0x8(%rbp)
jmp 0xfe52c
movq -0x10(%rbp), %rax
movl 0x8(%rax), %ecx
subl $0x100, %ecx # imm = 0x100
movl %ecx, 0x8(%rax)
xorl %eax, %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| harvest_pins:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
cmp dword ptr [rax+8], 100h
jge short loc_FE50D
mov rax, [rbp+var_10]
mov eax, [rax+8]
mov [rbp+var_34], eax
jmp short loc_FE517
loc_FE50D:
mov eax, 100h
mov [rbp+var_34], eax
jmp short $+2
loc_FE517:
mov rax, [rbp+var_30]
mov ecx, [rbp+var_34]
movsxd rcx, ecx
imul rcx, 78h ; 'x'
add rax, rcx
mov [rbp+var_20], rax
loc_FE52C:
mov rax, [rbp+var_8]
cmp rax, [rbp+var_20]
jnb short loc_FE58F
mov [rbp+var_14], 0
loc_FE53D:
cmp [rbp+var_14], 4
jge short loc_FE57F
mov rax, [rbp+var_8]
movsxd rcx, [rbp+var_14]
mov rax, [rax+rcx*8]
mov [rbp+var_28], rax
cmp [rbp+var_28], 0
jz short loc_FE572
mov rcx, [rbp+var_28]
mov rdx, [rbp+var_10]
mov rax, [rdx]
mov rsi, rax
add rsi, 8
mov [rdx], rsi
mov [rax], rcx
loc_FE572:
jmp short $+2
loc_FE574:
mov eax, [rbp+var_14]
add eax, 1
mov [rbp+var_14], eax
jmp short loc_FE53D
loc_FE57F:
jmp short $+2
loc_FE581:
mov rax, [rbp+var_8]
add rax, 78h ; 'x'
mov [rbp+var_8], rax
jmp short loc_FE52C
loc_FE58F:
mov rax, [rbp+var_10]
mov ecx, [rax+8]
sub ecx, 100h
mov [rax+8], ecx
xor eax, eax
pop rbp
retn
| long long harvest_pins(unsigned long long a1, long long a2)
{
_QWORD *v2; // rax
int v4; // [rsp+0h] [rbp-34h]
long long v5; // [rsp+Ch] [rbp-28h]
int i; // [rsp+20h] [rbp-14h]
unsigned long long v7; // [rsp+2Ch] [rbp-8h]
v7 = a1;
if ( *(int *)(a2 + 8) >= 256 )
v4 = 256;
else
v4 = *(_DWORD *)(a2 + 8);
while ( v7 < 120LL * v4 + a1 )
{
for ( i = 0; i < 4; ++i )
{
v5 = *(_QWORD *)(v7 + 8LL * i);
if ( v5 )
{
v2 = *(_QWORD **)a2;
*(_QWORD *)a2 += 8LL;
*v2 = v5;
}
}
v7 += 120LL;
}
*(_DWORD *)(a2 + 8) -= 256;
return 0LL;
}
| harvest_pins:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x8],0x100
JGE 0x001fe50d
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x34],EAX
JMP 0x001fe517
LAB_001fe50d:
MOV EAX,0x100
MOV dword ptr [RBP + -0x34],EAX
JMP 0x001fe517
LAB_001fe517:
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RBP + -0x34]
MOVSXD RCX,ECX
IMUL RCX,RCX,0x78
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
LAB_001fe52c:
MOV RAX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x001fe58f
MOV dword ptr [RBP + -0x14],0x0
LAB_001fe53d:
CMP dword ptr [RBP + -0x14],0x4
JGE 0x001fe57f
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x28],0x0
JZ 0x001fe572
MOV RCX,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RDX]
MOV RSI,RAX
ADD RSI,0x8
MOV qword ptr [RDX],RSI
MOV qword ptr [RAX],RCX
LAB_001fe572:
JMP 0x001fe574
LAB_001fe574:
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
JMP 0x001fe53d
LAB_001fe57f:
JMP 0x001fe581
LAB_001fe581:
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x78
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001fe52c
LAB_001fe58f:
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x8]
SUB ECX,0x100
MOV dword ptr [RAX + 0x8],ECX
XOR EAX,EAX
POP RBP
RET
|
int8 harvest_pins(ulong param_1,int8 *param_2)
{
long lVar1;
long *plVar2;
int local_3c;
int local_1c;
ulong local_10;
if (*(int *)(param_2 + 1) < 0x100) {
local_3c = *(int *)(param_2 + 1);
}
else {
local_3c = 0x100;
}
for (local_10 = param_1; local_10 < param_1 + (long)local_3c * 0x78; local_10 = local_10 + 0x78) {
for (local_1c = 0; local_1c < 4; local_1c = local_1c + 1) {
lVar1 = *(long *)(local_10 + (long)local_1c * 8);
if (lVar1 != 0) {
plVar2 = (long *)*param_2;
*param_2 = plVar2 + 1;
*plVar2 = lVar1;
}
}
}
*(int *)(param_2 + 1) = *(int *)(param_2 + 1) + -0x100;
return 0;
}
| |
40,564 | bitmap_exists_intersection | eloqsql/mysys/my_bitmap.c | my_bool bitmap_exists_intersection(const MY_BITMAP **bitmap_array,
uint bitmap_count,
uint start_bit, uint end_bit)
{
uint i, j, start_idx, end_idx;
my_bitmap_map cur_res;
DBUG_ASSERT(bitmap_count);
DBUG_ASSERT(end_bit >= start_bit);
for (j= 0; j < bitmap_count; j++)
DBUG_ASSERT(end_bit < bitmap_array[j]->n_bits);
start_idx= start_bit/8/sizeof(my_bitmap_map);
end_idx= end_bit/8/sizeof(my_bitmap_map);
for (i= start_idx; i < end_idx; i++)
{
cur_res= ~0;
for (j= 0; cur_res && j < bitmap_count; j++)
cur_res &= bitmap_array[j]->bitmap[i];
if (cur_res)
return TRUE;
}
cur_res= ~last_word_mask(end_bit);
for (j= 0; cur_res && j < bitmap_count; j++)
cur_res &= bitmap_array[j]->bitmap[end_idx];
return cur_res != 0;
} | O3 | c | bitmap_exists_intersection:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
shrl $0x5, %edx
movl %ecx, %r8d
shrl $0x5, %r8d
cmpl %r8d, %edx
jae 0x9d7bf
movl %esi, %r9d
leal (%r8,%rdx), %r10d
subl %edx, %r10d
movb $0x1, %al
testl %esi, %esi
je 0x9d86f
movl $0xffffffff, %r11d # imm = 0xFFFFFFFF
movl $0x1, %ebx
movq -0x8(%rdi,%rbx,8), %r14
movq (%r14), %r14
andl (%r14,%rdx,4), %r11d
je 0x9d7ae
leaq 0x1(%rbx), %r14
cmpq %r9, %rbx
movq %r14, %rbx
jb 0x9d794
testl %r11d, %r11d
jne 0x9d86f
incq %rdx
cmpq %r10, %rdx
jne 0x9d781
movl %ecx, %eax
andl $0x7, %eax
addl $0x8, %ecx
shrl $0x3, %ecx
andl $0x3, %ecx
leaq 0x445c8(%rip), %rdx # 0xe1d9c
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl $0xfe000000, %r9d # imm = 0xFE000000
movl %eax, %ecx
shll %cl, %r9d
xorl %edx, %edx
xorl %eax, %eax
jmp 0x9d815
movl $0xfffffe00, %edx # imm = 0xFFFFFE00
movl %eax, %ecx
shll %cl, %edx
movzwl %dx, %eax
xorl %ecx, %ecx
jmp 0x9d82a
movl $0xfffe0000, %edx # imm = 0xFFFE0000
movl %eax, %ecx
shll %cl, %edx
andl $0xfe0000, %edx # imm = 0xFE0000
xorl %eax, %eax
movl $0xff000000, %r9d # imm = 0xFF000000
xorl %ecx, %ecx
jmp 0x9d835
movl $0xfffffffe, %edx # imm = 0xFFFFFFFE
movl %eax, %ecx
shll %cl, %edx
movzbl %dl, %ecx
movl $0xff00, %eax # imm = 0xFF00
movl $0xff0000, %edx # imm = 0xFF0000
movl $0xff000000, %r9d # imm = 0xFF000000
testl %esi, %esi
je 0x9d86d
orl %r9d, %edx
orl %ecx, %eax
orl %edx, %eax
notl %eax
movl %r8d, %ecx
movl %esi, %edx
movl $0x1, %esi
movq -0x8(%rdi,%rsi,8), %r8
movq (%r8), %r8
andl (%r8,%rcx,4), %eax
je 0x9d866
leaq 0x1(%rsi), %r8
cmpq %rdx, %rsi
movq %r8, %rsi
jb 0x9d84c
testl %eax, %eax
setne %al
jmp 0x9d86f
movb $0x1, %al
popq %rbx
popq %r14
popq %rbp
retq
| bitmap_exists_intersection:
push rbp
mov rbp, rsp
push r14
push rbx
shr edx, 5
mov r8d, ecx
shr r8d, 5
cmp edx, r8d
jnb short loc_9D7BF
mov r9d, esi
lea r10d, [r8+rdx]
sub r10d, edx
mov al, 1
loc_9D781:
test esi, esi
jz loc_9D86F
mov r11d, 0FFFFFFFFh
mov ebx, 1
loc_9D794:
mov r14, [rdi+rbx*8-8]
mov r14, [r14]
and r11d, [r14+rdx*4]
jz short loc_9D7AE
lea r14, [rbx+1]
cmp rbx, r9
mov rbx, r14
jb short loc_9D794
loc_9D7AE:
test r11d, r11d
jnz loc_9D86F
inc rdx
cmp rdx, r10
jnz short loc_9D781
loc_9D7BF:
mov eax, ecx
and eax, 7
add ecx, 8
shr ecx, 3
and ecx, 3
lea rdx, jpt_9D7DB
movsxd rcx, ds:(jpt_9D7DB - 0E1D9Ch)[rdx+rcx*4]; switch 4 cases
add rcx, rdx
jmp rcx; switch jump
loc_9D7DD:
mov r9d, 0FE000000h; jumptable 000000000009D7DB case 0
mov ecx, eax
shl r9d, cl
xor edx, edx
xor eax, eax
jmp short loc_9D815
loc_9D7EE:
mov edx, 0FFFFFE00h; jumptable 000000000009D7DB case 2
mov ecx, eax
shl edx, cl
movzx eax, dx
xor ecx, ecx
jmp short loc_9D82A
loc_9D7FE:
mov edx, 0FFFE0000h; jumptable 000000000009D7DB case 3
mov ecx, eax
shl edx, cl
and edx, 0FE0000h
xor eax, eax
mov r9d, 0FF000000h
loc_9D815:
xor ecx, ecx
jmp short loc_9D835
loc_9D819:
mov edx, 0FFFFFFFEh; jumptable 000000000009D7DB case 1
mov ecx, eax
shl edx, cl
movzx ecx, dl
mov eax, 0FF00h
loc_9D82A:
mov edx, 0FF0000h
mov r9d, 0FF000000h
loc_9D835:
test esi, esi
jz short loc_9D86D
or edx, r9d
or eax, ecx
or eax, edx
not eax
mov ecx, r8d
mov edx, esi
mov esi, 1
loc_9D84C:
mov r8, [rdi+rsi*8-8]
mov r8, [r8]
and eax, [r8+rcx*4]
jz short loc_9D866
lea r8, [rsi+1]
cmp rsi, rdx
mov rsi, r8
jb short loc_9D84C
loc_9D866:
test eax, eax
setnz al
jmp short loc_9D86F
loc_9D86D:
mov al, 1
loc_9D86F:
pop rbx
pop r14
pop rbp
retn
| bool bitmap_exists_intersection(long long a1, unsigned int a2, unsigned int a3, unsigned int a4)
{
long long v4; // rdx
unsigned int v5; // r8d
bool result; // al
int v7; // r11d
unsigned long long v8; // rbx
bool v9; // cf
char v10; // al
int v11; // r9d
int v12; // edx
int v13; // eax
int v14; // ecx
int v15; // eax
unsigned long long v16; // rdx
unsigned long long v17; // rsi
v4 = a3 >> 5;
v5 = a4 >> 5;
if ( (unsigned int)v4 >= a4 >> 5 )
{
LABEL_9:
v10 = a4 & 7;
switch ( ((a4 + 8) >> 3) & 3 )
{
case 0u:
v11 = -33554432 << v10;
v12 = 0;
v13 = 0;
goto LABEL_13;
case 1u:
v14 = (unsigned __int8)(-2 << v10);
v13 = 65280;
goto LABEL_15;
case 2u:
v13 = (unsigned __int16)(-512 << v10);
v14 = 0;
LABEL_15:
v12 = 16711680;
v11 = -16777216;
break;
case 3u:
v12 = (-131072 << v10) & 0xFE0000;
v13 = 0;
v11 = -16777216;
LABEL_13:
v14 = 0;
break;
}
if ( a2 )
{
v15 = ~(v11 | v12 | v14 | v13);
v16 = a2;
v17 = 1LL;
do
{
v15 &= *(_DWORD *)(**(_QWORD **)(a1 + 8 * v17 - 8) + 4LL * v5);
if ( !v15 )
break;
v9 = v17++ < v16;
}
while ( v9 );
return v15 != 0;
}
else
{
return 1;
}
}
else
{
result = 1;
while ( a2 )
{
v7 = -1;
v8 = 1LL;
do
{
v7 &= *(_DWORD *)(**(_QWORD **)(a1 + 8 * v8 - 8) + 4 * v4);
if ( !v7 )
break;
v9 = v8++ < a2;
}
while ( v9 );
if ( v7 )
break;
if ( ++v4 == v5 )
goto LABEL_9;
}
}
return result;
}
| bitmap_exists_intersection:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SHR EDX,0x5
MOV R8D,ECX
SHR R8D,0x5
CMP EDX,R8D
JNC 0x0019d7bf
MOV R9D,ESI
LEA R10D,[R8 + RDX*0x1]
SUB R10D,EDX
MOV AL,0x1
LAB_0019d781:
TEST ESI,ESI
JZ 0x0019d86f
MOV R11D,0xffffffff
MOV EBX,0x1
LAB_0019d794:
MOV R14,qword ptr [RDI + RBX*0x8 + -0x8]
MOV R14,qword ptr [R14]
AND R11D,dword ptr [R14 + RDX*0x4]
JZ 0x0019d7ae
LEA R14,[RBX + 0x1]
CMP RBX,R9
MOV RBX,R14
JC 0x0019d794
LAB_0019d7ae:
TEST R11D,R11D
JNZ 0x0019d86f
INC RDX
CMP RDX,R10
JNZ 0x0019d781
LAB_0019d7bf:
MOV EAX,ECX
AND EAX,0x7
ADD ECX,0x8
SHR ECX,0x3
AND ECX,0x3
LEA RDX,[0x1e1d9c]
MOVSXD RCX,dword ptr [RDX + RCX*0x4]
ADD RCX,RDX
switchD:
JMP RCX
caseD_0:
MOV R9D,0xfe000000
MOV ECX,EAX
SHL R9D,CL
XOR EDX,EDX
XOR EAX,EAX
JMP 0x0019d815
caseD_2:
MOV EDX,0xfffffe00
MOV ECX,EAX
SHL EDX,CL
MOVZX EAX,DX
XOR ECX,ECX
JMP 0x0019d82a
caseD_3:
MOV EDX,0xfffe0000
MOV ECX,EAX
SHL EDX,CL
AND EDX,0xfe0000
XOR EAX,EAX
MOV R9D,0xff000000
LAB_0019d815:
XOR ECX,ECX
JMP 0x0019d835
caseD_1:
MOV EDX,0xfffffffe
MOV ECX,EAX
SHL EDX,CL
MOVZX ECX,DL
MOV EAX,0xff00
LAB_0019d82a:
MOV EDX,0xff0000
MOV R9D,0xff000000
LAB_0019d835:
TEST ESI,ESI
JZ 0x0019d86d
OR EDX,R9D
OR EAX,ECX
OR EAX,EDX
NOT EAX
MOV ECX,R8D
MOV EDX,ESI
MOV ESI,0x1
LAB_0019d84c:
MOV R8,qword ptr [RDI + RSI*0x8 + -0x8]
MOV R8,qword ptr [R8]
AND EAX,dword ptr [R8 + RCX*0x4]
JZ 0x0019d866
LEA R8,[RSI + 0x1]
CMP RSI,RDX
MOV RSI,R8
JC 0x0019d84c
LAB_0019d866:
TEST EAX,EAX
SETNZ AL
JMP 0x0019d86f
LAB_0019d86d:
MOV AL,0x1
LAB_0019d86f:
POP RBX
POP R14
POP RBP
RET
|
bool bitmap_exists_intersection(long param_1,uint param_2,uint param_3,uint param_4)
{
uint uVar1;
byte bVar2;
uint uVar3;
ulong uVar4;
ulong uVar5;
uint uVar6;
uint uVar7;
uint uVar8;
bool bVar9;
uVar4 = (ulong)(param_3 >> 5);
uVar6 = param_4 >> 5;
if (param_3 >> 5 < uVar6) {
do {
if (param_2 == 0) {
return true;
}
uVar8 = 0xffffffff;
uVar5 = 1;
do {
uVar8 = uVar8 & *(uint *)(**(long **)(param_1 + -8 + uVar5 * 8) + uVar4 * 4);
if (uVar8 == 0) break;
bVar9 = uVar5 < param_2;
uVar5 = uVar5 + 1;
} while (bVar9);
if (uVar8 != 0) {
return true;
}
uVar4 = uVar4 + 1;
} while (uVar4 != uVar6);
}
bVar2 = (byte)param_4 & 7;
switch(param_4 + 8 >> 3 & 3) {
case 0:
uVar7 = -0x2000000 << bVar2;
uVar8 = 0;
break;
case 1:
uVar3 = -2 << bVar2 & 0xff;
uVar1 = 0xff00;
goto LAB_0019d82a;
case 2:
uVar1 = -0x200 << bVar2 & 0xffff;
uVar3 = 0;
LAB_0019d82a:
uVar8 = 0xff0000;
uVar7 = 0xff000000;
goto LAB_0019d835;
case 3:
uVar8 = -0x20000 << bVar2 & 0xfe0000;
uVar7 = 0xff000000;
}
uVar1 = 0;
uVar3 = 0;
LAB_0019d835:
if (param_2 == 0) {
bVar9 = true;
}
else {
uVar8 = ~(uVar1 | uVar3 | uVar8 | uVar7);
uVar4 = 1;
do {
uVar8 = uVar8 & *(uint *)(**(long **)(param_1 + -8 + uVar4 * 8) + (ulong)uVar6 * 4);
if (uVar8 == 0) break;
bVar9 = uVar4 < param_2;
uVar4 = uVar4 + 1;
} while (bVar9);
bVar9 = uVar8 != 0;
}
return bVar9;
}
| |
40,565 | calculate_segment_checksum | seiftnesse[P]memoryallocator/src/custom_alloc_util.c | uint32_t calculate_segment_checksum(segment_t *s) {
if (!s) return 0;
// Create a temporary structure with the fields we want to include in the checksum
struct {
int is_free;
int size;
uintptr_t next;
uintptr_t prev;
uint32_t allocation_id;
uint32_t magic;
} checksum_data;
// Fill the structure with segment data
checksum_data.is_free = s->is_free;
checksum_data.size = s->size;
checksum_data.next = (uintptr_t) (s->next);
checksum_data.prev = (uintptr_t) (s->prev);
checksum_data.allocation_id = s->allocation_id;
checksum_data.magic = s->magic;
return fnv1a_hash(&checksum_data, sizeof(checksum_data));
} | O3 | c | calculate_segment_checksum:
testq %rdi, %rdi
je 0x2022
movq (%rdi), %rax
movq %rax, -0x20(%rsp)
movups 0x8(%rdi), %xmm0
movups %xmm0, -0x18(%rsp)
movq 0x24(%rdi), %rax
movq %rax, -0x8(%rsp)
movl $0x811c9dc5, %eax # imm = 0x811C9DC5
xorl %ecx, %ecx
movzbl -0x20(%rsp,%rcx), %edx
xorl %eax, %edx
imull $0x1000193, %edx, %eax # imm = 0x1000193
incq %rcx
cmpq $0x20, %rcx
jne 0x200b
retq
xorl %eax, %eax
retq
| calculate_segment_checksum:
test rdi, rdi
jz short loc_2022
mov rax, [rdi]
mov [rsp+var_20], rax
movups xmm0, xmmword ptr [rdi+8]
movups [rsp+var_18], xmm0
mov rax, [rdi+24h]
mov [rsp+var_8], rax
mov eax, 811C9DC5h
xor ecx, ecx
loc_200B:
movzx edx, byte ptr [rsp+rcx+var_20]
xor edx, eax
imul eax, edx, 1000193h
inc rcx
cmp rcx, 20h ; ' '
jnz short loc_200B
retn
loc_2022:
xor eax, eax
retn
| long long calculate_segment_checksum(long long *a1)
{
long long result; // rax
long long i; // rcx
long long v3; // [rsp+0h] [rbp-20h]
__int128 v4; // [rsp+8h] [rbp-18h]
long long v5; // [rsp+18h] [rbp-8h]
if ( !a1 )
return 0LL;
v3 = *a1;
v4 = *(_OWORD *)(a1 + 1);
v5 = *(long long *)((char *)a1 + 36);
LODWORD(result) = -2128831035;
for ( i = 0LL; i != 32; ++i )
result = 16777619 * ((unsigned int)result ^ *((unsigned __int8 *)&v3 + i));
return result;
}
| calculate_segment_checksum:
TEST RDI,RDI
JZ 0x00102022
MOV RAX,qword ptr [RDI]
MOV qword ptr [RSP + -0x20],RAX
MOVUPS XMM0,xmmword ptr [RDI + 0x8]
MOVUPS xmmword ptr [RSP + -0x18],XMM0
MOV RAX,qword ptr [RDI + 0x24]
MOV qword ptr [RSP + -0x8],RAX
MOV EAX,0x811c9dc5
XOR ECX,ECX
LAB_0010200b:
MOVZX EDX,byte ptr [RSP + RCX*0x1 + -0x20]
XOR EDX,EAX
IMUL EAX,EDX,0x1000193
INC RCX
CMP RCX,0x20
JNZ 0x0010200b
RET
LAB_00102022:
XOR EAX,EAX
RET
|
uint calculate_segment_checksum(int8 *param_1)
{
uint uVar1;
long lVar2;
int8 local_20;
int8 local_18;
int8 uStack_10;
int8 local_8;
if (param_1 != (int8 *)0x0) {
local_20 = *param_1;
local_18 = param_1[1];
uStack_10 = param_1[2];
local_8 = *(int8 *)((long)param_1 + 0x24);
uVar1 = 0x811c9dc5;
lVar2 = 0;
do {
uVar1 = (*(byte *)((long)&local_20 + lVar2) ^ uVar1) * 0x1000193;
lVar2 = lVar2 + 1;
} while (lVar2 != 0x20);
return uVar1;
}
return 0;
}
| |
40,566 | google::protobuf::Reflection::HasBit(google::protobuf::Message const&, google::protobuf::FieldDescriptor const*) const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/generated_message_reflection.cc | bool Reflection::HasBit(const Message& message,
const FieldDescriptor* field) const {
GOOGLE_DCHECK(!field->options().weak());
if (schema_.HasBitIndex(field) != static_cast<uint32_t>(-1)) {
return IsIndexInHasBitSet(GetHasBits(message), schema_.HasBitIndex(field));
}
// Intentionally check here because HasBitIndex(field) != -1 means valid.
CheckInvalidAccess(schema_, field);
// proto3: no has-bits. All fields present except messages, which are
// present only if their message-field pointer is non-null.
if (field->cpp_type() == FieldDescriptor::CPPTYPE_MESSAGE) {
return !schema_.IsDefaultInstance(message) &&
GetRaw<const Message*>(message, field) != nullptr;
} else {
// Non-message field (and non-oneof, since that was handled in HasField()
// before calling us), and singular (again, checked in HasField). So, this
// field must be a scalar.
// Scalar primitive (numeric or string/bytes) fields are present if
// their value is non-zero (numeric) or non-empty (string/bytes). N.B.:
// we must use this definition here, rather than the "scalar fields
// always present" in the proto3 docs, because MergeFrom() semantics
// require presence as "present on wire", and reflection-based merge
// (which uses HasField()) needs to be consistent with this.
switch (field->cpp_type()) {
case FieldDescriptor::CPPTYPE_STRING:
switch (field->options().ctype()) {
default: {
if (IsInlined(field)) {
return !GetField<InlinedStringField>(message, field)
.GetNoArena()
.empty();
}
return GetField<ArenaStringPtr>(message, field).Get().size() > 0;
}
}
return false;
case FieldDescriptor::CPPTYPE_BOOL:
return GetRaw<bool>(message, field) != false;
case FieldDescriptor::CPPTYPE_INT32:
return GetRaw<int32_t>(message, field) != 0;
case FieldDescriptor::CPPTYPE_INT64:
return GetRaw<int64_t>(message, field) != 0;
case FieldDescriptor::CPPTYPE_UINT32:
return GetRaw<uint32_t>(message, field) != 0;
case FieldDescriptor::CPPTYPE_UINT64:
return GetRaw<uint64_t>(message, field) != 0;
case FieldDescriptor::CPPTYPE_FLOAT:
static_assert(sizeof(uint32_t) == sizeof(float),
"Code assumes uint32_t and float are the same size.");
return GetRaw<uint32_t>(message, field) != 0;
case FieldDescriptor::CPPTYPE_DOUBLE:
static_assert(sizeof(uint64_t) == sizeof(double),
"Code assumes uint64_t and double are the same size.");
return GetRaw<uint64_t>(message, field) != 0;
case FieldDescriptor::CPPTYPE_ENUM:
return GetRaw<int>(message, field) != 0;
case FieldDescriptor::CPPTYPE_MESSAGE:
// handled above; avoid warning
break;
}
GOOGLE_LOG(FATAL) << "Reached impossible case in HasBit().";
return false;
}
} | O3 | cpp | google::protobuf::Reflection::HasBit(google::protobuf::Message const&, google::protobuf::FieldDescriptor const*) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r12
leaq 0x8(%rdi), %r15
movq %r15, %rdi
movq %rdx, %rsi
callq 0x6de24
cmpl $-0x1, %eax
je 0x6ca61
movl 0x20(%r12), %eax
addq %rax, %rbx
movq %r15, %rdi
movq %r14, %rsi
callq 0x6de24
movl %eax, %ecx
shrl $0x5, %ecx
movl (%rbx,%rcx,4), %ecx
btl %eax, %ecx
setb %al
jmp 0x6cb8d
movq 0x18(%r14), %rdi
testq %rdi, %rdi
je 0x6ca84
leaq -0x31e51(%rip), %rax # 0x3ac20
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movq %rsp, %rdx
movq %r14, (%rdx)
callq 0x3fc96
movzbl 0x2(%r14), %eax
leaq 0x49190(%rip), %r12 # 0xb5c20
movl (%r12,%rax,4), %eax
cmpl $0xa, %eax
jne 0x6caa3
cmpq %rbx, (%r15)
jne 0x6caf9
jmp 0x6cb8b
movq 0x18(%r14), %rdi
testq %rdi, %rdi
je 0x6cacf
leaq -0x31e93(%rip), %rax # 0x3ac20
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movq %rsp, %rdx
movq %r14, (%rdx)
callq 0x3fc96
movzbl 0x2(%r14), %eax
movl (%r12,%rax,4), %eax
decl %eax
cmpl $0x8, %eax
ja 0x6cb49
leaq 0x4cedb(%rip), %rcx # 0xb99b8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r15, %rdi
movq %r14, %rsi
callq 0x6ea6a
movl %eax, %eax
cmpl $0x0, (%rbx,%rax)
jmp 0x6cb0b
movq %r15, %rdi
movq %r14, %rsi
callq 0x6ea6a
movl %eax, %eax
cmpq $0x0, (%rbx,%rax)
setne %al
jmp 0x6cb8d
movq %r15, %rdi
movq %r14, %rsi
callq 0x6ea6a
movl %eax, %eax
movb (%rbx,%rax), %al
jmp 0x6cb8d
movq %r15, %rdi
movq %r14, %rsi
callq 0x6e994
movl %eax, %ebp
movq %r15, %rdi
movq %r14, %rsi
callq 0x6ea6a
movl %eax, %eax
testb %bpl, %bpl
je 0x6cb9a
cmpq $0x0, 0x8(%rbx,%rax)
jmp 0x6cb0b
leaq 0x4cf98(%rip), %rdx # 0xb9ae8
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0x3, %esi
movl $0xa39, %ecx # imm = 0xA39
callq 0x169ca
leaq 0x4da3c(%rip), %rsi # 0xba5aa
movq %rbx, %rdi
callq 0x164c8
movq %rsp, %rdi
movq %rax, %rsi
callq 0x165a2
leaq 0x8(%rsp), %rdi
callq 0x169e8
xorl %eax, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx,%rax), %rax
andq $-0x4, %rax
cmpq $0x0, 0x8(%rax)
jmp 0x6cb0b
jmp 0x6cbae
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x169e8
movq %rbx, %rdi
callq 0xf570
nop
| _ZNK6google8protobuf10Reflection6HasBitERKNS0_7MessageEPKNS0_15FieldDescriptorE:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 40h
mov r14, rdx
mov rbx, rsi
mov r12, rdi
lea r15, [rdi+8]
mov rdi, r15; this
mov rsi, rdx; google::protobuf::FieldDescriptor *
call _ZNK6google8protobuf8internal16ReflectionSchema11HasBitIndexEPKNS0_15FieldDescriptorE; google::protobuf::internal::ReflectionSchema::HasBitIndex(google::protobuf::FieldDescriptor const*)
cmp eax, 0FFFFFFFFh
jz short loc_6CA61
mov eax, [r12+20h]
add rbx, rax
mov rdi, r15; this
mov rsi, r14; google::protobuf::FieldDescriptor *
call _ZNK6google8protobuf8internal16ReflectionSchema11HasBitIndexEPKNS0_15FieldDescriptorE; google::protobuf::internal::ReflectionSchema::HasBitIndex(google::protobuf::FieldDescriptor const*)
mov ecx, eax
shr ecx, 5
mov ecx, [rbx+rcx*4]
bt ecx, eax
setb al
jmp loc_6CB8D
loc_6CA61:
mov rdi, [r14+18h]
test rdi, rdi
jz short loc_6CA84
lea rax, _ZN6google8protobuf15FieldDescriptor12TypeOnceInitEPKS1_; google::protobuf::FieldDescriptor::TypeOnceInit(google::protobuf::FieldDescriptor const*)
lea rsi, [rsp+68h+var_60]
mov [rsi], rax
mov rdx, rsp
mov [rdx], r14
call _ZSt9call_onceIPFvPKN6google8protobuf15FieldDescriptorEEJS4_EEvRSt9once_flagOT_DpOT0_; std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(std::once_flag &,void (*)(google::protobuf::FieldDescriptor const*) &&,google::protobuf::FieldDescriptor const* &&)
loc_6CA84:
movzx eax, byte ptr [r14+2]
lea r12, _ZN6google8protobuf15FieldDescriptor17kTypeToCppTypeMapE; google::protobuf::FieldDescriptor::kTypeToCppTypeMap
mov eax, [r12+rax*4]
cmp eax, 0Ah
jnz short loc_6CAA3
cmp [r15], rbx
jnz short loc_6CAF9; jumptable 000000000006CAE4 cases 2,4,5
jmp loc_6CB8B
loc_6CAA3:
mov rdi, [r14+18h]
test rdi, rdi
jz short loc_6CACF
lea rax, _ZN6google8protobuf15FieldDescriptor12TypeOnceInitEPKS1_; google::protobuf::FieldDescriptor::TypeOnceInit(google::protobuf::FieldDescriptor const*)
lea rsi, [rsp+68h+var_60]
mov [rsi], rax
mov rdx, rsp
mov [rdx], r14
call _ZSt9call_onceIPFvPKN6google8protobuf15FieldDescriptorEEJS4_EEvRSt9once_flagOT_DpOT0_; std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(std::once_flag &,void (*)(google::protobuf::FieldDescriptor const*) &&,google::protobuf::FieldDescriptor const* &&)
movzx eax, byte ptr [r14+2]
mov eax, [r12+rax*4]
loc_6CACF:
dec eax; switch 9 cases
cmp eax, 8
ja short def_6CAE4; jumptable 000000000006CAE4 default case
lea rcx, jpt_6CAE4
movsxd rax, ds:(jpt_6CAE4 - 0B99B8h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_6CAE6:
mov rdi, r15; jumptable 000000000006CAE4 cases 1,3,6,8
mov rsi, r14; google::protobuf::FieldDescriptor *
call _ZNK6google8protobuf8internal16ReflectionSchema14GetFieldOffsetEPKNS0_15FieldDescriptorE; google::protobuf::internal::ReflectionSchema::GetFieldOffset(google::protobuf::FieldDescriptor const*)
mov eax, eax
cmp dword ptr [rbx+rax], 0
jmp short loc_6CB0B
loc_6CAF9:
mov rdi, r15; jumptable 000000000006CAE4 cases 2,4,5
mov rsi, r14; google::protobuf::FieldDescriptor *
call _ZNK6google8protobuf8internal16ReflectionSchema14GetFieldOffsetEPKNS0_15FieldDescriptorE; google::protobuf::internal::ReflectionSchema::GetFieldOffset(google::protobuf::FieldDescriptor const*)
mov eax, eax
cmp qword ptr [rbx+rax], 0
loc_6CB0B:
setnz al
jmp short loc_6CB8D
loc_6CB10:
mov rdi, r15; jumptable 000000000006CAE4 case 7
mov rsi, r14; google::protobuf::FieldDescriptor *
call _ZNK6google8protobuf8internal16ReflectionSchema14GetFieldOffsetEPKNS0_15FieldDescriptorE; google::protobuf::internal::ReflectionSchema::GetFieldOffset(google::protobuf::FieldDescriptor const*)
mov eax, eax
mov al, [rbx+rax]
jmp short loc_6CB8D
loc_6CB22:
mov rdi, r15; jumptable 000000000006CAE4 case 9
mov rsi, r14; google::protobuf::FieldDescriptor *
call _ZNK6google8protobuf8internal16ReflectionSchema14IsFieldInlinedEPKNS0_15FieldDescriptorE; google::protobuf::internal::ReflectionSchema::IsFieldInlined(google::protobuf::FieldDescriptor const*)
mov ebp, eax
mov rdi, r15; this
mov rsi, r14; google::protobuf::FieldDescriptor *
call _ZNK6google8protobuf8internal16ReflectionSchema14GetFieldOffsetEPKNS0_15FieldDescriptorE; google::protobuf::internal::ReflectionSchema::GetFieldOffset(google::protobuf::FieldDescriptor const*)
mov eax, eax
test bpl, bpl
jz short loc_6CB9A
cmp qword ptr [rbx+rax+8], 0
jmp short loc_6CB0B
def_6CAE4:
lea rdx, aWorkspaceLlm4b_9; jumptable 000000000006CAE4 default case
lea rbx, [rsp+68h+var_60]
mov rdi, rbx
mov esi, 3
mov ecx, 0A39h
call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int)
lea rsi, aReachedImpossi; "Reached impossible case in HasBit()."
mov rdi, rbx
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
mov rdi, rsp
mov rsi, rax
call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &)
lea rdi, [rsp+68h+var_60]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_6CB8B:
xor eax, eax
loc_6CB8D:
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_6CB9A:
mov rax, [rbx+rax]
and rax, 0FFFFFFFFFFFFFFFCh
cmp qword ptr [rax+8], 0
jmp loc_6CB0B
jmp short $+2
loc_6CBAE:
mov rbx, rax
lea rdi, [rsp+arg_0]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
mov rdi, rbx
call __Unwind_Resume
| unsigned __int8 google::protobuf::Reflection::HasBit(
google::protobuf::Reflection *this,
const google::protobuf::Message *a2,
const google::protobuf::FieldDescriptor *a3)
{
google::protobuf::internal::ReflectionSchema *v4; // r15
long long v5; // rcx
long long v6; // r8
long long v7; // r9
char *v8; // rbx
unsigned int HasBitIndex; // eax
int v10; // ecx
unsigned __int8 result; // al
long long v12; // rdi
int v13; // eax
long long v14; // rdi
bool v15; // zf
char IsFieldInlined; // bp
unsigned int FieldOffset; // eax
google::protobuf::internal::LogMessage *v18; // rax
const google::protobuf::FieldDescriptor *v19; // [rsp+0h] [rbp-68h] BYREF
_QWORD v20[12]; // [rsp+8h] [rbp-60h] BYREF
v4 = (google::protobuf::Reflection *)((char *)this + 8);
if ( (unsigned int)google::protobuf::internal::ReflectionSchema::HasBitIndex(
(google::protobuf::Reflection *)((char *)this + 8),
a3) == -1 )
{
v12 = *((_QWORD *)a3 + 3);
if ( v12 )
{
v20[0] = google::protobuf::FieldDescriptor::TypeOnceInit;
v19 = a3;
std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(
v12,
(long long)v20,
(long long)&v19,
v5,
v6,
v7);
}
v13 = google::protobuf::FieldDescriptor::kTypeToCppTypeMap[*((unsigned __int8 *)a3 + 2)];
if ( v13 == 10 )
{
if ( *(const google::protobuf::Message **)v4 == a2 )
{
return 0;
}
else
{
LABEL_12:
v15 = *(_QWORD *)((char *)a2 + (unsigned int)google::protobuf::internal::ReflectionSchema::GetFieldOffset(
v4,
a3)) == 0LL;
return !v15;
}
}
else
{
v14 = *((_QWORD *)a3 + 3);
if ( v14 )
{
v20[0] = google::protobuf::FieldDescriptor::TypeOnceInit;
v19 = a3;
std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(
v14,
(long long)v20,
(long long)&v19,
v5,
v6,
v7);
v13 = google::protobuf::FieldDescriptor::kTypeToCppTypeMap[*((unsigned __int8 *)a3 + 2)];
}
switch ( v13 )
{
case 1:
case 3:
case 6:
case 8:
v15 = *(_DWORD *)((char *)a2
+ (unsigned int)google::protobuf::internal::ReflectionSchema::GetFieldOffset(v4, a3)) == 0;
return !v15;
case 2:
case 4:
case 5:
goto LABEL_12;
case 7:
result = *((_BYTE *)a2 + (unsigned int)google::protobuf::internal::ReflectionSchema::GetFieldOffset(v4, a3));
break;
case 9:
IsFieldInlined = google::protobuf::internal::ReflectionSchema::IsFieldInlined(v4, a3);
FieldOffset = google::protobuf::internal::ReflectionSchema::GetFieldOffset(v4, a3);
if ( IsFieldInlined )
v15 = *(_QWORD *)((char *)a2 + FieldOffset + 8) == 0LL;
else
v15 = *(_QWORD *)((*(_QWORD *)((_BYTE *)a2 + FieldOffset) & 0xFFFFFFFFFFFFFFFCLL) + 8) == 0LL;
return !v15;
default:
google::protobuf::internal::LogMessage::LogMessage(
(long long)v20,
3,
(long long)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/generated_"
"message_reflection.cc",
2617);
v18 = (google::protobuf::internal::LogMessage *)google::protobuf::internal::LogMessage::operator<<(
(long long)v20,
(long long)"Reached impossible case in HasBit().");
google::protobuf::internal::LogFinisher::operator=((long long)&v19, v18);
google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v20);
return 0;
}
}
}
else
{
v8 = (char *)a2 + *((unsigned int *)this + 8);
HasBitIndex = google::protobuf::internal::ReflectionSchema::HasBitIndex(v4, a3);
v10 = *(_DWORD *)&v8[4 * (HasBitIndex >> 5)];
return _bittest(&v10, HasBitIndex);
}
return result;
}
| HasBit:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R14,RDX
MOV RBX,RSI
MOV R12,RDI
LEA R15,[RDI + 0x8]
MOV RDI,R15
MOV RSI,RDX
CALL 0x0016de24
CMP EAX,-0x1
JZ 0x0016ca61
MOV EAX,dword ptr [R12 + 0x20]
ADD RBX,RAX
MOV RDI,R15
MOV RSI,R14
CALL 0x0016de24
MOV ECX,EAX
SHR ECX,0x5
MOV ECX,dword ptr [RBX + RCX*0x4]
BT ECX,EAX
SETC AL
JMP 0x0016cb8d
LAB_0016ca61:
MOV RDI,qword ptr [R14 + 0x18]
TEST RDI,RDI
JZ 0x0016ca84
LEA RAX,[0x13ac20]
LEA RSI,[RSP + 0x8]
MOV qword ptr [RSI],RAX
MOV RDX,RSP
MOV qword ptr [RDX],R14
CALL 0x0013fc96
LAB_0016ca84:
MOVZX EAX,byte ptr [R14 + 0x2]
LEA R12,[0x1b5c20]
MOV EAX,dword ptr [R12 + RAX*0x4]
CMP EAX,0xa
JNZ 0x0016caa3
CMP qword ptr [R15],RBX
JNZ 0x0016caf9
JMP 0x0016cb8b
LAB_0016caa3:
MOV RDI,qword ptr [R14 + 0x18]
TEST RDI,RDI
JZ 0x0016cacf
LEA RAX,[0x13ac20]
LEA RSI,[RSP + 0x8]
MOV qword ptr [RSI],RAX
MOV RDX,RSP
MOV qword ptr [RDX],R14
CALL 0x0013fc96
MOVZX EAX,byte ptr [R14 + 0x2]
MOV EAX,dword ptr [R12 + RAX*0x4]
LAB_0016cacf:
DEC EAX
CMP EAX,0x8
JA 0x0016cb49
LEA RCX,[0x1b99b8]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_1:
MOV RDI,R15
MOV RSI,R14
CALL 0x0016ea6a
MOV EAX,EAX
CMP dword ptr [RBX + RAX*0x1],0x0
JMP 0x0016cb0b
caseD_2:
MOV RDI,R15
MOV RSI,R14
CALL 0x0016ea6a
MOV EAX,EAX
CMP qword ptr [RBX + RAX*0x1],0x0
LAB_0016cb0b:
SETNZ AL
JMP 0x0016cb8d
caseD_7:
MOV RDI,R15
MOV RSI,R14
CALL 0x0016ea6a
MOV EAX,EAX
MOV AL,byte ptr [RBX + RAX*0x1]
JMP 0x0016cb8d
caseD_9:
MOV RDI,R15
MOV RSI,R14
CALL 0x0016e994
MOV EBP,EAX
MOV RDI,R15
MOV RSI,R14
CALL 0x0016ea6a
MOV EAX,EAX
TEST BPL,BPL
JZ 0x0016cb9a
CMP qword ptr [RBX + RAX*0x1 + 0x8],0x0
JMP 0x0016cb0b
default:
LEA RDX,[0x1b9ae8]
LEA RBX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0x3
MOV ECX,0xa39
CALL 0x001169ca
LAB_0016cb67:
LEA RSI,[0x1ba5aa]
MOV RDI,RBX
CALL 0x001164c8
LAB_0016cb76:
MOV RDI,RSP
MOV RSI,RAX
CALL 0x001165a2
LAB_0016cb81:
LEA RDI,[RSP + 0x8]
CALL 0x001169e8
LAB_0016cb8b:
XOR EAX,EAX
LAB_0016cb8d:
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0016cb9a:
MOV RAX,qword ptr [RBX + RAX*0x1]
AND RAX,-0x4
CMP qword ptr [RAX + 0x8],0x0
JMP 0x0016cb0b
|
/* google::protobuf::Reflection::HasBit(google::protobuf::Message const&,
google::protobuf::FieldDescriptor const*) const */
Message __thiscall
google::protobuf::Reflection::HasBit(Reflection *this,Message *param_1,FieldDescriptor *param_2)
{
ReflectionSchema *this_00;
char cVar1;
Message MVar2;
int iVar3;
uint uVar4;
ulong uVar5;
LogMessage *pLVar6;
bool bVar7;
FieldDescriptor *local_68;
code *local_60 [7];
this_00 = (ReflectionSchema *)(this + 8);
iVar3 = internal::ReflectionSchema::HasBitIndex(this_00,param_2);
if (iVar3 != -1) {
uVar4 = *(uint *)(this + 0x20);
uVar5 = internal::ReflectionSchema::HasBitIndex(this_00,param_2);
return (Message)((*(uint *)(param_1 + (uVar5 >> 5 & 0x7ffffff) * 4 + (ulong)uVar4) >>
((uint)uVar5 & 0x1f) & 1) != 0);
}
if (*(once_flag **)(param_2 + 0x18) != (once_flag *)0x0) {
local_60[0] = FieldDescriptor::TypeOnceInit;
local_68 = param_2;
std::
call_once<void(*)(google::protobuf::FieldDescriptor_const*),google::protobuf::FieldDescriptor_const*>
(*(once_flag **)(param_2 + 0x18),(_func_void_FieldDescriptor_ptr *)local_60,&local_68)
;
}
iVar3 = *(int *)(FieldDescriptor::kTypeToCppTypeMap + (ulong)(byte)param_2[2] * 4);
if (iVar3 == 10) {
if (*(Message **)this_00 != param_1) {
switchD_0016cae4_caseD_2:
uVar4 = internal::ReflectionSchema::GetFieldOffset(this_00,param_2);
bVar7 = *(long *)(param_1 + uVar4) == 0;
goto LAB_0016cb0b;
}
LAB_0016cb8b:
MVar2 = (Message)0x0;
}
else {
if (*(once_flag **)(param_2 + 0x18) != (once_flag *)0x0) {
local_60[0] = FieldDescriptor::TypeOnceInit;
local_68 = param_2;
std::
call_once<void(*)(google::protobuf::FieldDescriptor_const*),google::protobuf::FieldDescriptor_const*>
(*(once_flag **)(param_2 + 0x18),(_func_void_FieldDescriptor_ptr *)local_60,
&local_68);
iVar3 = *(int *)(FieldDescriptor::kTypeToCppTypeMap + (ulong)(byte)param_2[2] * 4);
}
switch(iVar3) {
case 1:
case 3:
case 6:
case 8:
uVar4 = internal::ReflectionSchema::GetFieldOffset(this_00,param_2);
bVar7 = *(int *)(param_1 + uVar4) == 0;
break;
case 2:
case 4:
case 5:
goto switchD_0016cae4_caseD_2;
case 7:
uVar4 = internal::ReflectionSchema::GetFieldOffset(this_00,param_2);
return param_1[uVar4];
case 9:
cVar1 = internal::ReflectionSchema::IsFieldInlined(this_00,param_2);
uVar4 = internal::ReflectionSchema::GetFieldOffset(this_00,param_2);
if (cVar1 == '\0') {
bVar7 = *(long *)((*(ulong *)(param_1 + uVar4) & 0xfffffffffffffffc) + 8) == 0;
}
else {
bVar7 = *(long *)(param_1 + (ulong)uVar4 + 8) == 0;
}
break;
default:
internal::LogMessage::LogMessage
((LogMessage *)local_60,3,
"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/generated_message_reflection.cc"
,0xa39);
/* try { // try from 0016cb67 to 0016cb75 has its CatchHandler @ 0016cbae */
pLVar6 = (LogMessage *)
internal::LogMessage::operator<<
((LogMessage *)local_60,"Reached impossible case in HasBit().");
/* try { // try from 0016cb76 to 0016cb80 has its CatchHandler @ 0016cbac */
internal::LogFinisher::operator=((LogFinisher *)&local_68,pLVar6);
internal::LogMessage::~LogMessage((LogMessage *)local_60);
goto LAB_0016cb8b;
}
LAB_0016cb0b:
MVar2 = (Message)!bVar7;
}
return MVar2;
}
| |
40,567 | Unit::SetMaxPower(Powers, unsigned int) | SylCore-WoTLK/src/server/game/Entities/Unit/Unit.cpp | void Unit::SetMaxPower(Powers power, uint32 val)
{
uint32 cur_power = GetPower(power);
SetStatInt32Value(static_cast<uint16>(UNIT_FIELD_MAXPOWER1) + power, val);
// group update
if (IsPlayer())
{
Player* player = ToPlayer();
if (getPowerType() == power && player->NeedSendSpectatorData())
ArenaSpectator::SendCommand_UInt32Value(FindMap(), GetGUID(), "MPW", power == POWER_RAGE || power == POWER_RUNIC_POWER ? val / 10 : val);
if (player->GetGroup())
player->SetGroupUpdateFlag(GROUP_UPDATE_FLAG_MAX_POWER);
}
else if (Pet* pet = ToCreature()->ToPet())
{
if (pet->isControlled())
{
Unit* owner = GetOwner();
if (owner && (owner->IsPlayer()) && owner->ToPlayer()->GetGroup())
owner->ToPlayer()->SetGroupUpdateFlag(GROUP_UPDATE_FLAG_PET_MAX_POWER);
}
}
if (val < cur_power)
SetPower(power, val);
} | O3 | cpp | Unit::SetMaxPower(Powers, unsigned int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %edx, %ebx
movl %esi, %r14d
movq %rdi, %r15
leal 0x19(%r14), %esi
movl $0xffff, %r12d # imm = 0xFFFF
andl %r12d, %esi
callq 0xa96762
movl %eax, %ebp
leal 0x21(%r14), %esi
andl %r12d, %esi
movq %r15, %rdi
movl %ebx, %edx
callq 0xa99454
movl 0x44(%r15), %ecx
cmpl $0x4, %ecx
jne 0xb6f4ef
movq %r15, %rdi
movl $0x17, %esi
movl $0x3, %edx
callq 0xa97c60
movzbl %al, %eax
cmpl %r14d, %eax
jne 0xb6f4d5
movq %r15, %rdi
callq 0xabf36e
testb %al, %al
je 0xb6f4d5
movq 0x270(%r15), %r12
movq %r15, %rdi
xorl %esi, %esi
callq 0xa97f5e
cmpl $0x6, %r14d
je 0xb6f47b
movl %ebx, %ecx
cmpl $0x1, %r14d
jne 0xb6f48a
movl %ebx, %edx
movl $0xcccccccd, %ecx # imm = 0xCCCCCCCD
imulq %rdx, %rcx
shrq $0x23, %rcx
leaq 0x5dd401(%rip), %rdx # 0x114c892
movq %rdx, 0x10(%rsp)
movl %ecx, 0xc(%rsp)
leaq -0x1(%rax), %rcx
movabsq $0xfffffffffffe, %rdx # imm = 0xFFFFFFFFFFFE
cmpq %rdx, %rcx
ja 0xb6f4d5
leaq 0x18(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x5dd409(%rip), %rsi # 0x114c8c5
leaq 0x5b6be5(%rip), %rdx # 0x11260a8
leaq 0x10(%rsp), %r8
leaq 0xc(%rsp), %r9
movq %r12, %rdi
callq 0xafb3f9
movl $0x20, %ecx
cmpq $0x0, 0x3a70(%r15)
movq %r15, %rax
je 0xb6f531
orl %ecx, 0x3ac0(%rax)
jmp 0xb6f531
xorl %eax, %eax
cmpl $0x3, %ecx
cmoveq %r15, %rax
jne 0xb6f531
movl 0x2768(%rax), %eax
andl $0x10, %eax
je 0xb6f531
cmpb $0x1, 0x2cd4(%r15)
ja 0xb6f531
movq %r15, %rdi
callq 0xb5da4e
testq %rax, %rax
je 0xb6f531
cmpl $0x4, 0x44(%rax)
jne 0xb6f531
movl $0x20000, %ecx # imm = 0x20000
cmpq $0x0, 0x3a70(%rax)
jne 0xb6f4e7
cmpl %ebx, %ebp
jbe 0xb6f54a
movq %r15, %rdi
movl %r14d, %esi
movl %ebx, %edx
movl $0x1, %ecx
xorl %r8d, %r8d
callq 0xb6f558
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
| _ZN4Unit11SetMaxPowerE6Powersj:
push rbp
push r15
push r14; __int64
push r12; int
push rbx; __int64
sub rsp, 20h
mov ebx, edx
mov r14d, esi
mov r15, rdi
lea esi, [r14+19h]
mov r12d, 0FFFFh
and esi, r12d; unsigned __int16
call _ZNK6Object14GetUInt32ValueEt; Object::GetUInt32Value(ushort)
mov ebp, eax
lea esi, [r14+21h]
and esi, r12d; unsigned __int16
mov rdi, r15; this
mov edx, ebx; int
call _ZN6Object17SetStatInt32ValueEti; Object::SetStatInt32Value(ushort,int)
mov ecx, [r15+44h]
cmp ecx, 4
jnz loc_B6F4EF
mov rdi, r15; this
mov esi, 17h; unsigned __int16
mov edx, 3; unsigned __int8
call _ZNK6Object12GetByteValueEth; Object::GetByteValue(ushort,uchar)
movzx eax, al
cmp eax, r14d
jnz loc_B6F4D5
mov rdi, r15; this
call _ZNK6Player21NeedSendSpectatorDataEv; Player::NeedSendSpectatorData(void)
test al, al
jz short loc_B6F4D5
mov r12, [r15+270h]
mov rdi, r15; this
xor esi, esi; unsigned __int16
call _ZNK6Object12GetGuidValueEt; Object::GetGuidValue(ushort)
cmp r14d, 6
jz short loc_B6F47B
mov ecx, ebx
cmp r14d, 1
jnz short loc_B6F48A
loc_B6F47B:
mov edx, ebx
mov ecx, 0CCCCCCCDh
imul rcx, rdx
shr rcx, 23h
loc_B6F48A:
lea rdx, aMpw; "MPW"
mov [rsp+48h+var_38], rdx
mov [rsp+48h+var_3C], ecx
lea rcx, [rax-1]
mov rdx, 0FFFFFFFFFFFEh
cmp rcx, rdx
ja short loc_B6F4D5
lea rcx, [rsp+48h+var_30]
mov [rcx], rax
lea rsi, aS0x016llxSU; "%s0x%016llX;%s=%u;"
lea rdx, aAssun; "ASSUN\t"
lea r8, [rsp+48h+var_38]
lea r9, [rsp+48h+var_3C]
mov rdi, r12
call _ZN14ArenaSpectator11SendCommandI3MapRA19_KcJRA7_S2_mRPS2_RjEEEvPT_OT0_DpOT1_; ArenaSpectator::SendCommand<Map,char const(&)[19],char const(&)[7],ulong,char const*&,uint &>(Map *,char const(&)[19] &&,char const(&)[7],ulong,char const*&,uint &)
loc_B6F4D5:
mov ecx, 20h ; ' '
cmp qword ptr [r15+3A70h], 0
mov rax, r15
jz short loc_B6F531
loc_B6F4E7:
or [rax+3AC0h], ecx
jmp short loc_B6F531
loc_B6F4EF:
xor eax, eax
cmp ecx, 3
cmovz rax, r15
jnz short loc_B6F531
mov eax, [rax+2768h]
and eax, 10h
jz short loc_B6F531
cmp byte ptr [r15+2CD4h], 1
ja short loc_B6F531
mov rdi, r15; this
call _ZNK4Unit8GetOwnerEv; Unit::GetOwner(void)
test rax, rax
jz short loc_B6F531
cmp dword ptr [rax+44h], 4
jnz short loc_B6F531
mov ecx, 20000h
cmp qword ptr [rax+3A70h], 0
jnz short loc_B6F4E7
loc_B6F531:
cmp ebp, ebx
jbe short loc_B6F54A
mov rdi, r15; this
mov esi, r14d
mov edx, ebx
mov ecx, 1
xor r8d, r8d
call _ZN4Unit8SetPowerE6Powersjbb; Unit::SetPower(Powers,uint,bool,bool)
loc_B6F54A:
add rsp, 20h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long Unit::SetMaxPower(Unit *this, int a2, unsigned int a3)
{
unsigned int UInt32Value; // ebp
int v5; // ecx
long long v6; // r12
long long GuidValue; // rax
unsigned int v8; // ecx
int v9; // ecx
long long result; // rax
int v11; // [rsp+0h] [rbp-48h]
long long v12; // [rsp+8h] [rbp-40h] BYREF
const char *v13; // [rsp+10h] [rbp-38h] BYREF
long long v14[2]; // [rsp+18h] [rbp-30h] BYREF
int v15; // [rsp+28h] [rbp-20h]
long long v16; // [rsp+30h] [rbp-18h]
UInt32Value = Object::GetUInt32Value(this, (unsigned __int16)a2 + 25);
Object::SetStatInt32Value(this, a2 + 33, a3);
v5 = *((_DWORD *)this + 17);
if ( v5 != 4 )
{
result = 0LL;
if ( v5 != 3 )
goto LABEL_17;
result = *((_DWORD *)this + 2522) & 0x10;
if ( !(_DWORD)result )
goto LABEL_17;
if ( *((_BYTE *)this + 11476) > 1u )
goto LABEL_17;
result = Unit::GetOwner(this);
if ( !result )
goto LABEL_17;
if ( *(_DWORD *)(result + 68) != 4 )
goto LABEL_17;
v9 = 0x20000;
if ( !*(_QWORD *)(result + 14960) )
goto LABEL_17;
goto LABEL_10;
}
if ( (unsigned __int8)Object::GetByteValue(this, 0x17u, 3u) == a2
&& (unsigned __int8)Player::NeedSendSpectatorData(this) )
{
v6 = *((_QWORD *)this + 78);
GuidValue = Object::GetGuidValue(this, 0);
if ( a2 == 6 || (v8 = a3, a2 == 1) )
v8 = a3 / 0xA;
v13 = "MPW";
HIDWORD(v12) = v8;
if ( (unsigned long long)(GuidValue - 1) <= 0xFFFFFFFFFFFELL )
{
v14[0] = GuidValue;
ArenaSpectator::SendCommand<Map,char const(&)[19],char const(&)[7],unsigned long,char const*&,unsigned int &>(
v6,
(long long)"%s0x%016llX;%s=%u;",
(long long)"ASSUN\t",
v14,
(long long *)&v13,
(unsigned int *)&v12 + 1);
}
}
v9 = 32;
result = (long long)this;
if ( *((_QWORD *)this + 1870) )
LABEL_10:
*(_DWORD *)(result + 15040) |= v9;
LABEL_17:
if ( UInt32Value > a3 )
return Unit::SetPower(this, v11, v12, (int)v13, v14[0], v14[1], v15, v16);
return result;
}
| IsDamageEnoughForLootingAndReward:
MOV RCX,qword ptr [RDI + 0x2bc8]
MOV AL,0x1
TEST byte ptr [RCX + 0x1ba],0x20
JNZ 0x00b6f409
CMP dword ptr [RDI + 0x2c30],0x0
JZ 0x00b6f40a
XOR EAX,EAX
LAB_00b6f409:
RET
LAB_00b6f40a:
MOV AL,byte ptr [RDI + 0x2c34]
RET
|
/* Creature::IsDamageEnoughForLootingAndReward() const */
Creature __thiscall Creature::IsDamageEnoughForLootingAndReward(Creature *this)
{
Creature CVar1;
CVar1 = (Creature)0x1;
if ((*(byte *)(*(long *)(this + 0x2bc8) + 0x1ba) & 0x20) == 0) {
if (*(int *)(this + 0x2c30) == 0) {
return this[0x2c34];
}
CVar1 = (Creature)0x0;
}
return CVar1;
}
| |
40,568 | js_worker_ctor | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_worker_ctor(JSContext *ctx, JSValue new_target,
int argc, JSValue *argv)
{
JSRuntime *rt = JS_GetRuntime(ctx);
WorkerFuncArgs *args = NULL;
pthread_t tid;
pthread_attr_t attr;
JSValue obj = JS_UNDEFINED;
int ret;
const char *filename = NULL, *basename;
JSAtom basename_atom;
/* XXX: in order to avoid problems with resource liberation, we
don't support creating workers inside workers */
if (!is_main_thread(rt))
return JS_ThrowTypeError(ctx, "cannot create a worker inside a worker");
/* base name, assuming the calling function is a normal JS
function */
basename_atom = JS_GetScriptOrModuleName(ctx, 1);
if (basename_atom == JS_ATOM_NULL) {
return JS_ThrowTypeError(ctx, "could not determine calling script or module name");
}
basename = JS_AtomToCString(ctx, basename_atom);
JS_FreeAtom(ctx, basename_atom);
if (!basename)
goto fail;
/* module name */
filename = JS_ToCString(ctx, argv[0]);
if (!filename)
goto fail;
args = malloc(sizeof(*args));
if (!args)
goto oom_fail;
memset(args, 0, sizeof(*args));
args->filename = strdup(filename);
args->basename = strdup(basename);
/* ports */
args->recv_pipe = js_new_message_pipe();
if (!args->recv_pipe)
goto oom_fail;
args->send_pipe = js_new_message_pipe();
if (!args->send_pipe)
goto oom_fail;
obj = js_worker_ctor_internal(ctx, new_target,
args->send_pipe, args->recv_pipe);
if (JS_IsException(obj))
goto fail;
pthread_attr_init(&attr);
/* no join at the end */
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
// musl libc gives threads 80 kb stacks, much smaller than
// JS_DEFAULT_STACK_SIZE (1 MB)
pthread_attr_setstacksize(&attr, 2 << 20); // 2 MB, glibc default
ret = pthread_create(&tid, &attr, worker_func, args);
pthread_attr_destroy(&attr);
if (ret != 0) {
JS_ThrowTypeError(ctx, "could not create worker");
goto fail;
}
JS_FreeCString(ctx, basename);
JS_FreeCString(ctx, filename);
return obj;
oom_fail:
JS_ThrowOutOfMemory(ctx);
fail:
JS_FreeCString(ctx, basename);
JS_FreeCString(ctx, filename);
if (args) {
free(args->filename);
free(args->basename);
js_free_message_pipe(args->recv_pipe);
js_free_message_pipe(args->send_pipe);
free(args);
}
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
} | O0 | c | js_worker_ctor:
subq $0xe8, %rsp
movq %rsi, 0xc8(%rsp)
movq %rdx, 0xd0(%rsp)
movq %rdi, 0xc0(%rsp)
movl %ecx, 0xbc(%rsp)
movq %r8, 0xb0(%rsp)
movq 0xc0(%rsp), %rdi
callq 0x26c40
movq %rax, 0xa8(%rsp)
movq $0x0, 0xa0(%rsp)
movq 0xf34f2(%rip), %rax # 0x108b88
movq %rax, 0x50(%rsp)
movq 0xf34ee(%rip), %rax # 0x108b90
movq %rax, 0x58(%rsp)
movq $0x0, 0x40(%rsp)
movq 0xa8(%rsp), %rdi
callq 0x16530
cmpl $0x0, %eax
jne 0x156ed
movq 0xc0(%rsp), %rdi
leaq 0xf3053(%rip), %rsi # 0x108724
movb $0x0, %al
callq 0x2c040
movq %rax, 0xd8(%rsp)
movq %rdx, 0xe0(%rsp)
jmp 0x15a40
movq 0xc0(%rsp), %rdi
movl $0x1, %esi
callq 0x48ea0
movl %eax, 0x34(%rsp)
cmpl $0x0, 0x34(%rsp)
jne 0x15735
movq 0xc0(%rsp), %rdi
leaq 0xf3032(%rip), %rsi # 0x10874b
movb $0x0, %al
callq 0x2c040
movq %rax, 0xd8(%rsp)
movq %rdx, 0xe0(%rsp)
jmp 0x15a40
movq 0xc0(%rsp), %rdi
movl 0x34(%rsp), %esi
callq 0x27e10
movq %rax, 0x38(%rsp)
movq 0xc0(%rsp), %rdi
movl 0x34(%rsp), %esi
callq 0x27d80
cmpq $0x0, 0x38(%rsp)
jne 0x15769
jmp 0x15993
movq 0xc0(%rsp), %rdi
movq 0xb0(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0x13520
movq %rax, 0x40(%rsp)
cmpq $0x0, 0x40(%rsp)
jne 0x15797
jmp 0x15993
movl $0x20, %edi
callq 0xe650
movq %rax, 0xa0(%rsp)
cmpq $0x0, 0xa0(%rsp)
jne 0x157b9
jmp 0x1597d
movq 0xa0(%rsp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0xe340
movq 0x40(%rsp), %rdi
callq 0xe8d0
movq %rax, %rcx
movq 0xa0(%rsp), %rax
movq %rcx, (%rax)
movq 0x38(%rsp), %rdi
callq 0xe8d0
movq %rax, %rcx
movq 0xa0(%rsp), %rax
movq %rcx, 0x8(%rax)
callq 0x16570
movq %rax, %rcx
movq 0xa0(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0xa0(%rsp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x15826
jmp 0x1597d
callq 0x16570
movq %rax, %rcx
movq 0xa0(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0xa0(%rsp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x1584e
jmp 0x1597d
movq 0xc0(%rsp), %rdi
movq 0xa0(%rsp), %rax
movq 0x18(%rax), %rcx
movq 0xa0(%rsp), %rax
movq 0x10(%rax), %r8
movq 0xc8(%rsp), %rsi
movq 0xd0(%rsp), %rdx
callq 0x15a60
movq %rax, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x50(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0xf0d0
cmpl $0x0, %eax
je 0x158ba
jmp 0x15993
leaq 0x60(%rsp), %rdi
callq 0xe480
leaq 0x60(%rsp), %rdi
movl $0x1, %esi
callq 0xe620
leaq 0x60(%rsp), %rdi
movl $0x200000, %esi # imm = 0x200000
callq 0xe980
movq 0xa0(%rsp), %rcx
leaq 0x98(%rsp), %rdi
leaq 0x60(%rsp), %rsi
leaq 0xd22(%rip), %rdx # 0x16620
callq 0xe6f0
movl %eax, 0x4c(%rsp)
leaq 0x60(%rsp), %rdi
callq 0xe830
cmpl $0x0, 0x4c(%rsp)
je 0x1593a
movq 0xc0(%rsp), %rdi
leaq 0xf2e56(%rip), %rsi # 0x10877d
movb $0x0, %al
callq 0x2c040
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
jmp 0x15993
movq 0xc0(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x28b90
movq 0xc0(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x28b90
movq 0x50(%rsp), %rax
movq %rax, 0xd8(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0xe0(%rsp)
jmp 0x15a40
movq 0xc0(%rsp), %rdi
callq 0x20950
movq %rax, (%rsp)
movq %rdx, 0x8(%rsp)
movq 0xc0(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x28b90
movq 0xc0(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x28b90
cmpq $0x0, 0xa0(%rsp)
je 0x15a12
movq 0xa0(%rsp), %rax
movq (%rax), %rdi
callq 0xe060
movq 0xa0(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0xe060
movq 0xa0(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x10440
movq 0xa0(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x10440
movq 0xa0(%rsp), %rdi
callq 0xe060
movq 0xc0(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
callq 0x229d0
movl $0x0, 0xd8(%rsp)
movq $0x6, 0xe0(%rsp)
movq 0xd8(%rsp), %rax
movq 0xe0(%rsp), %rdx
addq $0xe8, %rsp
retq
nopl (%rax,%rax)
| js_worker_ctor:
sub rsp, 0E8h
mov [rsp+0E8h+var_20], rsi
mov [rsp+0E8h+var_18], rdx
mov [rsp+0E8h+var_28], rdi
mov [rsp+0E8h+var_2C], ecx
mov [rsp+0E8h+var_38], r8
mov rdi, [rsp+0E8h+var_28]
call JS_GetRuntime
mov [rsp+0E8h+var_40], rax
mov [rsp+0E8h+var_48], 0
mov rax, cs:qword_108B88
mov [rsp+0E8h+var_98], rax
mov rax, cs:qword_108B90
mov [rsp+0E8h+var_90], rax
mov [rsp+0E8h+var_A8], 0
mov rdi, [rsp+0E8h+var_40]
call is_main_thread
cmp eax, 0
jnz short loc_156ED
mov rdi, [rsp+0E8h+var_28]
lea rsi, aCannotCreateAW; "cannot create a worker inside a worker"
mov al, 0
call JS_ThrowTypeError
mov [rsp+0E8h+var_10], rax
mov [rsp+0E8h+var_8], rdx
jmp loc_15A40
loc_156ED:
mov rdi, [rsp+0E8h+var_28]
mov esi, 1
call JS_GetScriptOrModuleName
mov [rsp+0E8h+var_B4], eax
cmp [rsp+0E8h+var_B4], 0
jnz short loc_15735
mov rdi, [rsp+0E8h+var_28]
lea rsi, aCouldNotDeterm; "could not determine calling script or m"...
mov al, 0
call JS_ThrowTypeError
mov [rsp+0E8h+var_10], rax
mov [rsp+0E8h+var_8], rdx
jmp loc_15A40
loc_15735:
mov rdi, [rsp+0E8h+var_28]
mov esi, [rsp+0E8h+var_B4]
call JS_AtomToCString
mov [rsp+0E8h+var_B0], rax
mov rdi, [rsp+0E8h+var_28]
mov esi, [rsp+0E8h+var_B4]
call JS_FreeAtom
cmp [rsp+0E8h+var_B0], 0
jnz short loc_15769
jmp loc_15993
loc_15769:
mov rdi, [rsp+0E8h+var_28]
mov rax, [rsp+0E8h+var_38]
mov rsi, [rax]
mov rdx, [rax+8]
call JS_ToCString
mov [rsp+0E8h+var_A8], rax
cmp [rsp+0E8h+var_A8], 0
jnz short loc_15797
jmp loc_15993
loc_15797:
mov edi, 20h ; ' '
call _malloc
mov [rsp+0E8h+var_48], rax
cmp [rsp+0E8h+var_48], 0
jnz short loc_157B9
jmp loc_1597D
loc_157B9:
mov rdi, [rsp+0E8h+var_48]
xor esi, esi
mov edx, 20h ; ' '
call _memset
mov rdi, [rsp+0E8h+var_A8]
call _strdup
mov rcx, rax
mov rax, [rsp+0E8h+var_48]
mov [rax], rcx
mov rdi, [rsp+0E8h+var_B0]
call _strdup
mov rcx, rax
mov rax, [rsp+0E8h+var_48]
mov [rax+8], rcx
call js_new_message_pipe
mov rcx, rax
mov rax, [rsp+0E8h+var_48]
mov [rax+10h], rcx
mov rax, [rsp+0E8h+var_48]
cmp qword ptr [rax+10h], 0
jnz short loc_15826
jmp loc_1597D
loc_15826:
call js_new_message_pipe
mov rcx, rax
mov rax, [rsp+0E8h+var_48]
mov [rax+18h], rcx
mov rax, [rsp+0E8h+var_48]
cmp qword ptr [rax+18h], 0
jnz short loc_1584E
jmp loc_1597D
loc_1584E:
mov rdi, [rsp+0E8h+var_28]
mov rax, [rsp+0E8h+var_48]
mov rcx, [rax+18h]
mov rax, [rsp+0E8h+var_48]
mov r8, [rax+10h]
mov rsi, [rsp+0E8h+var_20]
mov rdx, [rsp+0E8h+var_18]
call js_worker_ctor_internal
mov [rsp+0E8h+var_C8], rax
mov [rsp+0E8h+var_C0], rdx
mov rax, [rsp+0E8h+var_C8]
mov [rsp+0E8h+var_98], rax
mov rax, [rsp+0E8h+var_C0]
mov [rsp+0E8h+var_90], rax
mov rdi, [rsp+0E8h+var_98]
mov rsi, [rsp+0E8h+var_90]
call JS_IsException_0
cmp eax, 0
jz short loc_158BA
jmp loc_15993
loc_158BA:
lea rdi, [rsp+0E8h+var_88]
call _pthread_attr_init
lea rdi, [rsp+0E8h+var_88]
mov esi, 1
call _pthread_attr_setdetachstate
lea rdi, [rsp+0E8h+var_88]
mov esi, 200000h
call _pthread_attr_setstacksize
mov rcx, [rsp+0E8h+var_48]
lea rdi, [rsp+0E8h+var_50]
lea rsi, [rsp+0E8h+var_88]
lea rdx, worker_func
call _pthread_create
mov [rsp+0E8h+var_9C], eax
lea rdi, [rsp+0E8h+var_88]
call _pthread_attr_destroy
cmp [rsp+0E8h+var_9C], 0
jz short loc_1593A
mov rdi, [rsp+0E8h+var_28]
lea rsi, aCouldNotCreate; "could not create worker"
mov al, 0
call JS_ThrowTypeError
mov [rsp+0E8h+var_D8], rax
mov [rsp+0E8h+var_D0], rdx
jmp short loc_15993
loc_1593A:
mov rdi, [rsp+0E8h+var_28]
mov rsi, [rsp+0E8h+var_B0]
call JS_FreeCString
mov rdi, [rsp+0E8h+var_28]
mov rsi, [rsp+0E8h+var_A8]
call JS_FreeCString
mov rax, [rsp+0E8h+var_98]
mov [rsp+0E8h+var_10], rax
mov rax, [rsp+0E8h+var_90]
mov [rsp+0E8h+var_8], rax
jmp loc_15A40
loc_1597D:
mov rdi, [rsp+0E8h+var_28]
call JS_ThrowOutOfMemory
mov [rsp+0E8h+var_E8], rax
mov [rsp+0E8h+var_E0], rdx
loc_15993:
mov rdi, [rsp+0E8h+var_28]
mov rsi, [rsp+0E8h+var_B0]
call JS_FreeCString
mov rdi, [rsp+0E8h+var_28]
mov rsi, [rsp+0E8h+var_A8]
call JS_FreeCString
cmp [rsp+0E8h+var_48], 0
jz short loc_15A12
mov rax, [rsp+0E8h+var_48]
mov rdi, [rax]
call _free
mov rax, [rsp+0E8h+var_48]
mov rdi, [rax+8]
call _free
mov rax, [rsp+0E8h+var_48]
mov rdi, [rax+10h]
call js_free_message_pipe
mov rax, [rsp+0E8h+var_48]
mov rdi, [rax+18h]
call js_free_message_pipe
mov rdi, [rsp+0E8h+var_48]
call _free
loc_15A12:
mov rdi, [rsp+0E8h+var_28]
mov rsi, [rsp+0E8h+var_98]
mov rdx, [rsp+0E8h+var_90]
call JS_FreeValue
mov dword ptr [rsp+0E8h+var_10], 0
mov [rsp+0E8h+var_8], 6
loc_15A40:
mov rax, [rsp+0E8h+var_10]
mov rdx, [rsp+0E8h+var_8]
add rsp, 0E8h
retn
| long long js_worker_ctor(long long a1, long long a2, long long a3, int a4, long long *a5)
{
int v5; // edx
int v6; // ecx
int v7; // r8d
int v8; // r9d
long long v9; // rdx
int v10; // edx
int v11; // ecx
int v12; // r8d
int v13; // r9d
long long v14; // rdx
long long v15; // rdx
int v16; // edx
int v17; // ecx
int v18; // r8d
int v19; // r9d
long long v21; // [rsp+20h] [rbp-C8h]
unsigned int ScriptOrModuleName; // [rsp+34h] [rbp-B4h]
long long v23; // [rsp+38h] [rbp-B0h]
long long v24; // [rsp+40h] [rbp-A8h]
int v25; // [rsp+4Ch] [rbp-9Ch]
long long v26; // [rsp+50h] [rbp-98h]
long long v27; // [rsp+58h] [rbp-90h]
_BYTE v28[56]; // [rsp+60h] [rbp-88h] BYREF
_BYTE v29[8]; // [rsp+98h] [rbp-50h] BYREF
_QWORD *v30; // [rsp+A0h] [rbp-48h]
long long Runtime; // [rsp+A8h] [rbp-40h]
long long *v32; // [rsp+B0h] [rbp-38h]
int v33; // [rsp+BCh] [rbp-2Ch]
long long v34; // [rsp+C0h] [rbp-28h]
long long v35; // [rsp+C8h] [rbp-20h]
long long v36; // [rsp+D0h] [rbp-18h]
long long v37; // [rsp+D8h] [rbp-10h]
long long v38; // [rsp+E0h] [rbp-8h]
v35 = a2;
v36 = a3;
v34 = a1;
v33 = a4;
v32 = a5;
Runtime = JS_GetRuntime(a1);
v30 = 0LL;
v26 = 0LL;
v27 = 3LL;
v24 = 0LL;
if ( (unsigned int)is_main_thread(Runtime) )
{
ScriptOrModuleName = JS_GetScriptOrModuleName(v34, 1LL);
if ( ScriptOrModuleName )
{
v23 = JS_AtomToCString(v34, ScriptOrModuleName);
JS_FreeAtom(v34, ScriptOrModuleName);
if ( v23 )
{
v24 = JS_ToCString(v34, *v32, v32[1]);
if ( v24 )
{
v30 = (_QWORD *)malloc(32LL);
if ( v30
&& (memset(v30, 0LL, 32LL), *v30 = strdup(v24),
v30[1] = strdup(v23),
(v30[2] = js_new_message_pipe()) != 0LL)
&& (v30[3] = js_new_message_pipe()) != 0LL )
{
v21 = js_worker_ctor_internal(v34, v35, v36, v30[3], v30[2]);
v26 = v21;
v27 = v15;
if ( !JS_IsException_0(v21, v15) )
{
pthread_attr_init(v28);
pthread_attr_setdetachstate(v28, 1LL);
pthread_attr_setstacksize(v28, 0x200000LL);
v25 = pthread_create(v29, v28, worker_func, v30);
pthread_attr_destroy(v28);
if ( !v25 )
{
JS_FreeCString(v34, v23);
JS_FreeCString(v34, v24);
v37 = v21;
v38 = v27;
return v37;
}
JS_ThrowTypeError(v34, (unsigned int)"could not create worker", v16, v17, v18, v19);
}
}
else
{
JS_ThrowOutOfMemory(v34);
}
}
}
JS_FreeCString(v34, v23);
JS_FreeCString(v34, v24);
if ( v30 )
{
free(*v30);
free(v30[1]);
js_free_message_pipe(v30[2]);
js_free_message_pipe(v30[3]);
free(v30);
}
JS_FreeValue(v34, v26, v27);
LODWORD(v37) = 0;
v38 = 6LL;
}
else
{
v37 = JS_ThrowTypeError(
v34,
(unsigned int)"could not determine calling script or module name",
v10,
v11,
v12,
v13);
v38 = v14;
}
}
else
{
v37 = JS_ThrowTypeError(v34, (unsigned int)"cannot create a worker inside a worker", v5, v6, v7, v8);
v38 = v9;
}
return v37;
}
| js_worker_ctor:
SUB RSP,0xe8
MOV qword ptr [RSP + 0xc8],RSI
MOV qword ptr [RSP + 0xd0],RDX
MOV qword ptr [RSP + 0xc0],RDI
MOV dword ptr [RSP + 0xbc],ECX
MOV qword ptr [RSP + 0xb0],R8
MOV RDI,qword ptr [RSP + 0xc0]
CALL 0x00126c40
MOV qword ptr [RSP + 0xa8],RAX
MOV qword ptr [RSP + 0xa0],0x0
MOV RAX,qword ptr [0x00208b88]
MOV qword ptr [RSP + 0x50],RAX
MOV RAX,qword ptr [0x00208b90]
MOV qword ptr [RSP + 0x58],RAX
MOV qword ptr [RSP + 0x40],0x0
MOV RDI,qword ptr [RSP + 0xa8]
CALL 0x00116530
CMP EAX,0x0
JNZ 0x001156ed
MOV RDI,qword ptr [RSP + 0xc0]
LEA RSI,[0x208724]
MOV AL,0x0
CALL 0x0012c040
MOV qword ptr [RSP + 0xd8],RAX
MOV qword ptr [RSP + 0xe0],RDX
JMP 0x00115a40
LAB_001156ed:
MOV RDI,qword ptr [RSP + 0xc0]
MOV ESI,0x1
CALL 0x00148ea0
MOV dword ptr [RSP + 0x34],EAX
CMP dword ptr [RSP + 0x34],0x0
JNZ 0x00115735
MOV RDI,qword ptr [RSP + 0xc0]
LEA RSI,[0x20874b]
MOV AL,0x0
CALL 0x0012c040
MOV qword ptr [RSP + 0xd8],RAX
MOV qword ptr [RSP + 0xe0],RDX
JMP 0x00115a40
LAB_00115735:
MOV RDI,qword ptr [RSP + 0xc0]
MOV ESI,dword ptr [RSP + 0x34]
CALL 0x00127e10
MOV qword ptr [RSP + 0x38],RAX
MOV RDI,qword ptr [RSP + 0xc0]
MOV ESI,dword ptr [RSP + 0x34]
CALL 0x00127d80
CMP qword ptr [RSP + 0x38],0x0
JNZ 0x00115769
JMP 0x00115993
LAB_00115769:
MOV RDI,qword ptr [RSP + 0xc0]
MOV RAX,qword ptr [RSP + 0xb0]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
CALL 0x00113520
MOV qword ptr [RSP + 0x40],RAX
CMP qword ptr [RSP + 0x40],0x0
JNZ 0x00115797
JMP 0x00115993
LAB_00115797:
MOV EDI,0x20
CALL 0x0010e650
MOV qword ptr [RSP + 0xa0],RAX
CMP qword ptr [RSP + 0xa0],0x0
JNZ 0x001157b9
JMP 0x0011597d
LAB_001157b9:
MOV RDI,qword ptr [RSP + 0xa0]
XOR ESI,ESI
MOV EDX,0x20
CALL 0x0010e340
MOV RDI,qword ptr [RSP + 0x40]
CALL 0x0010e8d0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RAX],RCX
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x0010e8d0
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RAX + 0x8],RCX
CALL 0x00116570
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RSP + 0xa0]
CMP qword ptr [RAX + 0x10],0x0
JNZ 0x00115826
JMP 0x0011597d
LAB_00115826:
CALL 0x00116570
MOV RCX,RAX
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RAX + 0x18],RCX
MOV RAX,qword ptr [RSP + 0xa0]
CMP qword ptr [RAX + 0x18],0x0
JNZ 0x0011584e
JMP 0x0011597d
LAB_0011584e:
MOV RDI,qword ptr [RSP + 0xc0]
MOV RAX,qword ptr [RSP + 0xa0]
MOV RCX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RSP + 0xa0]
MOV R8,qword ptr [RAX + 0x10]
MOV RSI,qword ptr [RSP + 0xc8]
MOV RDX,qword ptr [RSP + 0xd0]
CALL 0x00115a60
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x28],RDX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x50],RAX
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x58],RAX
MOV RDI,qword ptr [RSP + 0x50]
MOV RSI,qword ptr [RSP + 0x58]
CALL 0x0010f0d0
CMP EAX,0x0
JZ 0x001158ba
JMP 0x00115993
LAB_001158ba:
LEA RDI,[RSP + 0x60]
CALL 0x0010e480
LEA RDI,[RSP + 0x60]
MOV ESI,0x1
CALL 0x0010e620
LEA RDI,[RSP + 0x60]
MOV ESI,0x200000
CALL 0x0010e980
MOV RCX,qword ptr [RSP + 0xa0]
LEA RDI,[RSP + 0x98]
LEA RSI,[RSP + 0x60]
LEA RDX,[0x116620]
CALL 0x0010e6f0
MOV dword ptr [RSP + 0x4c],EAX
LEA RDI,[RSP + 0x60]
CALL 0x0010e830
CMP dword ptr [RSP + 0x4c],0x0
JZ 0x0011593a
MOV RDI,qword ptr [RSP + 0xc0]
LEA RSI,[0x20877d]
MOV AL,0x0
CALL 0x0012c040
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],RDX
JMP 0x00115993
LAB_0011593a:
MOV RDI,qword ptr [RSP + 0xc0]
MOV RSI,qword ptr [RSP + 0x38]
CALL 0x00128b90
MOV RDI,qword ptr [RSP + 0xc0]
MOV RSI,qword ptr [RSP + 0x40]
CALL 0x00128b90
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0xd8],RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0xe0],RAX
JMP 0x00115a40
LAB_0011597d:
MOV RDI,qword ptr [RSP + 0xc0]
CALL 0x00120950
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],RDX
LAB_00115993:
MOV RDI,qword ptr [RSP + 0xc0]
MOV RSI,qword ptr [RSP + 0x38]
CALL 0x00128b90
MOV RDI,qword ptr [RSP + 0xc0]
MOV RSI,qword ptr [RSP + 0x40]
CALL 0x00128b90
CMP qword ptr [RSP + 0xa0],0x0
JZ 0x00115a12
MOV RAX,qword ptr [RSP + 0xa0]
MOV RDI,qword ptr [RAX]
CALL 0x0010e060
MOV RAX,qword ptr [RSP + 0xa0]
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x0010e060
MOV RAX,qword ptr [RSP + 0xa0]
MOV RDI,qword ptr [RAX + 0x10]
CALL 0x00110440
MOV RAX,qword ptr [RSP + 0xa0]
MOV RDI,qword ptr [RAX + 0x18]
CALL 0x00110440
MOV RDI,qword ptr [RSP + 0xa0]
CALL 0x0010e060
LAB_00115a12:
MOV RDI,qword ptr [RSP + 0xc0]
MOV RSI,qword ptr [RSP + 0x50]
MOV RDX,qword ptr [RSP + 0x58]
CALL 0x001229d0
MOV dword ptr [RSP + 0xd8],0x0
MOV qword ptr [RSP + 0xe0],0x6
LAB_00115a40:
MOV RAX,qword ptr [RSP + 0xd8]
MOV RDX,qword ptr [RSP + 0xe0]
ADD RSP,0xe8
RET
|
int1 [16]
js_worker_ctor(int8 param_1,int8 param_2,int8 param_3,int4 param_4,
int8 *param_5)
{
int1 auVar1 [16];
int1 auVar2 [16];
int1 auVar3 [16];
int iVar4;
char *__s;
char *pcVar5;
int8 uVar6;
int1 auVar7 [16];
char *local_a8;
int8 local_98;
int8 local_90;
pthread_attr_t local_88;
pthread_t local_50;
int8 *local_48;
int8 local_40;
int8 *local_38;
int4 local_2c;
int8 local_28;
int8 local_20;
int8 local_18;
int4 local_10;
int4 uStack_c;
int8 local_8;
local_38 = param_5;
local_2c = param_4;
local_28 = param_1;
local_20 = param_2;
local_18 = param_3;
local_40 = JS_GetRuntime(param_1);
local_48 = (int8 *)0x0;
auVar7._8_8_ = DAT_00208b90;
auVar7._0_8_ = DAT_00208b88;
auVar3._8_8_ = DAT_00208b90;
auVar3._0_8_ = DAT_00208b88;
auVar2._8_8_ = DAT_00208b90;
auVar2._0_8_ = DAT_00208b88;
local_a8 = (char *)0x0;
iVar4 = is_main_thread(local_40);
if (iVar4 == 0) {
auVar7 = JS_ThrowTypeError(local_28,"cannot create a worker inside a worker");
local_10 = auVar7._0_4_;
uStack_c = auVar7._4_4_;
local_8 = auVar7._8_8_;
goto LAB_00115a40;
}
iVar4 = JS_GetScriptOrModuleName(local_28,1);
if (iVar4 == 0) {
auVar7 = JS_ThrowTypeError(local_28,"could not determine calling script or module name");
local_10 = auVar7._0_4_;
uStack_c = auVar7._4_4_;
local_8 = auVar7._8_8_;
goto LAB_00115a40;
}
__s = (char *)JS_AtomToCString(local_28,iVar4);
JS_FreeAtom(local_28,iVar4);
if ((__s != (char *)0x0) &&
(local_a8 = (char *)JS_ToCString(local_28,*local_38,local_38[1]), auVar7 = auVar3,
local_a8 != (char *)0x0)) {
local_48 = (int8 *)malloc(0x20);
if (local_48 != (int8 *)0x0) {
memset(local_48,0,0x20);
pcVar5 = strdup(local_a8);
*local_48 = pcVar5;
pcVar5 = strdup(__s);
local_48[1] = pcVar5;
uVar6 = js_new_message_pipe();
local_48[2] = uVar6;
if (local_48[2] != 0) {
uVar6 = js_new_message_pipe();
local_48[3] = uVar6;
if (local_48[3] != 0) {
auVar7 = js_worker_ctor_internal(local_28,local_20,local_18,local_48[3],local_48[2]);
iVar4 = JS_IsException(auVar7._0_8_,auVar7._8_8_);
if (iVar4 == 0) {
pthread_attr_init(&local_88);
pthread_attr_setdetachstate(&local_88,1);
pthread_attr_setstacksize(&local_88,0x200000);
iVar4 = pthread_create(&local_50,&local_88,worker_func,local_48);
pthread_attr_destroy(&local_88);
if (iVar4 == 0) {
JS_FreeCString(local_28,__s);
JS_FreeCString(local_28,local_a8);
local_10 = auVar7._0_4_;
uStack_c = auVar7._4_4_;
local_8 = auVar7._8_8_;
goto LAB_00115a40;
}
JS_ThrowTypeError(local_28,"could not create worker");
}
goto LAB_00115993;
}
}
}
JS_ThrowOutOfMemory(local_28);
auVar7 = auVar2;
}
LAB_00115993:
local_90 = auVar7._8_8_;
local_98 = auVar7._0_8_;
JS_FreeCString(local_28,__s);
JS_FreeCString(local_28,local_a8);
if (local_48 != (int8 *)0x0) {
free((void *)*local_48);
free((void *)local_48[1]);
js_free_message_pipe(local_48[2]);
js_free_message_pipe(local_48[3]);
free(local_48);
}
JS_FreeValue(local_28,local_98,local_90);
local_10 = 0;
local_8 = 6;
LAB_00115a40:
auVar1._4_4_ = uStack_c;
auVar1._0_4_ = local_10;
auVar1._8_8_ = local_8;
return auVar1;
}
| |
40,569 | js_worker_ctor | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_worker_ctor(JSContext *ctx, JSValue new_target,
int argc, JSValue *argv)
{
JSRuntime *rt = JS_GetRuntime(ctx);
WorkerFuncArgs *args = NULL;
pthread_t tid;
pthread_attr_t attr;
JSValue obj = JS_UNDEFINED;
int ret;
const char *filename = NULL, *basename;
JSAtom basename_atom;
/* XXX: in order to avoid problems with resource liberation, we
don't support creating workers inside workers */
if (!is_main_thread(rt))
return JS_ThrowTypeError(ctx, "cannot create a worker inside a worker");
/* base name, assuming the calling function is a normal JS
function */
basename_atom = JS_GetScriptOrModuleName(ctx, 1);
if (basename_atom == JS_ATOM_NULL) {
return JS_ThrowTypeError(ctx, "could not determine calling script or module name");
}
basename = JS_AtomToCString(ctx, basename_atom);
JS_FreeAtom(ctx, basename_atom);
if (!basename)
goto fail;
/* module name */
filename = JS_ToCString(ctx, argv[0]);
if (!filename)
goto fail;
args = malloc(sizeof(*args));
if (!args)
goto oom_fail;
memset(args, 0, sizeof(*args));
args->filename = strdup(filename);
args->basename = strdup(basename);
/* ports */
args->recv_pipe = js_new_message_pipe();
if (!args->recv_pipe)
goto oom_fail;
args->send_pipe = js_new_message_pipe();
if (!args->send_pipe)
goto oom_fail;
obj = js_worker_ctor_internal(ctx, new_target,
args->send_pipe, args->recv_pipe);
if (JS_IsException(obj))
goto fail;
pthread_attr_init(&attr);
/* no join at the end */
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
// musl libc gives threads 80 kb stacks, much smaller than
// JS_DEFAULT_STACK_SIZE (1 MB)
pthread_attr_setstacksize(&attr, 2 << 20); // 2 MB, glibc default
ret = pthread_create(&tid, &attr, worker_func, args);
pthread_attr_destroy(&attr);
if (ret != 0) {
JS_ThrowTypeError(ctx, "could not create worker");
goto fail;
}
JS_FreeCString(ctx, basename);
JS_FreeCString(ctx, filename);
return obj;
oom_fail:
JS_ThrowOutOfMemory(ctx);
fail:
JS_FreeCString(ctx, basename);
JS_FreeCString(ctx, filename);
if (args) {
free(args->filename);
free(args->basename);
js_free_message_pipe(args->recv_pipe);
js_free_message_pipe(args->send_pipe);
free(args);
}
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
} | O1 | c | js_worker_ctor:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r8, %r15
movq %rdx, %r12
movq %rsi, %rbp
movq %rdi, %rbx
callq 0x1f16a
xorl %edi, %edi
movq %rax, %rsi
xorl %eax, %eax
callq 0x399df
cmpq $0x0, 0x68(%rax)
je 0x1724c
leaq 0x83462(%rip), %rsi # 0x9a68c
movq %rbx, %rdi
xorl %eax, %eax
callq 0x21953
movq %rax, %r15
movq %rdx, %r14
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %rax, %rcx
jmp 0x1742e
movq %rbx, %rdi
movl $0x1, %esi
callq 0x30246
testl %eax, %eax
je 0x173a0
movl %eax, %r14d
movq %rbx, %rdi
movl %eax, %esi
callq 0x1fbeb
movq %rax, %r13
movq %rbx, %rdi
movl %r14d, %esi
callq 0x1fbc4
movl $0x3, %r14d
movq %r13, 0x10(%rsp)
testq %r13, %r13
je 0x173ac
movq (%r15), %rdx
movq 0x8(%r15), %rcx
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x1ffe3
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x173c6
movl $0x20, %edi
callq 0xe650
movq %rax, %r13
testq %rax, %rax
je 0x173b4
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r13)
movups %xmm0, (%r13)
movq 0x8(%rsp), %rdi
callq 0xe8e0
movq %rax, (%r13)
movq 0x10(%rsp), %rdi
callq 0xe8e0
movq %rax, 0x8(%r13)
callq 0x17a0b
movq %rax, 0x10(%r13)
testq %rax, %rax
je 0x173b4
callq 0x17a0b
movq %rax, 0x18(%r13)
testq %rax, %rax
je 0x173b4
movq 0x10(%r13), %r8
movq %rbx, %rdi
movq %rbp, %rsi
movq %r12, %rdx
movq %rax, %rcx
callq 0x17472
movq %rax, %r15
movq %rdx, %r14
cmpl $0x6, %r14d
je 0x173bf
leaq 0x20(%rsp), %r12
movq %r12, %rdi
callq 0xe480
movq %r12, %rdi
movl $0x1, %esi
callq 0xe620
movl $0x200000, %esi # imm = 0x200000
movq %r12, %rdi
callq 0xe990
leaq 0x70d(%rip), %rdx # 0x17a78
leaq 0x18(%rsp), %rdi
movq %r12, %rsi
movq %r13, %rcx
callq 0xe700
movl %eax, %ebp
movq %r12, %rdi
callq 0xe840
testl %ebp, %ebp
je 0x17446
leaq 0x83351(%rip), %rsi # 0x9a6e5
movq %rbx, %rdi
xorl %eax, %eax
callq 0x21953
jmp 0x173bf
leaq 0x8330c(%rip), %rsi # 0x9a6b3
jmp 0x1722a
xorl %r12d, %r12d
xorl %r15d, %r15d
jmp 0x173c9
movq %rbx, %rdi
callq 0x1bf4f
xorl %r15d, %r15d
movq 0x8(%rsp), %r12
jmp 0x173cc
xorl %r12d, %r12d
xorl %r13d, %r13d
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
callq 0x202c9
movq %rbx, %rdi
movq %r12, %rsi
callq 0x202c9
testq %r13, %r13
je 0x17415
movq (%r13), %rdi
callq 0xe060
movq 0x8(%r13), %rdi
callq 0xe060
movq 0x10(%r13), %rdi
callq 0x147c3
movq 0x18(%r13), %rdi
callq 0x147c3
movq %r13, %rdi
callq 0xe060
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1cc9f
movl $0x6, %r14d
xorl %r15d, %r15d
xorl %ecx, %ecx
movl %r15d, %eax
orq %rcx, %rax
movq %r14, %rdx
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
callq 0x202c9
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
callq 0x202c9
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %r15, %rcx
jmp 0x17244
| js_worker_ctor:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r15, r8
mov r12, rdx
mov rbp, rsi
mov rbx, rdi
call JS_GetRuntime
xor edi, edi
mov rsi, rax
xor eax, eax
call js_std_cmd
cmp qword ptr [rax+68h], 0
jz short loc_1724C
lea rsi, aCannotCreateAW; "cannot create a worker inside a worker"
loc_1722A:
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
mov r15, rax
mov r14, rdx
mov rcx, 0FFFFFFFF00000000h
loc_17244:
and rcx, rax
jmp loc_1742E
loc_1724C:
mov rdi, rbx
mov esi, 1
call JS_GetScriptOrModuleName
test eax, eax
jz loc_173A0
mov r14d, eax
mov rdi, rbx
mov esi, eax
call JS_AtomToCString
mov r13, rax
mov rdi, rbx
mov esi, r14d
call JS_FreeAtom
mov r14d, 3
mov [rsp+88h+var_78], r13
test r13, r13
jz loc_173AC
mov rdx, [r15]
mov rcx, [r15+8]
xor r15d, r15d
mov rdi, rbx
xor esi, esi
xor r8d, r8d
call JS_ToCStringLen2
mov [rsp+88h+var_80], rax
test rax, rax
jz loc_173C6
mov edi, 20h ; ' '
call _malloc
mov r13, rax
test rax, rax
jz loc_173B4
xorps xmm0, xmm0
movups xmmword ptr [r13+10h], xmm0
movups xmmword ptr [r13+0], xmm0
mov rdi, [rsp+88h+var_80]
call _strdup
mov [r13+0], rax
mov rdi, [rsp+88h+var_78]
call _strdup
mov [r13+8], rax
call js_new_message_pipe
mov [r13+10h], rax
test rax, rax
jz loc_173B4
call js_new_message_pipe
mov [r13+18h], rax
test rax, rax
jz loc_173B4
mov r8, [r13+10h]
mov rdi, rbx
mov rsi, rbp
mov rdx, r12
mov rcx, rax
call js_worker_ctor_internal
mov r15, rax
mov r14, rdx
cmp r14d, 6
jz loc_173BF
lea r12, [rsp+88h+var_68]
mov rdi, r12
call _pthread_attr_init
mov rdi, r12
mov esi, 1
call _pthread_attr_setdetachstate
mov esi, 200000h
mov rdi, r12
call _pthread_attr_setstacksize
lea rdx, worker_func
lea rdi, [rsp+88h+var_70]
mov rsi, r12
mov rcx, r13
call _pthread_create
mov ebp, eax
mov rdi, r12
call _pthread_attr_destroy
test ebp, ebp
jz loc_17446
lea rsi, aCouldNotCreate; "could not create worker"
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
jmp short loc_173BF
loc_173A0:
lea rsi, aCouldNotDeterm; "could not determine calling script or m"...
jmp loc_1722A
loc_173AC:
xor r12d, r12d
xor r15d, r15d
jmp short loc_173C9
loc_173B4:
mov rdi, rbx
call JS_ThrowOutOfMemory
xor r15d, r15d
loc_173BF:
mov r12, [rsp+88h+var_80]
jmp short loc_173CC
loc_173C6:
xor r12d, r12d
loc_173C9:
xor r13d, r13d
loc_173CC:
mov rdi, rbx
mov rsi, [rsp+88h+var_78]
call JS_FreeCString
mov rdi, rbx
mov rsi, r12
call JS_FreeCString
test r13, r13
jz short loc_17415
mov rdi, [r13+0]
call _free
mov rdi, [r13+8]
call _free
mov rdi, [r13+10h]
call js_free_message_pipe
mov rdi, [r13+18h]
call js_free_message_pipe
mov rdi, r13
call _free
loc_17415:
mov rdi, rbx
mov rsi, r15
mov rdx, r14
call JS_FreeValue
mov r14d, 6
xor r15d, r15d
xor ecx, ecx
loc_1742E:
mov eax, r15d
or rax, rcx
mov rdx, r14
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_17446:
mov rdi, rbx
mov rsi, [rsp+88h+var_78]
call JS_FreeCString
mov rdi, rbx
mov rsi, [rsp+88h+var_80]
call JS_FreeCString
mov rax, 0FFFFFFFF00000000h
mov rcx, r15
jmp loc_17244
| unsigned long long js_worker_ctor(long long a1, long long a2, long long a3, long long a4, long long *a5)
{
int Runtime; // eax
int v8; // edx
int v9; // ecx
int v10; // r8d
int v11; // r9d
int v12; // edx
int v13; // ecx
int v14; // r8d
int v15; // r9d
const char *v16; // rsi
long long v17; // rax
long long v18; // r15
unsigned long long v19; // rcx
unsigned long long v20; // rcx
unsigned int ScriptOrModuleName; // eax
unsigned int v22; // r14d
long long v23; // r13
long long v24; // r14
long long v25; // rdx
long long v26; // rcx
_OWORD *v27; // rax
_QWORD *v28; // r13
long long v29; // rax
long long v30; // rax
long long v31; // rdx
int v32; // ebp
int v33; // edx
int v34; // ecx
int v35; // r8d
int v36; // r9d
long long v37; // r12
long long v39; // [rsp+8h] [rbp-80h]
long long v40; // [rsp+10h] [rbp-78h]
char v41[8]; // [rsp+18h] [rbp-70h] BYREF
_BYTE v42[104]; // [rsp+20h] [rbp-68h] BYREF
Runtime = JS_GetRuntime(a1);
if ( *(_QWORD *)(js_std_cmd(0, Runtime, v8, v9, v10, v11) + 104) )
{
v16 = "cannot create a worker inside a worker";
LABEL_3:
v17 = JS_ThrowTypeError(a1, (_DWORD)v16, v12, v13, v14, v15);
LODWORD(v18) = v17;
v19 = 0xFFFFFFFF00000000LL;
LABEL_4:
v20 = v17 & v19;
return v20 | (unsigned int)v18;
}
ScriptOrModuleName = JS_GetScriptOrModuleName(a1, 1LL);
if ( !ScriptOrModuleName )
{
v16 = "could not determine calling script or module name";
goto LABEL_3;
}
v22 = ScriptOrModuleName;
v23 = JS_AtomToCString(a1, ScriptOrModuleName);
JS_FreeAtom(a1, v22);
v24 = 3LL;
v40 = v23;
if ( !v23 )
{
v37 = 0LL;
v18 = 0LL;
LABEL_19:
v28 = 0LL;
goto LABEL_20;
}
v25 = *a5;
v26 = a5[1];
v18 = 0LL;
v39 = JS_ToCStringLen2(a1, 0LL, v25, v26, 0LL);
if ( !v39 )
{
v37 = 0LL;
goto LABEL_19;
}
v27 = (_OWORD *)malloc(32LL);
v28 = v27;
if ( !v27 )
goto LABEL_16;
v27[1] = 0LL;
*v27 = 0LL;
*(_QWORD *)v27 = strdup(v39);
v28[1] = strdup(v40);
v29 = js_new_message_pipe();
v28[2] = v29;
if ( !v29 )
goto LABEL_16;
v30 = js_new_message_pipe();
v28[3] = v30;
if ( v30 )
{
v18 = js_worker_ctor_internal(a1, a2, a3);
v24 = v31;
if ( (_DWORD)v31 != 6 )
{
pthread_attr_init(v42);
pthread_attr_setdetachstate(v42, 1LL);
pthread_attr_setstacksize(v42, 0x200000LL);
v32 = pthread_create(v41, v42, worker_func, v28);
pthread_attr_destroy(v42);
if ( !v32 )
{
JS_FreeCString(a1, v40);
JS_FreeCString(a1, v39);
v17 = 0xFFFFFFFF00000000LL;
v19 = v18;
goto LABEL_4;
}
JS_ThrowTypeError(a1, (unsigned int)"could not create worker", v33, v34, v35, v36);
}
}
else
{
LABEL_16:
JS_ThrowOutOfMemory(a1);
v18 = 0LL;
}
v37 = v39;
LABEL_20:
JS_FreeCString(a1, v40);
JS_FreeCString(a1, v37);
if ( v28 )
{
free(*v28);
free(v28[1]);
js_free_message_pipe(v28[2]);
js_free_message_pipe(v28[3]);
free(v28);
}
JS_FreeValue(a1, v18, v24);
LODWORD(v18) = 0;
v20 = 0LL;
return v20 | (unsigned int)v18;
}
| js_worker_ctor:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R15,R8
MOV R12,RDX
MOV RBP,RSI
MOV RBX,RDI
CALL 0x0011f16a
XOR EDI,EDI
MOV RSI,RAX
XOR EAX,EAX
CALL 0x001399df
CMP qword ptr [RAX + 0x68],0x0
JZ 0x0011724c
LEA RSI,[0x19a68c]
LAB_0011722a:
MOV RDI,RBX
XOR EAX,EAX
CALL 0x00121953
MOV R15,RAX
MOV R14,RDX
MOV RCX,-0x100000000
LAB_00117244:
AND RCX,RAX
JMP 0x0011742e
LAB_0011724c:
MOV RDI,RBX
MOV ESI,0x1
CALL 0x00130246
TEST EAX,EAX
JZ 0x001173a0
MOV R14D,EAX
MOV RDI,RBX
MOV ESI,EAX
CALL 0x0011fbeb
MOV R13,RAX
MOV RDI,RBX
MOV ESI,R14D
CALL 0x0011fbc4
MOV R14D,0x3
MOV qword ptr [RSP + 0x10],R13
TEST R13,R13
JZ 0x001173ac
MOV RDX,qword ptr [R15]
MOV RCX,qword ptr [R15 + 0x8]
XOR R15D,R15D
MOV RDI,RBX
XOR ESI,ESI
XOR R8D,R8D
CALL 0x0011ffe3
MOV qword ptr [RSP + 0x8],RAX
TEST RAX,RAX
JZ 0x001173c6
MOV EDI,0x20
CALL 0x0010e650
MOV R13,RAX
TEST RAX,RAX
JZ 0x001173b4
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R13 + 0x10],XMM0
MOVUPS xmmword ptr [R13],XMM0
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0010e8e0
MOV qword ptr [R13],RAX
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x0010e8e0
MOV qword ptr [R13 + 0x8],RAX
CALL 0x00117a0b
MOV qword ptr [R13 + 0x10],RAX
TEST RAX,RAX
JZ 0x001173b4
CALL 0x00117a0b
MOV qword ptr [R13 + 0x18],RAX
TEST RAX,RAX
JZ 0x001173b4
MOV R8,qword ptr [R13 + 0x10]
MOV RDI,RBX
MOV RSI,RBP
MOV RDX,R12
MOV RCX,RAX
CALL 0x00117472
MOV R15,RAX
MOV R14,RDX
CMP R14D,0x6
JZ 0x001173bf
LEA R12,[RSP + 0x20]
MOV RDI,R12
CALL 0x0010e480
MOV RDI,R12
MOV ESI,0x1
CALL 0x0010e620
MOV ESI,0x200000
MOV RDI,R12
CALL 0x0010e990
LEA RDX,[0x117a78]
LEA RDI,[RSP + 0x18]
MOV RSI,R12
MOV RCX,R13
CALL 0x0010e700
MOV EBP,EAX
MOV RDI,R12
CALL 0x0010e840
TEST EBP,EBP
JZ 0x00117446
LEA RSI,[0x19a6e5]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x00121953
JMP 0x001173bf
LAB_001173a0:
LEA RSI,[0x19a6b3]
JMP 0x0011722a
LAB_001173ac:
XOR R12D,R12D
XOR R15D,R15D
JMP 0x001173c9
LAB_001173b4:
MOV RDI,RBX
CALL 0x0011bf4f
XOR R15D,R15D
LAB_001173bf:
MOV R12,qword ptr [RSP + 0x8]
JMP 0x001173cc
LAB_001173c6:
XOR R12D,R12D
LAB_001173c9:
XOR R13D,R13D
LAB_001173cc:
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x001202c9
MOV RDI,RBX
MOV RSI,R12
CALL 0x001202c9
TEST R13,R13
JZ 0x00117415
MOV RDI,qword ptr [R13]
CALL 0x0010e060
MOV RDI,qword ptr [R13 + 0x8]
CALL 0x0010e060
MOV RDI,qword ptr [R13 + 0x10]
CALL 0x001147c3
MOV RDI,qword ptr [R13 + 0x18]
CALL 0x001147c3
MOV RDI,R13
CALL 0x0010e060
LAB_00117415:
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
CALL 0x0011cc9f
MOV R14D,0x6
XOR R15D,R15D
XOR ECX,ECX
LAB_0011742e:
MOV EAX,R15D
OR RAX,RCX
MOV RDX,R14
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00117446:
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x001202c9
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x001202c9
MOV RAX,-0x100000000
MOV RCX,R15
JMP 0x00117244
|
int1 [16]
js_worker_ctor(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 *param_5)
{
int iVar1;
int8 uVar2;
long lVar3;
char *__s;
int8 *__arg;
char *pcVar4;
ulong uVar5;
char *pcVar6;
ulong uVar7;
int1 auVar8 [16];
int1 auVar9 [16];
pthread_t local_70;
pthread_attr_t local_68;
uVar2 = JS_GetRuntime();
lVar3 = js_std_cmd(0,uVar2);
if (*(long *)(lVar3 + 0x68) == 0) {
iVar1 = JS_GetScriptOrModuleName(param_1,1);
if (iVar1 == 0) {
pcVar6 = "could not determine calling script or module name";
goto LAB_0011722a;
}
pcVar6 = (char *)JS_AtomToCString(param_1,iVar1);
JS_FreeAtom(param_1,iVar1);
if ((pcVar6 == (char *)0x0) ||
(__s = (char *)JS_ToCStringLen2(param_1,0,*param_5,param_5[1],0), __s == (char *)0x0)) {
auVar8 = ZEXT816(3) << 0x40;
__s = (char *)0x0;
__arg = (int8 *)0x0;
goto LAB_001173cc;
}
__arg = (int8 *)malloc(0x20);
if (__arg == (int8 *)0x0) {
LAB_001173b4:
JS_ThrowOutOfMemory(param_1);
auVar8 = ZEXT816(3) << 0x40;
LAB_001173cc:
JS_FreeCString(param_1,pcVar6);
JS_FreeCString(param_1,__s);
if (__arg != (int8 *)0x0) {
free((void *)*__arg);
free((void *)__arg[1]);
js_free_message_pipe(__arg[2]);
js_free_message_pipe(__arg[3]);
free(__arg);
}
JS_FreeValue(param_1,auVar8._0_8_,auVar8._8_8_);
uVar2 = 6;
uVar7 = 0;
uVar5 = 0;
goto LAB_0011742e;
}
__arg[2] = 0;
__arg[3] = 0;
*__arg = 0;
__arg[1] = 0;
pcVar4 = strdup(__s);
*__arg = pcVar4;
pcVar4 = strdup(pcVar6);
__arg[1] = pcVar4;
lVar3 = js_new_message_pipe();
__arg[2] = lVar3;
if (lVar3 == 0) goto LAB_001173b4;
lVar3 = js_new_message_pipe();
__arg[3] = lVar3;
if (lVar3 == 0) goto LAB_001173b4;
auVar8 = js_worker_ctor_internal(param_1,param_2,param_3,lVar3,__arg[2]);
uVar5 = auVar8._0_8_;
if (auVar8._8_4_ == 6) goto LAB_001173cc;
pthread_attr_init(&local_68);
pthread_attr_setdetachstate(&local_68,1);
pthread_attr_setstacksize(&local_68,0x200000);
iVar1 = pthread_create(&local_70,&local_68,worker_func,__arg);
pthread_attr_destroy(&local_68);
if (iVar1 != 0) {
JS_ThrowTypeError(param_1,"could not create worker");
goto LAB_001173cc;
}
JS_FreeCString(param_1,pcVar6);
JS_FreeCString(param_1,__s);
auVar8._8_8_ = auVar8._8_8_;
auVar8._0_8_ = 0xffffffff00000000;
uVar7 = uVar5;
}
else {
pcVar6 = "cannot create a worker inside a worker";
LAB_0011722a:
auVar8 = JS_ThrowTypeError(param_1,pcVar6);
uVar5 = 0xffffffff00000000;
uVar7 = auVar8._0_8_;
}
uVar2 = auVar8._8_8_;
uVar5 = uVar5 & auVar8._0_8_;
LAB_0011742e:
auVar9._0_8_ = uVar7 & 0xffffffff | uVar5;
auVar9._8_8_ = uVar2;
return auVar9;
}
| |
40,570 | js_worker_ctor | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_worker_ctor(JSContext *ctx, JSValue new_target,
int argc, JSValue *argv)
{
JSRuntime *rt = JS_GetRuntime(ctx);
WorkerFuncArgs *args = NULL;
pthread_t tid;
pthread_attr_t attr;
JSValue obj = JS_UNDEFINED;
int ret;
const char *filename = NULL, *basename;
JSAtom basename_atom;
/* XXX: in order to avoid problems with resource liberation, we
don't support creating workers inside workers */
if (!is_main_thread(rt))
return JS_ThrowTypeError(ctx, "cannot create a worker inside a worker");
/* base name, assuming the calling function is a normal JS
function */
basename_atom = JS_GetScriptOrModuleName(ctx, 1);
if (basename_atom == JS_ATOM_NULL) {
return JS_ThrowTypeError(ctx, "could not determine calling script or module name");
}
basename = JS_AtomToCString(ctx, basename_atom);
JS_FreeAtom(ctx, basename_atom);
if (!basename)
goto fail;
/* module name */
filename = JS_ToCString(ctx, argv[0]);
if (!filename)
goto fail;
args = malloc(sizeof(*args));
if (!args)
goto oom_fail;
memset(args, 0, sizeof(*args));
args->filename = strdup(filename);
args->basename = strdup(basename);
/* ports */
args->recv_pipe = js_new_message_pipe();
if (!args->recv_pipe)
goto oom_fail;
args->send_pipe = js_new_message_pipe();
if (!args->send_pipe)
goto oom_fail;
obj = js_worker_ctor_internal(ctx, new_target,
args->send_pipe, args->recv_pipe);
if (JS_IsException(obj))
goto fail;
pthread_attr_init(&attr);
/* no join at the end */
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
// musl libc gives threads 80 kb stacks, much smaller than
// JS_DEFAULT_STACK_SIZE (1 MB)
pthread_attr_setstacksize(&attr, 2 << 20); // 2 MB, glibc default
ret = pthread_create(&tid, &attr, worker_func, args);
pthread_attr_destroy(&attr);
if (ret != 0) {
JS_ThrowTypeError(ctx, "could not create worker");
goto fail;
}
JS_FreeCString(ctx, basename);
JS_FreeCString(ctx, filename);
return obj;
oom_fail:
JS_ThrowOutOfMemory(ctx);
fail:
JS_FreeCString(ctx, basename);
JS_FreeCString(ctx, filename);
if (args) {
free(args->filename);
free(args->basename);
js_free_message_pipe(args->recv_pipe);
js_free_message_pipe(args->send_pipe);
free(args);
}
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
} | O3 | c | js_worker_ctor:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r8, %r15
movq %rdx, %r12
movq %rsi, %rbp
movq %rdi, %rbx
callq 0x1f8ad
xorl %edi, %edi
movq %rax, %rsi
xorl %eax, %eax
callq 0x3af34
cmpq $0x0, 0x68(%rax)
je 0x17c56
leaq 0x85a01(%rip), %rsi # 0x9d635
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2214f
movq %rax, %r15
movq %rdx, %r14
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %rax, %rcx
jmp 0x17e30
movq %rbx, %rdi
movl $0x1, %esi
callq 0x31235
testl %eax, %eax
je 0x17da2
movl %eax, %r14d
movq %rbx, %rdi
movl %eax, %esi
callq 0x2031c
movq %rax, %r13
movq %rbx, %rdi
movl %r14d, %esi
callq 0x202f5
movl $0x3, %r14d
movq %r13, 0x10(%rsp)
testq %r13, %r13
je 0x17dae
movq (%r15), %rdx
movq 0x8(%r15), %rcx
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x20717
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x17dc8
movl $0x1, %edi
movl $0x20, %esi
callq 0xe4e0
movq %rax, %r13
testq %rax, %rax
je 0x17db6
movq 0x8(%rsp), %rdi
callq 0xe8e0
movq %rax, (%r13)
movq 0x10(%rsp), %rdi
callq 0xe8e0
movq %rax, 0x8(%r13)
callq 0x18400
movq %rax, 0x10(%r13)
testq %rax, %rax
je 0x17db6
callq 0x18400
movq %rax, 0x18(%r13)
testq %rax, %rax
je 0x17db6
movq 0x10(%r13), %r8
movq %rbx, %rdi
movq %rbp, %rsi
movq %r12, %rdx
movq %rax, %rcx
callq 0x17e74
movq %rax, %r15
movq %rdx, %r14
cmpl $0x6, %r14d
je 0x17dc1
leaq 0x20(%rsp), %r12
movq %r12, %rdi
callq 0xe480
movq %r12, %rdi
movl $0x1, %esi
callq 0xe620
movl $0x200000, %esi # imm = 0x200000
movq %r12, %rdi
callq 0xe990
leaq 0x700(%rip), %rdx # 0x1846d
leaq 0x18(%rsp), %rdi
movq %r12, %rsi
movq %r13, %rcx
callq 0xe700
movl %eax, %ebp
movq %r12, %rdi
callq 0xe840
testl %ebp, %ebp
je 0x17e48
leaq 0x858f8(%rip), %rsi # 0x9d68e
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2214f
jmp 0x17dc1
leaq 0x858b3(%rip), %rsi # 0x9d65c
jmp 0x17c34
xorl %r12d, %r12d
xorl %r15d, %r15d
jmp 0x17dcb
movq %rbx, %rdi
callq 0x1c80f
xorl %r15d, %r15d
movq 0x8(%rsp), %r12
jmp 0x17dce
xorl %r12d, %r12d
xorl %r13d, %r13d
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
callq 0x209ed
movq %rbx, %rdi
movq %r12, %rsi
callq 0x209ed
testq %r13, %r13
je 0x17e17
movq (%r13), %rdi
callq 0xe060
movq 0x8(%r13), %rdi
callq 0xe060
movq 0x10(%r13), %rdi
callq 0x1520d
movq 0x18(%r13), %rdi
callq 0x1520d
movq %r13, %rdi
callq 0xe060
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1d599
movl $0x6, %r14d
xorl %r15d, %r15d
xorl %ecx, %ecx
movl %r15d, %eax
orq %rcx, %rax
movq %r14, %rdx
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
callq 0x209ed
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
callq 0x209ed
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %r15, %rcx
jmp 0x17c4e
| js_worker_ctor:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r15, r8
mov r12, rdx
mov rbp, rsi
mov rbx, rdi
call JS_GetRuntime
xor edi, edi
mov rsi, rax
xor eax, eax
call js_std_cmd
cmp qword ptr [rax+68h], 0
jz short loc_17C56
lea rsi, aCannotCreateAW; "cannot create a worker inside a worker"
loc_17C34:
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
mov r15, rax
mov r14, rdx
mov rcx, 0FFFFFFFF00000000h
loc_17C4E:
and rcx, rax
jmp loc_17E30
loc_17C56:
mov rdi, rbx
mov esi, 1
call JS_GetScriptOrModuleName
test eax, eax
jz loc_17DA2
mov r14d, eax
mov rdi, rbx
mov esi, eax
call JS_AtomToCString
mov r13, rax
mov rdi, rbx
mov esi, r14d
call JS_FreeAtom
mov r14d, 3
mov [rsp+88h+var_78], r13
test r13, r13
jz loc_17DAE
mov rdx, [r15]
mov rcx, [r15+8]
xor r15d, r15d
mov rdi, rbx
xor esi, esi
xor r8d, r8d
call JS_ToCStringLen2
mov [rsp+88h+var_80], rax
test rax, rax
jz loc_17DC8
mov edi, 1
mov esi, 20h ; ' '
call _calloc
mov r13, rax
test rax, rax
jz loc_17DB6
mov rdi, [rsp+88h+var_80]
call _strdup
mov [r13+0], rax
mov rdi, [rsp+88h+var_78]
call _strdup
mov [r13+8], rax
call js_new_message_pipe
mov [r13+10h], rax
test rax, rax
jz loc_17DB6
call js_new_message_pipe
mov [r13+18h], rax
test rax, rax
jz loc_17DB6
mov r8, [r13+10h]
mov rdi, rbx
mov rsi, rbp
mov rdx, r12
mov rcx, rax
call js_worker_ctor_internal
mov r15, rax
mov r14, rdx
cmp r14d, 6
jz loc_17DC1
lea r12, [rsp+88h+var_68]
mov rdi, r12
call _pthread_attr_init
mov rdi, r12
mov esi, 1
call _pthread_attr_setdetachstate
mov esi, 200000h
mov rdi, r12
call _pthread_attr_setstacksize
lea rdx, worker_func
lea rdi, [rsp+88h+var_70]
mov rsi, r12
mov rcx, r13
call _pthread_create
mov ebp, eax
mov rdi, r12
call _pthread_attr_destroy
test ebp, ebp
jz loc_17E48
lea rsi, aCouldNotCreate; "could not create worker"
mov rdi, rbx
xor eax, eax
call JS_ThrowTypeError
jmp short loc_17DC1
loc_17DA2:
lea rsi, aCouldNotDeterm; "could not determine calling script or m"...
jmp loc_17C34
loc_17DAE:
xor r12d, r12d
xor r15d, r15d
jmp short loc_17DCB
loc_17DB6:
mov rdi, rbx
call JS_ThrowOutOfMemory
xor r15d, r15d
loc_17DC1:
mov r12, [rsp+88h+var_80]
jmp short loc_17DCE
loc_17DC8:
xor r12d, r12d
loc_17DCB:
xor r13d, r13d
loc_17DCE:
mov rdi, rbx
mov rsi, [rsp+88h+var_78]
call JS_FreeCString
mov rdi, rbx
mov rsi, r12
call JS_FreeCString
test r13, r13
jz short loc_17E17
mov rdi, [r13+0]
call _free
mov rdi, [r13+8]
call _free
mov rdi, [r13+10h]
call js_free_message_pipe
mov rdi, [r13+18h]
call js_free_message_pipe
mov rdi, r13
call _free
loc_17E17:
mov rdi, rbx
mov rsi, r15
mov rdx, r14
call JS_FreeValue
mov r14d, 6
xor r15d, r15d
xor ecx, ecx
loc_17E30:
mov eax, r15d
or rax, rcx
mov rdx, r14
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_17E48:
mov rdi, rbx
mov rsi, [rsp+88h+var_78]
call JS_FreeCString
mov rdi, rbx
mov rsi, [rsp+88h+var_80]
call JS_FreeCString
mov rax, 0FFFFFFFF00000000h
mov rcx, r15
jmp loc_17C4E
| unsigned long long js_worker_ctor(long long a1, long long a2, long long a3, long long a4, long long *a5)
{
int Runtime; // eax
int v8; // edx
int v9; // ecx
int v10; // r8d
int v11; // r9d
int v12; // edx
int v13; // ecx
int v14; // r8d
int v15; // r9d
const char *v16; // rsi
long long v17; // rax
long long v18; // r15
unsigned long long v19; // rcx
unsigned long long v20; // rcx
unsigned int ScriptOrModuleName; // eax
unsigned int v22; // r14d
long long v23; // r13
long long v24; // r14
long long v25; // rdx
long long v26; // rcx
_QWORD *v27; // r13
long long v28; // rax
long long v29; // rax
long long v30; // rdx
int v31; // ebp
int v32; // edx
int v33; // ecx
int v34; // r8d
int v35; // r9d
long long v36; // r12
long long v38; // [rsp+8h] [rbp-80h]
long long v39; // [rsp+10h] [rbp-78h]
char v40[8]; // [rsp+18h] [rbp-70h] BYREF
_BYTE v41[104]; // [rsp+20h] [rbp-68h] BYREF
Runtime = JS_GetRuntime(a1);
if ( *(_QWORD *)(js_std_cmd(0, Runtime, v8, v9, v10, v11) + 104) )
{
v16 = "cannot create a worker inside a worker";
LABEL_3:
v17 = JS_ThrowTypeError(a1, (_DWORD)v16, v12, v13, v14, v15);
LODWORD(v18) = v17;
v19 = 0xFFFFFFFF00000000LL;
LABEL_4:
v20 = v17 & v19;
return v20 | (unsigned int)v18;
}
ScriptOrModuleName = JS_GetScriptOrModuleName(a1, 1LL);
if ( !ScriptOrModuleName )
{
v16 = "could not determine calling script or module name";
goto LABEL_3;
}
v22 = ScriptOrModuleName;
v23 = JS_AtomToCString(a1, ScriptOrModuleName);
JS_FreeAtom(a1, v22);
v24 = 3LL;
v39 = v23;
if ( !v23 )
{
v36 = 0LL;
v18 = 0LL;
LABEL_19:
v27 = 0LL;
goto LABEL_20;
}
v25 = *a5;
v26 = a5[1];
v18 = 0LL;
v38 = JS_ToCStringLen2(a1, 0LL, v25, v26, 0LL);
if ( !v38 )
{
v36 = 0LL;
goto LABEL_19;
}
v27 = (_QWORD *)calloc(1LL, 32LL);
if ( v27
&& (*v27 = strdup(v38), v27[1] = strdup(v39), v28 = js_new_message_pipe(), (v27[2] = v28) != 0LL)
&& (v29 = js_new_message_pipe(), (v27[3] = v29) != 0LL) )
{
v18 = js_worker_ctor_internal(a1, a2, a3);
v24 = v30;
if ( (_DWORD)v30 != 6 )
{
pthread_attr_init(v41);
pthread_attr_setdetachstate(v41, 1LL);
pthread_attr_setstacksize(v41, 0x200000LL);
v31 = pthread_create(v40, v41, worker_func, v27);
pthread_attr_destroy(v41);
if ( !v31 )
{
JS_FreeCString(a1, v39);
JS_FreeCString(a1, v38);
v17 = 0xFFFFFFFF00000000LL;
v19 = v18;
goto LABEL_4;
}
JS_ThrowTypeError(a1, (unsigned int)"could not create worker", v32, v33, v34, v35);
}
}
else
{
JS_ThrowOutOfMemory(a1);
v18 = 0LL;
}
v36 = v38;
LABEL_20:
JS_FreeCString(a1, v39);
JS_FreeCString(a1, v36);
if ( v27 )
{
free(*v27);
free(v27[1]);
js_free_message_pipe(v27[2]);
js_free_message_pipe(v27[3]);
free(v27);
}
JS_FreeValue(a1, v18, v24);
LODWORD(v18) = 0;
v20 = 0LL;
return v20 | (unsigned int)v18;
}
| js_worker_ctor:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R15,R8
MOV R12,RDX
MOV RBP,RSI
MOV RBX,RDI
CALL 0x0011f8ad
XOR EDI,EDI
MOV RSI,RAX
XOR EAX,EAX
CALL 0x0013af34
CMP qword ptr [RAX + 0x68],0x0
JZ 0x00117c56
LEA RSI,[0x19d635]
LAB_00117c34:
MOV RDI,RBX
XOR EAX,EAX
CALL 0x0012214f
MOV R15,RAX
MOV R14,RDX
MOV RCX,-0x100000000
LAB_00117c4e:
AND RCX,RAX
JMP 0x00117e30
LAB_00117c56:
MOV RDI,RBX
MOV ESI,0x1
CALL 0x00131235
TEST EAX,EAX
JZ 0x00117da2
MOV R14D,EAX
MOV RDI,RBX
MOV ESI,EAX
CALL 0x0012031c
MOV R13,RAX
MOV RDI,RBX
MOV ESI,R14D
CALL 0x001202f5
MOV R14D,0x3
MOV qword ptr [RSP + 0x10],R13
TEST R13,R13
JZ 0x00117dae
MOV RDX,qword ptr [R15]
MOV RCX,qword ptr [R15 + 0x8]
XOR R15D,R15D
MOV RDI,RBX
XOR ESI,ESI
XOR R8D,R8D
CALL 0x00120717
MOV qword ptr [RSP + 0x8],RAX
TEST RAX,RAX
JZ 0x00117dc8
MOV EDI,0x1
MOV ESI,0x20
CALL 0x0010e4e0
MOV R13,RAX
TEST RAX,RAX
JZ 0x00117db6
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x0010e8e0
MOV qword ptr [R13],RAX
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x0010e8e0
MOV qword ptr [R13 + 0x8],RAX
CALL 0x00118400
MOV qword ptr [R13 + 0x10],RAX
TEST RAX,RAX
JZ 0x00117db6
CALL 0x00118400
MOV qword ptr [R13 + 0x18],RAX
TEST RAX,RAX
JZ 0x00117db6
MOV R8,qword ptr [R13 + 0x10]
MOV RDI,RBX
MOV RSI,RBP
MOV RDX,R12
MOV RCX,RAX
CALL 0x00117e74
MOV R15,RAX
MOV R14,RDX
CMP R14D,0x6
JZ 0x00117dc1
LEA R12,[RSP + 0x20]
MOV RDI,R12
CALL 0x0010e480
MOV RDI,R12
MOV ESI,0x1
CALL 0x0010e620
MOV ESI,0x200000
MOV RDI,R12
CALL 0x0010e990
LEA RDX,[0x11846d]
LEA RDI,[RSP + 0x18]
MOV RSI,R12
MOV RCX,R13
CALL 0x0010e700
MOV EBP,EAX
MOV RDI,R12
CALL 0x0010e840
TEST EBP,EBP
JZ 0x00117e48
LEA RSI,[0x19d68e]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x0012214f
JMP 0x00117dc1
LAB_00117da2:
LEA RSI,[0x19d65c]
JMP 0x00117c34
LAB_00117dae:
XOR R12D,R12D
XOR R15D,R15D
JMP 0x00117dcb
LAB_00117db6:
MOV RDI,RBX
CALL 0x0011c80f
XOR R15D,R15D
LAB_00117dc1:
MOV R12,qword ptr [RSP + 0x8]
JMP 0x00117dce
LAB_00117dc8:
XOR R12D,R12D
LAB_00117dcb:
XOR R13D,R13D
LAB_00117dce:
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x001209ed
MOV RDI,RBX
MOV RSI,R12
CALL 0x001209ed
TEST R13,R13
JZ 0x00117e17
MOV RDI,qword ptr [R13]
CALL 0x0010e060
MOV RDI,qword ptr [R13 + 0x8]
CALL 0x0010e060
MOV RDI,qword ptr [R13 + 0x10]
CALL 0x0011520d
MOV RDI,qword ptr [R13 + 0x18]
CALL 0x0011520d
MOV RDI,R13
CALL 0x0010e060
LAB_00117e17:
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
CALL 0x0011d599
MOV R14D,0x6
XOR R15D,R15D
XOR ECX,ECX
LAB_00117e30:
MOV EAX,R15D
OR RAX,RCX
MOV RDX,R14
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00117e48:
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x001209ed
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x001209ed
MOV RAX,-0x100000000
MOV RCX,R15
JMP 0x00117c4e
|
int1 [16]
js_worker_ctor(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 *param_5)
{
int iVar1;
int8 uVar2;
long lVar3;
char *__s;
int8 *__arg;
char *pcVar4;
ulong uVar5;
char *pcVar6;
ulong uVar7;
int1 auVar8 [16];
int1 auVar9 [16];
pthread_t local_70;
pthread_attr_t local_68;
uVar2 = JS_GetRuntime();
lVar3 = js_std_cmd(0,uVar2);
if (*(long *)(lVar3 + 0x68) == 0) {
iVar1 = JS_GetScriptOrModuleName(param_1,1);
if (iVar1 == 0) {
pcVar6 = "could not determine calling script or module name";
goto LAB_00117c34;
}
pcVar6 = (char *)JS_AtomToCString(param_1,iVar1);
JS_FreeAtom(param_1,iVar1);
if ((pcVar6 == (char *)0x0) ||
(__s = (char *)JS_ToCStringLen2(param_1,0,*param_5,param_5[1],0), __s == (char *)0x0)) {
auVar8 = ZEXT816(3) << 0x40;
__s = (char *)0x0;
__arg = (int8 *)0x0;
goto LAB_00117dce;
}
__arg = (int8 *)calloc(1,0x20);
if (__arg == (int8 *)0x0) {
LAB_00117db6:
JS_ThrowOutOfMemory(param_1);
auVar8 = ZEXT816(3) << 0x40;
LAB_00117dce:
JS_FreeCString(param_1,pcVar6);
JS_FreeCString(param_1,__s);
if (__arg != (int8 *)0x0) {
free((void *)*__arg);
free((void *)__arg[1]);
js_free_message_pipe(__arg[2]);
js_free_message_pipe(__arg[3]);
free(__arg);
}
JS_FreeValue(param_1,auVar8._0_8_,auVar8._8_8_);
uVar2 = 6;
uVar7 = 0;
uVar5 = 0;
goto LAB_00117e30;
}
pcVar4 = strdup(__s);
*__arg = pcVar4;
pcVar4 = strdup(pcVar6);
__arg[1] = pcVar4;
lVar3 = js_new_message_pipe();
__arg[2] = lVar3;
if (lVar3 == 0) goto LAB_00117db6;
lVar3 = js_new_message_pipe();
__arg[3] = lVar3;
if (lVar3 == 0) goto LAB_00117db6;
auVar8 = js_worker_ctor_internal(param_1,param_2,param_3,lVar3,__arg[2]);
uVar5 = auVar8._0_8_;
if (auVar8._8_4_ == 6) goto LAB_00117dce;
pthread_attr_init(&local_68);
pthread_attr_setdetachstate(&local_68,1);
pthread_attr_setstacksize(&local_68,0x200000);
iVar1 = pthread_create(&local_70,&local_68,worker_func,__arg);
pthread_attr_destroy(&local_68);
if (iVar1 != 0) {
JS_ThrowTypeError(param_1,"could not create worker");
goto LAB_00117dce;
}
JS_FreeCString(param_1,pcVar6);
JS_FreeCString(param_1,__s);
auVar8._8_8_ = auVar8._8_8_;
auVar8._0_8_ = 0xffffffff00000000;
uVar7 = uVar5;
}
else {
pcVar6 = "cannot create a worker inside a worker";
LAB_00117c34:
auVar8 = JS_ThrowTypeError(param_1,pcVar6);
uVar5 = 0xffffffff00000000;
uVar7 = auVar8._0_8_;
}
uVar2 = auVar8._8_8_;
uVar5 = uVar5 & auVar8._0_8_;
LAB_00117e30:
auVar9._0_8_ = uVar7 & 0xffffffff | uVar5;
auVar9._8_8_ = uVar2;
return auVar9;
}
| |
40,571 | ma_checksum | eloqsql/storage/maria/ma_checksum.c | ha_checksum _ma_checksum(MARIA_HA *info, const uchar *record)
{
ha_checksum crc=0;
uint i,end;
MARIA_COLUMNDEF *base_column= info->s->columndef;
uint16 *column_nr= info->s->column_nr;
if (info->s->base.null_bytes)
crc= my_checksum(crc, record, info->s->base.null_bytes);
for (i= 0, end= info->s->base.fields ; i < end ; i++)
{
MARIA_COLUMNDEF *column= base_column + column_nr[i];
const uchar *pos;
ulong length;
if (record[column->null_pos] & column->null_bit)
continue; /* Null field */
pos= record + column->offset;
switch (column->type) {
case FIELD_BLOB:
{
uint blob_size_length= column->length- portable_sizeof_char_ptr;
length= _ma_calc_blob_length(blob_size_length, pos);
if (length)
{
memcpy((char**) &pos, pos + blob_size_length, sizeof(char*));
crc= my_checksum(crc, pos, length);
}
continue;
}
case FIELD_VARCHAR:
{
uint pack_length= column->fill_length;
if (pack_length == 1)
length= (ulong) *pos;
else
length= uint2korr(pos);
pos+= pack_length; /* Skip length information */
break;
}
default:
length= column->length;
break;
}
crc= my_checksum(crc, pos, length);
}
return crc;
} | O0 | c | ma_checksum:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x588(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x5a8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x3fc(%rax)
je 0x9dc29
movl -0x14(%rbp), %edi
movq -0x10(%rbp), %rsi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0x3fc(%rax), %eax
movl %eax, %edx
callq 0x10b2a0
movl %eax, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0x3c8(%rax), %eax
movl %eax, -0x1c(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jae 0x9dd6d
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
movl -0x18(%rbp), %edx
movzwl (%rcx,%rdx,2), %ecx
movslq %ecx, %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rcx
movzwl 0xe(%rcx), %ecx
movzbl (%rax,%rcx), %eax
movq -0x38(%rbp), %rcx
movzbl 0x12(%rcx), %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0x9dc8d
jmp 0x9dd5f
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rcx
movl 0x4(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x54(%rbp)
subl $0x4, %eax
je 0x9dcbc
jmp 0x9dcaf
movl -0x54(%rbp), %eax
subl $0x8, %eax
je 0x9dd05
jmp 0x9dd40
movq -0x38(%rbp), %rax
movzwl 0x8(%rax), %eax
subl $0x8, %eax
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %edi
movq -0x40(%rbp), %rsi
callq 0x545b0
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x9dd03
movq -0x40(%rbp), %rax
movl -0x4c(%rbp), %ecx
movq (%rax,%rcx), %rax
movq %rax, -0x40(%rbp)
movl -0x14(%rbp), %edi
movq -0x40(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x10b2a0
movl %eax, -0x14(%rbp)
jmp 0x9dd5f
movq -0x38(%rbp), %rax
movzwl 0xc(%rax), %eax
movl %eax, -0x50(%rbp)
cmpl $0x1, -0x50(%rbp)
jne 0x9dd23
movq -0x40(%rbp), %rax
movzbl (%rax), %eax
movq %rax, -0x48(%rbp)
jmp 0x9dd2e
movq -0x40(%rbp), %rax
movzwl (%rax), %eax
movq %rax, -0x48(%rbp)
movl -0x50(%rbp), %ecx
movq -0x40(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
jmp 0x9dd4c
movq -0x38(%rbp), %rax
movzwl 0x8(%rax), %eax
movq %rax, -0x48(%rbp)
movl -0x14(%rbp), %edi
movq -0x40(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x10b2a0
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x9dc40
movl -0x14(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ma_checksum:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], 0
mov rax, [rbp+var_8]
mov rax, [rax]
mov rax, [rax+588h]
mov [rbp+var_28], rax
mov rax, [rbp+var_8]
mov rax, [rax]
mov rax, [rax+5A8h]
mov [rbp+var_30], rax
mov rax, [rbp+var_8]
mov rax, [rax]
cmp dword ptr [rax+3FCh], 0
jz short loc_9DC29
mov edi, [rbp+var_14]
mov rsi, [rbp+var_10]
mov rax, [rbp+var_8]
mov rax, [rax]
mov eax, [rax+3FCh]
mov edx, eax
call my_checksum
mov [rbp+var_14], eax
loc_9DC29:
mov [rbp+var_18], 0
mov rax, [rbp+var_8]
mov rax, [rax]
mov eax, [rax+3C8h]
mov [rbp+var_1C], eax
loc_9DC40:
mov eax, [rbp+var_18]
cmp eax, [rbp+var_1C]
jnb loc_9DD6D
mov rax, [rbp+var_28]
mov rcx, [rbp+var_30]
mov edx, [rbp+var_18]
movzx ecx, word ptr [rcx+rdx*2]
movsxd rcx, ecx
imul rcx, 38h ; '8'
add rax, rcx
mov [rbp+var_38], rax
mov rax, [rbp+var_10]
mov rcx, [rbp+var_38]
movzx ecx, word ptr [rcx+0Eh]
movzx eax, byte ptr [rax+rcx]
mov rcx, [rbp+var_38]
movzx ecx, byte ptr [rcx+12h]
and eax, ecx
cmp eax, 0
jz short loc_9DC8D
jmp loc_9DD5F
loc_9DC8D:
mov rax, [rbp+var_10]
mov rcx, [rbp+var_38]
mov ecx, [rcx+4]
add rax, rcx
mov [rbp+var_40], rax
mov rax, [rbp+var_38]
mov eax, [rax]
mov [rbp+var_54], eax
sub eax, 4
jz short loc_9DCBC
jmp short $+2
loc_9DCAF:
mov eax, [rbp+var_54]
sub eax, 8
jz short loc_9DD05
jmp loc_9DD40
loc_9DCBC:
mov rax, [rbp+var_38]
movzx eax, word ptr [rax+8]
sub eax, 8
mov [rbp+var_4C], eax
mov edi, [rbp+var_4C]
mov rsi, [rbp+var_40]
call _ma_calc_blob_length
mov [rbp+var_48], rax
cmp [rbp+var_48], 0
jz short loc_9DD03
mov rax, [rbp+var_40]
mov ecx, [rbp+var_4C]
mov rax, [rax+rcx]
mov [rbp+var_40], rax
mov edi, [rbp+var_14]
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_48]
call my_checksum
mov [rbp+var_14], eax
loc_9DD03:
jmp short loc_9DD5F
loc_9DD05:
mov rax, [rbp+var_38]
movzx eax, word ptr [rax+0Ch]
mov [rbp+var_50], eax
cmp [rbp+var_50], 1
jnz short loc_9DD23
mov rax, [rbp+var_40]
movzx eax, byte ptr [rax]
mov [rbp+var_48], rax
jmp short loc_9DD2E
loc_9DD23:
mov rax, [rbp+var_40]
movzx eax, word ptr [rax]
mov [rbp+var_48], rax
loc_9DD2E:
mov ecx, [rbp+var_50]
mov rax, [rbp+var_40]
mov ecx, ecx
add rax, rcx
mov [rbp+var_40], rax
jmp short loc_9DD4C
loc_9DD40:
mov rax, [rbp+var_38]
movzx eax, word ptr [rax+8]
mov [rbp+var_48], rax
loc_9DD4C:
mov edi, [rbp+var_14]
mov rsi, [rbp+var_40]
mov rdx, [rbp+var_48]
call my_checksum
mov [rbp+var_14], eax
loc_9DD5F:
mov eax, [rbp+var_18]
add eax, 1
mov [rbp+var_18], eax
jmp loc_9DC40
loc_9DD6D:
mov eax, [rbp+var_14]
add rsp, 60h
pop rbp
retn
| long long ma_checksum(long long a1, long long a2)
{
unsigned int v3; // [rsp+14h] [rbp-4Ch]
long long v4; // [rsp+18h] [rbp-48h]
long long v5; // [rsp+18h] [rbp-48h]
unsigned __int8 *v6; // [rsp+20h] [rbp-40h]
long long v7; // [rsp+28h] [rbp-38h]
long long v8; // [rsp+30h] [rbp-30h]
long long v9; // [rsp+38h] [rbp-28h]
unsigned int v10; // [rsp+44h] [rbp-1Ch]
unsigned int v11; // [rsp+48h] [rbp-18h]
unsigned int v12; // [rsp+4Ch] [rbp-14h]
v12 = 0;
v9 = *(_QWORD *)(*(_QWORD *)a1 + 1416LL);
v8 = *(_QWORD *)(*(_QWORD *)a1 + 1448LL);
if ( *(_DWORD *)(*(_QWORD *)a1 + 1020LL) )
v12 = my_checksum(0LL, a2, *(unsigned int *)(*(_QWORD *)a1 + 1020LL));
v11 = 0;
v10 = *(_DWORD *)(*(_QWORD *)a1 + 968LL);
while ( v11 < v10 )
{
v7 = 56LL * *(unsigned __int16 *)(v8 + 2LL * v11) + v9;
if ( (*(_BYTE *)(v7 + 18) & *(_BYTE *)(a2 + *(unsigned __int16 *)(v7 + 14))) == 0 )
{
v6 = (unsigned __int8 *)(*(unsigned int *)(v7 + 4) + a2);
if ( *(_DWORD *)v7 == 4 )
{
v3 = *(unsigned __int16 *)(v7 + 8) - 8;
v4 = ma_calc_blob_length(v3, v6);
if ( v4 )
v12 = my_checksum(v12, *(_QWORD *)&v6[v3], v4);
}
else
{
if ( *(_DWORD *)v7 == 8 )
{
if ( *(_WORD *)(v7 + 12) == 1 )
v5 = *v6;
else
v5 = *(unsigned __int16 *)v6;
v6 += *(unsigned __int16 *)(v7 + 12);
}
else
{
v5 = *(unsigned __int16 *)(v7 + 8);
}
v12 = my_checksum(v12, v6, v5);
}
}
++v11;
}
return v12;
}
| _ma_checksum:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x588]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x5a8]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
CMP dword ptr [RAX + 0x3fc],0x0
JZ 0x0019dc29
MOV EDI,dword ptr [RBP + -0x14]
MOV RSI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x3fc]
MOV EDX,EAX
CALL 0x0020b2a0
MOV dword ptr [RBP + -0x14],EAX
LAB_0019dc29:
MOV dword ptr [RBP + -0x18],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x3c8]
MOV dword ptr [RBP + -0x1c],EAX
LAB_0019dc40:
MOV EAX,dword ptr [RBP + -0x18]
CMP EAX,dword ptr [RBP + -0x1c]
JNC 0x0019dd6d
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
MOV EDX,dword ptr [RBP + -0x18]
MOVZX ECX,word ptr [RCX + RDX*0x2]
MOVSXD RCX,ECX
IMUL RCX,RCX,0x38
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x38]
MOVZX ECX,word ptr [RCX + 0xe]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV RCX,qword ptr [RBP + -0x38]
MOVZX ECX,byte ptr [RCX + 0x12]
AND EAX,ECX
CMP EAX,0x0
JZ 0x0019dc8d
JMP 0x0019dd5f
LAB_0019dc8d:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RCX + 0x4]
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x54],EAX
SUB EAX,0x4
JZ 0x0019dcbc
JMP 0x0019dcaf
LAB_0019dcaf:
MOV EAX,dword ptr [RBP + -0x54]
SUB EAX,0x8
JZ 0x0019dd05
JMP 0x0019dd40
LAB_0019dcbc:
MOV RAX,qword ptr [RBP + -0x38]
MOVZX EAX,word ptr [RAX + 0x8]
SUB EAX,0x8
MOV dword ptr [RBP + -0x4c],EAX
MOV EDI,dword ptr [RBP + -0x4c]
MOV RSI,qword ptr [RBP + -0x40]
CALL 0x001545b0
MOV qword ptr [RBP + -0x48],RAX
CMP qword ptr [RBP + -0x48],0x0
JZ 0x0019dd03
MOV RAX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RAX + RCX*0x1]
MOV qword ptr [RBP + -0x40],RAX
MOV EDI,dword ptr [RBP + -0x14]
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x48]
CALL 0x0020b2a0
MOV dword ptr [RBP + -0x14],EAX
LAB_0019dd03:
JMP 0x0019dd5f
LAB_0019dd05:
MOV RAX,qword ptr [RBP + -0x38]
MOVZX EAX,word ptr [RAX + 0xc]
MOV dword ptr [RBP + -0x50],EAX
CMP dword ptr [RBP + -0x50],0x1
JNZ 0x0019dd23
MOV RAX,qword ptr [RBP + -0x40]
MOVZX EAX,byte ptr [RAX]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x0019dd2e
LAB_0019dd23:
MOV RAX,qword ptr [RBP + -0x40]
MOVZX EAX,word ptr [RAX]
MOV qword ptr [RBP + -0x48],RAX
LAB_0019dd2e:
MOV ECX,dword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x40]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0019dd4c
LAB_0019dd40:
MOV RAX,qword ptr [RBP + -0x38]
MOVZX EAX,word ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x48],RAX
LAB_0019dd4c:
MOV EDI,dword ptr [RBP + -0x14]
MOV RSI,qword ptr [RBP + -0x40]
MOV RDX,qword ptr [RBP + -0x48]
CALL 0x0020b2a0
MOV dword ptr [RBP + -0x14],EAX
LAB_0019dd5f:
MOV EAX,dword ptr [RBP + -0x18]
ADD EAX,0x1
MOV dword ptr [RBP + -0x18],EAX
JMP 0x0019dc40
LAB_0019dd6d:
MOV EAX,dword ptr [RBP + -0x14]
ADD RSP,0x60
POP RBP
RET
|
int4 _ma_checksum(long *param_1,long param_2)
{
uint uVar1;
long lVar2;
long lVar3;
ushort uVar4;
int *piVar5;
long lVar6;
ushort *local_48;
uint local_20;
int4 local_1c;
local_1c = 0;
lVar2 = *(long *)(*param_1 + 0x588);
lVar3 = *(long *)(*param_1 + 0x5a8);
if (*(int *)(*param_1 + 0x3fc) != 0) {
local_1c = my_checksum(0,param_2,*(int4 *)(*param_1 + 0x3fc));
}
local_20 = 0;
uVar1 = *(uint *)(*param_1 + 0x3c8);
for (; local_20 < uVar1; local_20 = local_20 + 1) {
piVar5 = (int *)(lVar2 + (long)(int)(uint)*(ushort *)(lVar3 + (ulong)local_20 * 2) * 0x38);
if ((*(byte *)(param_2 + (ulong)*(ushort *)((long)piVar5 + 0xe)) &
*(byte *)((long)piVar5 + 0x12)) == 0) {
local_48 = (ushort *)(param_2 + (ulong)(uint)piVar5[1]);
if (*piVar5 == 4) {
uVar4 = *(ushort *)(piVar5 + 2);
lVar6 = _ma_calc_blob_length(uVar4 - 8,local_48);
if (lVar6 != 0) {
local_1c = my_checksum(local_1c,*(int8 *)((long)local_48 + (ulong)(uVar4 - 8)),lVar6
);
}
}
else {
if (*piVar5 == 8) {
if (*(ushort *)(piVar5 + 3) == 1) {
uVar4 = (ushort)(byte)*local_48;
}
else {
uVar4 = *local_48;
}
local_48 = (ushort *)((long)local_48 + (ulong)(uint)*(ushort *)(piVar5 + 3));
}
else {
uVar4 = *(ushort *)(piVar5 + 2);
}
local_1c = my_checksum(local_1c,local_48,uVar4);
}
}
}
return local_1c;
}
| |
40,572 | gguf_set_arr_data | Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp | void gguf_set_arr_data(struct gguf_context * ctx, const char * key, enum gguf_type type, const void * data, size_t n) {
gguf_check_reserved_keys(key, data);
gguf_remove_key(ctx, key);
const size_t nbytes = n*gguf_type_size(type);
std::vector<int8_t> tmp(nbytes);
if (!tmp.empty()) {
memcpy(tmp.data(), data, nbytes);
}
ctx->kv.emplace_back(key, tmp);
ctx->kv.back().cast(type);
} | O0 | cpp | gguf_set_arr_data:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x98(%rbp)
leaq -0x49(%rbp), %rdi
movq %rdi, -0x90(%rbp)
callq 0x49010
movq -0x98(%rbp), %rsi
movq -0x90(%rbp), %rdx
leaq -0x48(%rbp), %rdi
callq 0x48c30
jmp 0x8da52
movq -0x20(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x8dbc0
jmp 0x8da61
leaq -0x48(%rbp), %rdi
callq 0x464e0
leaq -0x49(%rbp), %rdi
callq 0x46360
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x473b0
movq -0x28(%rbp), %rax
movq %rax, -0xb0(%rbp)
movl -0x14(%rbp), %edi
callq 0x494c0
movq %rax, %rcx
movq -0xb0(%rbp), %rax
imulq %rcx, %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0xa8(%rbp)
leaq -0x81(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
callq 0x496e0
movq -0xa8(%rbp), %rsi
movq -0xa0(%rbp), %rdx
leaq -0x80(%rbp), %rdi
callq 0x42ae0
jmp 0x8dadc
leaq -0x81(%rbp), %rdi
callq 0x46940
leaq -0x80(%rbp), %rdi
callq 0x47540
testb $0x1, %al
jne 0x8db58
leaq -0x80(%rbp), %rdi
callq 0x461b0
movq %rax, %rdi
movq -0x20(%rbp), %rsi
movq -0x68(%rbp), %rdx
callq 0x453f0
jmp 0x8db58
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x8db33
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x464e0
leaq -0x49(%rbp), %rdi
callq 0x46360
jmp 0x8dbb0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x81(%rbp), %rdi
callq 0x46940
jmp 0x8dbb0
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
leaq -0x10(%rbp), %rsi
leaq -0x80(%rbp), %rdx
callq 0x42640
jmp 0x8db6f
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
callq 0x422b0
movq %rax, %rdi
movl -0x14(%rbp), %esi
callq 0x42ea0
jmp 0x8db89
leaq -0x80(%rbp), %rdi
callq 0x44b40
addq $0xb0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x44b40
movq -0x58(%rbp), %rdi
callq 0x48fc0
nopl (%rax)
| gguf_set_arr_data:
push rbp
mov rbp, rsp
sub rsp, 0B0h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rax, [rbp+var_10]
mov [rbp+var_98], rax
lea rdi, [rbp+var_49]
mov [rbp+var_90], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, [rbp+var_98]
mov rdx, [rbp+var_90]
lea rdi, [rbp+var_48]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_8DA52:
mov rsi, [rbp+var_20]
lea rdi, [rbp+var_48]
call _ZL24gguf_check_reserved_keysIPKvEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEET_; gguf_check_reserved_keys<void const*>(std::string const&,void const*)
jmp short $+2
loc_8DA61:
lea rdi, [rbp+var_48]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rbp+var_49]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call _gguf_remove_key
mov rax, [rbp+var_28]
mov [rbp+var_B0], rax
mov edi, [rbp+var_14]
call __Z14gguf_type_size9gguf_type; gguf_type_size(gguf_type)
mov rcx, rax
mov rax, [rbp+var_B0]
imul rax, rcx
mov [rbp+var_68], rax
mov rax, [rbp+var_68]
mov [rbp+var_A8], rax
lea rdi, [rbp+var_81]
mov [rbp+var_A0], rdi
call __ZNSaIaEC2Ev; std::allocator<signed char>::allocator(void)
mov rsi, [rbp+var_A8]
mov rdx, [rbp+var_A0]
lea rdi, [rbp+var_80]
call __ZNSt6vectorIaSaIaEEC2EmRKS0_; std::vector<signed char>::vector(ulong,std::allocator<signed char> const&)
jmp short $+2
loc_8DADC:
lea rdi, [rbp+var_81]
call __ZNSaIaED2Ev; std::allocator<signed char>::~allocator()
lea rdi, [rbp+var_80]
call __ZNKSt6vectorIaSaIaEE5emptyEv; std::vector<signed char>::empty(void)
test al, 1
jnz short loc_8DB58
lea rdi, [rbp+var_80]
call __ZNSt6vectorIaSaIaEE4dataEv; std::vector<signed char>::data(void)
mov rdi, rax
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_68]
call _memcpy
jmp short loc_8DB58
mov rcx, rax
mov eax, edx
mov [rbp+var_58], rcx
mov [rbp+var_5C], eax
jmp short loc_8DB33
mov rcx, rax
mov eax, edx
mov [rbp+var_58], rcx
mov [rbp+var_5C], eax
lea rdi, [rbp+var_48]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_8DB33:
lea rdi, [rbp+var_49]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_8DBB0
mov rcx, rax
mov eax, edx
mov [rbp+var_58], rcx
mov [rbp+var_5C], eax
lea rdi, [rbp+var_81]
call __ZNSaIaED2Ev; std::allocator<signed char>::~allocator()
jmp short loc_8DBB0
loc_8DB58:
mov rdi, [rbp+var_8]
add rdi, 8
lea rsi, [rbp+var_10]
lea rdx, [rbp+var_80]
call __ZNSt6vectorI7gguf_kvSaIS0_EE12emplace_backIJRPKcRS_IaSaIaEEEEERS0_DpOT_; std::vector<gguf_kv>::emplace_back<char const*&,std::vector&<signed char,std::allocator<signed char>>>(char const*&,std::vector&<signed char,std::allocator<signed char>> &&)
jmp short $+2
loc_8DB6F:
mov rdi, [rbp+var_8]
add rdi, 8
call __ZNSt6vectorI7gguf_kvSaIS0_EE4backEv; std::vector<gguf_kv>::back(void)
mov rdi, rax
mov esi, [rbp+var_14]
call __ZN7gguf_kv4castE9gguf_type; gguf_kv::cast(gguf_type)
jmp short $+2
loc_8DB89:
lea rdi, [rbp+var_80]
call __ZNSt6vectorIaSaIaEED2Ev; std::vector<signed char>::~vector()
add rsp, 0B0h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_58], rcx
mov [rbp+var_5C], eax
lea rdi, [rbp+var_80]
call __ZNSt6vectorIaSaIaEED2Ev; std::vector<signed char>::~vector()
loc_8DBB0:
mov rdi, [rbp+var_58]
call __Unwind_Resume
| long long gguf_set_arr_data(long long a1, long long a2, unsigned int a3, long long a4, long long a5)
{
long long v5; // rax
long long v6; // rax
long long v8; // [rsp+0h] [rbp-B0h]
long long v9; // [rsp+8h] [rbp-A8h]
char v10; // [rsp+2Fh] [rbp-81h] BYREF
_BYTE v11[24]; // [rsp+30h] [rbp-80h] BYREF
long long v12; // [rsp+48h] [rbp-68h]
char v13; // [rsp+67h] [rbp-49h] BYREF
_BYTE v14[32]; // [rsp+68h] [rbp-48h] BYREF
long long v15; // [rsp+88h] [rbp-28h]
long long v16; // [rsp+90h] [rbp-20h]
unsigned int v17; // [rsp+9Ch] [rbp-14h]
long long v18; // [rsp+A0h] [rbp-10h] BYREF
long long v19; // [rsp+A8h] [rbp-8h]
v19 = a1;
v18 = a2;
v17 = a3;
v16 = a4;
v15 = a5;
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>(v14, a2, &v13);
gguf_check_reserved_keys<void const*>(v14, v16);
std::string::~string(v14);
std::allocator<char>::~allocator(&v13);
gguf_remove_key(v19, v18);
v8 = v15;
v12 = gguf_type_size(v17) * v8;
v9 = v12;
std::allocator<signed char>::allocator();
std::vector<signed char>::vector(v11, v9, &v10);
std::allocator<signed char>::~allocator(&v10);
if ( (std::vector<signed char>::empty(v11) & 1) == 0 )
{
v5 = std::vector<signed char>::data(v11);
memcpy(v5, v16, v12);
}
std::vector<gguf_kv>::emplace_back<char const*&,std::vector&<signed char,std::allocator<signed char>>>(
v19 + 8,
&v18,
v11);
v6 = std::vector<gguf_kv>::back(v19 + 8);
gguf_kv::cast(v6, v17);
return std::vector<signed char>::~vector(v11);
}
| gguf_set_arr_data:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xb0
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x98],RAX
LEA RDI,[RBP + -0x49]
MOV qword ptr [RBP + -0x90],RDI
CALL 0x00149010
MOV RSI,qword ptr [RBP + -0x98]
MOV RDX,qword ptr [RBP + -0x90]
LAB_0018da47:
LEA RDI,[RBP + -0x48]
CALL 0x00148c30
JMP 0x0018da52
LAB_0018da52:
MOV RSI,qword ptr [RBP + -0x20]
LAB_0018da56:
LEA RDI,[RBP + -0x48]
CALL 0x0018dbc0
LAB_0018da5f:
JMP 0x0018da61
LAB_0018da61:
LEA RDI,[RBP + -0x48]
CALL 0x001464e0
LEA RDI,[RBP + -0x49]
CALL 0x00146360
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x001473b0
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0xb0],RAX
MOV EDI,dword ptr [RBP + -0x14]
CALL 0x001494c0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0xb0]
IMUL RAX,RCX
MOV qword ptr [RBP + -0x68],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOV qword ptr [RBP + -0xa8],RAX
LEA RDI,[RBP + -0x81]
MOV qword ptr [RBP + -0xa0],RDI
CALL 0x001496e0
MOV RSI,qword ptr [RBP + -0xa8]
MOV RDX,qword ptr [RBP + -0xa0]
LAB_0018dad1:
LEA RDI,[RBP + -0x80]
CALL 0x00142ae0
LAB_0018dada:
JMP 0x0018dadc
LAB_0018dadc:
LEA RDI,[RBP + -0x81]
CALL 0x00146940
LEA RDI,[RBP + -0x80]
CALL 0x00147540
TEST AL,0x1
JNZ 0x0018db58
LEA RDI,[RBP + -0x80]
CALL 0x001461b0
MOV RDI,RAX
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x68]
CALL 0x001453f0
JMP 0x0018db58
LAB_0018db58:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x8
LAB_0018db60:
LEA RSI,[RBP + -0x10]
LEA RDX,[RBP + -0x80]
CALL 0x00142640
JMP 0x0018db6f
LAB_0018db6f:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x8
CALL 0x001422b0
MOV RDI,RAX
MOV ESI,dword ptr [RBP + -0x14]
CALL 0x00142ea0
LAB_0018db87:
JMP 0x0018db89
LAB_0018db89:
LEA RDI,[RBP + -0x80]
CALL 0x00144b40
ADD RSP,0xb0
POP RBP
RET
|
void gguf_set_arr_data(long param_1,char *param_2,int4 param_3,void *param_4,long param_5)
{
long lVar1;
long lVar2;
ulong uVar3;
void *__dest;
gguf_kv *pgVar4;
allocator local_89;
vector<signed_char,std::allocator<signed_char>> local_88 [24];
ulong local_70;
allocator local_51;
string local_50 [32];
long local_30;
void *local_28;
int4 local_1c;
char *local_18;
long local_10;
local_30 = param_5;
local_28 = param_4;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
std::allocator<char>::allocator();
/* try { // try from 0018da47 to 0018da4f has its CatchHandler @ 0018db10 */
std::__cxx11::string::string<std::allocator<char>>(local_50,param_2,&local_51);
/* try { // try from 0018da56 to 0018da5e has its CatchHandler @ 0018db1e */
gguf_check_reserved_keys<void_const*>(local_50,local_28);
std::__cxx11::string::~string(local_50);
std::allocator<char>::~allocator((allocator<char> *)&local_51);
gguf_remove_key(local_10,local_18);
lVar1 = local_30;
lVar2 = gguf_type_size(local_1c);
local_70 = lVar1 * lVar2;
std::allocator<signed_char>::allocator();
/* try { // try from 0018dad1 to 0018dad9 has its CatchHandler @ 0018db3e */
std::vector<signed_char,std::allocator<signed_char>>::vector(local_88,lVar1 * lVar2,&local_89);
std::allocator<signed_char>::~allocator((allocator<signed_char> *)&local_89);
uVar3 = std::vector<signed_char,std::allocator<signed_char>>::empty(local_88);
if ((uVar3 & 1) == 0) {
__dest = (void *)std::vector<signed_char,std::allocator<signed_char>>::data(local_88);
memcpy(__dest,local_28,local_70);
}
/* try { // try from 0018db60 to 0018db86 has its CatchHandler @ 0018db9b */
std::vector<gguf_kv,std::allocator<gguf_kv>>::
emplace_back<char_const*&,std::vector<signed_char,std::allocator<signed_char>>&>
((vector<gguf_kv,std::allocator<gguf_kv>> *)(local_10 + 8),&local_18,(vector *)local_88)
;
pgVar4 = (gguf_kv *)
std::vector<gguf_kv,std::allocator<gguf_kv>>::back
((vector<gguf_kv,std::allocator<gguf_kv>> *)(local_10 + 8));
gguf_kv::cast(pgVar4,local_1c);
std::vector<signed_char,std::allocator<signed_char>>::~vector(local_88);
return;
}
| |
40,573 | gguf_set_arr_data | Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp | void gguf_set_arr_data(struct gguf_context * ctx, const char * key, enum gguf_type type, const void * data, size_t n) {
gguf_check_reserved_keys(key, data);
gguf_remove_key(ctx, key);
const size_t nbytes = n*gguf_type_size(type);
std::vector<int8_t> tmp(nbytes);
if (!tmp.empty()) {
memcpy(tmp.data(), data, nbytes);
}
ctx->kv.emplace_back(key, tmp);
ctx->kv.back().cast(type);
} | O2 | cpp | gguf_set_arr_data:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %r8, %r12
movq %rcx, %r15
movl %edx, %ebx
movq %rsi, %r13
movq %rdi, %r14
movq %rsi, 0x28(%rsp)
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x1fa80
leaq 0x1d180(%rip), %rsi # 0x5f2c1
leaq 0x8(%rsp), %rdi
callq 0x20210
testb %al, %al
jne 0x421df
leaq 0x8(%rsp), %rdi
callq 0x1eab0
movq %r14, %rdi
movq %r13, %rsi
callq 0x1f0d0
movl %ebx, %edi
callq 0x1fdf0
movq %rax, %r13
imulq %r12, %r13
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %r13, %rsi
callq 0x1d4c0
movq 0x8(%rsp), %rdi
cmpq 0x10(%rsp), %rdi
je 0x4219f
movq %r15, %rsi
movq %r13, %rdx
callq 0x1e390
addq $0x8, %r14
leaq 0x28(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
callq 0x1d2f0
movq %r14, %rdi
callq 0x1d150
movq %rax, %rdi
movl %ebx, %esi
callq 0x1d600
leaq 0x8(%rsp), %rdi
callq 0x1f8c0
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x1d067(%rip), %rdi # 0x5f24d
leaq 0x1e40e(%rip), %rdx # 0x605fb
movl $0x3a3, %esi # imm = 0x3A3
xorl %eax, %eax
callq 0x1f9b0
jmp 0x4220a
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1eab0
jmp 0x4221c
movq %rax, %rbx
jmp 0x4221c
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1f8c0
movq %rbx, %rdi
callq 0x1fc10
| gguf_set_arr_data:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 30h
mov r12, r8
mov r15, rcx
mov ebx, edx
mov r13, rsi
mov r14, rdi
mov [rsp+58h+var_30], rsi
lea rdi, [rsp+58h+var_50]
lea rdx, [rsp+58h+var_51]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rsi, aGeneralAlignme; "general.alignment"
lea rdi, [rsp+58h+var_50]
call __ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jnz loc_421DF
lea rdi, [rsp+58h+var_50]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r14
mov rsi, r13
call _gguf_remove_key
mov edi, ebx
call __Z14gguf_type_size9gguf_type; gguf_type_size(gguf_type)
mov r13, rax
imul r13, r12
lea rdi, [rsp+58h+var_50]
lea rdx, [rsp+58h+var_51]
mov rsi, r13
call __ZNSt6vectorIaSaIaEEC2EmRKS0_; std::vector<signed char>::vector(ulong,std::allocator<signed char> const&)
mov rdi, [rsp+58h+var_50]
cmp rdi, [rsp+58h+var_48]
jz short loc_4219F
mov rsi, r15
mov rdx, r13
call _memcpy
loc_4219F:
add r14, 8
lea rsi, [rsp+58h+var_30]
lea rdx, [rsp+58h+var_50]
mov rdi, r14
call __ZNSt6vectorI7gguf_kvSaIS0_EE12emplace_backIJRPKcRS_IaSaIaEEEEERS0_DpOT_; std::vector<gguf_kv>::emplace_back<char const*&,std::vector&<signed char,std::allocator<signed char>>>(char const*&,std::vector&<signed char,std::allocator<signed char>> &&)
mov rdi, r14
call __ZNSt6vectorI7gguf_kvSaIS0_EE4backEv; std::vector<gguf_kv>::back(void)
mov rdi, rax
mov esi, ebx
call __ZN7gguf_kv4castE9gguf_type; gguf_kv::cast(gguf_type)
lea rdi, [rsp+58h+var_50]
call __ZNSt12_Vector_baseIaSaIaEED2Ev; std::_Vector_base<signed char>::~_Vector_base()
add rsp, 30h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_421DF:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGeneralAlignme_0; "general.alignment must be type u32"
mov esi, 3A3h
xor eax, eax
call _ggml_abort
jmp short loc_4220A
mov rbx, rax
lea rdi, [rsp+58h+var_50]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_4221C
loc_4220A:
mov rbx, rax
jmp short loc_4221C
mov rbx, rax
lea rdi, [rsp+58h+var_50]
call __ZNSt12_Vector_baseIaSaIaEED2Ev; std::_Vector_base<signed char>::~_Vector_base()
loc_4221C:
mov rdi, rbx
call __Unwind_Resume
| long long gguf_set_arr_data(
long long a1,
long long a2,
unsigned int a3,
long long a4,
long long a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
double a10,
double a11,
__m128 a12,
__m128 a13)
{
long long v16; // rcx
long long v17; // r8
long long v18; // r9
__m128 v19; // xmm4
__m128 v20; // xmm5
long long v21; // rdx
long long v22; // r13
long long v23; // rax
char v25; // [rsp+0h] [rbp-58h]
char v26; // [rsp+7h] [rbp-51h] BYREF
_QWORD v27[4]; // [rsp+8h] [rbp-50h] BYREF
long long v28[6]; // [rsp+28h] [rbp-30h] BYREF
v28[0] = a2;
std::string::basic_string<std::allocator<char>>(v27, a2, &v26);
if ( (unsigned __int8)std::operator==<char>(v27, "general.alignment") )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp",
931,
(long long)"general.alignment must be type u32",
v16,
v17,
v18,
a6,
a7,
a8,
a9,
v19,
v20,
a12,
a13,
v25);
std::string::~string(v27);
gguf_remove_key(a1, a2, v21);
v22 = a5 * gguf_type_size(a3);
std::vector<signed char>::vector(v27, v22, &v26);
if ( v27[0] != v27[1] )
memcpy(v27[0], a4, v22);
std::vector<gguf_kv>::emplace_back<char const*&,std::vector&<signed char,std::allocator<signed char>>>(
a1 + 8,
v28,
v27);
v23 = std::vector<gguf_kv>::back(a1 + 8);
gguf_kv::cast(v23, a3);
return std::_Vector_base<signed char>::~_Vector_base(v27);
}
| gguf_set_arr_data:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x30
MOV R12,R8
MOV R15,RCX
MOV EBX,EDX
MOV R13,RSI
MOV R14,RDI
MOV qword ptr [RSP + 0x28],RSI
LAB_0014212b:
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x7]
CALL 0x0011fa80
LAB_0014213a:
LEA RSI,[0x15f2c1]
LEA RDI,[RSP + 0x8]
CALL 0x00120210
TEST AL,AL
JNZ 0x001421df
LEA RDI,[RSP + 0x8]
CALL 0x0011eab0
MOV RDI,R14
MOV RSI,R13
CALL 0x0011f0d0
MOV EDI,EBX
CALL 0x0011fdf0
MOV R13,RAX
IMUL R13,R12
LAB_00142176:
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x7]
MOV RSI,R13
CALL 0x0011d4c0
LAB_00142188:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,qword ptr [RSP + 0x10]
JZ 0x0014219f
MOV RSI,R15
MOV RDX,R13
CALL 0x0011e390
LAB_0014219f:
ADD R14,0x8
LAB_001421a3:
LEA RSI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
MOV RDI,R14
CALL 0x0011d2f0
MOV RDI,R14
CALL 0x0011d150
MOV RDI,RAX
MOV ESI,EBX
CALL 0x0011d600
LEA RDI,[RSP + 0x8]
CALL 0x0011f8c0
ADD RSP,0x30
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_001421df:
LEA RDI,[0x15f24d]
LEA RDX,[0x1605fb]
MOV ESI,0x3a3
XOR EAX,EAX
CALL 0x0011f9b0
|
void gguf_set_arr_data(long param_1,char *param_2,int4 param_3,void *param_4,long param_5)
{
bool bVar1;
long lVar2;
gguf_kv *pgVar3;
allocator local_51;
void *local_50;
void *local_48;
char *local_30;
/* try { // try from 0014212b to 00142139 has its CatchHandler @ 0014220a */
local_30 = param_2;
std::__cxx11::string::string<std::allocator<char>>((string *)&local_50,param_2,&local_51);
bVar1 = std::operator==((string *)&local_50,"general.alignment");
if (!bVar1) {
std::__cxx11::string::~string((string *)&local_50);
gguf_remove_key(param_1,param_2);
lVar2 = gguf_type_size(param_3);
/* try { // try from 00142176 to 00142187 has its CatchHandler @ 001421f9 */
std::vector<signed_char,std::allocator<signed_char>>::vector
((vector<signed_char,std::allocator<signed_char>> *)&local_50,lVar2 * param_5,
&local_51);
if (local_50 != local_48) {
memcpy(local_50,param_4,lVar2 * param_5);
}
/* try { // try from 001421a3 to 001421c6 has its CatchHandler @ 0014220f */
std::vector<gguf_kv,std::allocator<gguf_kv>>::
emplace_back<char_const*&,std::vector<signed_char,std::allocator<signed_char>>&>
((vector<gguf_kv,std::allocator<gguf_kv>> *)(param_1 + 8),&local_30,
(vector *)&local_50);
pgVar3 = (gguf_kv *)
std::vector<gguf_kv,std::allocator<gguf_kv>>::back
((vector<gguf_kv,std::allocator<gguf_kv>> *)(param_1 + 8));
gguf_kv::cast(pgVar3,param_3);
std::_Vector_base<signed_char,std::allocator<signed_char>>::~_Vector_base
((_Vector_base<signed_char,std::allocator<signed_char>> *)&local_50);
return;
}
/* try { // try from 001421df to 001421f8 has its CatchHandler @ 001421fb */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp",
0x3a3,"general.alignment must be type u32");
}
| |
40,574 | gguf_set_arr_data | Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp | void gguf_set_arr_data(struct gguf_context * ctx, const char * key, enum gguf_type type, const void * data, size_t n) {
gguf_check_reserved_keys(key, data);
gguf_remove_key(ctx, key);
const size_t nbytes = n*gguf_type_size(type);
std::vector<int8_t> tmp(nbytes);
if (!tmp.empty()) {
memcpy(tmp.data(), data, nbytes);
}
ctx->kv.emplace_back(key, tmp);
ctx->kv.back().cast(type);
} | O3 | cpp | gguf_set_arr_data:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %r8, %r12
movq %rcx, %r15
movl %edx, %ebx
movq %rsi, %r13
movq %rdi, %r14
movq %rsi, 0x28(%rsp)
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x17d60
leaq 0x1dcbb(%rip), %rsi # 0x5d551
leaq 0x8(%rsp), %rdi
callq 0x17210
testl %eax, %eax
je 0x3f990
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3f8c3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x170d0
movq %r14, %rdi
movq %r13, %rsi
callq 0x176b0
movq 0x6fa8b(%rip), %rcx # 0xaf360
testq %rcx, %rcx
je 0x3f908
leaq 0x6fa77(%rip), %rax # 0xaf358
xorl %edx, %edx
cmpl %ebx, 0x20(%rcx)
setl %dl
cmovgeq %rcx, %rax
movq 0x10(%rcx,%rdx,8), %rcx
testq %rcx, %rcx
jne 0x3f8e1
leaq 0x6fa5a(%rip), %rcx # 0xaf358
cmpq %rcx, %rax
je 0x3f908
cmpl %ebx, 0x20(%rax)
jle 0x3f985
xorl %r13d, %r13d
imulq %r12, %r13
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %r13, %rsi
callq 0x16300
movq 0x8(%rsp), %rdi
cmpq 0x10(%rsp), %rdi
je 0x3f938
movq %r15, %rsi
movq %r13, %rdx
callq 0x16e10
leaq 0x8(%r14), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x161b0
movq 0x10(%r14), %rdi
cmpq %rdi, 0x8(%r14)
je 0x3f98b
addq $-0x58, %rdi
movl %ebx, %esi
callq 0x163c0
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3f977
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x170d0
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x28(%rax), %r13
jmp 0x3f90b
callq 0x18ce8
leaq 0x1db46(%rip), %rdi # 0x5d4dd
leaq 0x1e648(%rip), %rdx # 0x5dfe6
movl $0x3a3, %esi # imm = 0x3A3
xorl %eax, %eax
callq 0x17cd0
jmp 0x3f9c7
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3f9e6
movq 0x18(%rsp), %rsi
incq %rsi
jmp 0x3f9e1
movq %rax, %rbx
jmp 0x3f9e6
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3f9e6
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x170d0
movq %rbx, %rdi
callq 0x17e90
| gguf_set_arr_data:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 30h
mov r12, r8
mov r15, rcx
mov ebx, edx
mov r13, rsi
mov r14, rdi
mov [rsp+58h+var_30], rsi
lea rdi, [rsp+58h+var_50]
lea rdx, [rsp+58h+var_51]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rsi, aGeneralAlignme; "general.alignment"
lea rdi, [rsp+58h+var_50]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_3F990
lea rax, [rsp+58h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_3F8C3
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3F8C3:
mov rdi, r14
mov rsi, r13
call _gguf_remove_key
mov rcx, cs:qword_AF360
test rcx, rcx
jz short loc_3F908
lea rax, unk_AF358
loc_3F8E1:
xor edx, edx
cmp [rcx+20h], ebx
setl dl
cmovge rax, rcx
mov rcx, [rcx+rdx*8+10h]
test rcx, rcx
jnz short loc_3F8E1
lea rcx, unk_AF358
cmp rax, rcx
jz short loc_3F908
cmp [rax+20h], ebx
jle short loc_3F985
loc_3F908:
xor r13d, r13d
loc_3F90B:
imul r13, r12
lea rdi, [rsp+58h+var_50]
lea rdx, [rsp+58h+var_51]
mov rsi, r13
call __ZNSt6vectorIaSaIaEEC2EmRKS0_; std::vector<signed char>::vector(ulong,std::allocator<signed char> const&)
mov rdi, [rsp+58h+var_50]
cmp rdi, [rsp+58h+var_48]
jz short loc_3F938
mov rsi, r15
mov rdx, r13
call _memcpy
loc_3F938:
lea rdi, [r14+8]
lea rsi, [rsp+58h+var_30]
lea rdx, [rsp+58h+var_50]
call __ZNSt6vectorI7gguf_kvSaIS0_EE12emplace_backIJRPKcRS_IaSaIaEEEEERS0_DpOT_; std::vector<gguf_kv>::emplace_back<char const*&,std::vector&<signed char,std::allocator<signed char>>>(char const*&,std::vector&<signed char,std::allocator<signed char>> &&)
mov rdi, [r14+10h]
cmp [r14+8], rdi
jz short loc_3F98B
add rdi, 0FFFFFFFFFFFFFFA8h
mov esi, ebx
call __ZN7gguf_kv4castE9gguf_type; gguf_kv::cast(gguf_type)
mov rdi, [rsp+58h+var_50]; void *
test rdi, rdi
jz short loc_3F977
mov rsi, [rsp+58h+var_40]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3F977:
add rsp, 30h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_3F985:
mov r13, [rax+28h]
jmp short loc_3F90B
loc_3F98B:
call gguf_set_arr_data_cold_1
loc_3F990:
lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGeneralAlignme_0; "general.alignment must be type u32"
mov esi, 3A3h
xor eax, eax
call _ggml_abort
jmp short loc_3F9C7
mov rbx, rax
lea rax, [rsp+58h+var_40]
mov rdi, [rax-10h]
cmp rdi, rax
jz short loc_3F9E6
mov rsi, [rsp+58h+var_40]
inc rsi
jmp short loc_3F9E1
loc_3F9C7:
mov rbx, rax
jmp short loc_3F9E6
mov rbx, rax
mov rdi, [rsp+58h+var_50]; void *
test rdi, rdi
jz short loc_3F9E6
mov rsi, [rsp+58h+var_40]
sub rsi, rdi; unsigned __int64
loc_3F9E1:
call __ZdlPvm; operator delete(void *,ulong)
loc_3F9E6:
mov rdi, rbx
call __Unwind_Resume
| void gguf_set_arr_data(long long a1, long long a2, signed int a3, long long a4, long long a5)
{
int v8; // ecx
int v9; // r8d
int v10; // r9d
long long v11; // rcx
_QWORD *v12; // rax
long long v13; // r13
long long v14; // rdi
char v15; // [rsp+7h] [rbp-51h] BYREF
void *v16[2]; // [rsp+8h] [rbp-50h] BYREF
long long v17; // [rsp+18h] [rbp-40h] BYREF
long long v18[6]; // [rsp+28h] [rbp-30h] BYREF
v18[0] = a2;
std::string::basic_string<std::allocator<char>>(v16, a2, &v15);
if ( !(unsigned int)std::string::compare(v16, "general.alignment") )
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp",
931,
(unsigned int)"general.alignment must be type u32",
v8,
v9,
v10);
if ( v16[0] != &v17 )
operator delete(v16[0], v17 + 1);
gguf_remove_key(a1, a2);
v11 = qword_AF360;
if ( !qword_AF360 )
goto LABEL_11;
v12 = &unk_AF358;
do
{
if ( *(_DWORD *)(v11 + 32) >= a3 )
v12 = (_QWORD *)v11;
v11 = *(_QWORD *)(v11 + 8LL * (*(_DWORD *)(v11 + 32) < a3) + 16);
}
while ( v11 );
if ( v12 != (_QWORD *)&unk_AF358 && *((_DWORD *)v12 + 8) <= a3 )
v13 = v12[5];
else
LABEL_11:
v13 = 0LL;
std::vector<signed char>::vector(v16, a5 * v13, &v15);
if ( v16[0] != v16[1] )
memcpy(v16[0]);
std::vector<gguf_kv>::emplace_back<char const*&,std::vector&<signed char,std::allocator<signed char>>>(
a1 + 8,
v18,
v16);
v14 = *(_QWORD *)(a1 + 16);
if ( *(_QWORD *)(a1 + 8) == v14 )
gguf_set_arr_data_cold_1();
gguf_kv::cast(v14 - 88, (unsigned int)a3);
if ( v16[0] )
operator delete(v16[0], v17 - (unsigned long long)v16[0]);
}
| gguf_set_arr_data:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x30
MOV R12,R8
MOV R15,RCX
MOV EBX,EDX
MOV R13,RSI
MOV R14,RDI
MOV qword ptr [RSP + 0x28],RSI
LAB_0013f880:
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x7]
CALL 0x00117d60
LAB_0013f88f:
LEA RSI,[0x15d551]
LEA RDI,[RSP + 0x8]
CALL 0x00117210
TEST EAX,EAX
JZ 0x0013f990
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0013f8c3
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001170d0
LAB_0013f8c3:
MOV RDI,R14
MOV RSI,R13
CALL 0x001176b0
MOV RCX,qword ptr [0x001af360]
TEST RCX,RCX
JZ 0x0013f908
LEA RAX,[0x1af358]
LAB_0013f8e1:
XOR EDX,EDX
CMP dword ptr [RCX + 0x20],EBX
SETL DL
CMOVGE RAX,RCX
MOV RCX,qword ptr [RCX + RDX*0x8 + 0x10]
TEST RCX,RCX
JNZ 0x0013f8e1
LEA RCX,[0x1af358]
CMP RAX,RCX
JZ 0x0013f908
CMP dword ptr [RAX + 0x20],EBX
JLE 0x0013f985
LAB_0013f908:
XOR R13D,R13D
LAB_0013f90b:
IMUL R13,R12
LAB_0013f90f:
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x7]
MOV RSI,R13
CALL 0x00116300
LAB_0013f921:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,qword ptr [RSP + 0x10]
JZ 0x0013f938
MOV RSI,R15
MOV RDX,R13
CALL 0x00116e10
LAB_0013f938:
LEA RDI,[R14 + 0x8]
LAB_0013f93c:
LEA RSI,[RSP + 0x28]
LEA RDX,[RSP + 0x8]
CALL 0x001161b0
MOV RDI,qword ptr [R14 + 0x10]
CMP qword ptr [R14 + 0x8],RDI
JZ 0x0013f98b
ADD RDI,-0x58
MOV ESI,EBX
CALL 0x001163c0
LAB_0013f960:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x0013f977
MOV RSI,qword ptr [RSP + 0x18]
SUB RSI,RDI
CALL 0x001170d0
LAB_0013f977:
ADD RSP,0x30
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_0013f985:
MOV R13,qword ptr [RAX + 0x28]
JMP 0x0013f90b
LAB_0013f98b:
CALL 0x00118ce8
LAB_0013f990:
LEA RDI,[0x15d4dd]
LEA RDX,[0x15dfe6]
MOV ESI,0x3a3
XOR EAX,EAX
CALL 0x00117cd0
|
void gguf_set_arr_data(long param_1,char *param_2,int param_3,void *param_4,long param_5)
{
int iVar1;
long lVar2;
long lVar3;
allocator local_51;
long *local_50;
long *local_48;
long local_40 [2];
char *local_30;
/* try { // try from 0013f880 to 0013f88e has its CatchHandler @ 0013f9c7 */
local_30 = param_2;
std::__cxx11::string::string<std::allocator<char>>((string *)&local_50,param_2,&local_51);
iVar1 = std::__cxx11::string::compare((string *)&local_50,"general.alignment");
if (iVar1 == 0) goto LAB_0013f990;
if (local_50 != local_40) {
operator_delete(local_50,local_40[0] + 1);
}
gguf_remove_key(param_1,param_2);
if (GGUF_TYPE_SIZE._16_8_ == 0) {
LAB_0013f908:
lVar3 = 0;
}
else {
lVar2 = 0x1af358;
lVar3 = GGUF_TYPE_SIZE._16_8_;
do {
if (param_3 <= *(int *)(lVar3 + 0x20)) {
lVar2 = lVar3;
}
lVar3 = *(long *)(lVar3 + 0x10 + (ulong)(*(int *)(lVar3 + 0x20) < param_3) * 8);
} while (lVar3 != 0);
if ((lVar2 == 0x1af358) || (param_3 < *(int *)(lVar2 + 0x20))) goto LAB_0013f908;
lVar3 = *(long *)(lVar2 + 0x28);
}
/* try { // try from 0013f90f to 0013f920 has its CatchHandler @ 0013f9aa */
std::vector<signed_char,std::allocator<signed_char>>::vector
((ulong)&local_50,(allocator *)(lVar3 * param_5));
if (local_50 != local_48) {
memcpy(local_50,param_4,(size_t)(lVar3 * param_5));
}
/* try { // try from 0013f93c to 0013f95f has its CatchHandler @ 0013f9cc */
std::vector<gguf_kv,std::allocator<gguf_kv>>::
emplace_back<char_const*&,std::vector<signed_char,std::allocator<signed_char>>&>
((vector<gguf_kv,std::allocator<gguf_kv>> *)(param_1 + 8),&local_30,(vector *)&local_50)
;
if (*(long *)(param_1 + 8) != *(long *)(param_1 + 0x10)) {
gguf_kv::cast((gguf_kv *)(*(long *)(param_1 + 0x10) + -0x58),param_3);
if (local_50 != (long *)0x0) {
operator_delete(local_50,local_40[0] - (long)local_50);
}
return;
}
gguf_set_arr_data_cold_1();
LAB_0013f990:
/* try { // try from 0013f990 to 0013f9a9 has its CatchHandler @ 0013f9ac */
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp",
0x3a3,"general.alignment must be type u32");
}
| |
40,575 | YogaTest_absolute_node_cloned_with_static_parent_Test::~YogaTest_absolute_node_cloned_with_static_parent_Test() | yoga-mod/tests/YGCloneNodeTest.cpp | TEST(YogaTest, absolute_node_cloned_with_static_parent) {
YGNodeRef root = YGNodeNew();
YGNodeStyleSetWidth(root, 100);
YGNodeStyleSetHeight(root, 100);
YGNodeRef root_child0 = YGNodeNew();
YGNodeStyleSetPositionType(root_child0, YGPositionTypeStatic);
YGNodeStyleSetWidth(root_child0, 10);
YGNodeStyleSetHeight(root_child0, 10);
YGNodeInsertChild(root, root_child0, 0);
YGNodeRef root_child0_child0 = YGNodeNew();
YGNodeStyleSetPositionType(root_child0_child0, YGPositionTypeAbsolute);
YGNodeStyleSetWidthPercent(root_child0_child0, 1);
YGNodeStyleSetHeight(root_child0_child0, 1);
YGNodeInsertChild(root_child0, root_child0_child0, 0);
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
YGNodeRef clonedRoot = YGNodeClone(root);
YGNodeStyleSetWidth(clonedRoot, 110);
YGNodeCalculateLayout(clonedRoot, YGUndefined, YGUndefined, YGDirectionLTR);
recursivelyAssertProperNodeOwnership(clonedRoot);
YGNodeFreeRecursive(root);
YGNodeFreeRecursive(clonedRoot);
} | O3 | cpp | YogaTest_absolute_node_cloned_with_static_parent_Test::~YogaTest_absolute_node_cloned_with_static_parent_Test():
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x381548
movl $0x10, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x32440
nop
| _ZN53YogaTest_absolute_node_cloned_with_static_parent_TestD0Ev:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
call _ZN7testing4TestD2Ev; testing::Test::~Test()
mov esi, 10h; unsigned __int64
mov rdi, rbx; void *
add rsp, 8
pop rbx
pop rbp
jmp __ZdlPvm; operator delete(void *,ulong)
| void YogaTest_absolute_node_cloned_with_static_parent_Test::~YogaTest_absolute_node_cloned_with_static_parent_Test(
YogaTest_absolute_node_cloned_with_static_parent_Test *this)
{
testing::Test::~Test(this);
operator delete(this, 0x10uLL);
}
| ~YogaTest_absolute_node_cloned_with_static_parent_Test:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
CALL 0x00481548
MOV ESI,0x10
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x00132440
|
/* YogaTest_absolute_node_cloned_with_static_parent_Test::~YogaTest_absolute_node_cloned_with_static_parent_Test()
*/
void __thiscall
YogaTest_absolute_node_cloned_with_static_parent_Test::
~YogaTest_absolute_node_cloned_with_static_parent_Test
(YogaTest_absolute_node_cloned_with_static_parent_Test *this)
{
testing::Test::~Test((Test *)this);
operator_delete(this,0x10);
return;
}
| |
40,576 | 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));
} | O2 | 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)
andl $0x0, 0x20(%rdi)
movups %xmm0, (%rdi)
movups %xmm0, 0x28(%rdi)
movq %rsi, 0x38(%rdi)
movl $0x3b9aca00, %ecx # imm = 0x3B9ACA00
movq %rsi, %rax
cqto
idivq %rcx
movq %rax, (%rsp)
leaq 0x2349e(%rip), %rax # 0x31bf1
cmpb $0x1, (%rax)
jne 0xe767
movq %rsp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x8b10
jmp 0xe774
movq %rsp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x82d0
movq 0x30(%rsp), %rcx
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), %rax
movq %rax, 0x70(%rsp)
imulq $-0x3b9aca00, (%rsp), %rsi # imm = 0xC4653600
movq %rax, 0x30(%rbx)
movups %xmm2, 0x20(%rbx)
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
movl $0xe10, %edi # imm = 0xE10
movq %rcx, %rax
cqto
idivq %rdi
subq %rdx, %rcx
movq %rcx, 0x48(%rbx)
addq %r14, %rsi
movl $0x3e8, %ecx # imm = 0x3E8
movq %rsi, %rax
cqto
idivq %rcx
movq %rax, 0x40(%rbx)
addq $0x78, %rsp
popq %rbx
popq %r14
retq
| _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
and dword ptr [rdi+20h], 0
movups xmmword ptr [rdi], xmm0
movups xmmword ptr [rdi+28h], xmm0
mov [rdi+38h], rsi
mov ecx, 3B9ACA00h
mov rax, rsi
cqo
idiv rcx
mov [rsp+88h+var_88], rax
lea rax, _ZN3fLB18FLAGS_log_utc_timeE; fLB::FLAGS_log_utc_time
cmp byte ptr [rax], 1
jnz short loc_E767
mov rdi, rsp
lea rsi, [rsp+88h+var_80]
call _gmtime_r
jmp short loc_E774
loc_E767:
mov rdi, rsp
lea rsi, [rsp+88h+var_80]
call _localtime_r
loc_E774:
mov rcx, [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 rax, [rsp+88h+var_50]
mov [rsp+88h+var_18], rax
imul rsi, [rsp+88h+var_88], 0FFFFFFFFC4653600h
mov [rbx+30h], rax
movups xmmword ptr [rbx+20h], xmm2
movups xmmword ptr [rbx+10h], xmm1
movups xmmword ptr [rbx], xmm0
mov edi, 0E10h
mov rax, rcx
cqo
idiv rdi
sub rcx, rdx
mov [rbx+48h], rcx
add rsi, r14
mov ecx, 3E8h
mov rax, rsi
cqo
idiv rcx
mov [rbx+40h], rax
add rsp, 78h
pop rbx
pop r14
retn
| long long nglog::LogMessageTime::LogMessageTime(long long a1, long long a2)
{
long long v3; // rdx
long long v4; // rcx
__int128 v5; // xmm0
__int128 v6; // xmm1
__int128 v7; // xmm2
long long v8; // rsi
long long result; // rax
long long v10; // [rsp+0h] [rbp-88h] BYREF
_OWORD v11[2]; // [rsp+8h] [rbp-80h] BYREF
__int128 v12; // [rsp+28h] [rbp-60h]
long long v13; // [rsp+38h] [rbp-50h]
*(_OWORD *)(a1 + 16) = 0LL;
*(_DWORD *)(a1 + 32) = 0;
*(_OWORD *)a1 = 0LL;
*(_OWORD *)(a1 + 40) = 0LL;
*(_QWORD *)(a1 + 56) = a2;
v3 = a2 % 1000000000;
v10 = a2 / 1000000000;
if ( fLB::FLAGS_log_utc_time == 1 )
gmtime_r(&v10, v11, v3);
else
localtime_r(&v10, v11, v3);
v4 = *((_QWORD *)&v12 + 1);
v5 = v11[0];
v6 = v11[1];
v7 = v12;
v8 = -1000000000 * v10;
*(_QWORD *)(a1 + 48) = v13;
*(_OWORD *)(a1 + 32) = v7;
*(_OWORD *)(a1 + 16) = v6;
*(_OWORD *)a1 = v5;
*(_QWORD *)(a1 + 72) = v4 - v4 % 3600;
result = (a2 + v8) / 1000;
*(_QWORD *)(a1 + 64) = result;
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
AND dword ptr [RDI + 0x20],0x0
MOVUPS xmmword ptr [RDI],XMM0
MOVUPS xmmword ptr [RDI + 0x28],XMM0
MOV qword ptr [RDI + 0x38],RSI
MOV ECX,0x3b9aca00
MOV RAX,RSI
CQO
IDIV RCX
MOV qword ptr [RSP],RAX
LEA RAX,[0x131bf1]
CMP byte ptr [RAX],0x1
JNZ 0x0010e767
MOV RDI,RSP
LEA RSI,[RSP + 0x8]
CALL 0x00108b10
JMP 0x0010e774
LAB_0010e767:
MOV RDI,RSP
LEA RSI,[RSP + 0x8]
CALL 0x001082d0
LAB_0010e774:
MOV RCX,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 RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x70],RAX
IMUL RSI,qword ptr [RSP],-0x3b9aca00
MOV qword ptr [RBX + 0x30],RAX
MOVUPS xmmword ptr [RBX + 0x20],XMM2
MOVUPS xmmword ptr [RBX + 0x10],XMM1
MOVUPS xmmword ptr [RBX],XMM0
MOV EDI,0xe10
MOV RAX,RCX
CQO
IDIV RDI
SUB RCX,RDX
MOV qword ptr [RBX + 0x48],RCX
ADD RSI,R14
MOV ECX,0x3e8
MOV RAX,RSI
CQO
IDIV RCX
MOV qword ptr [RBX + 0x40],RAX
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;
*(int4 *)(this + 0x20) = 0;
*(int8 *)this = 0;
*(int8 *)(this + 8) = 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 - local_80[0].tm_gmtoff % 0xe10;
*(long *)(this + 0x40) = (local_88 * -1000000000 + param_2) / 1000;
return;
}
| |
40,577 | 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 0x228fe(%rip), %rax # 0x31b89
cmpb $0x1, (%rax)
jne 0xf29f
movq %rsp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x7a70
jmp 0xf2ac
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_F29F
mov rdi, rsp
lea rsi, [rsp+88h+var_80]
call _gmtime_r
jmp short loc_F2AC
loc_F29F:
mov rdi, rsp
lea rsi, [rsp+88h+var_80]
call _localtime_r
loc_F2AC:
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,[0x131b89]
CMP byte ptr [RAX],0x1
JNZ 0x0010f29f
MOV RDI,RSP
LEA RSI,[RSP + 0x8]
CALL 0x00107a70
JMP 0x0010f2ac
LAB_0010f29f:
MOV RDI,RSP
LEA RSI,[RSP + 0x8]
CALL 0x00107260
LAB_0010f2ac:
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;
}
| |
40,578 | minja::Parser::unexpected(minja::TemplateToken const&) const | monkey531[P]llama/common/minja.hpp | std::runtime_error unexpected(const TemplateToken & token) const {
return std::runtime_error("Unexpected " + TemplateToken::typeToString(token.type)
+ error_location_suffix(*template_str, token.location.pos));
} | O1 | cpp | minja::Parser::unexpected(minja::TemplateToken const&) const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl 0x8(%rdx), %esi
leaq 0x68(%rsp), %r12
movq %r12, %rdi
callq 0x9b2f2
leaq 0x5980d(%rip), %rcx # 0xf4589
movl $0xb, %r8d
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1b9f0
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9adb6
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x9adbe
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%r15), %rsi
movq 0x20(%r14), %rdx
leaq 0x48(%rsp), %rdi
callq 0x78698
movq 0x28(%rsp), %rcx
movq 0x30(%rsp), %r8
movq 0x50(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r12, %rcx
je 0x9ae09
movq 0x38(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x9ae28
leaq 0x58(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x9ae23
movq 0x58(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x9ae39
movq 0x48(%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0x1b270
jmp 0x9ae47
leaq 0x48(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1b9f0
leaq 0x18(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x9ae6b
movq %rsi, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x9ae71
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x1be30
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9aeb6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8f0
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9aed1
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x1b8f0
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x9aee8
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1b8f0
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9af03
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x1b8f0
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9af38
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8f0
jmp 0x9af38
movq %rax, %rbx
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9af58
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x1b8f0
jmp 0x9af58
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x9af74
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1b8f0
jmp 0x9af74
movq %rax, %rbx
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9af8f
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x1b8f0
movq %rbx, %rdi
callq 0x1bfb0
nop
| _ZNK5minja6Parser10unexpectedERKNS_13TemplateTokenE:
push r15; int
push r14; int
push r12; int
push rbx; int
sub rsp, 88h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov esi, [rdx+8]
lea r12, [rsp+0A8h+var_40]
mov rdi, r12
call _ZN5minja13TemplateToken12typeToStringB5cxx11ENS0_4TypeE; minja::TemplateToken::typeToString(minja::TemplateToken::Type)
lea rcx, aUnexpected_0; "Unexpected "
mov r8d, 0Bh
mov rdi, r12
xor esi, esi
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
lea r12, [rsp+0A8h+var_70]
mov [r12-10h], r12
mov rdx, [rax]
mov rcx, rax
add rcx, 10h; int
cmp rdx, rcx
jz short loc_9ADB6
mov [rsp+0A8h+var_80], rdx
mov rdx, [rcx]
mov [rsp+0A8h+var_70], rdx
jmp short loc_9ADBE
loc_9ADB6:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [r12], xmm0
loc_9ADBE:
mov rdx, [rax+8]
mov qword ptr [rsp+0A8h+var_78], rdx; int
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rsi, [r15]; int
mov rdx, [r14+20h]; int
lea rdi, [rsp+0A8h+var_60]; int
call _ZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; minja::error_location_suffix(std::string const&,ulong)
mov rcx, [rsp+0A8h+var_80]
mov r8, qword ptr [rsp+0A8h+var_78]
mov rdx, [rsp+0A8h+var_58]
lea rax, [rdx+r8]
mov esi, 0Fh
cmp rcx, r12
jz short loc_9AE09
mov rsi, [rsp+0A8h+var_70]
loc_9AE09:
cmp rax, rsi
jbe short loc_9AE28
lea rdi, [rsp+0A8h+var_50]
mov esi, 0Fh
cmp [rdi-10h], rdi
jz short loc_9AE23
mov rsi, [rsp+0A8h+var_50]
loc_9AE23:
cmp rax, rsi
jbe short loc_9AE39
loc_9AE28:
mov rsi, qword ptr [rsp+0A8h+var_60]
lea rdi, [rsp+0A8h+var_80]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
jmp short loc_9AE47
loc_9AE39:
lea rdi, [rsp+0A8h+var_60]
xor esi, esi
xor edx, edx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong)
loc_9AE47:
lea rdx, [rsp+0A8h+var_90]
mov [rdx-10h], rdx
mov rsi, [rax]
lea rcx, [rax+10h]
cmp rsi, rcx
jz short loc_9AE6B
mov [rsp+0A8h+var_A0], rsi
mov rdx, [rcx]
mov [rsp+0A8h+var_90], rdx
jmp short loc_9AE71
loc_9AE6B:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rdx], xmm0
loc_9AE71:
mov rdx, rax
add rdx, 8
mov rsi, [rax+8]
mov [rsp+0A8h+var_98], rsi
mov [rax], rcx
mov qword ptr [rdx], 0
mov byte ptr [rcx], 0
lea rsi, [rsp+0A8h+var_A0]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
lea rax, [rsp+0A8h+var_90]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_9AEB6
mov rsi, [rsp+0A8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9AEB6:
lea rax, [rsp+0A8h+var_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_9AED1
mov rsi, [rsp+0A8h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9AED1:
mov rdi, [rsp+0A8h+var_80]; void *
cmp rdi, r12
jz short loc_9AEE8
mov rsi, [rsp+0A8h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9AEE8:
lea rax, [rsp+0A8h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_9AF03
mov rsi, [rsp+0A8h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9AF03:
mov rax, rbx
add rsp, 88h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_9AF38
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_9AF38
mov rbx, rax
loc_9AF38:
lea rax, [rsp+arg_50]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_9AF58
mov rsi, [rsp+arg_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_9AF58
mov rbx, rax
loc_9AF58:
mov rdi, [rsp+arg_20]; void *
cmp rdi, r12
jz short loc_9AF74
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_9AF74
mov rbx, rax
loc_9AF74:
lea rax, [rsp+arg_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_9AF8F
mov rsi, [rsp+arg_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_9AF8F:
mov rdi, rbx
call __Unwind_Resume
| minja::Parser * minja::Parser::unexpected(minja::Parser *this, const minja::TemplateToken *a2, long long a3)
{
long long v4; // rax
__int128 *v5; // rcx
unsigned long long v6; // rax
unsigned long long v7; // rsi
unsigned long long v8; // rsi
void **v9; // rax
__int128 *v10; // rcx
void *v12[2]; // [rsp+8h] [rbp-A0h] BYREF
__int128 v13; // [rsp+18h] [rbp-90h] BYREF
void *v14; // [rsp+28h] [rbp-80h] BYREF
int v15[2]; // [rsp+30h] [rbp-78h]
__int128 v16; // [rsp+38h] [rbp-70h] BYREF
int v17[2]; // [rsp+48h] [rbp-60h] BYREF
long long v18; // [rsp+50h] [rbp-58h]
_QWORD v19[2]; // [rsp+58h] [rbp-50h] BYREF
void *v20[2]; // [rsp+68h] [rbp-40h] BYREF
long long v21; // [rsp+78h] [rbp-30h] BYREF
minja::TemplateToken::typeToString[abi:cxx11](v20, *(unsigned int *)(a3 + 8));
v4 = std::string::replace(v20, 0LL, 0LL, "Unexpected ", 11LL);
v14 = &v16;
v5 = (__int128 *)(v4 + 16);
if ( *(_QWORD *)v4 == v4 + 16 )
{
v16 = *v5;
}
else
{
v14 = *(void **)v4;
*(_QWORD *)&v16 = *(_QWORD *)v5;
}
*(_QWORD *)v15 = *(_QWORD *)(v4 + 8);
*(_QWORD *)v4 = v5;
*(_QWORD *)(v4 + 8) = 0LL;
*(_BYTE *)(v4 + 16) = 0;
minja::error_location_suffix((long long)v17, *(_QWORD *)a2, *(_QWORD *)(a3 + 32));
v6 = v18 + *(_QWORD *)v15;
v7 = 15LL;
if ( v14 != &v16 )
v7 = v16;
if ( v6 <= v7 )
goto LABEL_10;
v8 = 15LL;
if ( *(_QWORD **)v17 != v19 )
v8 = v19[0];
if ( v6 <= v8 )
v9 = (void **)std::string::replace(v17, 0LL, 0LL, v14, *(_QWORD *)v15);
else
LABEL_10:
v9 = (void **)std::string::_M_append(&v14, *(_QWORD *)v17, v18);
v12[0] = &v13;
v10 = (__int128 *)(v9 + 2);
if ( *v9 == v9 + 2 )
{
v13 = *v10;
}
else
{
v12[0] = *v9;
*(_QWORD *)&v13 = *(_QWORD *)v10;
}
v12[1] = v9[1];
*v9 = v10;
v9[1] = 0LL;
*(_BYTE *)v10 = 0;
std::runtime_error::runtime_error(this, v12);
if ( v12[0] != &v13 )
operator delete(v12[0], v13 + 1);
if ( *(_QWORD **)v17 != v19 )
operator delete(*(void **)v17, v19[0] + 1LL);
if ( v14 != &v16 )
operator delete(v14, v16 + 1);
if ( v20[0] != &v21 )
operator delete(v20[0], v21 + 1);
return this;
}
| unexpected:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV ESI,dword ptr [RDX + 0x8]
LEA R12,[RSP + 0x68]
MOV RDI,R12
CALL 0x0019b2f2
LAB_0019ad75:
LEA RCX,[0x1f4589]
MOV R8D,0xb
MOV RDI,R12
XOR ESI,ESI
XOR EDX,EDX
CALL 0x0011b9f0
LEA R12,[RSP + 0x38]
MOV qword ptr [R12 + -0x10],R12
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x0019adb6
MOV qword ptr [RSP + 0x28],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x38],RDX
JMP 0x0019adbe
LAB_0019adb6:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [R12],XMM0
LAB_0019adbe:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R14 + 0x20]
LAB_0019addd:
LEA RDI,[RSP + 0x48]
CALL 0x00178698
MOV RCX,qword ptr [RSP + 0x28]
MOV R8,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x50]
LEA RAX,[RDX + R8*0x1]
MOV ESI,0xf
CMP RCX,R12
JZ 0x0019ae09
MOV RSI,qword ptr [RSP + 0x38]
LAB_0019ae09:
CMP RAX,RSI
JBE 0x0019ae28
LEA RDI,[RSP + 0x58]
MOV ESI,0xf
CMP qword ptr [RDI + -0x10],RDI
JZ 0x0019ae23
MOV RSI,qword ptr [RSP + 0x58]
LAB_0019ae23:
CMP RAX,RSI
JBE 0x0019ae39
LAB_0019ae28:
MOV RSI,qword ptr [RSP + 0x48]
LAB_0019ae2d:
LEA RDI,[RSP + 0x28]
CALL 0x0011b270
JMP 0x0019ae47
LAB_0019ae39:
LEA RDI,[RSP + 0x48]
XOR ESI,ESI
XOR EDX,EDX
CALL 0x0011b9f0
LAB_0019ae47:
LEA RDX,[RSP + 0x18]
MOV qword ptr [RDX + -0x10],RDX
MOV RSI,qword ptr [RAX]
LEA RCX,[RAX + 0x10]
CMP RSI,RCX
JZ 0x0019ae6b
MOV qword ptr [RSP + 0x8],RSI
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x18],RDX
JMP 0x0019ae71
LAB_0019ae6b:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RDX],XMM0
LAB_0019ae71:
MOV RDX,RAX
ADD RDX,0x8
MOV RSI,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x10],RSI
MOV qword ptr [RAX],RCX
MOV qword ptr [RDX],0x0
MOV byte ptr [RCX],0x0
LAB_0019ae8e:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x0011be30
LAB_0019ae9b:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0019aeb6
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011b8f0
LAB_0019aeb6:
LEA RAX,[RSP + 0x58]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0019aed1
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x0011b8f0
LAB_0019aed1:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R12
JZ 0x0019aee8
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x0011b8f0
LAB_0019aee8:
LEA RAX,[RSP + 0x78]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0019af03
MOV RSI,qword ptr [RSP + 0x78]
INC RSI
CALL 0x0011b8f0
LAB_0019af03:
MOV RAX,RBX
ADD RSP,0x88
POP RBX
POP R12
POP R14
POP R15
RET
|
/* minja::Parser::unexpected(minja::TemplateToken const&) const */
TemplateToken * minja::Parser::unexpected(TemplateToken *param_1)
{
long *plVar1;
int8 *puVar2;
ulong *puVar3;
long in_RDX;
int8 *in_RSI;
ulong uVar4;
long *local_a0;
int8 local_98;
long local_90;
int8 uStack_88;
ulong *local_80;
long local_78;
ulong local_70;
long lStack_68;
ulong *local_60;
long local_58;
ulong local_50 [2];
long *local_40 [2];
long local_30 [2];
TemplateToken::typeToString_abi_cxx11_((TemplateToken *)local_40);
/* try { // try from 0019ad75 to 0019ad8d has its CatchHandler @ 0019af71 */
plVar1 = (long *)std::__cxx11::string::replace((ulong)local_40,0,(char *)0x0,0x1f4589);
puVar3 = (ulong *)(plVar1 + 2);
if ((ulong *)*plVar1 == puVar3) {
local_70 = *puVar3;
lStack_68 = plVar1[3];
local_80 = &local_70;
}
else {
local_70 = *puVar3;
local_80 = (ulong *)*plVar1;
}
local_78 = plVar1[1];
*plVar1 = (long)puVar3;
plVar1[1] = 0;
*(int1 *)(plVar1 + 2) = 0;
/* try { // try from 0019addd to 0019ade6 has its CatchHandler @ 0019af55 */
error_location_suffix((minja *)&local_60,(string *)*in_RSI,*(ulong *)(in_RDX + 0x20));
uVar4 = 0xf;
if (local_80 != &local_70) {
uVar4 = local_70;
}
if (uVar4 < (ulong)(local_58 + local_78)) {
uVar4 = 0xf;
if (local_60 != local_50) {
uVar4 = local_50[0];
}
if ((ulong)(local_58 + local_78) <= uVar4) {
puVar2 = (int8 *)
std::__cxx11::string::replace((ulong)&local_60,0,(char *)0x0,(ulong)local_80);
goto LAB_0019ae47;
}
}
/* try { // try from 0019ae2d to 0019ae46 has its CatchHandler @ 0019af35 */
puVar2 = (int8 *)std::__cxx11::string::_M_append((char *)&local_80,(ulong)local_60);
LAB_0019ae47:
local_a0 = &local_90;
plVar1 = puVar2 + 2;
if ((long *)*puVar2 == plVar1) {
local_90 = *plVar1;
uStack_88 = puVar2[3];
}
else {
local_90 = *plVar1;
local_a0 = (long *)*puVar2;
}
local_98 = puVar2[1];
*puVar2 = plVar1;
puVar2[1] = 0;
*(int1 *)plVar1 = 0;
/* try { // try from 0019ae8e to 0019ae9a has its CatchHandler @ 0019af15 */
std::runtime_error::runtime_error((runtime_error *)param_1,(string *)&local_a0);
if (local_a0 != &local_90) {
operator_delete(local_a0,local_90 + 1);
}
if (local_60 != local_50) {
operator_delete(local_60,local_50[0] + 1);
}
if (local_80 != &local_70) {
operator_delete(local_80,local_70 + 1);
}
if (local_40[0] != local_30) {
operator_delete(local_40[0],local_30[0] + 1);
}
return param_1;
}
| |
40,579 | init_available_charsets | eloqsql/mysys/charset.c | static void init_available_charsets(void)
{
char fname[FN_REFLEN + sizeof(MY_CHARSET_INDEX)];
struct charset_info_st **cs;
MY_CHARSET_LOADER loader;
DBUG_ENTER("init_available_charsets");
bzero((char*) &all_charsets,sizeof(all_charsets));
bzero((char*) &my_collation_statistics, sizeof(my_collation_statistics));
my_hash_init2(key_memory_charsets, &charset_name_hash, 16,
&my_charset_latin1, 64, 0, 0, get_charset_key,
0, 0, HASH_UNIQUE);
init_compiled_charsets(MYF(0));
/* Copy compiled charsets */
for (cs= (struct charset_info_st**) all_charsets;
cs < (struct charset_info_st**) all_charsets +
array_elements(all_charsets)-1 ;
cs++)
{
if (*cs)
{
DBUG_ASSERT(cs[0]->mbmaxlen <= MY_CS_MBMAXLEN);
if (cs[0]->m_ctype)
if (init_state_maps(*cs))
*cs= NULL;
}
}
my_charset_loader_init_mysys(&loader);
strmov(get_charsets_dir(fname), MY_CHARSET_INDEX);
my_read_charset_file(&loader, fname, MYF(0));
DBUG_VOID_RETURN;
} | O0 | c | init_available_charsets:
pushq %rbp
movq %rsp, %rbp
subq $0x300, %rsp # imm = 0x300
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
leaq 0xb9ab31(%rip), %rdi # 0xc43140
xorl %esi, %esi
movl $0x4000, %edx # imm = 0x4000
callq 0x27310
leaq 0xb9eb8e(%rip), %rdi # 0xc471b0
xorl %esi, %esi
movl $0x4000, %edx # imm = 0x4000
callq 0x27310
leaq 0xba39f7(%rip), %rax # 0xc4c02c
movl (%rax), %edi
leaq 0xb9eb02(%rip), %rsi # 0xc47140
movl $0x10, %edx
leaq 0x286bf6(%rip), %rcx # 0x32f240
movl $0x40, %r8d
xorl %eax, %eax
movl %eax, %r9d
leaq 0x1ab4(%rip), %rax # 0xaa110
movq $0x0, (%rsp)
movq %rax, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movl $0x1, 0x20(%rsp)
callq 0xacf50
xorl %eax, %eax
movl %eax, %edi
callq 0xcd050
leaq 0xb9aaa8(%rip), %rax # 0xc43140
movq %rax, -0x2d8(%rbp)
leaq 0xb9aa9a(%rip), %rax # 0xc43140
addq $0x4000, %rax # imm = 0x4000
addq $-0x8, %rax
cmpq %rax, -0x2d8(%rbp)
jae 0xa8716
movq -0x2d8(%rbp), %rax
cmpq $0x0, (%rax)
je 0xa8700
jmp 0xa86c8
jmp 0xa86ca
movq -0x2d8(%rbp), %rax
movq (%rax), %rax
cmpq $0x0, 0x40(%rax)
je 0xa86fe
movq -0x2d8(%rbp), %rax
movq (%rax), %rdi
callq 0xa9c70
cmpb $0x0, %al
je 0xa86fc
movq -0x2d8(%rbp), %rax
movq $0x0, (%rax)
jmp 0xa86fe
jmp 0xa8700
jmp 0xa8702
movq -0x2d8(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x2d8(%rbp)
jmp 0xa869f
leaq -0x2d0(%rbp), %rdi
callq 0xa7c10
leaq -0x220(%rbp), %rdi
callq 0xa82b0
movq %rax, %rdi
leaq 0x77a07(%rip), %rsi # 0x12013f
callq 0x27880
leaq -0x220(%rbp), %rsi
leaq -0x2d0(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
callq 0xaa150
jmp 0xa8756
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xa8771
addq $0x300, %rsp # imm = 0x300
popq %rbp
retq
callq 0x272b0
nopw %cs:(%rax,%rax)
| init_available_charsets:
push rbp
mov rbp, rsp
sub rsp, 300h
mov rax, fs:28h
mov [rbp+var_8], rax
lea rdi, all_charsets
xor esi, esi
mov edx, 4000h
call _memset
lea rdi, my_collation_statistics
xor esi, esi
mov edx, 4000h
call _memset
lea rax, key_memory_charsets
mov edi, [rax]
lea rsi, charset_name_hash
mov edx, 10h
lea rcx, my_charset_latin1
mov r8d, 40h ; '@'
xor eax, eax
mov r9d, eax
lea rax, get_charset_key
mov [rsp+300h+var_300], 0
mov [rsp+300h+var_2F8], rax
mov [rsp+300h+var_2F0], 0
mov [rsp+300h+var_2E8], 0
mov [rsp+300h+var_2E0], 1
call my_hash_init2
xor eax, eax
mov edi, eax
call init_compiled_charsets
lea rax, all_charsets
mov [rbp+var_2D8], rax
loc_A869F:
lea rax, all_charsets
add rax, 4000h
add rax, 0FFFFFFFFFFFFFFF8h
cmp [rbp+var_2D8], rax
jnb short loc_A8716
mov rax, [rbp+var_2D8]
cmp qword ptr [rax], 0
jz short loc_A8700
jmp short $+2
loc_A86C8:
jmp short $+2
loc_A86CA:
mov rax, [rbp+var_2D8]
mov rax, [rax]
cmp qword ptr [rax+40h], 0
jz short loc_A86FE
mov rax, [rbp+var_2D8]
mov rdi, [rax]
call init_state_maps
cmp al, 0
jz short loc_A86FC
mov rax, [rbp+var_2D8]
mov qword ptr [rax], 0
loc_A86FC:
jmp short $+2
loc_A86FE:
jmp short $+2
loc_A8700:
jmp short $+2
loc_A8702:
mov rax, [rbp+var_2D8]
add rax, 8
mov [rbp+var_2D8], rax
jmp short loc_A869F
loc_A8716:
lea rdi, [rbp+var_2D0]
call my_charset_loader_init_mysys
lea rdi, [rbp+var_220]
call get_charsets_dir
mov rdi, rax
lea rsi, aIndexXml; "Index.xml"
call _stpcpy
lea rsi, [rbp+var_220]
lea rdi, [rbp+var_2D0]
xor eax, eax
mov edx, eax
call my_read_charset_file
jmp short $+2
loc_A8756:
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_A8771
add rsp, 300h
pop rbp
retn
loc_A8771:
call ___stack_chk_fail
| unsigned long long init_available_charsets()
{
long long charsets_dir; // rax
_QWORD *i; // [rsp+28h] [rbp-2D8h]
_BYTE v3[176]; // [rsp+30h] [rbp-2D0h] BYREF
_BYTE v4[536]; // [rsp+E0h] [rbp-220h] BYREF
unsigned long long v5; // [rsp+2F8h] [rbp-8h]
v5 = __readfsqword(0x28u);
memset(all_charsets, 0LL, sizeof(all_charsets));
memset(my_collation_statistics, 0LL, sizeof(my_collation_statistics));
my_hash_init2(
key_memory_charsets,
(unsigned int)&charset_name_hash,
16,
(unsigned int)&my_charset_latin1,
64,
0,
0LL,
(long long)get_charset_key,
0LL,
0LL,
1);
init_compiled_charsets(0LL);
for ( i = all_charsets; i < &all_charsets[2047]; ++i )
{
if ( *i && *(_QWORD *)(*i + 64LL) )
{
if ( (unsigned __int8)init_state_maps(*i) )
*i = 0LL;
}
}
my_charset_loader_init_mysys((long long)v3);
charsets_dir = get_charsets_dir((long long)v4);
stpcpy(charsets_dir, "Index.xml");
my_read_charset_file(v3, v4, 0LL);
return __readfsqword(0x28u);
}
| init_available_charsets:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x300
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
LEA RDI,[0xd43140]
XOR ESI,ESI
MOV EDX,0x4000
CALL 0x00127310
LEA RDI,[0xd471b0]
XOR ESI,ESI
MOV EDX,0x4000
CALL 0x00127310
LEA RAX,[0xd4c02c]
MOV EDI,dword ptr [RAX]
LEA RSI,[0xd47140]
MOV EDX,0x10
LEA RCX,[0x42f240]
MOV R8D,0x40
XOR EAX,EAX
MOV R9D,EAX
LEA RAX,[0x1aa110]
MOV qword ptr [RSP],0x0
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],0x0
MOV qword ptr [RSP + 0x18],0x0
MOV dword ptr [RSP + 0x20],0x1
CALL 0x001acf50
XOR EAX,EAX
MOV EDI,EAX
CALL 0x001cd050
LEA RAX,[0xd43140]
MOV qword ptr [RBP + -0x2d8],RAX
LAB_001a869f:
LEA RAX,[0xd43140]
ADD RAX,0x4000
ADD RAX,-0x8
CMP qword ptr [RBP + -0x2d8],RAX
JNC 0x001a8716
MOV RAX,qword ptr [RBP + -0x2d8]
CMP qword ptr [RAX],0x0
JZ 0x001a8700
JMP 0x001a86c8
LAB_001a86c8:
JMP 0x001a86ca
LAB_001a86ca:
MOV RAX,qword ptr [RBP + -0x2d8]
MOV RAX,qword ptr [RAX]
CMP qword ptr [RAX + 0x40],0x0
JZ 0x001a86fe
MOV RAX,qword ptr [RBP + -0x2d8]
MOV RDI,qword ptr [RAX]
CALL 0x001a9c70
CMP AL,0x0
JZ 0x001a86fc
MOV RAX,qword ptr [RBP + -0x2d8]
MOV qword ptr [RAX],0x0
LAB_001a86fc:
JMP 0x001a86fe
LAB_001a86fe:
JMP 0x001a8700
LAB_001a8700:
JMP 0x001a8702
LAB_001a8702:
MOV RAX,qword ptr [RBP + -0x2d8]
ADD RAX,0x8
MOV qword ptr [RBP + -0x2d8],RAX
JMP 0x001a869f
LAB_001a8716:
LEA RDI,[RBP + -0x2d0]
CALL 0x001a7c10
LEA RDI,[RBP + -0x220]
CALL 0x001a82b0
MOV RDI,RAX
LEA RSI,[0x22013f]
CALL 0x00127880
LEA RSI,[RBP + -0x220]
LEA RDI,[RBP + -0x2d0]
XOR EAX,EAX
MOV EDX,EAX
CALL 0x001aa150
JMP 0x001a8756
LAB_001a8756:
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001a8771
ADD RSP,0x300
POP RBP
RET
LAB_001a8771:
CALL 0x001272b0
|
void init_available_charsets(void)
{
char cVar1;
char *__dest;
long in_FS_OFFSET;
long *local_2e0;
int1 local_2d8 [176];
int1 local_228 [536];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
memset(&all_charsets,0,0x4000);
memset(my_collation_statistics,0,0x4000);
my_hash_init2(key_memory_charsets,charset_name_hash,0x10,&my_charset_latin1,0x40,0,0,
get_charset_key,0,0,1);
init_compiled_charsets(0);
for (local_2e0 = &all_charsets; local_2e0 < (long *)0xd47138; local_2e0 = local_2e0 + 1) {
if (((*local_2e0 != 0) && (*(long *)(*local_2e0 + 0x40) != 0)) &&
(cVar1 = init_state_maps(*local_2e0), cVar1 != '\0')) {
*local_2e0 = 0;
}
}
my_charset_loader_init_mysys(local_2d8);
__dest = (char *)get_charsets_dir(local_228);
stpcpy(__dest,"Index.xml");
my_read_charset_file(local_2d8,local_228,0);
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return;
}
| |
40,580 | minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) const | monkey531[P]llama/common/minja.hpp | Value evaluate(const std::shared_ptr<Context> & context) const {
try {
return do_evaluate(context);
} catch (const std::exception & e) {
std::ostringstream out;
out << e.what();
if (location.source) out << error_location_suffix(*location.source, location.pos);
throw std::runtime_error(out.str());
}
} | O3 | cpp | minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) const:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x1a0, %rsp # imm = 0x1A0
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rax
callq *(%rax)
movq %rbx, %rax
addq $0x1a0, %rsp # imm = 0x1A0
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
cmpl $0x1, %edx
jne 0x8ab18
movq %rbx, %rdi
callq 0x1b3b0
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x1bc40
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
leaq 0x28(%rsp), %rdi
movq %rax, %rsi
callq 0x1b8e0
movq 0x8(%r14), %rsi
testq %rsi, %rsi
jne 0x8aa57
movl $0x10, %edi
callq 0x1b480
movq %rax, %r14
leaq 0x30(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x1beb0
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x1bf20
xorl %ebp, %ebp
movq 0xa65a0(%rip), %rsi # 0x130fe8
movq 0xa6501(%rip), %rdx # 0x130f50
movq %r14, %rdi
callq 0x1c040
movq 0x18(%r14), %rdx
leaq 0x8(%rsp), %rdi
callq 0x7c628
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x28(%rsp), %rdi
callq 0x1ba70
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8aa13
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b930
jmp 0x8aa13
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8aaf0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b930
jmp 0x8aaf0
jmp 0x8aaed
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8aad9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b930
testb %bpl, %bpl
jne 0x8aae3
jmp 0x8aaf0
movq %rax, %rbx
movq %r14, %rdi
callq 0x1b6c0
jmp 0x8aaf0
movq %rax, %rbx
movq 0xa6471(%rip), %rsi # 0x130f68
leaq 0x28(%rsp), %rdi
callq 0x1b4e0
leaq 0x98(%rsp), %rdi
callq 0x1b2d0
jmp 0x8ab13
movq %rax, %rbx
callq 0x1bf60
movq %rbx, %rdi
callq 0x1c0d0
movq %rax, %rdi
callq 0x26123
| _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE:
push rbp
push r14
push rbx
sub rsp, 1A0h
mov r14, rsi
mov rbx, rdi
mov rax, [rsi]
call qword ptr [rax]
mov rax, rbx
add rsp, 1A0h
pop rbx
pop r14
pop rbp
retn
mov rbx, rax
cmp edx, 1
jnz loc_8AB18
mov rdi, rbx; void *
call ___cxa_begin_catch
mov rbx, rax
lea rdi, [rsp+arg_20]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax+10h]
lea rdi, [rsp+arg_20]
mov rsi, rax
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rsi, [r14+8]; int
test rsi, rsi
jnz short loc_8AA57
loc_8AA13:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, [rsp+arg_28]
lea rdi, [rsp+arg_0]
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov bpl, 1
lea rsi, [rsp+arg_0]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_8AA57:
mov rdx, [r14+18h]; int
lea rdi, [rsp+arg_0]; int
call _ZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; minja::error_location_suffix(std::string const&,ulong)
mov rsi, qword ptr [rsp+arg_0]
mov rdx, [rsp+arg_8]
lea rdi, [rsp+arg_20]
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_8AA13
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp loc_8AA13
mov rbx, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_8AAF0
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_8AAF0
jmp short loc_8AAED
mov rbx, rax
lea rax, [rsp+arg_10]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_8AAD9
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8AAD9:
test bpl, bpl
jnz short loc_8AAE3
jmp short loc_8AAF0
mov rbx, rax
loc_8AAE3:
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_8AAF0
loc_8AAED:
mov rbx, rax
loc_8AAF0:
mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+arg_20]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+arg_90]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
jmp short loc_8AB13
mov rbx, rax
loc_8AB13:
call ___cxa_end_catch
loc_8AB18:
mov rdi, rbx
call __Unwind_Resume
mov rdi, rax
call __clang_call_terminate
| long long minja::Expression::evaluate(long long a1, void (***a2)(void))
{
(**a2)();
return a1;
}
| evaluate:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x1a0
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr [RSI]
LAB_0018a9c2:
CALL qword ptr [RAX]
LAB_0018a9c4:
MOV RAX,RBX
ADD RSP,0x1a0
POP RBX
POP R14
POP RBP
RET
|
/* minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) const */
Expression * __thiscall minja::Expression::evaluate(Expression *this,shared_ptr *param_1)
{
/* try { // try from 0018a9c2 to 0018a9c3 has its CatchHandler @ 0018a9d3 */
(*(code *)**(int8 **)param_1)();
return this;
}
| |
40,581 | bitmap_set_prefix | eloqsql/mysys/my_bitmap.c | void bitmap_set_prefix(MY_BITMAP *map, uint prefix_size)
{
uint prefix_bytes, prefix_bits, d;
uchar *m= (uchar *)map->bitmap;
DBUG_ASSERT(map->bitmap);
DBUG_ASSERT(prefix_size <= map->n_bits || prefix_size == (uint) ~0);
set_if_smaller(prefix_size, map->n_bits);
if ((prefix_bytes= prefix_size / 8))
memset(m, 0xff, prefix_bytes);
m+= prefix_bytes;
if ((prefix_bits= prefix_size & 7))
{
*(m++)= (1 << prefix_bits)-1;
// As the prefix bits are set, lets count this byte too as a prefix byte.
prefix_bytes ++;
}
if ((d= no_bytes_in_map(map)-prefix_bytes))
memset(m, 0, d);
} | O3 | c | bitmap_set_prefix:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %r12d
movq %rdi, %r14
movl 0x1c(%rdi), %eax
cmpl %esi, %eax
cmovbl %eax, %r12d
movq (%rdi), %rbx
movl %r12d, %r15d
shrl $0x3, %r15d
cmpl $0x8, %r12d
jb 0xa0221
movq %rbx, %rdi
movl $0xff, %esi
movq %r15, %rdx
callq 0x29290
addq %r15, %rbx
andl $0x7, %r12d
je 0xa023e
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movl %r12d, %ecx
shll %cl, %eax
notb %al
movb %al, (%rbx)
incq %rbx
incl %r15d
movl 0x1c(%r14), %edx
addl $0x7, %edx
shrl $0x3, %edx
subl %r15d, %edx
jne 0xa0256
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
xorl %esi, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x29290
| bitmap_set_prefix:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov r12d, esi
mov r14, rdi
mov eax, [rdi+1Ch]
cmp eax, esi
cmovb r12d, eax
mov rbx, [rdi]
mov r15d, r12d
shr r15d, 3
cmp r12d, 8
jb short loc_A0221
mov rdi, rbx
mov esi, 0FFh
mov rdx, r15
call _memset
loc_A0221:
add rbx, r15
and r12d, 7
jz short loc_A023E
mov eax, 0FFFFFFFFh
mov ecx, r12d
shl eax, cl
not al
mov [rbx], al
inc rbx
inc r15d
loc_A023E:
mov edx, [r14+1Ch]
add edx, 7
shr edx, 3
sub edx, r15d
jnz short loc_A0256
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_A0256:
mov rdi, rbx
xor esi, esi
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp _memset
| char bitmap_set_prefix(long long *a1, unsigned int a2)
{
unsigned int v2; // r12d
unsigned int v3; // eax
long long v4; // rbx
long long v5; // r15
_BYTE *v6; // rbx
int v7; // r12d
long long v8; // rdx
v2 = a2;
v3 = *((_DWORD *)a1 + 7);
if ( v3 < a2 )
v2 = *((_DWORD *)a1 + 7);
v4 = *a1;
v5 = v2 >> 3;
if ( v2 >= 8 )
LOBYTE(v3) = memset(*a1, 255LL, v2 >> 3);
v6 = (_BYTE *)(v5 + v4);
v7 = v2 & 7;
if ( v7 )
{
LOBYTE(v3) = ~(unsigned __int8)(-1 << v7);
*v6++ = v3;
LODWORD(v5) = v5 + 1;
}
v8 = ((unsigned int)(*((_DWORD *)a1 + 7) + 7) >> 3) - (unsigned int)v5;
if ( (_DWORD)v8 )
LOBYTE(v3) = memset(v6, 0LL, v8);
return v3;
}
| bitmap_set_prefix:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R12D,ESI
MOV R14,RDI
MOV EAX,dword ptr [RDI + 0x1c]
CMP EAX,ESI
CMOVC R12D,EAX
MOV RBX,qword ptr [RDI]
MOV R15D,R12D
SHR R15D,0x3
CMP R12D,0x8
JC 0x001a0221
MOV RDI,RBX
MOV ESI,0xff
MOV RDX,R15
CALL 0x00129290
LAB_001a0221:
ADD RBX,R15
AND R12D,0x7
JZ 0x001a023e
MOV EAX,0xffffffff
MOV ECX,R12D
SHL EAX,CL
NOT AL
MOV byte ptr [RBX],AL
INC RBX
INC R15D
LAB_001a023e:
MOV EDX,dword ptr [R14 + 0x1c]
ADD EDX,0x7
SHR EDX,0x3
SUB EDX,R15D
JNZ 0x001a0256
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001a0256:
MOV RDI,RBX
XOR ESI,ESI
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x00129290
|
void bitmap_set_prefix(int8 *param_1,uint param_2)
{
void *__s;
byte *__s_00;
uint uVar1;
if (*(uint *)((long)param_1 + 0x1c) < param_2) {
param_2 = *(uint *)((long)param_1 + 0x1c);
}
__s = (void *)*param_1;
uVar1 = param_2 >> 3;
if (7 < param_2) {
memset(__s,0xff,(ulong)uVar1);
}
__s_00 = (byte *)((long)__s + (ulong)uVar1);
if ((param_2 & 7) != 0) {
*__s_00 = ~(byte)(-1 << (sbyte)(param_2 & 7));
__s_00 = __s_00 + 1;
uVar1 = uVar1 + 1;
}
uVar1 = (*(int *)((long)param_1 + 0x1c) + 7U >> 3) - uVar1;
if (uVar1 == 0) {
return;
}
memset(__s_00,0,(ulong)uVar1);
return;
}
| |
40,582 | test_fetch_float | eloqsql/libmariadb/unittest/libmariadb/fetch.c | static int test_fetch_float(MYSQL *mysql)
{
int rc;
rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_bind_fetch");
check_mysql_rc(rc, mysql);
rc= mysql_query(mysql, "CREATE TABLE test_bind_fetch(c1 float(3), \
c2 float, \
c3 float unsigned, \
c4 float, \
c5 float, \
c6 float, \
c7 float(10) unsigned)");
check_mysql_rc(rc, mysql);
rc= bind_fetch(mysql, 2);
mysql_query(mysql, "DROP TABLE IF EXISTS test_bind_fetch");
return rc;
} | O3 | c | test_fetch_float:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x210a1(%rip), %rsi # 0x38353
callq 0x1d541
testl %eax, %eax
je 0x172ef
movl %eax, %r14d
movq %rbx, %rdi
callq 0x1f5ba
movq %rax, %r15
movq %rbx, %rdi
callq 0x1f5a5
leaq 0x1ff7d(%rip), %rdi # 0x37255
leaq 0x20578(%rip), %r8 # 0x37857
movl %r14d, %esi
movq %r15, %rdx
movl %eax, %ecx
movl $0x37c, %r9d # imm = 0x37C
jmp 0x17334
leaq 0x21a8b(%rip), %rsi # 0x38d81
movq %rbx, %rdi
callq 0x1d541
testl %eax, %eax
je 0x1734b
movl %eax, %r14d
movq %rbx, %rdi
callq 0x1f5ba
movq %rax, %r15
movq %rbx, %rdi
callq 0x1f5a5
leaq 0x1ff36(%rip), %rdi # 0x37255
leaq 0x20531(%rip), %r8 # 0x37857
movl %r14d, %esi
movq %r15, %rdx
movl %eax, %ecx
movl $0x385, %r9d # imm = 0x385
xorl %eax, %eax
callq 0x17e37
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movl $0x2, %esi
callq 0x17515
movl %eax, %r14d
leaq 0x20ff1(%rip), %rsi # 0x38353
movq %rbx, %rdi
callq 0x1d541
movl %r14d, %eax
jmp 0x17340
| test_fetch_float:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
lea rsi, aDropTableIfExi_3; "DROP TABLE IF EXISTS test_bind_fetch"
call mysql_query
test eax, eax
jz short loc_172EF
mov r14d, eax
mov rdi, rbx
call mysql_error
mov r15, rax
mov rdi, rbx
call mysql_errno
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, r14d
mov rdx, r15
mov ecx, eax
mov r9d, 37Ch
jmp short loc_17334
loc_172EF:
lea rsi, aCreateTableTes_6; "CREATE TABLE test_bind_fetch(c1 float(3"...
mov rdi, rbx
call mysql_query
test eax, eax
jz short loc_1734B
mov r14d, eax
mov rdi, rbx
call mysql_error
mov r15, rax
mov rdi, rbx
call mysql_errno
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, r14d
mov rdx, r15
mov ecx, eax
mov r9d, 385h
loc_17334:
xor eax, eax
call diag
mov eax, 1
loc_17340:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_1734B:
mov rdi, rbx
mov esi, 2
call bind_fetch
mov r14d, eax
lea rsi, aDropTableIfExi_3; "DROP TABLE IF EXISTS test_bind_fetch"
mov rdi, rbx
call mysql_query
mov eax, r14d
jmp short loc_17340
| long long test_fetch_float(long long a1)
{
int v1; // eax
int v2; // r14d
int v3; // r15d
int v4; // eax
int v5; // esi
int v6; // edx
int v7; // ecx
int v8; // r9d
int v9; // eax
int v10; // r14d
int v11; // r15d
int v12; // eax
unsigned int v14; // r14d
v1 = mysql_query(a1, "DROP TABLE IF EXISTS test_bind_fetch");
if ( v1 )
{
v2 = v1;
v3 = mysql_error(a1);
v4 = mysql_errno(a1);
v5 = v2;
v6 = v3;
v7 = v4;
v8 = 892;
}
else
{
v9 = mysql_query(
a1,
"CREATE TABLE test_bind_fetch(c1 float(3), c2 float, "
" c3 float unsigned, "
" c4 float, c5 float, "
" c6 float, c7 float(10) unsigned)");
if ( !v9 )
{
v14 = bind_fetch(a1, 2LL);
mysql_query(a1, "DROP TABLE IF EXISTS test_bind_fetch");
return v14;
}
v10 = v9;
v11 = mysql_error(a1);
v12 = mysql_errno(a1);
v5 = v10;
v6 = v11;
v7 = v12;
v8 = 901;
}
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v5,
v6,
v7,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/fetch.c",
v8);
return 1LL;
}
| test_fetch_float:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
LEA RSI,[0x138353]
CALL 0x0011d541
TEST EAX,EAX
JZ 0x001172ef
MOV R14D,EAX
MOV RDI,RBX
CALL 0x0011f5ba
MOV R15,RAX
MOV RDI,RBX
CALL 0x0011f5a5
LEA RDI,[0x137255]
LEA R8,[0x137857]
MOV ESI,R14D
MOV RDX,R15
MOV ECX,EAX
MOV R9D,0x37c
JMP 0x00117334
LAB_001172ef:
LEA RSI,[0x138d81]
MOV RDI,RBX
CALL 0x0011d541
TEST EAX,EAX
JZ 0x0011734b
MOV R14D,EAX
MOV RDI,RBX
CALL 0x0011f5ba
MOV R15,RAX
MOV RDI,RBX
CALL 0x0011f5a5
LEA RDI,[0x137255]
LEA R8,[0x137857]
MOV ESI,R14D
MOV RDX,R15
MOV ECX,EAX
MOV R9D,0x385
LAB_00117334:
XOR EAX,EAX
CALL 0x00117e37
MOV EAX,0x1
LAB_00117340:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0011734b:
MOV RDI,RBX
MOV ESI,0x2
CALL 0x00117515
MOV R14D,EAX
LEA RSI,[0x138353]
MOV RDI,RBX
CALL 0x0011d541
MOV EAX,R14D
JMP 0x00117340
|
int4 test_fetch_float(int8 param_1)
{
int iVar1;
int4 uVar2;
int8 uVar3;
int8 uVar4;
iVar1 = mysql_query(param_1,"DROP TABLE IF EXISTS test_bind_fetch");
if (iVar1 == 0) {
iVar1 = mysql_query(param_1,
"CREATE TABLE test_bind_fetch(c1 float(3), c2 float, c3 float unsigned, c4 float, c5 float, c6 float, c7 float(10) unsigned)"
);
if (iVar1 == 0) {
uVar2 = bind_fetch(param_1,2);
mysql_query(param_1,"DROP TABLE IF EXISTS test_bind_fetch");
return uVar2;
}
uVar3 = mysql_error(param_1);
uVar2 = mysql_errno(param_1);
uVar4 = 0x385;
}
else {
uVar3 = mysql_error(param_1);
uVar2 = mysql_errno(param_1);
uVar4 = 0x37c;
}
diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/fetch.c",uVar4);
return 1;
}
| |
40,583 | get_this_host | eloqsql/libmariadb/unittest/libmariadb/my_test.h | void get_this_host(MYSQL *mysql)
{
MYSQL_RES *res;
MYSQL_ROW row;
if (mysql_query(mysql, "select substr(current_user(), locate('@', current_user())+1)"))
return;
if ((res= mysql_store_result(mysql)))
{
if ((row= mysql_fetch_row(res)))
this_host= strdup(row[0]);
mysql_free_result(res);
}
} | O3 | c | get_this_host:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x235fc(%rip), %rsi # 0x370f6
callq 0x1d245
testl %eax, %eax
je 0x13b0a
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq %rbx, %rdi
callq 0x1e13d
testq %rax, %rax
je 0x13b03
movq %rax, %rbx
movq %rax, %rdi
callq 0x1e340
testq %rax, %rax
je 0x13b36
movq (%rax), %rdi
callq 0x137e0
movq %rax, 0x3a542(%rip) # 0x4e078
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x18ef2
| get_this_host:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
lea rsi, aSelectSubstrCu; "select substr(current_user(), locate('@"...
call mysql_query
test eax, eax
jz short loc_13B0A
loc_13B03:
add rsp, 8
pop rbx
pop rbp
retn
loc_13B0A:
mov rdi, rbx
call mysql_store_result
test rax, rax
jz short loc_13B03
mov rbx, rax
mov rdi, rax
call mysql_fetch_row
test rax, rax
jz short loc_13B36
mov rdi, [rax]
call _strdup
mov cs:this_host, rax
loc_13B36:
mov rdi, rbx
add rsp, 8
pop rbx
pop rbp
jmp mysql_free_result
| long long get_this_host(long long a1)
{
long long result; // rax
long long v2; // rbx
_QWORD *row; // rax
result = mysql_query(a1, "select substr(current_user(), locate('@', current_user())+1)");
if ( !(_DWORD)result )
{
result = mysql_store_result(a1);
if ( result )
{
v2 = result;
row = (_QWORD *)mysql_fetch_row(result);
if ( row )
this_host = strdup(*row);
return mysql_free_result(v2);
}
}
return result;
}
| get_this_host:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
LEA RSI,[0x1370f6]
CALL 0x0011d245
TEST EAX,EAX
JZ 0x00113b0a
LAB_00113b03:
ADD RSP,0x8
POP RBX
POP RBP
RET
LAB_00113b0a:
MOV RDI,RBX
CALL 0x0011e13d
TEST RAX,RAX
JZ 0x00113b03
MOV RBX,RAX
MOV RDI,RAX
CALL 0x0011e340
TEST RAX,RAX
JZ 0x00113b36
MOV RDI,qword ptr [RAX]
CALL 0x001137e0
MOV qword ptr [0x0014e078],RAX
LAB_00113b36:
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x00118ef2
|
void get_this_host(int8 param_1)
{
int iVar1;
long lVar2;
int8 *puVar3;
iVar1 = mysql_query(param_1,"select substr(current_user(), locate(\'@\', current_user())+1)");
if (iVar1 == 0) {
lVar2 = mysql_store_result(param_1);
if (lVar2 != 0) {
puVar3 = (int8 *)mysql_fetch_row(lVar2);
if (puVar3 != (int8 *)0x0) {
this_host = strdup((char *)*puVar3);
}
mysql_free_result(lVar2);
return;
}
}
return;
}
| |
40,584 | start_timer | eloqsql/unittest/mytap/tap.c | static ulong start_timer(void)
{
#if defined(_WIN32)
return clock();
#else
struct tms tms_tmp;
return times(&tms_tmp);
#endif
} | O0 | c | start_timer:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq -0x20(%rbp), %rdi
callq 0x2a190
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| start_timer:
push rbp
mov rbp, rsp
sub rsp, 20h
lea rdi, [rbp+var_20]
call _times
add rsp, 20h
pop rbp
retn
| long long start_timer()
{
_BYTE v1[32]; // [rsp+0h] [rbp-20h] BYREF
return times(v1);
}
| start_timer:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
LEA RDI,[RBP + -0x20]
CALL 0x0012a190
ADD RSP,0x20
POP RBP
RET
|
void start_timer(void)
{
tms local_28;
times(&local_28);
return;
}
| |
40,585 | FrozenCLIPEmbedderWithCustomWords::FrozenCLIPEmbedderWithCustomWords(SDVersion, int) | 7CodeWizard[P]stablediffusion/clip.hpp | FrozenCLIPEmbedderWithCustomWords(SDVersion version = VERSION_1_x, int clip_skip = -1)
: version(version), tokenizer(version) {
name = "clip";
if (clip_skip <= 0) {
clip_skip = 1;
if (version == VERSION_2_x || version == VERSION_XL) {
clip_skip = 2;
}
}
if (version == VERSION_1_x) {
text_model = CLIPTextModel(OPENAI_CLIP_VIT_L_14, clip_skip);
} else if (version == VERSION_2_x) {
text_model = CLIPTextModel(OPEN_CLIP_VIT_H_14, clip_skip);
} else if (version == VERSION_XL) {
text_model = CLIPTextModel(OPENAI_CLIP_VIT_L_14, clip_skip, false);
text_model2 = CLIPTextModel(OPEN_CLIP_VIT_BIGG_14, clip_skip, false);
}
} | O0 | cpp | FrozenCLIPEmbedderWithCustomWords::FrozenCLIPEmbedderWithCustomWords(SDVersion, int):
subq $0x208, %rsp # imm = 0x208
movq %rdi, 0x200(%rsp)
movl %esi, 0x1fc(%rsp)
movl %edx, 0x1f8(%rsp)
movq 0x200(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x431f0
movq 0x18(%rsp), %rdi
leaq 0x1971ed(%rip), %rax # 0x1d6c58
movq %rax, (%rdi)
movl 0x1fc(%rsp), %eax
movl %eax, 0x68(%rdi)
addq $0x70, %rdi
movq %rdi, 0x20(%rsp)
movl 0x1fc(%rsp), %esi
callq 0x432b0
jmp 0x3fa8f
movq 0x18(%rsp), %rdi
addq $0x128, %rdi # imm = 0x128
movq %rdi, 0x10(%rsp)
xorl %esi, %esi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
movl $0x1, %ecx
callq 0x43310
jmp 0x3fab3
movq 0x18(%rsp), %rdi
addq $0x198, %rdi # imm = 0x198
movq %rdi, 0x8(%rsp)
xorl %esi, %esi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
movl $0x1, %ecx
callq 0x43310
jmp 0x3fad7
movq 0x18(%rsp), %rdi
addq $0x8, %rdi
leaq 0x13fdc6(%rip), %rsi # 0x17f8ad
callq 0xba40
jmp 0x3faee
cmpl $0x0, 0x1f8(%rsp)
jg 0x3fb98
movl $0x1, 0x1f8(%rsp)
cmpl $0x1, 0x1fc(%rsp)
je 0x3fb1b
cmpl $0x2, 0x1fc(%rsp)
jne 0x3fb96
movl $0x2, 0x1f8(%rsp)
jmp 0x3fb96
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
jmp 0x3fce0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
jmp 0x3fcd6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
jmp 0x3fccc
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
callq 0x434a0
jmp 0x3fccc
jmp 0x3fb98
cmpl $0x0, 0x1fc(%rsp)
jne 0x3fbea
movl 0x1f8(%rsp), %edx
leaq 0x178(%rsp), %rdi
xorl %esi, %esi
movl $0x1, %ecx
callq 0x43310
jmp 0x3fbbf
movq 0x18(%rsp), %rdi
addq $0x128, %rdi # imm = 0x128
leaq 0x178(%rsp), %rsi
callq 0x43430
leaq 0x178(%rsp), %rdi
callq 0x434a0
jmp 0x3fcc4
cmpl $0x1, 0x1fc(%rsp)
jne 0x3fc3c
movl 0x1f8(%rsp), %edx
leaq 0x108(%rsp), %rdi
movl $0x1, %ecx
movl %ecx, %esi
callq 0x43310
jmp 0x3fc11
movq 0x18(%rsp), %rdi
addq $0x128, %rdi # imm = 0x128
leaq 0x108(%rsp), %rsi
callq 0x43430
leaq 0x108(%rsp), %rdi
callq 0x434a0
jmp 0x3fcc2
cmpl $0x2, 0x1fc(%rsp)
jne 0x3fcc0
movl 0x1f8(%rsp), %edx
leaq 0x98(%rsp), %rdi
xorl %ecx, %ecx
movl %ecx, %esi
callq 0x43310
jmp 0x3fc60
movq 0x18(%rsp), %rdi
addq $0x128, %rdi # imm = 0x128
leaq 0x98(%rsp), %rsi
movq %rsi, (%rsp)
callq 0x43430
movq (%rsp), %rdi
callq 0x434a0
movl 0x1f8(%rsp), %edx
leaq 0x28(%rsp), %rdi
movl $0x2, %esi
xorl %ecx, %ecx
callq 0x43310
jmp 0x3fca0
movq 0x18(%rsp), %rdi
addq $0x198, %rdi # imm = 0x198
leaq 0x28(%rsp), %rsi
callq 0x43430
leaq 0x28(%rsp), %rdi
callq 0x434a0
jmp 0x3fcc2
jmp 0x3fcc4
addq $0x208, %rsp # imm = 0x208
retq
movq 0x10(%rsp), %rdi
callq 0x434a0
movq 0x20(%rsp), %rdi
callq 0x434c0
movq 0x18(%rsp), %rdi
callq 0x43510
movq 0x1f0(%rsp), %rdi
callq 0xbd30
nopw (%rax,%rax)
| _ZN33FrozenCLIPEmbedderWithCustomWordsC2E9SDVersioni:
sub rsp, 208h
mov [rsp+208h+var_8], rdi
mov [rsp+208h+var_C], esi
mov [rsp+208h+var_10], edx
mov rdi, [rsp+208h+var_8]; this
mov [rsp+208h+var_1F0], rdi
call _ZN10GGMLModuleC2Ev; GGMLModule::GGMLModule(void)
mov rdi, [rsp+208h+var_1F0]
lea rax, off_1D6C58
mov [rdi], rax
mov eax, [rsp+208h+var_C]
mov [rdi+68h], eax
add rdi, 70h ; 'p'
mov [rsp+208h+var_1E8], rdi
mov esi, [rsp+208h+var_C]
call _ZN13CLIPTokenizerC2E9SDVersion; CLIPTokenizer::CLIPTokenizer(SDVersion)
jmp short $+2
loc_3FA8F:
mov rdi, [rsp+208h+var_1F0]
add rdi, 128h
mov [rsp+208h+var_1F8], rdi
xor esi, esi
mov edx, 0FFFFFFFFh
mov ecx, 1
call _ZN13CLIPTextModelC2E11CLIPVersionib; CLIPTextModel::CLIPTextModel(CLIPVersion,int,bool)
jmp short $+2
loc_3FAB3:
mov rdi, [rsp+208h+var_1F0]
add rdi, 198h
mov [rsp+208h+var_200], rdi
xor esi, esi
mov edx, 0FFFFFFFFh
mov ecx, 1
call _ZN13CLIPTextModelC2E11CLIPVersionib; CLIPTextModel::CLIPTextModel(CLIPVersion,int,bool)
jmp short $+2
loc_3FAD7:
mov rdi, [rsp+208h+var_1F0]
add rdi, 8
lea rsi, aClip; "clip"
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc; std::string::operator=(char const*)
jmp short $+2
loc_3FAEE:
cmp [rsp+208h+var_10], 0
jg loc_3FB98
mov [rsp+208h+var_10], 1
cmp [rsp+208h+var_C], 1
jz short loc_3FB1B
cmp [rsp+208h+var_C], 2
jnz short loc_3FB96
loc_3FB1B:
mov [rsp+208h+var_10], 2
jmp short loc_3FB96
mov rcx, rax
mov eax, edx
mov [rsp+arg_1E8], rcx
mov [rsp+arg_1E4], eax
jmp loc_3FCE0
mov rcx, rax
mov eax, edx
mov [rsp+arg_1E8], rcx
mov [rsp+arg_1E4], eax
jmp loc_3FCD6
mov rcx, rax
mov eax, edx
mov [rsp+arg_1E8], rcx
mov [rsp+arg_1E4], eax
jmp loc_3FCCC
mov rdi, [rsp+arg_0]; this
mov rcx, rax
mov eax, edx
mov [rsp+arg_1E8], rcx
mov [rsp+arg_1E4], eax
call _ZN13CLIPTextModelD2Ev; CLIPTextModel::~CLIPTextModel()
jmp loc_3FCCC
loc_3FB96:
jmp short $+2
loc_3FB98:
cmp [rsp+208h+var_C], 0
jnz short loc_3FBEA
mov edx, [rsp+208h+var_10]
lea rdi, [rsp+208h+var_90]
xor esi, esi
mov ecx, 1
call _ZN13CLIPTextModelC2E11CLIPVersionib; CLIPTextModel::CLIPTextModel(CLIPVersion,int,bool)
jmp short $+2
loc_3FBBF:
mov rdi, [rsp+208h+var_1F0]
add rdi, 128h
lea rsi, [rsp+208h+var_90]
call _ZN13CLIPTextModelaSEOS_; CLIPTextModel::operator=(CLIPTextModel&&)
lea rdi, [rsp+208h+var_90]; this
call _ZN13CLIPTextModelD2Ev; CLIPTextModel::~CLIPTextModel()
jmp loc_3FCC4
loc_3FBEA:
cmp [rsp+208h+var_C], 1
jnz short loc_3FC3C
mov edx, [rsp+208h+var_10]
lea rdi, [rsp+208h+var_100]
mov ecx, 1
mov esi, ecx
call _ZN13CLIPTextModelC2E11CLIPVersionib; CLIPTextModel::CLIPTextModel(CLIPVersion,int,bool)
jmp short $+2
loc_3FC11:
mov rdi, [rsp+208h+var_1F0]
add rdi, 128h
lea rsi, [rsp+208h+var_100]
call _ZN13CLIPTextModelaSEOS_; CLIPTextModel::operator=(CLIPTextModel&&)
lea rdi, [rsp+208h+var_100]; this
call _ZN13CLIPTextModelD2Ev; CLIPTextModel::~CLIPTextModel()
jmp loc_3FCC2
loc_3FC3C:
cmp [rsp+208h+var_C], 2
jnz short loc_3FCC0
mov edx, [rsp+208h+var_10]
lea rdi, [rsp+208h+var_170]
xor ecx, ecx
mov esi, ecx
call _ZN13CLIPTextModelC2E11CLIPVersionib; CLIPTextModel::CLIPTextModel(CLIPVersion,int,bool)
jmp short $+2
loc_3FC60:
mov rdi, [rsp+208h+var_1F0]
add rdi, 128h
lea rsi, [rsp+208h+var_170]
mov [rsp+208h+var_208], rsi
call _ZN13CLIPTextModelaSEOS_; CLIPTextModel::operator=(CLIPTextModel&&)
mov rdi, [rsp+208h+var_208]; this
call _ZN13CLIPTextModelD2Ev; CLIPTextModel::~CLIPTextModel()
mov edx, [rsp+208h+var_10]
lea rdi, [rsp+208h+var_1E0]
mov esi, 2
xor ecx, ecx
call _ZN13CLIPTextModelC2E11CLIPVersionib; CLIPTextModel::CLIPTextModel(CLIPVersion,int,bool)
jmp short $+2
loc_3FCA0:
mov rdi, [rsp+208h+var_1F0]
add rdi, 198h
lea rsi, [rsp+208h+var_1E0]
call _ZN13CLIPTextModelaSEOS_; CLIPTextModel::operator=(CLIPTextModel&&)
lea rdi, [rsp+208h+var_1E0]; this
call _ZN13CLIPTextModelD2Ev; CLIPTextModel::~CLIPTextModel()
loc_3FCC0:
jmp short $+2
loc_3FCC2:
jmp short $+2
loc_3FCC4:
add rsp, 208h
retn
loc_3FCCC:
mov rdi, [rsp+arg_8]; this
call _ZN13CLIPTextModelD2Ev; CLIPTextModel::~CLIPTextModel()
loc_3FCD6:
mov rdi, [rsp+arg_18]; this
call _ZN13CLIPTokenizerD2Ev; CLIPTokenizer::~CLIPTokenizer()
loc_3FCE0:
mov rdi, [rsp+arg_10]; this
call _ZN10GGMLModuleD2Ev; GGMLModule::~GGMLModule()
mov rdi, [rsp+arg_1E8]
call __Unwind_Resume
| void FrozenCLIPEmbedderWithCustomWords::FrozenCLIPEmbedderWithCustomWords(
GGMLModule *a1,
unsigned int a2,
int a3)
{
int v3; // r8d
int v4; // r9d
int v5; // r8d
int v6; // r9d
int v7; // r8d
int v8; // r9d
int v9; // r8d
int v10; // r9d
_BYTE v11[112]; // [rsp+28h] [rbp-1E0h] BYREF
_BYTE v12[112]; // [rsp+98h] [rbp-170h] BYREF
_BYTE v13[112]; // [rsp+108h] [rbp-100h] BYREF
_BYTE v14[128]; // [rsp+178h] [rbp-90h] BYREF
int v15; // [rsp+1F8h] [rbp-10h]
unsigned int v16; // [rsp+1FCh] [rbp-Ch]
GGMLModule *v17; // [rsp+200h] [rbp-8h]
v17 = a1;
v16 = a2;
v15 = a3;
GGMLModule::GGMLModule(a1);
*(_QWORD *)a1 = off_1D6C58;
*((_DWORD *)a1 + 26) = v16;
CLIPTokenizer::CLIPTokenizer((char *)a1 + 112, v16);
CLIPTextModel::CLIPTextModel((_DWORD)a1 + 296, 0, -1, 1, v3, v4);
CLIPTextModel::CLIPTextModel((_DWORD)a1 + 408, 0, -1, 1, v5, v6);
std::string::operator=((char *)a1 + 8, "clip");
if ( v15 <= 0 )
{
v15 = 1;
if ( v16 == 1 || v16 == 2 )
v15 = 2;
}
if ( v16 )
{
if ( v16 == 1 )
{
CLIPTextModel::CLIPTextModel((unsigned int)v13, 1, v15, 1, v7, v8);
CLIPTextModel::operator=((char *)a1 + 296);
CLIPTextModel::~CLIPTextModel((CLIPTextModel *)v13);
}
else if ( v16 == 2 )
{
CLIPTextModel::CLIPTextModel((unsigned int)v12, 0, v15, 0, v7, v8);
CLIPTextModel::operator=((char *)a1 + 296);
CLIPTextModel::~CLIPTextModel((CLIPTextModel *)v12);
CLIPTextModel::CLIPTextModel((unsigned int)v11, 2, v15, 0, v9, v10);
CLIPTextModel::operator=((char *)a1 + 408);
CLIPTextModel::~CLIPTextModel((CLIPTextModel *)v11);
}
}
else
{
CLIPTextModel::CLIPTextModel((unsigned int)v14, 0, v15, 1, v7, v8);
CLIPTextModel::operator=((char *)a1 + 296);
CLIPTextModel::~CLIPTextModel((CLIPTextModel *)v14);
}
}
| FrozenCLIPEmbedderWithCustomWords:
SUB RSP,0x208
MOV qword ptr [RSP + 0x200],RDI
MOV dword ptr [RSP + 0x1fc],ESI
MOV dword ptr [RSP + 0x1f8],EDX
MOV RDI,qword ptr [RSP + 0x200]
MOV qword ptr [RSP + 0x18],RDI
CALL 0x001431f0
MOV RDI,qword ptr [RSP + 0x18]
LEA RAX,[0x2d6c58]
MOV qword ptr [RDI],RAX
MOV EAX,dword ptr [RSP + 0x1fc]
MOV dword ptr [RDI + 0x68],EAX
ADD RDI,0x70
MOV qword ptr [RSP + 0x20],RDI
MOV ESI,dword ptr [RSP + 0x1fc]
LAB_0013fa88:
CALL 0x001432b0
JMP 0x0013fa8f
LAB_0013fa8f:
MOV RDI,qword ptr [RSP + 0x18]
ADD RDI,0x128
MOV qword ptr [RSP + 0x10],RDI
LAB_0013faa0:
XOR ESI,ESI
MOV EDX,0xffffffff
MOV ECX,0x1
CALL 0x00143310
JMP 0x0013fab3
LAB_0013fab3:
MOV RDI,qword ptr [RSP + 0x18]
ADD RDI,0x198
MOV qword ptr [RSP + 0x8],RDI
LAB_0013fac4:
XOR ESI,ESI
MOV EDX,0xffffffff
MOV ECX,0x1
CALL 0x00143310
JMP 0x0013fad7
LAB_0013fad7:
MOV RDI,qword ptr [RSP + 0x18]
ADD RDI,0x8
LAB_0013fae0:
LEA RSI,[0x27f8ad]
CALL 0x0010ba40
JMP 0x0013faee
LAB_0013faee:
CMP dword ptr [RSP + 0x1f8],0x0
JG 0x0013fb98
MOV dword ptr [RSP + 0x1f8],0x1
CMP dword ptr [RSP + 0x1fc],0x1
JZ 0x0013fb1b
CMP dword ptr [RSP + 0x1fc],0x2
JNZ 0x0013fb96
LAB_0013fb1b:
MOV dword ptr [RSP + 0x1f8],0x2
JMP 0x0013fb96
LAB_0013fb96:
JMP 0x0013fb98
LAB_0013fb98:
CMP dword ptr [RSP + 0x1fc],0x0
JNZ 0x0013fbea
MOV EDX,dword ptr [RSP + 0x1f8]
LEA RDI,[RSP + 0x178]
XOR ESI,ESI
MOV ECX,0x1
CALL 0x00143310
JMP 0x0013fbbf
LAB_0013fbbf:
MOV RDI,qword ptr [RSP + 0x18]
ADD RDI,0x128
LEA RSI,[RSP + 0x178]
CALL 0x00143430
LEA RDI,[RSP + 0x178]
CALL 0x001434a0
JMP 0x0013fcc4
LAB_0013fbea:
CMP dword ptr [RSP + 0x1fc],0x1
JNZ 0x0013fc3c
MOV EDX,dword ptr [RSP + 0x1f8]
LEA RDI,[RSP + 0x108]
MOV ECX,0x1
MOV ESI,ECX
CALL 0x00143310
JMP 0x0013fc11
LAB_0013fc11:
MOV RDI,qword ptr [RSP + 0x18]
ADD RDI,0x128
LEA RSI,[RSP + 0x108]
CALL 0x00143430
LEA RDI,[RSP + 0x108]
CALL 0x001434a0
JMP 0x0013fcc2
LAB_0013fc3c:
CMP dword ptr [RSP + 0x1fc],0x2
JNZ 0x0013fcc0
MOV EDX,dword ptr [RSP + 0x1f8]
LEA RDI,[RSP + 0x98]
XOR ECX,ECX
MOV ESI,ECX
CALL 0x00143310
JMP 0x0013fc60
LAB_0013fc60:
MOV RDI,qword ptr [RSP + 0x18]
ADD RDI,0x128
LEA RSI,[RSP + 0x98]
MOV qword ptr [RSP],RSI
CALL 0x00143430
MOV RDI,qword ptr [RSP]
CALL 0x001434a0
MOV EDX,dword ptr [RSP + 0x1f8]
LEA RDI,[RSP + 0x28]
MOV ESI,0x2
XOR ECX,ECX
CALL 0x00143310
LAB_0013fc9e:
JMP 0x0013fca0
LAB_0013fca0:
MOV RDI,qword ptr [RSP + 0x18]
ADD RDI,0x198
LEA RSI,[RSP + 0x28]
CALL 0x00143430
LEA RDI,[RSP + 0x28]
CALL 0x001434a0
LAB_0013fcc0:
JMP 0x0013fcc2
LAB_0013fcc2:
JMP 0x0013fcc4
LAB_0013fcc4:
ADD RSP,0x208
RET
|
/* FrozenCLIPEmbedderWithCustomWords::FrozenCLIPEmbedderWithCustomWords(SDVersion, int) */
void __thiscall
FrozenCLIPEmbedderWithCustomWords::FrozenCLIPEmbedderWithCustomWords
(FrozenCLIPEmbedderWithCustomWords *this,int param_2,int param_3)
{
CLIPTextModel local_1e0 [112];
CLIPTextModel local_170 [112];
CLIPTextModel local_100 [112];
CLIPTextModel local_90 [128];
int local_10;
int local_c;
FrozenCLIPEmbedderWithCustomWords *local_8;
local_10 = param_3;
local_c = param_2;
local_8 = this;
GGMLModule::GGMLModule((GGMLModule *)this);
*(int ***)this = &PTR_calculate_mem_size_002d6c58;
*(int *)(this + 0x68) = local_c;
/* try { // try from 0013fa88 to 0013fa8c has its CatchHandler @ 0013fb28 */
CLIPTokenizer::CLIPTokenizer((CLIPTokenizer *)(this + 0x70),local_c);
/* try { // try from 0013faa0 to 0013fab0 has its CatchHandler @ 0013fb41 */
CLIPTextModel::CLIPTextModel((CLIPTextModel *)(this + 0x128),0,0xffffffff,1);
/* try { // try from 0013fac4 to 0013fad4 has its CatchHandler @ 0013fb5a */
CLIPTextModel::CLIPTextModel((CLIPTextModel *)(this + 0x198),0,0xffffffff,1);
/* try { // try from 0013fae0 to 0013fc9d has its CatchHandler @ 0013fb73 */
std::__cxx11::string::operator=((string *)(this + 8),"clip");
if ((local_10 < 1) && ((local_10 = 1, local_c == 1 || (local_c == 2)))) {
local_10 = 2;
}
if (local_c == 0) {
CLIPTextModel::CLIPTextModel(local_90,0,local_10,1);
CLIPTextModel::operator=((CLIPTextModel *)(this + 0x128),local_90);
CLIPTextModel::~CLIPTextModel(local_90);
}
else if (local_c == 1) {
CLIPTextModel::CLIPTextModel(local_100,1,local_10);
CLIPTextModel::operator=((CLIPTextModel *)(this + 0x128),local_100);
CLIPTextModel::~CLIPTextModel(local_100);
}
else if (local_c == 2) {
CLIPTextModel::CLIPTextModel(local_170,0,local_10);
CLIPTextModel::operator=((CLIPTextModel *)(this + 0x128),local_170);
CLIPTextModel::~CLIPTextModel(local_170);
CLIPTextModel::CLIPTextModel(local_1e0,2,local_10,0);
CLIPTextModel::operator=((CLIPTextModel *)(this + 0x198),local_1e0);
CLIPTextModel::~CLIPTextModel(local_1e0);
}
return;
}
| |
40,586 | FrozenCLIPEmbedderWithCustomWords::FrozenCLIPEmbedderWithCustomWords(SDVersion, int) | 7CodeWizard[P]stablediffusion/clip.hpp | FrozenCLIPEmbedderWithCustomWords(SDVersion version = VERSION_1_x, int clip_skip = -1)
: version(version), tokenizer(version) {
name = "clip";
if (clip_skip <= 0) {
clip_skip = 1;
if (version == VERSION_2_x || version == VERSION_XL) {
clip_skip = 2;
}
}
if (version == VERSION_1_x) {
text_model = CLIPTextModel(OPENAI_CLIP_VIT_L_14, clip_skip);
} else if (version == VERSION_2_x) {
text_model = CLIPTextModel(OPEN_CLIP_VIT_H_14, clip_skip);
} else if (version == VERSION_XL) {
text_model = CLIPTextModel(OPENAI_CLIP_VIT_L_14, clip_skip, false);
text_model2 = CLIPTextModel(OPEN_CLIP_VIT_BIGG_14, clip_skip, false);
}
} | O1 | cpp | FrozenCLIPEmbedderWithCustomWords::FrozenCLIPEmbedderWithCustomWords(SDVersion, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %edx, %r14d
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x18(%rdi), %rax
movq %rax, 0x8(%rdi)
movabsq $0x646f6d206c6d6767, %rax # imm = 0x646F6D206C6D6767
movq %rax, 0x18(%rdi)
movl $0x656c7564, 0x1f(%rdi) # imm = 0x656C7564
movq $0xb, 0x10(%rdi)
movb $0x0, 0x23(%rdi)
movq $0x0, 0x60(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x38(%rdi)
movups %xmm0, 0x48(%rdi)
movl $0x0, 0x58(%rdi)
leaq 0xbe66e(%rip), %rax # 0xf57a0
movq %rax, (%rdi)
movl %esi, 0x68(%rdi)
addq $0x70, %rdi
movq %rdi, (%rsp)
callq 0x3860c
leaq 0x128(%rbx), %r15
movq %r15, %rdi
xorl %esi, %esi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
movl $0x1, %ecx
callq 0x38684
leaq 0x198(%rbx), %r12
movq %r12, %rdi
xorl %esi, %esi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
movl $0x1, %ecx
callq 0x38684
leaq 0x8(%rbx), %rdi
movq 0x10(%rbx), %rdx
leaq 0x86df7(%rip), %rcx # 0xbdf81
xorl %r13d, %r13d
movl $0x4, %r8d
xorl %esi, %esi
callq 0xa950
leal -0x1(%rbp), %eax
cmpl $0x2, %eax
adcl $0x1, %r13d
testl %r14d, %r14d
cmovgl %r14d, %r13d
testl %ebp, %ebp
je 0x372c2
cmpl $0x1, %ebp
je 0x372a9
cmpl $0x2, %ebp
jne 0x3733d
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
movl %r13d, %edx
xorl %ecx, %ecx
callq 0x38684
leaq 0x48(%rsp), %r14
movups -0x40(%r14), %xmm0
movups -0x30(%r14), %xmm1
movups -0x20(%r14), %xmm2
movups -0x10(%r14), %xmm3
movups %xmm3, 0x30(%r15)
movups %xmm2, 0x20(%r15)
movups %xmm1, 0x10(%r15)
movups %xmm0, (%r15)
leaq 0x168(%rbx), %rdi
movq %r14, %rsi
callq 0x38a3a
movq 0x28(%r14), %rax
movq %rax, 0x190(%rbx)
movups 0x18(%r14), %xmm0
movups %xmm0, 0x180(%rbx)
movq (%r14), %rdi
testq %rdi, %rdi
je 0x3723d
movq 0x58(%rsp), %rsi
subq %rdi, %rsi
callq 0xa5e0
leaq 0x8(%rsp), %rdi
movl $0x2, %esi
movl %r13d, %edx
xorl %ecx, %ecx
callq 0x38684
leaq 0x48(%rsp), %r14
movups -0x40(%r14), %xmm0
movups -0x30(%r14), %xmm1
movups -0x20(%r14), %xmm2
movups -0x10(%r14), %xmm3
movups %xmm3, 0x30(%r12)
movups %xmm2, 0x20(%r12)
movups %xmm1, 0x10(%r12)
movups %xmm0, (%r12)
leaq 0x1d8(%rbx), %rdi
movq %r14, %rsi
callq 0x38a3a
movq 0x28(%r14), %rax
movq %rax, 0x200(%rbx)
movups 0x18(%r14), %xmm0
movups %xmm0, 0x1f0(%rbx)
jmp 0x37328
leaq 0x8(%rsp), %rdi
movl $0x1, %esi
movl %r13d, %edx
movl $0x1, %ecx
callq 0x38684
jmp 0x372d6
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
movl %r13d, %edx
movl $0x1, %ecx
callq 0x38684
leaq 0x48(%rsp), %r14
movups -0x40(%r14), %xmm0
movups -0x30(%r14), %xmm1
movups -0x20(%r14), %xmm2
movups -0x10(%r14), %xmm3
movups %xmm3, 0x30(%r15)
movups %xmm2, 0x20(%r15)
movups %xmm1, 0x10(%r15)
movups %xmm0, (%r15)
leaq 0x168(%rbx), %rdi
movq %r14, %rsi
callq 0x38a3a
movq 0x28(%r14), %rax
movq %rax, 0x190(%rbx)
movups 0x18(%r14), %xmm0
movups %xmm0, 0x180(%rbx)
movq (%r14), %rdi
testq %rdi, %rdi
je 0x3733d
movq 0x58(%rsp), %rsi
subq %rdi, %rsi
callq 0xa5e0
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x37354
jmp 0x37354
jmp 0x37354
jmp 0x37354
movq %rax, %r14
movq 0x1d8(%rbx), %rdi
testq %rdi, %rdi
je 0x37377
movq 0x1e8(%rbx), %rsi
subq %rdi, %rsi
callq 0xa5e0
jmp 0x37377
movq %rax, %r14
movq 0x168(%rbx), %rdi
testq %rdi, %rdi
je 0x37397
movq 0x178(%rbx), %rsi
subq %rdi, %rsi
callq 0xa5e0
jmp 0x37397
movq %rax, %r14
movq (%rsp), %rdi
callq 0x3875a
movq %rbx, %rdi
callq 0x37f4e
movq %r14, %rdi
callq 0xaae0
| _ZN33FrozenCLIPEmbedderWithCustomWordsC2E9SDVersioni:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov r14d, edx
mov ebp, esi
mov rbx, rdi
lea rax, [rdi+18h]
mov [rdi+8], rax
mov rax, 646F6D206C6D6767h
mov [rdi+18h], rax
mov dword ptr [rdi+1Fh], 656C7564h
mov qword ptr [rdi+10h], 0Bh
mov byte ptr [rdi+23h], 0
mov qword ptr [rdi+60h], 0
xorps xmm0, xmm0
movups xmmword ptr [rdi+28h], xmm0
movups xmmword ptr [rdi+38h], xmm0
movups xmmword ptr [rdi+48h], xmm0
mov dword ptr [rdi+58h], 0
lea rax, off_F57A0
mov [rdi], rax
mov [rdi+68h], esi
add rdi, 70h ; 'p'
mov [rsp+0A8h+var_A8], rdi
call _ZN13CLIPTokenizerC2E9SDVersion; CLIPTokenizer::CLIPTokenizer(SDVersion)
lea r15, [rbx+128h]
mov rdi, r15
xor esi, esi
mov edx, 0FFFFFFFFh
mov ecx, 1
call _ZN13CLIPTextModelC2E11CLIPVersionib; CLIPTextModel::CLIPTextModel(CLIPVersion,int,bool)
lea r12, [rbx+198h]
mov rdi, r12
xor esi, esi
mov edx, 0FFFFFFFFh
mov ecx, 1
call _ZN13CLIPTextModelC2E11CLIPVersionib; CLIPTextModel::CLIPTextModel(CLIPVersion,int,bool)
lea rdi, [rbx+8]
mov rdx, [rbx+10h]
lea rcx, aClip; "clip"
xor r13d, r13d
mov r8d, 4
xor esi, esi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
lea eax, [rbp-1]
cmp eax, 2
adc r13d, 1
test r14d, r14d
cmovg r13d, r14d
test ebp, ebp
jz loc_372C2
cmp ebp, 1
jz loc_372A9
cmp ebp, 2
jnz loc_3733D
lea rdi, [rsp+0A8h+var_A0]
xor esi, esi
mov edx, r13d
xor ecx, ecx
call _ZN13CLIPTextModelC2E11CLIPVersionib; CLIPTextModel::CLIPTextModel(CLIPVersion,int,bool)
lea r14, [rsp+0A8h+var_60]
movups xmm0, xmmword ptr [r14-40h]
movups xmm1, xmmword ptr [r14-30h]
movups xmm2, xmmword ptr [r14-20h]
movups xmm3, xmmword ptr [r14-10h]
movups xmmword ptr [r15+30h], xmm3
movups xmmword ptr [r15+20h], xmm2
movups xmmword ptr [r15+10h], xmm1
movups xmmword ptr [r15], xmm0
lea rdi, [rbx+168h]
mov rsi, r14
call _ZNSt6vectorI22ResidualAttentionBlockSaIS0_EE14_M_move_assignEOS2_St17integral_constantIbLb1EE; std::vector<ResidualAttentionBlock>::_M_move_assign(std::vector<ResidualAttentionBlock>&&,std::integral_constant<bool,true>)
mov rax, [r14+28h]
mov [rbx+190h], rax
movups xmm0, xmmword ptr [r14+18h]
movups xmmword ptr [rbx+180h], xmm0
mov rdi, [r14]; void *
test rdi, rdi
jz short loc_3723D
mov rsi, [rsp+0A8h+var_50]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3723D:
lea rdi, [rsp+0A8h+var_A0]
mov esi, 2
mov edx, r13d
xor ecx, ecx
call _ZN13CLIPTextModelC2E11CLIPVersionib; CLIPTextModel::CLIPTextModel(CLIPVersion,int,bool)
lea r14, [rsp+0A8h+var_60]
movups xmm0, xmmword ptr [r14-40h]
movups xmm1, xmmword ptr [r14-30h]
movups xmm2, xmmword ptr [r14-20h]
movups xmm3, xmmword ptr [r14-10h]
movups xmmword ptr [r12+30h], xmm3
movups xmmword ptr [r12+20h], xmm2
movups xmmword ptr [r12+10h], xmm1
movups xmmword ptr [r12], xmm0
lea rdi, [rbx+1D8h]
mov rsi, r14
call _ZNSt6vectorI22ResidualAttentionBlockSaIS0_EE14_M_move_assignEOS2_St17integral_constantIbLb1EE; std::vector<ResidualAttentionBlock>::_M_move_assign(std::vector<ResidualAttentionBlock>&&,std::integral_constant<bool,true>)
mov rax, [r14+28h]
mov [rbx+200h], rax
movups xmm0, xmmword ptr [r14+18h]
movups xmmword ptr [rbx+1F0h], xmm0
jmp short loc_37328
loc_372A9:
lea rdi, [rsp+0A8h+var_A0]
mov esi, 1
mov edx, r13d
mov ecx, 1
call _ZN13CLIPTextModelC2E11CLIPVersionib; CLIPTextModel::CLIPTextModel(CLIPVersion,int,bool)
jmp short loc_372D6
loc_372C2:
lea rdi, [rsp+0A8h+var_A0]
xor esi, esi
mov edx, r13d
mov ecx, 1
call _ZN13CLIPTextModelC2E11CLIPVersionib; CLIPTextModel::CLIPTextModel(CLIPVersion,int,bool)
loc_372D6:
lea r14, [rsp+0A8h+var_60]
movups xmm0, xmmword ptr [r14-40h]
movups xmm1, xmmword ptr [r14-30h]
movups xmm2, xmmword ptr [r14-20h]
movups xmm3, xmmword ptr [r14-10h]
movups xmmword ptr [r15+30h], xmm3
movups xmmword ptr [r15+20h], xmm2
movups xmmword ptr [r15+10h], xmm1
movups xmmword ptr [r15], xmm0
lea rdi, [rbx+168h]
mov rsi, r14
call _ZNSt6vectorI22ResidualAttentionBlockSaIS0_EE14_M_move_assignEOS2_St17integral_constantIbLb1EE; std::vector<ResidualAttentionBlock>::_M_move_assign(std::vector<ResidualAttentionBlock>&&,std::integral_constant<bool,true>)
mov rax, [r14+28h]
mov [rbx+190h], rax
movups xmm0, xmmword ptr [r14+18h]
movups xmmword ptr [rbx+180h], xmm0
loc_37328:
mov rdi, [r14]; void *
test rdi, rdi
jz short loc_3733D
mov rsi, [rsp+0A8h+var_50]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3733D:
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_37354
jmp short loc_37354
jmp short loc_37354
jmp short $+2
loc_37354:
mov r14, rax
mov rdi, [rbx+1D8h]; void *
test rdi, rdi
jz short loc_37377
mov rsi, [rbx+1E8h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_37377
mov r14, rax
loc_37377:
mov rdi, [rbx+168h]; void *
test rdi, rdi
jz short loc_37397
mov rsi, [rbx+178h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_37397
mov r14, rax
loc_37397:
mov rdi, [rsp+0]; this
call _ZN13CLIPTokenizerD2Ev; CLIPTokenizer::~CLIPTokenizer()
mov rdi, rbx; this
call _ZN10GGMLModuleD2Ev; GGMLModule::~GGMLModule()
mov rdi, r14
call __Unwind_Resume
| void FrozenCLIPEmbedderWithCustomWords::FrozenCLIPEmbedderWithCustomWords(long long a1, int a2, int a3)
{
_OWORD *v4; // r15
unsigned int v5; // r13d
__int128 v6; // xmm0
__int128 v7; // xmm1
__int128 v8; // xmm2
__int128 v9; // xmm0
__int128 v10; // xmm1
__int128 v11; // xmm2
__int128 v12; // xmm0
__int128 v13; // xmm1
__int128 v14; // xmm2
__int128 v15; // [rsp+8h] [rbp-A0h] BYREF
__int128 v16; // [rsp+18h] [rbp-90h]
__int128 v17; // [rsp+28h] [rbp-80h]
__int128 v18; // [rsp+38h] [rbp-70h]
void *v19[2]; // [rsp+48h] [rbp-60h] BYREF
long long v20; // [rsp+58h] [rbp-50h]
__int128 v21; // [rsp+60h] [rbp-48h]
long long v22; // [rsp+70h] [rbp-38h]
*(_QWORD *)(a1 + 8) = a1 + 24;
strcpy((char *)(a1 + 24), "ggml module");
*(_QWORD *)(a1 + 16) = 11LL;
*(_QWORD *)(a1 + 96) = 0LL;
*(_OWORD *)(a1 + 40) = 0LL;
*(_OWORD *)(a1 + 56) = 0LL;
*(_OWORD *)(a1 + 72) = 0LL;
*(_DWORD *)(a1 + 88) = 0;
*(_QWORD *)a1 = off_F57A0;
*(_DWORD *)(a1 + 104) = a2;
CLIPTokenizer::CLIPTokenizer(a1 + 112);
v4 = (_OWORD *)(a1 + 296);
CLIPTextModel::CLIPTextModel(a1 + 296, 0LL, 0xFFFFFFFFLL, 1LL);
CLIPTextModel::CLIPTextModel(a1 + 408, 0LL, 0xFFFFFFFFLL, 1LL);
std::string::_M_replace(a1 + 8, 0LL, *(_QWORD *)(a1 + 16), "clip", 4LL);
v5 = ((unsigned int)(a2 - 1) < 2) + 1;
if ( a3 > 0 )
v5 = a3;
if ( !a2 )
{
CLIPTextModel::CLIPTextModel(&v15, 0LL, v5, 1LL);
goto LABEL_11;
}
if ( a2 == 1 )
{
CLIPTextModel::CLIPTextModel(&v15, 1LL, v5, 1LL);
LABEL_11:
v12 = v15;
v13 = v16;
v14 = v17;
*(_OWORD *)(a1 + 344) = v18;
*(_OWORD *)(a1 + 328) = v14;
*(_OWORD *)(a1 + 312) = v13;
*v4 = v12;
std::vector<ResidualAttentionBlock>::_M_move_assign(a1 + 360, v19);
*(_QWORD *)(a1 + 400) = v22;
*(_OWORD *)(a1 + 384) = v21;
goto LABEL_12;
}
if ( a2 != 2 )
return;
CLIPTextModel::CLIPTextModel(&v15, 0LL, v5, 0LL);
v6 = v15;
v7 = v16;
v8 = v17;
*(_OWORD *)(a1 + 344) = v18;
*(_OWORD *)(a1 + 328) = v8;
*(_OWORD *)(a1 + 312) = v7;
*v4 = v6;
std::vector<ResidualAttentionBlock>::_M_move_assign(a1 + 360, v19);
*(_QWORD *)(a1 + 400) = v22;
*(_OWORD *)(a1 + 384) = v21;
if ( v19[0] )
operator delete(v19[0], v20 - (unsigned long long)v19[0]);
CLIPTextModel::CLIPTextModel(&v15, 2LL, v5, 0LL);
v9 = v15;
v10 = v16;
v11 = v17;
*(_OWORD *)(a1 + 456) = v18;
*(_OWORD *)(a1 + 440) = v11;
*(_OWORD *)(a1 + 424) = v10;
*(_OWORD *)(a1 + 408) = v9;
std::vector<ResidualAttentionBlock>::_M_move_assign(a1 + 472, v19);
*(_QWORD *)(a1 + 512) = v22;
*(_OWORD *)(a1 + 496) = v21;
LABEL_12:
if ( v19[0] )
operator delete(v19[0], v20 - (unsigned long long)v19[0]);
}
| |||
40,587 | FrozenCLIPEmbedderWithCustomWords::FrozenCLIPEmbedderWithCustomWords(SDVersion, int) | 7CodeWizard[P]stablediffusion/clip.hpp | FrozenCLIPEmbedderWithCustomWords(SDVersion version = VERSION_1_x, int clip_skip = -1)
: version(version), tokenizer(version) {
name = "clip";
if (clip_skip <= 0) {
clip_skip = 1;
if (version == VERSION_2_x || version == VERSION_XL) {
clip_skip = 2;
}
}
if (version == VERSION_1_x) {
text_model = CLIPTextModel(OPENAI_CLIP_VIT_L_14, clip_skip);
} else if (version == VERSION_2_x) {
text_model = CLIPTextModel(OPEN_CLIP_VIT_H_14, clip_skip);
} else if (version == VERSION_XL) {
text_model = CLIPTextModel(OPENAI_CLIP_VIT_L_14, clip_skip, false);
text_model2 = CLIPTextModel(OPEN_CLIP_VIT_BIGG_14, clip_skip, false);
}
} | O3 | cpp | FrozenCLIPEmbedderWithCustomWords::FrozenCLIPEmbedderWithCustomWords(SDVersion, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %edx, %r14d
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x18(%rdi), %rax
movq %rax, 0x8(%rdi)
movabsq $0x646f6d206c6d6767, %rax # imm = 0x646F6D206C6D6767
movq %rax, 0x18(%rdi)
movl $0x656c7564, 0x1f(%rdi) # imm = 0x656C7564
movq $0xb, 0x10(%rdi)
movb $0x0, 0x23(%rdi)
movq $0x0, 0x60(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x38(%rdi)
movups %xmm0, 0x48(%rdi)
movl $0x0, 0x58(%rdi)
leaq 0xbd38e(%rip), %rax # 0xf37a8
movq %rax, (%rdi)
movl %esi, 0x68(%rdi)
addq $0x70, %rdi
movq %rdi, 0x70(%rsp)
callq 0x37a94
leaq 0x128(%rbx), %r12
movq %r12, %rdi
xorl %esi, %esi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
movl $0x1, %ecx
callq 0x37b0c
leaq 0x198(%rbx), %r15
movq %r15, %rdi
xorl %esi, %esi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
movl $0x1, %ecx
callq 0x37b0c
leaq 0x8(%rbx), %rdi
movq 0x10(%rbx), %rdx
leaq 0x86b1e(%rip), %rcx # 0xbcf91
xorl %r13d, %r13d
movl $0x4, %r8d
xorl %esi, %esi
callq 0xa940
leal -0x1(%rbp), %eax
cmpl $0x2, %eax
adcl $0x1, %r13d
testl %r14d, %r14d
cmovgl %r14d, %r13d
testl %ebp, %ebp
je 0x3657e
cmpl $0x1, %ebp
je 0x36567
cmpl $0x2, %ebp
jne 0x3671a
movq %rsp, %rdi
xorl %esi, %esi
movl %r13d, %edx
xorl %ecx, %ecx
callq 0x37b0c
movups (%rsp), %xmm0
movups 0x10(%rsp), %xmm1
movups 0x20(%rsp), %xmm2
movups 0x30(%rsp), %xmm3
movups %xmm3, 0x30(%r12)
movups %xmm2, 0x20(%r12)
movups %xmm1, 0x10(%r12)
movups %xmm0, (%r12)
movq 0x168(%rbx), %rdi
movq 0x178(%rbx), %rsi
movups 0x40(%rsp), %xmm0
movups %xmm0, 0x168(%rbx)
movq 0x50(%rsp), %rax
movq %rax, 0x178(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rsp)
movq $0x0, 0x50(%rsp)
testq %rdi, %rdi
je 0x3663d
subq %rdi, %rsi
callq 0xa5d0
movq 0x40(%rsp), %rdi
movq 0x68(%rsp), %rax
movq %rax, 0x190(%rbx)
movups 0x58(%rsp), %xmm0
movups %xmm0, 0x180(%rbx)
testq %rdi, %rdi
je 0x36655
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0xa5d0
jmp 0x36655
movq %rsp, %rdi
movl $0x1, %esi
movl %r13d, %edx
movl $0x1, %ecx
callq 0x37b0c
jmp 0x36590
movq %rsp, %rdi
xorl %esi, %esi
movl %r13d, %edx
movl $0x1, %ecx
callq 0x37b0c
movups (%rsp), %xmm0
movups 0x10(%rsp), %xmm1
movups 0x20(%rsp), %xmm2
movups 0x30(%rsp), %xmm3
movups %xmm3, 0x30(%r12)
movups %xmm2, 0x20(%r12)
movups %xmm1, 0x10(%r12)
movups %xmm0, (%r12)
movq 0x168(%rbx), %rdi
movq 0x178(%rbx), %rsi
movups 0x40(%rsp), %xmm0
movups %xmm0, 0x168(%rbx)
movq 0x50(%rsp), %rax
movq %rax, 0x178(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rsp)
movq $0x0, 0x50(%rsp)
testq %rdi, %rdi
je 0x36620
subq %rdi, %rsi
callq 0xa5d0
movq 0x40(%rsp), %rdi
movq 0x68(%rsp), %rax
movq %rax, 0x190(%rbx)
movups 0x58(%rsp), %xmm0
movups %xmm0, 0x180(%rbx)
jmp 0x366ee
movq 0x68(%rsp), %rax
movq %rax, 0x190(%rbx)
movups 0x58(%rsp), %xmm0
movups %xmm0, 0x180(%rbx)
jmp 0x3671a
movq 0x68(%rsp), %rax
movq %rax, 0x190(%rbx)
movups 0x58(%rsp), %xmm0
movups %xmm0, 0x180(%rbx)
movq %rsp, %rdi
movl $0x2, %esi
movl %r13d, %edx
xorl %ecx, %ecx
callq 0x37b0c
movups (%rsp), %xmm0
movups 0x10(%rsp), %xmm1
movups 0x20(%rsp), %xmm2
movups 0x30(%rsp), %xmm3
movups %xmm3, 0x30(%r15)
movups %xmm2, 0x20(%r15)
movups %xmm1, 0x10(%r15)
movups %xmm0, (%r15)
movq 0x1d8(%rbx), %rdi
movq 0x1e8(%rbx), %rsi
movups 0x40(%rsp), %xmm0
movups %xmm0, 0x1d8(%rbx)
movq 0x50(%rsp), %rax
movq %rax, 0x1e8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rsp)
movq $0x0, 0x50(%rsp)
testq %rdi, %rdi
je 0x36702
subq %rdi, %rsi
callq 0xa5d0
movq 0x40(%rsp), %rdi
movq 0x68(%rsp), %rax
movq %rax, 0x200(%rbx)
movups 0x58(%rsp), %xmm0
movups %xmm0, 0x1f0(%rbx)
testq %rdi, %rdi
je 0x3671a
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0xa5d0
jmp 0x3671a
movq 0x68(%rsp), %rax
movq %rax, 0x200(%rbx)
movups 0x58(%rsp), %xmm0
movups %xmm0, 0x1f0(%rbx)
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x36731
jmp 0x36731
jmp 0x36731
jmp 0x36731
movq %rax, %r14
movq 0x1d8(%rbx), %rdi
testq %rdi, %rdi
je 0x36754
movq 0x1e8(%rbx), %rsi
subq %rdi, %rsi
callq 0xa5d0
jmp 0x36754
movq %rax, %r14
movq 0x168(%rbx), %rdi
testq %rdi, %rdi
je 0x36774
movq 0x178(%rbx), %rsi
subq %rdi, %rsi
callq 0xa5d0
jmp 0x36774
movq %rax, %r14
movq 0x70(%rsp), %rdi
callq 0x37bf4
movq %rbx, %rdi
callq 0x373e6
movq %r14, %rdi
callq 0xaad0
| _ZN33FrozenCLIPEmbedderWithCustomWordsC2E9SDVersioni:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 78h
mov r14d, edx
mov ebp, esi
mov rbx, rdi
lea rax, [rdi+18h]
mov [rdi+8], rax
mov rax, 646F6D206C6D6767h
mov [rdi+18h], rax
mov dword ptr [rdi+1Fh], 656C7564h
mov qword ptr [rdi+10h], 0Bh
mov byte ptr [rdi+23h], 0
mov qword ptr [rdi+60h], 0
xorps xmm0, xmm0
movups xmmword ptr [rdi+28h], xmm0
movups xmmword ptr [rdi+38h], xmm0
movups xmmword ptr [rdi+48h], xmm0
mov dword ptr [rdi+58h], 0
lea rax, off_F37A8
mov [rdi], rax
mov [rdi+68h], esi
add rdi, 70h ; 'p'
mov [rsp+0A8h+var_38], rdi
call _ZN13CLIPTokenizerC2E9SDVersion; CLIPTokenizer::CLIPTokenizer(SDVersion)
lea r12, [rbx+128h]
mov rdi, r12
xor esi, esi
mov edx, 0FFFFFFFFh
mov ecx, 1
call _ZN13CLIPTextModelC2E11CLIPVersionib; CLIPTextModel::CLIPTextModel(CLIPVersion,int,bool)
lea r15, [rbx+198h]
mov rdi, r15
xor esi, esi
mov edx, 0FFFFFFFFh
mov ecx, 1
call _ZN13CLIPTextModelC2E11CLIPVersionib; CLIPTextModel::CLIPTextModel(CLIPVersion,int,bool)
lea rdi, [rbx+8]
mov rdx, [rbx+10h]
lea rcx, aClip; "clip"
xor r13d, r13d
mov r8d, 4
xor esi, esi
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong)
lea eax, [rbp-1]
cmp eax, 2
adc r13d, 1
test r14d, r14d
cmovg r13d, r14d
test ebp, ebp
jz loc_3657E
cmp ebp, 1
jz loc_36567
cmp ebp, 2
jnz loc_3671A
mov rdi, rsp
xor esi, esi
mov edx, r13d
xor ecx, ecx
call _ZN13CLIPTextModelC2E11CLIPVersionib; CLIPTextModel::CLIPTextModel(CLIPVersion,int,bool)
movups xmm0, [rsp+0A8h+var_A8]
movups xmm1, [rsp+0A8h+var_98]
movups xmm2, [rsp+0A8h+var_88]
movups xmm3, [rsp+0A8h+var_78]
movups xmmword ptr [r12+30h], xmm3
movups xmmword ptr [r12+20h], xmm2
movups xmmword ptr [r12+10h], xmm1
movups xmmword ptr [r12], xmm0
mov rdi, [rbx+168h]; void *
mov rsi, [rbx+178h]
movups xmm0, xmmword ptr [rsp+0A8h+var_68]
movups xmmword ptr [rbx+168h], xmm0
mov rax, [rsp+0A8h+var_58]
mov [rbx+178h], rax
xorps xmm0, xmm0
movups xmmword ptr [rsp+0A8h+var_68], xmm0
mov [rsp+0A8h+var_58], 0
test rdi, rdi
jz loc_3663D
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
mov rdi, [rsp+0A8h+var_68]; void *
mov rax, [rsp+0A8h+var_40]
mov [rbx+190h], rax
movups xmm0, [rsp+0A8h+var_50]
movups xmmword ptr [rbx+180h], xmm0
test rdi, rdi
jz loc_36655
mov rsi, [rsp+0A8h+var_58]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp loc_36655
loc_36567:
mov rdi, rsp
mov esi, 1
mov edx, r13d
mov ecx, 1
call _ZN13CLIPTextModelC2E11CLIPVersionib; CLIPTextModel::CLIPTextModel(CLIPVersion,int,bool)
jmp short loc_36590
loc_3657E:
mov rdi, rsp
xor esi, esi
mov edx, r13d
mov ecx, 1
call _ZN13CLIPTextModelC2E11CLIPVersionib; CLIPTextModel::CLIPTextModel(CLIPVersion,int,bool)
loc_36590:
movups xmm0, [rsp+0A8h+var_A8]
movups xmm1, [rsp+0A8h+var_98]
movups xmm2, [rsp+0A8h+var_88]
movups xmm3, [rsp+0A8h+var_78]
movups xmmword ptr [r12+30h], xmm3
movups xmmword ptr [r12+20h], xmm2
movups xmmword ptr [r12+10h], xmm1
movups xmmword ptr [r12], xmm0
mov rdi, [rbx+168h]; void *
mov rsi, [rbx+178h]
movups xmm0, xmmword ptr [rsp+0A8h+var_68]
movups xmmword ptr [rbx+168h], xmm0
mov rax, [rsp+0A8h+var_58]
mov [rbx+178h], rax
xorps xmm0, xmm0
movups xmmword ptr [rsp+0A8h+var_68], xmm0
mov [rsp+0A8h+var_58], 0
test rdi, rdi
jz short loc_36620
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
mov rdi, [rsp+0A8h+var_68]
mov rax, [rsp+0A8h+var_40]
mov [rbx+190h], rax
movups xmm0, [rsp+0A8h+var_50]
movups xmmword ptr [rbx+180h], xmm0
jmp loc_366EE
loc_36620:
mov rax, [rsp+0A8h+var_40]
mov [rbx+190h], rax
movups xmm0, [rsp+0A8h+var_50]
movups xmmword ptr [rbx+180h], xmm0
jmp loc_3671A
loc_3663D:
mov rax, [rsp+0A8h+var_40]
mov [rbx+190h], rax
movups xmm0, [rsp+0A8h+var_50]
movups xmmword ptr [rbx+180h], xmm0
loc_36655:
mov rdi, rsp
mov esi, 2
mov edx, r13d
xor ecx, ecx
call _ZN13CLIPTextModelC2E11CLIPVersionib; CLIPTextModel::CLIPTextModel(CLIPVersion,int,bool)
movups xmm0, [rsp+0A8h+var_A8]
movups xmm1, [rsp+0A8h+var_98]
movups xmm2, [rsp+0A8h+var_88]
movups xmm3, [rsp+0A8h+var_78]
movups xmmword ptr [r15+30h], xmm3
movups xmmword ptr [r15+20h], xmm2
movups xmmword ptr [r15+10h], xmm1
movups xmmword ptr [r15], xmm0
mov rdi, [rbx+1D8h]; void *
mov rsi, [rbx+1E8h]
movups xmm0, xmmword ptr [rsp+0A8h+var_68]
movups xmmword ptr [rbx+1D8h], xmm0
mov rax, [rsp+0A8h+var_58]
mov [rbx+1E8h], rax
xorps xmm0, xmm0
movups xmmword ptr [rsp+0A8h+var_68], xmm0
mov [rsp+0A8h+var_58], 0
test rdi, rdi
jz short loc_36702
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
mov rdi, [rsp+0A8h+var_68]; void *
mov rax, [rsp+0A8h+var_40]
mov [rbx+200h], rax
movups xmm0, [rsp+0A8h+var_50]
movups xmmword ptr [rbx+1F0h], xmm0
loc_366EE:
test rdi, rdi
jz short loc_3671A
mov rsi, [rsp+0A8h+var_58]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_3671A
loc_36702:
mov rax, [rsp+0A8h+var_40]
mov [rbx+200h], rax
movups xmm0, [rsp+0A8h+var_50]
movups xmmword ptr [rbx+1F0h], xmm0
loc_3671A:
add rsp, 78h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_36731
jmp short loc_36731
jmp short loc_36731
jmp short $+2
loc_36731:
mov r14, rax
mov rdi, [rbx+1D8h]; void *
test rdi, rdi
jz short loc_36754
mov rsi, [rbx+1E8h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_36754
mov r14, rax
loc_36754:
mov rdi, [rbx+168h]; void *
test rdi, rdi
jz short loc_36774
mov rsi, [rbx+178h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_36774
mov r14, rax
loc_36774:
mov rdi, [rsp+arg_68]; this
call _ZN13CLIPTokenizerD2Ev; CLIPTokenizer::~CLIPTokenizer()
mov rdi, rbx; this
call _ZN10GGMLModuleD2Ev; GGMLModule::~GGMLModule()
mov rdi, r14
call __Unwind_Resume
| void FrozenCLIPEmbedderWithCustomWords::FrozenCLIPEmbedderWithCustomWords(long long a1, int a2, int a3)
{
_OWORD *v5; // r12
_OWORD *v6; // r15
unsigned int v7; // r13d
__int128 v8; // xmm0
__int128 v9; // xmm1
__int128 v10; // xmm2
void *v11; // rdi
long long v12; // rsi
void *v13; // rdi
__int128 v14; // xmm0
__int128 v15; // xmm1
__int128 v16; // xmm2
void *v17; // rdi
long long v18; // rsi
void *v19; // rdi
__int128 v20; // xmm0
__int128 v21; // xmm1
__int128 v22; // xmm2
void *v23; // rdi
long long v24; // rsi
__int128 v25; // [rsp+0h] [rbp-A8h] BYREF
__int128 v26; // [rsp+10h] [rbp-98h]
__int128 v27; // [rsp+20h] [rbp-88h]
__int128 v28; // [rsp+30h] [rbp-78h]
void *v29[2]; // [rsp+40h] [rbp-68h]
long long v30; // [rsp+50h] [rbp-58h]
__int128 v31; // [rsp+58h] [rbp-50h]
long long v32; // [rsp+68h] [rbp-40h]
long long v33; // [rsp+70h] [rbp-38h]
*(_QWORD *)(a1 + 8) = a1 + 24;
strcpy((char *)(a1 + 24), "ggml module");
*(_QWORD *)(a1 + 16) = 11LL;
*(_QWORD *)(a1 + 96) = 0LL;
*(_OWORD *)(a1 + 40) = 0LL;
*(_OWORD *)(a1 + 56) = 0LL;
*(_OWORD *)(a1 + 72) = 0LL;
*(_DWORD *)(a1 + 88) = 0;
*(_QWORD *)a1 = &off_F37A8;
*(_DWORD *)(a1 + 104) = a2;
v33 = a1 + 112;
CLIPTokenizer::CLIPTokenizer();
v5 = (_OWORD *)(a1 + 296);
CLIPTextModel::CLIPTextModel(a1 + 296, 0LL, 0xFFFFFFFFLL, 1LL);
v6 = (_OWORD *)(a1 + 408);
CLIPTextModel::CLIPTextModel(a1 + 408, 0LL, 0xFFFFFFFFLL, 1LL);
std::string::_M_replace(a1 + 8, 0LL, *(_QWORD *)(a1 + 16), "clip", 4LL);
v7 = ((unsigned int)(a2 - 1) < 2) + 1;
if ( a3 > 0 )
v7 = a3;
if ( !a2 )
{
CLIPTextModel::CLIPTextModel(&v25, 0LL, v7, 1LL);
goto LABEL_11;
}
if ( a2 == 1 )
{
CLIPTextModel::CLIPTextModel(&v25, 1LL, v7, 1LL);
LABEL_11:
v14 = v25;
v15 = v26;
v16 = v27;
*(_OWORD *)(a1 + 344) = v28;
*(_OWORD *)(a1 + 328) = v16;
*(_OWORD *)(a1 + 312) = v15;
*v5 = v14;
v17 = *(void **)(a1 + 360);
v18 = *(_QWORD *)(a1 + 376);
*(_OWORD *)(a1 + 360) = *(_OWORD *)v29;
*(_QWORD *)(a1 + 376) = v30;
*(_OWORD *)v29 = 0LL;
v30 = 0LL;
if ( !v17 )
{
*(_QWORD *)(a1 + 400) = v32;
*(_OWORD *)(a1 + 384) = v31;
return;
}
operator delete(v17, v18 - (_QWORD)v17);
v19 = v29[0];
*(_QWORD *)(a1 + 400) = v32;
*(_OWORD *)(a1 + 384) = v31;
goto LABEL_17;
}
if ( a2 != 2 )
return;
CLIPTextModel::CLIPTextModel(&v25, 0LL, v7, 0LL);
v8 = v25;
v9 = v26;
v10 = v27;
*(_OWORD *)(a1 + 344) = v28;
*(_OWORD *)(a1 + 328) = v10;
*(_OWORD *)(a1 + 312) = v9;
*v5 = v8;
v11 = *(void **)(a1 + 360);
v12 = *(_QWORD *)(a1 + 376);
*(_OWORD *)(a1 + 360) = *(_OWORD *)v29;
*(_QWORD *)(a1 + 376) = v30;
*(_OWORD *)v29 = 0LL;
v30 = 0LL;
if ( v11 )
{
operator delete(v11, v12 - (_QWORD)v11);
v13 = v29[0];
*(_QWORD *)(a1 + 400) = v32;
*(_OWORD *)(a1 + 384) = v31;
if ( v13 )
operator delete(v13, v30 - (_QWORD)v13);
}
else
{
*(_QWORD *)(a1 + 400) = v32;
*(_OWORD *)(a1 + 384) = v31;
}
CLIPTextModel::CLIPTextModel(&v25, 2LL, v7, 0LL);
v20 = v25;
v21 = v26;
v22 = v27;
*(_OWORD *)(a1 + 456) = v28;
*(_OWORD *)(a1 + 440) = v22;
*(_OWORD *)(a1 + 424) = v21;
*v6 = v20;
v23 = *(void **)(a1 + 472);
v24 = *(_QWORD *)(a1 + 488);
*(_OWORD *)(a1 + 472) = *(_OWORD *)v29;
*(_QWORD *)(a1 + 488) = v30;
*(_OWORD *)v29 = 0LL;
v30 = 0LL;
if ( !v23 )
{
*(_QWORD *)(a1 + 512) = v32;
*(_OWORD *)(a1 + 496) = v31;
return;
}
operator delete(v23, v24 - (_QWORD)v23);
v19 = v29[0];
*(_QWORD *)(a1 + 512) = v32;
*(_OWORD *)(a1 + 496) = v31;
LABEL_17:
if ( v19 )
operator delete(v19, v30 - (_QWORD)v19);
}
| |||
40,588 | blst_scalar_from_be_bytes | corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/exports.c | int blst_scalar_from_be_bytes(pow256 out, const unsigned char *bytes, size_t n)
{
size_t rem = (n - 1) % 32 + 1;
struct { vec256 out, digit; } t;
limb_t ret;
vec_zero(t.out, sizeof(t.out));
limbs_from_be_bytes(t.out, bytes, rem);
mul_mont_sparse_256(t.out, BLS12_381_rRR, t.out, BLS12_381_r, r0);
while (n -= rem) {
limbs_from_be_bytes(t.digit, bytes += rem, 32);
add_mod_256(t.out, t.out, t.digit, BLS12_381_r);
mul_mont_sparse_256(t.out, BLS12_381_rRR, t.out, BLS12_381_r, r0);
rem = 32;
}
from_mont_256(t.out, t.out, BLS12_381_r, r0);
ret = vec_is_zero(t.out, sizeof(t.out));
le_bytes_from_limbs(out, t.out, 32);
vec_zero(&t, sizeof(t));
return (int)(ret^1);
} | O3 | c | blst_scalar_from_be_bytes:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leal -0x1(%rdx), %eax
andl $0x1f, %eax
xorl %ecx, %ecx
movq $0x0, -0x68(%rbp,%rcx,8)
incq %rcx
cmpq $0x4, %rcx
jne 0x65d8e
leaq 0x1(%rax), %r13
leaq -0x68(%rbp), %rcx
xorl %ecx, %ecx
movq %r15, %rdx
shlq $0x8, %rcx
movzbl (%rdx), %esi
incq %rdx
orq %rsi, %rcx
movq %rax, %rsi
andq $-0x8, %rsi
movq %rcx, -0x68(%rbp,%rsi)
addq $-0x1, %rax
jb 0x65dad
movabsq $-0x100000001, %r8 # imm = 0xFFFFFFFEFFFFFFFF
leaq 0x27173(%rip), %rsi # 0x8cf50
leaq 0x26c5c(%rip), %rcx # 0x8ca40
leaq -0x68(%rbp), %rdi
movq %rdi, %rdx
callq 0x76040
subq %r13, %r14
je 0x65e69
leaq -0x68(%rbp), %r12
addq %r13, %r15
movl $0x1f, %eax
xorl %ecx, %ecx
movq %r15, %rdx
shlq $0x8, %rcx
movzbl (%rdx), %esi
incq %rdx
orq %rsi, %rcx
movq %rax, %rsi
andq $-0x8, %rsi
movq %rcx, -0x48(%rbp,%rsi)
addq $-0x1, %rax
jb 0x65e06
movq %r12, %rdi
movq %r12, %rsi
leaq -0x48(%rbp), %rdx
leaq 0x26c0a(%rip), %r13 # 0x8ca40
movq %r13, %rcx
callq 0x76740
movq %r12, %rdi
leaq 0x27108(%rip), %rsi # 0x8cf50
movq %r12, %rdx
movq %r13, %rcx
movabsq $-0x100000001, %r8 # imm = 0xFFFFFFFEFFFFFFFF
callq 0x76040
movl $0x20, %r13d
addq $-0x20, %r14
jne 0x65df9
leaq 0x26bd0(%rip), %rdx # 0x8ca40
leaq -0x68(%rbp), %r14
movq %r14, %rdi
movq %r14, %rsi
movabsq $-0x100000001, %rcx # imm = 0xFFFFFFFEFFFFFFFF
callq 0x76460
movl $0x20, %esi
movq %r14, %rdi
callq 0x70940
cmpq %rbx, %r14
je 0x65ec1
xorl %ecx, %ecx
movq -0x68(%rbp,%rcx,8), %rsi
xorl %edx, %edx
movb %sil, (%rbx,%rdx)
incq %rdx
shrq $0x8, %rsi
cmpq $0x8, %rdx
jne 0x65ea4
incq %rcx
addq %rdx, %rbx
cmpq $0x4, %rcx
jne 0x65e9d
xorl %ecx, %ecx
movq $0x0, -0x68(%rbp,%rcx,8)
incq %rcx
cmpq $0x8, %rcx
jne 0x65ec3
leaq -0x68(%rbp), %rcx
xorl $0x1, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| blst_scalar_from_be_bytes:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
lea eax, [rdx-1]
and eax, 1Fh
xor ecx, ecx
loc_65D8E:
mov [rbp+rcx*8+var_68], 0
inc rcx
cmp rcx, 4
jnz short loc_65D8E
lea r13, [rax+1]
lea rcx, [rbp+var_68]
xor ecx, ecx
mov rdx, r15
loc_65DAD:
shl rcx, 8
movzx esi, byte ptr [rdx]
inc rdx
or rcx, rsi
mov rsi, rax
and rsi, 0FFFFFFFFFFFFFFF8h
mov [rbp+rsi+var_68], rcx
add rax, 0FFFFFFFFFFFFFFFFh
jb short loc_65DAD
mov r8, 0FFFFFFFEFFFFFFFFh
lea rsi, BLS12_381_rRR
lea rcx, BLS12_381_r
lea rdi, [rbp+var_68]
mov rdx, rdi
call mul_mont_sparse_256
sub r14, r13
jz short loc_65E69
lea r12, [rbp+var_68]
loc_65DF9:
add r15, r13
mov eax, 1Fh
xor ecx, ecx
mov rdx, r15
loc_65E06:
shl rcx, 8
movzx esi, byte ptr [rdx]
inc rdx
or rcx, rsi
mov rsi, rax
and rsi, 0FFFFFFFFFFFFFFF8h
mov [rbp+rsi+var_48], rcx
add rax, 0FFFFFFFFFFFFFFFFh
jb short loc_65E06
mov rdi, r12
mov rsi, r12
lea rdx, [rbp+var_48]
lea r13, BLS12_381_r
mov rcx, r13
call add_mod_256
mov rdi, r12
lea rsi, BLS12_381_rRR
mov rdx, r12
mov rcx, r13
mov r8, 0FFFFFFFEFFFFFFFFh
call mul_mont_sparse_256
mov r13d, 20h ; ' '
add r14, 0FFFFFFFFFFFFFFE0h
jnz short loc_65DF9
loc_65E69:
lea rdx, BLS12_381_r
lea r14, [rbp+var_68]
mov rdi, r14
mov rsi, r14
mov rcx, 0FFFFFFFEFFFFFFFFh
call from_mont_256
mov esi, 20h ; ' '
mov rdi, r14
call vec_is_zero_16x
cmp r14, rbx
jz short loc_65EC1
xor ecx, ecx
loc_65E9D:
mov rsi, [rbp+rcx*8+var_68]
xor edx, edx
loc_65EA4:
mov [rbx+rdx], sil
inc rdx
shr rsi, 8
cmp rdx, 8
jnz short loc_65EA4
inc rcx
add rbx, rdx
cmp rcx, 4
jnz short loc_65E9D
loc_65EC1:
xor ecx, ecx
loc_65EC3:
mov [rbp+rcx*8+var_68], 0
inc rcx
cmp rcx, 8
jnz short loc_65EC3
lea rcx, [rbp+var_68]
xor eax, 1
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long blst_scalar_from_be_bytes(_QWORD *a1, unsigned __int8 *a2, long long a3)
{
unsigned __int8 *v4; // r15
_QWORD *v5; // rbx
long long v6; // rax
long long i; // rcx
long long v8; // r13
long long v9; // rcx
unsigned __int8 *v10; // rdx
long long v11; // rsi
bool v12; // cf
long long j; // r14
long long v14; // rax
long long v15; // rcx
unsigned __int8 *v16; // rdx
long long v17; // rsi
int is_zero_16x; // eax
long long k; // rcx
unsigned long long v20; // rsi
long long m; // rdx
long long n; // rcx
_QWORD v24[4]; // [rsp+8h] [rbp-68h] BYREF
_QWORD v25[9]; // [rsp+28h] [rbp-48h] BYREF
v4 = a2;
v5 = a1;
v6 = ((_BYTE)a3 - 1) & 0x1F;
for ( i = 0LL; i != 4; ++i )
v24[i] = 0LL;
v8 = v6 + 1;
v9 = 0LL;
v10 = a2;
do
{
v11 = *v10++;
v9 = v11 | (v9 << 8);
*(_QWORD *)((char *)v24 + (v6 & 0xFFFFFFFFFFFFFFF8LL)) = v9;
v12 = v6-- != 0;
}
while ( v12 );
mul_mont_sparse_256(v24, &BLS12_381_rRR, v24, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL);
for ( j = a3 - v8; j; j -= 32LL )
{
v4 += v8;
v14 = 31LL;
v15 = 0LL;
v16 = v4;
do
{
v17 = *v16++;
v15 = v17 | (v15 << 8);
*(_QWORD *)((char *)v25 + (v14 & 0xFFFFFFFFFFFFFFF8LL)) = v15;
v12 = v14-- != 0;
}
while ( v12 );
add_mod_256(v24, v24, v25, &BLS12_381_r);
mul_mont_sparse_256(v24, &BLS12_381_rRR, v24, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL);
v8 = 32LL;
}
from_mont_256(v24, v24, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL);
is_zero_16x = vec_is_zero_16x(v24, 32LL);
if ( v24 != a1 )
{
for ( k = 0LL; k != 4; ++k )
{
v20 = v24[k];
for ( m = 0LL; m != 8; ++m )
{
*((_BYTE *)v5 + m) = v20;
v20 >>= 8;
}
++v5;
}
}
for ( n = 0LL; n != 8; ++n )
v24[n] = 0LL;
return is_zero_16x ^ 1u;
}
| blst_scalar_from_be_bytes:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
LEA EAX,[RDX + -0x1]
AND EAX,0x1f
XOR ECX,ECX
LAB_00165d8e:
MOV qword ptr [RBP + RCX*0x8 + -0x68],0x0
INC RCX
CMP RCX,0x4
JNZ 0x00165d8e
LEA R13,[RAX + 0x1]
LEA RCX,[RBP + -0x68]
XOR ECX,ECX
MOV RDX,R15
LAB_00165dad:
SHL RCX,0x8
MOVZX ESI,byte ptr [RDX]
INC RDX
OR RCX,RSI
MOV RSI,RAX
AND RSI,-0x8
MOV qword ptr [RBP + RSI*0x1 + -0x68],RCX
ADD RAX,-0x1
JC 0x00165dad
MOV R8,-0x100000001
LEA RSI,[0x18cf50]
LEA RCX,[0x18ca40]
LEA RDI,[RBP + -0x68]
MOV RDX,RDI
CALL 0x00176040
SUB R14,R13
JZ 0x00165e69
LEA R12,[RBP + -0x68]
LAB_00165df9:
ADD R15,R13
MOV EAX,0x1f
XOR ECX,ECX
MOV RDX,R15
LAB_00165e06:
SHL RCX,0x8
MOVZX ESI,byte ptr [RDX]
INC RDX
OR RCX,RSI
MOV RSI,RAX
AND RSI,-0x8
MOV qword ptr [RBP + RSI*0x1 + -0x48],RCX
ADD RAX,-0x1
JC 0x00165e06
MOV RDI,R12
MOV RSI,R12
LEA RDX,[RBP + -0x48]
LEA R13,[0x18ca40]
MOV RCX,R13
CALL 0x00176740
MOV RDI,R12
LEA RSI,[0x18cf50]
MOV RDX,R12
MOV RCX,R13
MOV R8,-0x100000001
CALL 0x00176040
MOV R13D,0x20
ADD R14,-0x20
JNZ 0x00165df9
LAB_00165e69:
LEA RDX,[0x18ca40]
LEA R14,[RBP + -0x68]
MOV RDI,R14
MOV RSI,R14
MOV RCX,-0x100000001
CALL 0x00176460
MOV ESI,0x20
MOV RDI,R14
CALL 0x00170940
CMP R14,RBX
JZ 0x00165ec1
XOR ECX,ECX
LAB_00165e9d:
MOV RSI,qword ptr [RBP + RCX*0x8 + -0x68]
XOR EDX,EDX
LAB_00165ea4:
MOV byte ptr [RBX + RDX*0x1],SIL
INC RDX
SHR RSI,0x8
CMP RDX,0x8
JNZ 0x00165ea4
INC RCX
ADD RBX,RDX
CMP RCX,0x4
JNZ 0x00165e9d
LAB_00165ec1:
XOR ECX,ECX
LAB_00165ec3:
MOV qword ptr [RBP + RCX*0x8 + -0x68],0x0
INC RCX
CMP RCX,0x8
JNZ 0x00165ec3
LEA RCX,[RBP + -0x68]
XOR EAX,0x1
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
uint blst_scalar_from_be_bytes(ulong *param_1,byte *param_2,long param_3)
{
byte bVar1;
uint uVar2;
ulong uVar3;
long lVar4;
ulong uVar5;
byte *pbVar6;
long lVar7;
bool bVar8;
ulong local_70 [8];
uVar3 = (ulong)((int)param_3 - 1U & 0x1f);
lVar4 = 0;
do {
local_70[lVar4] = 0;
lVar4 = lVar4 + 1;
} while (lVar4 != 4);
lVar4 = uVar3 + 1;
uVar5 = 0;
pbVar6 = param_2;
do {
bVar1 = *pbVar6;
pbVar6 = pbVar6 + 1;
uVar5 = uVar5 << 8 | (ulong)bVar1;
*(ulong *)((long)local_70 + (uVar3 & 0xfffffffffffffff8)) = uVar5;
bVar8 = uVar3 != 0;
uVar3 = uVar3 - 1;
} while (bVar8);
mul_mont_sparse_256(local_70,BLS12_381_rRR,local_70,BLS12_381_r,0xfffffffeffffffff);
param_3 = param_3 - lVar4;
if (param_3 != 0) {
do {
param_2 = param_2 + lVar4;
uVar3 = 0x1f;
uVar5 = 0;
pbVar6 = param_2;
do {
bVar1 = *pbVar6;
pbVar6 = pbVar6 + 1;
uVar5 = uVar5 << 8 | (ulong)bVar1;
*(ulong *)((long)local_70 + (uVar3 & 0xfffffffffffffff8) + 0x20) = uVar5;
bVar8 = uVar3 != 0;
uVar3 = uVar3 - 1;
} while (bVar8);
add_mod_256(local_70,local_70,local_70 + 4,BLS12_381_r);
mul_mont_sparse_256(local_70,BLS12_381_rRR,local_70,BLS12_381_r,0xfffffffeffffffff);
lVar4 = 0x20;
param_3 = param_3 + -0x20;
} while (param_3 != 0);
}
from_mont_256(local_70,local_70,BLS12_381_r);
uVar2 = vec_is_zero_16x(local_70,0x20);
if (local_70 != param_1) {
lVar4 = 0;
do {
uVar3 = local_70[lVar4];
lVar7 = 0;
do {
*(char *)((long)param_1 + lVar7) = (char)uVar3;
lVar7 = lVar7 + 1;
uVar3 = uVar3 >> 8;
} while (lVar7 != 8);
lVar4 = lVar4 + 1;
param_1 = param_1 + 1;
} while (lVar4 != 4);
}
lVar4 = 0;
do {
local_70[lVar4] = 0;
lVar4 = lVar4 + 1;
} while (lVar4 != 8);
return uVar2 ^ 1;
}
| |
40,589 | purge_host(PFS_thread*, PFS_host*) | eloqsql/storage/perfschema/pfs_host.cc | void purge_host(PFS_thread *thread, PFS_host *host)
{
LF_PINS *pins= get_host_hash_pins(thread);
if (unlikely(pins == NULL))
return;
PFS_host **entry;
entry= reinterpret_cast<PFS_host**>
(lf_hash_search(&host_hash, pins,
host->m_key.m_hash_key, host->m_key.m_key_length));
if (entry && (entry != MY_ERRPTR))
{
assert(*entry == host);
if (host->get_refcount() == 0)
{
lf_hash_delete(&host_hash, pins,
host->m_key.m_hash_key, host->m_key.m_key_length);
host->aggregate(false);
global_host_container.deallocate(host);
}
}
lf_hash_search_unpin(pins);
} | O0 | cpp | purge_host(PFS_thread*, PFS_host*):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x56a30
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x56e14
jmp 0x56eb9
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rdx
addq $0x7e4, %rdx # imm = 0x7E4
movq -0x10(%rbp), %rax
movl 0x8e4(%rax), %ecx
leaq 0x3b72c4(%rip), %rdi # 0x40e0f8
callq 0x5d8b0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x56e9f
movl $0x1, %eax
cmpq %rax, -0x20(%rbp)
je 0x56e9f
movq -0x10(%rbp), %rdi
callq 0x57720
cmpl $0x0, %eax
jne 0x56e9d
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rdx
addq $0x7e4, %rdx # imm = 0x7E4
movq -0x10(%rbp), %rax
movl 0x8e4(%rax), %ecx
leaq 0x3b727b(%rip), %rdi # 0x40e0f8
callq 0x5ce90
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x56b20
movq -0x10(%rbp), %rsi
leaq 0x3ac4f0(%rip), %rdi # 0x403388
callq 0x575c0
jmp 0x56e9f
jmp 0x56ea1
jmp 0x56ea3
jmp 0x56ea5
movq -0x18(%rbp), %rcx
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
xchgq %rax, 0x10(%rcx)
addq $0x30, %rsp
popq %rbp
retq
nop
| _Z10purge_hostP10PFS_threadP8PFS_host:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_8]; PFS_thread *
call _ZL18get_host_hash_pinsP10PFS_thread; get_host_hash_pins(PFS_thread *)
mov [rbp+var_18], rax
cmp [rbp+var_18], 0
setz al
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_56E14
jmp loc_56EB9
loc_56E14:
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_10]
add rdx, 7E4h
mov rax, [rbp+var_10]
mov ecx, [rax+8E4h]
lea rdi, host_hash
call lf_hash_search
mov [rbp+var_20], rax
cmp [rbp+var_20], 0
jz short loc_56E9F
mov eax, 1
cmp [rbp+var_20], rax
jz short loc_56E9F
mov rdi, [rbp+var_10]; this
call _ZN8PFS_host12get_refcountEv; PFS_host::get_refcount(void)
cmp eax, 0
jnz short loc_56E9D
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_10]
add rdx, 7E4h
mov rax, [rbp+var_10]
mov ecx, [rax+8E4h]
lea rdi, host_hash
call lf_hash_delete
mov rdi, [rbp+var_10]; this
xor esi, esi; bool
call _ZN8PFS_host9aggregateEb; PFS_host::aggregate(bool)
mov rsi, [rbp+var_10]
lea rdi, global_host_container
call _ZN29PFS_buffer_scalable_containerI8PFS_hostLi128ELi128E14PFS_host_array18PFS_host_allocatorE10deallocateEPS0_; PFS_buffer_scalable_container<PFS_host,128,128,PFS_host_array,PFS_host_allocator>::deallocate(PFS_host*)
loc_56E9D:
jmp short $+2
loc_56E9F:
jmp short $+2
loc_56EA1:
jmp short $+2
loc_56EA3:
jmp short $+2
loc_56EA5:
mov rcx, [rbp+var_18]
mov [rbp+var_28], 0
mov rax, [rbp+var_28]
xchg rax, [rcx+10h]
loc_56EB9:
add rsp, 30h
pop rbp
retn
| long long purge_host(PFS_thread *a1, PFS_host *a2)
{
long long result; // rax
long long host_hash_pins; // [rsp+18h] [rbp-18h]
host_hash_pins = get_host_hash_pins(a1);
result = host_hash_pins == 0;
if ( host_hash_pins )
{
if ( (unsigned long long)lf_hash_search(&host_hash, host_hash_pins, (char *)a2 + 2020, *((unsigned int *)a2 + 569)) >= 2
&& !(unsigned int)PFS_host::get_refcount(a2) )
{
lf_hash_delete(&host_hash, host_hash_pins, (char *)a2 + 2020, *((unsigned int *)a2 + 569));
PFS_host::aggregate(a2, 0);
PFS_buffer_scalable_container<PFS_host,128,128,PFS_host_array,PFS_host_allocator>::deallocate(
global_host_container,
a2);
}
return _InterlockedExchange64((volatile long long *)(host_hash_pins + 16), 0LL);
}
return result;
}
| purge_host:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00156a30
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x00156e14
JMP 0x00156eb9
LAB_00156e14:
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x10]
ADD RDX,0x7e4
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x8e4]
LEA RDI,[0x50e0f8]
CALL 0x0015d8b0
MOV qword ptr [RBP + -0x20],RAX
CMP qword ptr [RBP + -0x20],0x0
JZ 0x00156e9f
MOV EAX,0x1
CMP qword ptr [RBP + -0x20],RAX
JZ 0x00156e9f
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00157720
CMP EAX,0x0
JNZ 0x00156e9d
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x10]
ADD RDX,0x7e4
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x8e4]
LEA RDI,[0x50e0f8]
CALL 0x0015ce90
MOV RDI,qword ptr [RBP + -0x10]
XOR ESI,ESI
CALL 0x00156b20
MOV RSI,qword ptr [RBP + -0x10]
LEA RDI,[0x503388]
CALL 0x001575c0
LAB_00156e9d:
JMP 0x00156e9f
LAB_00156e9f:
JMP 0x00156ea1
LAB_00156ea1:
JMP 0x00156ea3
LAB_00156ea3:
JMP 0x00156ea5
LAB_00156ea5:
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x28],0x0
MOV RAX,qword ptr [RBP + -0x28]
XCHG qword ptr [RCX + 0x10],RAX
LAB_00156eb9:
ADD RSP,0x30
POP RBP
RET
|
/* purge_host(PFS_thread*, PFS_host*) */
ulong purge_host(PFS_thread *param_1,PFS_host *param_2)
{
int iVar1;
long lVar2;
ulong uVar3;
long lVar4;
lVar2 = get_host_hash_pins(param_1);
uVar3 = (ulong)(lVar2 == 0);
if (lVar2 != 0) {
lVar4 = lf_hash_search(host_hash,lVar2,param_2 + 0x7e4,*(int4 *)(param_2 + 0x8e4));
if (((lVar4 != 0) && (lVar4 != 1)) && (iVar1 = PFS_host::get_refcount(param_2), iVar1 == 0)) {
lf_hash_delete(host_hash,lVar2,param_2 + 0x7e4,*(int4 *)(param_2 + 0x8e4));
PFS_host::aggregate(param_2,false);
PFS_buffer_scalable_container<PFS_host,128,128,PFS_host_array,PFS_host_allocator>::deallocate
((PFS_buffer_scalable_container<PFS_host,128,128,PFS_host_array,PFS_host_allocator>
*)&global_host_container,param_2);
}
LOCK();
uVar3 = *(ulong *)(lVar2 + 0x10);
*(ulong *)(lVar2 + 0x10) = 0;
UNLOCK();
}
return uVar3;
}
| |
40,590 | ma_unlock_key_del | eloqsql/storage/maria/ma_key_recover.c | void _ma_unlock_key_del(MARIA_HA *info)
{
DBUG_ASSERT(info->key_del_used);
if (info->key_del_used == 1) /* Ignore insert-with-append */
{
MARIA_SHARE *share= info->s;
mysql_mutex_lock(&share->key_del_lock);
share->key_del_used= 0;
share->state.key_del= share->key_del_current;
mysql_mutex_unlock(&share->key_del_lock);
mysql_cond_signal(&share->key_del_cond);
}
info->key_del_used= 0;
} | O3 | c | ma_unlock_key_del:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x1, 0x67e(%rdi)
jne 0x5be05
movq (%rbx), %r14
leaq 0x938(%r14), %r15
cmpq $0x0, 0x978(%r14)
jne 0x5be17
movq %r15, %rdi
callq 0x29220
movb $0x0, 0x7e9(%r14)
movq 0x700(%r14), %rax
movq %rax, 0x120(%r14)
movq 0x978(%r14), %rdi
testq %rdi, %rdi
jne 0x5be2d
movq %r15, %rdi
callq 0x291e0
movq 0x9b0(%r14), %rdi
addq $0x980, %r14 # imm = 0x980
testq %rdi, %rdi
jne 0x5be3f
movq %r14, %rdi
callq 0x295c0
movb $0x0, 0x67e(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x80005(%rip), %rsi # 0xdbe23
movq %r15, %rdi
movl $0x59a, %edx # imm = 0x59A
callq 0x2eb8f
jmp 0x5bdc0
leaq 0x32c28c(%rip), %rax # 0x3880c0
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x5bde2
leaq 0x32c27a(%rip), %rax # 0x3880c0
movq (%rax), %rax
callq *0x170(%rax)
jmp 0x5bdfd
nopl (%rax)
| _ma_unlock_key_del:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
cmp byte ptr [rdi+67Eh], 1
jnz short loc_5BE05
mov r14, [rbx]
lea r15, [r14+938h]
cmp qword ptr [r14+978h], 0
jnz short loc_5BE17
mov rdi, r15
call _pthread_mutex_lock
loc_5BDC0:
mov byte ptr [r14+7E9h], 0
mov rax, [r14+700h]
mov [r14+120h], rax
mov rdi, [r14+978h]
test rdi, rdi
jnz short loc_5BE2D
loc_5BDE2:
mov rdi, r15
call _pthread_mutex_unlock
mov rdi, [r14+9B0h]
add r14, 980h
test rdi, rdi
jnz short loc_5BE3F
loc_5BDFD:
mov rdi, r14
call _pthread_cond_signal
loc_5BE05:
mov byte ptr [rbx+67Eh], 0
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_5BE17:
lea rsi, aWorkspaceLlm4b_31; "/workspace/llm4binary/github2025/eloqsq"...
mov rdi, r15
mov edx, 59Ah
call psi_mutex_lock
jmp short loc_5BDC0
loc_5BE2D:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_5BDE2
loc_5BE3F:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+170h]
jmp short loc_5BDFD
| long long ma_unlock_key_del(_BYTE *a1)
{
long long v2; // r14
long long v3; // r15
long long v4; // rdi
long long v5; // rdi
long long v6; // r14
long long result; // rax
if ( a1[1662] == 1 )
{
v2 = *(_QWORD *)a1;
v3 = *(_QWORD *)a1 + 2360LL;
if ( *(_QWORD *)(*(_QWORD *)a1 + 2424LL) )
psi_mutex_lock(
*(_QWORD *)a1 + 2360LL,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_key_recover.c",
0x59Au);
else
pthread_mutex_lock(*(_QWORD *)a1 + 2360LL);
*(_BYTE *)(v2 + 2025) = 0;
*(_QWORD *)(v2 + 288) = *(_QWORD *)(v2 + 1792);
v4 = *(_QWORD *)(v2 + 2424);
if ( v4 )
((void ( *)(long long))PSI_server[44])(v4);
pthread_mutex_unlock(v3);
v5 = *(_QWORD *)(v2 + 2480);
v6 = v2 + 2432;
if ( v5 )
((void ( *)(long long))PSI_server[46])(v5);
result = pthread_cond_signal(v6);
}
a1[1662] = 0;
return result;
}
| _ma_unlock_key_del:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
CMP byte ptr [RDI + 0x67e],0x1
JNZ 0x0015be05
MOV R14,qword ptr [RBX]
LEA R15,[R14 + 0x938]
CMP qword ptr [R14 + 0x978],0x0
JNZ 0x0015be17
MOV RDI,R15
CALL 0x00129220
LAB_0015bdc0:
MOV byte ptr [R14 + 0x7e9],0x0
MOV RAX,qword ptr [R14 + 0x700]
MOV qword ptr [R14 + 0x120],RAX
MOV RDI,qword ptr [R14 + 0x978]
TEST RDI,RDI
JNZ 0x0015be2d
LAB_0015bde2:
MOV RDI,R15
CALL 0x001291e0
MOV RDI,qword ptr [R14 + 0x9b0]
ADD R14,0x980
TEST RDI,RDI
JNZ 0x0015be3f
LAB_0015bdfd:
MOV RDI,R14
CALL 0x001295c0
LAB_0015be05:
MOV byte ptr [RBX + 0x67e],0x0
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0015be17:
LEA RSI,[0x1dbe23]
MOV RDI,R15
MOV EDX,0x59a
CALL 0x0012eb8f
JMP 0x0015bdc0
LAB_0015be2d:
LEA RAX,[0x4880c0]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x0015bde2
LAB_0015be3f:
LEA RAX,[0x4880c0]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x170]
JMP 0x0015bdfd
|
void _ma_unlock_key_del(long *param_1)
{
pthread_mutex_t *__mutex;
long lVar1;
if (*(char *)((long)param_1 + 0x67e) == '\x01') {
lVar1 = *param_1;
__mutex = (pthread_mutex_t *)(lVar1 + 0x938);
if (*(long *)(lVar1 + 0x978) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,
"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_key_recover.c",0x59a
);
}
*(int1 *)(lVar1 + 0x7e9) = 0;
*(int8 *)(lVar1 + 0x120) = *(int8 *)(lVar1 + 0x700);
if (*(long *)(lVar1 + 0x978) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
if (*(long *)(lVar1 + 0x9b0) != 0) {
(**(code **)(PSI_server + 0x170))();
}
pthread_cond_signal((pthread_cond_t *)(lVar1 + 0x980));
}
*(int1 *)((long)param_1 + 0x67e) = 0;
return;
}
| |
40,591 | stbtt__cff_get_index | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-truetype.h | static stbtt__buf stbtt__cff_get_index(stbtt__buf *b)
{
int count, start, offsize;
start = b->cursor;
count = stbtt__buf_get16(b);
if (count) {
offsize = stbtt__buf_get8(b);
STBTT_assert(offsize >= 1 && offsize <= 4);
stbtt__buf_skip(b, offsize * count);
stbtt__buf_skip(b, stbtt__buf_get(b, offsize) - 1);
}
return stbtt__buf_range(b, start, b->cursor - start);
} | O0 | c | stbtt__cff_get_index:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movl $0x2, %esi
callq 0x81b0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x7e5b
movq -0x18(%rbp), %rdi
callq 0x7d70
movzbl %al, %eax
movl %eax, -0x24(%rbp)
cmpl $0x1, -0x24(%rbp)
jl 0x7e0a
cmpl $0x4, -0x24(%rbp)
jg 0x7e0a
jmp 0x7e29
leaq 0x33735(%rip), %rdi # 0x3b546
leaq 0x33652(%rip), %rsi # 0x3b46a
movl $0x4ad, %edx # imm = 0x4AD
leaq 0x3373f(%rip), %rcx # 0x3b563
callq 0x30b0
movq -0x18(%rbp), %rdi
movl -0x24(%rbp), %esi
imull -0x1c(%rbp), %esi
callq 0x7cc0
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
movl -0x24(%rbp), %esi
callq 0x81b0
movq -0x30(%rbp), %rdi
movl %eax, %esi
subl $0x1, %esi
callq 0x7cc0
movq -0x18(%rbp), %rdi
movl -0x20(%rbp), %esi
movl 0x8(%rdi), %edx
subl %esi, %edx
callq 0x8110
movq %rax, -0x10(%rbp)
movq %rdx, -0x8(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdx
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| stbtt__cff_get_index:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_18], rdi
mov rax, [rbp+var_18]
mov eax, [rax+8]
mov [rbp+var_20], eax
mov rdi, [rbp+var_18]
mov esi, 2
call stbtt__buf_get
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 0
jz short loc_7E5B
mov rdi, [rbp+var_18]
call stbtt__buf_get8
movzx eax, al
mov [rbp+var_24], eax
cmp [rbp+var_24], 1
jl short loc_7E0A
cmp [rbp+var_24], 4
jg short loc_7E0A
jmp short loc_7E29
loc_7E0A:
lea rdi, aOffsize1Offsiz; "offsize >= 1 && offsize <= 4"
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov edx, 4ADh
lea rcx, aStbttBufStbttC; "stbtt__buf stbtt__cff_get_index(stbtt__"...
call ___assert_fail
loc_7E29:
mov rdi, [rbp+var_18]
mov esi, [rbp+var_24]
imul esi, [rbp+var_1C]
call stbtt__buf_skip
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
mov rdi, [rbp+var_18]
mov esi, [rbp+var_24]
call stbtt__buf_get
mov rdi, [rbp+var_30]
mov esi, eax
sub esi, 1
call stbtt__buf_skip
loc_7E5B:
mov rdi, [rbp+var_18]
mov esi, [rbp+var_20]
mov edx, [rdi+8]
sub edx, esi
call stbtt__buf_range
mov [rbp+var_10], rax
mov [rbp+var_8], rdx
mov rax, [rbp+var_10]
mov rdx, [rbp+var_8]
add rsp, 30h
pop rbp
retn
| long long stbtt__cff_get_index(long long a1)
{
unsigned __int8 v1; // al
int v2; // eax
unsigned int v4; // [rsp+Ch] [rbp-24h]
unsigned int v5; // [rsp+10h] [rbp-20h]
int v6; // [rsp+14h] [rbp-1Ch]
v5 = *(_DWORD *)(a1 + 8);
v6 = stbtt__buf_get(a1, 2LL);
if ( v6 )
{
v1 = stbtt__buf_get8((long long *)a1);
v4 = v1;
if ( !v1 || v1 > 4u )
__assert_fail(
"offsize >= 1 && offsize <= 4",
"/workspace/llm4binary/github/2025_star3/dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-truetype.h",
1197LL,
"stbtt__buf stbtt__cff_get_index(stbtt__buf *)");
stbtt__buf_skip(a1, v6 * v1);
v2 = stbtt__buf_get(a1, v4);
stbtt__buf_skip(a1, v2 - 1);
}
return stbtt__buf_range(a1, v5, *(_DWORD *)(a1 + 8) - v5);
}
| stbtt__cff_get_index:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x18],RDI
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x20],EAX
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,0x2
CALL 0x001081b0
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x00107e5b
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00107d70
MOVZX EAX,AL
MOV dword ptr [RBP + -0x24],EAX
CMP dword ptr [RBP + -0x24],0x1
JL 0x00107e0a
CMP dword ptr [RBP + -0x24],0x4
JG 0x00107e0a
JMP 0x00107e29
LAB_00107e0a:
LEA RDI,[0x13b546]
LEA RSI,[0x13b46a]
MOV EDX,0x4ad
LEA RCX,[0x13b563]
CALL 0x001030b0
LAB_00107e29:
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,dword ptr [RBP + -0x24]
IMUL ESI,dword ptr [RBP + -0x1c]
CALL 0x00107cc0
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,dword ptr [RBP + -0x24]
CALL 0x001081b0
MOV RDI,qword ptr [RBP + -0x30]
MOV ESI,EAX
SUB ESI,0x1
CALL 0x00107cc0
LAB_00107e5b:
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,dword ptr [RBP + -0x20]
MOV EDX,dword ptr [RDI + 0x8]
SUB EDX,ESI
CALL 0x00108110
MOV qword ptr [RBP + -0x10],RAX
MOV qword ptr [RBP + -0x8],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
int1 [16] stbtt__cff_get_index(long param_1)
{
int iVar1;
int1 auVar2 [16];
byte bVar3;
int iVar4;
uint uVar5;
iVar1 = *(int *)(param_1 + 8);
iVar4 = stbtt__buf_get(param_1,2);
if (iVar4 != 0) {
bVar3 = stbtt__buf_get8(param_1);
uVar5 = (uint)bVar3;
if ((uVar5 == 0) || (4 < uVar5)) {
/* WARNING: Subroutine does not return */
__assert_fail("offsize >= 1 && offsize <= 4",
"/workspace/llm4binary/github/2025_star3/dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-truetype.h"
,0x4ad,"stbtt__buf stbtt__cff_get_index(stbtt__buf *)");
}
stbtt__buf_skip(param_1,uVar5 * iVar4);
iVar4 = stbtt__buf_get(param_1,uVar5);
stbtt__buf_skip(param_1,iVar4 + -1);
}
auVar2 = stbtt__buf_range(param_1,iVar1,*(int *)(param_1 + 8) - iVar1);
return auVar2;
}
| |
40,592 | stbi__jpeg_test | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image.h | static int stbi__jpeg_test(stbi__context *s)
{
int r;
stbi__jpeg* j = (stbi__jpeg*)stbi__malloc(sizeof(stbi__jpeg));
if (!j) return stbi__err("outofmem", "Out of memory");
memset(j, 0, sizeof(stbi__jpeg));
j->s = s;
stbi__setup_jpeg(j);
r = stbi__decode_jpeg_header(j, STBI__SCAN_type);
stbi__rewind(s);
STBI_FREE(j);
return r;
} | O1 | c | stbi__jpeg_test:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x4888, %edi # imm = 0x4888
callq 0x31b0
testq %rax, %rax
je 0x127f2
movq %rax, %r14
movl $0x4888, %edx # imm = 0x4888
movq %rax, %rdi
xorl %esi, %esi
callq 0x30d0
movq %rbx, (%r14)
leaq 0x4d51(%rip), %rax # 0x174c2
movq %rax, 0x4870(%r14)
leaq 0x54ac(%rip), %rax # 0x17c2b
movq %rax, 0x4878(%r14)
leaq 0x569e(%rip), %rax # 0x17e2b
movq %rax, 0x4880(%r14)
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %rax, 0x4848(%r14)
movb $-0x1, 0x4828(%r14)
movq %r14, %rdi
callq 0x17fc0
movl $0x1, %ebp
cmpb $-0x28, %al
je 0x127da
movq %fs:0x0, %rax
leaq 0x13fae(%rip), %rcx # 0x2677f
movq %rcx, -0x8(%rax)
xorl %ebp, %ebp
movups 0xd0(%rbx), %xmm0
movups %xmm0, 0xc0(%rbx)
movq %r14, %rdi
callq 0x32c0
jmp 0x1280e
movq %fs:0x0, %rax
leaq 0x13aae(%rip), %rcx # 0x262b3
movq %rcx, -0x8(%rax)
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
| stbi__jpeg_test:
push rbp
push r14
push rbx
mov rbx, rdi
mov edi, 4888h
call _malloc
test rax, rax
jz loc_127F2
mov r14, rax
mov edx, 4888h
mov rdi, rax
xor esi, esi
call _memset
mov [r14], rbx
lea rax, stbi__idct_simd
mov [r14+4870h], rax
lea rax, stbi__YCbCr_to_RGB_simd
mov [r14+4878h], rax
lea rax, stbi__resample_row_hv_2_simd
mov [r14+4880h], rax
mov rax, 0FFFFFFFF00000000h
mov [r14+4848h], rax
mov byte ptr [r14+4828h], 0FFh
mov rdi, r14
call stbi__get_marker
mov ebp, 1
cmp al, 0D8h
jz short loc_127DA
mov rax, fs:0
lea rcx, aNoSoi; "no SOI"
mov [rax-8], rcx
xor ebp, ebp
loc_127DA:
movups xmm0, xmmword ptr [rbx+0D0h]
movups xmmword ptr [rbx+0C0h], xmm0
mov rdi, r14
call free
jmp short loc_1280E
loc_127F2:
mov rax, fs:0
lea rcx, aOutofmem; "outofmem"
mov [rax-8], rcx
xor ebp, ebp
loc_1280E:
mov eax, ebp
pop rbx
pop r14
pop rbp
retn
| long long stbi__jpeg_test(long long a1)
{
long long v1; // rax
long long v2; // r14
unsigned int v3; // ebp
v1 = malloc(18568LL);
if ( v1 )
{
v2 = v1;
memset(v1, 0LL, 18568LL);
*(_QWORD *)v2 = a1;
*(_QWORD *)(v2 + 18544) = stbi__idct_simd;
*(_QWORD *)(v2 + 18552) = stbi__YCbCr_to_RGB_simd;
*(_QWORD *)(v2 + 18560) = stbi__resample_row_hv_2_simd;
*(_QWORD *)(v2 + 18504) = 0xFFFFFFFF00000000LL;
*(_BYTE *)(v2 + 18472) = -1;
v3 = 1;
if ( (unsigned __int8)stbi__get_marker(v2) != 0xD8 )
{
*(_QWORD *)(__readfsqword(0) - 8) = "no SOI";
v3 = 0;
}
*(_OWORD *)(a1 + 192) = *(_OWORD *)(a1 + 208);
free(v2);
}
else
{
*(_QWORD *)(__readfsqword(0) - 8) = "outofmem";
return 0;
}
return v3;
}
| stbi__jpeg_test:
PUSH RBP
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV EDI,0x4888
CALL 0x001031b0
TEST RAX,RAX
JZ 0x001127f2
MOV R14,RAX
MOV EDX,0x4888
MOV RDI,RAX
XOR ESI,ESI
CALL 0x001030d0
MOV qword ptr [R14],RBX
LEA RAX,[0x1174c2]
MOV qword ptr [R14 + 0x4870],RAX
LEA RAX,[0x117c2b]
MOV qword ptr [R14 + 0x4878],RAX
LEA RAX,[0x117e2b]
MOV qword ptr [R14 + 0x4880],RAX
MOV RAX,-0x100000000
MOV qword ptr [R14 + 0x4848],RAX
MOV byte ptr [R14 + 0x4828],0xff
MOV RDI,R14
CALL 0x00117fc0
MOV EBP,0x1
CMP AL,0xd8
JZ 0x001127da
MOV RAX,qword ptr FS:[0x0]
LEA RCX,[0x12677f]
MOV qword ptr [RAX + -0x8],RCX
XOR EBP,EBP
LAB_001127da:
MOVUPS XMM0,xmmword ptr [RBX + 0xd0]
MOVUPS xmmword ptr [RBX + 0xc0],XMM0
MOV RDI,R14
CALL 0x001032c0
JMP 0x0011280e
LAB_001127f2:
MOV RAX,qword ptr FS:[0x0]
LEA RCX,[0x1262b3]
MOV qword ptr [RAX + -0x8],RCX
XOR EBP,EBP
LAB_0011280e:
MOV EAX,EBP
POP RBX
POP R14
POP RBP
RET
|
bool stbi__jpeg_test(long param_1)
{
char cVar1;
long *__s;
long *in_FS_OFFSET;
bool bVar2;
__s = (long *)malloc(0x4888);
if (__s == (long *)0x0) {
*(char **)(*in_FS_OFFSET + -8) = "outofmem";
bVar2 = false;
}
else {
memset(__s,0,0x4888);
*__s = param_1;
__s[0x90e] = (long)stbi__idct_simd;
__s[0x90f] = (long)stbi__YCbCr_to_RGB_simd;
__s[0x910] = (long)stbi__resample_row_hv_2_simd;
__s[0x909] = -0x100000000;
*(int1 *)(__s + 0x905) = 0xff;
cVar1 = stbi__get_marker(__s);
bVar2 = cVar1 == -0x28;
if (!bVar2) {
*(char **)(*in_FS_OFFSET + -8) = "no SOI";
}
*(int8 *)(param_1 + 0xc0) = *(int8 *)(param_1 + 0xd0);
*(int8 *)(param_1 + 200) = *(int8 *)(param_1 + 0xd8);
free(__s);
}
return bVar2;
}
| |
40,593 | my_mb_wc_utf8mb4_quick | eloqsql/strings/ctype-utf8.h | static inline int
my_mb_wc_utf8mb4_quick(my_wc_t *pwc, const uchar *s, const uchar *e)
{
uchar c;
if (s >= e)
return MY_CS_TOOSMALL;
c= s[0];
if (c < 0x80)
{
*pwc= c;
return 1;
}
else if (c < 0xc2)
return MY_CS_ILSEQ;
else if (c < 0xe0)
{
if (s + 2 > e) /* We need 2 characters */
return MY_CS_TOOSMALL2;
if (!(IS_CONTINUATION_BYTE(s[1])))
return MY_CS_ILSEQ;
*pwc= UTF8MB2_CODE(c, s[1]);
return 2;
}
else if (c < 0xf0)
{
if (s + 3 > e) /* We need 3 characters */
return MY_CS_TOOSMALL3;
if (!IS_UTF8MB3_STEP2(c, s[1], s[2]))
return MY_CS_ILSEQ;
*pwc= UTF8MB3_CODE(c, s[1], s[2]);
return 3;
}
else if (c < 0xf5)
{
if (s + 4 > e) /* We need 4 characters */
return MY_CS_TOOSMALL4;
if (!IS_UTF8MB4_STEP2(c, s[1], s[2], s[3]))
return MY_CS_ILSEQ;
*pwc= UTF8MB4_CODE(c, s[1], s[2], s[3]);
return 4;
}
return MY_CS_ILSEQ;
} | O3 | c | my_mb_wc_utf8mb4_quick:
pushq %rbp
movq %rsp, %rbp
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rdx, %rsi
jae 0x75434
movzbl (%rsi), %ecx
testb %cl, %cl
js 0x7542d
movl $0x1, %eax
movq %rcx, (%rdi)
jmp 0x75434
cmpb $-0x3e, %cl
jae 0x75436
xorl %eax, %eax
popq %rbp
retq
cmpb $-0x21, %cl
ja 0x7546c
leaq 0x2(%rsi), %r8
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rdx, %r8
ja 0x75434
movzbl 0x1(%rsi), %edx
xorl $0x80, %edx
movl $0x0, %eax
cmpb $0x3f, %dl
ja 0x75434
andl $0x1f, %ecx
shll $0x6, %ecx
orl %edx, %ecx
movl $0x2, %eax
jmp 0x75428
cmpb $-0x11, %cl
ja 0x754ce
leaq 0x3(%rsi), %r8
movl $0xffffff99, %eax # imm = 0xFFFFFF99
cmpq %rdx, %r8
ja 0x75434
movzbl 0x1(%rsi), %edx
cmpb $-0x41, %dl
jg 0x75432
movzbl 0x2(%rsi), %esi
cmpb $-0x41, %sil
jg 0x75432
cmpl $0xe0, %ecx
sete %r8b
cmpb $-0x60, %dl
setb %r9b
movl $0x0, %eax
testb %r9b, %r8b
jne 0x75434
shll $0xc, %ecx
movzwl %cx, %eax
andl $0x3f, %edx
shll $0x6, %edx
orl %eax, %edx
andl $0x3f, %esi
orq %rdx, %rsi
movl $0x3, %eax
movq %rsi, %rcx
jmp 0x75428
cmpb $-0xc, %cl
ja 0x75432
leaq 0x4(%rsi), %r8
movl $0xffffff98, %eax # imm = 0xFFFFFF98
cmpq %rdx, %r8
ja 0x75434
movzbl 0x1(%rsi), %r8d
cmpb $-0x41, %r8b
jg 0x75432
movzbl 0x2(%rsi), %edx
cmpb $-0x41, %dl
jg 0x75432
movzbl 0x3(%rsi), %esi
cmpb $-0x41, %sil
jg 0x75432
cmpl $0xf0, %ecx
sete %al
cmpb $-0x70, %r8b
setb %r9b
testb %r9b, %al
jne 0x75432
cmpl $0xf4, %ecx
sete %r9b
cmpb $-0x70, %r8b
setae %r10b
movl $0x0, %eax
testb %r10b, %r9b
jne 0x75434
andl $0x7, %ecx
shll $0x12, %ecx
andl $0x3f, %r8d
shll $0xc, %r8d
orl %ecx, %r8d
andl $0x3f, %edx
shll $0x6, %edx
orl %r8d, %edx
andl $0x3f, %esi
orq %rdx, %rsi
movl $0x4, %eax
jmp 0x754c6
| my_mb_wc_utf8mb4_quick_0:
push rbp
mov rbp, rsp
mov eax, 0FFFFFF9Bh
cmp rsi, rdx
jnb short loc_75434
movzx ecx, byte ptr [rsi]
test cl, cl
js short loc_7542D
mov eax, 1
loc_75428:
mov [rdi], rcx
jmp short loc_75434
loc_7542D:
cmp cl, 0C2h
jnb short loc_75436
loc_75432:
xor eax, eax
loc_75434:
pop rbp
retn
loc_75436:
cmp cl, 0DFh
ja short loc_7546C
lea r8, [rsi+2]
mov eax, 0FFFFFF9Ah
cmp r8, rdx
ja short loc_75434
movzx edx, byte ptr [rsi+1]
xor edx, 80h
mov eax, 0
cmp dl, 3Fh ; '?'
ja short loc_75434
and ecx, 1Fh
shl ecx, 6
or ecx, edx
mov eax, 2
jmp short loc_75428
loc_7546C:
cmp cl, 0EFh
ja short loc_754CE
lea r8, [rsi+3]
mov eax, 0FFFFFF99h
cmp r8, rdx
ja short loc_75434
movzx edx, byte ptr [rsi+1]
cmp dl, 0BFh
jg short loc_75432
movzx esi, byte ptr [rsi+2]
cmp sil, 0BFh
jg short loc_75432
cmp ecx, 0E0h
setz r8b
cmp dl, 0A0h
setb r9b
mov eax, 0
test r8b, r9b
jnz short loc_75434
shl ecx, 0Ch
movzx eax, cx
and edx, 3Fh
shl edx, 6
or edx, eax
and esi, 3Fh
or rsi, rdx
mov eax, 3
loc_754C6:
mov rcx, rsi
jmp loc_75428
loc_754CE:
cmp cl, 0F4h
ja loc_75432
lea r8, [rsi+4]
mov eax, 0FFFFFF98h
cmp r8, rdx
ja loc_75434
movzx r8d, byte ptr [rsi+1]
cmp r8b, 0BFh
jg loc_75432
movzx edx, byte ptr [rsi+2]
cmp dl, 0BFh
jg loc_75432
movzx esi, byte ptr [rsi+3]
cmp sil, 0BFh
jg loc_75432
cmp ecx, 0F0h
setz al
cmp r8b, 90h
setb r9b
test al, r9b
jnz loc_75432
cmp ecx, 0F4h
setz r9b
cmp r8b, 90h
setnb r10b
mov eax, 0
test r9b, r10b
jnz loc_75434
and ecx, 7
shl ecx, 12h
and r8d, 3Fh
shl r8d, 0Ch
or r8d, ecx
and edx, 3Fh
shl edx, 6
or edx, r8d
and esi, 3Fh
or rsi, rdx
mov eax, 4
jmp loc_754C6
| long long my_mb_wc_utf8mb4_quick_0(unsigned long long *a1, unsigned __int8 *a2, unsigned long long a3)
{
long long result; // rax
unsigned long long v4; // rcx
char v5; // dl
char v6; // si
unsigned long long v7; // rsi
char v8; // r8
char v9; // dl
char v10; // si
result = 4294967195LL;
if ( (unsigned long long)a2 >= a3 )
return result;
v4 = *a2;
if ( (v4 & 0x80u) == 0LL )
{
result = 1LL;
LABEL_4:
*a1 = v4;
return result;
}
if ( (unsigned __int8)v4 < 0xC2u )
return 0LL;
if ( (unsigned __int8)v4 > 0xDFu )
{
if ( (unsigned __int8)v4 > 0xEFu )
{
if ( (unsigned __int8)v4 <= 0xF4u )
{
result = 4294967192LL;
if ( (unsigned long long)(a2 + 4) > a3 )
return result;
v8 = a2[1];
if ( v8 <= -65 )
{
v9 = a2[2];
if ( v9 <= -65 )
{
v10 = a2[3];
if ( v10 <= -65 && ((unsigned __int8)v8 >= 0x90u || (_DWORD)v4 != 240) )
{
result = 0LL;
if ( (unsigned __int8)v8 >= 0x90u && (_DWORD)v4 == 244 )
return result;
v7 = ((v4 & 7) << 18) | ((unsigned __int8)(v8 & 0x3F) << 12) | ((unsigned __int8)(v9 & 0x3F) << 6) | v10 & 0x3F;
result = 4LL;
LABEL_18:
v4 = v7;
goto LABEL_4;
}
}
}
}
}
else
{
result = 4294967193LL;
if ( (unsigned long long)(a2 + 3) > a3 )
return result;
v5 = a2[1];
if ( v5 <= -65 )
{
v6 = a2[2];
if ( v6 <= -65 )
{
result = 0LL;
if ( (unsigned __int8)v5 < 0xA0u && (_DWORD)v4 == 224 )
return result;
v7 = (unsigned __int16)((_WORD)v4 << 12) | ((unsigned __int8)(v5 & 0x3F) << 6) | (unsigned long long)(v6 & 0x3F);
result = 3LL;
goto LABEL_18;
}
}
}
return 0LL;
}
result = 4294967194LL;
if ( (unsigned long long)(a2 + 2) <= a3 )
{
result = 0LL;
if ( (a2[1] ^ 0x80u) <= 0x3F )
{
v4 = a2[1] ^ 0x80 | ((unsigned __int8)(v4 & 0x1F) << 6);
result = 2LL;
goto LABEL_4;
}
}
return result;
}
| my_mb_wc_utf8mb4_quick:
PUSH RBP
MOV RBP,RSP
MOV EAX,0xffffff9b
CMP RSI,RDX
JNC 0x00175434
MOVZX ECX,byte ptr [RSI]
TEST CL,CL
JS 0x0017542d
MOV EAX,0x1
LAB_00175428:
MOV qword ptr [RDI],RCX
JMP 0x00175434
LAB_0017542d:
CMP CL,0xc2
JNC 0x00175436
LAB_00175432:
XOR EAX,EAX
LAB_00175434:
POP RBP
RET
LAB_00175436:
CMP CL,0xdf
JA 0x0017546c
LEA R8,[RSI + 0x2]
MOV EAX,0xffffff9a
CMP R8,RDX
JA 0x00175434
MOVZX EDX,byte ptr [RSI + 0x1]
XOR EDX,0x80
MOV EAX,0x0
CMP DL,0x3f
JA 0x00175434
AND ECX,0x1f
SHL ECX,0x6
OR ECX,EDX
MOV EAX,0x2
JMP 0x00175428
LAB_0017546c:
CMP CL,0xef
JA 0x001754ce
LEA R8,[RSI + 0x3]
MOV EAX,0xffffff99
CMP R8,RDX
JA 0x00175434
MOVZX EDX,byte ptr [RSI + 0x1]
CMP DL,0xbf
JG 0x00175432
MOVZX ESI,byte ptr [RSI + 0x2]
CMP SIL,0xbf
JG 0x00175432
CMP ECX,0xe0
SETZ R8B
CMP DL,0xa0
SETC R9B
MOV EAX,0x0
TEST R8B,R9B
JNZ 0x00175434
SHL ECX,0xc
MOVZX EAX,CX
AND EDX,0x3f
SHL EDX,0x6
OR EDX,EAX
AND ESI,0x3f
OR RSI,RDX
MOV EAX,0x3
LAB_001754c6:
MOV RCX,RSI
JMP 0x00175428
LAB_001754ce:
CMP CL,0xf4
JA 0x00175432
LEA R8,[RSI + 0x4]
MOV EAX,0xffffff98
CMP R8,RDX
JA 0x00175434
MOVZX R8D,byte ptr [RSI + 0x1]
CMP R8B,0xbf
JG 0x00175432
MOVZX EDX,byte ptr [RSI + 0x2]
CMP DL,0xbf
JG 0x00175432
MOVZX ESI,byte ptr [RSI + 0x3]
CMP SIL,0xbf
JG 0x00175432
CMP ECX,0xf0
SETZ AL
CMP R8B,0x90
SETC R9B
TEST AL,R9B
JNZ 0x00175432
CMP ECX,0xf4
SETZ R9B
CMP R8B,0x90
SETNC R10B
MOV EAX,0x0
TEST R9B,R10B
JNZ 0x00175434
AND ECX,0x7
SHL ECX,0x12
AND R8D,0x3f
SHL R8D,0xc
OR R8D,ECX
AND EDX,0x3f
SHL EDX,0x6
OR EDX,R8D
AND ESI,0x3f
OR RSI,RDX
MOV EAX,0x4
JMP 0x001754c6
|
int8 my_mb_wc_utf8mb4_quick(ulong *param_1,byte *param_2,byte *param_3)
{
byte bVar1;
byte bVar2;
int8 uVar3;
uint uVar4;
ulong uVar5;
if (param_3 <= param_2) {
return 0xffffff9b;
}
bVar1 = *param_2;
uVar5 = (ulong)bVar1;
if ((char)bVar1 < '\0') {
if (0xc1 < bVar1) {
uVar4 = (uint)bVar1;
if (bVar1 < 0xe0) {
if (param_3 < param_2 + 2) {
return 0xffffff9a;
}
if (0x3f < (byte)(param_2[1] ^ 0x80)) {
return 0;
}
uVar5 = (ulong)((uVar4 & 0x1f) << 6 | param_2[1] ^ 0x80);
uVar3 = 2;
goto LAB_00175428;
}
if (bVar1 < 0xf0) {
if (param_3 < param_2 + 3) {
return 0xffffff99;
}
bVar2 = param_2[1];
if (((char)bVar2 < -0x40) && ((char)param_2[2] < -0x40)) {
if (uVar4 == 0xe0 && bVar2 < 0xa0) {
return 0;
}
uVar4 = param_2[2] & 0x3f | (bVar2 & 0x3f) << 6 | (bVar1 & 0xf) << 0xc;
uVar3 = 3;
LAB_001754c6:
uVar5 = (ulong)uVar4;
goto LAB_00175428;
}
}
else if (bVar1 < 0xf5) {
if (param_3 < param_2 + 4) {
return 0xffffff98;
}
bVar1 = param_2[1];
if (((((char)bVar1 < -0x40) && ((char)param_2[2] < -0x40)) && ((char)param_2[3] < -0x40)) &&
(uVar4 != 0xf0 || 0x8f < bVar1)) {
if (uVar4 == 0xf4 && 0x8f < bVar1) {
return 0;
}
uVar4 = param_2[3] & 0x3f |
(param_2[2] & 0x3f) << 6 | (bVar1 & 0x3f) << 0xc | (uVar4 & 7) << 0x12;
uVar3 = 4;
goto LAB_001754c6;
}
}
}
uVar3 = 0;
}
else {
uVar3 = 1;
LAB_00175428:
*param_1 = uVar5;
}
return uVar3;
}
| |
40,594 | inline_mysql_file_delete | eloqsql/include/mysql/psi/mysql_file.h | static inline int
inline_mysql_file_delete(
#ifdef HAVE_PSI_FILE_INTERFACE
PSI_file_key key, const char *src_file, uint src_line,
#endif
const char *name, myf flags)
{
int result;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_DELETE, name, &locker);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line);
result= my_delete(name, flags);
PSI_FILE_CALL(end_file_close_wait)(locker, result);
return result;
}
#endif
result= my_delete(name, flags);
return result;
} | O0 | c | inline_mysql_file_delete:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
leaq 0x1e6ab4(%rip), %rax # 0x2c0238
movq (%rax), %rax
movq 0x148(%rax), %rax
movl -0x8(%rbp), %esi
movq -0x20(%rbp), %rcx
leaq -0x80(%rbp), %rdi
movl $0xe, %edx
leaq -0x38(%rbp), %r8
callq *%rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0xd9818
leaq 0x1e6a69(%rip), %rax # 0x2c0238
movq (%rax), %rax
movq 0x220(%rax), %rax
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
callq *%rax
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xef4a0
movl %eax, -0x2c(%rbp)
leaq 0x1e6a3b(%rip), %rax # 0x2c0238
movq (%rax), %rax
movq 0x228(%rax), %rax
movq -0x38(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq *%rax
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xd982e
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xef4a0
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| inline_mysql_file_delete_1:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_8], edi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+148h]
mov esi, [rbp+var_8]
mov rcx, [rbp+var_20]
lea rdi, [rbp+var_80]
mov edx, 0Eh
lea r8, [rbp+var_38]
call rax
mov [rbp+var_38], rax
cmp [rbp+var_38], 0
setnz al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_D9818
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+220h]
mov rdi, [rbp+var_38]
mov rsi, [rbp+var_10]
mov edx, [rbp+var_14]
call rax
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_28]
call my_delete
mov [rbp+var_2C], eax
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+228h]
mov rdi, [rbp+var_38]
mov esi, [rbp+var_2C]
call rax
mov eax, [rbp+var_2C]
mov [rbp+var_4], eax
jmp short loc_D982E
loc_D9818:
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_28]
call my_delete
mov [rbp+var_2C], eax
mov eax, [rbp+var_2C]
mov [rbp+var_4], eax
loc_D982E:
mov eax, [rbp+var_4]
add rsp, 80h
pop rbp
retn
| long long inline_mysql_file_delete_1(unsigned int a1, long long a2, unsigned int a3, long long a4, long long a5)
{
_BYTE v6[72]; // [rsp+0h] [rbp-80h] BYREF
long long v7; // [rsp+48h] [rbp-38h] BYREF
unsigned int v8; // [rsp+54h] [rbp-2Ch]
long long v9; // [rsp+58h] [rbp-28h]
long long v10; // [rsp+60h] [rbp-20h]
unsigned int v11; // [rsp+6Ch] [rbp-14h]
long long v12; // [rsp+70h] [rbp-10h]
unsigned int v13; // [rsp+78h] [rbp-8h]
v13 = a1;
v12 = a2;
v11 = a3;
v10 = a4;
v9 = a5;
v7 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, long long *))PSI_server[41])(v6, a1, 14LL, a4, &v7);
if ( v7 )
{
((void ( *)(long long, long long, _QWORD))PSI_server[68])(v7, v12, v11);
v8 = my_delete(v10, v9);
((void ( *)(long long, _QWORD))PSI_server[69])(v7, v8);
}
else
{
return (unsigned int)my_delete(v10, v9);
}
return v8;
}
| inline_mysql_file_delete:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV dword ptr [RBP + -0x8],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
LEA RAX,[0x3c0238]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x148]
MOV ESI,dword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x20]
LEA RDI,[RBP + -0x80]
MOV EDX,0xe
LEA R8,[RBP + -0x38]
CALL RAX
MOV qword ptr [RBP + -0x38],RAX
CMP qword ptr [RBP + -0x38],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x001d9818
LEA RAX,[0x3c0238]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x220]
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RBP + -0x14]
CALL RAX
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x001ef4a0
MOV dword ptr [RBP + -0x2c],EAX
LEA RAX,[0x3c0238]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x228]
MOV RDI,qword ptr [RBP + -0x38]
MOV ESI,dword ptr [RBP + -0x2c]
CALL RAX
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001d982e
LAB_001d9818:
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x001ef4a0
MOV dword ptr [RBP + -0x2c],EAX
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x4],EAX
LAB_001d982e:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x80
POP RBP
RET
|
int4
inline_mysql_file_delete
(int4 param_1,int8 param_2,int4 param_3,int8 param_4,
int8 param_5)
{
int1 local_88 [72];
long local_40;
int4 local_34;
int8 local_30;
int8 local_28;
int4 local_1c;
int8 local_18;
int4 local_10;
int4 local_c;
local_30 = param_5;
local_28 = param_4;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
local_40 = (**(code **)(PSI_server + 0x148))(local_88,param_1,0xe,param_4,&local_40);
if (local_40 == 0) {
local_c = my_delete(local_28,local_30);
}
else {
(**(code **)(PSI_server + 0x220))(local_40,local_18,local_1c);
local_34 = my_delete(local_28,local_30);
(**(code **)(PSI_server + 0x228))(local_40,local_34);
local_c = local_34;
}
return local_c;
}
| |
40,595 | my_string_repertoire | eloqsql/strings/ctype.c | my_repertoire_t
my_string_repertoire(CHARSET_INFO *cs, const char *str, size_t length)
{
if (cs->mbminlen == 1 && !(cs->state & MY_CS_NONASCII))
{
return my_string_repertoire_8bit(cs, str, length);
}
else
{
const char *strend= str + length;
my_wc_t wc;
int chlen;
for (;
(chlen= my_ci_mb_wc(cs, &wc, (uchar*) str, (uchar*) strend)) > 0;
str+= chlen)
{
if (wc > 0x7F)
return MY_REPERTOIRE_UNICODE30;
}
}
return MY_REPERTOIRE_ASCII;
} | O0 | c | my_string_repertoire:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x1, 0x98(%rax)
jne 0x6b568
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
andl $0x2000, %eax # imm = 0x2000
cmpl $0x0, %eax
jne 0x6b568
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x6b310
movl %eax, -0x4(%rbp)
jmp 0x6b5cb
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x28(%rbp), %rcx
leaq -0x30(%rbp), %rsi
callq *%rax
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
jle 0x6b5c2
cmpq $0x7f, -0x30(%rbp)
jbe 0x6b5ad
movl $0x3, -0x4(%rbp)
jmp 0x6b5cb
jmp 0x6b5af
movl -0x34(%rbp), %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x6b574
jmp 0x6b5c4
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_string_repertoire:
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]
cmp dword ptr [rax+98h], 1
jnz short loc_6B568
mov rax, [rbp+var_10]
mov eax, [rax+0Ch]
and eax, 2000h
cmp eax, 0
jnz short loc_6B568
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call my_string_repertoire_8bit
mov [rbp+var_4], eax
jmp short loc_6B5CB
loc_6B568:
mov rax, [rbp+var_18]
add rax, [rbp+var_20]
mov [rbp+var_28], rax
loc_6B574:
mov rax, [rbp+var_10]
mov rax, [rax+0B8h]
mov rax, [rax+28h]
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_28]
lea rsi, [rbp+var_30]
call rax
mov [rbp+var_34], eax
cmp eax, 0
jle short loc_6B5C2
cmp [rbp+var_30], 7Fh
jbe short loc_6B5AD
mov [rbp+var_4], 3
jmp short loc_6B5CB
loc_6B5AD:
jmp short $+2
loc_6B5AF:
mov ecx, [rbp+var_34]
mov rax, [rbp+var_18]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_18], rax
jmp short loc_6B574
loc_6B5C2:
jmp short $+2
loc_6B5C4:
mov [rbp+var_4], 1
loc_6B5CB:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
| long long my_string_repertoire(long long a1, unsigned __int8 *a2, long long a3)
{
int v4; // [rsp+Ch] [rbp-34h]
unsigned long long v5; // [rsp+10h] [rbp-30h] BYREF
unsigned __int8 *v6; // [rsp+18h] [rbp-28h]
long long v7; // [rsp+20h] [rbp-20h]
unsigned __int8 *v8; // [rsp+28h] [rbp-18h]
long long v9; // [rsp+30h] [rbp-10h]
v9 = a1;
v8 = a2;
v7 = a3;
if ( *(_DWORD *)(a1 + 152) != 1 || (*(_DWORD *)(v9 + 12) & 0x2000) != 0 )
{
v6 = &v8[v7];
while ( 1 )
{
v4 = (*(long long ( **)(long long, unsigned long long *, unsigned __int8 *, unsigned __int8 *))(*(_QWORD *)(v9 + 184) + 40LL))(
v9,
&v5,
v8,
v6);
if ( v4 <= 0 )
break;
if ( v5 > 0x7F )
return 3;
v8 += v4;
}
return 1;
}
else
{
return (unsigned int)my_string_repertoire_8bit(v9, v8, v7);
}
}
| my_string_repertoire:
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]
CMP dword ptr [RAX + 0x98],0x1
JNZ 0x0016b568
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0xc]
AND EAX,0x2000
CMP EAX,0x0
JNZ 0x0016b568
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x0016b310
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0016b5cb
LAB_0016b568:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x28],RAX
LAB_0016b574:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x28]
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x28]
LEA RSI,[RBP + -0x30]
CALL RAX
MOV dword ptr [RBP + -0x34],EAX
CMP EAX,0x0
JLE 0x0016b5c2
CMP qword ptr [RBP + -0x30],0x7f
JBE 0x0016b5ad
MOV dword ptr [RBP + -0x4],0x3
JMP 0x0016b5cb
LAB_0016b5ad:
JMP 0x0016b5af
LAB_0016b5af:
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0016b574
LAB_0016b5c2:
JMP 0x0016b5c4
LAB_0016b5c4:
MOV dword ptr [RBP + -0x4],0x1
LAB_0016b5cb:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
int4 my_string_repertoire(long param_1,long param_2,long param_3)
{
int iVar1;
ulong local_38;
long local_30;
long local_28;
long local_20;
long local_18;
int4 local_c;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
if ((*(int *)(param_1 + 0x98) == 1) && ((*(uint *)(param_1 + 0xc) & 0x2000) == 0)) {
local_c = my_string_repertoire_8bit(param_1,param_2,param_3);
}
else {
local_30 = param_2 + param_3;
while (iVar1 = (**(code **)(*(long *)(local_18 + 0xb8) + 0x28))
(local_18,&local_38,local_20,local_30), 0 < iVar1) {
if (0x7f < local_38) {
return 3;
}
local_20 = local_20 + iVar1;
}
local_c = 1;
}
return local_c;
}
| |
40,596 | my_string_repertoire | eloqsql/strings/ctype.c | my_repertoire_t
my_string_repertoire(CHARSET_INFO *cs, const char *str, size_t length)
{
if (cs->mbminlen == 1 && !(cs->state & MY_CS_NONASCII))
{
return my_string_repertoire_8bit(cs, str, length);
}
else
{
const char *strend= str + length;
my_wc_t wc;
int chlen;
for (;
(chlen= my_ci_mb_wc(cs, &wc, (uchar*) str, (uchar*) strend)) > 0;
str+= chlen)
{
if (wc > 0x7F)
return MY_REPERTOIRE_UNICODE30;
}
}
return MY_REPERTOIRE_ASCII;
} | O3 | c | my_string_repertoire:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
cmpl $0x1, 0x98(%rdi)
jne 0x537f7
testb $0x20, 0xd(%r15)
jne 0x537f7
movl $0x1, %eax
testq %rbx, %rbx
jle 0x5385d
addq %r14, %rbx
cmpb $0x0, (%r14)
js 0x5386a
incq %r14
cmpq %rbx, %r14
jb 0x537e7
jmp 0x5385d
addq %r14, %rbx
movq 0xb8(%r15), %rax
leaq -0x28(%rbp), %rsi
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
callq *0x28(%rax)
testl %eax, %eax
setg %cl
jle 0x53853
cmpq $0x7f, -0x28(%rbp)
ja 0x53853
leaq -0x28(%rbp), %r12
movq %r14, %rcx
movl %eax, %r14d
addq %rcx, %r14
movq 0xb8(%r15), %rax
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq *0x28(%rax)
testl %eax, %eax
setg %cl
jle 0x53853
cmpq $0x80, -0x28(%rbp)
jb 0x53823
movzbl %cl, %eax
leal 0x1(,%rax,2), %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x3, %eax
jmp 0x5385d
| my_string_repertoire:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov rbx, rdx
mov r14, rsi
mov r15, rdi
cmp dword ptr [rdi+98h], 1
jnz short loc_537F7
test byte ptr [r15+0Dh], 20h
jnz short loc_537F7
mov eax, 1
test rbx, rbx
jle short loc_5385D
add rbx, r14
loc_537E7:
cmp byte ptr [r14], 0
js short loc_5386A
inc r14
cmp r14, rbx
jb short loc_537E7
jmp short loc_5385D
loc_537F7:
add rbx, r14
mov rax, [r15+0B8h]
lea rsi, [rbp+var_28]
mov rdi, r15
mov rdx, r14
mov rcx, rbx
call qword ptr [rax+28h]
test eax, eax
setnle cl
jle short loc_53853
cmp [rbp+var_28], 7Fh
ja short loc_53853
lea r12, [rbp+var_28]
loc_53823:
mov rcx, r14
mov r14d, eax
add r14, rcx
mov rax, [r15+0B8h]
mov rdi, r15
mov rsi, r12
mov rdx, r14
mov rcx, rbx
call qword ptr [rax+28h]
test eax, eax
setnle cl
jle short loc_53853
cmp [rbp+var_28], 80h
jb short loc_53823
loc_53853:
movzx eax, cl
lea eax, ds:1[rax*2]
loc_5385D:
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_5386A:
mov eax, 3
jmp short loc_5385D
| long long my_string_repertoire(long long a1, char *a2, long long a3)
{
char *v3; // r14
long long result; // rax
char *v5; // rbx
int v6; // eax
bool v7; // cl
_QWORD v8[5]; // [rsp+8h] [rbp-28h] BYREF
v3 = a2;
if ( *(_DWORD *)(a1 + 152) != 1 || (*(_BYTE *)(a1 + 13) & 0x20) != 0 )
{
v5 = &a2[a3];
v6 = (*(long long ( **)(long long, _QWORD *, char *, char *))(*(_QWORD *)(a1 + 184) + 40LL))(
a1,
v8,
a2,
&a2[a3]);
v7 = v6 > 0;
if ( v6 > 0 && v8[0] <= 0x7FuLL )
{
do
{
v3 += (unsigned int)v6;
v6 = (*(long long ( **)(long long, _QWORD *, char *, char *))(*(_QWORD *)(a1 + 184) + 40LL))(
a1,
v8,
v3,
v5);
v7 = v6 > 0;
}
while ( v6 > 0 && v8[0] < 0x80uLL );
}
return 2 * (unsigned int)v7 + 1;
}
else
{
result = 1LL;
if ( a3 > 0 )
{
while ( *v3 >= 0 )
{
if ( ++v3 >= &a2[a3] )
return result;
}
return 3LL;
}
}
return result;
}
| my_string_repertoire:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
CMP dword ptr [RDI + 0x98],0x1
JNZ 0x001537f7
TEST byte ptr [R15 + 0xd],0x20
JNZ 0x001537f7
MOV EAX,0x1
TEST RBX,RBX
JLE 0x0015385d
ADD RBX,R14
LAB_001537e7:
CMP byte ptr [R14],0x0
JS 0x0015386a
INC R14
CMP R14,RBX
JC 0x001537e7
JMP 0x0015385d
LAB_001537f7:
ADD RBX,R14
MOV RAX,qword ptr [R15 + 0xb8]
LEA RSI,[RBP + -0x28]
MOV RDI,R15
MOV RDX,R14
MOV RCX,RBX
CALL qword ptr [RAX + 0x28]
TEST EAX,EAX
SETG CL
JLE 0x00153853
CMP qword ptr [RBP + -0x28],0x7f
JA 0x00153853
LEA R12,[RBP + -0x28]
LAB_00153823:
MOV RCX,R14
MOV R14D,EAX
ADD R14,RCX
MOV RAX,qword ptr [R15 + 0xb8]
MOV RDI,R15
MOV RSI,R12
MOV RDX,R14
MOV RCX,RBX
CALL qword ptr [RAX + 0x28]
TEST EAX,EAX
SETG CL
JLE 0x00153853
CMP qword ptr [RBP + -0x28],0x80
JC 0x00153823
LAB_00153853:
MOVZX EAX,CL
LEA EAX,[0x1 + RAX*0x2]
LAB_0015385d:
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0015386a:
MOV EAX,0x3
JMP 0x0015385d
|
char my_string_repertoire(long param_1,char *param_2,long param_3)
{
char cVar1;
uint uVar2;
bool bVar3;
char *pcVar4;
ulong local_30;
if ((*(int *)(param_1 + 0x98) == 1) && ((*(byte *)(param_1 + 0xd) & 0x20) == 0)) {
cVar1 = '\x01';
if (0 < param_3) {
pcVar4 = param_2 + param_3;
do {
if (*param_2 < '\0') {
return '\x03';
}
param_2 = param_2 + 1;
} while (param_2 < pcVar4);
}
}
else {
pcVar4 = param_2 + param_3;
uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x28))(param_1,&local_30,param_2,pcVar4);
bVar3 = 0 < (int)uVar2;
if ((0 < (int)uVar2) && (local_30 < 0x80)) {
do {
param_2 = param_2 + uVar2;
uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x28))(param_1,&local_30,param_2,pcVar4);
bVar3 = 0 < (int)uVar2;
if ((int)uVar2 < 1) break;
} while (local_30 < 0x80);
}
cVar1 = bVar3 * '\x02' + '\x01';
}
return cVar1;
}
| |
40,597 | my_strnncollsp_simple | eloqsql/strings/ctype-simple.c | int my_strnncollsp_simple(CHARSET_INFO * cs, const uchar *a, size_t a_length,
const uchar *b, size_t b_length)
{
const uchar *map= cs->sort_order, *end;
size_t length;
int res;
end= a + (length= MY_MIN(a_length, b_length));
while (a < end)
{
if (map[*a++] != map[*b++])
return ((int) map[a[-1]] - (int) map[b[-1]]);
}
res= 0;
if (a_length != b_length)
{
int swap= 1;
/*
Check the next not space character of the longer key. If it's < ' ',
then it's smaller than the other key.
*/
if (a_length < b_length)
{
/* put shorter key in s */
a_length= b_length;
a= b;
swap= -1; /* swap sign of result */
res= -res;
}
for (end= a + a_length-length; a < end ; a++)
{
if (map[*a] != map[' '])
return (map[*a] < map[' ']) ? -swap : swap;
}
}
return res;
} | O3 | c | my_strnncollsp_simple:
pushq %rbp
movq %rsp, %rbp
movq 0x58(%rdi), %rdi
cmpq %r8, %rdx
movq %r8, %r9
cmovbq %rdx, %r9
leaq (%rsi,%r9), %r10
cmpq %r10, %rsi
jae 0x3bbe9
movzbl (%rsi), %eax
incq %rsi
movzbl (%rdi,%rax), %eax
movzbl (%rcx), %r11d
incq %rcx
movzbl (%rdi,%r11), %r11d
cmpb %r11b, %al
je 0x3bbc4
subl %r11d, %eax
jmp 0x3bc3f
cmpq %r8, %rdx
jne 0x3bbf2
xorl %eax, %eax
jmp 0x3bc3f
xorl %eax, %eax
cmpq %r8, %rdx
cmovaq %rdx, %r8
cmovbq %rcx, %rsi
movl $0x0, %ecx
sbbl %ecx, %ecx
leaq (%rsi,%r8), %rdx
subq %r9, %rdx
cmpq %rdx, %rsi
jae 0x3bc3f
orl $0x1, %ecx
movb 0x20(%rdi), %dl
subq %r9, %r8
xorl %eax, %eax
movzbl (%rsi,%rax), %r9d
movb (%rdi,%r9), %r9b
cmpb %dl, %r9b
jne 0x3bc35
incq %rax
cmpq %rax, %r8
jne 0x3bc1d
jmp 0x3bbee
movl %ecx, %eax
negl %eax
cmpb %dl, %r9b
cmovael %ecx, %eax
popq %rbp
retq
| my_strnncollsp_simple:
push rbp
mov rbp, rsp
mov rdi, [rdi+58h]
cmp rdx, r8
mov r9, r8
cmovb r9, rdx
lea r10, [rsi+r9]
loc_3BBC4:
cmp rsi, r10
jnb short loc_3BBE9
movzx eax, byte ptr [rsi]
inc rsi
movzx eax, byte ptr [rdi+rax]
movzx r11d, byte ptr [rcx]
inc rcx
movzx r11d, byte ptr [rdi+r11]
cmp al, r11b
jz short loc_3BBC4
sub eax, r11d
jmp short loc_3BC3F
loc_3BBE9:
cmp rdx, r8
jnz short loc_3BBF2
loc_3BBEE:
xor eax, eax
jmp short loc_3BC3F
loc_3BBF2:
xor eax, eax
cmp rdx, r8
cmova r8, rdx
cmovb rsi, rcx
mov ecx, 0
sbb ecx, ecx
lea rdx, [rsi+r8]
sub rdx, r9
cmp rsi, rdx
jnb short loc_3BC3F
or ecx, 1
mov dl, [rdi+20h]
sub r8, r9
xor eax, eax
loc_3BC1D:
movzx r9d, byte ptr [rsi+rax]
mov r9b, [rdi+r9]
cmp r9b, dl
jnz short loc_3BC35
inc rax
cmp r8, rax
jnz short loc_3BC1D
jmp short loc_3BBEE
loc_3BC35:
mov eax, ecx
neg eax
cmp r9b, dl
cmovnb eax, ecx
loc_3BC3F:
pop rbp
retn
| long long my_strnncollsp_simple(
long long a1,
unsigned __int8 *a2,
unsigned long long a3,
unsigned __int8 *a4,
unsigned long long a5)
{
long long v5; // rdi
unsigned long long v6; // r9
unsigned __int8 *v7; // r10
long long v8; // rax
int v9; // eax
long long v10; // r11
int v11; // r11d
long long result; // rax
bool v13; // cf
unsigned int v14; // ecx
unsigned __int8 v15; // dl
unsigned long long v16; // r8
long long v17; // rax
unsigned __int8 v18; // r9
v5 = *(_QWORD *)(a1 + 88);
v6 = a5;
if ( a3 < a5 )
v6 = a3;
v7 = &a2[v6];
while ( a2 < v7 )
{
v8 = *a2++;
v9 = *(unsigned __int8 *)(v5 + v8);
v10 = *a4++;
v11 = *(unsigned __int8 *)(v5 + v10);
if ( (_BYTE)v9 != (_BYTE)v11 )
return (unsigned int)(v9 - v11);
}
if ( a3 == a5 )
return 0LL;
result = 0LL;
v13 = a3 < a5;
if ( a3 > a5 )
a5 = a3;
if ( v13 )
a2 = a4;
if ( a2 < &a2[a5 - v6] )
{
v14 = v13 ? -1 : 1;
v15 = *(_BYTE *)(v5 + 32);
v16 = a5 - v6;
v17 = 0LL;
while ( 1 )
{
v18 = *(_BYTE *)(v5 + a2[v17]);
if ( v18 != v15 )
break;
if ( v16 == ++v17 )
return 0LL;
}
result = -v14;
if ( v18 >= v15 )
return v14;
}
return result;
}
| my_strnncollsp_simple:
PUSH RBP
MOV RBP,RSP
MOV RDI,qword ptr [RDI + 0x58]
CMP RDX,R8
MOV R9,R8
CMOVC R9,RDX
LEA R10,[RSI + R9*0x1]
LAB_0013bbc4:
CMP RSI,R10
JNC 0x0013bbe9
MOVZX EAX,byte ptr [RSI]
INC RSI
MOVZX EAX,byte ptr [RDI + RAX*0x1]
MOVZX R11D,byte ptr [RCX]
INC RCX
MOVZX R11D,byte ptr [RDI + R11*0x1]
CMP AL,R11B
JZ 0x0013bbc4
SUB EAX,R11D
JMP 0x0013bc3f
LAB_0013bbe9:
CMP RDX,R8
JNZ 0x0013bbf2
LAB_0013bbee:
XOR EAX,EAX
JMP 0x0013bc3f
LAB_0013bbf2:
XOR EAX,EAX
CMP RDX,R8
CMOVA R8,RDX
CMOVC RSI,RCX
MOV ECX,0x0
SBB ECX,ECX
LEA RDX,[RSI + R8*0x1]
SUB RDX,R9
CMP RSI,RDX
JNC 0x0013bc3f
OR ECX,0x1
MOV DL,byte ptr [RDI + 0x20]
SUB R8,R9
XOR EAX,EAX
LAB_0013bc1d:
MOVZX R9D,byte ptr [RSI + RAX*0x1]
MOV R9B,byte ptr [RDI + R9*0x1]
CMP R9B,DL
JNZ 0x0013bc35
INC RAX
CMP R8,RAX
JNZ 0x0013bc1d
JMP 0x0013bbee
LAB_0013bc35:
MOV EAX,ECX
NEG EAX
CMP R9B,DL
CMOVNC EAX,ECX
LAB_0013bc3f:
POP RBP
RET
|
uint my_strnncollsp_simple(long param_1,byte *param_2,ulong param_3,byte *param_4,ulong param_5)
{
byte *pbVar1;
byte bVar2;
byte bVar3;
long lVar4;
long lVar5;
uint uVar6;
ulong uVar7;
ulong uVar8;
lVar4 = *(long *)(param_1 + 0x58);
uVar8 = param_5;
if (param_3 < param_5) {
uVar8 = param_3;
}
pbVar1 = param_2 + uVar8;
while (param_2 < pbVar1) {
bVar2 = *param_2;
param_2 = param_2 + 1;
bVar3 = *param_4;
param_4 = param_4 + 1;
if (*(byte *)(lVar4 + (ulong)bVar2) != *(byte *)(lVar4 + (ulong)bVar3)) {
return (uint)*(byte *)(lVar4 + (ulong)bVar2) - (uint)*(byte *)(lVar4 + (ulong)bVar3);
}
}
if (param_3 != param_5) {
uVar7 = param_5;
if (param_5 < param_3) {
uVar7 = param_3;
}
if (param_3 < param_5) {
param_2 = param_4;
}
if (param_2 + (uVar7 - uVar8) <= param_2) {
return 0;
}
uVar6 = -(uint)(param_3 < param_5) | 1;
lVar5 = 0;
do {
if (*(byte *)(lVar4 + (ulong)param_2[lVar5]) != *(byte *)(lVar4 + 0x20)) {
if (*(byte *)(lVar4 + (ulong)param_2[lVar5]) < *(byte *)(lVar4 + 0x20)) {
return -uVar6;
}
return uVar6;
}
lVar5 = lVar5 + 1;
} while (uVar7 - uVar8 != lVar5);
}
return 0;
}
| |
40,598 | my_mutex_init | eloqsql/mysys/thr_mutex.c | void my_mutex_init()
{
/* Initialize mutex attributes */
#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
/*
Set mutex type to "fast" a.k.a "adaptive"
In this case the thread may steal the mutex from some other thread
that is waiting for the same mutex. This will save us some
context switches but may cause a thread to 'starve forever' while
waiting for the mutex (not likely if the code within the mutex is
short).
*/
pthread_mutexattr_init(&my_fast_mutexattr);
pthread_mutexattr_settype(&my_fast_mutexattr,
PTHREAD_MUTEX_ADAPTIVE_NP);
#endif
#ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
/*
Set mutex type to "errorcheck"
*/
pthread_mutexattr_init(&my_errorcheck_mutexattr);
pthread_mutexattr_settype(&my_errorcheck_mutexattr,
PTHREAD_MUTEX_ERRORCHECK);
#endif
#if defined(SAFE_MUTEX_DEFINED)
safe_mutex_global_init();
#endif
} | O3 | c | my_mutex_init:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x33fa5f(%rip), %rbx # 0x366908
movq %rbx, %rdi
callq 0x24070
movq %rbx, %rdi
movl $0x3, %esi
callq 0x244c0
leaq 0x33fa47(%rip), %rbx # 0x36690c
movq %rbx, %rdi
callq 0x24070
movq %rbx, %rdi
movl $0x2, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x244c0
| my_mutex_init:
push rbp
mov rbp, rsp
push rbx
push rax
lea rbx, my_fast_mutexattr
mov rdi, rbx
call _pthread_mutexattr_init
mov rdi, rbx
mov esi, 3
call _pthread_mutexattr_settype
lea rbx, my_errorcheck_mutexattr
mov rdi, rbx
call _pthread_mutexattr_init
mov rdi, rbx
mov esi, 2
add rsp, 8
pop rbx
pop rbp
jmp _pthread_mutexattr_settype
| long long my_mutex_init()
{
pthread_mutexattr_init(&my_fast_mutexattr);
pthread_mutexattr_settype(&my_fast_mutexattr, 3LL);
pthread_mutexattr_init(&my_errorcheck_mutexattr);
return pthread_mutexattr_settype(&my_errorcheck_mutexattr, 2LL);
}
| my_mutex_init:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
LEA RBX,[0x466908]
MOV RDI,RBX
CALL 0x00124070
MOV RDI,RBX
MOV ESI,0x3
CALL 0x001244c0
LEA RBX,[0x46690c]
MOV RDI,RBX
CALL 0x00124070
MOV RDI,RBX
MOV ESI,0x2
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x001244c0
|
void my_mutex_init(void)
{
pthread_mutexattr_init((pthread_mutexattr_t *)&my_fast_mutexattr);
pthread_mutexattr_settype((pthread_mutexattr_t *)&my_fast_mutexattr,3);
pthread_mutexattr_init((pthread_mutexattr_t *)&my_errorcheck_mutexattr);
pthread_mutexattr_settype((pthread_mutexattr_t *)&my_errorcheck_mutexattr,2);
return;
}
| |
40,599 | stbi_is_hdr_from_callbacks | llama.cpp/examples/llava/../../common/stb_image.h | static void stbi__start_callbacks(stbi__context *s, stbi_io_callbacks *c, void *user)
{
s->io = *c;
s->io_user_data = user;
s->buflen = sizeof(s->buffer_start);
s->read_from_callbacks = 1;
s->callback_already_read = 0;
s->img_buffer = s->img_buffer_original = s->buffer_start;
stbi__refill_buffer(s);
s->img_buffer_original_end = s->img_buffer_end;
} | O3 | c | stbi_is_hdr_from_callbacks:
pushq %rbx
subq $0xe0, %rsp
movq 0x10(%rdi), %rax
leaq 0x38(%rsp), %rcx
movq %rax, -0x18(%rcx)
movups (%rdi), %xmm0
movups %xmm0, -0x28(%rcx)
movq %rsi, -0x10(%rcx)
movabsq $0x8000000001, %rax # imm = 0x8000000001
movq %rax, -0x8(%rcx)
movl $0x0, 0x80(%rcx)
movq %rcx, 0x98(%rcx)
movq %rcx, 0x88(%rcx)
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x26801
movq 0xc8(%rbx), %rax
movq %rax, 0xd8(%rbx)
movq %rbx, %rdi
callq 0x195cb
addq $0xe0, %rsp
popq %rbx
retq
| stbi_is_hdr_from_callbacks:
push rbx
sub rsp, 0E0h
mov rax, [rdi+10h]
lea rcx, [rsp+0E8h+var_B0]
mov [rcx-18h], rax
movups xmm0, xmmword ptr [rdi]
movups xmmword ptr [rcx-28h], xmm0
mov [rcx-10h], rsi
mov rax, 8000000001h
mov [rcx-8], rax
mov dword ptr [rcx+80h], 0
mov [rcx+98h], rcx
mov [rcx+88h], rcx
mov rbx, rsp
mov rdi, rbx
call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *)
mov rax, [rbx+0C8h]
mov [rbx+0D8h], rax
mov rdi, rbx
call _ZL14stbi__hdr_testP13stbi__context; stbi__hdr_test(stbi__context *)
add rsp, 0E0h
pop rbx
retn
| long long stbi_is_hdr_from_callbacks(long long a1, long long a2)
{
_OWORD v3[2]; // [rsp+0h] [rbp-E8h] BYREF
long long v4; // [rsp+20h] [rbp-C8h]
long long v5; // [rsp+28h] [rbp-C0h]
long long v6; // [rsp+30h] [rbp-B8h]
_BYTE v7[128]; // [rsp+38h] [rbp-B0h] BYREF
int v8; // [rsp+B8h] [rbp-30h]
_BYTE *v9; // [rsp+C0h] [rbp-28h]
long long v10; // [rsp+C8h] [rbp-20h]
_BYTE *v11; // [rsp+D0h] [rbp-18h]
long long v12; // [rsp+D8h] [rbp-10h]
v4 = *(_QWORD *)(a1 + 16);
v3[1] = *(_OWORD *)a1;
v5 = a2;
v6 = 0x8000000001LL;
v8 = 0;
v11 = v7;
v9 = v7;
stbi__refill_buffer(v3);
v12 = v10;
return stbi__hdr_test((long long)v3);
}
| stbi_is_hdr_from_callbacks:
PUSH RBX
SUB RSP,0xe0
MOV RAX,qword ptr [RDI + 0x10]
LEA RCX,[RSP + 0x38]
MOV qword ptr [RCX + -0x18],RAX
MOVUPS XMM0,xmmword ptr [RDI]
MOVUPS xmmword ptr [RCX + -0x28],XMM0
MOV qword ptr [RCX + -0x10],RSI
MOV RAX,0x8000000001
MOV qword ptr [RCX + -0x8],RAX
MOV dword ptr [RCX + 0x80],0x0
MOV qword ptr [RCX + 0x98],RCX
MOV qword ptr [RCX + 0x88],RCX
MOV RBX,RSP
MOV RDI,RBX
CALL 0x00126801
MOV RAX,qword ptr [RBX + 0xc8]
MOV qword ptr [RBX + 0xd8],RAX
MOV RDI,RBX
CALL 0x001195cb
ADD RSP,0xe0
POP RBX
RET
|
void stbi_is_hdr_from_callbacks(int8 *param_1,int8 param_2)
{
stbi__context asStack_e8 [16];
int8 local_d8;
int8 uStack_d0;
int8 local_c8;
int8 local_c0;
int8 local_b8;
int1 local_b0 [128];
int4 local_30;
int1 *local_28;
int8 local_20;
int1 *local_18;
int8 local_10;
local_c8 = param_1[2];
local_28 = local_b0;
local_d8 = *param_1;
uStack_d0 = param_1[1];
local_b8 = 0x8000000001;
local_30 = 0;
local_c0 = param_2;
local_18 = local_28;
stbi__refill_buffer(asStack_e8);
local_10 = local_20;
stbi__hdr_test(asStack_e8);
return;
}
|
Subsets and Splits
C++ Functions With Standard Library Dependencies
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ Standard Library Function Analysis
Filters C++ code examples that use standard library containers and types, providing useful insights into common programming patterns and data structures in the dataset.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.