// File: /workspace/github_c_makefile_star2_O0/PoulinV[P]AxiCLASS/build/../tools/sparse.c
// Function: sp_splsolve
int sp_splsolve(sp_mat *G, sp_mat *B, int k, int*xik, int top, double *x, int *pinv){
	int j, J, p, q, px, n, *Gp, *Gi, *Bp, *Bi;
	double *Gx, *Bx;
	Gp = G->Ap; Gi = G->Ai; Gx = G->Ax;
	Bp = B->Ap; Bi = B->Ai; Bx = B->Ax;
	n = G->ncols;

	for (p=top; p<n; p++) x[xik[p]] = 0;
	for (p=Bp[k];p<Bp[k+1];p++) x[Bi[p]] = Bx[p];
	for (px=top; px<n; px++){
		j=xik[px];
		J = pinv[j];
		if (J<0) continue;
		x[j] /= Gx[Gp[J]];
		p = Gp[J]+1;
		q = Gp[J+1];
		for( ;p<q; p++){
			x[Gi[p]] -=Gx[p] * x[j];
		}
	}
	return _SUCCESS_;
}

// Assembly:
movq 0x8(%rsp), %rax
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movl %edx, -0x14(%rsp)
movq %rcx, -0x20(%rsp)
movl %r8d, -0x24(%rsp)
movq %r9, -0x30(%rsp)
movq -0x8(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x50(%rsp)
movq -0x8(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x58(%rsp)
movq -0x8(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x70(%rsp)
movq -0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x60(%rsp)
movq -0x10(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x68(%rsp)
movq -0x10(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x78(%rsp)
movq -0x8(%rsp), %rax
movl (%rax), %eax
movl %eax, -0x48(%rsp)
movl -0x24(%rsp), %eax
movl %eax, -0x3c(%rsp)
movl -0x3c(%rsp), %eax
cmpl -0x48(%rsp), %eax
jge 0xbd4b
movq -0x30(%rsp), %rax
movq -0x20(%rsp), %rcx
movslq -0x3c(%rsp), %rdx
movslq (%rcx,%rdx,4), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl -0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rsp)
jmp 0xbd19
movq -0x60(%rsp), %rax
movslq -0x14(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x3c(%rsp)
movl -0x3c(%rsp), %eax
movq -0x60(%rsp), %rcx
movl -0x14(%rsp), %edx
addl $0x1, %edx
movslq %edx, %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0xbda8
movq -0x78(%rsp), %rax
movslq -0x3c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x30(%rsp), %rax
movq -0x68(%rsp), %rcx
movslq -0x3c(%rsp), %rdx
movslq (%rcx,%rdx,4), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rsp)
jmp 0xbd5c
movl -0x24(%rsp), %eax
movl %eax, -0x44(%rsp)
movl -0x44(%rsp), %eax
cmpl -0x48(%rsp), %eax
jge 0xbec9
movq -0x20(%rsp), %rax
movslq -0x44(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x34(%rsp)
movq 0x8(%rsp), %rax
movslq -0x34(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x38(%rsp)
cmpl $0x0, -0x38(%rsp)
jge 0xbdec
jmp 0xbeb9
movq -0x70(%rsp), %rax
movq -0x50(%rsp), %rcx
movslq -0x38(%rsp), %rdx
movslq (%rcx,%rdx,4), %rcx
movsd (%rax,%rcx,8), %xmm1
movq -0x30(%rsp), %rax
movslq -0x34(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movq -0x50(%rsp), %rax
movslq -0x38(%rsp), %rcx
movl (%rax,%rcx,4), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rsp)
movq -0x50(%rsp), %rax
movl -0x38(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x40(%rsp)
movl -0x3c(%rsp), %eax
cmpl -0x40(%rsp), %eax
jge 0xbeb7
movq -0x70(%rsp), %rax
movslq -0x3c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x30(%rsp), %rax
movslq -0x34(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm2
movq -0x30(%rsp), %rax
movq -0x58(%rsp), %rcx
movslq -0x3c(%rsp), %rdx
movslq (%rcx,%rdx,4), %rcx
movsd (%rax,%rcx,8), %xmm1
movq %xmm0, %rdx
movabsq $-0x8000000000000000, %rsi # imm = 0x8000000000000000
xorq %rsi, %rdx
movq %rdx, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl -0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rsp)
jmp 0xbe46
jmp 0xbeb9
movl -0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rsp)
jmp 0xbdb0
xorl %eax, %eax
retq
nopl (%rax)