user: What would the C source look like for the assembly code provided here?

```asm
<POISSON_SHOT1>:
  endbr64
  push   %r15
  pxor   %xmm7,%xmm7
  movapd %xmm1,%xmm6
  mov    %rsi,%r15
  push   %r14
  mov    %rdi,%r14
  push   %r13
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  ucomisd %xmm7,%xmm1
  movsd  %xmm0,0x8(%rsp)
  jp     L167
  je     L183
L167:
  ucomisd D22(%rip),%xmm3
  mov    $0x0,%edx
  setnp  %al
  cmovne %edx,%eax
  test   %al,%al
  jne    L120
  ucomisd %xmm7,%xmm3
  setnp  %dl
  cmove  %edx,%eax
  test   %al,%al
  jne    L120
  ucomisd D11(%rip),%xmm3
  jp     L198
  jne    L198
L79:
  mulsd  %xmm4,%xmm2
  comisd %xmm7,%xmm6
  divsd  %xmm6,%xmm4
  divsd  D51(%rip),%xmm2
  cvttsd2si %xmm2,%rbx
  movsd  %xmm4,0x20(%rsp)
  jbe    L176
  test   %r12,%r12
  jle    L63
  movsd  0x8(%rsp),%xmm5
  mov    %rbx,%r13
  mov    %rbx,%rbp
  shr    %r13
  and    $0xfffffffffffffffe,%rbp
  shl    $0x4,%r13
  unpcklpd %xmm5,%xmm5
  mov    %r13,0x38(%rsp)
  xor    %r13d,%r13d
  movaps %xmm5,0x10(%rsp)
L81:
  xor    %eax,%eax
  call   <drand49@plt>
  mov    %eax,%edi
  call   <log@plt>
  xorpd  D40(%rip),%xmm0
  mulsd  0x20(%rsp),%xmm0
  cvttsd2si %xmm0,%r8
  lea    (%r8,%r13,1),%rcx
  add    %rbx,%rcx
  cmp    %r12,%rcx
  jl     L49
  sub    %r13,%r12
  add    %r12,(%r15)
L63:
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L120:
  movsd  0x8(%rsp),%xmm5
  andpd  D59(%rip),%xmm5
  movsd  %xmm5,0x8(%rsp)
  jmp    L79
  nopl   0x0(%rax)
L49:
  test   %r8,%r8
  jle    L44
  mov    (%r15),%r13
  lea    0x0(,%r8,8),%rdx
  xor    %esi,%esi
  mov    %rcx,0x30(%rsp)
  mov    %r8,0x28(%rsp)
  lea    (%r14,%r13,8),%rdi
  call   <memset@plt>
  mov    0x28(%rsp),%r8
  mov    0x30(%rsp),%rcx
  lea    0x0(%r13,%r8,1),%r9
  mov    %r9,(%r15)
  movq   $0x0,-0x8(%r14,%r9,8)
L44:
  test   %rbx,%rbx
  jle    L41
  mov    (%r15),%rdx
  cmp    $0x1,%rbx
  je     L134
  mov    0x38(%rsp),%rsi
  lea    (%r14,%rdx,8),%rax
  add    %rax,%rsi
  xchg   %ax,%ax
L42:
  movapd 0x10(%rsp),%xmm7
  add    $0x10,%rax
  movups %xmm7,-0x10(%rax)
  cmp    %rsi,%rax
  jne    L42
  movsd  0x8(%rsp),%xmm3
  lea    (%rdx,%rbp,1),%rax
  cmp    %rbp,%rbx
  je     L128
L175:
  movsd  0x8(%rsp),%xmm1
  movsd  %xmm1,(%r14,%rax,8)
  movapd %xmm1,%xmm3
L128:
  add    %rbx,%rdx
  mov    %rdx,(%r15)
  movsd  %xmm3,-0x8(%r14,%rdx,8)
L41:
  mov    %rcx,%r13
  jmp    L81
  nopw   0x0(%rax,%rax,1)
L183:
  add    $0x48,%rsp
  movapd %xmm5,%xmm2
  movapd %xmm4,%xmm1
  mov    %rdx,%rcx
  pop    %rbx
  mov    %rsi,%rdx
  pop    %rbp
  mov    %rdi,%rsi
  pop    %r12
  movapd %xmm3,%xmm0
  pop    %r13
  xor    %edi,%edi
  pop    %r14
  pop    %r15
  jmp    10b0 <DC@plt>
  nopw   0x0(%rax,%rax,1)
L176:
  movapd %xmm4,%xmm0
  xorpd  D40(%rip),%xmm0
  call   <round@plt>
  mov    %rax,%rdi
  test   %r12,%r12
  jle    L63
  mov    (%r15),%r9
  xor    %ecx,%ecx
  mov    $0xffffffffffffffff,%r8
  lea    (%r14,%r9,8),%r10
  nopl   (%rax)
L208:
  mov    %rcx,%rax
  mov    %rcx,%rsi
  cqto
  idiv   %rdi
  cmp    $0x1,%rdx
  adc    $0x0,%r8
  mov    %r8,%rax
  imul   %rdi,%rax
  sub    %rax,%rsi
  mov    %rsi,%rax
  cqto
  idiv   %rbx
  cmp    %rdx,%rsi
  jne    L59
  movsd  0x8(%rsp),%xmm5
  movsd  %xmm5,(%r10,%rcx,8)
L59:
  add    $0x1,%rcx
  cmp    %rcx,%r12
  jne    L208
  add    %r9,%r12
  mov    %r12,(%r15)
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L198:
  movsd  0x8(%rsp),%xmm0
  movapd %xmm3,%xmm1
  movsd  %xmm4,0x28(%rsp)
  movsd  %xmm2,0x20(%rsp)
  movsd  %xmm6,0x10(%rsp)
  call   <pow@plt>
  movsd  0x28(%rsp),%xmm4
  movsd  0x20(%rsp),%xmm2
  pxor   %xmm7,%xmm7
  movsd  0x10(%rsp),%xmm6
  movsd  %xmm0,0x8(%rsp)
  jmp    L79
L134:
  mov    %rdx,%rax
  jmp    L175
```

tool_calls: name: read_data
arguments: label: D22
type_guessed: f32[2]
name: read_data
arguments: label: D11
type_guessed: f32[2]
name: read_data
arguments: label: D51
type_guessed: f64
name: read_data
arguments: label: D40
type_guessed: f32[4]
name: read_data
arguments: label: D59
type_guessed: qword[2]

tool: {"D22": [0.0,-1.875]}

tool: {"D11": [0.0,1.875]}

tool: D51: 1000

tool: {"D40": [0.0,-0.0,0.0,0.0]}

tool: {"D59": [0x7fffffffffffffff,0x0000000000000000]}

assistant: ```c
void POISSON_SHOT1(double amplitude, double frequency, double width, double *output, uint *index, uint Ni, double expon, double srate, double dt) {
  double tmp;
  uint i, o, m, j, k;
  if (frequency == 0.) {
    DC(0., output, index, Ni, expon, srate, dt);
    return;
  }
  if ((expon == -1) || (expon == 0))
    amplitude = fabs(amplitude);
  else if (expon != 1)
    amplitude = pow(amplitude, expon);
  m = (uint)(width * srate / 1000.);
  tmp = srate / frequency;
  if (frequency > 0.) {
    j = 0;
    while (j < Ni) {
      k = (uint)(-log(drand49()) * tmp);
      o = j + k;
      if ((o + m) < Ni) {
        for (i = 0; i < k; i++)
          output[(*index)++] = 0.;
        for (i = 0; i < m; i++)
          output[(*index)++] = amplitude;
        j = o + m;
      } else {
        (*index) = (*index) + (Ni - j);
        j = Ni;
      }
    }
  } else {
    k = (uint)round(-srate / frequency);
    i = -1;
    for (j = 0; j < Ni; j++, (*index)++) {
      if (j % k == 0)
        i++;
      if ((j - i * k) % m == (j - i * k))
        output[*index] = amplitude;
    }
  }
  return;
}
```