user: 请将以下的汇编代码转换成C语言代码:

```asm
<gammabootstrap>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  mov    %rdi,%r14
  push   %r13
  push   %r12
  push   %rbx
  mov    %r8d,%ebx
  sub    $0x78,%rsp
  mov    %rdx,-0x78(%rbp)
  mov    %ecx,-0x48(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  test   %r8d,%r8d
  jle    L184
  lea    -0x1(%r8),%edx
  pxor   %xmm6,%xmm6
  mov    %rdi,%rax
  lea    0x4(%rdi,%rdx,4),%rcx
  movss  %xmm6,-0x5c(%rbp)
  mov    %rdi,%rdx
  movaps %xmm6,%xmm1
  nopl   (%rax)
L310:
  addss  (%rdx),%xmm1
  add    $0x4,%rdx
  cmp    %rcx,%rdx
  jne    L310
  pxor   %xmm7,%xmm7
  pxor   %xmm2,%xmm2
  cvtsi2ss %ebx,%xmm7
  divss  %xmm7,%xmm1
  movss  %xmm7,-0x44(%rbp)
  nopw   0x0(%rax,%rax,1)
L29:
  movss  (%rax),%xmm0
  add    $0x4,%rax
  subss  %xmm1,%xmm0
  mulss  %xmm0,%xmm0
  addss  %xmm0,%xmm2
  cmp    %rcx,%rax
  jne    L29
  divss  -0x44(%rbp),%xmm2
L85:
  movaps %xmm1,%xmm0
  movslq -0x48(%rbp),%rdx
  movslq %ebx,%rax
  mulss  %xmm1,%xmm0
  lea    0x0(,%rax,4),%rsi
  shl    $0x2,%rdx
  mov    %rsi,-0x50(%rbp)
  mov    %rsp,%rsi
  imul   %rdx,%rax
  divss  %xmm2,%xmm0
  add    $0xf,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rsi
  and    $0xfffffffffffffff0,%rcx
  divss  %xmm1,%xmm2
  movss  %xmm0,-0x60(%rbp)
  movss  %xmm2,-0x6c(%rbp)
  cmp    %rsi,%rsp
  je     L354
L162:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L162
L354:
  and    $0xfff,%ecx
  sub    %rcx,%rsp
  test   %rcx,%rcx
  jne    L317
L197:
  lea    0xf(%rdx),%rsi
  mov    %rsp,%rdx
  mov    %rsp,%r12
  mov    %rsi,%rax
  mov    %rsi,-0x90(%rbp)
  and    $0xfffffffffffff000,%rsi
  sub    %rsi,%rdx
  and    $0xfffffffffffffff0,%rax
  cmp    %rdx,%rsp
  je     L218
L141:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rdx,%rsp
  jne    L141
L218:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  jne    L257
L33:
  mov    -0x90(%rbp),%rdi
  mov    %rsp,%rdx
  mov    %rsp,-0x80(%rbp)
  mov    %rdi,%rax
  and    $0xfffffffffffff000,%rdi
  sub    %rdi,%rdx
  and    $0xfffffffffffffff0,%rax
  cmp    %rdx,%rsp
  je     L208
L316:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rdx,%rsp
  jne    L316
L208:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L327
  orq    $0x0,-0x8(%rsp,%rax,1)
L327:
  lea    -0x3c(%rbp),%rdi
  mov    %rsp,-0x98(%rbp)
  call   <time@plt>
  mov    %eax,%edi
  call   <srand@plt>
  mov    -0x48(%rbp),%eax
  test   %eax,%eax
  jle    L37
  lea    -0x1(%rbx),%eax
  xor    %esi,%esi
  lea    0x0(,%rax,4),%rdi
  mov    $0xfffffffffffffffc,%rax
  sub    %rdi,%rax
  mov    %rdi,-0x68(%rbp)
  lea    0x4(%r12,%rdi,1),%r12
  mov    %rax,-0x58(%rbp)
  mov    %r12,%r13
  mov    %r12,-0x88(%rbp)
  mov    %esi,%r12d
  nopl   0x0(%rax)
L132:
  mov    -0x58(%rbp),%rax
  lea    (%rax,%r13,1),%r15
  test   %ebx,%ebx
  jle    L32
  nopl   0x0(%rax)
L143:
  xor    %eax,%eax
  add    $0x4,%r15
  call   <rand@plt>
  pxor   %xmm0,%xmm0
  cltd
  idiv   %ebx
  movslq %edx,%rdx
  cvttss2si (%r14,%rdx,4),%eax
  cvtsi2ss %eax,%xmm0
  movss  %xmm0,-0x4(%r15)
  cmp    %r13,%r15
  jne    L143
L32:
  lea    0x1(%r12),%eax
  add    -0x50(%rbp),%r13
  cmp    %eax,-0x48(%rbp)
  je     L94
  mov    %eax,%r12d
  jmp    L132
L317:
  orq    $0x0,-0x8(%rsp,%rcx,1)
  jmp    L197
L184:
  pxor   %xmm6,%xmm6
  pxor   %xmm1,%xmm1
  cvtsi2ss %r8d,%xmm6
  movss  %xmm1,-0x5c(%rbp)
  divss  %xmm6,%xmm1
  movss  %xmm6,-0x44(%rbp)
  movaps %xmm1,%xmm2
  jmp    L85
L257:
  orq    $0x0,-0x8(%rsp,%rax,1)
  jmp    L33
  xchg   %ax,%ax
L94:
  mov    -0x80(%rbp),%rax
  mov    %r12d,%r15d
  mov    -0x50(%rbp),%r8
  mov    $0xfffffffffffffffc,%rsi
  mov    -0x88(%rbp),%r12
  movss  -0x5c(%rbp),%xmm1
  mov    %rax,%rcx
  lea    0x4(%rax,%r15,4),%rdi
  sub    -0x68(%rbp),%rsi
  mov    %r12,%rdx
  nopl   (%rax)
L113:
  lea    (%rsi,%rdx,1),%rax
  movaps %xmm1,%xmm0
  test   %ebx,%ebx
  jle    L5
  nopl   0x0(%rax,%rax,1)
L17:
  addss  (%rax),%xmm0
  add    $0x4,%rax
  cmp    %rdx,%rax
  jne    L17
L5:
  divss  -0x44(%rbp),%xmm0
  add    $0x4,%rcx
  movss  %xmm0,-0x4(%rcx)
  add    %r8,%rdx
  cmp    %rdi,%rcx
  jne    L113
  mov    -0x50(%rbp),%rsi
  mov    -0x80(%rbp),%r8
  xor    %edx,%edx
  mov    $0xfffffffffffffffc,%rcx
  mov    -0x98(%rbp),%rdi
  movss  -0x5c(%rbp),%xmm3
  sub    -0x68(%rbp),%rcx
  nopl   0x0(%rax)
L149:
  movaps %xmm3,%xmm1
  test   %ebx,%ebx
  jle    L187
  movss  (%r8,%rdx,4),%xmm2
  lea    (%rcx,%r12,1),%rax
  movaps %xmm3,%xmm1
  nopl   0x0(%rax)
L106:
  movss  (%rax),%xmm0
  add    $0x4,%rax
  subss  %xmm2,%xmm0
  mulss  %xmm0,%xmm0
  addss  %xmm0,%xmm1
  cmp    %rax,%r12
  jne    L106
L187:
  divss  -0x44(%rbp),%xmm1
  lea    0x1(%rdx),%rax
  movss  %xmm1,(%rdi,%rdx,4)
  add    %rsi,%r12
  cmp    %r15,%rdx
  je     L36
  mov    %rax,%rdx
  jmp    L149
  nopl   0x0(%rax)
L36:
  mov    -0x90(%rbp),%rdi
  mov    %rsp,%rdx
  mov    %rdi,%rax
  and    $0xfffffffffffff000,%rdi
  sub    %rdi,%rdx
  and    $0xfffffffffffffff0,%rax
  cmp    %rdx,%rsp
  je     L34
L174:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rdx,%rsp
  jne    L174
L34:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L281
  orq    $0x0,-0x8(%rsp,%rax,1)
L281:
  mov    -0x90(%rbp),%rax
  mov    %rsp,%rsi
  mov    %rsp,%rdx
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rsi
  and    $0xfffffffffffffff0,%rcx
  cmp    %rsi,%rsp
  je     L222
L256:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L256
L222:
  mov    %rcx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L120
  orq    $0x0,-0x8(%rsp,%rax,1)
L120:
  mov    -0x80(%rbp),%rdi
  mov    -0x98(%rbp),%r8
  mov    %rsp,%rcx
  xor    %eax,%eax
  nopl   (%rax)
L225:
  movss  (%rdi,%rax,4),%xmm1
  movss  (%r8,%rax,4),%xmm0
  mov    %rax,%rsi
  movaps %xmm1,%xmm2
  mulss  %xmm1,%xmm2
  divss  %xmm0,%xmm2
  divss  %xmm1,%xmm0
  movss  %xmm2,(%rdx,%rax,4)
  movss  %xmm0,(%rcx,%rax,4)
  add    $0x1,%rax
  cmp    %r15,%rsi
  jne    L225
  pxor   %xmm0,%xmm0
  xor    %eax,%eax
  movaps %xmm0,%xmm1
  nopl   0x0(%rax)
L152:
  mov    %rax,%rsi
  addss  (%rdx,%rax,4),%xmm1
  addss  (%rcx,%rax,4),%xmm0
  add    $0x1,%rax
  cmp    %r15,%rsi
  jne    L152
L201:
  pxor   %xmm3,%xmm3
  movss  -0x60(%rbp),%xmm2
  mov    -0x78(%rbp),%rax
  cvtsi2ssl -0x48(%rbp),%xmm3
  addss  %xmm2,%xmm2
  divss  %xmm3,%xmm1
  divss  %xmm3,%xmm0
  subss  %xmm1,%xmm2
  movss  -0x6c(%rbp),%xmm1
  addss  %xmm1,%xmm1
  movss  %xmm2,(%rax)
  subss  %xmm0,%xmm1
  movss  %xmm1,0x4(%rax)
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L219
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L37:
  pxor   %xmm0,%xmm0
  movaps %xmm0,%xmm1
  jmp    L201
L219:
  call   <__stack_chk_fail@plt>
```

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;
}
```