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

```asm
<Pomeranz>:
  endbr64
  pxor   %xmm4,%xmm4
  push   %r15
  lea    (%rdi,%rdi,1),%eax
  mov    %edi,%r15d
  cvtsi2sd %edi,%xmm4
  push   %r14
  mov    $0x8,%esi
  push   %r13
  push   %r12
  push   %rbp
  lea    0x3(%rax),%ebp
  mulsd  %xmm4,%xmm0
  push   %rbx
  movslq %ebp,%rbp
  sub    $0x68,%rsp
  mov    %edi,0x4c(%rsp)
  mov    %rbp,%rdi
  movsd  %xmm4,0x18(%rsp)
  movsd  %xmm0,0x8(%rsp)
  mov    %eax,(%rsp)
  call   <calloc@plt>
  mov    %rbp,%rdi
  mov    $0x8,%esi
  mov    %rax,%r12
  call   <calloc@plt>
  mov    %rbp,%rdi
  mov    $0x8,%esi
  lea    0x2(%r15),%ebp
  mov    %rax,0x50(%rsp)
  call   <calloc@plt>
  mov    %ebp,%esi
  mov    $0x2,%edi
  mov    %rax,%r13
  mov    %rax,0x58(%rsp)
  call   <CreateMatrixD@plt>
  mov    %ebp,%esi
  mov    $0x4,%edi
  mov    %rax,0x28(%rsp)
  mov    %rax,%r14
  call   <CreateMatrixD@plt>
  mov    0x50(%rsp),%rdx
  mov    %r15d,%edi
  mov    %r13,%rcx
  movsd  0x8(%rsp),%xmm0
  mov    %r12,%rsi
  mov    %rax,0x10(%rsp)
  mov    %rax,%rbx
  mov    %r12,0x40(%rsp)
  call   <CalcFloorCeil@plt>
  lea    0x1(%r15),%edi
  movsd  0x18(%rsp),%xmm4
  test   %edi,%edi
  mov    %edi,0x20(%rsp)
  jle    L115
  mov    %r15d,%eax
  xor    %esi,%esi
  lea    0x8(,%rax,8),%rdx
  mov    (%r14),%rax
  lea    0x8(%rax),%rdi
  mov    %rax,0x8(%rsp)
  call   <memset@plt>
  mov    %rbx,%rax
  cmpl   $0x1,0x20(%rsp)
  mov    0x8(%r14),%r14
  mov    (%rbx),%rbx
  mov    0x18(%rax),%r13
  mov    0x10(%rax),%r12
  mov    0x8(%rax),%rbp
  movsd  0x18(%rsp),%xmm4
  jle    L245
  lea    -0x1(%r15),%eax
  lea    0x10(%r14),%rdi
  xor    %esi,%esi
  movsd  %xmm4,0x8(%rsp)
  lea    0x8(,%rax,8),%rdx
  call   <memset@plt>
  movsd  D13(%rip),%xmm5
  mov    0x40(%rsp),%rax
  mov    %r15d,%edx
  movsd  D44(%rip),%xmm6
  movsd  0x8(%rsp),%xmm4
  movapd %xmm5,%xmm0
  movsd  %xmm6,0x8(%r14)
  movsd  %xmm5,(%rbx)
  movsd  0x10(%rax),%xmm2
  mov    $0x1,%eax
  addsd  %xmm2,%xmm2
  divsd  %xmm4,%xmm2
  jmp    L6
  cs nopw 0x0(%rax,%rax,1)
L218:
  add    $0x1,%rax
L6:
  mulsd  %xmm2,%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rbx,%rax,8)
  cmp    %eax,%edx
  jge    L218
L146:
  mov    0x40(%rsp),%rax
  movsd  %xmm5,0x0(%rbp)
  movapd %xmm5,%xmm2
  mov    0x4c(%rsp),%edx
  movsd  0x10(%rax),%xmm0
  mov    $0x1,%eax
  addsd  %xmm0,%xmm0
  subsd  %xmm0,%xmm2
  movapd %xmm5,%xmm0
  divsd  %xmm4,%xmm2
  jmp    L180
  nopl   0x0(%rax,%rax,1)
L181:
  add    $0x1,%rax
L180:
  mulsd  %xmm2,%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0x0(%rbp,%rax,8)
  cmp    %eax,%edx
  jge    L181
  mov    0x40(%rsp),%rax
  movsd  %xmm5,(%r12)
  mov    0x4c(%rsp),%edx
  movapd %xmm5,%xmm0
  movsd  0x10(%rax),%xmm2
  mov    $0x1,%eax
  divsd  %xmm4,%xmm2
  jmp    L16
  nopl   0x0(%rax)
L38:
  add    $0x1,%rax
L16:
  mulsd  %xmm2,%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%r12,%rax,8)
  cmp    %eax,%edx
  jge    L38
  mov    0x4c(%rsp),%eax
  xor    %edx,%edx
  movsd  %xmm5,0x0(%r13)
  lea    0x8(%r13),%rdi
  movsd  %xmm6,0x30(%rsp)
  test   %eax,%eax
  movsd  %xmm4,0x18(%rsp)
  cmovns %eax,%edx
  xor    %esi,%esi
  movsd  %xmm5,0x8(%rsp)
  add    $0x1,%edx
  movslq %edx,%rdx
  shl    $0x3,%rdx
  call   <memset@plt>
  movsd  0x8(%rsp),%xmm5
  movsd  0x18(%rsp),%xmm4
  movsd  0x30(%rsp),%xmm6
L232:
  mov    (%rsp),%edi
  lea    0x2(%rdi),%eax
  cmp    $0x1,%eax
  jle    L228
  mov    0x58(%rsp),%rax
  mov    0x50(%rsp),%rbx
  movl   $0x1,(%rsp)
  pxor   %xmm3,%xmm3
  movl   $0x0,0x8(%rsp)
  movsd  D39(%rip),%xmm7
  add    $0x10,%rax
  lea    0x10(%rbx),%r15
  movl   $0x1,0x48(%rsp)
  movq   D57(%rip),%xmm8
  movsd  D46(%rip),%xmm9
  mov    %rax,0x18(%rsp)
  mov    0x40(%rsp),%rax
  lea    0x10(%rax),%r14
  mov    %edi,%eax
  lea    0x18(%rbx,%rax,8),%rax
  mov    %rax,0x38(%rsp)
L57:
  movsd  (%r14),%xmm1
  subsd  -0x8(%r14),%xmm1
  mov    $0x1,%eax
  cvttsd2si (%r15),%r13d
  mov    0x18(%rsp),%rdi
  cvttsd2si -0x8(%r15),%r9d
  mov    0x10(%rsp),%rdx
  divsd  %xmm4,%xmm1
  cvttsd2si (%rdi),%r11d
  cvttsd2si -0x8(%rdi),%r10d
  add    $0x2,%r13d
  test   %r13d,%r13d
  cmovle %eax,%r13d
  mov    0x20(%rsp),%eax
  cmp    %eax,%r11d
  cmovg  %eax,%r11d
  add    $0x2,%r9d
  mov    $0x1,%eax
  test   %r9d,%r9d
  cmovle %eax,%r9d
  xor    %eax,%eax
L100:
  mov    (%rdx),%rcx
  movapd %xmm1,%xmm0
  subsd  0x8(%rcx),%xmm0
  andpd  %xmm8,%xmm0
  comisd %xmm0,%xmm7
  jae    L82
  add    $0x1,%eax
  add    $0x8,%rdx
  cmp    $0x4,%eax
  jne    L100
  mov    $0xffffffff,%eax
L82:
  xorl   $0x1,0x8(%rsp)
  mov    0x8(%rsp),%edi
  xorl   $0x1,(%rsp)
  mov    (%rsp),%ebx
  cmp    %r13d,%r11d
  jl     L241
  mov    0x10(%rsp),%rsi
  movslq %edi,%rdx
  cltq
  mov    0x28(%rsp),%rdi
  movapd %xmm6,%xmm2
  lea    (%rsi,%rax,8),%rbp
  movslq %ebx,%rax
  lea    (%rdi,%rdx,8),%r12
  mov    (%rdi,%rax,8),%rbx
  movslq %r13d,%rax
  mov    %rax,0x30(%rsp)
  mov    %rax,%rsi
  nopw   0x0(%rax,%rax,1)
L211:
  mov    %esi,%ecx
  cmp    %esi,%r10d
  cmovle %r10d,%ecx
  cmp    %r9d,%ecx
  jl     L168
  movslq %ecx,%rax
  mov    %rsi,%r8
  mov    0x0(%rbp),%rdi
  mov    (%r12),%rdx
  sub    %rax,%r8
  sub    %r9d,%ecx
  movapd %xmm3,%xmm1
  add    %r8,%rcx
  lea    (%rdx,%rax,8),%rdx
  lea    (%rdi,%r8,8),%rax
  lea    0x8(%rdi,%rcx,8),%rcx
  nopw   0x0(%rax,%rax,1)
L215:
  movsd  (%rdx),%xmm0
  mulsd  (%rax),%xmm0
  add    $0x8,%rax
  sub    $0x8,%rdx
  addsd  %xmm0,%xmm1
  cmp    %rax,%rcx
  jne    L215
L14:
  movsd  %xmm1,(%rbx,%rsi,8)
  minsd  %xmm2,%xmm1
  add    $0x1,%rsi
  movapd %xmm1,%xmm2
  cmp    %esi,%r11d
  jge    L211
  comisd %xmm1,%xmm9
  ja     L117
L241:
  addq   $0x8,0x18(%rsp)
  add    $0x8,%r15
  add    $0x8,%r14
  cmp    %r15,0x38(%rsp)
  jne    L57
  movslq (%rsp),%rax
  imul   $0x15e,0x48(%rsp),%ebx
  shl    $0x3,%rax
L61:
  mov    0x28(%rsp),%r15
  movslq 0x4c(%rsp),%rdx
  movsd  %xmm3,0x20(%rsp)
  mov    0x40(%rsp),%rdi
  movsd  %xmm5,0x18(%rsp)
  mov    (%r15,%rax,1),%rax
  mov    %rdx,%r14
  movsd  0x8(%rax,%rdx,8),%xmm1
  movsd  %xmm1,0x8(%rsp)
  call   <free@plt>
  mov    0x50(%rsp),%rdi
  call   <free@plt>
  mov    0x58(%rsp),%rdi
  call   <free@plt>
  mov    0x10(%rsp),%rdi
  call   <DeleteMatrixD@plt>
  mov    %r15,%rdi
  call   <DeleteMatrixD@plt>
  mov    %r14d,%edi
  call   <getLogFactorial@plt>
  pxor   %xmm0,%xmm0
  pxor   %xmm2,%xmm2
  movsd  0x8(%rsp),%xmm1
  cvtsi2sd %ebx,%xmm0
  mulsd  D33(%rip),%xmm0
  cvtsi2sd %eax,%xmm2
  subsd  %xmm0,%xmm2
  movapd %xmm1,%xmm0
  movsd  %xmm2,(%rsp)
  call   <log@plt>
  pxor   %xmm0,%xmm0
  movsd  0x20(%rsp),%xmm3
  movsd  0x18(%rsp),%xmm5
  cvtsi2sd %eax,%xmm0
  addsd  (%rsp),%xmm0
  comisd %xmm3,%xmm0
  jb     L195
  add    $0x68,%rsp
  movapd %xmm5,%xmm0
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L168:
  movapd %xmm3,%xmm1
  jmp    L14
L117:
  mov    0x30(%rsp),%rdi
  sub    %r13d,%r11d
  add    %rdi,%r11
  lea    (%rbx,%rdi,8),%rax
  lea    0x8(%rbx,%r11,8),%rdx
  nopl   (%rax)
L204:
  movsd  (%rax),%xmm0
  add    $0x8,%rax
  mulsd  %xmm6,%xmm0
  movsd  %xmm0,-0x8(%rax)
  cmp    %rax,%rdx
  jne    L204
  addl   $0x1,0x48(%rsp)
  jmp    L241
L195:
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1140 <exp@plt>
L228:
  mov    $0x15e,%ebx
  mov    $0x8,%eax
  pxor   %xmm3,%xmm3
  jmp    L61
L115:
  mov    0x28(%rsp),%rax
  mov    0x8(%rax),%r14
  mov    0x10(%rsp),%rax
  mov    (%rax),%rbx
  mov    0x18(%rax),%r13
  mov    0x10(%rax),%r12
  mov    0x8(%rax),%rbp
L245:
  movsd  D44(%rip),%xmm6
  movsd  D13(%rip),%xmm5
  mov    0x40(%rsp),%rax
  cmpl   $0x1,0x20(%rsp)
  movsd  %xmm6,0x8(%r14)
  movsd  %xmm5,(%rbx)
  movsd  0x10(%rax),%xmm0
  je     L62
  movsd  %xmm5,0x0(%rbp)
  movsd  %xmm5,(%r12)
  movsd  %xmm5,0x0(%r13)
  jmp    L232
L62:
  addsd  %xmm0,%xmm0
  divsd  %xmm4,%xmm0
  movsd  %xmm0,0x8(%rbx)
  jmp    L146
```

tool_calls: name: parse_data
arguments: label: D13
data_type: f64
name: parse_data
arguments: label: D44
data_type: f32[2]
name: parse_data
arguments: label: D39
data_type: byte[8]
name: parse_data
arguments: label: D57
data_type: qword
name: parse_data
arguments: label: D46
data_type: byte[8]
name: parse_data
arguments: label: D33
data_type: f64

tool: D13: 1

tool: {"D44": [0.0,28587302322176.0]}

tool: {"D39": [0x16,0x56,0xe7,0x9e,0xaf,0x03,0xd2,0x3c]}

tool: D57: 9223372036854775807

tool: {"D46": [0x84,0xeb,0x91,0xa4,0x15,0x0b,0xcd,0x05]}

tool: D33: 0.6931471805599453

assistant: ```c
double Pomeranz(int n, double x) {
  const double EPS = 1.0e-15;
  const int ENO = 350;
  const double RENO = ldexp(1.0, ENO);
  int coreno;
  const double t = n * x;
  double w, sum, minsum;
  int i, j, k, s;
  int r1, r2;
  int jlow, jup, klow, kup, kup0;
  double *A;
  double *Atflo;
  double *Atcei;
  double **V;
  double **H;
  A = (double *)calloc((size_t)(2 * n + 3), sizeof(double));
  Atflo = (double *)calloc((size_t)(2 * n + 3), sizeof(double));
  Atcei = (double *)calloc((size_t)(2 * n + 3), sizeof(double));
  V = (double **)CreateMatrixD(2, n + 2);
  H = (double **)CreateMatrixD(4, n + 2);
  CalcFloorCeil(n, t, A, Atflo, Atcei);
  for (j = 1; j <= n + 1; j++)
    V[0][j] = 0;
  for (j = 2; j <= n + 1; j++)
    V[1][j] = 0;
  V[1][1] = RENO;
  coreno = 1;
  H[0][0] = 1;
  w = 2.0 * A[2] / n;
  for (j = 1; j <= n + 1; j++)
    H[0][j] = w * H[0][j - 1] / j;
  H[1][0] = 1;
  w = (1.0 - 2.0 * A[2]) / n;
  for (j = 1; j <= n + 1; j++)
    H[1][j] = w * H[1][j - 1] / j;
  H[2][0] = 1;
  w = A[2] / n;
  for (j = 1; j <= n + 1; j++)
    H[2][j] = w * H[2][j - 1] / j;
  H[3][0] = 1;
  for (j = 1; j <= n + 1; j++)
    H[3][j] = 0;
  r1 = 0;
  r2 = 1;
  for (i = 2; i <= 2 * n + 2; i++) {
    jlow = 2 + (int)Atflo[i];
    if (jlow < 1)
      jlow = 1;
    jup = (int)Atcei[i];
    if (jup > n + 1)
      jup = n + 1;
    klow = 2 + (int)Atflo[i - 1];
    if (klow < 1)
      klow = 1;
    kup0 = (int)Atcei[i - 1];
    w = (A[i] - A[i - 1]) / n;
    s = -1;
    for (j = 0; j < 4; j++) {
      if (fabs(w - H[j][1]) <= EPS) {
        s = j;
        break;
      }
    }
    minsum = RENO;
    r1 = (r1 + 1) & 1;
    r2 = (r2 + 1) & 1;
    for (j = jlow; j <= jup; j++) {
      kup = kup0;
      if (kup > j)
        kup = j;
      sum = 0;
      for (k = kup; k >= klow; k--)
        sum += V[r1][k] * H[s][j - k];
      V[r2][j] = sum;
      if (sum < minsum)
        minsum = sum;
    }
    if (minsum < 1.0e-280) {
      for (j = jlow; j <= jup; j++)
        V[r2][j] *= RENO;
      coreno++;
    }
  }
  sum = V[r2][n + 1];
  free(A);
  free(Atflo);
  free(Atcei);
  DeleteMatrixD(H);
  DeleteMatrixD(V);
  w = getLogFactorial(n) - coreno * ENO * 0.69314718055994530941 + log(sum);
  if (w >= 0.)
    return 1.;
  return exp(w);
}
```