user: Demonstrate the C code that generates the assembly output below:

```asm
<check_rotation>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x150,%rsp
  mov    %rdi,-0x148(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x148(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x60(%rbp)
  mov    -0x148(%rbp),%rax
  movsd  0x8(%rax),%xmm0
  movsd  %xmm0,-0x58(%rbp)
  mov    -0x148(%rbp),%rax
  movsd  0x10(%rax),%xmm0
  movsd  %xmm0,-0x50(%rbp)
  mov    -0x148(%rbp),%rax
  add    $0x18,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x40(%rbp)
  mov    -0x148(%rbp),%rax
  add    $0x18,%rax
  movsd  0x8(%rax),%xmm0
  movsd  %xmm0,-0x38(%rbp)
  mov    -0x148(%rbp),%rax
  add    $0x18,%rax
  movsd  0x10(%rax),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  -0x58(%rbp),%xmm1
  movsd  -0x30(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x50(%rbp),%xmm2
  movsd  -0x38(%rbp),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x50(%rbp),%xmm1
  movsd  -0x40(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x60(%rbp),%xmm2
  movsd  -0x30(%rbp),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x60(%rbp),%xmm1
  movsd  -0x38(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x58(%rbp),%xmm2
  movsd  -0x40(%rbp),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x20(%rbp),%xmm1
  movsd  -0x20(%rbp),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x18(%rbp),%xmm2
  movsd  -0x18(%rbp),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  movsd  -0x10(%rbp),%xmm2
  movsd  -0x10(%rbp),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movq   %xmm0,%rax
  mov    %rax,-0xb0(%rbp)
  pxor   %xmm0,%xmm0
  ucomisd -0xb0(%rbp),%xmm0
  jp     L221
  pxor   %xmm0,%xmm0
  ucomisd -0xb0(%rbp),%xmm0
  jne    L221
  mov    $0xffffffff,%eax
  jmp    L334
L221:
  movsd  -0x20(%rbp),%xmm0
  divsd  -0xb0(%rbp),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x18(%rbp),%xmm0
  divsd  -0xb0(%rbp),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x10(%rbp),%xmm0
  divsd  -0xb0(%rbp),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x60(%rbp),%xmm1
  movsd  -0x40(%rbp),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x58(%rbp),%xmm2
  movsd  -0x38(%rbp),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  movsd  -0x50(%rbp),%xmm2
  movsd  -0x30(%rbp),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x138(%rbp)
  pxor   %xmm0,%xmm0
  comisd -0x138(%rbp),%xmm0
  jbe    L302
  movsd  -0x138(%rbp),%xmm0
  movq   D125(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x138(%rbp)
L302:
  movsd  -0x138(%rbp),%xmm1
  movsd  D51(%rip),%xmm0
  addsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movsd  %xmm0,-0x150(%rbp)
  movsd  D51(%rip),%xmm0
  movapd %xmm0,%xmm4
  subsd  -0x138(%rbp),%xmm4
  movq   %xmm4,%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movsd  -0x150(%rbp),%xmm1
  addsd  %xmm0,%xmm1
  movsd  D11(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0xa8(%rbp)
  movsd  -0x18(%rbp),%xmm1
  movsd  -0x60(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x58(%rbp),%xmm2
  movsd  -0x20(%rbp),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jp     L105
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  je     L75
L105:
  movl   $0x0,-0x13c(%rbp)
  jmp    L111
L75:
  movsd  -0x10(%rbp),%xmm1
  movsd  -0x60(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x50(%rbp),%xmm2
  movsd  -0x20(%rbp),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jp     L438
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  je     L372
L438:
  movsd  -0x58(%rbp),%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  movsd  -0x50(%rbp),%xmm0
  movsd  %xmm0,-0x58(%rbp)
  movsd  -0xb0(%rbp),%xmm0
  movsd  %xmm0,-0x50(%rbp)
  movsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  movsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0xb0(%rbp),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movl   $0x1,-0x13c(%rbp)
  jmp    L111
L372:
  movsd  -0x60(%rbp),%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  movsd  -0x50(%rbp),%xmm0
  movsd  %xmm0,-0x60(%rbp)
  movsd  -0xb0(%rbp),%xmm0
  movsd  %xmm0,-0x50(%rbp)
  movsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  movsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0xb0(%rbp),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movl   $0x2,-0x13c(%rbp)
L111:
  movsd  -0x18(%rbp),%xmm1
  movsd  -0x60(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x58(%rbp),%xmm2
  movsd  -0x20(%rbp),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jp     L436
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jne    L436
  mov    $0xffffffff,%eax
  jmp    L334
L436:
  movsd  -0x58(%rbp),%xmm1
  movsd  -0x10(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x18(%rbp),%xmm2
  movsd  -0x50(%rbp),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  movsd  -0x18(%rbp),%xmm2
  movsd  -0x60(%rbp),%xmm1
  mulsd  %xmm2,%xmm1
  movsd  -0x58(%rbp),%xmm3
  movsd  -0x20(%rbp),%xmm2
  mulsd  %xmm3,%xmm2
  subsd  %xmm2,%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0xa0(%rbp)
  movsd  -0x18(%rbp),%xmm0
  mulsd  -0xa8(%rbp),%xmm0
  movsd  -0x18(%rbp),%xmm2
  movsd  -0x60(%rbp),%xmm1
  mulsd  %xmm2,%xmm1
  movsd  -0x58(%rbp),%xmm3
  movsd  -0x20(%rbp),%xmm2
  mulsd  %xmm3,%xmm2
  subsd  %xmm2,%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x98(%rbp)
  movsd  -0x60(%rbp),%xmm1
  movsd  -0x10(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x20(%rbp),%xmm2
  movsd  -0x50(%rbp),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  movsd  -0x20(%rbp),%xmm2
  movsd  -0x58(%rbp),%xmm1
  mulsd  %xmm2,%xmm1
  movsd  -0x60(%rbp),%xmm3
  movsd  -0x18(%rbp),%xmm2
  mulsd  %xmm3,%xmm2
  subsd  %xmm2,%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x90(%rbp)
  movsd  -0x20(%rbp),%xmm0
  mulsd  -0xa8(%rbp),%xmm0
  movsd  -0x20(%rbp),%xmm2
  movsd  -0x58(%rbp),%xmm1
  mulsd  %xmm2,%xmm1
  movsd  -0x60(%rbp),%xmm3
  movsd  -0x18(%rbp),%xmm2
  mulsd  %xmm3,%xmm2
  subsd  %xmm2,%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x88(%rbp)
  movsd  -0xa0(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  %xmm0,%xmm1
  movsd  -0x90(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  movsd  D51(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x80(%rbp)
  movsd  -0xa0(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x98(%rbp),%xmm1
  movsd  -0x90(%rbp),%xmm0
  mulsd  -0x88(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x78(%rbp)
  movsd  -0x98(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  %xmm0,%xmm1
  movsd  -0x88(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  addsd  %xmm1,%xmm0
  movsd  D51(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x70(%rbp)
  movsd  -0x78(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  movsd  -0x80(%rbp),%xmm1
  mulsd  -0x70(%rbp),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x68(%rbp)
  pxor   %xmm0,%xmm0
  comisd -0x68(%rbp),%xmm0
  jbe    L354
  mov    $0xffffffff,%eax
  jmp    L334
L354:
  mov    -0x68(%rbp),%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  subsd  -0x78(%rbp),%xmm0
  divsd  -0x80(%rbp),%xmm0
  movsd  %xmm0,-0x120(%rbp)
  movsd  -0xa0(%rbp),%xmm0
  mulsd  -0x120(%rbp),%xmm0
  movsd  -0x98(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x130(%rbp)
  movsd  -0x90(%rbp),%xmm0
  mulsd  -0x120(%rbp),%xmm0
  movsd  -0x88(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x128(%rbp)
  movsd  -0x78(%rbp),%xmm0
  movq   D125(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x150(%rbp)
  mov    -0x68(%rbp),%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movapd %xmm0,%xmm1
  movsd  -0x150(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  divsd  -0x80(%rbp),%xmm0
  movsd  %xmm0,-0x108(%rbp)
  movsd  -0xa0(%rbp),%xmm0
  mulsd  -0x108(%rbp),%xmm0
  movsd  -0x98(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x118(%rbp)
  movsd  -0x90(%rbp),%xmm0
  mulsd  -0x108(%rbp),%xmm0
  movsd  -0x88(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x110(%rbp)
  cmpl   $0x1,-0x13c(%rbp)
  jne    L284
  movsd  -0x128(%rbp),%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  movsd  -0x120(%rbp),%xmm0
  movsd  %xmm0,-0x128(%rbp)
  movsd  -0xb0(%rbp),%xmm0
  movsd  %xmm0,-0x120(%rbp)
  movsd  -0x110(%rbp),%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  movsd  -0x108(%rbp),%xmm0
  movsd  %xmm0,-0x110(%rbp)
  movsd  -0xb0(%rbp),%xmm0
  movsd  %xmm0,-0x108(%rbp)
  movsd  -0x58(%rbp),%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  movsd  -0x50(%rbp),%xmm0
  movsd  %xmm0,-0x58(%rbp)
  movsd  -0xb0(%rbp),%xmm0
  movsd  %xmm0,-0x50(%rbp)
  movsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  movsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0xb0(%rbp),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movl   $0x0,-0x13c(%rbp)
L284:
  cmpl   $0x2,-0x13c(%rbp)
  jne    L279
  movsd  -0x130(%rbp),%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  movsd  -0x120(%rbp),%xmm0
  movsd  %xmm0,-0x130(%rbp)
  movsd  -0xb0(%rbp),%xmm0
  movsd  %xmm0,-0x120(%rbp)
  movsd  -0x118(%rbp),%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  movsd  -0x108(%rbp),%xmm0
  movsd  %xmm0,-0x118(%rbp)
  movsd  -0xb0(%rbp),%xmm0
  movsd  %xmm0,-0x108(%rbp)
  movsd  -0x60(%rbp),%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  movsd  -0x50(%rbp),%xmm0
  movsd  %xmm0,-0x60(%rbp)
  movsd  -0xb0(%rbp),%xmm0
  movsd  %xmm0,-0x50(%rbp)
  movsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  movsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0xb0(%rbp),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movl   $0x0,-0x13c(%rbp)
L279:
  movsd  -0x18(%rbp),%xmm1
  movsd  -0x40(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x38(%rbp),%xmm2
  movsd  -0x20(%rbp),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jp     L241
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  je     L368
L241:
  movl   $0x0,-0x13c(%rbp)
  jmp    L314
L368:
  movsd  -0x10(%rbp),%xmm1
  movsd  -0x40(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x30(%rbp),%xmm2
  movsd  -0x20(%rbp),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jp     L100
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  je     L484
L100:
  movsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  movsd  -0x30(%rbp),%xmm0
  movsd  %xmm0,-0x38(%rbp)
  movsd  -0xb0(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  movsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0xb0(%rbp),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movl   $0x1,-0x13c(%rbp)
  jmp    L314
L484:
  movsd  -0x40(%rbp),%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  movsd  -0x30(%rbp),%xmm0
  movsd  %xmm0,-0x40(%rbp)
  movsd  -0xb0(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  movsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0xb0(%rbp),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movl   $0x2,-0x13c(%rbp)
L314:
  movsd  -0x18(%rbp),%xmm1
  movsd  -0x40(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x38(%rbp),%xmm2
  movsd  -0x20(%rbp),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jp     L458
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jne    L458
  mov    $0xffffffff,%eax
  jmp    L334
L458:
  movsd  -0x38(%rbp),%xmm1
  movsd  -0x10(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x18(%rbp),%xmm2
  movsd  -0x30(%rbp),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  movsd  -0x18(%rbp),%xmm2
  movsd  -0x40(%rbp),%xmm1
  mulsd  %xmm2,%xmm1
  movsd  -0x38(%rbp),%xmm3
  movsd  -0x20(%rbp),%xmm2
  mulsd  %xmm3,%xmm2
  subsd  %xmm2,%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0xa0(%rbp)
  movsd  -0x18(%rbp),%xmm0
  mulsd  -0xa8(%rbp),%xmm0
  movsd  -0x18(%rbp),%xmm2
  movsd  -0x40(%rbp),%xmm1
  mulsd  %xmm2,%xmm1
  movsd  -0x38(%rbp),%xmm3
  movsd  -0x20(%rbp),%xmm2
  mulsd  %xmm3,%xmm2
  subsd  %xmm2,%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x98(%rbp)
  movsd  -0x40(%rbp),%xmm1
  movsd  -0x10(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x20(%rbp),%xmm2
  movsd  -0x30(%rbp),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  movsd  -0x20(%rbp),%xmm2
  movsd  -0x38(%rbp),%xmm1
  mulsd  %xmm2,%xmm1
  movsd  -0x40(%rbp),%xmm3
  movsd  -0x18(%rbp),%xmm2
  mulsd  %xmm3,%xmm2
  subsd  %xmm2,%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x90(%rbp)
  movsd  -0x20(%rbp),%xmm0
  mulsd  -0xa8(%rbp),%xmm0
  movsd  -0x20(%rbp),%xmm2
  movsd  -0x38(%rbp),%xmm1
  mulsd  %xmm2,%xmm1
  movsd  -0x40(%rbp),%xmm3
  movsd  -0x18(%rbp),%xmm2
  mulsd  %xmm3,%xmm2
  subsd  %xmm2,%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x88(%rbp)
  movsd  -0xa0(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  %xmm0,%xmm1
  movsd  -0x90(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  movsd  D51(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x80(%rbp)
  movsd  -0xa0(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x98(%rbp),%xmm1
  movsd  -0x90(%rbp),%xmm0
  mulsd  -0x88(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x78(%rbp)
  movsd  -0x98(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  %xmm0,%xmm1
  movsd  -0x88(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  addsd  %xmm1,%xmm0
  movsd  D51(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x70(%rbp)
  movsd  -0x78(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  movsd  -0x80(%rbp),%xmm1
  mulsd  -0x70(%rbp),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x68(%rbp)
  pxor   %xmm0,%xmm0
  comisd -0x68(%rbp),%xmm0
  jbe    L486
  mov    $0xffffffff,%eax
  jmp    L334
L486:
  mov    -0x68(%rbp),%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  subsd  -0x78(%rbp),%xmm0
  divsd  -0x80(%rbp),%xmm0
  movsd  %xmm0,-0xf0(%rbp)
  movsd  -0xa0(%rbp),%xmm0
  mulsd  -0xf0(%rbp),%xmm0
  movsd  -0x98(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x100(%rbp)
  movsd  -0x90(%rbp),%xmm0
  mulsd  -0xf0(%rbp),%xmm0
  movsd  -0x88(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xf8(%rbp)
  movsd  -0x78(%rbp),%xmm0
  movq   D125(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x150(%rbp)
  mov    -0x68(%rbp),%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movapd %xmm0,%xmm1
  movsd  -0x150(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  divsd  -0x80(%rbp),%xmm0
  movsd  %xmm0,-0xd8(%rbp)
  movsd  -0xa0(%rbp),%xmm0
  mulsd  -0xd8(%rbp),%xmm0
  movsd  -0x98(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xe8(%rbp)
  movsd  -0x90(%rbp),%xmm0
  mulsd  -0xd8(%rbp),%xmm0
  movsd  -0x88(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xe0(%rbp)
  cmpl   $0x1,-0x13c(%rbp)
  jne    L112
  movsd  -0xf8(%rbp),%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  movsd  -0xf0(%rbp),%xmm0
  movsd  %xmm0,-0xf8(%rbp)
  movsd  -0xb0(%rbp),%xmm0
  movsd  %xmm0,-0xf0(%rbp)
  movsd  -0xe0(%rbp),%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  movsd  -0xd8(%rbp),%xmm0
  movsd  %xmm0,-0xe0(%rbp)
  movsd  -0xb0(%rbp),%xmm0
  movsd  %xmm0,-0xd8(%rbp)
  movsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  movsd  -0x30(%rbp),%xmm0
  movsd  %xmm0,-0x38(%rbp)
  movsd  -0xb0(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  movsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0xb0(%rbp),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movl   $0x0,-0x13c(%rbp)
L112:
  cmpl   $0x2,-0x13c(%rbp)
  jne    L294
  movsd  -0x100(%rbp),%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  movsd  -0xf0(%rbp),%xmm0
  movsd  %xmm0,-0x100(%rbp)
  movsd  -0xb0(%rbp),%xmm0
  movsd  %xmm0,-0xf0(%rbp)
  movsd  -0xe8(%rbp),%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  movsd  -0xd8(%rbp),%xmm0
  movsd  %xmm0,-0xe8(%rbp)
  movsd  -0xb0(%rbp),%xmm0
  movsd  %xmm0,-0xd8(%rbp)
  movsd  -0x40(%rbp),%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  movsd  -0x30(%rbp),%xmm0
  movsd  %xmm0,-0x40(%rbp)
  movsd  -0xb0(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  movsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0xb0(%rbp),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movl   $0x0,-0x13c(%rbp)
L294:
  movsd  -0x130(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x100(%rbp),%xmm1
  movsd  -0x128(%rbp),%xmm0
  mulsd  -0xf8(%rbp),%xmm0
  addsd  %xmm0,%xmm1
  movsd  -0x120(%rbp),%xmm0
  mulsd  -0xf0(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xd0(%rbp)
  pxor   %xmm0,%xmm0
  comisd -0xd0(%rbp),%xmm0
  jbe    L295
  movsd  -0xd0(%rbp),%xmm0
  movq   D125(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0xd0(%rbp)
L295:
  movsd  -0x130(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0xe8(%rbp),%xmm1
  movsd  -0x128(%rbp),%xmm0
  mulsd  -0xe0(%rbp),%xmm0
  addsd  %xmm0,%xmm1
  movsd  -0x120(%rbp),%xmm0
  mulsd  -0xd8(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xc8(%rbp)
  pxor   %xmm0,%xmm0
  comisd -0xc8(%rbp),%xmm0
  jbe    L442
  movsd  -0xc8(%rbp),%xmm0
  movq   D125(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0xc8(%rbp)
L442:
  movsd  -0x118(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x100(%rbp),%xmm1
  movsd  -0x110(%rbp),%xmm0
  mulsd  -0xf8(%rbp),%xmm0
  addsd  %xmm0,%xmm1
  movsd  -0x108(%rbp),%xmm0
  mulsd  -0xf0(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xc0(%rbp)
  pxor   %xmm0,%xmm0
  comisd -0xc0(%rbp),%xmm0
  jbe    L347
  movsd  -0xc0(%rbp),%xmm0
  movq   D125(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0xc0(%rbp)
L347:
  movsd  -0x118(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0xe8(%rbp),%xmm1
  movsd  -0x110(%rbp),%xmm0
  mulsd  -0xe0(%rbp),%xmm0
  addsd  %xmm0,%xmm1
  movsd  -0x108(%rbp),%xmm0
  mulsd  -0xd8(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xb8(%rbp)
  pxor   %xmm0,%xmm0
  comisd -0xb8(%rbp),%xmm0
  jbe    L413
  movsd  -0xb8(%rbp),%xmm0
  movq   D125(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0xb8(%rbp)
L413:
  movsd  -0xc8(%rbp),%xmm0
  comisd -0xd0(%rbp),%xmm0
  jbe    L325
  movsd  -0xc0(%rbp),%xmm0
  comisd -0xd0(%rbp),%xmm0
  jbe    L353
  movsd  -0xb8(%rbp),%xmm0
  comisd -0xd0(%rbp),%xmm0
  jbe    L204
  mov    -0x148(%rbp),%rax
  movsd  -0x130(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x148(%rbp),%rax
  movsd  -0x128(%rbp),%xmm0
  movsd  %xmm0,0x8(%rax)
  mov    -0x148(%rbp),%rax
  movsd  -0x120(%rbp),%xmm0
  movsd  %xmm0,0x10(%rax)
  mov    -0x148(%rbp),%rax
  add    $0x18,%rax
  movsd  -0x100(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x148(%rbp),%rax
  add    $0x18,%rax
  movsd  -0xf8(%rbp),%xmm0
  movsd  %xmm0,0x8(%rax)
  mov    -0x148(%rbp),%rax
  add    $0x18,%rax
  movsd  -0xf0(%rbp),%xmm0
  movsd  %xmm0,0x10(%rax)
  jmp    L25
L204:
  mov    -0x148(%rbp),%rax
  movsd  -0x118(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x148(%rbp),%rax
  movsd  -0x110(%rbp),%xmm0
  movsd  %xmm0,0x8(%rax)
  mov    -0x148(%rbp),%rax
  movsd  -0x108(%rbp),%xmm0
  movsd  %xmm0,0x10(%rax)
  mov    -0x148(%rbp),%rax
  add    $0x18,%rax
  movsd  -0xe8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x148(%rbp),%rax
  add    $0x18,%rax
  movsd  -0xe0(%rbp),%xmm0
  movsd  %xmm0,0x8(%rax)
  mov    -0x148(%rbp),%rax
  add    $0x18,%rax
  movsd  -0xd8(%rbp),%xmm0
  movsd  %xmm0,0x10(%rax)
  jmp    L25
L353:
  movsd  -0xb8(%rbp),%xmm0
  comisd -0xc0(%rbp),%xmm0
  jbe    L399
  mov    -0x148(%rbp),%rax
  movsd  -0x118(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x148(%rbp),%rax
  movsd  -0x110(%rbp),%xmm0
  movsd  %xmm0,0x8(%rax)
  mov    -0x148(%rbp),%rax
  movsd  -0x108(%rbp),%xmm0
  movsd  %xmm0,0x10(%rax)
  mov    -0x148(%rbp),%rax
  add    $0x18,%rax
  movsd  -0x100(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x148(%rbp),%rax
  add    $0x18,%rax
  movsd  -0xf8(%rbp),%xmm0
  movsd  %xmm0,0x8(%rax)
  mov    -0x148(%rbp),%rax
  add    $0x18,%rax
  movsd  -0xf0(%rbp),%xmm0
  movsd  %xmm0,0x10(%rax)
  jmp    L25
L399:
  mov    -0x148(%rbp),%rax
  movsd  -0x118(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x148(%rbp),%rax
  movsd  -0x110(%rbp),%xmm0
  movsd  %xmm0,0x8(%rax)
  mov    -0x148(%rbp),%rax
  movsd  -0x108(%rbp),%xmm0
  movsd  %xmm0,0x10(%rax)
  mov    -0x148(%rbp),%rax
  add    $0x18,%rax
  movsd  -0xe8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x148(%rbp),%rax
  add    $0x18,%rax
  movsd  -0xe0(%rbp),%xmm0
  movsd  %xmm0,0x8(%rax)
  mov    -0x148(%rbp),%rax
  add    $0x18,%rax
  movsd  -0xd8(%rbp),%xmm0
  movsd  %xmm0,0x10(%rax)
  jmp    L25
L325:
  movsd  -0xc0(%rbp),%xmm0
  comisd -0xc8(%rbp),%xmm0
  jbe    L366
  movsd  -0xb8(%rbp),%xmm0
  comisd -0xc8(%rbp),%xmm0
  jbe    L408
  mov    -0x148(%rbp),%rax
  movsd  -0x130(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x148(%rbp),%rax
  movsd  -0x128(%rbp),%xmm0
  movsd  %xmm0,0x8(%rax)
  mov    -0x148(%rbp),%rax
  movsd  -0x120(%rbp),%xmm0
  movsd  %xmm0,0x10(%rax)
  mov    -0x148(%rbp),%rax
  add    $0x18,%rax
  movsd  -0xe8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x148(%rbp),%rax
  add    $0x18,%rax
  movsd  -0xe0(%rbp),%xmm0
  movsd  %xmm0,0x8(%rax)
  mov    -0x148(%rbp),%rax
  add    $0x18,%rax
  movsd  -0xd8(%rbp),%xmm0
  movsd  %xmm0,0x10(%rax)
  jmp    L25
L408:
  mov    -0x148(%rbp),%rax
  movsd  -0x118(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x148(%rbp),%rax
  movsd  -0x110(%rbp),%xmm0
  movsd  %xmm0,0x8(%rax)
  mov    -0x148(%rbp),%rax
  movsd  -0x108(%rbp),%xmm0
  movsd  %xmm0,0x10(%rax)
  mov    -0x148(%rbp),%rax
  add    $0x18,%rax
  movsd  -0xe8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x148(%rbp),%rax
  add    $0x18,%rax
  movsd  -0xe0(%rbp),%xmm0
  movsd  %xmm0,0x8(%rax)
  mov    -0x148(%rbp),%rax
  add    $0x18,%rax
  movsd  -0xd8(%rbp),%xmm0
  movsd  %xmm0,0x10(%rax)
  jmp    L25
L366:
  movsd  -0xb8(%rbp),%xmm0
  comisd -0xc0(%rbp),%xmm0
  jbe    L149
  mov    -0x148(%rbp),%rax
  movsd  -0x118(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x148(%rbp),%rax
  movsd  -0x110(%rbp),%xmm0
  movsd  %xmm0,0x8(%rax)
  mov    -0x148(%rbp),%rax
  movsd  -0x108(%rbp),%xmm0
  movsd  %xmm0,0x10(%rax)
  mov    -0x148(%rbp),%rax
  add    $0x18,%rax
  movsd  -0x100(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x148(%rbp),%rax
  add    $0x18,%rax
  movsd  -0xf8(%rbp),%xmm0
  movsd  %xmm0,0x8(%rax)
  mov    -0x148(%rbp),%rax
  add    $0x18,%rax
  movsd  -0xf0(%rbp),%xmm0
  movsd  %xmm0,0x10(%rax)
  jmp    L25
L149:
  mov    -0x148(%rbp),%rax
  movsd  -0x118(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x148(%rbp),%rax
  movsd  -0x110(%rbp),%xmm0
  movsd  %xmm0,0x8(%rax)
  mov    -0x148(%rbp),%rax
  movsd  -0x108(%rbp),%xmm0
  movsd  %xmm0,0x10(%rax)
  mov    -0x148(%rbp),%rax
  add    $0x18,%rax
  movsd  -0xe8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x148(%rbp),%rax
  add    $0x18,%rax
  movsd  -0xe0(%rbp),%xmm0
  movsd  %xmm0,0x8(%rax)
  mov    -0x148(%rbp),%rax
  add    $0x18,%rax
  movsd  -0xd8(%rbp),%xmm0
  movsd  %xmm0,0x10(%rax)
L25:
  mov    $0x0,%eax
L334:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L286
  call   <__stack_chk_fail@plt>
L286:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: label: D125
type: f32[2]
name: disassemble_data
arguments: label: D51
type: f64
name: disassemble_data
arguments: label: D11
type: f64

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

tool: D51: 1

tool: D11: 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;
}
```