user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<permut_allelesizes_among_2pop_alleles>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  mov    %edi,-0xfc4(%rbp)
  mov    %rsi,-0xfd0(%rbp)
  mov    %rdx,-0xfd8(%rbp)
  mov    %ecx,-0xfc8(%rbp)
  mov    %r8d,-0xfdc(%rbp)
  mov    %r9,-0xfe8(%rbp)
  mov    0x10(%rbp),%rax
  mov    %rax,-0xff0(%rbp)
  mov    0x18(%rbp),%rax
  mov    %rax,-0xff8(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x1,-0xfb8(%rbp)
  jmp    L66
L115:
  movl   $0x1,-0xfbc(%rbp)
  jmp    L114
L59:
  mov    -0xfb8(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xfe8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xfbc(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    -0xfb8(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0xff0(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%rcx
  mov    -0xfbc(%rbp),%edx
  movslq %edx,%rdx
  shl    $0x2,%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0xfbc(%rbp)
L114:
  mov    -0xfb8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xfd0(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0xfbc(%rbp)
  jle    L59
  movl   $0x0,-0xfb4(%rbp)
  movl   $0x1,-0xfbc(%rbp)
  jmp    L54
L52:
  mov    -0xfc8(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xfd8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xfb8(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xfbc(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  pxor   %xmm1,%xmm1
  ucomiss %xmm1,%xmm0
  jp     L119
  pxor   %xmm1,%xmm1
  ucomiss %xmm1,%xmm0
  jne    L119
  mov    -0xfdc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xfd8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xfb8(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xfbc(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  pxor   %xmm1,%xmm1
  ucomiss %xmm1,%xmm0
  jp     L119
  pxor   %xmm1,%xmm1
  ucomiss %xmm1,%xmm0
  je     L145
L119:
  addl   $0x1,-0xfb4(%rbp)
  mov    -0xfb8(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xfe8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xfbc(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0xfb4(%rbp),%eax
  cltq
  mov    %edx,-0xfb0(%rbp,%rax,4)
L145:
  addl   $0x1,-0xfbc(%rbp)
L54:
  mov    -0xfb8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xfd0(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0xfbc(%rbp)
  jle    L52
  mov    -0xff8(%rbp),%rcx
  mov    -0xfb4(%rbp),%edx
  lea    -0xfb0(%rbp),%rax
  mov    $0x1,%esi
  mov    %rax,%rdi
  call   <resample_shuffle@plt>
  movl   $0x0,-0xfb4(%rbp)
  movl   $0x1,-0xfbc(%rbp)
  jmp    L81
L146:
  mov    -0xfc8(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xfd8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xfb8(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xfbc(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  pxor   %xmm1,%xmm1
  ucomiss %xmm1,%xmm0
  jp     L26
  pxor   %xmm1,%xmm1
  ucomiss %xmm1,%xmm0
  jne    L26
  mov    -0xfdc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xfd8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xfb8(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xfbc(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  pxor   %xmm1,%xmm1
  ucomiss %xmm1,%xmm0
  jp     L26
  pxor   %xmm1,%xmm1
  ucomiss %xmm1,%xmm0
  je     L99
L26:
  addl   $0x1,-0xfb4(%rbp)
  mov    -0xfb8(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xff0(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xfbc(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,%rdx
  mov    -0xfb4(%rbp),%eax
  cltq
  mov    -0xfb0(%rbp,%rax,4),%eax
  mov    %eax,(%rdx)
L99:
  addl   $0x1,-0xfbc(%rbp)
L81:
  mov    -0xfb8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xfd0(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0xfbc(%rbp)
  jle    L146
  addl   $0x1,-0xfb8(%rbp)
L66:
  mov    -0xfb8(%rbp),%eax
  cmp    -0xfc4(%rbp),%eax
  jle    L115
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L95
  call   <__stack_chk_fail@plt>
L95:
  leave
  ret
```

assistant: ```c
void permut_allelesizes_among_2pop_alleles(int m, int *Nallelel, float ***Ppla, int pop1, int pop2, int **allelesizela, int **allelesizelamix, long *seed) {
  int a, l, twopopa, size2popa[1000];
  for (l = 1; l <= m; l++) {
    for (a = 1; a <= Nallelel[l]; a++)
      allelesizelamix[l][a] = allelesizela[l][a];
    twopopa = 0;
    for (a = 1; a <= Nallelel[l]; a++)
      if (Ppla[pop1][l][a] || Ppla[pop2][l][a]) {
        twopopa++;
        size2popa[twopopa] = allelesizela[l][a];
      }
    resample_shuffle(size2popa, 1, twopopa, seed);
    twopopa = 0;
    for (a = 1; a <= Nallelel[l]; a++)
      if (Ppla[pop1][l][a] || Ppla[pop2][l][a]) {
        twopopa++;
        allelesizelamix[l][a] = size2popa[twopopa];
      }
  }
}
```