user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<check_rotation>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x98,%rsp
  movsd  0x8(%rdi),%xmm1
  movsd  0x10(%rdi),%xmm13
  movsd  0x20(%rdi),%xmm3
  movsd  0x28(%rdi),%xmm12
  movapd %xmm1,%xmm5
  movapd %xmm13,%xmm0
  movsd  (%rdi),%xmm2
  movsd  0x18(%rdi),%xmm11
  mulsd  %xmm3,%xmm0
  movapd %xmm13,%xmm4
  mulsd  %xmm12,%xmm5
  movapd %xmm2,%xmm7
  mulsd  %xmm11,%xmm4
  mulsd  %xmm3,%xmm7
  subsd  %xmm0,%xmm5
  movapd %xmm2,%xmm0
  mulsd  %xmm12,%xmm0
  subsd  %xmm0,%xmm4
  movapd %xmm1,%xmm0
  mulsd  %xmm11,%xmm0
  movapd %xmm4,%xmm6
  mulsd  %xmm4,%xmm6
  subsd  %xmm0,%xmm7
  movapd %xmm5,%xmm0
  mulsd  %xmm5,%xmm0
  addsd  %xmm6,%xmm0
  movapd %xmm7,%xmm6
  mulsd  %xmm7,%xmm6
  addsd  %xmm6,%xmm0
  pxor   %xmm6,%xmm6
  ucomisd %xmm0,%xmm6
  ja     L388
  sqrtsd %xmm0,%xmm0
L438:
  ucomisd %xmm6,%xmm0
  jp     L177
  je     L91
L177:
  divsd  %xmm0,%xmm5
  movapd %xmm2,%xmm9
  mulsd  %xmm11,%xmm9
  divsd  %xmm0,%xmm4
  divsd  %xmm0,%xmm7
  movapd %xmm1,%xmm0
  mulsd  %xmm3,%xmm0
  addsd  %xmm0,%xmm9
  movapd %xmm13,%xmm0
  mulsd  %xmm12,%xmm0
  addsd  %xmm0,%xmm9
  comisd %xmm9,%xmm6
  jbe    L344
  xorpd  D134(%rip),%xmm9
L344:
  movsd  D128(%rip),%xmm14
  addsd  %xmm9,%xmm14
  ucomisd %xmm14,%xmm6
  ja     L130
  sqrtsd %xmm14,%xmm14
L45:
  movsd  D128(%rip),%xmm10
  subsd  %xmm9,%xmm10
  ucomisd %xmm10,%xmm6
  ja     L22
  sqrtsd %xmm10,%xmm10
L275:
  addsd  %xmm14,%xmm10
  movapd %xmm1,%xmm0
  movapd %xmm13,%xmm15
  movsd  D47(%rip),%xmm8
  mulsd  %xmm5,%xmm0
  mulsd  %xmm5,%xmm15
  mulsd  %xmm10,%xmm8
  movapd %xmm2,%xmm10
  mulsd  %xmm4,%xmm10
  mulsd  %xmm7,%xmm2
  movapd %xmm10,%xmm9
  subsd  %xmm0,%xmm9
  movapd %xmm2,%xmm14
  subsd  %xmm15,%xmm2
  ucomisd %xmm6,%xmm9
  jp     L449
  jne    L449
  ucomisd %xmm6,%xmm2
  jp     L247
  jne    L247
  mulsd  %xmm4,%xmm13
  mulsd  %xmm7,%xmm1
  movapd %xmm13,%xmm9
  subsd  %xmm1,%xmm9
  movsd  %xmm1,(%rsp)
  ucomisd %xmm6,%xmm9
  jp     L87
  je     L91
L87:
  movq   %xmm5,%rdx
  movapd %xmm15,%xmm2
  movapd %xmm0,%xmm1
  movsd  (%rsp),%xmm0
  subsd  %xmm14,%xmm2
  movapd %xmm7,%xmm5
  movapd %xmm10,%xmm14
  mov    $0x2,%ebp
  movq   %rdx,%xmm7
  movapd %xmm13,%xmm10
L95:
  subsd  %xmm10,%xmm0
  subsd  %xmm14,%xmm1
  movapd %xmm8,%xmm13
  mulsd  %xmm5,%xmm13
  movapd %xmm8,%xmm14
  mulsd  %xmm4,%xmm14
  divsd  %xmm9,%xmm1
  divsd  %xmm0,%xmm2
  movapd %xmm1,%xmm15
  movapd %xmm1,%xmm10
  mulsd  %xmm1,%xmm15
  divsd  %xmm9,%xmm14
  divsd  %xmm0,%xmm13
  movapd %xmm2,%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm15
  movapd %xmm2,%xmm0
  addsd  D128(%rip),%xmm15
  mulsd  %xmm14,%xmm10
  mulsd  %xmm13,%xmm0
  addsd  %xmm0,%xmm10
  movapd %xmm14,%xmm0
  mulsd  %xmm14,%xmm0
  movapd %xmm10,%xmm9
  mulsd  %xmm10,%xmm9
  movsd  %xmm0,(%rsp)
  movapd %xmm13,%xmm0
  mulsd  %xmm13,%xmm0
  addsd  (%rsp),%xmm0
  subsd  D128(%rip),%xmm0
  mulsd  %xmm15,%xmm0
  subsd  %xmm0,%xmm9
  comisd %xmm9,%xmm6
  ja     L91
  ucomisd %xmm9,%xmm6
  movapd %xmm10,%xmm0
  xorpd  D134(%rip),%xmm0
  movq   %xmm0,%rbx
  ja     L298
  movapd %xmm9,%xmm0
  sqrtsd %xmm0,%xmm0
  movapd %xmm0,%xmm9
  subsd  %xmm10,%xmm9
  movapd %xmm9,%xmm10
  movapd %xmm1,%xmm9
  divsd  %xmm15,%xmm10
  mulsd  %xmm10,%xmm9
  addsd  %xmm14,%xmm9
  movsd  %xmm9,(%rsp)
  movapd %xmm2,%xmm9
  mulsd  %xmm10,%xmm9
  addsd  %xmm13,%xmm9
  movsd  %xmm9,0x8(%rsp)
L239:
  movq   %rbx,%xmm9
  subsd  %xmm0,%xmm9
  divsd  %xmm15,%xmm9
  mulsd  %xmm9,%xmm1
  mulsd  %xmm9,%xmm2
  addsd  %xmm14,%xmm1
  addsd  %xmm13,%xmm2
  cmp    $0x1,%ebp
  je     L149
  cmp    $0x2,%ebp
  jne    L69
  movq   %xmm5,%rax
  movapd %xmm7,%xmm5
  movq   %rax,%xmm7
  movq   %xmm1,%rax
  movapd %xmm9,%xmm1
  movq   %rax,%xmm9
  mov    (%rsp),%rax
  movsd  %xmm10,(%rsp)
  movq   %rax,%xmm10
L69:
  movapd %xmm11,%xmm14
  movapd %xmm3,%xmm0
  movapd %xmm12,%xmm15
  mulsd  %xmm4,%xmm14
  mulsd  %xmm5,%xmm0
  mulsd  %xmm7,%xmm11
  mulsd  %xmm5,%xmm15
  movapd %xmm14,%xmm13
  subsd  %xmm0,%xmm13
  movsd  %xmm0,0x10(%rsp)
  movapd %xmm11,%xmm0
  subsd  %xmm15,%xmm0
  movsd  %xmm15,0x18(%rsp)
  ucomisd %xmm6,%xmm13
  movapd %xmm0,%xmm15
  jp     L268
  jne    L268
  ucomisd %xmm6,%xmm0
  jp     L37
  jne    L37
  mulsd  %xmm4,%xmm12
  mulsd  %xmm7,%xmm3
  movapd %xmm12,%xmm13
  subsd  %xmm3,%xmm13
  movapd %xmm3,%xmm0
  ucomisd %xmm6,%xmm13
  jp     L279
  je     L91
L279:
  movsd  0x18(%rsp),%xmm15
  movsd  0x10(%rsp),%xmm3
  movapd %xmm7,%xmm5
  movsd  %xmm0,0x10(%rsp)
  mov    $0x2,%ebp
  subsd  %xmm11,%xmm15
  movapd %xmm14,%xmm11
  movapd %xmm12,%xmm14
L476:
  movsd  0x10(%rsp),%xmm0
  subsd  %xmm11,%xmm3
  movapd %xmm15,%xmm7
  mulsd  %xmm8,%xmm4
  subsd  %xmm14,%xmm0
  mulsd  %xmm8,%xmm5
  divsd  %xmm13,%xmm3
  divsd  %xmm0,%xmm7
  movapd %xmm3,%xmm11
  divsd  %xmm13,%xmm4
  movapd %xmm3,%xmm13
  mulsd  %xmm3,%xmm13
  divsd  %xmm0,%xmm5
  movapd %xmm7,%xmm0
  mulsd  %xmm7,%xmm0
  addsd  %xmm0,%xmm13
  movapd %xmm7,%xmm0
  addsd  D128(%rip),%xmm13
  mulsd  %xmm4,%xmm11
  mulsd  %xmm5,%xmm0
  movapd %xmm5,%xmm8
  mulsd  %xmm5,%xmm8
  addsd  %xmm0,%xmm11
  movapd %xmm4,%xmm0
  mulsd  %xmm4,%xmm0
  movapd %xmm11,%xmm14
  mulsd  %xmm11,%xmm14
  addsd  %xmm8,%xmm0
  subsd  D128(%rip),%xmm0
  mulsd  %xmm13,%xmm0
  subsd  %xmm0,%xmm14
  comisd %xmm14,%xmm6
  ja     L91
  ucomisd %xmm14,%xmm6
  movapd %xmm11,%xmm15
  xorpd  D134(%rip),%xmm15
  ja     L226
  sqrtsd %xmm14,%xmm14
  movapd %xmm7,%xmm12
  movapd %xmm14,%xmm8
  subsd  %xmm11,%xmm8
  movapd %xmm3,%xmm11
  divsd  %xmm13,%xmm8
  mulsd  %xmm8,%xmm11
  mulsd  %xmm8,%xmm12
  addsd  %xmm4,%xmm11
  addsd  %xmm5,%xmm12
L474:
  movapd %xmm15,%xmm0
  subsd  %xmm14,%xmm0
  divsd  %xmm13,%xmm0
  mulsd  %xmm0,%xmm3
  mulsd  %xmm0,%xmm7
  addsd  %xmm4,%xmm3
  addsd  %xmm5,%xmm7
  cmp    $0x1,%ebp
  je     L192
  cmp    $0x2,%ebp
  jne    L119
  movq   %xmm3,%rax
  movapd %xmm0,%xmm3
  movq   %rax,%xmm0
  movq   %xmm11,%rax
  movapd %xmm8,%xmm11
  movq   %rax,%xmm8
L119:
  movsd  0x8(%rsp),%xmm4
  movsd  (%rsp),%xmm5
  mulsd  %xmm12,%xmm4
  mulsd  %xmm11,%xmm5
  addsd  %xmm4,%xmm5
  movapd %xmm10,%xmm4
  mulsd  %xmm8,%xmm4
  addsd  %xmm4,%xmm5
  comisd %xmm5,%xmm6
  jbe    L42
  xorpd  D134(%rip),%xmm5
L42:
  movsd  0x8(%rsp),%xmm13
  movsd  (%rsp),%xmm4
  mulsd  %xmm7,%xmm13
  mulsd  %xmm3,%xmm4
  addsd  %xmm13,%xmm4
  movapd %xmm10,%xmm13
  mulsd  %xmm0,%xmm13
  addsd  %xmm13,%xmm4
  comisd %xmm4,%xmm6
  jbe    L55
  xorpd  D134(%rip),%xmm4
L55:
  movapd %xmm2,%xmm14
  movapd %xmm1,%xmm13
  mulsd  %xmm12,%xmm14
  mulsd  %xmm11,%xmm13
  addsd  %xmm14,%xmm13
  movapd %xmm9,%xmm14
  mulsd  %xmm8,%xmm14
  addsd  %xmm14,%xmm13
  comisd %xmm13,%xmm6
  jbe    L314
  xorpd  D134(%rip),%xmm13
L314:
  movapd %xmm2,%xmm15
  movapd %xmm1,%xmm14
  mulsd  %xmm7,%xmm15
  mulsd  %xmm3,%xmm14
  addsd  %xmm15,%xmm14
  movapd %xmm9,%xmm15
  mulsd  %xmm0,%xmm15
  addsd  %xmm15,%xmm14
  comisd %xmm14,%xmm6
  jbe    L82
  xorpd  D134(%rip),%xmm14
L82:
  comisd %xmm5,%xmm4
  jbe    L267
  comisd %xmm5,%xmm13
  jbe    L168
  comisd %xmm5,%xmm14
  ja     L264
L391:
  movsd  %xmm1,(%rdi)
  movsd  %xmm2,0x8(%rdi)
  movsd  %xmm9,0x10(%rdi)
L447:
  movsd  %xmm3,0x18(%rdi)
  xor    %eax,%eax
  movsd  %xmm7,0x20(%rdi)
  movsd  %xmm0,0x28(%rdi)
L328:
  add    $0x98,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nopl   0x0(%rax)
L449:
  xor    %ebp,%ebp
L183:
  mulsd  %xmm4,%xmm13
  mulsd  %xmm7,%xmm1
  movapd %xmm13,%xmm14
  jmp    L95
  nopl   (%rax)
L268:
  xor    %ebp,%ebp
L413:
  mulsd  %xmm4,%xmm12
  mulsd  %xmm7,%xmm3
  movapd %xmm12,%xmm11
  jmp    L476
  nopl   (%rax)
L168:
  comisd %xmm13,%xmm14
  movsd  %xmm1,(%rdi)
  movsd  %xmm2,0x8(%rdi)
  movsd  %xmm9,0x10(%rdi)
  jbe    L447
  movsd  %xmm11,0x18(%rdi)
  xor    %eax,%eax
  movsd  %xmm12,0x20(%rdi)
  movsd  %xmm8,0x28(%rdi)
  add    $0x98,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nopl   0x0(%rax)
L267:
  comisd %xmm4,%xmm13
  jbe    L168
  comisd %xmm4,%xmm14
  jbe    L391
  movsd  (%rsp),%xmm1
  movsd  %xmm10,0x10(%rdi)
  xor    %eax,%eax
  movsd  %xmm3,0x18(%rdi)
  movsd  %xmm1,(%rdi)
  movsd  0x8(%rsp),%xmm1
  movsd  %xmm7,0x20(%rdi)
  movsd  %xmm1,0x8(%rdi)
  movsd  %xmm0,0x28(%rdi)
  add    $0x98,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nop
L149:
  movq   %xmm7,%rax
  movapd %xmm4,%xmm7
  movq   %rax,%xmm4
  movq   %xmm9,%rax
  movapd %xmm2,%xmm9
  movq   %rax,%xmm2
  movq   %xmm10,%rax
  movsd  0x8(%rsp),%xmm10
  mov    %rax,0x8(%rsp)
  jmp    L69
  nopl   0x0(%rax,%rax,1)
L192:
  movq   %xmm0,%rax
  movapd %xmm7,%xmm0
  movq   %rax,%xmm7
  movq   %xmm8,%rax
  movapd %xmm12,%xmm8
  movq   %rax,%xmm12
  jmp    L119
  nopw   0x0(%rax,%rax,1)
L247:
  movq   %xmm9,%rax
  movapd %xmm2,%xmm9
  movapd %xmm15,%xmm0
  mov    $0x1,%ebp
  movq   %rax,%xmm2
  movq   %xmm4,%rax
  movapd %xmm7,%xmm4
  movq   %rax,%xmm7
  movq   %xmm1,%rax
  movapd %xmm14,%xmm10
  movapd %xmm13,%xmm1
  movq   %rax,%xmm13
  jmp    L183
L37:
  movq   %xmm13,%rdx
  movsd  0x18(%rsp),%xmm0
  movapd %xmm15,%xmm13
  movapd %xmm11,%xmm14
  movq   %rdx,%xmm15
  movq   %xmm4,%rdx
  movapd %xmm7,%xmm4
  mov    $0x1,%ebp
  movq   %rdx,%xmm7
  movq   %xmm3,%rdx
  movsd  %xmm0,0x10(%rsp)
  movapd %xmm12,%xmm3
  movq   %rdx,%xmm12
  jmp    L413
  nopw   0x0(%rax,%rax,1)
L264:
  movsd  (%rsp),%xmm3
  movsd  %xmm10,0x10(%rdi)
  xor    %eax,%eax
  movsd  %xmm11,0x18(%rdi)
  movsd  %xmm3,(%rdi)
  movsd  0x8(%rsp),%xmm3
  movsd  %xmm12,0x20(%rdi)
  movsd  %xmm3,0x8(%rdi)
  movsd  %xmm8,0x28(%rdi)
  add    $0x98,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nopl   0x0(%rax,%rax,1)
L91:
  mov    $0xffffffff,%eax
  jmp    L328
L388:
  mov    %rdi,0x48(%rsp)
  movsd  %xmm7,0x40(%rsp)
  movsd  %xmm4,0x38(%rsp)
  movsd  %xmm5,0x30(%rsp)
  movsd  %xmm12,0x28(%rsp)
  movsd  %xmm3,0x20(%rsp)
  movsd  %xmm11,0x18(%rsp)
  movsd  %xmm13,0x10(%rsp)
  movsd  %xmm1,0x8(%rsp)
  movsd  %xmm2,(%rsp)
  call   <sqrt@plt>
  mov    0x48(%rsp),%rdi
  movsd  (%rsp),%xmm2
  pxor   %xmm6,%xmm6
  movsd  0x40(%rsp),%xmm7
  movsd  0x38(%rsp),%xmm4
  movsd  0x30(%rsp),%xmm5
  movsd  0x28(%rsp),%xmm12
  movsd  0x20(%rsp),%xmm3
  movsd  0x18(%rsp),%xmm11
  movsd  0x10(%rsp),%xmm13
  movsd  0x8(%rsp),%xmm1
  jmp    L438
L22:
  movapd %xmm10,%xmm0
  mov    %rdi,0x50(%rsp)
  movsd  %xmm4,0x48(%rsp)
  movsd  %xmm5,0x40(%rsp)
  movsd  %xmm14,0x38(%rsp)
  movsd  %xmm7,0x30(%rsp)
  movsd  %xmm12,0x28(%rsp)
  movsd  %xmm3,0x20(%rsp)
  movsd  %xmm11,0x18(%rsp)
  movsd  %xmm13,0x10(%rsp)
  movsd  %xmm1,0x8(%rsp)
  movsd  %xmm2,(%rsp)
  call   <sqrt@plt>
  mov    0x50(%rsp),%rdi
  pxor   %xmm6,%xmm6
  movsd  0x48(%rsp),%xmm4
  movsd  0x40(%rsp),%xmm5
  movsd  0x38(%rsp),%xmm14
  movapd %xmm0,%xmm10
  movsd  0x30(%rsp),%xmm7
  movsd  0x28(%rsp),%xmm12
  movsd  0x20(%rsp),%xmm3
  movsd  0x18(%rsp),%xmm11
  movsd  0x10(%rsp),%xmm13
  movsd  0x8(%rsp),%xmm1
  movsd  (%rsp),%xmm2
  jmp    L275
L130:
  movapd %xmm14,%xmm0
  mov    %rdi,0x50(%rsp)
  movsd  %xmm4,0x48(%rsp)
  movsd  %xmm9,0x40(%rsp)
  movsd  %xmm5,0x38(%rsp)
  movsd  %xmm7,0x30(%rsp)
  movsd  %xmm12,0x28(%rsp)
  movsd  %xmm3,0x20(%rsp)
  movsd  %xmm11,0x18(%rsp)
  movsd  %xmm13,0x10(%rsp)
  movsd  %xmm1,0x8(%rsp)
  movsd  %xmm2,(%rsp)
  call   <sqrt@plt>
  mov    0x50(%rsp),%rdi
  movsd  (%rsp),%xmm2
  pxor   %xmm6,%xmm6
  movsd  0x48(%rsp),%xmm4
  movsd  0x40(%rsp),%xmm9
  movapd %xmm0,%xmm14
  movsd  0x38(%rsp),%xmm5
  movsd  0x30(%rsp),%xmm7
  movsd  0x28(%rsp),%xmm12
  movsd  0x20(%rsp),%xmm3
  movsd  0x18(%rsp),%xmm11
  movsd  0x10(%rsp),%xmm13
  movsd  0x8(%rsp),%xmm1
  jmp    L45
L298:
  movapd %xmm9,%xmm0
  mov    %rdi,0x88(%rsp)
  movsd  %xmm4,0x80(%rsp)
  movsd  %xmm8,0x70(%rsp)
  movsd  %xmm5,0x68(%rsp)
  movsd  %xmm7,0x60(%rsp)
  movsd  %xmm12,0x58(%rsp)
  movsd  %xmm3,0x50(%rsp)
  movsd  %xmm11,0x48(%rsp)
  movsd  %xmm10,0x20(%rsp)
  movsd  %xmm15,0x18(%rsp)
  movsd  %xmm13,0x78(%rsp)
  movsd  %xmm2,0x10(%rsp)
  movsd  %xmm14,0x8(%rsp)
  movsd  %xmm1,(%rsp)
  movsd  %xmm9,0x40(%rsp)
  call   <sqrt@plt>
  movsd  (%rsp),%xmm1
  movsd  0x20(%rsp),%xmm10
  movsd  0x18(%rsp),%xmm15
  movsd  0x8(%rsp),%xmm14
  subsd  %xmm10,%xmm0
  movsd  0x10(%rsp),%xmm2
  movsd  0x78(%rsp),%xmm13
  movsd  %xmm1,0x30(%rsp)
  movsd  0x40(%rsp),%xmm9
  movsd  %xmm15,0x38(%rsp)
  movsd  %xmm14,0x28(%rsp)
  divsd  %xmm15,%xmm0
  movsd  %xmm2,0x20(%rsp)
  movsd  %xmm13,0x10(%rsp)
  movapd %xmm0,%xmm10
  movapd %xmm1,%xmm0
  mulsd  %xmm10,%xmm0
  movsd  %xmm10,0x18(%rsp)
  addsd  %xmm14,%xmm0
  movsd  %xmm0,(%rsp)
  movapd %xmm2,%xmm0
  mulsd  %xmm10,%xmm0
  addsd  %xmm13,%xmm0
  movsd  %xmm0,0x8(%rsp)
  movapd %xmm9,%xmm0
  call   <sqrt@plt>
  movsd  0x70(%rsp),%xmm8
  pxor   %xmm6,%xmm6
  mov    0x88(%rsp),%rdi
  movsd  0x80(%rsp),%xmm4
  movsd  0x68(%rsp),%xmm5
  movsd  0x60(%rsp),%xmm7
  movsd  0x58(%rsp),%xmm12
  movsd  0x50(%rsp),%xmm3
  movsd  0x48(%rsp),%xmm11
  movsd  0x38(%rsp),%xmm15
  movsd  0x30(%rsp),%xmm1
  movsd  0x28(%rsp),%xmm14
  movsd  0x20(%rsp),%xmm2
  movsd  0x18(%rsp),%xmm10
  movsd  0x10(%rsp),%xmm13
  jmp    L239
L226:
  movapd %xmm14,%xmm0
  mov    %rdi,0x88(%rsp)
  movsd  %xmm15,0x80(%rsp)
  movsd  %xmm10,0x78(%rsp)
  movsd  %xmm2,0x68(%rsp)
  movsd  %xmm9,0x60(%rsp)
  movsd  %xmm1,0x58(%rsp)
  movsd  %xmm11,0x30(%rsp)
  movsd  %xmm13,0x28(%rsp)
  movsd  %xmm5,0x70(%rsp)
  movsd  %xmm7,0x20(%rsp)
  movsd  %xmm4,0x18(%rsp)
  movsd  %xmm3,0x10(%rsp)
  movsd  %xmm14,0x50(%rsp)
  call   <sqrt@plt>
  movsd  0x30(%rsp),%xmm11
  movsd  0x28(%rsp),%xmm13
  movsd  0x10(%rsp),%xmm3
  movsd  0x20(%rsp),%xmm7
  subsd  %xmm11,%xmm0
  movsd  0x18(%rsp),%xmm4
  movsd  0x70(%rsp),%xmm5
  movsd  %xmm13,0x48(%rsp)
  movapd %xmm3,%xmm11
  movapd %xmm7,%xmm12
  movsd  0x50(%rsp),%xmm14
  movsd  %xmm3,0x40(%rsp)
  movsd  %xmm4,0x38(%rsp)
  movapd %xmm0,%xmm8
  movapd %xmm14,%xmm0
  movsd  %xmm7,0x28(%rsp)
  divsd  %xmm13,%xmm8
  movsd  %xmm5,0x18(%rsp)
  mulsd  %xmm8,%xmm11
  movsd  %xmm8,0x20(%rsp)
  mulsd  %xmm8,%xmm12
  addsd  %xmm4,%xmm11
  addsd  %xmm5,%xmm12
  movsd  %xmm11,0x30(%rsp)
  movsd  %xmm12,0x10(%rsp)
  call   <sqrt@plt>
  movsd  0x78(%rsp),%xmm10
  pxor   %xmm6,%xmm6
  mov    0x88(%rsp),%rdi
  movsd  0x80(%rsp),%xmm15
  movsd  0x68(%rsp),%xmm2
  movapd %xmm0,%xmm14
  movsd  0x60(%rsp),%xmm9
  movsd  0x58(%rsp),%xmm1
  movsd  0x48(%rsp),%xmm13
  movsd  0x40(%rsp),%xmm3
  movsd  0x38(%rsp),%xmm4
  movsd  0x30(%rsp),%xmm11
  movsd  0x28(%rsp),%xmm7
  movsd  0x20(%rsp),%xmm8
  movsd  0x18(%rsp),%xmm5
  movsd  0x10(%rsp),%xmm12
  jmp    L474
```

tool_calls: name: parse_data
arguments: label: D134
type: f32[4]
name: parse_data
arguments: label: D128
type: f64
name: parse_data
arguments: label: D47
type: f64

tool: {"D134": [0.0,-0.0,0.0,0.0]}

tool: D128: 1

tool: D47: 0.5

assistant: ```c
int check_rotation(double rot[2][3]) {
  double v1[3], v2[3], v3[3];
  double ca, cb, k1, k2, k3, k4;
  double a, b, c, d;
  double p1, q1, r1;
  double p2, q2, r2;
  double p3, q3, r3;
  double p4, q4, r4;
  double w;
  double e1, e2, e3, e4;
  int f;
  v1[0] = rot[0][0];
  v1[1] = rot[0][1];
  v1[2] = rot[0][2];
  v2[0] = rot[1][0];
  v2[1] = rot[1][1];
  v2[2] = rot[1][2];
  v3[0] = v1[1] * v2[2] - v1[2] * v2[1];
  v3[1] = v1[2] * v2[0] - v1[0] * v2[2];
  v3[2] = v1[0] * v2[1] - v1[1] * v2[0];
  w = sqrt(v3[0] * v3[0] + v3[1] * v3[1] + v3[2] * v3[2]);
  if (w == 0.0)
    return -1;
  v3[0] /= w;
  v3[1] /= w;
  v3[2] /= w;
  cb = v1[0] * v2[0] + v1[1] * v2[1] + v1[2] * v2[2];
  if (cb < 0)
    cb *= -1.0;
  ca = (sqrt(cb + 1.0) + sqrt(1.0 - cb)) * 0.5;
  if (v3[1] * v1[0] - v1[1] * v3[0] != 0.0) {
    f = 0;
  } else {
    if (v3[2] * v1[0] - v1[2] * v3[0] != 0.0) {
      w = v1[1];
      v1[1] = v1[2];
      v1[2] = w;
      w = v3[1];
      v3[1] = v3[2];
      v3[2] = w;
      f = 1;
    } else {
      w = v1[0];
      v1[0] = v1[2];
      v1[2] = w;
      w = v3[0];
      v3[0] = v3[2];
      v3[2] = w;
      f = 2;
    }
  }
  if (v3[1] * v1[0] - v1[1] * v3[0] == 0.0)
    return -1;
  k1 = (v1[1] * v3[2] - v3[1] * v1[2]) / (v3[1] * v1[0] - v1[1] * v3[0]);
  k2 = (v3[1] * ca) / (v3[1] * v1[0] - v1[1] * v3[0]);
  k3 = (v1[0] * v3[2] - v3[0] * v1[2]) / (v3[0] * v1[1] - v1[0] * v3[1]);
  k4 = (v3[0] * ca) / (v3[0] * v1[1] - v1[0] * v3[1]);
  a = k1 * k1 + k3 * k3 + 1;
  b = k1 * k2 + k3 * k4;
  c = k2 * k2 + k4 * k4 - 1;
  d = b * b - a * c;
  if (d < 0)
    return -1;
  r1 = (-b + sqrt(d)) / a;
  p1 = k1 * r1 + k2;
  q1 = k3 * r1 + k4;
  r2 = (-b - sqrt(d)) / a;
  p2 = k1 * r2 + k2;
  q2 = k3 * r2 + k4;
  if (f == 1) {
    w = q1;
    q1 = r1;
    r1 = w;
    w = q2;
    q2 = r2;
    r2 = w;
    w = v1[1];
    v1[1] = v1[2];
    v1[2] = w;
    w = v3[1];
    v3[1] = v3[2];
    v3[2] = w;
    f = 0;
  }
  if (f == 2) {
    w = p1;
    p1 = r1;
    r1 = w;
    w = p2;
    p2 = r2;
    r2 = w;
    w = v1[0];
    v1[0] = v1[2];
    v1[2] = w;
    w = v3[0];
    v3[0] = v3[2];
    v3[2] = w;
    f = 0;
  }
  if (v3[1] * v2[0] - v2[1] * v3[0] != 0.0) {
    f = 0;
  } else {
    if (v3[2] * v2[0] - v2[2] * v3[0] != 0.0) {
      w = v2[1];
      v2[1] = v2[2];
      v2[2] = w;
      w = v3[1];
      v3[1] = v3[2];
      v3[2] = w;
      f = 1;
    } else {
      w = v2[0];
      v2[0] = v2[2];
      v2[2] = w;
      w = v3[0];
      v3[0] = v3[2];
      v3[2] = w;
      f = 2;
    }
  }
  if (v3[1] * v2[0] - v2[1] * v3[0] == 0.0)
    return -1;
  k1 = (v2[1] * v3[2] - v3[1] * v2[2]) / (v3[1] * v2[0] - v2[1] * v3[0]);
  k2 = (v3[1] * ca) / (v3[1] * v2[0] - v2[1] * v3[0]);
  k3 = (v2[0] * v3[2] - v3[0] * v2[2]) / (v3[0] * v2[1] - v2[0] * v3[1]);
  k4 = (v3[0] * ca) / (v3[0] * v2[1] - v2[0] * v3[1]);
  a = k1 * k1 + k3 * k3 + 1;
  b = k1 * k2 + k3 * k4;
  c = k2 * k2 + k4 * k4 - 1;
  d = b * b - a * c;
  if (d < 0)
    return -1;
  r3 = (-b + sqrt(d)) / a;
  p3 = k1 * r3 + k2;
  q3 = k3 * r3 + k4;
  r4 = (-b - sqrt(d)) / a;
  p4 = k1 * r4 + k2;
  q4 = k3 * r4 + k4;
  if (f == 1) {
    w = q3;
    q3 = r3;
    r3 = w;
    w = q4;
    q4 = r4;
    r4 = w;
    w = v2[1];
    v2[1] = v2[2];
    v2[2] = w;
    w = v3[1];
    v3[1] = v3[2];
    v3[2] = w;
    f = 0;
  }
  if (f == 2) {
    w = p3;
    p3 = r3;
    r3 = w;
    w = p4;
    p4 = r4;
    r4 = w;
    w = v2[0];
    v2[0] = v2[2];
    v2[2] = w;
    w = v3[0];
    v3[0] = v3[2];
    v3[2] = w;
    f = 0;
  }
  e1 = p1 * p3 + q1 * q3 + r1 * r3;
  if (e1 < 0)
    e1 = -e1;
  e2 = p1 * p4 + q1 * q4 + r1 * r4;
  if (e2 < 0)
    e2 = -e2;
  e3 = p2 * p3 + q2 * q3 + r2 * r3;
  if (e3 < 0)
    e3 = -e3;
  e4 = p2 * p4 + q2 * q4 + r2 * r4;
  if (e4 < 0)
    e4 = -e4;
  if (e1 < e2) {
    if (e1 < e3) {
      if (e1 < e4) {
        rot[0][0] = p1;
        rot[0][1] = q1;
        rot[0][2] = r1;
        rot[1][0] = p3;
        rot[1][1] = q3;
        rot[1][2] = r3;
      } else {
        rot[0][0] = p2;
        rot[0][1] = q2;
        rot[0][2] = r2;
        rot[1][0] = p4;
        rot[1][1] = q4;
        rot[1][2] = r4;
      }
    } else {
      if (e3 < e4) {
        rot[0][0] = p2;
        rot[0][1] = q2;
        rot[0][2] = r2;
        rot[1][0] = p3;
        rot[1][1] = q3;
        rot[1][2] = r3;
      } else {
        rot[0][0] = p2;
        rot[0][1] = q2;
        rot[0][2] = r2;
        rot[1][0] = p4;
        rot[1][1] = q4;
        rot[1][2] = r4;
      }
    }
  } else {
    if (e2 < e3) {
      if (e2 < e4) {
        rot[0][0] = p1;
        rot[0][1] = q1;
        rot[0][2] = r1;
        rot[1][0] = p4;
        rot[1][1] = q4;
        rot[1][2] = r4;
      } else {
        rot[0][0] = p2;
        rot[0][1] = q2;
        rot[0][2] = r2;
        rot[1][0] = p4;
        rot[1][1] = q4;
        rot[1][2] = r4;
      }
    } else {
      if (e3 < e4) {
        rot[0][0] = p2;
        rot[0][1] = q2;
        rot[0][2] = r2;
        rot[1][0] = p3;
        rot[1][1] = q3;
        rot[1][2] = r3;
      } else {
        rot[0][0] = p2;
        rot[0][1] = q2;
        rot[0][2] = r2;
        rot[1][0] = p4;
        rot[1][1] = q4;
        rot[1][2] = r4;
      }
    }
  }
  return 0;
}
```