// File: /workspace/github_c_makefile_star2_O3/PoulinV[P]AxiCLASS/build/../tools/sparse.c
// Function: sp_num_alloc
int sp_num_alloc(sp_num** N, int n, ErrorMsg error_message){
	int maxnz, k;
	class_alloc((*N),sizeof(sp_num),error_message);
	maxnz = n*(n+1);
	maxnz /=2;
	(*N)->n = n;
	class_call(sp_mat_alloc(&((*N)->L), n, n, maxnz, error_message),
		error_message,error_message);
	class_call(sp_mat_alloc(&((*N)->U), n, n, maxnz, error_message),
		error_message,error_message);
	class_alloc((*N)->xi,n*sizeof(int*),error_message);
	/* I really want xi to be a vector of pointers to vectors. */
	class_alloc((*N)->xi[0],n*n*sizeof(int),error_message);
	for (k=1;k<n;k++)	(*N)->xi[k] = (*N)->xi[k-1]+n;
	/*Assign pointers to rows.*/
	class_alloc((*N)->topvec,n*sizeof(int),error_message);
	class_alloc((*N)->pinv,n*sizeof(int),error_message);
	class_alloc((*N)->p,n*sizeof(int),error_message);
	/* Has to be n+1 because sp_amd uses it for storage:*/
	class_alloc((*N)->q,(n+1)*sizeof(int),error_message);
	class_alloc((*N)->w,n*sizeof(double),error_message);
	class_alloc((*N)->wamd,(8*(n+1))*sizeof(int),error_message);
	return _SUCCESS_;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x818, %rsp            # imm = 0x818
movq %rdx, %rbx
movl %esi, %r13d
movq %rdi, %r14
movl $0x50, %edi
callq 0x8460
movq %rax, (%r14)
testq %rax, %rax
je 0xb33e
leal 0x1(%r13), %r15d
movl %r15d, %ecx
imull %r13d, %ecx
movl %ecx, %ebp
shrl $0x1f, %ebp
addl %ecx, %ebp
sarl %ebp
movl %r13d, (%rax)
addq $0x8, %rax
movq %rax, %rdi
movl %r13d, %esi
movl %r13d, %edx
movl %ebp, %ecx
movq %rbx, %r8
callq 0xb0c4
testl %eax, %eax
je 0xb378
leaq 0xe30e6(%rip), %rsi     # 0xee3f0
leaq 0xe352e(%rip), %rdx     # 0xee83f
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0xe2d0a(%rip), %rsi     # 0xee034
leaq 0xe3501(%rip), %rdx     # 0xee832
movq %rbx, %rdi
movl $0x2c, %ecx
jmp 0xb3c9
leaq 0xe2cbf(%rip), %rsi     # 0xee004
leaq 0xe34e1(%rip), %rdx     # 0xee82d
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl $0x50, %ecx
xorl %eax, %eax
callq 0x30af0
leaq 0xe2ccd(%rip), %rsi     # 0xee034
leaq 0xe34c4(%rip), %rdx     # 0xee832
movq %rbx, %rdi
movl $0x27, %ecx
jmp 0xb3c9
movq (%r14), %rdi
addq $0x10, %rdi
movl %r13d, %esi
movl %r13d, %edx
movl %ebp, %ecx
movq %rbx, %r8
callq 0xb0c4
testl %eax, %eax
je 0xb3ea
leaq 0xe3056(%rip), %rsi     # 0xee3f0
leaq 0xe34d3(%rip), %rdx     # 0xee874
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0xe2c7a(%rip), %rsi     # 0xee034
leaq 0xe3471(%rip), %rdx     # 0xee832
movq %rbx, %rdi
movl $0x2e, %ecx
movq %r14, %r8
xorl %eax, %eax
callq 0x30af0
movl $0x1, %eax
addq $0x818, %rsp            # imm = 0x818
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movslq %r13d, %rax
movq %rax, (%rsp)
leaq (,%rax,8), %rbp
movq %rbp, %rdi
callq 0x8460
movq (%r14), %rcx
movq %rax, 0x18(%rcx)
movq (%r14), %rax
movq 0x18(%rax), %r12
testq %r12, %r12
je 0xb57f
movq %rbp, 0x8(%rsp)
movl %r13d, %ebp
imull %ebp, %ebp
shlq $0x2, %rbp
movq %rbp, %rdi
callq 0x8460
movq %rax, (%r12)
movq (%r14), %r12
movq 0x18(%r12), %rax
cmpq $0x0, (%rax)
je 0xb5b9
cmpl $0x2, %r13d
movq 0x8(%rsp), %rbp
jl 0xb482
movl %r13d, %eax
movl $0x1, %ecx
movq (%rsp), %rdx
leaq (,%rdx,4), %rdx
movq (%r14), %rsi
movq 0x18(%rsi), %rsi
movq -0x8(%rsi,%rcx,8), %rdi
addq %rdx, %rdi
movq %rdi, (%rsi,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0xb464
movq (%r14), %r12
movq (%rsp), %r13
shlq $0x2, %r13
movq %r13, %rdi
callq 0x8460
movq %rax, 0x20(%r12)
movq (%r14), %r12
cmpq $0x0, 0x20(%r12)
je 0xb5f3
movq %r13, %rdi
callq 0x8460
movq %rax, 0x28(%r12)
movq (%r14), %r12
cmpq $0x0, 0x28(%r12)
je 0xb62e
movq %r13, %rdi
callq 0x8460
movq %rax, 0x30(%r12)
movq %r13, %rcx
movq (%r14), %r13
cmpq $0x0, 0x30(%r13)
je 0xb669
movslq %r15d, %r12
shlq $0x2, %r12
movq %r12, %rdi
callq 0x8460
movq %rax, 0x38(%r13)
movq (%r14), %r13
cmpq $0x0, 0x38(%r13)
je 0xb6a1
movq %rbp, %rdi
callq 0x8460
movq %rax, 0x48(%r13)
movq (%r14), %r12
cmpq $0x0, 0x48(%r12)
je 0xb6dc
shll $0x3, %r15d
movslq %r15d, %r15
shlq $0x2, %r15
movq %r15, %rdi
callq 0x8460
movq %rax, 0x40(%r12)
movq (%r14), %rcx
xorl %eax, %eax
cmpq $0x0, 0x40(%rcx)
jne 0xb3d8
leaq 0xe2ab9(%rip), %rsi     # 0xee004
leaq 0xe339c(%rip), %rdx     # 0xee8ee
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %r15d, %ecx
xorl %eax, %eax
callq 0x30af0
leaq 0xe2ac9(%rip), %rsi     # 0xee034
leaq 0xe32c0(%rip), %rdx     # 0xee832
movq %rbx, %rdi
movl $0x3a, %ecx
jmp 0xb3c9
leaq 0xe2a7e(%rip), %rsi     # 0xee004
leaq 0xe331c(%rip), %rdx     # 0xee8a9
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x30af0
leaq 0xe2a8f(%rip), %rsi     # 0xee034
leaq 0xe3286(%rip), %rdx     # 0xee832
movq %rbx, %rdi
movl $0x2f, %ecx
jmp 0xb3c9
leaq 0xe2a44(%rip), %rsi     # 0xee004
leaq 0xe32eb(%rip), %rdx     # 0xee8b2
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x30af0
leaq 0xe2a55(%rip), %rsi     # 0xee034
leaq 0xe324c(%rip), %rdx     # 0xee832
movq %rbx, %rdi
movl $0x31, %ecx
jmp 0xb3c9
leaq 0xe2a0a(%rip), %rsi     # 0xee004
leaq 0xe32bd(%rip), %rdx     # 0xee8be
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %r13d, %ecx
xorl %eax, %eax
callq 0x30af0
leaq 0xe2a1a(%rip), %rsi     # 0xee034
leaq 0xe3211(%rip), %rdx     # 0xee832
movq %rbx, %rdi
movl $0x34, %ecx
jmp 0xb3c9
leaq 0xe29cf(%rip), %rsi     # 0xee004
leaq 0xe328f(%rip), %rdx     # 0xee8cb
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %r13d, %ecx
xorl %eax, %eax
callq 0x30af0
leaq 0xe29df(%rip), %rsi     # 0xee034
leaq 0xe31d6(%rip), %rdx     # 0xee832
movq %rbx, %rdi
movl $0x35, %ecx
jmp 0xb3c9
leaq 0xe2994(%rip), %rsi     # 0xee004
leaq 0xe325f(%rip), %rdx     # 0xee8d6
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
leaq 0xe29a7(%rip), %rsi     # 0xee034
leaq 0xe319e(%rip), %rdx     # 0xee832
movq %rbx, %rdi
movl $0x36, %ecx
jmp 0xb3c9
leaq 0xe295c(%rip), %rsi     # 0xee004
leaq 0xe322f(%rip), %rdx     # 0xee8de
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %r12d, %ecx
xorl %eax, %eax
callq 0x30af0
leaq 0xe296c(%rip), %rsi     # 0xee034
leaq 0xe3163(%rip), %rdx     # 0xee832
movq %rbx, %rdi
movl $0x38, %ecx
jmp 0xb3c9
leaq 0xe2921(%rip), %rsi     # 0xee004
leaq 0xe31fc(%rip), %rdx     # 0xee8e6
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x30af0
leaq 0xe2932(%rip), %rsi     # 0xee034
leaq 0xe3129(%rip), %rdx     # 0xee832
movq %rbx, %rdi
movl $0x39, %ecx
jmp 0xb3c9