user: What is the c source code of the assembly code below?

```asm
<all_HoriR_valid>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  add    $0xffffffffffffff80,%rsp
  mov    %rdi,-0x78(%rbp)
  mov    %rsi,-0x80(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x80(%rbp),%rax
  mov    (%rax),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x68(%rbp)
  mov    -0x80(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x60(%rbp)
  mov    -0x80(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x58(%rbp)
  mov    -0x80(%rbp),%rax
  add    $0xc,%rax
  mov    (%rax),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x50(%rbp)
  mov    -0x60(%rbp),%rdx
  mov    -0x68(%rbp),%rsi
  lea    -0x40(%rbp),%rax
  mov    $0x1,%ecx
  mov    %rax,%rdi
  call   <crossprod_st@plt>
  mov    -0x60(%rbp),%rax
  lea    0x18(%rax),%rdx
  mov    -0x68(%rbp),%rax
  lea    0x18(%rax),%rsi
  lea    -0x20(%rbp),%rax
  mov    $0x1,%ecx
  mov    %rax,%rdi
  call   <crossprod_st@plt>
  movsd  -0x40(%rbp),%xmm1
  mov    -0x58(%rbp),%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x38(%rbp),%xmm2
  mov    -0x58(%rbp),%rax
  add    $0x8,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  movsd  -0x30(%rbp),%xmm2
  mov    -0x58(%rbp),%rax
  add    $0x10,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  movsd  -0x20(%rbp),%xmm2
  mov    -0x58(%rbp),%rax
  add    $0x18,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm2
  movsd  -0x18(%rbp),%xmm3
  mov    -0x58(%rbp),%rax
  add    $0x20,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm3,%xmm0
  addsd  %xmm0,%xmm2
  movsd  -0x10(%rbp),%xmm3
  mov    -0x58(%rbp),%rax
  add    $0x28,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm3,%xmm0
  addsd  %xmm2,%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x48(%rbp)
  movsd  -0x40(%rbp),%xmm1
  mov    -0x50(%rbp),%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x38(%rbp),%xmm2
  mov    -0x50(%rbp),%rax
  add    $0x8,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  movsd  -0x30(%rbp),%xmm2
  mov    -0x50(%rbp),%rax
  add    $0x10,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x48(%rbp),%xmm1
  movsd  -0x20(%rbp),%xmm2
  mov    -0x50(%rbp),%rax
  add    $0x18,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm2
  movsd  -0x18(%rbp),%xmm3
  mov    -0x50(%rbp),%rax
  add    $0x20,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm3,%xmm0
  addsd  %xmm0,%xmm2
  movsd  -0x10(%rbp),%xmm3
  mov    -0x50(%rbp),%rax
  add    $0x28,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm3,%xmm0
  addsd  %xmm2,%xmm0
  mulsd  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  comisd %xmm1,%xmm0
  jbe    L60
  mov    $0x0,%eax
  jmp    L3
L60:
  mov    -0x50(%rbp),%rdx
  mov    -0x58(%rbp),%rsi
  lea    -0x40(%rbp),%rax
  mov    $0x1,%ecx
  mov    %rax,%rdi
  call   <crossprod_st@plt>
  mov    -0x50(%rbp),%rax
  lea    0x18(%rax),%rdx
  mov    -0x58(%rbp),%rax
  lea    0x18(%rax),%rsi
  lea    -0x20(%rbp),%rax
  mov    $0x1,%ecx
  mov    %rax,%rdi
  call   <crossprod_st@plt>
  movsd  -0x40(%rbp),%xmm1
  mov    -0x68(%rbp),%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x38(%rbp),%xmm2
  mov    -0x68(%rbp),%rax
  add    $0x8,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  movsd  -0x30(%rbp),%xmm2
  mov    -0x68(%rbp),%rax
  add    $0x10,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x48(%rbp),%xmm1
  movsd  -0x20(%rbp),%xmm2
  mov    -0x68(%rbp),%rax
  add    $0x18,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm2
  movsd  -0x18(%rbp),%xmm3
  mov    -0x68(%rbp),%rax
  add    $0x20,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm3,%xmm0
  addsd  %xmm0,%xmm2
  movsd  -0x10(%rbp),%xmm3
  mov    -0x68(%rbp),%rax
  add    $0x28,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm3,%xmm0
  addsd  %xmm2,%xmm0
  mulsd  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  comisd %xmm1,%xmm0
  jbe    L7
  mov    $0x0,%eax
  jmp    L3
L7:
  movsd  -0x40(%rbp),%xmm1
  mov    -0x60(%rbp),%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x38(%rbp),%xmm2
  mov    -0x60(%rbp),%rax
  add    $0x8,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  movsd  -0x30(%rbp),%xmm2
  mov    -0x60(%rbp),%rax
  add    $0x10,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x48(%rbp),%xmm1
  movsd  -0x20(%rbp),%xmm2
  mov    -0x60(%rbp),%rax
  add    $0x18,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm2
  movsd  -0x18(%rbp),%xmm3
  mov    -0x60(%rbp),%rax
  add    $0x20,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm3,%xmm0
  addsd  %xmm0,%xmm2
  movsd  -0x10(%rbp),%xmm3
  mov    -0x60(%rbp),%rax
  add    $0x28,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm3,%xmm0
  addsd  %xmm2,%xmm0
  mulsd  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  comisd %xmm1,%xmm0
  jbe    L22
  mov    $0x0,%eax
  jmp    L3
L22:
  mov    $0x1,%eax
L3:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L24
  call   <__stack_chk_fail@plt>
L24:
  leave
  ret
```

assistant: ```c
int all_HoriR_valid(double *us, int *idx) {
  double p[3], q[3];
  double *a, *b, *c, *d, ori;
  a = us + 6 * idx[0];
  b = us + 6 * idx[1];
  c = us + 6 * idx[2];
  d = us + 6 * idx[3];
  crossprod_st(p, a, b, 1);
  crossprod_st(q, a + 3, b + 3, 1);
  ori = (p[0] * c[0] + p[1] * c[1] + p[2] * c[2]) * (q[0] * c[3] + q[1] * c[4] + q[2] * c[5]);
  if (ori * (p[0] * d[0] + p[1] * d[1] + p[2] * d[2]) * (q[0] * d[3] + q[1] * d[4] + q[2] * d[5]) < 0)
    return 0;
  crossprod_st(p, c, d, 1);
  crossprod_st(q, c + 3, d + 3, 1);
  if (ori * (p[0] * a[0] + p[1] * a[1] + p[2] * a[2]) * (q[0] * a[3] + q[1] * a[4] + q[2] * a[5]) < 0)
    return 0;
  if (ori * (p[0] * b[0] + p[1] * b[1] + p[2] * b[2]) * (q[0] * b[3] + q[1] * b[4] + q[2] * b[5]) < 0)
    return 0;
  return 1;
}
```