// File: /workspace/github_c_makefile_star2_O0/markpeerdeman[P]mbemm/src/emath/solve.c
// Function: solve_gauss
void solve_gauss(const matrix A,const vector F )
{ int i,j,k,l,m,n = F->rows;
  double c,tmp;
  double fabsc, fabsM;
  evaluate_level(GREEN,38);
  tijdvalkje(0,A);
  check_dimensions(A, F);
  for (k=0; k<n; k++)
  { /* divide row by diagonal coefficient: */
    c = M(A,k,k); l=k;
    /* find largest coefficient for elimination: */
    for (m=k; m<n; m++)
    { fabsc=fabs(c);
	  fabsM=fabs(M(A,m,k));
	  /* if (fabs(M(A,m,k))>=fabs(c)) */
	  if (fabsM>=fabsc)
      { c = M(A,m,k);
	    l = m;
      }
    }
    /* if (fabs(c)<=TOL) 
      evaluate_level(RED,33); */
	/* change rows if nescessary: */
    if (k!=l)
    { 
      for (m=k; m<n; m++)
      { tmp = M(A,l,m);
	    M(A,l,m) = M(A,k,m);
	    M(A,k,m) = tmp;
      }
      tmp = V(F,l);
      V(F,l) = V(F,k);
      V(F,k) = tmp;
    }

    /* divide current row by diagonal coefficient: */
	M(A,k,k)=1.0;
	V(F,k) = V(F,k) / c;
    for (i=k+1; i<n; i++)
      {  M(A,k,i) = M(A,k,i) / c;
      }

    /* divide remaining rows by diagonal coefficient and eliminate: */
    for (j=k+1; j<n; j++)
    { c = M(A,j,k);
	  M(A,j,k)=0.0;
	  V(F,j)=V(F,j)-c*V(F,k);
      for (i=k+1; i<n; i++)
	  { M(A,j,i)=M(A,j,i)-c*M(A,k,i);
	  }
    }
	tijdvalkje(k+2,A);
  }

  /* apply backsubstitution to compute the remaining unknowns: */
  for (j=n-2; j>=0; j--)
  {
	for (i=n-1; i>j; i--)
	  { V(F,j) = V(F,j) - M(A,j,i) * V(F,i);
	  }
  }

  tijdvalkje(-1,A);

  evaluate_level(GREEN,34);
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq 0x38(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x20(%rsp)
xorl %edi, %edi
movl $0x26, %esi
callq 0x15200
movq 0x40(%rsp), %rsi
xorl %edi, %edi
callq 0x1270
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x13e0
movl $0x0, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
cmpl 0x20(%rsp), %eax
jge 0x3137
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x2c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x2c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x18(%rsp)
movl 0x2c(%rsp), %eax
movl %eax, 0x28(%rsp)
movl 0x2c(%rsp), %eax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
cmpl 0x20(%rsp), %eax
jge 0x2df2
movsd 0x18(%rsp), %xmm0
movaps 0x1629d(%rip), %xmm1    # 0x19010
pand %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x24(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x2c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movaps 0x16270(%rip), %xmm1    # 0x19010
pand %xmm1, %xmm0
movsd %xmm0, (%rsp)
movsd (%rsp), %xmm0
ucomisd 0x8(%rsp), %xmm0
jb 0x2de0
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x24(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x2c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x18(%rsp)
movl 0x24(%rsp), %eax
movl %eax, 0x28(%rsp)
jmp 0x2de2
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x2d58
movl 0x2c(%rsp), %eax
cmpl 0x28(%rsp), %eax
je 0x2efa
movl 0x2c(%rsp), %eax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
cmpl 0x20(%rsp), %eax
jge 0x2ea2
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x28(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x24(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x2c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x24(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x28(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x24(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd 0x10(%rsp), %xmm0
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x2c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x24(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x2e08
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x28(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x2c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x28(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd 0x10(%rsp), %xmm0
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x2c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x2c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x2c(%rsp), %rcx
movsd 0x160ef(%rip), %xmm0    # 0x19008
movsd %xmm0, (%rax,%rcx,8)
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x2c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
divsd 0x18(%rsp), %xmm0
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x2c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
cmpl 0x20(%rsp), %eax
jge 0x2faa
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x2c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x34(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
divsd 0x18(%rsp), %xmm0
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x2c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x34(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
jmp 0x2f55
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x30(%rsp)
movl 0x30(%rsp), %eax
cmpl 0x20(%rsp), %eax
jge 0x3116
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x30(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x2c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x18(%rsp)
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x30(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x2c(%rsp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x30(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm1
movsd 0x18(%rsp), %xmm0
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x2c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm2
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x30(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
cmpl 0x20(%rsp), %eax
jge 0x3104
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x30(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x34(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm1
movsd 0x18(%rsp), %xmm0
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x2c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x34(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm2
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x30(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x34(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
jmp 0x306d
jmp 0x3106
movl 0x30(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x30(%rsp)
jmp 0x2fb5
movl 0x2c(%rsp), %edi
addl $0x2, %edi
movq 0x40(%rsp), %rsi
callq 0x1270
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x2d18
movl 0x20(%rsp), %eax
subl $0x2, %eax
movl %eax, 0x30(%rsp)
cmpl $0x0, 0x30(%rsp)
jl 0x31fc
movl 0x20(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
cmpl 0x30(%rsp), %eax
jle 0x31ea
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x30(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm1
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x30(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x34(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x34(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm2
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x30(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x34(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x34(%rsp)
jmp 0x3158
jmp 0x31ec
movl 0x30(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x30(%rsp)
jmp 0x3142
movq 0x40(%rsp), %rsi
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1270
xorl %edi, %edi
movl $0x22, %esi
callq 0x15200
addq $0x48, %rsp
retq
nopl (%rax)