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

```asm
<Hdetect>:
  endbr64
  push   %r15
  push   %r14
  mov    %rsi,%r14
  mov    %rdi,%rsi
  push   %r13
  push   %r12
  mov    %rcx,%r12
  mov    $0x3,%ecx
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x4e8,%rsp
  mov    %rdx,0x10(%rsp)
  mov    $0x3,%edx
  lea    0x40(%rsp),%r15
  lea    0x350(%rsp),%rbx
  mov    %rbx,%rdi
  lea    0x3a0(%rsp),%r13
  mov    %fs:0x28,%rax
  mov    %rax,0x4d8(%rsp)
  xor    %eax,%eax
  call   <mattr@plt>
  mov    %rbp,%rsi
  mov    %r13,%rdi
  mov    $0x48,%edx
  call   <memcpy@plt>
  mov    $0x3,%r9d
  mov    $0x3,%ecx
  lea    0xd0(%rsp),%r8
  lea    0x80(%rsp),%rdx
  mov    %r13,%rsi
  lea    0x20(%rsp),%rdi
  call   <svduv@plt>
  lea    0x120(%rsp),%r13
  mov    %r15,%rdi
  movsd  0xe0(%rsp),%xmm0
  mov    %r13,%rsi
  lea    0x170(%rsp),%rbp
  movsd  %xmm0,0x40(%rsp)
  movsd  0xf8(%rsp),%xmm0
  movsd  %xmm0,0x48(%rsp)
  movsd  0x110(%rsp),%xmm0
  movsd  %xmm0,0x50(%rsp)
  call   <skew_sym@plt>
  mov    %rbx,%rdx
  mov    $0x3,%ecx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  lea    0x210(%rsp),%rbx
  call   <mmul@plt>
  mov    0x10(%rsp),%rsi
  mov    %r14,%rdi
  mov    %rbx,%rcx
  lea    0x1c0(%rsp),%r8
  lea    0x2b0(%rsp),%r14
  mov    %r8,%rdx
  mov    %r8,0x8(%rsp)
  call   <fillu3@plt>
  mov    $0x3,%ecx
  mov    %rbx,%rdx
  mov    %rbp,%rsi
  lea    0x300(%rsp),%r9
  mov    %r9,%rdi
  mov    %r9,0x18(%rsp)
  call   <mmul@plt>
  mov    0x8(%rsp),%r8
  mov    $0x3,%ecx
  lea    0x260(%rsp),%r10
  mov    %r10,%rdi
  mov    $0x3,%edx
  mov    %r10,0x8(%rsp)
  mov    %r8,%rsi
  mov    %r8,0x10(%rsp)
  call   <mattr@plt>
  mov    0x18(%rsp),%rsi
  mov    $0x3,%ecx
  mov    %r14,%rdi
  mov    $0x3,%edx
  call   <mattr@plt>
  lea    0x440(%rsp),%r9
  mov    0x8(%rsp),%rsi
  mov    %r14,%rdx
  mov    %r9,%rdi
  mov    %r9,0x8(%rsp)
  call   <crossp@plt>
  lea    0x2c8(%rsp),%rdx
  lea    0x278(%rsp),%rsi
  lea    0x458(%rsp),%rdi
  call   <crossp@plt>
  lea    0x2e0(%rsp),%rdx
  lea    0x290(%rsp),%rsi
  lea    0x470(%rsp),%rdi
  call   <crossp@plt>
  mov    0x8(%rsp),%rsi
  mov    $0x3,%edx
  lea    0x3f0(%rsp),%rdi
  mov    $0x3,%ecx
  call   <mattr@plt>
  movq   D5(%rip),%xmm1
  mov    %r13,%rax
  mov    0x10(%rsp),%r8
  lea    0x168(%rsp),%rdx
  nopl   0x0(%rax)
L20:
  movsd  (%rax),%xmm0
  add    $0x8,%rax
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rax)
  cmp    %rdx,%rax
  jne    L20
  mov    %r8,%rdx
  mov    %r13,%rsi
  mov    $0x3,%ecx
  lea    0x490(%rsp),%rdi
  call   <mmul@plt>
  mov    $0x3,%ecx
  mov    %rbx,%rsi
  mov    %r14,%rdi
  movsd  0x490(%rsp),%xmm0
  mov    $0x3,%edx
  movsd  0x4a8(%rsp),%xmm3
  movsd  0x3f0(%rsp),%xmm1
  movsd  0x408(%rsp),%xmm4
  movsd  0x4c0(%rsp),%xmm2
  mulsd  %xmm3,%xmm4
  mulsd  %xmm0,%xmm1
  mulsd  %xmm3,%xmm3
  mulsd  %xmm0,%xmm0
  addsd  %xmm4,%xmm1
  movsd  0x420(%rsp),%xmm4
  mulsd  %xmm2,%xmm4
  addsd  %xmm3,%xmm0
  movsd  0x4b0(%rsp),%xmm3
  mulsd  %xmm2,%xmm2
  addsd  %xmm4,%xmm1
  movsd  0x410(%rsp),%xmm4
  addsd  %xmm2,%xmm0
  movsd  0x4c8(%rsp),%xmm2
  mulsd  %xmm3,%xmm4
  mulsd  %xmm3,%xmm3
  divsd  %xmm0,%xmm1
  movsd  0x498(%rsp),%xmm0
  movsd  %xmm1,0x60(%rsp)
  movsd  0x3f8(%rsp),%xmm1
  mulsd  %xmm0,%xmm1
  mulsd  %xmm0,%xmm0
  addsd  %xmm4,%xmm1
  movsd  0x428(%rsp),%xmm4
  addsd  %xmm3,%xmm0
  movsd  0x4b8(%rsp),%xmm3
  mulsd  %xmm2,%xmm4
  mulsd  %xmm2,%xmm2
  addsd  %xmm4,%xmm1
  movsd  0x418(%rsp),%xmm4
  addsd  %xmm2,%xmm0
  movsd  0x4d0(%rsp),%xmm2
  mulsd  %xmm3,%xmm4
  mulsd  %xmm3,%xmm3
  divsd  %xmm0,%xmm1
  movsd  0x4a0(%rsp),%xmm0
  movsd  %xmm1,0x68(%rsp)
  movsd  0x400(%rsp),%xmm1
  mulsd  %xmm0,%xmm1
  mulsd  %xmm0,%xmm0
  addsd  %xmm4,%xmm1
  movsd  0x430(%rsp),%xmm4
  addsd  %xmm3,%xmm0
  mulsd  %xmm2,%xmm4
  mulsd  %xmm2,%xmm2
  addsd  %xmm4,%xmm1
  addsd  %xmm2,%xmm0
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x70(%rsp)
  call   <mattr@plt>
  mov    $0x3,%esi
  mov    %r14,%rdi
  call   <minv@plt>
  lea    0x60(%rsp),%rdx
  mov    %r14,%rsi
  mov    %rbx,%rdi
  mov    $0x1,%r9d
  mov    $0x3,%r8d
  mov    $0x3,%ecx
  mov    %eax,%r13d
  call   <rmmult@plt>
  mov    $0x1,%ecx
  mov    %rbx,%rsi
  mov    %r14,%rdi
  mov    $0x3,%edx
  call   <mattr@plt>
  mov    $0x3,%ecx
  mov    %r14,%rdx
  mov    %r15,%rsi
  mov    $0x3,%r9d
  mov    $0x1,%r8d
  mov    %rbx,%rdi
  call   <rmmult@plt>
  xor    %ecx,%ecx
L71:
  lea    (%r12,%rcx,8),%rdx
  xor    %eax,%eax
L55:
  movsd  0x0(%rbp,%rax,1),%xmm0
  subsd  (%rbx,%rax,1),%xmm0
  add    $0x8,%rax
  add    $0x18,%rdx
  movsd  %xmm0,-0x18(%rdx)
  cmp    $0x18,%rax
  jne    L55
  add    $0x1,%rcx
  add    $0x18,%rbp
  add    $0x18,%rbx
  cmp    $0x3,%rcx
  jne    L71
  movsd  (%r12),%xmm0
  call   <isnan@plt>
  test   %rax,%rax
  je     L44
L4:
  movsd  D11(%rip),%xmm0
  movq   $0x0,0x38(%r12)
  movq   $0x0,0x30(%r12)
  movq   $0x0,0x28(%r12)
  movq   $0x0,0x18(%r12)
  movq   $0x0,0x10(%r12)
  movq   $0x0,0x8(%r12)
  movsd  %xmm0,0x40(%r12)
  movsd  %xmm0,0x20(%r12)
  movsd  %xmm0,(%r12)
L75:
  mov    0x4d8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L26
  add    $0x4e8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L44:
  movsd  (%r12),%xmm0
  call   <isinf@plt>
  test   %rax,%rax
  jne    L4
  test   %r13b,%r13b
  jne    L4
  jmp    L75
L26:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_label: D5
datatype: byte[8]
name: unpack_data
arguments: data_label: D11
datatype: byte[8]

tool: {"D5": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80]}

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

assistant: ```c
void Hdetect(double *F, double *u7, unsigned char *IDXS, double *H) {
  double D[3], U[3 * 3], V[3 * 3], ec[3], Ex[3 * 3], A[3 * 3], u3a[3 * 3], u3b[3 * 3], u3aT[3 * 3], u3bT[3 * 3], Au3b[3 * 3], Ft[3 * 3], F1[3 * 3], p1[3 * 3], p1T[3 * 3], p2[3 * 3], b[3];
  unsigned char i, j, sing;
  mattr(Ft, F, 3, 3);
  memcpy(F1, F, 3 * 3 * sizeof(double));
  svduv(D, F1, U, 3, V, 3);
  ec[0] = V[2];
  ec[1] = V[5];
  ec[2] = V[8];
  skew_sym(ec, Ex);
  mmul(A, Ex, Ft, 3);
  fillu3(u7, IDXS, u3a, u3b);
  mmul(Au3b, A, u3b, 3);
  mattr(u3aT, u3a, 3, 3);
  mattr(u3bT, Au3b, 3, 3);
  crossp(p1T, u3aT, u3bT);
  crossp(p1T + 3, u3aT + 3, u3bT + 3);
  crossp(p1T + 6, u3aT + 6, u3bT + 6);
  mattr(p1, p1T, 3, 3);
  for (i = 0; i < 9; ++i) {
    Ex[i] *= -1;
  }
  mmul(p2, Ex, u3a, 3);
  b[0] = (p1[0] * p2[0] + p1[3] * p2[3] + p1[6] * p2[6]) / (p2[0] * p2[0] + p2[3] * p2[3] + p2[6] * p2[6]);
  b[1] = (p1[1] * p2[1] + p1[4] * p2[4] + p1[7] * p2[7]) / (p2[1] * p2[1] + p2[4] * p2[4] + p2[7] * p2[7]);
  b[2] = (p1[2] * p2[2] + p1[5] * p2[5] + p1[8] * p2[8]) / (p2[2] * p2[2] + p2[5] * p2[5] + p2[8] * p2[8]);
  mattr(u3bT, u3b, 3, 3);
  sing = minv(u3bT, 3);
  rmmult(u3b, u3bT, b, 3, 3, 1);
  mattr(u3bT, u3b, 3, 1);
  rmmult(u3b, ec, u3bT, 3, 1, 3);
  for (i = 0; i < 3; ++i) {
    for (j = 0; j < 3; ++j) {
      H[i + j * 3] = A[i * 3 + j] - u3b[i * 3 + j];
    }
  }
  if (isnan(*H) || isinf(*H) || sing) {
    H[1] = H[2] = H[3] = H[5] = H[6] = H[7] = 0;
    H[0] = H[4] = H[8] = 1;
  }
}
```