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

```asm
<gauss_elim>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x38(%rbp)
  movsd  D7(%rip),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movl   $0x0,-0x28(%rbp)
  jmp    L14
L10:
  mov    -0x28(%rbp),%eax
  mov    %eax,-0x24(%rbp)
  jmp    L16
L115:
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x6,%rax
  mov    %rax,%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  mov    -0x28(%rbp),%eax
  cltq
  mov    (%rdx,%rax,8),%rax
  movq   %rax,%xmm0
  call   <fabs@plt>
  test   %eax,%eax
  jle    L116
  mov    -0x24(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
  jmp    L95
L116:
  addl   $0x1,-0x24(%rbp)
L16:
  cmpl   $0x3,-0x24(%rbp)
  jle    L115
L95:
  mov    -0x1c(%rbp),%eax
  cmp    -0x28(%rbp),%eax
  je     L106
  movl   $0x0,-0x20(%rbp)
  jmp    L46
L47:
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x6,%rax
  mov    %rax,%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  mov    -0x20(%rbp),%eax
  cltq
  movsd  (%rdx,%rax,8),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  mov    -0x1c(%rbp),%eax
  cltq
  shl    $0x6,%rax
  mov    %rax,%rdx
  mov    -0x38(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x6,%rax
  mov    %rax,%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  mov    -0x20(%rbp),%eax
  cltq
  movsd  (%rcx,%rax,8),%xmm0
  mov    -0x20(%rbp),%eax
  cltq
  movsd  %xmm0,(%rdx,%rax,8)
  mov    -0x1c(%rbp),%eax
  cltq
  shl    $0x6,%rax
  mov    %rax,%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  mov    -0x20(%rbp),%eax
  cltq
  movsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,(%rdx,%rax,8)
  addl   $0x1,-0x20(%rbp)
L46:
  cmpl   $0x7,-0x20(%rbp)
  jle    L47
L106:
  mov    -0x28(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x24(%rbp)
  jmp    L30
L87:
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x6,%rax
  mov    %rax,%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  mov    -0x28(%rbp),%eax
  cltq
  movsd  (%rdx,%rax,8),%xmm0
  movq   D6(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x6,%rax
  mov    %rax,%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  mov    -0x28(%rbp),%eax
  cltq
  movsd  (%rdx,%rax,8),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  mov    -0x28(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x20(%rbp)
  jmp    L83
L70:
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x6,%rax
  mov    %rax,%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  mov    -0x20(%rbp),%eax
  cltq
  movsd  (%rdx,%rax,8),%xmm1
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x6,%rax
  mov    %rax,%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  mov    -0x20(%rbp),%eax
  cltq
  movsd  (%rdx,%rax,8),%xmm0
  mulsd  -0x8(%rbp),%xmm0
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x6,%rax
  mov    %rax,%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  addsd  %xmm1,%xmm0
  mov    -0x20(%rbp),%eax
  cltq
  movsd  %xmm0,(%rdx,%rax,8)
  addl   $0x1,-0x20(%rbp)
L83:
  cmpl   $0x7,-0x20(%rbp)
  jle    L70
  addl   $0x1,-0x24(%rbp)
L30:
  cmpl   $0x3,-0x24(%rbp)
  jle    L87
  addl   $0x1,-0x28(%rbp)
L14:
  cmpl   $0x2,-0x28(%rbp)
  jle    L10
  nop
  nop
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_label: D7
type_guessed: f64
name: parse_data
arguments: data_label: D6
type_guessed: byte[8]

tool: D7: 1

tool: {"D6": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80]}

assistant: ```c
void gauss_elim(double a[4][8]) {
  int s, i, j, r;
  double det = 1;
  for (s = 0; s < 4 - 1; ++s) {
    for (i = s; i < 4; ++i)
      if (fabs(a[i][s]) > 1e-14) {
        r = i;
        break;
      }
    if (r != s)
      for (j = 0; j < 8; ++j) {
        double t = a[s][j];
        a[s][j] = a[r][j];
        a[r][j] = t;
      }
    for (i = s + 1; i < 4; ++i) {
      double f = -a[i][s] / a[s][s];
      for (j = s + 1; j < 8; ++j)
        a[i][j] += a[s][j] * f;
    }
  }
}
```