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

```asm
<equilibration>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x168,%rsp
  mov    %rdi,-0x158(%rbp)
  movsd  %xmm0,-0x160(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  movsd  D44(%rip),%xmm0
  divsd  -0x160(%rbp),%xmm0
  movsd  %xmm0,-0x118(%rbp)
  movl   $0x0,-0x150(%rbp)
  jmp    L66
L61:
  movl   $0x0,-0x14c(%rbp)
  jmp    L88
L14:
  movl   $0x0,-0x148(%rbp)
  jmp    L4
L44:
  movl   $0x0,-0x144(%rbp)
  jmp    L138
L114:
  movl   $0x0,-0x140(%rbp)
  jmp    L31
L148:
  mov    -0x148(%rbp),%eax
  mov    %eax,-0x13c(%rbp)
  mov    -0x144(%rbp),%eax
  mov    %eax,-0x138(%rbp)
  mov    -0x140(%rbp),%eax
  mov    %eax,-0x134(%rbp)
  mov    -0x13c(%rbp),%eax
  lea    0x17(%rax),%edx
  movslq %edx,%rax
  imul   $0x2aaaaaab,%rax,%rax
  shr    $0x20,%rax
  sar    $0x2,%eax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  mov    %eax,-0x130(%rbp)
  mov    -0x130(%rbp),%ecx
  mov    %ecx,%eax
  add    %eax,%eax
  add    %ecx,%eax
  shl    $0x3,%eax
  sub    %eax,%edx
  mov    %edx,-0x130(%rbp)
  mov    -0x13c(%rbp),%eax
  lea    0x1(%rax),%edx
  movslq %edx,%rax
  imul   $0x2aaaaaab,%rax,%rax
  shr    $0x20,%rax
  sar    $0x2,%eax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  mov    %eax,-0x12c(%rbp)
  mov    -0x12c(%rbp),%ecx
  mov    %ecx,%eax
  add    %eax,%eax
  add    %ecx,%eax
  shl    $0x3,%eax
  sub    %eax,%edx
  mov    %edx,-0x12c(%rbp)
  mov    -0x138(%rbp),%eax
  lea    0x17(%rax),%edx
  movslq %edx,%rax
  imul   $0x2aaaaaab,%rax,%rax
  shr    $0x20,%rax
  sar    $0x2,%eax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  mov    %eax,-0x128(%rbp)
  mov    -0x128(%rbp),%ecx
  mov    %ecx,%eax
  add    %eax,%eax
  add    %ecx,%eax
  shl    $0x3,%eax
  sub    %eax,%edx
  mov    %edx,-0x128(%rbp)
  mov    -0x138(%rbp),%eax
  lea    0x1(%rax),%edx
  movslq %edx,%rax
  imul   $0x2aaaaaab,%rax,%rax
  shr    $0x20,%rax
  sar    $0x2,%eax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  mov    %eax,-0x124(%rbp)
  mov    -0x124(%rbp),%ecx
  mov    %ecx,%eax
  add    %eax,%eax
  add    %ecx,%eax
  shl    $0x3,%eax
  sub    %eax,%edx
  mov    %edx,-0x124(%rbp)
  mov    -0x134(%rbp),%eax
  lea    0x17(%rax),%edx
  movslq %edx,%rax
  imul   $0x2aaaaaab,%rax,%rax
  shr    $0x20,%rax
  sar    $0x2,%eax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  mov    %eax,-0x120(%rbp)
  mov    -0x120(%rbp),%ecx
  mov    %ecx,%eax
  add    %eax,%eax
  add    %ecx,%eax
  shl    $0x3,%eax
  sub    %eax,%edx
  mov    %edx,-0x120(%rbp)
  mov    -0x134(%rbp),%eax
  lea    0x1(%rax),%edx
  movslq %edx,%rax
  imul   $0x2aaaaaab,%rax,%rax
  shr    $0x20,%rax
  sar    $0x2,%eax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  mov    %eax,-0x11c(%rbp)
  mov    -0x11c(%rbp),%ecx
  mov    %ecx,%eax
  add    %eax,%eax
  add    %ecx,%eax
  shl    $0x3,%eax
  sub    %eax,%edx
  mov    %edx,-0x11c(%rbp)
  mov    -0x13c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x158(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x138(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x134(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x60(%rbp)
  mov    -0x13c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x158(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x138(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x134(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movsd  0x8(%rax),%xmm0
  movsd  %xmm0,-0x58(%rbp)
  mov    $0x0,%eax
  call   <rng_theta@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0x70(%rbp)
  mov    $0x0,%eax
  call   <rng_phi@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0x68(%rbp)
  movsd  -0x60(%rbp),%xmm0
  movsd  %xmm0,-0x110(%rbp)
  movsd  -0x58(%rbp),%xmm0
  movsd  %xmm0,-0x108(%rbp)
  movsd  -0x70(%rbp),%xmm0
  movsd  %xmm0,-0x100(%rbp)
  movsd  -0x108(%rbp),%xmm0
  movsd  %xmm0,-0xf8(%rbp)
  mov    -0x100(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movsd  %xmm0,-0x168(%rbp)
  mov    -0xf8(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movapd %xmm0,%xmm3
  mulsd  -0x168(%rbp),%xmm3
  movsd  %xmm3,-0x168(%rbp)
  mov    -0x110(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movsd  %xmm0,-0x170(%rbp)
  mov    -0x108(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movsd  -0x170(%rbp),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  -0x168(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x50(%rbp)
  mov    -0x100(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movsd  %xmm0,-0x168(%rbp)
  mov    -0xf8(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movapd %xmm0,%xmm4
  mulsd  -0x168(%rbp),%xmm4
  movsd  %xmm4,-0x168(%rbp)
  mov    -0x110(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movsd  %xmm0,-0x170(%rbp)
  mov    -0x108(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movsd  -0x170(%rbp),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  -0x168(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x48(%rbp)
  mov    -0x100(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movq   %xmm0,%rbx
  mov    -0x110(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movapd %xmm0,%xmm1
  movq   %rbx,%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x40(%rbp)
  mov    -0x12c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x158(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x138(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x134(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0xf0(%rbp)
  mov    -0x12c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x158(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x138(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x134(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movsd  0x8(%rax),%xmm0
  movsd  %xmm0,-0xe8(%rbp)
  mov    -0x130(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x158(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x138(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x134(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0xe0(%rbp)
  mov    -0x130(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x158(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x138(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x134(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movsd  0x8(%rax),%xmm0
  movsd  %xmm0,-0xd8(%rbp)
  mov    -0x13c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x158(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x124(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x134(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0xd0(%rbp)
  mov    -0x13c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x158(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x124(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x134(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movsd  0x8(%rax),%xmm0
  movsd  %xmm0,-0xc8(%rbp)
  mov    -0x13c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x158(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x128(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x134(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0xc0(%rbp)
  mov    -0x13c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x158(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x128(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x134(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movsd  0x8(%rax),%xmm0
  movsd  %xmm0,-0xb8(%rbp)
  mov    -0x13c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x158(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x138(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x11c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  mov    -0x13c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x158(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x138(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x11c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movsd  0x8(%rax),%xmm0
  movsd  %xmm0,-0xa8(%rbp)
  mov    -0x13c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x158(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x138(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x120(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0xa0(%rbp)
  mov    -0x13c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x158(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x138(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x120(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movsd  0x8(%rax),%xmm0
  movsd  %xmm0,-0x98(%rbp)
  mov    -0xf0(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movsd  %xmm0,-0x168(%rbp)
  mov    -0xe8(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movapd %xmm0,%xmm7
  mulsd  -0x168(%rbp),%xmm7
  movsd  %xmm7,-0x168(%rbp)
  mov    -0xe0(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movsd  %xmm0,-0x170(%rbp)
  mov    -0xd8(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  mulsd  -0x170(%rbp),%xmm0
  addsd  -0x168(%rbp),%xmm0
  movsd  %xmm0,-0x168(%rbp)
  mov    -0xd0(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movsd  %xmm0,-0x170(%rbp)
  mov    -0xc8(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  mulsd  -0x170(%rbp),%xmm0
  movapd %xmm0,%xmm4
  addsd  -0x168(%rbp),%xmm4
  movsd  %xmm4,-0x168(%rbp)
  mov    -0xc0(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movsd  %xmm0,-0x170(%rbp)
  mov    -0xb8(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  mulsd  -0x170(%rbp),%xmm0
  addsd  -0x168(%rbp),%xmm0
  movsd  %xmm0,-0x168(%rbp)
  mov    -0xb0(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movsd  %xmm0,-0x170(%rbp)
  mov    -0xa8(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  mulsd  -0x170(%rbp),%xmm0
  movapd %xmm0,%xmm6
  addsd  -0x168(%rbp),%xmm6
  movsd  %xmm6,-0x168(%rbp)
  mov    -0xa0(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movsd  %xmm0,-0x170(%rbp)
  mov    -0x98(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  mulsd  -0x170(%rbp),%xmm0
  addsd  -0x168(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  mov    -0xf0(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movsd  %xmm0,-0x168(%rbp)
  mov    -0xe8(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movapd %xmm0,%xmm3
  mulsd  -0x168(%rbp),%xmm3
  movsd  %xmm3,-0x168(%rbp)
  mov    -0xe0(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movsd  %xmm0,-0x170(%rbp)
  mov    -0xd8(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  mulsd  -0x170(%rbp),%xmm0
  addsd  -0x168(%rbp),%xmm0
  movsd  %xmm0,-0x168(%rbp)
  mov    -0xd0(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movsd  %xmm0,-0x170(%rbp)
  mov    -0xc8(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  mulsd  -0x170(%rbp),%xmm0
  movapd %xmm0,%xmm7
  addsd  -0x168(%rbp),%xmm7
  movsd  %xmm7,-0x168(%rbp)
  mov    -0xc0(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movsd  %xmm0,-0x170(%rbp)
  mov    -0xb8(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  mulsd  -0x170(%rbp),%xmm0
  addsd  -0x168(%rbp),%xmm0
  movsd  %xmm0,-0x168(%rbp)
  mov    -0xb0(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movsd  %xmm0,-0x170(%rbp)
  mov    -0xa8(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  mulsd  -0x170(%rbp),%xmm0
  movapd %xmm0,%xmm2
  addsd  -0x168(%rbp),%xmm2
  movsd  %xmm2,-0x168(%rbp)
  mov    -0xa0(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movsd  %xmm0,-0x170(%rbp)
  mov    -0x98(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  mulsd  -0x170(%rbp),%xmm0
  addsd  -0x168(%rbp),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  mov    -0xf0(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movsd  %xmm0,-0x168(%rbp)
  mov    -0xe0(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movapd %xmm0,%xmm4
  addsd  -0x168(%rbp),%xmm4
  movsd  %xmm4,-0x168(%rbp)
  mov    -0xd0(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  addsd  -0x168(%rbp),%xmm0
  movsd  %xmm0,-0x168(%rbp)
  mov    -0xc0(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movapd %xmm0,%xmm5
  addsd  -0x168(%rbp),%xmm5
  movsd  %xmm5,-0x168(%rbp)
  mov    -0xb0(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  addsd  -0x168(%rbp),%xmm0
  movsd  %xmm0,-0x168(%rbp)
  mov    -0xa0(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  addsd  -0x168(%rbp),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x50(%rbp),%xmm1
  movsd  -0x30(%rbp),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x48(%rbp),%xmm2
  movsd  -0x28(%rbp),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  movsd  -0x40(%rbp),%xmm2
  movsd  -0x20(%rbp),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x90(%rbp)
  movsd  -0x90(%rbp),%xmm0
  movq   D26(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x88(%rbp)
  pxor   %xmm0,%xmm0
  comisd -0x88(%rbp),%xmm0
  jb     L40
  mov    -0x13c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x158(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x138(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x134(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movsd  -0x100(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x13c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x158(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x138(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x134(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  add    $0x8,%rax
  movsd  -0xf8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  jmp    L2
L40:
  mov    -0x100(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movq   %xmm0,%rbx
  mov    -0x110(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movq   %rbx,%xmm6
  divsd  %xmm0,%xmm6
  movsd  %xmm6,-0x168(%rbp)
  movsd  -0x118(%rbp),%xmm0
  movq   D26(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  mulsd  -0x88(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <exp@plt>
  mulsd  -0x168(%rbp),%xmm0
  movsd  %xmm0,-0x80(%rbp)
  mov    $0x0,%eax
  call   <rng@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0x78(%rbp)
  movsd  -0x80(%rbp),%xmm0
  comisd -0x78(%rbp),%xmm0
  jb     L2
  mov    -0x13c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x158(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x138(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x134(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movsd  -0x100(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x13c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x158(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x138(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x134(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  add    $0x8,%rax
  movsd  -0xf8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
L2:
  movsd  -0x110(%rbp),%xmm0
  movsd  %xmm0,-0x100(%rbp)
  movsd  -0x68(%rbp),%xmm0
  movsd  %xmm0,-0xf8(%rbp)
  mov    -0x100(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movsd  %xmm0,-0x168(%rbp)
  mov    -0xf8(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movapd %xmm0,%xmm5
  mulsd  -0x168(%rbp),%xmm5
  movsd  %xmm5,-0x168(%rbp)
  mov    -0x110(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movsd  %xmm0,-0x170(%rbp)
  mov    -0x108(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movsd  -0x170(%rbp),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  -0x168(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x50(%rbp)
  mov    -0x100(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movsd  %xmm0,-0x168(%rbp)
  mov    -0xf8(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movapd %xmm0,%xmm6
  mulsd  -0x168(%rbp),%xmm6
  movsd  %xmm6,-0x168(%rbp)
  mov    -0x110(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movsd  %xmm0,-0x170(%rbp)
  mov    -0x108(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movsd  -0x170(%rbp),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  -0x168(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x48(%rbp)
  mov    -0x100(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movq   %xmm0,%rbx
  mov    -0x110(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movapd %xmm0,%xmm1
  movq   %rbx,%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x40(%rbp)
  mov    -0x12c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x158(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x138(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x134(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0xf0(%rbp)
  mov    -0x12c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x158(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x138(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x134(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movsd  0x8(%rax),%xmm0
  movsd  %xmm0,-0xe8(%rbp)
  mov    -0x130(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x158(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x138(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x134(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0xe0(%rbp)
  mov    -0x130(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x158(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x138(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x134(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movsd  0x8(%rax),%xmm0
  movsd  %xmm0,-0xd8(%rbp)
  mov    -0x13c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x158(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x124(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x134(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0xd0(%rbp)
  mov    -0x13c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x158(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x124(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x134(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movsd  0x8(%rax),%xmm0
  movsd  %xmm0,-0xc8(%rbp)
  mov    -0x13c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x158(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x128(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x134(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0xc0(%rbp)
  mov    -0x13c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x158(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x128(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x134(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movsd  0x8(%rax),%xmm0
  movsd  %xmm0,-0xb8(%rbp)
  mov    -0x13c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x158(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x138(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x11c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  mov    -0x13c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x158(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x138(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x11c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movsd  0x8(%rax),%xmm0
  movsd  %xmm0,-0xa8(%rbp)
  mov    -0x13c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x158(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x138(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x120(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0xa0(%rbp)
  mov    -0x13c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x158(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x138(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x120(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movsd  0x8(%rax),%xmm0
  movsd  %xmm0,-0x98(%rbp)
  mov    -0xf0(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movsd  %xmm0,-0x168(%rbp)
  mov    -0xe8(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movapd %xmm0,%xmm7
  mulsd  -0x168(%rbp),%xmm7
  movsd  %xmm7,-0x168(%rbp)
  mov    -0xe0(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movsd  %xmm0,-0x170(%rbp)
  mov    -0xd8(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  mulsd  -0x170(%rbp),%xmm0
  addsd  -0x168(%rbp),%xmm0
  movsd  %xmm0,-0x168(%rbp)
  mov    -0xd0(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movsd  %xmm0,-0x170(%rbp)
  mov    -0xb8(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  mulsd  -0x170(%rbp),%xmm0
  movapd %xmm0,%xmm2
  addsd  -0x168(%rbp),%xmm2
  movsd  %xmm2,-0x168(%rbp)
  mov    -0xc0(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movsd  %xmm0,-0x170(%rbp)
  mov    -0xb8(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  mulsd  -0x170(%rbp),%xmm0
  addsd  -0x168(%rbp),%xmm0
  movsd  %xmm0,-0x168(%rbp)
  mov    -0xb0(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movsd  %xmm0,-0x170(%rbp)
  mov    -0xa8(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  mulsd  -0x170(%rbp),%xmm0
  movapd %xmm0,%xmm3
  addsd  -0x168(%rbp),%xmm3
  movsd  %xmm3,-0x168(%rbp)
  mov    -0xa0(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movsd  %xmm0,-0x170(%rbp)
  mov    -0x98(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  mulsd  -0x170(%rbp),%xmm0
  addsd  -0x168(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  mov    -0xf0(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movsd  %xmm0,-0x168(%rbp)
  mov    -0xe8(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movapd %xmm0,%xmm5
  mulsd  -0x168(%rbp),%xmm5
  movsd  %xmm5,-0x168(%rbp)
  mov    -0xe0(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movsd  %xmm0,-0x170(%rbp)
  mov    -0xd8(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  mulsd  -0x170(%rbp),%xmm0
  addsd  -0x168(%rbp),%xmm0
  movsd  %xmm0,-0x168(%rbp)
  mov    -0xd0(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movsd  %xmm0,-0x170(%rbp)
  mov    -0xb8(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  mulsd  -0x170(%rbp),%xmm0
  movapd %xmm0,%xmm6
  addsd  -0x168(%rbp),%xmm6
  movsd  %xmm6,-0x168(%rbp)
  mov    -0xc0(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movsd  %xmm0,-0x170(%rbp)
  mov    -0xb8(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  mulsd  -0x170(%rbp),%xmm0
  addsd  -0x168(%rbp),%xmm0
  movsd  %xmm0,-0x168(%rbp)
  mov    -0xb0(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movsd  %xmm0,-0x170(%rbp)
  mov    -0xa8(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  mulsd  -0x170(%rbp),%xmm0
  movapd %xmm0,%xmm4
  addsd  -0x168(%rbp),%xmm4
  movsd  %xmm4,-0x168(%rbp)
  mov    -0xa0(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movsd  %xmm0,-0x170(%rbp)
  mov    -0x98(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  mulsd  -0x170(%rbp),%xmm0
  addsd  -0x168(%rbp),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  mov    -0xf0(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movsd  %xmm0,-0x168(%rbp)
  mov    -0xe0(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movapd %xmm0,%xmm7
  addsd  -0x168(%rbp),%xmm7
  movsd  %xmm7,-0x168(%rbp)
  mov    -0xd0(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  addsd  -0x168(%rbp),%xmm0
  movsd  %xmm0,-0x168(%rbp)
  mov    -0xc0(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movapd %xmm0,%xmm3
  addsd  -0x168(%rbp),%xmm3
  movsd  %xmm3,-0x168(%rbp)
  mov    -0xb0(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  addsd  -0x168(%rbp),%xmm0
  movsd  %xmm0,-0x168(%rbp)
  mov    -0xa0(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  addsd  -0x168(%rbp),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x50(%rbp),%xmm1
  movsd  -0x30(%rbp),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x48(%rbp),%xmm2
  movsd  -0x28(%rbp),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  movsd  -0x40(%rbp),%xmm2
  movsd  -0x20(%rbp),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x90(%rbp)
  movsd  -0x90(%rbp),%xmm0
  movq   D26(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x88(%rbp)
  pxor   %xmm0,%xmm0
  comisd -0x88(%rbp),%xmm0
  jb     L18
  mov    -0x13c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x158(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x138(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x134(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movsd  -0x100(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x13c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x158(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x138(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x134(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  add    $0x8,%rax
  movsd  -0xf8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  jmp    L137
L18:
  mov    -0x100(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movq   %xmm0,%rbx
  mov    -0x110(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movq   %rbx,%xmm2
  divsd  %xmm0,%xmm2
  movsd  %xmm2,-0x168(%rbp)
  movsd  -0x118(%rbp),%xmm0
  movq   D26(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  mulsd  -0x88(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <exp@plt>
  mulsd  -0x168(%rbp),%xmm0
  movsd  %xmm0,-0x80(%rbp)
  mov    $0x0,%eax
  call   <rng@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0x78(%rbp)
  movsd  -0x80(%rbp),%xmm0
  comisd -0x78(%rbp),%xmm0
  jb     L137
  mov    -0x13c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x158(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x138(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x134(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movsd  -0x100(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x13c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x158(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x138(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x134(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  add    $0x8,%rax
  movsd  -0xf8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
L137:
  addl   $0x1,-0x140(%rbp)
L31:
  cmpl   $0x17,-0x140(%rbp)
  jle    L148
  addl   $0x1,-0x144(%rbp)
L138:
  cmpl   $0x17,-0x144(%rbp)
  jle    L114
  addl   $0x1,-0x148(%rbp)
L4:
  cmpl   $0x17,-0x148(%rbp)
  jle    L44
  addl   $0x1,-0x14c(%rbp)
L88:
  cmpl   $0xf9,-0x14c(%rbp)
  jle    L14
  addl   $0x1,-0x150(%rbp)
L66:
  cmpl   $0xf9,-0x150(%rbp)
  jle    L61
  nop
  mov    -0x18(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L80
  call   <__stack_chk_fail@plt>
L80:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D44
type_guessed: f64
name: retrieve_data
arguments: data_label: D26
type_guessed: byte[8]

tool: D44: 1

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

assistant: ```c
void equilibration(double ****lattice, double temperature) {
  int eq, sw, sw1, sw2, sw3;
  int i, j, k, ip, im, jp, jm, kp, km;
  double theta, thetaPrime, phi, phiPrime;
  double spin1theta, spin1phi, spin2theta, spin2phi, spin3theta, spin3phi, spin4theta, spin4phi, spin5theta, spin5phi, spin6theta, spin6phi;
  double newSpin[2], currentSpin[2];
  double spinDiff[3], spinSum[3];
  double dotProduct;
  double deltaE;
  double prob;
  double randNum;
  double beta = 1.0 / temperature;
  for (eq = 0; eq < 250; eq++) {
    for (sw = 0; sw < 250; sw++) {
      for (sw1 = 0; sw1 < 24; sw1++) {
        for (sw2 = 0; sw2 < 24; sw2++) {
          for (sw3 = 0; sw3 < 24; sw3++) {
            i = sw1;
            j = sw2;
            k = sw3;
            ip = (i + 24 - 1) % 24;
            im = (i + 1) % 24;
            jp = (j + 24 - 1) % 24;
            jm = (j + 1) % 24;
            kp = (k + 24 - 1) % 24;
            km = (k + 1) % 24;
            currentSpin[0] = lattice[i][j][k][0];
            currentSpin[1] = lattice[i][j][k][1];
            newSpin[0] = rng_theta();
            newSpin[1] = rng_phi();
            theta = currentSpin[0];
            phi = currentSpin[1];
            thetaPrime = newSpin[0];
            phiPrime = phi;
            spinDiff[0] = sin(thetaPrime) * cos(phiPrime) - sin(theta) * cos(phi);
            spinDiff[1] = sin(thetaPrime) * sin(phiPrime) - sin(theta) * sin(phi);
            spinDiff[2] = cos(thetaPrime) - cos(theta);
            spin1theta = lattice[im][j][k][0];
            spin1phi = lattice[im][j][k][1];
            spin2theta = lattice[ip][j][k][0];
            spin2phi = lattice[ip][j][k][1];
            spin3theta = lattice[i][jm][k][0];
            spin3phi = lattice[i][jm][k][1];
            spin4theta = lattice[i][jp][k][0];
            spin4phi = lattice[i][jp][k][1];
            spin5theta = lattice[i][j][km][0];
            spin5phi = lattice[i][j][km][1];
            spin6theta = lattice[i][j][kp][0];
            spin6phi = lattice[i][j][kp][1];
            spinSum[0] = sin(spin1theta) * cos(spin1phi) + sin(spin2theta) * cos(spin2phi) + sin(spin3theta) * cos(spin3phi) + sin(spin4theta) * cos(spin4phi) + sin(spin5theta) * cos(spin5phi) + sin(spin6theta) * cos(spin6phi);
            spinSum[1] = sin(spin1theta) * sin(spin1phi) + sin(spin2theta) * sin(spin2phi) + sin(spin3theta) * sin(spin3phi) + sin(spin4theta) * sin(spin4phi) + sin(spin5theta) * sin(spin5phi) + sin(spin6theta) * sin(spin6phi);
            spinSum[2] = cos(spin1theta) + cos(spin2theta) + cos(spin3theta) + cos(spin4theta) + cos(spin5theta) + cos(spin6theta);
            dotProduct = spinDiff[0] * spinSum[0] + spinDiff[1] * spinSum[1] + spinDiff[2] * spinSum[2];
            deltaE = -1.0 * dotProduct;
            if (deltaE <= 0) {
              lattice[i][j][k][0] = thetaPrime;
              lattice[i][j][k][1] = phiPrime;
            } else {
              prob = (sin(thetaPrime) / sin(theta)) * exp(-beta * deltaE);
              randNum = rng();
              if (randNum <= prob) {
                lattice[i][j][k][0] = thetaPrime;
                lattice[i][j][k][1] = phiPrime;
              }
            }
            thetaPrime = theta;
            phiPrime = newSpin[1];
            spinDiff[0] = sin(thetaPrime) * cos(phiPrime) - sin(theta) * cos(phi);
            spinDiff[1] = sin(thetaPrime) * sin(phiPrime) - sin(theta) * sin(phi);
            spinDiff[2] = cos(thetaPrime) - cos(theta);
            spin1theta = lattice[im][j][k][0];
            spin1phi = lattice[im][j][k][1];
            spin2theta = lattice[ip][j][k][0];
            spin2phi = lattice[ip][j][k][1];
            spin3theta = lattice[i][jm][k][0];
            spin3phi = lattice[i][jm][k][1];
            spin4theta = lattice[i][jp][k][0];
            spin4phi = lattice[i][jp][k][1];
            spin5theta = lattice[i][j][km][0];
            spin5phi = lattice[i][j][km][1];
            spin6theta = lattice[i][j][kp][0];
            spin6phi = lattice[i][j][kp][1];
            spinSum[0] = sin(spin1theta) * cos(spin1phi) + sin(spin2theta) * cos(spin2phi) + sin(spin3theta) * cos(spin4phi) + sin(spin4theta) * cos(spin4phi) + sin(spin5theta) * cos(spin5phi) + sin(spin6theta) * cos(spin6phi);
            spinSum[1] = sin(spin1theta) * sin(spin1phi) + sin(spin2theta) * sin(spin2phi) + sin(spin3theta) * sin(spin4phi) + sin(spin4theta) * sin(spin4phi) + sin(spin5theta) * sin(spin5phi) + sin(spin6theta) * sin(spin6phi);
            spinSum[2] = cos(spin1theta) + cos(spin2theta) + cos(spin3theta) + cos(spin4theta) + cos(spin5theta) + cos(spin6theta);
            dotProduct = spinDiff[0] * spinSum[0] + spinDiff[1] * spinSum[1] + spinDiff[2] * spinSum[2];
            deltaE = -1.0 * dotProduct;
            if (deltaE <= 0) {
              lattice[i][j][k][0] = thetaPrime;
              lattice[i][j][k][1] = phiPrime;
            } else {
              prob = (sin(thetaPrime) / sin(theta)) * exp(-beta * deltaE);
              randNum = rng();
              if (randNum <= prob) {
                lattice[i][j][k][0] = thetaPrime;
                lattice[i][j][k][1] = phiPrime;
              }
            }
          }
        }
      }
    }
    if (0) {
      printf("\t\tEquilibration runs (0-%d): %d\n", 250, eq);
    }
  }
}
```