// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/matrix.c
// Function: elmhes
int* elmhes(matrix a)
{
 int m, i, j, *perm;
 double x, y;
 perm = safemalloc(a.row * sizeof(int), "elmhes", 3);
 for (m = 1; m < a.row - 1; m++) 
  {	
   x = 0.0;
   i = m;
   for (j = m; j < a.row; j++) 
    {	
     if (fabs(a.values[j][m-1]) > fabs(x)) 
      { 
       x = a.values[j][m-1];
       i = j;   
      }
    }
   perm[m] = i; 
   if (i != m) 
    {
     for (j = m - 1; j < a.row; j++) 
       swap_double(&(a.values[i][j]), &(a.values[m][j])); 
     for (j = 0; j < a.row; j++) 
       swap_double(&(a.values[j][i]), &(a.values[j][m]));
    } 
   if (x != 0.0) 
    {
     for (i = m + 1; i < a.row; i++) 
      { 
       y = a.values[i][m-1]; 
       if (y != 0.0) 
        {
         y /= x; 
         a.values[i][m - 1] = y; 
         for (j = m; j < a.row; j++) 
           a.values[i][j] -= y * a.values[m][j]; 
         for (j = 0; j < a.row; j++) 
           a.values[j][m] += y * a.values[j][i];
        }
      }
    }
  }
 return perm;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x8(%rbp)
movslq -0x10(%rbp), %rdi
shlq $0x2, %rdi
leaq 0x88e14(%rip), %rsi     # 0xe6d23
movl $0x3, %edx
callq 0x52d70
movq %rax, -0x28(%rbp)
movl $0x1, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl -0x10(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x5e1ec
xorps %xmm0, %xmm0
movsd %xmm0, -0x30(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x5dfbe
movq -0x8(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movaps 0x84eee(%rip), %xmm1    # 0xe2e60
pand %xmm1, %xmm0
movsd -0x30(%rbp), %xmm1
movaps 0x84ede(%rip), %xmm2    # 0xe2e60
pand %xmm2, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x5dfb1
movq -0x8(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x30(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x5dfb3
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x5df49
movl -0x18(%rbp), %edx
movq -0x28(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
je 0x5e076
movl -0x14(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x5e027
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq -0x1c(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movslq -0x1c(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
callq 0x53400
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x5dfe1
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x5e074
movq -0x8(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq -0x18(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x8(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movslq -0x14(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
callq 0x53400
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x5e02e
jmp 0x5e076
movsd -0x30(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x5e08b
jp 0x5e08b
jmp 0x5e1dc
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x5e1da
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x38(%rbp)
movsd -0x38(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x5e0d4
jp 0x5e0d4
jmp 0x5e1ca
movsd -0x30(%rbp), %xmm1
movsd -0x38(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x38(%rbp)
movsd -0x38(%rbp), %xmm0
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x14(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x5e172
movsd -0x38(%rbp), %xmm0
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x1c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm2
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x1c(%rbp), %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 -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x5e10c
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x5e1c8
movsd -0x38(%rbp), %xmm0
movq -0x8(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x18(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm2
movq -0x8(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x14(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x5e179
jmp 0x5e1ca
jmp 0x5e1cc
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x5e094
jmp 0x5e1dc
jmp 0x5e1de
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x5df24
movq -0x28(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)