user: Please show me the C implementation that matches the assembly code listed below:

```asm
<solve_nxn_gepp>:
  endbr64
  push   %r15
  mov    %edi,%r8d
  mov    %rcx,%r9
  mov    %rsi,%rdi
  push   %r14
  lea    -0x1(%r8),%eax
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdx,%rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %eax,0x34(%rsp)
  test   %r8d,%r8d
  jle    L90
  movslq %r8d,%r15
  mov    %rcx,0x38(%rsp)
  lea    -0x2(%r8),%eax
  movq   D2(%rip),%xmm3
  lea    0x1(%r15),%rbx
  mov    %r15,%r12
  mov    %r15,%r14
  mov    $0x1,%r13d
  neg    %r12
  mov    %rbx,0x28(%rsp)
  mov    %eax,%r9d
  shl    $0x3,%r12
  lea    (%rsi,%r12,1),%r10
  cs nopw 0x0(%rax,%rax,1)
L25:
  movsd  (%r10,%r14,8),%xmm1
  lea    -0x1(%r13),%edx
  mov    %r13d,%ebx
  cmp    %r15,%r13
  je     L88
  lea    0x0(,%r14,8),%r11
  mov    %edx,%ecx
  lea    (%rdi,%r11,1),%rax
  nopl   0x0(%rax)
L46:
  movsd  (%rax),%xmm0
  andpd  %xmm3,%xmm0
  comisd %xmm1,%xmm0
  maxsd  %xmm1,%xmm0
  cmova  %ebx,%ecx
  add    $0x1,%ebx
  movapd %xmm0,%xmm1
  sub    %r12,%rax
  cmp    %ebx,%r8d
  jne    L46
  mov    %rbp,%rsi
  mov    %r10,0x20(%rsp)
  mov    %r9d,0x30(%rsp)
  mov    %r11,0x18(%rsp)
  mov    %r8d,0x14(%rsp)
  mov    %rdi,0x8(%rsp)
  call   <swap_row@plt>
  mov    0x30(%rsp),%eax
  mov    %r15,%rdx
  mov    %r13,%rsi
  mov    0x8(%rsp),%rdi
  mov    0x18(%rsp),%r11
  neg    %rdx
  mov    %rax,%r9
  mov    0x20(%rsp),%r10
  add    %r14,%rax
  mov    0x14(%rsp),%r8d
  movq   D2(%rip),%xmm3
  lea    0x8(%rdi,%r11,1),%r11
  lea    0x10(%rdi,%rax,8),%rcx
  nopl   0x0(%rax)
L5:
  mov    %r11,%rax
  movsd  -0x8(%r11),%xmm2
  divsd  (%r10,%r14,8),%xmm2
  nopw   0x0(%rax,%rax,1)
L28:
  movsd  (%rax,%rdx,8),%xmm1
  movsd  (%rax),%xmm0
  add    $0x8,%rax
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rax)
  cmp    %rcx,%rax
  jne    L28
  movq   $0x0,-0x8(%r11)
  sub    %r12,%rax
  sub    %r12,%r11
  movsd  0x0(%rbp,%rsi,8),%xmm0
  mulsd  -0x8(%rbp,%r13,8),%xmm2
  sub    %r15,%rdx
  mov    %rax,%rcx
  subsd  %xmm2,%xmm0
  movsd  %xmm0,0x0(%rbp,%rsi,8)
  add    $0x1,%rsi
  cmp    %esi,%ebx
  jg     L5
  add    $0x1,%r13
  sub    $0x1,%r9d
  add    0x28(%rsp),%r14
  jmp    L25
L88:
  mov    0x34(%rsp),%ecx
  mov    0x38(%rsp),%r9
  mov    %rbp,%rsi
  mov    %r8d,0x14(%rsp)
  mov    %rdi,0x8(%rsp)
  mov    %ecx,%edx
  mov    %r9,0x18(%rsp)
  call   <swap_row@plt>
  mov    0x8(%rsp),%rdi
  mov    0x14(%rsp),%r8d
  mov    0x18(%rsp),%r9
L59:
  movslq 0x34(%rsp),%rbx
  mov    %r8d,%r11d
  not    %r11d
  mov    %ebx,%eax
  movslq %r11d,%r11
  mov    %rbx,%rsi
  imul   %r8d,%eax
  neg    %r8d
  shl    $0x3,%r11
  movslq %r8d,%r8
  shl    $0x3,%r8
  cltq
  lea    (%rax,%rbx,1),%rdx
  lea    (%rdi,%rdx,8),%r10
  lea    (%rdi,%rax,8),%rdx
  mov    %ebx,%edi
  nopw   0x0(%rax,%rax,1)
L92:
  movsd  0x0(%rbp,%rsi,8),%xmm1
  mov    %esi,%ecx
  cmp    %edi,%esi
  jge    L62
  mov    %rbx,%rax
  nop
L48:
  movsd  (%r9,%rax,8),%xmm0
  mulsd  (%rdx,%rax,8),%xmm0
  sub    $0x1,%rax
  subsd  %xmm0,%xmm1
  cmp    %eax,%ecx
  jl     L48
L62:
  divsd  (%r10),%xmm1
  movsd  %xmm1,(%r9,%rsi,8)
  sub    $0x1,%rsi
  add    %r11,%r10
  add    %r8,%rdx
  test   %esi,%esi
  jns    L92
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L90:
  mov    0x34(%rsp),%eax
  test   %eax,%eax
  jns    L59
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D2
type_infered: qword

tool: D2: 9223372036854775807

assistant: ```c
void solve_nxn_gepp(int n, double *a, double *b, double *x) {
  int j, col, row, max_row, dia;
  double max, tmp;
  for (dia = 0; dia < n; dia++) {
    max_row = dia, max = (*(a + ((dia) * (n) + (dia))));
    for (row = dia + 1; row < n; row++)
      if ((tmp = fabs((*(a + ((row) * (n) + (dia)))))) > max)
        max_row = row, max = tmp;
    swap_row(a, b, dia, max_row, n);
    for (row = dia + 1; row < n; row++) {
      tmp = (*(a + ((row) * (n) + (dia)))) / (*(a + ((dia) * (n) + (dia))));
      for (col = dia + 1; col < n; col++)
        (*(a + ((row) * (n) + (col)))) -= tmp * (*(a + ((dia) * (n) + (col))));
      (*(a + ((row) * (n) + (dia)))) = 0;
      b[row] -= tmp * b[dia];
    }
  }
  for (row = n - 1; row >= 0; row--) {
    tmp = b[row];
    for (j = n - 1; j > row; j--)
      tmp -= x[j] * (*(a + ((row) * (n) + (j))));
    x[row] = tmp / (*(a + ((row) * (n) + (row))));
  }
}
```