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

```asm
<getfrac_onenight>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %edi,%ebx
  mov    %rsi,%r13
  mov    %rcx,0x40(%rsp)
  mov    %r8,%r15
  movsd  %xmm2,0x18(%rsp)
  movsd  %xmm3,0x20(%rsp)
  movsd  D14(%rip),%xmm1
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x10(%rsp)
  divsd  D23(%rip),%xmm4
  addsd  D11(%rip),%xmm4
  movsd  %xmm4,0x38(%rsp)
  movapd %xmm4,%xmm0
  addsd  (%rsi),%xmm0
  cvttsd2si %xmm0,%rax
  mov    %eax,0x48(%rsp)
  movslq %edi,%rdx
  addsd  -0x8(%rsi,%rdx,8),%xmm4
  cvttsd2si %xmm4,%r14
  add    $0x1,%r14d
  sub    %eax,%r14d
  mov    $0x2,%eax
  cmp    %eax,%r14d
  cmovl  %eax,%r14d
  lea    0x0(,%r14,8),%edi
  call   <malloc@plt>
  mov    %rax,%rdx
  mov    %rax,0x30(%rsp)
  mov    %rax,%rbp
  mov    %r14d,%eax
  lea    (%rdx,%rax,8),%r12
  mov    %rdx,%rax
L43:
  movq   $0x0,(%rax)
  add    $0x8,%rax
  cmp    %r12,%rax
  jne    L43
  test   %ebx,%ebx
  jle    L0
  mov    %ebx,%eax
  mov    %rax,0x28(%rsp)
  mov    $0x0,%ebx
  pxor   %xmm6,%xmm6
  movsd  %xmm6,0x8(%rsp)
  lea    -0x1(%r14),%eax
  mov    %eax,0x4c(%rsp)
  jmp    L1
L7:
  add    $0x1,%rbx
  cmp    0x28(%rsp),%rbx
  je     L45
L1:
  movsd  0x0(%r13,%rbx,8),%xmm0
  subsd  0x20(%rsp),%xmm0
  mulsd  0x10(%rsp),%xmm0
  movsd  %xmm0,(%rsp)
  call   <floor@plt>
  pxor   %xmm1,%xmm1
  cvtsi2sd %rax,%xmm1
  movsd  (%rsp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  0x18(%rsp),%xmm7
  comisd %xmm0,%xmm7
  jb     L7
  movsd  0x38(%rsp),%xmm0
  addsd  0x0(%r13,%rbx,8),%xmm0
  cvttsd2si %xmm0,%rax
  sub    0x48(%rsp),%eax
  mov    $0x0,%edx
  cmovs  %edx,%eax
  cmp    %r14d,%eax
  cmovge 0x4c(%rsp),%eax
  mov    0x40(%rsp),%rsi
  movsd  (%rsi,%rbx,8),%xmm0
  movsd  (%r15,%rbx,8),%xmm1
  mulsd  %xmm0,%xmm0
  mulsd  %xmm1,%xmm1
  divsd  %xmm1,%xmm0
  cltq
  mov    0x30(%rsp),%rdi
  lea    (%rdi,%rax,8),%rax
  movapd %xmm0,%xmm1
  addsd  (%rax),%xmm1
  movsd  %xmm1,(%rax)
  addsd  0x8(%rsp),%xmm0
  movsd  %xmm0,0x8(%rsp)
  jmp    L7
L0:
  pxor   %xmm7,%xmm7
  movsd  %xmm7,0x8(%rsp)
L45:
  pxor   %xmm5,%xmm5
  movsd  %xmm5,(%rsp)
L50:
  movsd  0x0(%rbp),%xmm0
  divsd  0x8(%rsp),%xmm0
  maxsd  (%rsp),%xmm0
  movsd  %xmm0,(%rsp)
  add    $0x8,%rbp
  cmp    %r12,%rbp
  jne    L50
  mov    0x30(%rsp),%rdi
  call   <free@plt>
  movsd  (%rsp),%xmm0
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D14
data_type: f64
name: extract_symbolic_data
arguments: label: D23
data_type: f64
name: extract_symbolic_data
arguments: label: D11
data_type: f64

tool: D14: 1

tool: D23: 24

tool: D11: 0.5

assistant: ```c
double getfrac_onenight(int n, double *t, double *u, double *v, double *err, double bper, double depth, double qtran, double bt0, double timezone) {
  int i, j, k, nnights;
  long night, night0, night1;
  double ph, f0, maxfrac;
  double *chisqrnights, chisqrtot, val;
  f0 = 1. / bper;
  timezone = timezone / 24.0 + 0.5;
  night0 = (long)(t[0] + timezone);
  night1 = (long)(t[n - 1] + timezone);
  nnights = (int)((night1 - night0) + 1);
  if (nnights < 2)
    nnights = 2;
  chisqrnights = (double *)malloc(nnights * sizeof(double));
  chisqrtot = 0.;
  for (i = 0; i < nnights; i++)
    chisqrnights[i] = 0.;
  for (i = 0; i < n; i++) {
    ph = (t[i] - bt0) * f0;
    ph -= floor(ph);
    if (ph <= qtran) {
      night = (long)(t[i] + timezone);
      k = (int)(night - night0);
      if (k < 0)
        k = 0;
      if (k >= nnights)
        k = nnights - 1;
      val = v[i] * v[i] / (err[i] * err[i]);
      chisqrnights[k] += val;
      chisqrtot += val;
    }
  }
  maxfrac = 0.;
  for (k = 0; k < nnights; k++) {
    val = chisqrnights[k] / chisqrtot;
    if (val > maxfrac)
      maxfrac = val;
  }
  free(chisqrnights);
  return (maxfrac);
}
```