user: Translate the below assembly code into C programming language:

```asm
<expand2D>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %r9d,%ebx
  sub    $0x88,%rsp
  mov    0xc0(%rsp),%eax
  mov    %rsi,0x50(%rsp)
  mov    0x100(%rsp),%esi
  mov    %rdx,0x48(%rsp)
  mov    %eax,0x70(%rsp)
  mov    0xc8(%rsp),%eax
  mov    %esi,0x2c(%rsp)
  mov    0x108(%rsp),%esi
  mov    %eax,0x74(%rsp)
  mov    0xe8(%rsp),%r10d
  mov    %esi,0x78(%rsp)
  mov    0xf0(%rsp),%r9d
  mov    0x110(%rsp),%esi
  mov    0xd0(%rsp),%edx
  mov    %rdi,0x8(%rsp)
  mov    0xd8(%rsp),%eax
  mov    %ecx,0x28(%rsp)
  mov    %r8d,0x44(%rsp)
  mov    %r10d,0x30(%rsp)
  mov    %r9d,0x3c(%rsp)
  mov    %esi,0x7c(%rsp)
  movsd  %xmm0,0x58(%rsp)
  movsd  %xmm1,0x60(%rsp)
  movsd  %xmm2,0x68(%rsp)
  cmp    %eax,%edx
  jne    L133
  test   %esi,%esi
  je     L32
L133:
  cmp    %eax,%edx
  jle    L80
  mov    0x28(%rsp),%edi
  test   %edi,%edi
  jle    L80
  sub    %eax,%edx
  movl   $0x0,0x20(%rsp)
  movsd  D10(%rip),%xmm2
  pxor   %xmm3,%xmm3
  lea    -0x1(%rdx),%eax
  mov    %edx,0x34(%rsp)
  cltd
  idivl  0x2c(%rsp)
  lea    0x1(%rax),%edx
  mov    0x70(%rsp),%eax
  mov    %edx,0x40(%rsp)
  lea    (%rax,%rax,1),%ebp
  mov    0x30(%rsp),%eax
  sub    $0x1,%eax
  add    %eax,%edx
  mov    %eax,0x38(%rsp)
  imul   %edi,%eax
  imul   %ebx,%edi
  mov    %edx,0x4(%rsp)
  imul   %ebx,%eax
  mov    %edi,0x18(%rsp)
  mov    %eax,0x24(%rsp)
  lea    -0x1(%rbx),%eax
  mov    %eax,0x1c(%rsp)
  nopw   0x0(%rax,%rax,1)
L85:
  mov    0x8(%rsp),%rdx
  mov    0x24(%rsp),%r14d
  mov    0x38(%rsp),%eax
  lea    0x8(%rdx),%rdi
  mov    %r14d,%r12d
  mov    %rdi,0x10(%rsp)
  mov    %eax,%r13d
  cmp    %eax,0x4(%rsp)
  jle    L35
  nopw   0x0(%rax,%rax,1)
L34:
  test   %ebx,%ebx
  jle    L111
  mov    0x8(%rsp),%rax
  movslq %r12d,%rcx
  mov    0x10(%rsp),%rsi
  lea    (%rax,%rcx,8),%r15
  mov    0x1c(%rsp),%eax
  add    %rcx,%rax
  lea    (%rsi,%rax,8),%r14
  jmp    L98
  nopw   0x0(%rax,%rax,1)
L43:
  movapd %xmm2,%xmm0
  add    $0x8,%r15
  movsd  %xmm0,-0x8(%r15)
  cmp    %r14,%r15
  je     L111
L98:
  movsd  (%r15),%xmm0
  comisd %xmm3,%xmm0
  jbe    L61
  comisd %xmm0,%xmm2
  ja     L158
L61:
  comisd %xmm2,%xmm0
  ja     L43
  movapd %xmm3,%xmm5
  add    $0x8,%r15
  maxsd  %xmm0,%xmm5
  movapd %xmm5,%xmm0
  movsd  %xmm0,-0x8(%r15)
  cmp    %r14,%r15
  jne    L98
L111:
  add    $0x1,%r13d
  add    0x18(%rsp),%r12d
  cmp    0x4(%rsp),%r13d
  jl     L34
L35:
  mov    0x34(%rsp),%eax
  cltd
  idivl  0x2c(%rsp)
  test   %edx,%edx
  jne    L106
  mov    0x3c(%rsp),%eax
  sub    0x30(%rsp),%eax
  cmp    0x40(%rsp),%eax
  jge    L130
L106:
  addl   $0x1,0x20(%rsp)
  mov    0x20(%rsp),%eax
  add    %ebx,0x24(%rsp)
  cmp    %eax,0x28(%rsp)
  jne    L85
L80:
  mov    0x30(%rsp),%eax
  cmp    $0x1,%eax
  jle    L169
  mov    0x28(%rsp),%r8d
  sub    $0x1,%eax
  sub    $0x8,%rsp
  mov    %eax,%r9d
  mov    %r8d,%ecx
  imul   %eax,%ecx
  mov    0x7c(%rsp),%eax
  push   %rax
  mov    0x80(%rsp),%eax
  push   %rax
  push   %rbx
  movsd  0x78(%rsp),%xmm0
  movsd  0x88(%rsp),%xmm2
  mov    0x68(%rsp),%rdx
  movsd  0x80(%rsp),%xmm1
  mov    0x70(%rsp),%rsi
  mov    0x28(%rsp),%rdi
  call   <evolve2D@plt>
  add    $0x20,%rsp
L169:
  mov    0x3c(%rsp),%edx
  cmp    %edx,0x44(%rsp)
  jg     L143
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L32:
  mov    %ecx,%r14d
  mov    %r8d,%r11d
  mov    %ebx,%esi
  mov    %r10d,%r8d
  mov    %r11d,%ecx
  mov    %r14d,%edx
  call   <initExpansion2D@plt>
  jmp    L80
  nopw   0x0(%rax,%rax,1)
L158:
  movapd %xmm2,%xmm1
  pxor   %xmm4,%xmm4
  cvtsi2sd %ebp,%xmm4
  subsd  %xmm0,%xmm1
  mulsd  %xmm0,%xmm1
  divsd  %xmm4,%xmm1
  call   <rand_normal@plt>
  pxor   %xmm0,%xmm0
  pxor   %xmm3,%xmm3
  cvtsi2sd %rax,%xmm0
  mov    D10(%rip),%rax
  movq   %rax,%xmm2
  jmp    L61
L130:
  mov    0x40(%rsp),%eax
  mov    0x30(%rsp),%edx
  sub    $0x8,%rsp
  mov    %ebx,%ecx
  lea    -0x1(%rax,%rdx,1),%edx
  mov    0x84(%rsp),%eax
  push   %rax
  mov    0x88(%rsp),%eax
  push   %rax
  mov    0x88(%rsp),%eax
  push   %rax
  mov    0x64(%rsp),%r9d
  mov    0x48(%rsp),%r8d
  mov    0x68(%rsp),%rsi
  mov    0x28(%rsp),%rdi
  call   <expandNewpop2D@plt>
  mov    D10(%rip),%rax
  add    $0x20,%rsp
  pxor   %xmm3,%xmm3
  movq   %rax,%xmm2
  jmp    L106
L143:
  mov    0x28(%rsp),%r8d
  mov    0x44(%rsp),%r9d
  mov    %ebx,0xc0(%rsp)
  movsd  0x68(%rsp),%xmm2
  movsd  0x60(%rsp),%xmm1
  mov    %r8d,%eax
  sub    %edx,%r9d
  mov    %r8d,%ecx
  movsd  0x58(%rsp),%xmm0
  imul   %ebx,%eax
  mov    0x50(%rsp),%rsi
  imul   %r9d,%ecx
  imul   %edx,%eax
  mov    0x8(%rsp),%rdx
  cltq
  lea    (%rdx,%rax,8),%rdi
  mov    0x74(%rsp),%eax
  mov    0x48(%rsp),%rdx
  mov    %eax,0xd0(%rsp)
  mov    0x70(%rsp),%eax
  mov    %eax,0xc8(%rsp)
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10b0 <evolve2D@plt>
```

tool_calls: name: disassemble_data
arguments: data_tag: D10
data_type: byte[8]

tool: {"D10": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

assistant: ```c
void expand2D(double *Pops, double *OutsidePop, double *AF, int n1, int n2, int nSNP, double m1, double m2, double minf, int Ne, int Loss, int gen, int timeStart, int timeEnd, int popStart, int popEnd, int nSteps, int lengthSteps, int ke, int admixture) {
  int npopColonized = (int)(gen - timeStart - 1) / lengthSteps + 1;
  int p1, p2, l;
  if ((gen == timeStart) && (!admixture))
    initExpansion2D(Pops, nSNP, n1, n2, popStart, popEnd);
  if (gen > timeStart) {
    for (p1 = 0; p1 < n1; p1++) {
      for (p2 = popStart - 1; p2 < popStart - 1 + npopColonized; p2++) {
        for (l = 0; l < nSNP; l++) {
          double af = Pops[(p1 + p2 * n1) * nSNP + l];
          if ((af > 0) && (af < 1))
            af = (double)rand_normal(af, af * (1 - af) / (2 * Ne));
          if (af > 1)
            af = 1;
          if (af < 0)
            af = 0;
          Pops[(p1 + p2 * n1) * nSNP + l] = af;
        }
      }
      if (((gen - timeStart) % lengthSteps == 0) && (npopColonized < (popEnd - popStart + 1)))
        expandNewpop2D(Pops, AF, popStart + npopColonized - 1, nSNP, n1, n2, Ne, ke, admixture);
    }
  }
  if (popStart > 1)
    evolve2D(Pops, OutsidePop, AF, (popStart - 1) * n1, n1, popStart - 1, nSNP, m1, m2, minf, Ne, Loss);
  if (popEnd < n2)
    evolve2D(Pops + nSNP * n1 * popEnd, OutsidePop, AF, n1 * (n2 - popEnd), n1, n2 - popEnd, nSNP, m1, m2, minf, Ne, Loss);
}
```