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

```asm
<HDsSymidxMax>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x120,%rsp
  mov    %rdi,-0xf8(%rbp)
  mov    %rsi,-0x100(%rbp)
  mov    %rdx,-0x108(%rbp)
  mov    %rcx,-0x110(%rbp)
  mov    %r8d,-0x114(%rbp)
  mov    %r9,-0x120(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x108(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0xa0(%rbp)
  mov    -0x108(%rbp),%rax
  add    $0x18,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x98(%rbp)
  mov    -0x108(%rbp),%rax
  add    $0x30,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x90(%rbp)
  mov    -0x108(%rbp),%rax
  add    $0x8,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x88(%rbp)
  mov    -0x108(%rbp),%rax
  add    $0x20,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x80(%rbp)
  mov    -0x108(%rbp),%rax
  add    $0x38,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x78(%rbp)
  mov    -0x108(%rbp),%rax
  add    $0x10,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x70(%rbp)
  mov    -0x108(%rbp),%rax
  add    $0x28,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x68(%rbp)
  mov    -0x108(%rbp),%rax
  add    $0x40,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x60(%rbp)
  movl   $0x0,-0xf0(%rbp)
  jmp    L36
L33:
  mov    -0xf0(%rbp),%eax
  cltq
  movsd  -0xa0(%rbp,%rax,8),%xmm0
  mov    -0xf0(%rbp),%eax
  cltq
  movsd  %xmm0,-0x50(%rbp,%rax,8)
  addl   $0x1,-0xf0(%rbp)
L36:
  cmpl   $0x8,-0xf0(%rbp)
  jle    L33
  lea    -0x50(%rbp),%rax
  mov    $0x3,%esi
  mov    %rax,%rdi
  call   <minv@plt>
  movl   $0x0,-0xec(%rbp)
  jmp    L40
L26:
  mov    -0xec(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x120(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0xf0(%rbp)
  mov    -0xf0(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x100(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0xe8(%rbp)
  movsd  -0x20(%rbp),%xmm1
  mov    -0xe8(%rbp),%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x18(%rbp),%xmm2
  mov    -0xe8(%rbp),%rax
  add    $0x8,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  movsd  -0x10(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xe0(%rbp)
  movsd  -0x70(%rbp),%xmm1
  mov    -0xe8(%rbp),%rax
  add    $0x18,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x68(%rbp),%xmm2
  mov    -0xe8(%rbp),%rax
  add    $0x20,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  movsd  -0x60(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xd8(%rbp)
  movsd  -0x50(%rbp),%xmm1
  mov    -0xe8(%rbp),%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x48(%rbp),%xmm2
  mov    -0xe8(%rbp),%rax
  add    $0x8,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  movsd  -0x40(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  divsd  -0xe0(%rbp),%xmm0
  movsd  %xmm0,-0xd0(%rbp)
  movsd  -0x38(%rbp),%xmm1
  mov    -0xe8(%rbp),%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x30(%rbp),%xmm2
  mov    -0xe8(%rbp),%rax
  add    $0x8,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  movsd  -0x28(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  divsd  -0xe0(%rbp),%xmm0
  movsd  %xmm0,-0xc8(%rbp)
  mov    -0xe8(%rbp),%rax
  add    $0x18,%rax
  movsd  (%rax),%xmm0
  subsd  -0xd0(%rbp),%xmm0
  movsd  %xmm0,-0xc0(%rbp)
  mov    -0xe8(%rbp),%rax
  add    $0x20,%rax
  movsd  (%rax),%xmm0
  subsd  -0xc8(%rbp),%xmm0
  movsd  %xmm0,-0xb8(%rbp)
  movsd  -0xc0(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  %xmm0,%xmm1
  movsd  -0xb8(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  movsd  -0xa0(%rbp),%xmm1
  mov    -0xe8(%rbp),%rax
  add    $0x18,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x98(%rbp),%xmm2
  mov    -0xe8(%rbp),%rax
  add    $0x20,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  movsd  -0x90(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  divsd  -0xd8(%rbp),%xmm0
  movsd  %xmm0,-0xd0(%rbp)
  movsd  -0x88(%rbp),%xmm1
  mov    -0xe8(%rbp),%rax
  add    $0x18,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x80(%rbp),%xmm2
  mov    -0xe8(%rbp),%rax
  add    $0x20,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  movsd  -0x78(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  divsd  -0xd8(%rbp),%xmm0
  movsd  %xmm0,-0xc8(%rbp)
  mov    -0xe8(%rbp),%rax
  movsd  (%rax),%xmm0
  subsd  -0xd0(%rbp),%xmm0
  movsd  %xmm0,-0xc0(%rbp)
  mov    -0xe8(%rbp),%rax
  add    $0x8,%rax
  movsd  (%rax),%xmm0
  subsd  -0xc8(%rbp),%xmm0
  movsd  %xmm0,-0xb8(%rbp)
  movsd  -0xc0(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  %xmm0,%xmm1
  movsd  -0xb8(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xa8(%rbp)
  movsd  -0xa8(%rbp),%xmm0
  comisd -0xb0(%rbp),%xmm0
  jbe    L49
  movsd  -0xa8(%rbp),%xmm0
  jmp    L60
L49:
  movsd  -0xb0(%rbp),%xmm0
L60:
  mov    -0x110(%rbp),%rax
  movsd  %xmm0,(%rax)
  addl   $0x1,-0xec(%rbp)
L40:
  mov    -0xec(%rbp),%eax
  cmp    0x10(%rbp),%eax
  jl     L26
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L27
  call   <__stack_chk_fail@plt>
L27:
  leave
  ret
```

assistant: ```c
void HDsSymidxMax(const double *lin, const double *mu, const double *H, double *p, int len, int *idx, int siz) {
  int i, mi;
  double Hinv[9], H1[9];
  const double *u;
  double a, b, xa, ya, d1, d2, xdiff, ydiff;
  Hinv[0] = H[0];
  Hinv[1] = H[3];
  Hinv[2] = H[6];
  Hinv[3] = H[1];
  Hinv[4] = H[4];
  Hinv[5] = H[7];
  Hinv[6] = H[2];
  Hinv[7] = H[5];
  Hinv[8] = H[8];
  for (i = 0; i < 9; i++)
    H1[i] = Hinv[i];
  minv(H1, 3);
  for (mi = 0; mi < siz; mi++) {
    i = idx[mi];
    u = mu + 6 * i;
    a = H1[6] * u[0] + H1[7] * u[1] + H1[8];
    b = Hinv[6] * u[3] + Hinv[7] * u[4] + Hinv[8];
    xa = (H1[0] * u[0] + H1[1] * u[1] + H1[2]) / a;
    ya = (H1[3] * u[0] + H1[4] * u[1] + H1[5]) / a;
    xdiff = u[3] - xa;
    ydiff = u[4] - ya;
    d1 = xdiff * xdiff + ydiff * ydiff;
    xa = (Hinv[0] * u[3] + Hinv[1] * u[4] + Hinv[2]) / b;
    ya = (Hinv[3] * u[3] + Hinv[4] * u[4] + Hinv[5]) / b;
    xdiff = u[0] - xa;
    ydiff = u[1] - ya;
    d2 = xdiff * xdiff + ydiff * ydiff;
    *p = ((d1) < (d2) ? (d2) : (d1));
  }
}
```