// File: /workspace/github_c_makefile_star2_O1/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 0xb35e
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 0xb0e4
testl %eax, %eax
je 0xb398
leaq 0xe60c6(%rip), %rsi     # 0xf13f0
leaq 0xe650e(%rip), %rdx     # 0xf183f
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0xe5cea(%rip), %rsi     # 0xf1034
leaq 0xe64e1(%rip), %rdx     # 0xf1832
movq %rbx, %rdi
movl $0x2c, %ecx
jmp 0xb3e9
leaq 0xe5c9f(%rip), %rsi     # 0xf1004
leaq 0xe64c1(%rip), %rdx     # 0xf182d
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl $0x50, %ecx
xorl %eax, %eax
callq 0x30c2c
leaq 0xe5cad(%rip), %rsi     # 0xf1034
leaq 0xe64a4(%rip), %rdx     # 0xf1832
movq %rbx, %rdi
movl $0x27, %ecx
jmp 0xb3e9
movq (%r14), %rdi
addq $0x10, %rdi
movl %r13d, %esi
movl %r13d, %edx
movl %ebp, %ecx
movq %rbx, %r8
callq 0xb0e4
testl %eax, %eax
je 0xb40a
leaq 0xe6036(%rip), %rsi     # 0xf13f0
leaq 0xe64b3(%rip), %rdx     # 0xf1874
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0xe5c5a(%rip), %rsi     # 0xf1034
leaq 0xe6451(%rip), %rdx     # 0xf1832
movq %rbx, %rdi
movl $0x2e, %ecx
movq %r14, %r8
xorl %eax, %eax
callq 0x30c2c
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 0xb59d
movq %rbp, 0x8(%rsp)
movl %r13d, %ebp
imull %ebp, %ebp
shlq $0x2, %rbp
movq %rbp, %rdi
callq 0x8460
movq %rax, (%r12)
movq (%r14), %rax
movq 0x18(%rax), %rax
cmpq $0x0, (%rax)
je 0xb5d7
cmpl $0x2, %r13d
jl 0xb499
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 0xb47e
movq (%rsp), %r13
shlq $0x2, %r13
movq %r13, %rdi
callq 0x8460
movq (%r14), %rcx
movq %rax, 0x20(%rcx)
movq (%r14), %r12
cmpq $0x0, 0x20(%r12)
movq 0x8(%rsp), %rbp
je 0xb611
movq %r13, %rdi
callq 0x8460
movq %rax, 0x28(%r12)
movq (%r14), %r12
cmpq $0x0, 0x28(%r12)
je 0xb64c
movq %r13, %rdi
callq 0x8460
movq %rax, 0x30(%r12)
movq %r13, %rcx
movq (%r14), %r13
cmpq $0x0, 0x30(%r13)
je 0xb687
movslq %r15d, %r12
shlq $0x2, %r12
movq %r12, %rdi
callq 0x8460
movq %rax, 0x38(%r13)
movq (%r14), %r13
cmpq $0x0, 0x38(%r13)
je 0xb6bf
movq %rbp, %rdi
callq 0x8460
movq %rax, 0x48(%r13)
movq (%r14), %r12
cmpq $0x0, 0x48(%r12)
je 0xb6fa
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 0xb3f8
leaq 0xe5a9b(%rip), %rsi     # 0xf1004
leaq 0xe637e(%rip), %rdx     # 0xf18ee
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %r15d, %ecx
xorl %eax, %eax
callq 0x30c2c
leaq 0xe5aab(%rip), %rsi     # 0xf1034
leaq 0xe62a2(%rip), %rdx     # 0xf1832
movq %rbx, %rdi
movl $0x3a, %ecx
jmp 0xb3e9
leaq 0xe5a60(%rip), %rsi     # 0xf1004
leaq 0xe62fe(%rip), %rdx     # 0xf18a9
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x30c2c
leaq 0xe5a71(%rip), %rsi     # 0xf1034
leaq 0xe6268(%rip), %rdx     # 0xf1832
movq %rbx, %rdi
movl $0x2f, %ecx
jmp 0xb3e9
leaq 0xe5a26(%rip), %rsi     # 0xf1004
leaq 0xe62cd(%rip), %rdx     # 0xf18b2
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x30c2c
leaq 0xe5a37(%rip), %rsi     # 0xf1034
leaq 0xe622e(%rip), %rdx     # 0xf1832
movq %rbx, %rdi
movl $0x31, %ecx
jmp 0xb3e9
leaq 0xe59ec(%rip), %rsi     # 0xf1004
leaq 0xe629f(%rip), %rdx     # 0xf18be
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %r13d, %ecx
xorl %eax, %eax
callq 0x30c2c
leaq 0xe59fc(%rip), %rsi     # 0xf1034
leaq 0xe61f3(%rip), %rdx     # 0xf1832
movq %rbx, %rdi
movl $0x34, %ecx
jmp 0xb3e9
leaq 0xe59b1(%rip), %rsi     # 0xf1004
leaq 0xe6271(%rip), %rdx     # 0xf18cb
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %r13d, %ecx
xorl %eax, %eax
callq 0x30c2c
leaq 0xe59c1(%rip), %rsi     # 0xf1034
leaq 0xe61b8(%rip), %rdx     # 0xf1832
movq %rbx, %rdi
movl $0x35, %ecx
jmp 0xb3e9
leaq 0xe5976(%rip), %rsi     # 0xf1004
leaq 0xe6241(%rip), %rdx     # 0xf18d6
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30c2c
leaq 0xe5989(%rip), %rsi     # 0xf1034
leaq 0xe6180(%rip), %rdx     # 0xf1832
movq %rbx, %rdi
movl $0x36, %ecx
jmp 0xb3e9
leaq 0xe593e(%rip), %rsi     # 0xf1004
leaq 0xe6211(%rip), %rdx     # 0xf18de
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %r12d, %ecx
xorl %eax, %eax
callq 0x30c2c
leaq 0xe594e(%rip), %rsi     # 0xf1034
leaq 0xe6145(%rip), %rdx     # 0xf1832
movq %rbx, %rdi
movl $0x38, %ecx
jmp 0xb3e9
leaq 0xe5903(%rip), %rsi     # 0xf1004
leaq 0xe61de(%rip), %rdx     # 0xf18e6
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x30c2c
leaq 0xe5914(%rip), %rsi     # 0xf1034
leaq 0xe610b(%rip), %rdx     # 0xf1832
movq %rbx, %rdi
movl $0x39, %ecx
jmp 0xb3e9