user: What would the C source look like for the assembly code provided here?

```asm
<LengthBounds>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %esi,-0x3c(%rbp)
  mov    %edx,-0x40(%rbp)
  movsd  %xmm0,-0x48(%rbp)
  mov    %rcx,-0x50(%rbp)
  mov    %r8,-0x58(%rbp)
  mov    -0x3c(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <MallocOrDie@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x3c(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <MallocOrDie@plt>
  mov    %rax,-0x8(%rbp)
  movl   $0x0,-0x30(%rbp)
  jmp    L124
L106:
  mov    -0x40(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x38(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <DNorm@plt>
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movl   $0x0,-0x28(%rbp)
  movl   $0x1,-0x2c(%rbp)
  jmp    L143
L88:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x2c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  comisd -0x20(%rbp),%xmm0
  jbe    L39
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x2c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  mov    -0x2c(%rbp),%eax
  mov    %eax,-0x28(%rbp)
L39:
  addl   $0x1,-0x2c(%rbp)
L143:
  mov    -0x2c(%rbp),%eax
  cmp    -0x40(%rbp),%eax
  jle    L88
  mov    -0x28(%rbp),%eax
  mov    %eax,-0x24(%rbp)
  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),%xmm1
  movsd  D6(%rip),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  jmp    L81
L83:
  cmpl   $0x0,-0x28(%rbp)
  jne    L117
  mov    -0x24(%rbp),%eax
  cmp    -0x40(%rbp),%eax
  je     L66
L117:
  cmpl   $0x0,-0x28(%rbp)
  jne    L17
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  addl   $0x1,-0x24(%rbp)
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movsd  -0x18(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  jmp    L81
L17:
  mov    -0x24(%rbp),%eax
  cmp    -0x40(%rbp),%eax
  jne    L3
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  subl   $0x1,-0x28(%rbp)
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movsd  -0x18(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  jmp    L81
L3:
  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
  sub    $0x8,%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    -0x24(%rbp),%eax
  cltq
  add    $0x1,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  comisd %xmm1,%xmm0
  jbe    L79
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  subl   $0x1,-0x28(%rbp)
  mov    -0x28(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movsd  -0x18(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  jmp    L81
L79:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  addl   $0x1,-0x24(%rbp)
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movsd  -0x18(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
L81:
  movsd  -0x18(%rbp),%xmm0
  comisd -0x48(%rbp),%xmm0
  ja     L83
L66:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x10(%rbp),%rax
  add    %rax,%rdx
  mov    -0x28(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rax,%rdx
  mov    -0x24(%rbp),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x30(%rbp)
L124:
  mov    -0x30(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L106
  mov    -0x50(%rbp),%rax
  mov    -0x10(%rbp),%rdx
  mov    %rdx,(%rax)
  mov    -0x58(%rbp),%rax
  mov    -0x8(%rbp),%rdx
  mov    %rdx,(%rax)
  nop
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D6
type_guessed: f64

tool: D6: 1

assistant: ```c
void LengthBounds(double **lmx, int statenum, int N, double epsilon, int **ret_min, int **ret_max) {
  int *min, *max;
  int y, len;
  int cmin, cmax;
  double best;
  double p_remain;
  min = (int *)MallocOrDie(sizeof(int) * statenum);
  max = (int *)MallocOrDie(sizeof(int) * statenum);
  for (y = 0; y < statenum; y++) {
    DNorm(lmx[y], (N + 1));
    best = lmx[y][0];
    cmin = 0;
    for (len = 1; len <= N; len++)
      if (lmx[y][len] > best) {
        best = lmx[y][len];
        cmin = len;
      }
    cmax = cmin;
    p_remain = 1.0 - lmx[y][cmin];
    while (p_remain > epsilon) {
      if (cmin == 0 && cmax == N)
        break;
      else if (cmin == 0)
        p_remain -= lmx[y][++cmax];
      else if (cmax == N)
        p_remain -= lmx[y][--cmin];
      else {
        if (lmx[y][cmin - 1] > lmx[y][cmax + 1])
          p_remain -= lmx[y][--cmin];
        else
          p_remain -= lmx[y][++cmax];
      }
    }
    min[y] = cmin;
    max[y] = cmax;
  }
  *ret_min = min;
  *ret_max = max;
}
```