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

```asm
<midexp>:
  endbr64
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %esi,%ebx
  sub    $0x20,%rsp
  xorps  D36(%rip),%xmm0
  call   <exp@plt>
  movss  %xmm0,0x18(%rsp)
  cmp    $0x1,%ebx
  je     L9
  lea    -0x1(%rbx),%esi
  mov    $0x1,%eax
  mov    $0x1,%ebx
  cmp    $0x1,%esi
  jle    L20
  nopw   0x0(%rax,%rax,1)
L1:
  add    $0x1,%eax
  lea    (%rbx,%rbx,2),%ebx
  cmp    %eax,%esi
  jne    L1
  pxor   %xmm7,%xmm7
  pxor   %xmm1,%xmm1
  cvtsi2ss %ebx,%xmm7
  cvtss2sd %xmm7,%xmm1
  mulsd  D54(%rip),%xmm1
  movss  %xmm7,0x1c(%rsp)
L0:
  pxor   %xmm0,%xmm0
  pxor   %xmm5,%xmm5
  mov    $0x1,%r12d
  cvtss2sd 0x18(%rsp),%xmm0
  divsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  pxor   %xmm2,%xmm2
  cvtsd2ss %xmm0,%xmm5
  movaps %xmm5,%xmm6
  movss  %xmm5,0x10(%rsp)
  addss  %xmm5,%xmm5
  cvtss2sd %xmm6,%xmm1
  mulsd  D5(%rip),%xmm1
  addsd  D22(%rip),%xmm1
  movss  %xmm5,0x14(%rsp)
  cvtsd2ss %xmm1,%xmm1
  nop
L39:
  movaps %xmm1,%xmm0
  movss  %xmm2,0xc(%rsp)
  add    $0x1,%r12d
  movss  %xmm1,0x8(%rsp)
  call   <log@plt>
  xorps  D36(%rip),%xmm0
  call   *%rbp
  movss  0x8(%rsp),%xmm1
  movss  0xc(%rsp),%xmm2
  divss  %xmm1,%xmm0
  addss  0x14(%rsp),%xmm1
  movss  %xmm1,0xc(%rsp)
  addss  %xmm2,%xmm0
  movss  %xmm0,0x8(%rsp)
  movaps %xmm1,%xmm0
  call   <log@plt>
  xorps  D36(%rip),%xmm0
  call   *%rbp
  movss  0xc(%rsp),%xmm1
  movss  0x8(%rsp),%xmm2
  divss  %xmm1,%xmm0
  addss  0x10(%rsp),%xmm1
  addss  %xmm0,%xmm2
  cmp    %r12d,%ebx
  jge    L39
  movss  0x18(%rsp),%xmm0
  mulss  %xmm2,%xmm0
  divss  0x1c(%rsp),%xmm0
  addss  D25(%rip),%xmm0
  divss  D48(%rip),%xmm0
L49:
  movss  %xmm0,D99(%rip)
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax,%rax,1)
L9:
  movss  0x18(%rsp),%xmm1
  addss  D99(%rip),%xmm1
  movaps %xmm1,%xmm0
  movss  %xmm1,0x8(%rsp)
  mulss  D32(%rip),%xmm0
  call   <log@plt>
  xorps  D36(%rip),%xmm0
  call   *%rbp
  movss  0x8(%rsp),%xmm1
  cvtss2sd %xmm0,%xmm0
  cvtss2sd %xmm1,%xmm1
  mulsd  D5(%rip),%xmm1
  divsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd 0x18(%rsp),%xmm1
  mulsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  jmp    L49
  nopl   0x0(%rax,%rax,1)
L20:
  movss  D112(%rip),%xmm7
  movsd  D54(%rip),%xmm1
  movss  %xmm7,0x1c(%rsp)
  jmp    L0
```

tool_calls: name: parse_data
arguments: data_label: D36
type_guessed: byte[16]
name: parse_data
arguments: data_label: D54
type_guessed: f64
name: parse_data
arguments: data_label: D5
type_guessed: f64
name: parse_data
arguments: data_label: D22
type_guessed: f64
name: parse_data
arguments: data_label: D48
type_guessed: byte[4]
name: parse_data
arguments: data_label: D99
type_guessed: f64
name: parse_data
arguments: data_label: D32
type_guessed: byte[4]
name: parse_data
arguments: data_label: D112
type_guessed: byte[4]

tool: {"D36": [0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

tool: D54: 3

tool: D5: 0.5

tool: D22: 0

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

tool: D99: 0

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

tool: {"D112": [0x00,0x00,0x80,0x3f]}

assistant: ```c
float midexp(float (*funk)(float), float aa, float bb, int n) {
  float x, tnm, sum, del, ddel, a, b;
  static float s;
  int it, j;
  b = exp(-aa);
  a = 0.0;
  if (n == 1) {
    return (s = (b - a) * ((*funk)(-log(0.5 * (a + b))) / (0.5 * (a + b))));
  } else {
    for (it = 1, j = 1; j < n - 1; j++)
      it *= 3;
    tnm = it;
    del = (b - a) / (3.0 * tnm);
    ddel = del + del;
    x = a + 0.5 * del;
    sum = 0.0;
    for (j = 1; j <= it; j++) {
      sum += ((*funk)(-log(x)) / (x));
      x += ddel;
      sum += ((*funk)(-log(x)) / (x));
      x += del;
    }
    s = (s + (b - a) * sum / tnm) / 3.0;
    return s;
  }
}
```