// File: /workspace/github_c_makefile_star2_O0/markpeerdeman[P]mbemm/src/emath/solve.c
// Function: frontsolver
void frontsolver(matrix A, vector f, vector res)
{ int i,j,k;

  /* setup the elimination matrix: */
  for (i=1; i<=A->rows; i++)
  { for (k=1; k<i; k++)
	{ V(f,i)-=V(f,k)*M(A,i,k)/M(A,k,k);
	  for (j=1; j<=A->rows; j++)
	  { M(A,i,j)-=M(A,i,k)*M(A,k,j)/M(A,k,k);
	  }
	}
  }

  /* perform the backsubstitution: */
  for (i=A->rows; i>=1; i--)
  { V(res,i)=V(f,i)/M(A,i,i);
	for (k=A->rows; k>i; k--)
	{ V(res,i)-=M(A,i,k)*V(res,k)/M(A,i,i); 
	}
  }

}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq %rdx, -0x18(%rsp)
movl $0x1, -0x1c(%rsp)
movl -0x1c(%rsp), %eax
movq -0x8(%rsp), %rcx
cmpl (%rcx), %eax
jg 0x2bdb
movl $0x1, -0x24(%rsp)
movl -0x24(%rsp), %eax
cmpl -0x1c(%rsp), %eax
jge 0x2bc9
movq -0x10(%rsp), %rax
movq 0x8(%rax), %rax
movslq -0x24(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm1
movq -0x8(%rsp), %rax
movq 0x8(%rax), %rax
movslq -0x1c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x24(%rsp), %rcx
mulsd (%rax,%rcx,8), %xmm1
movq -0x8(%rsp), %rax
movq 0x8(%rax), %rax
movslq -0x24(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x24(%rsp), %rcx
divsd (%rax,%rcx,8), %xmm1
movq -0x10(%rsp), %rax
movq 0x8(%rax), %rax
movslq -0x1c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl $0x1, -0x20(%rsp)
movl -0x20(%rsp), %eax
movq -0x8(%rsp), %rcx
cmpl (%rcx), %eax
jg 0x2bb7
movq -0x8(%rsp), %rax
movq 0x8(%rax), %rax
movslq -0x1c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x24(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm1
movq -0x8(%rsp), %rax
movq 0x8(%rax), %rax
movslq -0x24(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x20(%rsp), %rcx
mulsd (%rax,%rcx,8), %xmm1
movq -0x8(%rsp), %rax
movq 0x8(%rax), %rax
movslq -0x24(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x24(%rsp), %rcx
divsd (%rax,%rcx,8), %xmm1
movq -0x8(%rsp), %rax
movq 0x8(%rax), %rax
movslq -0x1c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x20(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl -0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rsp)
jmp 0x2b1d
jmp 0x2bb9
movl -0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rsp)
jmp 0x2aa0
jmp 0x2bcb
movl -0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rsp)
jmp 0x2a87
movq -0x8(%rsp), %rax
movl (%rax), %eax
movl %eax, -0x1c(%rsp)
cmpl $0x1, -0x1c(%rsp)
jl 0x2cce
movq -0x10(%rsp), %rax
movq 0x8(%rax), %rax
movslq -0x1c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x8(%rsp), %rax
movq 0x8(%rax), %rax
movslq -0x1c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x1c(%rsp), %rcx
divsd (%rax,%rcx,8), %xmm0
movq -0x18(%rsp), %rax
movq 0x8(%rax), %rax
movslq -0x1c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq -0x8(%rsp), %rax
movl (%rax), %eax
movl %eax, -0x24(%rsp)
movl -0x24(%rsp), %eax
cmpl -0x1c(%rsp), %eax
jle 0x2cbc
movq -0x8(%rsp), %rax
movq 0x8(%rax), %rax
movslq -0x1c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x24(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm1
movq -0x18(%rsp), %rax
movq 0x8(%rax), %rax
movslq -0x24(%rsp), %rcx
mulsd (%rax,%rcx,8), %xmm1
movq -0x8(%rsp), %rax
movq 0x8(%rax), %rax
movslq -0x1c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x1c(%rsp), %rcx
divsd (%rax,%rcx,8), %xmm1
movq -0x18(%rsp), %rax
movq 0x8(%rax), %rax
movslq -0x1c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl -0x24(%rsp), %eax
addl $-0x1, %eax
movl %eax, -0x24(%rsp)
jmp 0x2c3e
jmp 0x2cbe
movl -0x1c(%rsp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rsp)
jmp 0x2be6
retq
nop