user: 下面的汇编指令对应的C源代码是什么：

```asm
<all_HoriR_valid>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %fs:0x28,%rcx
  mov    %rcx,0x48(%rsp)
  xor    %ecx,%ecx
  mov    (%rsi),%ecx
  lea    (%rcx,%rcx,2),%ecx
  add    %ecx,%ecx
  movslq %ecx,%rcx
  lea    (%rdi,%rcx,8),%r12
  mov    0x4(%rsi),%ecx
  lea    (%rcx,%rcx,2),%ecx
  add    %ecx,%ecx
  movslq %ecx,%rcx
  lea    (%rdi,%rcx,8),%r13
  mov    0x8(%rsi),%ecx
  lea    (%rcx,%rcx,2),%ecx
  add    %ecx,%ecx
  movslq %ecx,%rcx
  lea    (%rdi,%rcx,8),%rbx
  mov    0xc(%rsi),%edx
  lea    (%rdx,%rdx,2),%edx
  add    %edx,%edx
  movslq %edx,%rdx
  lea    (%rdi,%rdx,8),%rbp
  lea    0x10(%rsp),%rdi
  mov    $0x1,%ecx
  mov    %r13,%rdx
  mov    %r12,%rsi
  call   <crossprod_st@plt>
  lea    0x18(%r13),%rdx
  lea    0x18(%r12),%rsi
  lea    0x30(%rsp),%rdi
  mov    $0x1,%ecx
  call   <crossprod_st@plt>
  movsd  0x10(%rsp),%xmm0
  movsd  0x18(%rsp),%xmm7
  movsd  0x20(%rsp),%xmm6
  movsd  0x30(%rsp),%xmm1
  movsd  0x38(%rsp),%xmm5
  movsd  0x40(%rsp),%xmm4
  movapd %xmm0,%xmm3
  mulsd  (%rbx),%xmm3
  movapd %xmm7,%xmm2
  mulsd  0x8(%rbx),%xmm2
  addsd  %xmm2,%xmm3
  movapd %xmm6,%xmm2
  mulsd  0x10(%rbx),%xmm2
  addsd  %xmm2,%xmm3
  movapd %xmm1,%xmm2
  mulsd  0x18(%rbx),%xmm2
  movapd %xmm5,%xmm8
  mulsd  0x20(%rbx),%xmm8
  addsd  %xmm8,%xmm2
  movapd %xmm4,%xmm8
  mulsd  0x28(%rbx),%xmm8
  addsd  %xmm8,%xmm2
  movapd %xmm3,%xmm9
  mulsd  %xmm2,%xmm9
  mulsd  0x0(%rbp),%xmm0
  mulsd  0x8(%rbp),%xmm7
  addsd  %xmm7,%xmm0
  mulsd  0x10(%rbp),%xmm6
  addsd  %xmm6,%xmm0
  movsd  %xmm9,0x8(%rsp)
  mulsd  %xmm9,%xmm0
  mulsd  0x18(%rbp),%xmm1
  mulsd  0x20(%rbp),%xmm5
  addsd  %xmm5,%xmm1
  mulsd  0x28(%rbp),%xmm4
  addsd  %xmm4,%xmm1
  mulsd  %xmm1,%xmm0
  mov    $0x0,%eax
  pxor   %xmm1,%xmm1
  comisd %xmm0,%xmm1
  ja     L21
  lea    0x10(%rsp),%rdi
  mov    $0x1,%ecx
  mov    %rbp,%rdx
  mov    %rbx,%rsi
  call   <crossprod_st@plt>
  lea    0x18(%rbp),%rdx
  lea    0x18(%rbx),%rsi
  lea    0x30(%rsp),%rdi
  mov    $0x1,%ecx
  call   <crossprod_st@plt>
  movsd  0x10(%rsp),%xmm0
  movsd  0x18(%rsp),%xmm7
  movsd  0x20(%rsp),%xmm6
  movsd  0x30(%rsp),%xmm2
  movsd  0x38(%rsp),%xmm5
  movsd  0x40(%rsp),%xmm4
  movapd %xmm0,%xmm1
  mulsd  (%r12),%xmm1
  movapd %xmm7,%xmm3
  mulsd  0x8(%r12),%xmm3
  addsd  %xmm3,%xmm1
  movapd %xmm6,%xmm3
  mulsd  0x10(%r12),%xmm3
  addsd  %xmm3,%xmm1
  movsd  0x8(%rsp),%xmm9
  mulsd  %xmm9,%xmm1
  movapd %xmm2,%xmm3
  mulsd  0x18(%r12),%xmm3
  movapd %xmm5,%xmm8
  mulsd  0x20(%r12),%xmm8
  addsd  %xmm8,%xmm3
  movapd %xmm4,%xmm8
  mulsd  0x28(%r12),%xmm8
  addsd  %xmm8,%xmm3
  mulsd  %xmm3,%xmm1
  mov    $0x0,%eax
  pxor   %xmm3,%xmm3
  comisd %xmm1,%xmm3
  ja     L21
  mulsd  0x0(%r13),%xmm0
  mulsd  0x8(%r13),%xmm7
  addsd  %xmm7,%xmm0
  mulsd  0x10(%r13),%xmm6
  addsd  %xmm6,%xmm0
  mulsd  %xmm9,%xmm0
  mulsd  0x18(%r13),%xmm2
  mulsd  0x20(%r13),%xmm5
  addsd  %xmm5,%xmm2
  mulsd  0x28(%r13),%xmm4
  addsd  %xmm4,%xmm2
  mulsd  %xmm2,%xmm0
  comisd %xmm0,%xmm3
  setbe  %al
  movzbl %al,%eax
L21:
  mov    0x48(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L4
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L4:
  call   <__stack_chk_fail@plt>
```

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;
}
```