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

```asm
<karlin>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %r8,0x28(%rsp)
  cmp    %edi,%esi
  jl     L100
  mov    %rcx,%r15
  mov    %edi,%r12d
  mov    %rdx,%rbx
  mov    %edi,%eax
  lea    0x1(%rsi),%ecx
  pxor   %xmm1,%xmm1
  nopl   0x0(%rax)
L48:
  add    $0x8,%rdx
  pxor   %xmm0,%xmm0
  mov    %eax,%r13d
  cvtsi2sd %eax,%xmm0
  mulsd  -0x8(%rdx),%xmm0
  lea    0x1(%rax),%eax
  addsd  %xmm0,%xmm1
  cmp    %eax,%ecx
  jne    L48
  pxor   %xmm6,%xmm6
  comisd %xmm6,%xmm1
  jae    L100
  sub    %r12d,%esi
  lea    -0x1(%r12),%ecx
  pxor   %xmm7,%xmm7
  movslq %esi,%rax
  cvtsi2sd %ecx,%xmm7
  lea    0x8(%rbx,%rax,8),%r14
  mov    D35(%rip),%rax
  mov    %rax,(%rsp)
  movsd  %xmm7,0x20(%rsp)
  xchg   %ax,%ax
L23:
  movsd  (%rsp),%xmm6
  movapd %xmm6,%xmm5
  addsd  %xmm6,%xmm5
  movapd %xmm5,%xmm0
  movsd  %xmm5,(%rsp)
  call   <exp@plt>
  movsd  0x20(%rsp),%xmm7
  mulsd  (%rsp),%xmm7
  movsd  %xmm0,0x8(%rsp)
  movapd %xmm7,%xmm0
  call   <exp@plt>
  movsd  0x8(%rsp),%xmm3
  mov    %rbx,%rax
  pxor   %xmm1,%xmm1
  nopw   0x0(%rax,%rax,1)
L12:
  mulsd  %xmm3,%xmm0
  movsd  (%rax),%xmm2
  add    $0x8,%rax
  mulsd  %xmm0,%xmm2
  addsd  %xmm2,%xmm1
  cmp    %rax,%r14
  jne    L12
  movsd  D28(%rip),%xmm6
  comisd %xmm1,%xmm6
  ja     L23
  movq   $0x0,0x18(%rsp)
  mov    $0x19,%ebp
  nopl   (%rax)
L22:
  movsd  (%rsp),%xmm4
  addsd  0x18(%rsp),%xmm4
  mulsd  D35(%rip),%xmm4
  movapd %xmm4,%xmm0
  movsd  %xmm4,0x8(%rsp)
  call   <exp@plt>
  movsd  0x8(%rsp),%xmm4
  movsd  %xmm0,0x10(%rsp)
  movsd  0x20(%rsp),%xmm0
  mulsd  %xmm4,%xmm0
  call   <exp@plt>
  movsd  0x10(%rsp),%xmm3
  mov    %rbx,%rax
  pxor   %xmm1,%xmm1
  movsd  0x8(%rsp),%xmm4
L35:
  mulsd  %xmm3,%xmm0
  movsd  (%rax),%xmm2
  add    $0x8,%rax
  mulsd  %xmm0,%xmm2
  addsd  %xmm2,%xmm1
  cmp    %rax,%r14
  jne    L35
  comisd D15(%rip),%xmm1
  jbe    L97
  movsd  %xmm4,(%rsp)
L9:
  sub    $0x1,%ebp
  jne    L22
  movsd  D6(%rip),%xmm0
  comisd 0x18(%rsp),%xmm0
  jae    L100
L94:
  movsd  0x18(%rsp),%xmm7
  movsd  0x20(%rsp),%xmm0
  movsd  %xmm3,(%rsp)
  mulsd  %xmm7,%xmm0
  movsd  %xmm7,(%r15)
  call   <exp@plt>
  movsd  (%rsp),%xmm3
  pxor   %xmm1,%xmm1
  nopl   0x0(%rax)
L77:
  mulsd  %xmm3,%xmm0
  add    $0x8,%rbx
  pxor   %xmm2,%xmm2
  mov    %r12d,%eax
  cvtsi2sd %r12d,%xmm2
  mulsd  -0x8(%rbx),%xmm2
  add    $0x1,%r12d
  mulsd  %xmm0,%xmm2
  addsd  %xmm2,%xmm1
  cmp    %eax,%r13d
  jne    L77
  mulsd  0x18(%rsp),%xmm1
  mov    0x28(%rsp),%rax
  movsd  %xmm1,(%rax)
  add    $0x38,%rsp
  mov    $0x1,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L97:
  movsd  0x18(%rsp),%xmm0
  movsd  %xmm3,0x8(%rsp)
  movsd  %xmm4,0x10(%rsp)
  subsd  %xmm4,%xmm0
  call   <fabs@plt>
  movsd  0x8(%rsp),%xmm3
  test   %eax,%eax
  jle    L94
  movsd  0x10(%rsp),%xmm4
  movsd  %xmm4,0x18(%rsp)
  jmp    L9
L100:
  add    $0x38,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: read_data
arguments: label: D35
type: f64
name: read_data
arguments: label: D28
type: f64
name: read_data
arguments: label: D15
type: byte[16]
name: read_data
arguments: label: D6
type: byte[8]

tool: D35: 0.5

tool: D28: 1

tool: {"D15": [0x0b,0x7a,0x6f,0x0c,0x01,0x00,0xf0,0x3f,0xbb,0xbd,0xd7,0xd9,0xdf,0x7c,0xdb,0x3d]}

tool: {"D6": [0xbb,0xbd,0xd7,0xd9,0xdf,0x7c,0xdb,0x3d]}

assistant: ```c
int karlin(int low, int high, double *pr, double *lambda_p, double *H_p) {
  int i, range, nit;
  double up, new, sum, av, beta, ftemp;
  double lambda;
  double *ptr1;
  range = high - low;
  sum = 0;
  ptr1 = pr;
  for (i = low; i <= high; i++)
    sum += i * (*ptr1++);
  if (sum >= 0.0) {
    return 0;
  }
  up = 0.5;
  do {
    up *= 2.0;
    ptr1 = pr;
    beta = exp(up);
    ftemp = exp(up * (low - 1));
    sum = 0.0;
    for (i = 0; i <= range; ++i)
      sum += *ptr1++ * (ftemp *= beta);
  } while (sum < 1.0);
  lambda = 0.0;
  nit = 0;
  while (nit++ < 25) {
    new = (lambda + up) / 2.0;
    beta = exp(new);
    ftemp = exp(new *(low - 1));
    ptr1 = pr;
    sum = 0.0;
    for (i = 0; i <= range; ++i)
      sum += *ptr1++ * (ftemp *= beta);
    if (sum > 1.0 + 1e-6)
      up = new;
    else {
      if (fabs(lambda - new) < 1e-6)
        goto done;
      lambda = new;
    }
  }
  if (lambda <= 1e-10) {
    lambda = -1.0;
    return 0;
  }
done:
  *lambda_p = lambda;
  ptr1 = pr;
  ftemp = exp(lambda * (low - 1));
  for (av = 0.0, i = low; i <= high; ++i)
    av += *ptr1++ * i * (ftemp *= beta);
  *H_p = lambda * av;
  return 1;
}
```