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

```asm
<groundwaterTransportCoefficientsEvaluate_hetMat>:
  endbr64
  push   %r15
  mov    %edi,%eax
  mov    %edx,%edi
  mov    %edx,%r15d
  push   %r14
  imul   %edx,%edi
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xa8,%rsp
  mov    %esi,0x74(%rsp)
  mov    0xe8(%rsp),%r12
  mov    %r8,0x88(%rsp)
  mov    0x108(%rsp),%r14
  mov    %r9,0x50(%rsp)
  mov    %edi,0x2c(%rsp)
  test   %eax,%eax
  jle    L23
  imul   %esi,%edi
  sub    $0x1,%eax
  mov    %rcx,0x60(%rsp)
  movapd %xmm0,%xmm3
  lea    0x4(%rcx,%rax,4),%rax
  movl   $0x0,0x70(%rsp)
  pxor   %xmm4,%xmm4
  mov    %rax,0x80(%rsp)
  movslq %edx,%rax
  mov    %edi,0x78(%rsp)
  mov    %esi,%edi
  lea    0x0(,%rax,8),%r13
  imul   %edx,%edi
  mov    %rax,0x48(%rsp)
  movl   $0x0,0x6c(%rsp)
  movl   $0x0,0x68(%rsp)
  mov    %edi,0x7c(%rsp)
  lea    0x8(,%rax,8),%rdi
  neg    %rax
  shl    $0x3,%rax
  mov    %rdi,0x38(%rsp)
  mov    %rax,0x58(%rsp)
  lea    -0x1(%rsi),%eax
  mov    %eax,0x90(%rsp)
  lea    -0x1(%rdx),%eax
  mov    %eax,0x94(%rsp)
L103:
  mov    0x60(%rsp),%rax
  mov    0x74(%rsp),%edx
  movslq (%rax),%rax
  test   %edx,%edx
  jle    L151
  movslq 0x70(%rsp),%rdx
  mov    0x88(%rsp),%rbp
  shl    $0x3,%rax
  mov    0xf0(%rsp),%rbx
  mov    0xf8(%rsp),%rdi
  mov    %rax,0x40(%rsp)
  add    %rax,%rbp
  lea    0x0(,%rdx,8),%rax
  add    %rax,%rdi
  add    %rax,%rbx
  add    0x100(%rsp),%rax
  mov    %rax,0x8(%rsp)
  mov    0x90(%rsp),%eax
  mov    %rdi,(%rsp)
  mov    0xf0(%rsp),%rdi
  add    %rdx,%rax
  lea    0x8(%rdi,%rax,8),%rax
  mov    %rax,0x20(%rsp)
  mov    0x6c(%rsp),%eax
  mov    %eax,0x28(%rsp)
  mov    0x68(%rsp),%eax
  mov    %eax,0x14(%rsp)
  mov    0x94(%rsp),%eax
  add    $0x1,%rax
  mov    %rax,0x18(%rsp)
  cs nopw 0x0(%rax,%rax,1)
L131:
  movsd  0x0(%rbp),%xmm0
  mulsd  (%rbx),%xmm0
  mov    (%rsp),%rax
  movsd  %xmm0,(%rax)
  mov    0x8(%rsp),%rax
  movsd  0x0(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  test   %r15d,%r15d
  jle    L54
  movslq 0x28(%rsp),%rax
  mov    0x18(%rsp),%rdi
  movapd %xmm4,%xmm1
  mov    0x110(%rsp),%rsi
  lea    (%rdi,%rax,1),%rcx
  lea    0x0(,%rax,8),%rdx
  shl    $0x3,%rcx
  xchg   %ax,%ax
L136:
  movsd  (%r12,%rdx,1),%xmm0
  mulsd  (%rbx),%xmm0
  movsd  %xmm0,(%r14,%rdx,1)
  movsd  (%r12,%rdx,1),%xmm0
  movsd  %xmm0,(%rsi,%rdx,1)
  mulsd  %xmm0,%xmm0
  add    $0x8,%rdx
  addsd  %xmm0,%xmm1
  cmp    %rdx,%rcx
  jne    L136
  ucomisd %xmm1,%xmm4
  ja     L18
  sqrtsd %xmm1,%xmm1
  comisd %xmm4,%xmm1
  jbe    L77
L147:
  mov    0x40(%rsp),%rsi
  mov    0xe0(%rsp),%r8
  lea    (%r12,%rax,8),%r9
  mov    %rbx,0x30(%rsp)
  mov    0x50(%rsp),%rdi
  movslq 0x14(%rsp),%rax
  mov    %r9,%rcx
  mov    %r12,0xe8(%rsp)
  add    %rsi,%r8
  mov    0x38(%rsp),%r12
  mov    0x58(%rsp),%rbx
  mov    %r14,0x108(%rsp)
  add    %rsi,%rdi
  mov    0x48(%rsp),%rsi
  mov    0x18(%rsp),%r14
  mov    $0x1,%r10d
  lea    (%rsi,%rax,1),%rdx
  mov    0x118(%rsp),%rsi
  lea    (%rsi,%rdx,8),%r11
  lea    (%rsi,%rax,8),%rsi
  nopl   0x0(%rax,%rax,1)
L67:
  movsd  (%r8),%xmm5
  movsd  (%rdi),%xmm2
  movsd  (%rcx),%xmm6
  subsd  %xmm5,%xmm2
  mulsd  %xmm1,%xmm5
  movapd %xmm2,%xmm0
  movsd  0x0(%rbp),%xmm2
  mulsd  %xmm6,%xmm0
  mulsd  %xmm3,%xmm2
  mulsd  %xmm6,%xmm0
  addsd  %xmm5,%xmm2
  divsd  %xmm1,%xmm0
  addsd  %xmm2,%xmm0
  movsd  %xmm0,(%r11,%rbx,1)
  cmp    %r10,%r14
  je     L108
  mov    %r11,%rdx
  mov    %r10,%rax
  nopw   0x0(%rax,%rax,1)
L58:
  movsd  (%rdi),%xmm0
  subsd  (%r8),%xmm0
  mulsd  (%rcx),%xmm0
  mulsd  (%r9,%rax,8),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rsi,%rax,8)
  add    $0x1,%rax
  movsd  %xmm0,(%rdx)
  add    %r13,%rdx
  cmp    %eax,%r15d
  jg     L58
  add    $0x1,%r10
  add    $0x8,%rcx
  add    %r12,%r11
  add    %r13,%rsi
  jmp    L67
  nop
L108:
  mov    0x30(%rsp),%rbx
  mov    0xe8(%rsp),%r12
  mov    0x108(%rsp),%r14
L54:
  mov    0x2c(%rsp),%edi
  addq   $0x8,(%rsp)
  add    $0x8,%rbx
  addq   $0x8,0x8(%rsp)
  add    %edi,0x14(%rsp)
  add    %r15d,0x28(%rsp)
  cmp    0x20(%rsp),%rbx
  jne    L131
L151:
  mov    0x78(%rsp),%edi
  addq   $0x4,0x60(%rsp)
  add    %edi,0x68(%rsp)
  mov    0x60(%rsp),%rax
  mov    0x7c(%rsp),%edi
  add    %edi,0x6c(%rsp)
  mov    0x74(%rsp),%edi
  add    %edi,0x70(%rsp)
  cmp    0x80(%rsp),%rax
  jne    L103
L23:
  add    $0xa8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L77:
  test   %r15d,%r15d
  jle    L54
L155:
  movslq 0x14(%rsp),%rax
  mov    0x118(%rsp),%rdi
  mov    0x38(%rsp),%rcx
  lea    (%rdi,%rax,8),%rdx
  xor    %eax,%eax
  nopl   0x0(%rax)
L109:
  movsd  0x0(%rbp),%xmm0
  add    $0x1,%eax
  mulsd  %xmm3,%xmm0
  movsd  %xmm0,(%rdx)
  add    %rcx,%rdx
  cmp    %eax,%r15d
  jne    L109
  jmp    L54
L18:
  movapd %xmm1,%xmm0
  mov    %rax,0x30(%rsp)
  movsd  %xmm3,0x98(%rsp)
  call   <sqrt@plt>
  pxor   %xmm4,%xmm4
  mov    0x30(%rsp),%rax
  movsd  0x98(%rsp),%xmm3
  comisd %xmm4,%xmm0
  movapd %xmm0,%xmm1
  ja     L147
  jmp    L155
```

assistant: ```c
void groundwaterTransportCoefficientsEvaluate_hetMat(const int nSimplex, const int nPointsPerSimplex, const int nSpace, const double d, const int *materialTypes, const double *omega_types, const double *alpha_L_types, const double *alpha_T_types, const double *v, const double *u, double *m, double *dm, double *f, double *df, double *a) {
  int i, j, k, I, J, matID;
  const int nSpace2 = nSpace * nSpace;
  double norm_v;
  for (i = 0; i < nSimplex; i++) {
    matID = materialTypes[i];
    for (j = 0; j < nPointsPerSimplex; j++) {
      k = i * nPointsPerSimplex + j;
      m[k] = omega_types[matID] * u[k];
      dm[k] = omega_types[matID];
      norm_v = 0.0;
      for (I = 0; I < nSpace; I++) {
        f[k * nSpace + I] = v[k * nSpace + I] * u[k];
        df[k * nSpace + I] = v[k * nSpace + I];
        norm_v += v[k * nSpace + I] * v[k * nSpace + I];
      }
      norm_v = sqrt(norm_v);
      if (norm_v > 0.0) {
        for (I = 0; I < nSpace; I++) {
          a[k * nSpace2 + I * nSpace + I] = omega_types[matID] * d + alpha_T_types[matID] * norm_v + (alpha_L_types[matID] - alpha_T_types[matID]) * v[k * nSpace + I] * v[k * nSpace + I] / norm_v;
          for (J = I + 1; J < nSpace; J++) {
            a[k * nSpace2 + I * nSpace + J] = (alpha_L_types[matID] - alpha_T_types[matID]) * v[k * nSpace + I] * v[k * nSpace + J] / norm_v;
            a[k * nSpace2 + J * nSpace + I] = a[k * nSpace2 + I * nSpace + J];
          }
        }
      } else
        for (I = 0; I < nSpace; I++)
          a[k * nSpace2 + I * nSpace + I] = omega_types[matID] * d;
    }
  }
}
```