user: What is the c source code of the assembly code below?

```asm
<calc_median_limits>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %rcx,-0x40(%rbp)
  cmpl   $0x0,-0x2c(%rbp)
  jne    L0
  mov    -0x38(%rbp),%rax
  pxor   %xmm0,%xmm0
  movss  %xmm0,(%rax)
  mov    -0x38(%rbp),%rax
  movss  (%rax),%xmm0
  mov    -0x40(%rbp),%rax
  movss  %xmm0,(%rax)
  jmp    L3
L0:
  mov    -0x2c(%rbp),%eax
  add    $0x1,%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <ckalloc@plt>
  mov    %rax,-0x8(%rbp)
  movl   $0x0,-0x18(%rbp)
  jmp    L94
L58:
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x8(%rbp),%rax
  add    %rcx,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x18(%rbp)
L94:
  mov    -0x18(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L58
  mov    -0x2c(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x8(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <sort_scores@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x2c(%rbp),%xmm0
  movsd  D0(%rip),%xmm2
  movapd %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  movsd  D23(%rip),%xmm0
  addsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0xc(%rbp)
  movss  -0xc(%rbp),%xmm0
  cvttss2si %xmm0,%eax
  pxor   %xmm1,%xmm1
  cvtsi2ss %eax,%xmm1
  movss  -0xc(%rbp),%xmm0
  subss  %xmm1,%xmm0
  ucomiss D4(%rip),%xmm0
  jp     L91
  ucomiss D4(%rip),%xmm0
  jne    L91
  movss  -0xc(%rbp),%xmm0
  cvttss2si %xmm0,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  movss  -0xc(%rbp),%xmm0
  cvttss2si %xmm0,%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  addss  %xmm1,%xmm0
  movss  D18(%rip),%xmm1
  divss  %xmm1,%xmm0
  movss  %xmm0,-0x10(%rbp)
  movss  -0xc(%rbp),%xmm0
  cvttss2si %xmm0,%edx
  mov    -0x2c(%rbp),%eax
  sub    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  movss  -0xc(%rbp),%xmm0
  cvttss2si %xmm0,%edx
  mov    -0x2c(%rbp),%eax
  sub    %edx,%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  addss  %xmm1,%xmm0
  movss  D18(%rip),%xmm1
  divss  %xmm1,%xmm0
  movss  %xmm0,-0x14(%rbp)
  jmp    L10
L91:
  movss  -0xc(%rbp),%xmm0
  cvttss2si %xmm0,%eax
  pxor   %xmm1,%xmm1
  cvtsi2ss %eax,%xmm1
  movss  -0xc(%rbp),%xmm0
  subss  %xmm1,%xmm0
  comiss D4(%rip),%xmm0
  jbe    L86
  movss  -0xc(%rbp),%xmm0
  cvttss2si %xmm0,%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  movss  %xmm0,-0x10(%rbp)
  movss  -0xc(%rbp),%xmm0
  cvttss2si %xmm0,%edx
  mov    -0x2c(%rbp),%eax
  sub    %edx,%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  movss  %xmm0,-0x14(%rbp)
  jmp    L10
L86:
  movss  -0xc(%rbp),%xmm0
  cvttss2si %xmm0,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  movss  %xmm0,-0x10(%rbp)
  movss  -0xc(%rbp),%xmm0
  cvttss2si %xmm0,%edx
  mov    -0x2c(%rbp),%eax
  sub    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  movss  %xmm0,-0x14(%rbp)
L10:
  cmpl   $0x3,-0x2c(%rbp)
  jg     L59
  mov    -0x8(%rbp),%rax
  movss  (%rax),%xmm0
  mov    -0x40(%rbp),%rax
  movss  %xmm0,(%rax)
  mov    -0x2c(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mov    -0x38(%rbp),%rax
  movss  %xmm0,(%rax)
  jmp    L3
L59:
  pxor   %xmm1,%xmm1
  cvtss2sd -0x10(%rbp),%xmm1
  movss  -0x10(%rbp),%xmm0
  subss  -0x14(%rbp),%xmm0
  cvtss2sd %xmm0,%xmm0
  movsd  D22(%rip),%xmm2
  divsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  mov    -0x40(%rbp),%rax
  movss  %xmm0,(%rax)
  movss  -0x10(%rbp),%xmm0
  movaps %xmm0,%xmm1
  subss  -0x14(%rbp),%xmm1
  movss  -0x14(%rbp),%xmm0
  subss  %xmm1,%xmm0
  mov    -0x38(%rbp),%rax
  movss  %xmm0,(%rax)
L3:
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <ckfree@plt>
  nop
  leave
  ret
```

tool_calls: name: read_data
arguments: data_label: D0
type: f64
name: read_data
arguments: data_label: D23
type: f64
name: read_data
arguments: data_label: D4
type: byte[4]
name: read_data
arguments: data_label: D18
type: f32
name: read_data
arguments: data_label: D22
type: byte[8]

tool: D0: 4

tool: D23: 0.5

tool: {"D4": [0x00,0x00,0x00,0x3f]}

tool: D18: 2

tool: {"D22": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40]}

assistant: ```c
void calc_median_limits(float *scores, int n, float *ll, float *ul) {
  int i;
  float t, q1, q3;
  float *sortedscores;
  if (n == 0) {
    (*ul) = (*ll) = 0;
  } else {
    sortedscores = ckalloc((n + 1) * sizeof(float));
    for (i = 0; i < n; i++)
      sortedscores[i] = scores[i];
    sort_scores(sortedscores, 0, n - 1);
    t = n / 4.0 + 0.5;
    if (t - (int)t == 0.5) {
      q3 = (sortedscores[(int)t] + sortedscores[(int)t + 1]) / 2.0;
      q1 = (sortedscores[n - (int)t] + sortedscores[n - (int)t - 1]) / 2.0;
    } else if (t - (int)t > 0.5) {
      q3 = sortedscores[(int)t + 1];
      q1 = sortedscores[n - (int)t - 1];
    } else {
      q3 = sortedscores[(int)t];
      q1 = sortedscores[n - (int)t];
    }
    if (n < 4) {
      (*ul) = sortedscores[0];
      (*ll) = sortedscores[n - 1];
    } else {
      (*ul) = q3 + (q3 - q1) / 2.0;
      (*ll) = q1 - (q3 - q1);
    }
  }
  ckfree(sortedscores);
}
```