user: 请从给定的汇编指令推导出C源代码：

```asm
<gammabootstrap>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x1a8,%rsp
  mov    %rdi,-0x108(%rbp)
  mov    %rsi,-0x110(%rbp)
  mov    %rdx,-0x118(%rbp)
  mov    %ecx,-0x11c(%rbp)
  mov    %r8d,-0x120(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,-0x1c8(%rbp)
  mov    -0x120(%rbp),%eax
  mov    %eax,-0xac(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0xf8(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0xf4(%rbp)
  mov    -0x11c(%rbp),%eax
  mov    %eax,-0xa8(%rbp)
  movl   $0x0,-0xf0(%rbp)
  jmp    L259
L308:
  mov    -0xf0(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x108(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  movss  -0xf8(%rbp),%xmm1
  addss  %xmm1,%xmm0
  movss  %xmm0,-0xf8(%rbp)
  addl   $0x1,-0xf0(%rbp)
L259:
  mov    -0xf0(%rbp),%eax
  cmp    -0x120(%rbp),%eax
  jl     L308
  pxor   %xmm1,%xmm1
  cvtsi2ssl -0xac(%rbp),%xmm1
  movss  -0xf8(%rbp),%xmm0
  divss  %xmm1,%xmm0
  movss  %xmm0,-0xf8(%rbp)
  movl   $0x0,-0xec(%rbp)
  jmp    L36
L293:
  mov    -0xec(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x108(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  movaps %xmm0,%xmm1
  subss  -0xf8(%rbp),%xmm1
  mov    -0xec(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x108(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  subss  -0xf8(%rbp),%xmm0
  mulss  %xmm1,%xmm0
  movss  -0xf4(%rbp),%xmm1
  addss  %xmm1,%xmm0
  movss  %xmm0,-0xf4(%rbp)
  addl   $0x1,-0xec(%rbp)
L36:
  mov    -0xec(%rbp),%eax
  cmp    -0x120(%rbp),%eax
  jl     L293
  pxor   %xmm1,%xmm1
  cvtsi2ssl -0xac(%rbp),%xmm1
  movss  -0xf4(%rbp),%xmm0
  divss  %xmm1,%xmm0
  movss  %xmm0,-0xf4(%rbp)
  movss  -0xf8(%rbp),%xmm0
  mulss  %xmm0,%xmm0
  divss  -0xf4(%rbp),%xmm0
  movss  %xmm0,-0xa4(%rbp)
  movss  -0xf4(%rbp),%xmm0
  divss  -0xf8(%rbp),%xmm0
  movss  %xmm0,-0xa0(%rbp)
  mov    -0xac(%rbp),%esi
  mov    -0xa8(%rbp),%edi
  movslq %esi,%rax
  sub    $0x1,%rax
  mov    %rax,-0x90(%rbp)
  movslq %esi,%rax
  mov    %rax,-0x140(%rbp)
  movq   $0x0,-0x138(%rbp)
  movslq %esi,%rax
  lea    0x0(,%rax,4),%rbx
  movslq %edi,%rax
  sub    $0x1,%rax
  mov    %rax,-0x88(%rbp)
  movslq %esi,%rax
  mov    %rax,%r12
  mov    $0x0,%r13d
  movslq %edi,%rax
  mov    %rax,%r10
  mov    $0x0,%r11d
  mov    %r13,%rdx
  imul   %r10,%rdx
  mov    %r11,%rax
  imul   %r12,%rax
  lea    (%rdx,%rax,1),%rcx
  mov    %r12,%rax
  mul    %r10
  add    %rdx,%rcx
  mov    %rcx,%rdx
  movslq %esi,%rax
  mov    %rax,-0x130(%rbp)
  movq   $0x0,-0x128(%rbp)
  movslq %edi,%rax
  mov    %rax,%r14
  mov    $0x0,%r15d
  mov    -0x130(%rbp),%r9
  mov    -0x128(%rbp),%r10
  mov    %r10,%rdx
  imul   %r14,%rdx
  mov    %r9,%rax
  imul   %r15,%rax
  lea    (%rdx,%rax,1),%rcx
  mov    %r9,%rax
  mul    %r14
  add    %rdx,%rcx
  mov    %rcx,%rdx
  movslq %esi,%rdx
  movslq %edi,%rax
  imul   %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%edi
  mov    $0x0,%edx
  div    %rdi
  imul   $0x10,%rax,%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rcx
  sub    %rax,%rcx
L108:
  cmp    %rcx,%rsp
  je     L224
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L108
L224:
  mov    %rdx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  mov    %rdx,%rax
  and    $0xfff,%eax
  test   %rax,%rax
  je     L194
  mov    %rdx,%rax
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L194:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0x80(%rbp)
  mov    -0xa8(%rbp),%edx
  movslq %edx,%rax
  sub    $0x1,%rax
  mov    %rax,-0x78(%rbp)
  movslq %edx,%rax
  mov    %rax,-0x150(%rbp)
  movq   $0x0,-0x148(%rbp)
  movslq %edx,%rax
  mov    %rax,-0x160(%rbp)
  movq   $0x0,-0x158(%rbp)
  movslq %edx,%rax
  lea    0x0(,%rax,4),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%edi
  mov    $0x0,%edx
  div    %rdi
  imul   $0x10,%rax,%rdx
  mov    %rdx,%rax
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rcx
  sub    %rax,%rcx
L203:
  cmp    %rcx,%rsp
  je     L88
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L203
L88:
  mov    %rdx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  mov    %rdx,%rax
  and    $0xfff,%eax
  test   %rax,%rax
  je     L367
  mov    %rdx,%rax
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L367:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0x70(%rbp)
  mov    -0xa8(%rbp),%edx
  movslq %edx,%rax
  sub    $0x1,%rax
  mov    %rax,-0x68(%rbp)
  movslq %edx,%rax
  mov    %rax,-0x170(%rbp)
  movq   $0x0,-0x168(%rbp)
  movslq %edx,%rax
  mov    %rax,-0x180(%rbp)
  movq   $0x0,-0x178(%rbp)
  movslq %edx,%rax
  lea    0x0(,%rax,4),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%edi
  mov    $0x0,%edx
  div    %rdi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L233:
  cmp    %rdx,%rsp
  je     L177
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L233
L177:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L262
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L262:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0x60(%rbp)
  lea    -0xfc(%rbp),%rax
  mov    %rax,%rdi
  call   <time@plt>
  mov    %eax,%edi
  call   <srand@plt>
  movl   $0x0,-0xe8(%rbp)
  jmp    L49
L152:
  movl   $0x0,-0xe4(%rbp)
  jmp    L13
L35:
  mov    $0x0,%eax
  call   <rand@plt>
  cltd
  idivl  -0xac(%rbp)
  mov    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x108(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  cvttss2si %xmm0,%eax
  mov    %eax,-0x94(%rbp)
  mov    %rbx,%rcx
  shr    $0x2,%rcx
  pxor   %xmm0,%xmm0
  cvtsi2ssl -0x94(%rbp),%xmm0
  mov    -0x80(%rbp),%rax
  mov    -0xe4(%rbp),%edx
  movslq %edx,%rsi
  mov    -0xe8(%rbp),%edx
  movslq %edx,%rdx
  imul   %rcx,%rdx
  add    %rsi,%rdx
  movss  %xmm0,(%rax,%rdx,4)
  addl   $0x1,-0xe4(%rbp)
L13:
  mov    -0xe4(%rbp),%eax
  cmp    -0x120(%rbp),%eax
  jl     L35
  addl   $0x1,-0xe8(%rbp)
L49:
  mov    -0xe8(%rbp),%eax
  cmp    -0xa8(%rbp),%eax
  jl     L152
  movl   $0x0,-0xe0(%rbp)
  jmp    L95
L186:
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0xdc(%rbp)
  movl   $0x0,-0xd8(%rbp)
  jmp    L196
L154:
  mov    %rbx,%rcx
  shr    $0x2,%rcx
  mov    -0x80(%rbp),%rax
  mov    -0xd8(%rbp),%edx
  movslq %edx,%rsi
  mov    -0xe0(%rbp),%edx
  movslq %edx,%rdx
  imul   %rcx,%rdx
  add    %rsi,%rdx
  movss  (%rax,%rdx,4),%xmm0
  movss  -0xdc(%rbp),%xmm1
  addss  %xmm1,%xmm0
  movss  %xmm0,-0xdc(%rbp)
  addl   $0x1,-0xd8(%rbp)
L196:
  mov    -0xd8(%rbp),%eax
  cmp    -0xac(%rbp),%eax
  jl     L154
  pxor   %xmm1,%xmm1
  cvtsi2ssl -0xac(%rbp),%xmm1
  movss  -0xdc(%rbp),%xmm0
  divss  %xmm1,%xmm0
  movss  %xmm0,-0xdc(%rbp)
  mov    -0x70(%rbp),%rax
  mov    -0xe0(%rbp),%edx
  movslq %edx,%rdx
  movss  -0xdc(%rbp),%xmm0
  movss  %xmm0,(%rax,%rdx,4)
  addl   $0x1,-0xe0(%rbp)
L95:
  mov    -0xe0(%rbp),%eax
  cmp    -0xa8(%rbp),%eax
  jl     L186
  movl   $0x0,-0xd4(%rbp)
  jmp    L138
L147:
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0xd0(%rbp)
  movl   $0x0,-0xcc(%rbp)
  jmp    L294
L366:
  mov    %rbx,%rcx
  shr    $0x2,%rcx
  mov    -0x80(%rbp),%rax
  mov    -0xcc(%rbp),%edx
  movslq %edx,%rsi
  mov    -0xd4(%rbp),%edx
  movslq %edx,%rdx
  imul   %rcx,%rdx
  add    %rsi,%rdx
  movss  (%rax,%rdx,4),%xmm0
  mov    -0x70(%rbp),%rax
  mov    -0xd4(%rbp),%edx
  movslq %edx,%rdx
  movss  (%rax,%rdx,4),%xmm2
  movaps %xmm0,%xmm1
  subss  %xmm2,%xmm1
  mov    %rbx,%rcx
  shr    $0x2,%rcx
  mov    -0x80(%rbp),%rax
  mov    -0xcc(%rbp),%edx
  movslq %edx,%rsi
  mov    -0xd4(%rbp),%edx
  movslq %edx,%rdx
  imul   %rcx,%rdx
  add    %rsi,%rdx
  movss  (%rax,%rdx,4),%xmm0
  mov    -0x70(%rbp),%rax
  mov    -0xd4(%rbp),%edx
  movslq %edx,%rdx
  movss  (%rax,%rdx,4),%xmm2
  subss  %xmm2,%xmm0
  mulss  %xmm1,%xmm0
  movss  -0xd0(%rbp),%xmm1
  addss  %xmm1,%xmm0
  movss  %xmm0,-0xd0(%rbp)
  addl   $0x1,-0xcc(%rbp)
L294:
  mov    -0xcc(%rbp),%eax
  cmp    -0xac(%rbp),%eax
  jl     L366
  pxor   %xmm1,%xmm1
  cvtsi2ssl -0xac(%rbp),%xmm1
  movss  -0xd0(%rbp),%xmm0
  divss  %xmm1,%xmm0
  movss  %xmm0,-0xd0(%rbp)
  mov    -0x60(%rbp),%rax
  mov    -0xd4(%rbp),%edx
  movslq %edx,%rdx
  movss  -0xd0(%rbp),%xmm0
  movss  %xmm0,(%rax,%rdx,4)
  addl   $0x1,-0xd4(%rbp)
L138:
  mov    -0xd4(%rbp),%eax
  cmp    -0xa8(%rbp),%eax
  jl     L147
  mov    -0xa8(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x58(%rbp)
  movslq %eax,%rdx
  mov    %rdx,-0x190(%rbp)
  movq   $0x0,-0x188(%rbp)
  movslq %eax,%rdx
  mov    %rdx,-0x1a0(%rbp)
  movq   $0x0,-0x198(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%ebx
  mov    $0x0,%edx
  div    %rbx
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L226:
  cmp    %rdx,%rsp
  je     L169
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L226
L169:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L170
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L170:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0x50(%rbp)
  mov    -0xa8(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x48(%rbp)
  movslq %eax,%rdx
  mov    %rdx,-0x1b0(%rbp)
  movq   $0x0,-0x1a8(%rbp)
  movslq %eax,%rdx
  mov    %rdx,-0x1c0(%rbp)
  movq   $0x0,-0x1b8(%rbp)
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%ebx
  mov    $0x0,%edx
  div    %rbx
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L52:
  cmp    %rdx,%rsp
  je     L351
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L52
L351:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L100
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L100:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0x40(%rbp)
  movl   $0x0,-0xc8(%rbp)
  jmp    L9
L281:
  mov    -0x70(%rbp),%rax
  mov    -0xc8(%rbp),%edx
  movslq %edx,%rdx
  movss  (%rax,%rdx,4),%xmm1
  mov    -0x70(%rbp),%rax
  mov    -0xc8(%rbp),%edx
  movslq %edx,%rdx
  movss  (%rax,%rdx,4),%xmm0
  mulss  %xmm1,%xmm0
  mov    -0x60(%rbp),%rax
  mov    -0xc8(%rbp),%edx
  movslq %edx,%rdx
  movss  (%rax,%rdx,4),%xmm1
  divss  %xmm1,%xmm0
  mov    -0x50(%rbp),%rax
  mov    -0xc8(%rbp),%edx
  movslq %edx,%rdx
  movss  %xmm0,(%rax,%rdx,4)
  mov    -0x60(%rbp),%rax
  mov    -0xc8(%rbp),%edx
  movslq %edx,%rdx
  movss  (%rax,%rdx,4),%xmm0
  mov    -0x70(%rbp),%rax
  mov    -0xc8(%rbp),%edx
  movslq %edx,%rdx
  movss  (%rax,%rdx,4),%xmm1
  divss  %xmm1,%xmm0
  mov    -0x40(%rbp),%rax
  mov    -0xc8(%rbp),%edx
  movslq %edx,%rdx
  movss  %xmm0,(%rax,%rdx,4)
  addl   $0x1,-0xc8(%rbp)
L9:
  mov    -0xc8(%rbp),%eax
  cmp    -0xa8(%rbp),%eax
  jl     L281
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0xc4(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0xc0(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0xbc(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0xb8(%rbp)
  movl   $0x0,-0xb4(%rbp)
  jmp    L175
L119:
  mov    -0x50(%rbp),%rax
  mov    -0xb4(%rbp),%edx
  movslq %edx,%rdx
  movss  (%rax,%rdx,4),%xmm0
  movss  -0xc4(%rbp),%xmm1
  addss  %xmm1,%xmm0
  movss  %xmm0,-0xc4(%rbp)
  mov    -0x40(%rbp),%rax
  mov    -0xb4(%rbp),%edx
  movslq %edx,%rdx
  movss  (%rax,%rdx,4),%xmm0
  movss  -0xbc(%rbp),%xmm1
  addss  %xmm1,%xmm0
  movss  %xmm0,-0xbc(%rbp)
  addl   $0x1,-0xb4(%rbp)
L175:
  mov    -0xb4(%rbp),%eax
  cmp    -0xa8(%rbp),%eax
  jl     L119
  pxor   %xmm1,%xmm1
  cvtsi2ssl -0xa8(%rbp),%xmm1
  movss  -0xc4(%rbp),%xmm0
  divss  %xmm1,%xmm0
  movss  %xmm0,-0xc4(%rbp)
  pxor   %xmm1,%xmm1
  cvtsi2ssl -0xa8(%rbp),%xmm1
  movss  -0xbc(%rbp),%xmm0
  divss  %xmm1,%xmm0
  movss  %xmm0,-0xbc(%rbp)
  movl   $0x0,-0xb0(%rbp)
  jmp    L67
L298:
  mov    -0x50(%rbp),%rax
  mov    -0xb0(%rbp),%edx
  movslq %edx,%rdx
  movss  (%rax,%rdx,4),%xmm0
  movaps %xmm0,%xmm1
  subss  -0xc4(%rbp),%xmm1
  mov    -0x50(%rbp),%rax
  mov    -0xb0(%rbp),%edx
  movslq %edx,%rdx
  movss  (%rax,%rdx,4),%xmm0
  subss  -0xc4(%rbp),%xmm0
  mulss  %xmm1,%xmm0
  movss  -0xc0(%rbp),%xmm1
  addss  %xmm1,%xmm0
  movss  %xmm0,-0xc0(%rbp)
  mov    -0x40(%rbp),%rax
  mov    -0xb0(%rbp),%edx
  movslq %edx,%rdx
  movss  (%rax,%rdx,4),%xmm0
  movaps %xmm0,%xmm1
  subss  -0xbc(%rbp),%xmm1
  mov    -0x40(%rbp),%rax
  mov    -0xb0(%rbp),%edx
  movslq %edx,%rdx
  movss  (%rax,%rdx,4),%xmm0
  subss  -0xbc(%rbp),%xmm0
  mulss  %xmm1,%xmm0
  movss  -0xb8(%rbp),%xmm1
  addss  %xmm1,%xmm0
  movss  %xmm0,-0xb8(%rbp)
  addl   $0x1,-0xb0(%rbp)
L67:
  mov    -0xb0(%rbp),%eax
  cmp    -0xa8(%rbp),%eax
  jl     L298
  pxor   %xmm1,%xmm1
  cvtsi2ssl -0xa8(%rbp),%xmm1
  movss  -0xc0(%rbp),%xmm0
  divss  %xmm1,%xmm0
  movss  %xmm0,-0xc0(%rbp)
  pxor   %xmm1,%xmm1
  cvtsi2ssl -0xa8(%rbp),%xmm1
  movss  -0xb8(%rbp),%xmm0
  divss  %xmm1,%xmm0
  movss  %xmm0,-0xb8(%rbp)
  movss  -0xa4(%rbp),%xmm0
  addss  %xmm0,%xmm0
  subss  -0xc4(%rbp),%xmm0
  movss  %xmm0,-0x9c(%rbp)
  movss  -0xa0(%rbp),%xmm0
  addss  %xmm0,%xmm0
  subss  -0xbc(%rbp),%xmm0
  movss  %xmm0,-0x98(%rbp)
  mov    -0x118(%rbp),%rax
  movss  -0x9c(%rbp),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x118(%rbp),%rax
  add    $0x4,%rax
  movss  -0x98(%rbp),%xmm0
  movss  %xmm0,(%rax)
  mov    -0x1c8(%rbp),%rsp
  nop
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L243
  call   <__stack_chk_fail@plt>
L243:
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

assistant: ```c
void gammabootstrap(float *surrogatenum, int *surrogatefreq, float *gammaparam, int numboot, int surrogatesize) {
  int samplesize = surrogatesize;
  float mainmean = 0;
  float mainvar = 0;
  int bootrep = numboot;
  for (int i = 0; i < surrogatesize; i++)
    mainmean = mainmean + surrogatenum[i];
  mainmean = mainmean / samplesize;
  for (int i = 0; i < surrogatesize; i++)
    mainvar = mainvar + ((surrogatenum[i] - mainmean) * (surrogatenum[i] - mainmean));
  mainvar = mainvar / samplesize;
  float mainalpha = (mainmean * mainmean) / mainvar;
  float maintheta = mainvar / mainmean;
  float bootsamples[bootrep][samplesize];
  float bootsampmean[bootrep];
  float bootsampvar[bootrep];
  time_t t;
  srand((unsigned)time(&t));
  for (int i = 0; i < bootrep; i++) {
    for (int j = 0; j < surrogatesize; j++) {
      int randomsample = surrogatenum[rand() % samplesize];
      bootsamples[i][j] = randomsample;
    }
  }
  for (int i = 0; i < bootrep; i++) {
    float tempmean = 0;
    for (int j = 0; j < samplesize; j++) {
      tempmean = tempmean + bootsamples[i][j];
    }
    tempmean = tempmean / samplesize;
    bootsampmean[i] = tempmean;
  }
  for (int i = 0; i < bootrep; i++) {
    float tempvar = 0;
    for (int j = 0; j < samplesize; j++) {
      tempvar = tempvar + ((bootsamples[i][j] - bootsampmean[i]) * (bootsamples[i][j] - bootsampmean[i]));
    }
    tempvar = tempvar / samplesize;
    bootsampvar[i] = tempvar;
  }
  float bootalpha[bootrep];
  float boottheta[bootrep];
  for (int i = 0; i < bootrep; i++) {
    bootalpha[i] = (bootsampmean[i] * bootsampmean[i]) / (bootsampvar[i]);
    boottheta[i] = (bootsampvar[i]) / (bootsampmean[i]);
  }
  float normalalphamean = 0;
  float normalalphavar = 0;
  float normalthetamean = 0;
  float normalthetavar = 0;
  for (int i = 0; i < bootrep; i++) {
    normalalphamean = normalalphamean + bootalpha[i];
    normalthetamean = normalthetamean + boottheta[i];
  }
  normalalphamean = normalalphamean / bootrep;
  normalthetamean = normalthetamean / bootrep;
  for (int i = 0; i < bootrep; i++) {
    normalalphavar = normalalphavar + ((bootalpha[i] - normalalphamean) * (bootalpha[i] - normalalphamean));
    normalthetavar = normalthetavar + ((boottheta[i] - normalthetamean) * (boottheta[i] - normalthetamean));
  }
  normalalphavar = normalalphavar / bootrep;
  normalthetavar = normalthetavar / bootrep;
  float alpha = (2 * mainalpha) - normalalphamean;
  float theta = (2 * maintheta) - normalthetamean;
  gammaparam[0] = alpha;
  gammaparam[1] = theta;
}
```