// File: /workspace/github_c_makefile_star2_O2/lucvoo[P]sparse-dev/linearize.c
// Function: linearize_symbol
struct entrypoint *linearize_symbol(struct symbol *sym)
{
	struct symbol *base_type;

	if (!sym)
		return NULL;
	current_pos = sym->pos;
	base_type = sym->ctype.base_type;
	if (!base_type)
		return NULL;
	if (base_type->type == SYM_FN)
		return linearize_fn(sym, base_type);
	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
testq %rdi, %rdi
je 0x13021
movq %rdi, %r15
movq 0x4(%rdi), %rax
movq %rax, 0x4dda8(%rip)     # 0x60d68
movq 0x60(%rdi), %r14
testq %r14, %r14
je 0x13021
cmpb $0x5, (%r14)
jne 0x13021
movq 0x90(%r14), %r12
testq %r12, %r12
je 0x13021
testb $0x1, 0x55(%r15)
jne 0x13021
xorl %edi, %edi
callq 0x2ad81
movq %rax, %rbx
movq %r15, (%rax)
movq %rax, 0xc0(%r15)
movq 0x4(%r15), %rsi
movq %rax, %rdi
callq 0x134b2
movq %rbx, %rdi
movq %rax, %rsi
callq 0x134e4
cmpl $0xb, (%r12)
jne 0x13035
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1352d
jmp 0x13023
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, 0x18(%rsp)
pushq $0x1
popq %rdi
xorl %r13d, %r13d
xorl %esi, %esi
callq 0x1347f
movq %rax, %r15
movq %rbx, %rdi
movq %rax, %rsi
callq 0x13783
movq %r15, 0x28(%rbx)
movq 0x88(%r14), %rdi
movq %rbx, 0x8(%rsp)
addq $0x8, %rbx
movq %rbx, %rsi
callq 0x1fe0b
movq %r14, 0x20(%rsp)
movq 0x88(%r14), %rax
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x13125
leaq 0x30(%rsp), %r14
movq 0x10(%rsp), %rbp
movq 0x8(%rsp), %r15
xorl %ebx, %ebx
movl (%rbp), %eax
movsbq %al, %rcx
cmpq %rcx, %rbx
jge 0x13116
movq 0x18(%rbp,%rbx,8), %rsi
cmpw $0x100, %ax             # imm = 0x100
jb 0x130b8
testq %rsi, %rsi
je 0x13111
incl %r13d
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
andq $0x0, 0x10(%r14)
movq %rsi, 0x28(%rsp)
movq %r15, %rdi
callq 0x14f2d
movq %rax, 0x38(%rsp)
xorl %edi, %edi
callq 0x2aec5
movq %rax, %r12
movq 0x28(%r15), %rdi
movl $0x4, 0x4(%rax)
movl %r13d, (%rax)
movq %rdi, 0x18(%rax)
addq $0x30, %rdi
movq %rax, %rsi
callq 0x1fae9
movq %r15, %rdi
movq %r12, %rsi
leaq 0x28(%rsp), %rdx
callq 0x14f94
incq %rbx
jmp 0x1309c
movq 0x10(%rbp), %rbp
cmpq 0x10(%rsp), %rbp
jne 0x1309a
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x1379a
movq %rax, %r14
movq 0x20(%rsp), %rax
movq 0x60(%rax), %r12
pushq $0x2
popq %rdi
movq %r12, %rsi
callq 0x12bbd
movq %rax, %r15
testq %r12, %r12
je 0x1316d
cmpl $0x0, 0x50(%r12)
jle 0x1316d
movq %r15, %rdx
addq $0x30, %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x12bdf
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x13783
movq %rbx, %rdi
callq 0x161d8
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0x13023
leaq 0x27a1a(%rip), %r14     # 0x3abb3
movq %rax, %rdx
movq %rax, 0x18(%rsp)
xorl %esi, %esi
movq %rdx, 0x20(%rsp)
movl (%rdx), %eax
movsbq %al, %rcx
cmpq %rcx, %rsi
jge 0x1331a
movq %rsi, 0x10(%rsp)
movq 0x18(%rdx,%rsi,8), %rcx
cmpw $0x100, %ax             # imm = 0x100
jb 0x131d0
testq %rcx, %rcx
je 0x13308
movq 0x28(%rcx), %r15
testq %r15, %r15
je 0x13308
movq %r15, %r12
xorl %ebx, %ebx
movl (%r12), %eax
movsbq %al, %rcx
cmpq %rcx, %rbx
jge 0x132fa
movq 0x18(%r12,%rbx,8), %r13
cmpw $0x100, %ax             # imm = 0x100
jb 0x13207
testq %r13, %r13
je 0x132f2
cmpq $0x0, 0x8(%r13)
je 0x132f2
movl (%r13), %eax
testb %al, %al
jns 0x132de
movl %eax, %ecx
andl $0x7f, %ecx
leal -0xb(%rcx), %edx
cmpl $0x4, %edx
jae 0x13252
movq 0x38(%r13), %rbp
xorl %edi, %edi
callq 0x12c98
cmpq %rax, %rbp
jne 0x132de
movq 0x10(%r13), %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x1108a
jmp 0x132de
addl $-0xf, %ecx
cmpl $0x3, %ecx
jae 0x132de
movq 0x38(%r13), %rcx
cmpl $0x6, 0x4(%rcx)
jne 0x132de
movq 0x18(%rcx), %rbp
shrl $0x8, %eax
cmpq %rax, %rbp
jb 0x132de
decb %al
movzbl %al, %ecx
pushq $-0x1
popq %rax
shlq %cl, %rax
btq %rcx, %rbp
movl $0x0, %edx
cmovbq %rax, %rdx
leaq 0x47345(%rip), %rax     # 0x5a5d8
cmpl $0x0, (%rax)
je 0x132b1
orq %rbp, %rdx
jns 0x132b1
movq 0x10(%r13), %rdi
leaq 0x2791a(%rip), %rsi     # 0x3abc2
xorl %eax, %eax
callq 0x1108a
jmp 0x132de
leaq 0x47324(%rip), %rax     # 0x5a5dc
cmpl $0x0, (%rax)
je 0x132de
movq 0x18(%r13), %rdi
callq 0x20b5a
movq 0x10(%r13), %rdi
leaq 0x27910(%rip), %rsi     # 0x3abe1
movq %rbp, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x1108a
movl (%r13), %eax
andl $0x7f, %eax
cmpl $0x43, %eax
jne 0x132f2
movq %r13, %rdi
callq 0x34b9e
incq %rbx
jmp 0x131e2
movq 0x10(%r12), %r12
cmpq %r15, %r12
jne 0x131e0
movq 0x10(%rsp), %rsi
incq %rsi
movq 0x20(%rsp), %rdx
jmp 0x131a8
movq 0x10(%rdx), %rdx
movq 0x18(%rsp), %rax
cmpq %rax, %rdx
jne 0x131a1
movq 0x8(%rsp), %rbx
jmp 0x13023