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

```asm
<expand2D>:
  endbr64
  push   %r15
  mov    %ecx,%r15d
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x88,%rsp
  mov    0xc0(%rsp),%eax
  mov    %ecx,0x14(%rsp)
  mov    0x100(%rsp),%ecx
  mov    %rdx,0x48(%rsp)
  mov    %eax,0x40(%rsp)
  mov    0xc8(%rsp),%eax
  mov    %ecx,0x20(%rsp)
  mov    0xe8(%rsp),%r10d
  mov    %eax,0x74(%rsp)
  mov    0xf0(%rsp),%r11d
  mov    0x108(%rsp),%ecx
  mov    0x110(%rsp),%ebx
  mov    %rdi,0x18(%rsp)
  mov    0xd0(%rsp),%edx
  mov    0xd8(%rsp),%eax
  mov    %rsi,0x50(%rsp)
  mov    %r8d,0x38(%rsp)
  mov    %r9d,0xc(%rsp)
  mov    %r10d,0x3c(%rsp)
  mov    %r11d,0x44(%rsp)
  mov    %ecx,0x78(%rsp)
  mov    %ebx,0x7c(%rsp)
  movsd  %xmm0,0x58(%rsp)
  movsd  %xmm1,0x60(%rsp)
  movsd  %xmm2,0x68(%rsp)
  cmp    %eax,%edx
  jne    L31
  test   %ebx,%ebx
  je     L67
L31:
  cmp    %eax,%edx
  jle    L167
  mov    0x14(%rsp),%esi
  test   %esi,%esi
  jle    L167
  sub    %eax,%edx
  mov    0x3c(%rsp),%edi
  mov    0x44(%rsp),%ecx
  pxor   %xmm3,%xmm3
  lea    -0x1(%rdx),%eax
  mov    %edx,0x24(%rsp)
  cltd
  sub    %edi,%ecx
  movl   $0x0,0x8(%rsp)
  idivl  0x20(%rsp)
  mov    %ecx,0x70(%rsp)
  lea    0x1(%rax),%edx
  lea    -0x1(%rdi),%eax
  mov    %edx,0x34(%rsp)
  add    %eax,%edx
  mov    %eax,0x30(%rsp)
  imul   %esi,%eax
  mov    %edx,0x4(%rsp)
  mov    0x40(%rsp),%edx
  lea    (%rdx,%rdx,1),%ebp
  mov    %eax,%edx
  mov    0xc(%rsp),%eax
  imul   %eax,%edx
  mov    %eax,%r13d
  sub    $0x1,%eax
  imul   %esi,%r13d
  mov    %rax,0x28(%rsp)
  not    %rax
  mov    %rax,%r14
  mov    %edx,0x10(%rsp)
  shl    $0x3,%r14
  movslq %r13d,%r13
  shl    $0x3,%r13
  nopl   0x0(%rax)
L124:
  mov    0x30(%rsp),%ebx
  mov    0x4(%rsp),%eax
  cmp    %eax,%ebx
  jge    L62
  mov    0xc(%rsp),%eax
  test   %eax,%eax
  jle    L62
  mov    0x18(%rsp),%rcx
  movslq 0x10(%rsp),%rax
  movsd  D15(%rip),%xmm2
  add    0x28(%rsp),%rax
  lea    0x8(%rcx,%rax,8),%r15
  nopl   0x0(%rax,%rax,1)
L112:
  lea    (%r14,%r15,1),%r12
  jmp    L122
  cs nopw 0x0(%rax,%rax,1)
L100:
  movapd %xmm2,%xmm0
  add    $0x8,%r12
  movsd  %xmm0,-0x8(%r12)
  cmp    %r12,%r15
  je     L195
L122:
  movsd  (%r12),%xmm0
  comisd %xmm3,%xmm0
  jbe    L139
  comisd %xmm0,%xmm2
  ja     L126
L139:
  comisd %xmm2,%xmm0
  ja     L100
  movapd %xmm3,%xmm5
  add    $0x8,%r12
  maxsd  %xmm0,%xmm5
  movapd %xmm5,%xmm0
  movsd  %xmm0,-0x8(%r12)
  cmp    %r12,%r15
  jne    L122
L195:
  add    $0x1,%ebx
  add    %r13,%r15
  cmp    0x4(%rsp),%ebx
  jl     L112
L62:
  mov    0x24(%rsp),%eax
  cltd
  idivl  0x20(%rsp)
  test   %edx,%edx
  jne    L116
  mov    0x34(%rsp),%esi
  cmp    %esi,0x70(%rsp)
  jge    L158
L116:
  addl   $0x1,0x8(%rsp)
  mov    0xc(%rsp),%ecx
  mov    0x8(%rsp),%eax
  add    %ecx,0x10(%rsp)
  cmp    %eax,0x14(%rsp)
  jne    L124
L167:
  mov    0x3c(%rsp),%eax
  cmp    $0x1,%eax
  jle    L156
  mov    0x14(%rsp),%r8d
  sub    $0x1,%eax
  sub    $0x8,%rsp
  mov    %eax,%r9d
  mov    %r8d,%ecx
  imul   %eax,%ecx
  mov    0x7c(%rsp),%eax
  push   %rax
  mov    0x50(%rsp),%eax
  push   %rax
  mov    0x24(%rsp),%eax
  push   %rax
  movsd  0x78(%rsp),%xmm0
  movsd  0x88(%rsp),%xmm2
  mov    0x68(%rsp),%rdx
  movsd  0x80(%rsp),%xmm1
  mov    0x70(%rsp),%rsi
  mov    0x38(%rsp),%rdi
  call   <evolve2D@plt>
  add    $0x20,%rsp
L156:
  mov    0x44(%rsp),%edx
  cmp    %edx,0x38(%rsp)
  jg     L196
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L67:
  mov    %r8d,%r14d
  mov    %r9d,%esi
  mov    %r10d,%r8d
  mov    %r11d,%r9d
  mov    %r14d,%ecx
  mov    %r15d,%edx
  call   <initExpansion2D@plt>
  jmp    L167
  nopw   0x0(%rax,%rax,1)
L126:
  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    D15(%rip),%rax
  movq   %rax,%xmm2
  jmp    L139
L158:
  mov    0x3c(%rsp),%edi
  sub    $0x8,%rsp
  mov    0x84(%rsp),%eax
  lea    -0x1(%rsi,%rdi,1),%edx
  push   %rax
  mov    0x88(%rsp),%eax
  push   %rax
  mov    0x58(%rsp),%eax
  push   %rax
  mov    0x58(%rsp),%r9d
  mov    0x34(%rsp),%r8d
  mov    0x2c(%rsp),%ecx
  mov    0x68(%rsp),%rsi
  mov    0x38(%rsp),%rdi
  call   <expandNewpop2D@plt>
  add    $0x20,%rsp
  pxor   %xmm3,%xmm3
  jmp    L116
L196:
  mov    0xc(%rsp),%esi
  mov    0x14(%rsp),%r8d
  mov    0x38(%rsp),%r9d
  movsd  0x68(%rsp),%xmm2
  mov    %esi,%eax
  mov    %r8d,%ecx
  mov    %esi,0xc0(%rsp)
  movsd  0x60(%rsp),%xmm1
  imul   %r8d,%eax
  sub    %edx,%r9d
  movsd  0x58(%rsp),%xmm0
  mov    0x50(%rsp),%rsi
  imul   %r9d,%ecx
  imul   %edx,%eax
  mov    0x18(%rsp),%rdx
  cltq
  lea    (%rdx,%rax,8),%rdi
  mov    0x74(%rsp),%eax
  mov    0x48(%rsp),%rdx
  mov    %eax,0xd0(%rsp)
  mov    0x40(%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: read_data
arguments: tag: D15
type_infered: byte[8]

tool: {"D15": [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);
}
```