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

```asm
<lu_decomposition>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %esi,-0x3c(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    %rcx,-0x50(%rbp)
  movl   $0x0,-0x2c(%rbp)
  mov    -0x3c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  mov    %rax,%rcx
  mov    $0x186,%edx
  lea    D17(%rip),%rax
  mov    %rax,%rsi
  lea    D15(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <Malloc@plt>
  cltq
  mov    %rax,-0x10(%rbp)
  mov    -0x50(%rbp),%rax
  movl   $0x1,(%rax)
  movl   $0x0,-0x30(%rbp)
  jmp    L139
L284:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movl   $0x0,-0x28(%rbp)
  jmp    L278
L119:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movq   D20(%rip),%xmm1
  andpd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x8(%rbp),%xmm0
  comisd -0x20(%rbp),%xmm0
  jbe    L201
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,-0x20(%rbp)
L201:
  addl   $0x1,-0x28(%rbp)
L278:
  mov    -0x28(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L119
  movsd  -0x20(%rbp),%xmm0
  ucomisd -0x20(%rbp),%xmm0
  jp     L239
  pxor   %xmm0,%xmm0
  comisd -0x20(%rbp),%xmm0
  seta   %al
  xor    $0x1,%eax
  test   %al,%al
  je     L239
  movsd  -0x20(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm1,%xmm0
  seta   %al
  xor    $0x1,%eax
  test   %al,%al
  je     L239
  mov    $0x0,%eax
  jmp    L8
L239:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movsd  D42(%rip),%xmm0
  divsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x30(%rbp)
L139:
  mov    -0x30(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L284
  movl   $0x0,-0x28(%rbp)
  jmp    L251
L277:
  movl   $0x0,-0x30(%rbp)
  jmp    L69
L2:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movl   $0x0,-0x24(%rbp)
  jmp    L107
L187:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x18(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  addl   $0x1,-0x24(%rbp)
L107:
  mov    -0x24(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jl     L187
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x30(%rbp)
L69:
  mov    -0x30(%rbp),%eax
  cmp    -0x28(%rbp),%eax
  jl     L2
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  mov    -0x28(%rbp),%eax
  mov    %eax,-0x30(%rbp)
  jmp    L47
L52:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movl   $0x0,-0x24(%rbp)
  jmp    L164
L192:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x18(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  addl   $0x1,-0x24(%rbp)
L164:
  mov    -0x24(%rbp),%eax
  cmp    -0x28(%rbp),%eax
  jl     L192
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movsd  -0x18(%rbp),%xmm0
  movq   D20(%rip),%xmm2
  andpd  %xmm2,%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x8(%rbp),%xmm0
  comisd -0x20(%rbp),%xmm0
  jb     L20
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  mov    -0x30(%rbp),%eax
  mov    %eax,-0x2c(%rbp)
L20:
  addl   $0x1,-0x30(%rbp)
L47:
  mov    -0x30(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L52
  mov    -0x28(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  je     L44
  movl   $0x0,-0x24(%rbp)
  jmp    L115
L303:
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rax,%rdx
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x38(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rcx
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x24(%rbp)
L115:
  mov    -0x24(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L303
  mov    -0x50(%rbp),%rax
  mov    (%rax),%eax
  neg    %eax
  mov    %eax,%edx
  mov    -0x50(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x10(%rbp),%rax
  add    %rax,%rdx
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x10(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
L44:
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rax,%rdx
  mov    -0x2c(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  ucomisd %xmm1,%xmm0
  jp     L108
  ucomisd %xmm1,%xmm0
  jne    L108
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  pxor   %xmm0,%xmm0
  comisd %xmm1,%xmm0
  seta   %al
  xor    $0x1,%eax
  test   %al,%al
  je     L108
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm1,%xmm0
  seta   %al
  xor    $0x1,%eax
  test   %al,%al
  je     L108
  mov    $0x0,%eax
  jmp    L8
L108:
  mov    -0x28(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  je     L22
  mov    -0x28(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movsd  D42(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  mov    -0x28(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x30(%rbp)
  jmp    L307
L13:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mulsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x30(%rbp)
L307:
  mov    -0x30(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L13
L22:
  addl   $0x1,-0x28(%rbp)
L251:
  mov    -0x28(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L277
  mov    -0x10(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x1c0,%edx
  lea    D17(%rip),%rax
  mov    %rax,%rsi
  lea    D15(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <Free@plt>
  mov    $0x1,%eax
L8:
  leave
  ret
```

tool_calls: name: read_data
arguments: data_label: D17
data_type: string
name: read_data
arguments: data_label: D15
data_type: string
name: read_data
arguments: data_label: D20
data_type: qword
name: read_data
arguments: data_label: D42
data_type: f32[2]

tool: D17: /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AZed/cdo/refs/heads/master/src/statistic.c

tool: D15: lu_decomposition

tool: D20: 9223372036854775807

tool: {"D42": [0.0,1.875]}

assistant: ```c
int lu_decomposition(double **a, int n, int *index, int *sign) {
  int i, imax = 0, j, k;
  double big, sum, temp;
  double *v;
  v = (double *)Malloc(__func__, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AZed/cdo/refs/heads/master/src/statistic.c", 390, (n * sizeof(double)));
  *sign = 1;
  for (i = 0; i < n; i++) {
    big = 0;
    for (j = 0; j < n; j++)
      if ((temp = fabs(a[i][j])) > big)
        big = temp;
    if ((((big) != (big)) || ((0.) != (0.)) ? (((big) != (big)) && ((0.) != (0.)) ? 1 : 0) : !(big < 0. || 0. < big)))
      return 0;
    v[i] = 1 / big;
  }
  for (j = 0; j < n; j++) {
    for (i = 0; i < j; i++) {
      sum = a[i][j];
      for (k = 0; k < i; k++)
        sum -= a[i][k] * a[k][j];
      a[i][j] = sum;
    }
    big = 0;
    for (i = j; i < n; i++) {
      sum = a[i][j];
      for (k = 0; k < j; k++)
        sum -= a[i][k] * a[k][j];
      a[i][j] = sum;
      if ((temp = v[i] * fabs(sum)) >= big) {
        big = temp;
        imax = i;
      }
    }
    if (j != imax) {
      for (k = 0; k < n; k++) {
        temp = a[imax][k];
        a[imax][k] = a[j][k];
        a[j][k] = temp;
      }
      *sign = -*sign;
      v[imax] = v[j];
    }
    index[j] = imax;
    if ((((a[j][j]) != (a[j][j])) || ((0.) != (0.)) ? (((a[j][j]) != (a[j][j])) && ((0.) != (0.)) ? 1 : 0) : !(a[j][j] < 0. || 0. < a[j][j])))
      return 0;
    if (j != n) {
      temp = 1 / a[j][j];
      for (i = j + 1; i < n; i++)
        a[i][j] *= temp;
    }
  }
  Free(__func__, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/AZed/cdo/refs/heads/master/src/statistic.c", 448, (v));
  return 1;
}
```