// File: /workspace/github_c_makefile_star2_O2/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, %r12d
movq %rdi, %r14
pushq $0x50
popq %rdi
callq 0x8490
movq %rax, (%r14)
testq %rax, %rax
je 0x9e0b
movq %rax, %rdi
leal 0x1(%r12), %r13d
movl %r13d, %eax
imull %r12d, %eax
pushq $0x2
popq %rcx
cltd
idivl %ecx
movl %eax, %ebp
movl %r12d, (%rdi)
addq $0x8, %rdi
movl %r12d, %esi
movl %r12d, %edx
movl %eax, %ecx
movq %rbx, %r8
callq 0x9bb0
testl %eax, %eax
je 0x9e3d
leaq 0xdb610(%rip), %rsi     # 0xe53f0
leaq 0xdba58(%rip), %rdx     # 0xe583f
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0xdb234(%rip), %rsi     # 0xe5034
leaq 0xdba2b(%rip), %rdx     # 0xe5832
pushq $0x2c
jmp 0x9e88
leaq 0xdb1f2(%rip), %rsi     # 0xe5004
leaq 0xdba14(%rip), %rdx     # 0xe582d
leaq 0x10(%rsp), %r14
pushq $0x50
popq %rcx
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
leaq 0xdb202(%rip), %rsi     # 0xe5034
leaq 0xdb9f9(%rip), %rdx     # 0xe5832
pushq $0x27
jmp 0x9e88
movq (%r14), %rdi
addq $0x10, %rdi
movl %r12d, %esi
movl %r12d, %edx
movl %ebp, %ecx
movq %rbx, %r8
callq 0x9bb0
testl %eax, %eax
je 0x9eab
leaq 0xdb591(%rip), %rsi     # 0xe53f0
leaq 0xdba0e(%rip), %rdx     # 0xe5874
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0xdb1b5(%rip), %rsi     # 0xe5034
leaq 0xdb9ac(%rip), %rdx     # 0xe5832
pushq $0x2e
popq %rcx
movq %rbx, %rdi
movq %r14, %r8
xorl %eax, %eax
callq 0x2e014
pushq $0x1
popq %rax
addq $0x818, %rsp            # imm = 0x818
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movslq %r12d, %rbp
leaq (,%rbp,8), %rdi
movq %rdi, 0x8(%rsp)
callq 0x8490
movq (%r14), %rcx
movq %rax, 0x18(%rcx)
movq (%r14), %rax
movq 0x18(%rax), %r15
testq %r15, %r15
je 0xa012
imull %r12d, %r12d
shlq $0x2, %r12
movq %r12, %rdi
callq 0x8490
movq %rax, (%r15)
movq (%r14), %rax
movq 0x18(%rax), %rax
cmpq $0x0, (%rax)
je 0xa049
pushq $0x1
popq %rax
leaq (,%rbp,4), %r12
cmpq %rbp, %rax
jge 0x9f23
movq (%r14), %rcx
movq 0x18(%rcx), %rcx
movq -0x8(%rcx,%rax,8), %rdx
addq %r12, %rdx
movq %rdx, (%rcx,%rax,8)
incq %rax
jmp 0x9f06
movq %r12, %rdi
callq 0x8490
movq (%r14), %rcx
movq %rax, 0x20(%rcx)
movq (%r14), %r15
cmpq $0x0, 0x20(%r15)
je 0xa07e
movq %r12, %rdi
callq 0x8490
movq %rax, 0x28(%r15)
movq (%r14), %r15
cmpq $0x0, 0x28(%r15)
je 0xa0b3
movq %r12, %rdi
callq 0x8490
movq %rax, 0x30(%r15)
movq (%r14), %r15
cmpq $0x0, 0x30(%r15)
je 0xa0e8
movslq %r13d, %r12
shlq $0x2, %r12
movq %r12, %rdi
callq 0x8490
movq %rax, 0x38(%r15)
movq (%r14), %r15
cmpq $0x0, 0x38(%r15)
je 0xa11d
movq 0x8(%rsp), %rbp
movq %rbp, %rdi
callq 0x8490
movq %rax, 0x48(%r15)
movq (%r14), %r12
cmpq $0x0, 0x48(%r12)
je 0xa152
shll $0x3, %r13d
movslq %r13d, %r15
shlq $0x2, %r15
movq %r15, %rdi
callq 0x8490
movq %rax, 0x40(%r12)
movq (%r14), %rcx
xorl %eax, %eax
cmpq $0x0, 0x40(%rcx)
jne 0x9e99
leaq 0xdb020(%rip), %rsi     # 0xe5004
leaq 0xdb903(%rip), %rdx     # 0xe58ee
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %r15d, %ecx
xorl %eax, %eax
callq 0x2e014
leaq 0xdb030(%rip), %rsi     # 0xe5034
leaq 0xdb827(%rip), %rdx     # 0xe5832
pushq $0x3a
jmp 0x9e88
leaq 0xdafeb(%rip), %rsi     # 0xe5004
leaq 0xdb889(%rip), %rdx     # 0xe58a9
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq 0x8(%rsp), %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0xdaff9(%rip), %rsi     # 0xe5034
leaq 0xdb7f0(%rip), %rdx     # 0xe5832
pushq $0x2f
jmp 0x9e88
leaq 0xdafb4(%rip), %rsi     # 0xe5004
leaq 0xdb85b(%rip), %rdx     # 0xe58b2
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %r12d, %ecx
xorl %eax, %eax
callq 0x2e014
leaq 0xdafc4(%rip), %rsi     # 0xe5034
leaq 0xdb7bb(%rip), %rdx     # 0xe5832
pushq $0x31
jmp 0x9e88
leaq 0xdaf7f(%rip), %rsi     # 0xe5004
leaq 0xdb832(%rip), %rdx     # 0xe58be
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %r12d, %ecx
xorl %eax, %eax
callq 0x2e014
leaq 0xdaf8f(%rip), %rsi     # 0xe5034
leaq 0xdb786(%rip), %rdx     # 0xe5832
pushq $0x34
jmp 0x9e88
leaq 0xdaf4a(%rip), %rsi     # 0xe5004
leaq 0xdb80a(%rip), %rdx     # 0xe58cb
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %r12d, %ecx
xorl %eax, %eax
callq 0x2e014
leaq 0xdaf5a(%rip), %rsi     # 0xe5034
leaq 0xdb751(%rip), %rdx     # 0xe5832
pushq $0x35
jmp 0x9e88
leaq 0xdaf15(%rip), %rsi     # 0xe5004
leaq 0xdb7e0(%rip), %rdx     # 0xe58d6
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %r12d, %ecx
xorl %eax, %eax
callq 0x2e014
leaq 0xdaf25(%rip), %rsi     # 0xe5034
leaq 0xdb71c(%rip), %rdx     # 0xe5832
pushq $0x36
jmp 0x9e88
leaq 0xdaee0(%rip), %rsi     # 0xe5004
leaq 0xdb7b3(%rip), %rdx     # 0xe58de
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %r12d, %ecx
xorl %eax, %eax
callq 0x2e014
leaq 0xdaef0(%rip), %rsi     # 0xe5034
leaq 0xdb6e7(%rip), %rdx     # 0xe5832
pushq $0x38
jmp 0x9e88
leaq 0xdaeab(%rip), %rsi     # 0xe5004
leaq 0xdb786(%rip), %rdx     # 0xe58e6
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x2e014
leaq 0xdaebc(%rip), %rsi     # 0xe5034
leaq 0xdb6b3(%rip), %rdx     # 0xe5832
pushq $0x39
jmp 0x9e88