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

```asm
<mc_poisson_large>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  movsd  %xmm0,-0x68(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x60(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x58(%rbp)
  movq   $0x0,-0x50(%rbp)
  mov    -0x68(%rbp),%rax
  movq   %rax,%xmm0
  call   <log@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x48(%rbp)
  movsd  D24(%rip),%xmm0
  movapd %xmm0,%xmm1
  divsd  -0x68(%rbp),%xmm1
  movsd  D58(%rip),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x40(%rbp)
  movsd  -0x68(%rbp),%xmm1
  movsd  D56(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movapd %xmm0,%xmm1
  movsd  D13(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  movsd  -0x38(%rbp),%xmm0
  mulsd  -0x68(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  mov    -0x40(%rbp),%rax
  movq   %rax,%xmm0
  call   <log@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm2
  subsd  -0x68(%rbp),%xmm2
  movsd  %xmm2,-0x70(%rbp)
  mov    -0x38(%rbp),%rax
  movq   %rax,%xmm0
  call   <log@plt>
  movapd %xmm0,%xmm1
  movsd  -0x70(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
L2:
  mov    $0x0,%eax
  call   <mc_randf@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x20(%rbp)
  movsd  D37(%rip),%xmm0
  subsd  -0x20(%rbp),%xmm0
  divsd  -0x20(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <log@plt>
  movapd %xmm0,%xmm1
  movsd  -0x30(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  divsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x18(%rbp),%xmm1
  movsd  D7(%rip),%xmm0
  addsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  movq   %rax,%xmm0
  call   <floor@plt>
  mov    %rax,-0x50(%rbp)
  cmpq   $0x0,-0x50(%rbp)
  js     L14
  mov    $0x0,%eax
  call   <mc_randf@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x10(%rbp)
  movsd  -0x38(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x18(%rbp),%xmm1
  movsd  -0x30(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  movq   %rax,%xmm0
  call   <exp@plt>
  pxor   %xmm1,%xmm1
  cvtsi2sd %rax,%xmm1
  movsd  D37(%rip),%xmm0
  addsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%rax
  mov    %rax,%rdi
  call   <_sqr@plt>
  movsd  -0x10(%rbp),%xmm1
  divsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  movq   %rax,%xmm0
  call   <log@plt>
  movsd  -0x8(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x60(%rbp)
  pxor   %xmm0,%xmm0
  cvtsi2sdq -0x50(%rbp),%xmm0
  mulsd  -0x48(%rbp),%xmm0
  addsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,-0x70(%rbp)
  mov    -0x50(%rbp),%rax
  mov    %rax,%rdi
  call   <_log_factorial@plt>
  movapd %xmm0,%xmm1
  movsd  -0x70(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x58(%rbp)
  jmp    L27
L14:
  nop
L27:
  movsd  -0x60(%rbp),%xmm0
  comisd -0x58(%rbp),%xmm0
  ja     L2
  mov    -0x50(%rbp),%rax
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D24
type_infered: f64
name: disassemble_data
arguments: data_label: D58
type_infered: f64
name: disassemble_data
arguments: data_label: D56
type_infered: f64
name: disassemble_data
arguments: data_label: D13
type_infered: f64
name: disassemble_data
arguments: data_label: D37
type_infered: f64
name: disassemble_data
arguments: data_label: D7
type_infered: f64

tool: D24: 3.36

tool: D58: 0.767

tool: D56: 3

tool: D13: 3.141592653589793

tool: D37: 1

tool: D7: 0.5

assistant: ```c
long mc_poisson_large(double lambda) {
  double loglam, c, beta, alpha, k, u, v, x, y, lhs = 0, rhs = 0;
  long n = 0;
  loglam = log(lambda);
  c = 0.767 - 3.36 / lambda;
  beta = 3.14159265358979323846 / sqrt(3.0 * lambda);
  alpha = beta * lambda;
  k = log(c) - lambda - log(beta);
  do {
    u = mc_randf();
    x = (alpha - log((1.0 - u) / u)) / beta;
    n = (long)floor(x + 0.5);
    if (n < 0) {
      continue;
    }
    v = mc_randf();
    y = alpha - beta * x;
    lhs = y + log(v / _sqr(1.0 + exp(y)));
    rhs = k + n * loglam - _log_factorial(n);
  } while (lhs > rhs);
  return n;
}
```