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

```asm
<permut_allelesizes_among_2pop_alleles>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xfd8,%rsp
  mov    %edi,0x14(%rsp)
  mov    %rsi,%rax
  mov    0x1010(%rsp),%rbp
  mov    0x1018(%rsp),%rbx
  mov    %rbx,0x18(%rsp)
  mov    %fs:0x28,%rsi
  mov    %rsi,0xfc8(%rsp)
  xor    %esi,%esi
  test   %edi,%edi
  jle    L112
  movslq %ecx,%rcx
  lea    (%rdx,%rcx,8),%r13
  movslq %r8d,%r8
  lea    (%rdx,%r8,8),%r14
  add    $0x4,%rax
  mov    %rax,0x8(%rsp)
  lea    0x8(%r9),%r12
  add    $0x8,%rbp
  mov    $0x1,%r15d
  jmp    L93
L135:
  add    $0x1,%esi
  mov    (%rdi),%rdx
  mov    (%rdx,%rax,1),%ecx
  movslq %esi,%rdx
  mov    %ecx,0x20(%rsp,%rdx,4)
L47:
  add    $0x4,%rax
  cmp    %r10,%rax
  je     L50
L116:
  mov    (%r8),%rdx
  pxor   %xmm4,%xmm4
  ucomiss (%rdx,%rax,1),%xmm4
  jp     L135
  jne    L135
  mov    (%r14),%rdx
  mov    (%rdx,%r9,1),%rdx
  ucomiss (%rdx,%rax,1),%xmm4
  jp     L135
  ucomiss (%rdx,%rax,1),%xmm0
  je     L47
  jmp    L135
L34:
  mov    $0x0,%esi
  jmp    L50
L192:
  add    $0x1,%esi
  movslq %esi,%rcx
  mov    0x20(%rsp,%rcx,4),%r8d
  mov    0x0(%rbp),%rcx
  mov    %r8d,(%rcx,%rax,1)
L18:
  add    $0x1,%edx
  add    $0x4,%rax
  cmp    %edx,(%rbx)
  jl     L62
L176:
  mov    0x0(%r13),%rcx
  mov    (%rcx,%rdi,1),%rcx
  ucomiss (%rcx,%rax,1),%xmm0
  jp     L192
  ucomiss (%rcx,%rax,1),%xmm1
  jne    L192
  mov    (%r14),%rcx
  mov    (%rcx,%rdi,1),%rcx
  ucomiss (%rcx,%rax,1),%xmm2
  jp     L192
  ucomiss (%rcx,%rax,1),%xmm3
  je     L18
  jmp    L192
L62:
  add    $0x1,%r15
  addq   $0x4,0x8(%rsp)
  add    $0x8,%r12
  add    $0x8,%rbp
  cmp    %r15d,0x14(%rsp)
  jl     L112
L93:
  mov    0x8(%rsp),%rsi
  mov    %rsi,%rbx
  mov    $0x4,%eax
  mov    $0x1,%edx
  mov    %r12,%rdi
  cmpl   $0x0,(%rsi)
  jle    L27
L211:
  mov    (%r12),%rcx
  mov    (%rcx,%rax,1),%esi
  mov    0x0(%rbp),%rcx
  mov    %esi,(%rcx,%rax,1)
  add    $0x1,%edx
  mov    (%rbx),%ecx
  add    $0x4,%rax
  cmp    %edx,%ecx
  jge    L211
  test   %ecx,%ecx
  jle    L34
  lea    0x0(,%r15,8),%r9
  mov    %r9,%r8
  add    0x0(%r13),%r8
  lea    0x1(%rcx),%r10d
  shl    $0x2,%r10
  mov    $0x4,%eax
  mov    $0x0,%esi
  pxor   %xmm0,%xmm0
  jmp    L116
L27:
  mov    $0x0,%esi
L50:
  lea    0x20(%rsp),%rdi
  mov    0x18(%rsp),%rcx
  mov    %esi,%edx
  mov    $0x1,%esi
  call   <resample_shuffle@plt>
  cmpl   $0x0,(%rbx)
  jle    L62
  lea    0x0(,%r15,8),%rdi
  mov    $0x4,%eax
  mov    $0x0,%esi
  mov    $0x1,%edx
  pxor   %xmm0,%xmm0
  movaps %xmm0,%xmm1
  movaps %xmm0,%xmm2
  movaps %xmm0,%xmm3
  jmp    L176
L112:
  mov    0xfc8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L213
  add    $0xfd8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L213:
  call   <__stack_chk_fail@plt>
```

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