user: Demonstrate the C code that generates the assembly output below:

```asm
<permut_genes_among_indiv_within_pop>:
  endbr64
  push   %r15
  mov    %edx,%r15d
  push   %r14
  mov    %esi,%r14d
  push   %r13
  push   %r12
  mov    %r8,%r12
  push   %rbp
  mov    %r9d,%ebp
  push   %rbx
  mov    %edi,%ebx
  sub    $0x58,%rsp
  mov    %edi,0x2c(%rsp)
  imul   %edx,%edi
  mov    0x98(%rsp),%rax
  mov    %esi,0x48(%rsp)
  mov    0xa0(%rsp),%rsi
  mov    %r9d,0x30(%rsp)
  mov    0x90(%rsp),%r9
  mov    %rsi,0x38(%rsp)
  mov    %edi,%esi
  mov    %edi,0x4c(%rsp)
  xor    %edi,%edi
  mov    %r9,0x10(%rsp)
  mov    %rax,0x8(%rsp)
  call   <ivector@plt>
  mov    %rax,%r13
  test   %r14d,%r14d
  jle    L18
  test   %ebp,%ebp
  jle    L18
  mov    %ebx,%edi
  lea    -0x1(%r15),%r14d
  mov    0x10(%rsp),%r9
  mov    0x8(%rsp),%r8
  add    $0x1,%edi
  xor    %edx,%edx
  mov    %edi,0x34(%rsp)
  lea    0x4(,%r14,4),%rdi
  mov    %rdi,0x20(%rsp)
  mov    %rax,%rdi
L210:
  lea    0x1(%rdx),%rax
  mov    $0x1,%ebx
  mov    %rax,0x40(%rsp)
  lea    0x0(,%rax,8),%r13
  nopw   0x0(%rax,%rax,1)
L115:
  mov    0x2c(%rsp),%eax
  mov    0x34(%rsp),%ebp
  mov    $0x1,%edx
  xor    %r10d,%r10d
  test   %eax,%eax
  jg     L99
  jmp    L44
  nopl   0x0(%rax)
L137:
  add    $0x1,%rdx
  cmp    %rdx,%rbp
  je     L110
L99:
  cmp    %ebx,(%r12,%rdx,4)
  jne    L137
  test   %r15d,%r15d
  jle    L137
  mov    (%r9,%rdx,8),%rax
  mov    0x20(%rsp),%rsi
  mov    (%rax,%r13,1),%rax
  add    %rax,%rsi
  nopl   0x0(%rax)
L212:
  mov    (%rax),%ecx
  test   %ecx,%ecx
  je     L75
  add    $0x1,%r10d
  movslq %r10d,%r11
  mov    %ecx,(%rdi,%r11,4)
L75:
  add    $0x4,%rax
  cmp    %rax,%rsi
  jne    L212
  add    $0x1,%rdx
  cmp    %rdx,%rbp
  jne    L99
  nopl   0x0(%rax,%rax,1)
L110:
  mov    0x38(%rsp),%rcx
  mov    %r10d,%edx
  mov    $0x1,%esi
  mov    %r8,0x18(%rsp)
  mov    %r9,0x10(%rsp)
  mov    %rdi,0x8(%rsp)
  call   <resample_shuffle@plt>
  mov    0x8(%rsp),%rdi
  mov    0x10(%rsp),%r9
  xor    %ecx,%ecx
  mov    0x18(%rsp),%r8
  mov    $0x1,%edx
  jmp    L144
  nopl   0x0(%rax)
L162:
  add    $0x1,%rdx
  cmp    %rdx,%rbp
  je     L1
L144:
  cmp    %ebx,(%r12,%rdx,4)
  jne    L162
  test   %r15d,%r15d
  jle    L162
  mov    (%r9,%rdx,8),%rax
  mov    (%rax,%r13,1),%r10
  mov    (%r8,%rdx,8),%rax
  mov    (%rax,%r13,1),%rsi
  xor    %eax,%eax
  jmp    L74
  nopl   0x0(%rax,%rax,1)
L37:
  add    $0x1,%ecx
  movslq %ecx,%r11
  mov    (%rdi,%r11,4),%r11d
  mov    %r11d,(%rsi,%rax,4)
  lea    0x1(%rax),%r11
  cmp    %rax,%r14
  je     L162
L16:
  mov    %r11,%rax
L74:
  mov    (%r10,%rax,4),%r11d
  test   %r11d,%r11d
  jne    L37
  movl   $0x0,(%rsi,%rax,4)
  lea    0x1(%rax),%r11
  cmp    %rax,%r14
  jne    L16
  add    $0x1,%rdx
  cmp    %rdx,%rbp
  jne    L144
  nopl   0x0(%rax)
L1:
  add    $0x1,%ebx
  cmp    %ebx,0x30(%rsp)
  jge    L115
L220:
  mov    0x40(%rsp),%rdx
  lea    0x1(%rdx),%eax
  cmp    %eax,0x48(%rsp)
  jge    L210
  mov    %rdi,%r13
L18:
  mov    0x4c(%rsp),%edx
  add    $0x58,%rsp
  mov    %r13,%rdi
  xor    %esi,%esi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1080 <free_ivector@plt>
L44:
  mov    0x38(%rsp),%rcx
  xor    %edx,%edx
  mov    $0x1,%esi
  add    $0x1,%ebx
  mov    %r8,0x18(%rsp)
  mov    %r9,0x10(%rsp)
  mov    %rdi,0x8(%rsp)
  call   <resample_shuffle@plt>
  mov    0x8(%rsp),%rdi
  mov    0x10(%rsp),%r9
  mov    0x18(%rsp),%r8
  cmp    %ebx,0x30(%rsp)
  jge    L115
  jmp    L220
```

assistant: ```c
void permut_genes_among_indiv_within_pop(int n, int m, int ploidy, int *ploidyi, int *popi, int Npop, int ***gilc, int ***gilcmix, long *seed) {
  int i, l, c, Nvalidgene, p;
  int *gene;
  gene = ivector(0, n * ploidy);
  for (l = 1; l <= m; l++) {
    for (p = 1; p <= Npop; p++) {
      Nvalidgene = 0;
      for (i = 1; i <= n; i++)
        if (popi[i] == p) {
          for (c = 0; c < ploidy; c++)
            if (gilc[i][l][c]) {
              Nvalidgene++;
              gene[Nvalidgene] = gilc[i][l][c];
            }
        }
      resample_shuffle(gene, 1, Nvalidgene, seed);
      Nvalidgene = 0;
      for (i = 1; i <= n; i++)
        if (popi[i] == p) {
          for (c = 0; c < ploidy; c++) {
            if (gilc[i][l][c]) {
              Nvalidgene++;
              gilcmix[i][l][c] = gene[Nvalidgene];
            } else
              gilcmix[i][l][c] = 0;
          }
        }
    }
  }
  free_ivector(gene, 0, n * ploidy);
}
```