user: Converte this assembly snippet into its equivalent C code:

```asm
<doubleBoxWhiskerCalc>:
  endbr64
  push   %r15
  mov    %rdx,%r15
  push   %r14
  mov    %rcx,%r14
  push   %r13
  mov    %r8,%r13
  push   %r12
  mov    %edi,%r12d
  push   %rbp
  mov    %r9,%rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x28,%rsp
  test   %edi,%edi
  jle    L29
  cmp    $0x1,%edi
  je     L61
L56:
  mov    %rbx,%rsi
  mov    %r12d,%edi
  call   <doubleSort@plt>
  movslq %r12d,%rax
  movsd  (%rbx),%xmm4
  movsd  -0x8(%rbx,%rax,8),%xmm3
  mov    %r12d,%eax
  sar    %eax
  cltq
  shl    $0x3,%rax
  lea    (%rbx,%rax,1),%rdx
  test   $0x1,%r12b
  jne    L66
  movsd  -0x8(%rbx,%rax,1),%xmm0
  addsd  (%rdx),%xmm0
  mulsd  D36(%rip),%xmm0
  cmp    $0x3,%r12d
  jg     L59
L45:
  movapd %xmm0,%xmm1
  movapd %xmm0,%xmm2
  movsd  D36(%rip),%xmm5
  addsd  %xmm4,%xmm1
  addsd  %xmm3,%xmm2
  mulsd  %xmm5,%xmm1
  mulsd  %xmm5,%xmm2
L50:
  mov    0x60(%rsp),%rax
  movsd  %xmm4,(%r15)
  movsd  %xmm1,(%r14)
  movsd  %xmm0,0x0(%r13)
  movsd  %xmm2,0x0(%rbp)
  movsd  %xmm3,(%rax)
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
L61:
  movsd  (%rsi),%xmm0
  mov    0x60(%rsp),%rax
  movsd  %xmm0,(%rax)
  movsd  %xmm0,(%r9)
  movsd  %xmm0,(%r8)
  movsd  %xmm0,(%rcx)
  movsd  %xmm0,(%rdx)
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  xchg   %ax,%ax
L66:
  movsd  (%rdx),%xmm0
  cmp    $0x3,%r12d
  jle    L45
L59:
  mov    %r12d,%ecx
  lea    -0x1(%r12),%r8d
  mov    %r12d,%edx
  mov    $0x4,%edi
  sar    $0x2,%ecx
  lea    D5(%rip),%rsi
  movsd  %xmm3,0x18(%rsp)
  sub    %ecx,%r8d
  mov    %ecx,(%rsp)
  mov    %r8d,0x4(%rsp)
  movsd  %xmm4,0x10(%rsp)
  movsd  %xmm0,0x8(%rsp)
  call   <verbose@plt>
  movslq (%rsp),%rcx
  movslq 0x4(%rsp),%r8
  movsd  0x18(%rsp),%xmm3
  movsd  0x10(%rsp),%xmm4
  movsd  (%rbx,%rcx,8),%xmm1
  movsd  (%rbx,%r8,8),%xmm2
  movsd  0x8(%rsp),%xmm0
  jmp    L50
  nopl   (%rax)
L29:
  mov    %edi,%esi
  lea    D2(%rip),%rdi
  call   <errAbort@plt>
  jmp    L56
```

tool_calls: name: unpack_data
arguments: data_tag: D36
type_infered: f64
name: unpack_data
arguments: data_tag: D5
type_infered: string
name: unpack_data
arguments: data_tag: D2
type_infered: string

tool: D36: 0.5

tool: D5: count %d, q1Ix %d, q3Ix %d


tool: D2: doubleBoxWhiskerCalc needs a positive number, not %d for count

assistant: ```c
void doubleBoxWhiskerCalc(int count, double *array, double *retMin, double *retQ1, double *retMedian, double *retQ3, double *retMax) {
  if (count <= 0)
    errAbort("doubleBoxWhiskerCalc needs a positive number, not %d for count", count);
  if (count == 1) {
    *retMin = *retQ1 = *retMedian = *retQ3 = *retMax = array[0];
    return;
  }
  doubleSort(count, array);
  double min = array[0];
  double max = array[count - 1];
  double median;
  int halfCount = count >> 1;
  if ((count & 1) == 1)
    median = array[halfCount];
  else {
    median = (array[halfCount] + array[halfCount - 1]) * 0.5;
  }
  double q1, q3;
  if (count <= 3) {
    q1 = 0.5 * (median + min);
    q3 = 0.5 * (median + max);
  } else {
    int q1Ix = count / 4;
    int q3Ix = count - 1 - q1Ix;
    verbose(4, "count %d, q1Ix %d, q3Ix %d\n", count, q1Ix, q3Ix);
    q1 = array[q1Ix];
    q3 = array[q3Ix];
  }
  *retMin = min;
  *retQ1 = q1;
  *retMedian = median;
  *retQ3 = q3;
  *retMax = max;
}
```