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

```asm
<newviewFlexGamma_Ancestral>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %r8,%r12
  push   %rbp
  push   %rbx
  mov    %edi,%ebx
  sub    $0xa8,%rsp
  mov    0xe0(%rsp),%rax
  movslq 0x100(%rsp),%rbp
  mov    %rdx,0x70(%rsp)
  mov    %rsi,0x80(%rsp)
  mov    %rax,0x50(%rsp)
  mov    0xe8(%rsp),%eax
  mov    %ebp,%edi
  mov    %rbp,%r13
  shl    $0x5,%edi
  mov    %rcx,0x10(%rsp)
  mov    %eax,0x40(%rsp)
  mov    0xf0(%rsp),%rax
  mov    %r9,0x30(%rsp)
  mov    %rax,0x18(%rsp)
  mov    0xf8(%rsp),%rax
  mov    %rax,0x20(%rsp)
  mov    0x108(%rsp),%rax
  mov    %rax,0x60(%rsp)
  mov    0x110(%rsp),%rax
  mov    %rax,0x68(%rsp)
  call   <rax_malloc@plt>
  mov    %rax,0x28(%rsp)
  mov    %ebp,%eax
  imul   %ebp,%eax
  mov    %eax,0xc(%rsp)
  lea    0x0(,%rbp,4),%eax
  mov    %eax,0x78(%rsp)
  cmp    $0x1,%ebx
  je     L370
  cmp    $0x2,%ebx
  je     L264
  test   %ebx,%ebx
  je     L6
  xor    %edi,%edi
  call   <assert@plt>
L21:
  mov    0x28(%rsp),%rdi
  add    $0xa8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10a0 <rax_free@plt>
L370:
  mov    0x40(%rsp),%eax
  test   %eax,%eax
  jle    L21
  movslq 0x78(%rsp),%rdi
  lea    -0x1(%r13),%ebx
  mov    0x28(%rsp),%rsi
  movq   $0x0,0x58(%rsp)
  mov    %r12,0x50(%rsp)
  shl    $0x3,%rbp
  pxor   %xmm3,%xmm3
  mov    %rdi,%rax
  mov    %rdi,0x90(%rsp)
  movslq 0x40(%rsp),%rdi
  movq   $0x0,0x38(%rsp)
  mov    %rdi,0x88(%rsp)
  lea    0x8(,%rbx,8),%rdi
  mov    %rdi,0x48(%rsp)
  mov    %eax,%edi
  sub    $0x1,%eax
  lea    0x8(%rsi,%rax,8),%rax
  mov    %edi,%r12d
  mov    %rax,0x98(%rsp)
L204:
  mov    0x38(%rsp),%eax
  mov    0x58(%rsp),%rdi
  xor    %r8d,%r8d
  mov    %r12d,0x80(%rsp)
  mov    0x28(%rsp),%rcx
  mov    $0x4,%r15d
  mov    %r8d,%r12d
  mov    %eax,0x78(%rsp)
  mov    0x70(%rsp),%rax
  lea    (%rax,%rdi,8),%r14
L203:
  mov    0x30(%rsp),%rax
  mov    0x38(%rsp),%rdi
  movzbl (%rax,%rdi,1),%r9d
  imul   %r13d,%r9d
  movslq %r9d,%r9
  mov    %r9,0x40(%rsp)
  test   %r13d,%r13d
  jle    L148
  mov    0x48(%rsp),%rdx
  mov    %rcx,%rdi
  xor    %esi,%esi
  call   <memset@plt>
  movslq %r12d,%rdx
  mov    0x40(%rsp),%r9
  xor    %r10d,%r10d
  mov    %rax,%rcx
  mov    0x18(%rsp),%rax
  shl    $0x3,%rdx
  pxor   %xmm3,%xmm3
  mov    0x10(%rsp),%rdi
  lea    (%rax,%rdx,1),%rsi
  mov    0x50(%rsp),%rax
  add    0x20(%rsp),%rdx
  lea    (%rax,%r9,8),%r9
  cs nopw 0x0(%rax,%rax,1)
L219:
  xor    %eax,%eax
  movapd %xmm3,%xmm2
  movapd %xmm3,%xmm1
  nopw   0x0(%rax,%rax,1)
L76:
  movsd  (%r9,%rax,8),%xmm0
  mulsd  (%rsi,%rax,8),%xmm0
  mov    %rax,%r8
  addsd  %xmm0,%xmm1
  movsd  (%r14,%rax,8),%xmm0
  mulsd  (%rdx,%rax,8),%xmm0
  add    $0x1,%rax
  addsd  %xmm0,%xmm2
  cmp    %rbx,%r8
  jne    L76
  mulsd  %xmm2,%xmm1
  xor    %eax,%eax
L448:
  movsd  (%rdi,%rax,8),%xmm0
  mov    %rax,%r8
  mulsd  %xmm1,%xmm0
  addsd  (%rcx,%rax,8),%xmm0
  movsd  %xmm0,(%rcx,%rax,8)
  add    $0x1,%rax
  cmp    %rbx,%r8
  jne    L448
  add    $0x1,%r10d
  add    %rbp,%rdi
  add    %rbp,%rsi
  add    %rbp,%rdx
  cmp    %r10d,%r13d
  jne    L219
L148:
  add    %rbp,%rcx
  add    %rbp,%r14
  add    0xc(%rsp),%r12d
  sub    $0x1,%r15d
  jne    L203
  mov    0x80(%rsp),%r12d
  mov    0x28(%rsp),%rdx
  xor    %eax,%eax
  test   %r12d,%r12d
  jg     L168
  jmp    L4
  nopl   0x0(%rax)
L234:
  movsd  D6(%rip),%xmm4
  comisd %xmm0,%xmm4
  seta   %sil
  seta   %cl
  add    $0x1,%eax
  add    $0x8,%rdx
  movzbl %sil,%esi
  cmp    %eax,%r12d
  jle    L48
L123:
  test   %cl,%cl
  je     L48
L168:
  movsd  (%rdx),%xmm0
  comisd %xmm0,%xmm3
  jbe    L234
  comisd D50(%rip),%xmm0
  seta   %sil
  seta   %cl
  add    $0x1,%eax
  add    $0x8,%rdx
  movzbl %sil,%esi
  cmp    %eax,%r12d
  jg     L123
L48:
  test   %esi,%esi
  jne    L238
L4:
  mov    0x68(%rsp),%rsi
  mov    0x78(%rsp),%ecx
  mov    %r12d,%r9d
  mov    %r13d,%r8d
  mov    0x60(%rsp),%rdx
  mov    0x28(%rsp),%rdi
  call   <ancestralGamma@plt>
  addq   $0x1,0x38(%rsp)
  mov    0x38(%rsp),%rax
  pxor   %xmm3,%xmm3
  mov    0x90(%rsp),%rsi
  add    %rsi,0x58(%rsp)
  cmp    %rax,0x88(%rsp)
  jne    L204
  jmp    L21
L238:
  mov    0x28(%rsp),%rax
  movsd  D42(%rip),%xmm1
  mov    0x98(%rsp),%rdx
L27:
  movsd  (%rax),%xmm0
  add    $0x8,%rax
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rax)
  cmp    %rax,%rdx
  jne    L27
  jmp    L4
L6:
  movslq 0x40(%rsp),%rax
  test   %eax,%eax
  jle    L21
  lea    -0x1(%r13),%ebx
  mov    %rax,0x80(%rsp)
  shl    $0x3,%rbp
  xor    %r14d,%r14d
  lea    0x8(,%rbx,8),%rax
  mov    %rax,0x58(%rsp)
L351:
  mov    %r14d,0x70(%rsp)
  mov    0x28(%rsp),%rcx
  xor    %r15d,%r15d
  movl   $0x4,0x48(%rsp)
L134:
  mov    0x30(%rsp),%rax
  movzbl (%rax,%r14,1),%r9d
  mov    0x50(%rsp),%rax
  movzbl (%rax,%r14,1),%r8d
  imul   %r13d,%r9d
  imul   %r13d,%r8d
  movslq %r9d,%r9
  mov    %r9,0x40(%rsp)
  movslq %r8d,%r8
  mov    %r8,0x38(%rsp)
  test   %r13d,%r13d
  jle    L110
  mov    0x58(%rsp),%rdx
  mov    %rcx,%rdi
  xor    %esi,%esi
  call   <memset@plt>
  mov    0x40(%rsp),%r9
  movslq %r15d,%rdx
  xor    %r10d,%r10d
  mov    0x38(%rsp),%r8
  mov    %rax,%rcx
  shl    $0x3,%rdx
  pxor   %xmm3,%xmm3
  mov    0x18(%rsp),%rax
  mov    0x10(%rsp),%rdi
  lea    (%r12,%r9,8),%r9
  lea    (%r12,%r8,8),%r8
  lea    (%rax,%rdx,1),%rsi
  add    0x20(%rsp),%rdx
  nopw   0x0(%rax,%rax,1)
L416:
  xor    %eax,%eax
  movapd %xmm3,%xmm2
  movapd %xmm3,%xmm1
  nopw   0x0(%rax,%rax,1)
L30:
  movsd  (%r9,%rax,8),%xmm0
  mulsd  (%rsi,%rax,8),%xmm0
  mov    %rax,%r11
  addsd  %xmm0,%xmm1
  movsd  (%r8,%rax,8),%xmm0
  mulsd  (%rdx,%rax,8),%xmm0
  add    $0x1,%rax
  addsd  %xmm0,%xmm2
  cmp    %rbx,%r11
  jne    L30
  mulsd  %xmm2,%xmm1
  xor    %eax,%eax
L328:
  movsd  (%rdi,%rax,8),%xmm0
  mov    %rax,%r11
  mulsd  %xmm1,%xmm0
  addsd  (%rcx,%rax,8),%xmm0
  movsd  %xmm0,(%rcx,%rax,8)
  add    $0x1,%rax
  cmp    %rbx,%r11
  jne    L328
  add    $0x1,%r10d
  add    %rbp,%rdi
  add    %rbp,%rsi
  add    %rbp,%rdx
  cmp    %r10d,%r13d
  jne    L416
L110:
  add    %rbp,%rcx
  add    0xc(%rsp),%r15d
  subl   $0x1,0x48(%rsp)
  jne    L134
  mov    0x78(%rsp),%r9d
  mov    0x70(%rsp),%ecx
  mov    %r13d,%r8d
  add    $0x1,%r14
  mov    0x60(%rsp),%rdx
  mov    0x68(%rsp),%rsi
  mov    0x28(%rsp),%rdi
  call   <ancestralGamma@plt>
  cmp    %r14,0x80(%rsp)
  jne    L351
  jmp    L21
L264:
  mov    0x40(%rsp),%edx
  test   %edx,%edx
  jle    L21
  mov    0x78(%rsp),%r14d
  lea    -0x1(%r13),%ebx
  shl    $0x3,%rbp
  movq   $0x0,0x50(%rsp)
  movl   $0x0,0x48(%rsp)
  pxor   %xmm3,%xmm3
  movslq %r14d,%rdi
  mov    %rdi,%rax
  mov    %rdi,0x78(%rsp)
  lea    0x8(,%rbx,8),%rdi
  mov    %rdi,0x38(%rsp)
  mov    0x28(%rsp),%rdi
  sub    $0x1,%eax
  lea    0x8(%rdi,%rax,8),%rax
  mov    %rax,0x88(%rsp)
L446:
  mov    0x50(%rsp),%rax
  xor    %r9d,%r9d
  mov    0x28(%rsp),%rcx
  mov    %r14d,0x58(%rsp)
  mov    $0x4,%r8d
  mov    %r9d,%r14d
  lea    0x0(,%rax,8),%r12
  mov    0x80(%rsp),%rax
  lea    (%rax,%r12,1),%r15
  add    0x70(%rsp),%r12
L403:
  test   %r13d,%r13d
  jle    L195
  mov    0x38(%rsp),%rdx
  mov    %rcx,%rdi
  xor    %esi,%esi
  mov    %r8d,0x30(%rsp)
  call   <memset@plt>
  movslq %r14d,%rdx
  mov    0x10(%rsp),%rdi
  xor    %r10d,%r10d
  mov    %rax,%rcx
  mov    0x18(%rsp),%rax
  shl    $0x3,%rdx
  pxor   %xmm3,%xmm3
  mov    0x30(%rsp),%r8d
  lea    (%rax,%rdx,1),%rsi
  add    0x20(%rsp),%rdx
L31:
  xor    %eax,%eax
  movapd %xmm3,%xmm2
  movapd %xmm3,%xmm1
  nopw   0x0(%rax,%rax,1)
L393:
  movsd  (%r15,%rax,8),%xmm0
  mulsd  (%rsi,%rax,8),%xmm0
  mov    %rax,%r9
  addsd  %xmm0,%xmm1
  movsd  (%r12,%rax,8),%xmm0
  mulsd  (%rdx,%rax,8),%xmm0
  add    $0x1,%rax
  addsd  %xmm0,%xmm2
  cmp    %rbx,%r9
  jne    L393
  mulsd  %xmm2,%xmm1
  xor    %eax,%eax
L307:
  movsd  (%rdi,%rax,8),%xmm0
  mov    %rax,%r9
  mulsd  %xmm1,%xmm0
  addsd  (%rcx,%rax,8),%xmm0
  movsd  %xmm0,(%rcx,%rax,8)
  add    $0x1,%rax
  cmp    %rbx,%r9
  jne    L307
  add    $0x1,%r10d
  add    %rbp,%rdi
  add    %rbp,%rsi
  add    %rbp,%rdx
  cmp    %r10d,%r13d
  jne    L31
L195:
  add    %rbp,%rcx
  add    %rbp,%r15
  add    %rbp,%r12
  add    0xc(%rsp),%r14d
  sub    $0x1,%r8d
  jne    L403
  mov    0x58(%rsp),%r14d
  mov    0x28(%rsp),%rdx
  xor    %eax,%eax
  test   %r14d,%r14d
  jg     L3
  jmp    L288
  nopl   0x0(%rax)
L342:
  movsd  D6(%rip),%xmm5
  comisd %xmm0,%xmm5
  seta   %sil
  seta   %cl
  add    $0x1,%eax
  add    $0x8,%rdx
  movzbl %sil,%esi
  cmp    %eax,%r14d
  jle    L214
L155:
  test   %cl,%cl
  je     L214
L3:
  movsd  (%rdx),%xmm0
  comisd %xmm0,%xmm3
  jbe    L342
  comisd D50(%rip),%xmm0
  seta   %sil
  seta   %cl
  add    $0x1,%eax
  add    $0x8,%rdx
  movzbl %sil,%esi
  cmp    %eax,%r14d
  jg     L155
L214:
  test   %esi,%esi
  jne    L228
L288:
  mov    0x48(%rsp),%r15d
  mov    0x68(%rsp),%rsi
  mov    %r14d,%r9d
  mov    %r13d,%r8d
  mov    0x60(%rsp),%rdx
  mov    0x28(%rsp),%rdi
  mov    %r15d,%ecx
  call   <ancestralGamma@plt>
  mov    %r15d,%eax
  mov    0x78(%rsp),%rsi
  add    %rsi,0x50(%rsp)
  add    $0x1,%eax
  cmp    %eax,0x40(%rsp)
  pxor   %xmm3,%xmm3
  mov    %eax,0x48(%rsp)
  jne    L446
  jmp    L21
L228:
  mov    0x28(%rsp),%rax
  movsd  D42(%rip),%xmm1
  mov    0x88(%rsp),%rdx
L0:
  movsd  (%rax),%xmm0
  add    $0x8,%rax
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rax)
  cmp    %rax,%rdx
  jne    L0
  jmp    L288
```

tool_calls: name: disassemble_data
arguments: label: D6
datatype: f32[2]
name: disassemble_data
arguments: label: D50
datatype: f32[4]
name: disassemble_data
arguments: label: D42
datatype: f64

tool: {"D6": [0.0,4.3655745685100555e-10]}

tool: {"D50": [0.0,-4.3655745685100555e-10,0.0,4.3655745685100555e-10]}

tool: D42: 1.157920892373162e+77

assistant: ```c
void newviewFlexGamma_Ancestral(int tipCase, double *x1, double *x2, double *extEV, double *tipVector, unsigned char *tipX1, unsigned char *tipX2, int n, double *left, double *right, const int numStates, double *diagptable, double *sumBuffer) {
  double *v, *x3 = (double *)rax_malloc(sizeof(double) * 4 * numStates);
  double x1px2;
  int i, j, l, k, scale;
  double *vl, *vr, al, ar;
  const int statesSquare = numStates * numStates, gammaStates = 4 * numStates;
  switch (tipCase) {
  case 0: {
    for (i = 0; i < n; i++) {
      for (k = 0; k < 4; k++) {
        vl = &(tipVector[numStates * tipX1[i]]);
        vr = &(tipVector[numStates * tipX2[i]]);
        v = &(x3[numStates * k]);
        for (l = 0; l < numStates; l++)
          v[l] = 0;
        for (l = 0; l < numStates; l++) {
          al = 0.0;
          ar = 0.0;
          for (j = 0; j < numStates; j++) {
            al += vl[j] * left[k * statesSquare + l * numStates + j];
            ar += vr[j] * right[k * statesSquare + l * numStates + j];
          }
          x1px2 = al * ar;
          for (j = 0; j < numStates; j++)
            v[j] += x1px2 * extEV[numStates * l + j];
        }
      }
      ancestralGamma(x3, sumBuffer, diagptable, i, numStates, gammaStates);
    }
  } break;
  case 1: {
    for (i = 0; i < n; i++) {
      for (k = 0; k < 4; k++) {
        vl = &(tipVector[numStates * tipX1[i]]);
        vr = &(x2[gammaStates * i + numStates * k]);
        v = &(x3[numStates * k]);
        for (l = 0; l < numStates; l++)
          v[l] = 0;
        for (l = 0; l < numStates; l++) {
          al = 0.0;
          ar = 0.0;
          for (j = 0; j < numStates; j++) {
            al += vl[j] * left[k * statesSquare + l * numStates + j];
            ar += vr[j] * right[k * statesSquare + l * numStates + j];
          }
          x1px2 = al * ar;
          for (j = 0; j < numStates; j++)
            v[j] += x1px2 * extEV[numStates * l + j];
        }
      }
      v = x3;
      scale = 1;
      for (l = 0; scale && (l < gammaStates); l++)
        scale = ((((v[l]) < 0) ? (-(v[l])) : (v[l])) < (1.0 / 115792089237316195423570985008687907853269984665640564039457584007913129639936.0));
      if (scale) {
        for (l = 0; l < gammaStates; l++)
          v[l] *= 115792089237316195423570985008687907853269984665640564039457584007913129639936.0;
      }
      ancestralGamma(x3, sumBuffer, diagptable, i, numStates, gammaStates);
    }
  } break;
  case 2:
    for (i = 0; i < n; i++) {
      for (k = 0; k < 4; k++) {
        vl = &(x1[gammaStates * i + numStates * k]);
        vr = &(x2[gammaStates * i + numStates * k]);
        v = &(x3[numStates * k]);
        for (l = 0; l < numStates; l++)
          v[l] = 0;
        for (l = 0; l < numStates; l++) {
          al = 0.0;
          ar = 0.0;
          for (j = 0; j < numStates; j++) {
            al += vl[j] * left[k * statesSquare + l * numStates + j];
            ar += vr[j] * right[k * statesSquare + l * numStates + j];
          }
          x1px2 = al * ar;
          for (j = 0; j < numStates; j++)
            v[j] += x1px2 * extEV[numStates * l + j];
        }
      }
      v = x3;
      scale = 1;
      for (l = 0; scale && (l < gammaStates); l++)
        scale = (((((v[l]) < 0) ? (-(v[l])) : (v[l])) < (1.0 / 115792089237316195423570985008687907853269984665640564039457584007913129639936.0)));
      if (scale) {
        for (l = 0; l < gammaStates; l++)
          v[l] *= 115792089237316195423570985008687907853269984665640564039457584007913129639936.0;
      }
      ancestralGamma(x3, sumBuffer, diagptable, i, numStates, gammaStates);
    }
    break;
  default:
    assert(0);
  }
  rax_free(x3);
}
```