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

```asm
<measurement>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x208,%rsp
  movsd  D28(%rip),%xmm4
  mov    %rdi,-0x1d8(%rbp)
  mov    %rsi,-0x228(%rbp)
  divsd  %xmm0,%xmm4
  mov    %r8d,-0x220(%rbp)
  movsd  %xmm0,-0x230(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  movsd  %xmm4,-0x1c8(%rbp)
  cmp    %rax,%rsp
  je     L215
L113:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rax,%rsp
  jne    L113
L215:
  sub    $0x7d0,%rsp
  orq    $0x0,0x7c8(%rsp)
  mov    %rsp,%rax
  mov    %rsp,-0x1e8(%rbp)
  cmp    %rax,%rsp
  je     L74
L185:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rax,%rsp
  jne    L185
L74:
  sub    $0x7d0,%rsp
  orq    $0x0,0x7c8(%rsp)
  mov    %rsp,%rax
  mov    %rsp,-0x1f0(%rbp)
  cmp    %rax,%rsp
  je     L124
L325:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rax,%rsp
  jne    L325
L124:
  sub    $0x7d0,%rsp
  orq    $0x0,0x7c8(%rsp)
  mov    %rsp,%rax
  mov    %rsp,-0x1f8(%rbp)
  cmp    %rax,%rsp
  je     L105
L274:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rax,%rsp
  jne    L274
L105:
  sub    $0x7d0,%rsp
  orq    $0x0,0x7c8(%rsp)
  mov    %rsp,%rax
  mov    %rsp,-0x200(%rbp)
  cmp    %rax,%rsp
  je     L2
L304:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rax,%rsp
  jne    L304
L2:
  sub    $0x7d0,%rsp
  orq    $0x0,0x7c8(%rsp)
  mov    %rsp,%rax
  mov    %rsp,-0x208(%rbp)
  cmp    %rax,%rsp
  je     L15
L276:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rax,%rsp
  jne    L276
L15:
  sub    $0x7d0,%rsp
  orq    $0x0,0x7c8(%rsp)
  mov    %rsp,%rax
  mov    %rsp,-0x210(%rbp)
  cmp    %rax,%rsp
  je     L235
L241:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rax,%rsp
  jne    L241
L235:
  sub    $0x7d0,%rsp
  orq    $0x0,0x7c8(%rsp)
  mov    %rsp,-0x218(%rbp)
  lea    -0x48(%rbp),%r14
  lea    -0x50(%rbp),%r13
  movq   $0x0,-0x1e0(%rbp)
L328:
  movl   $0x1e,-0x21c(%rbp)
L186:
  movl   $0xfa,-0x1d0(%rbp)
  nopl   0x0(%rax,%rax,1)
L120:
  mov    -0x1d8(%rbp),%rax
  movl   $0x0,-0x1cc(%rbp)
  mov    %rax,-0xb8(%rbp)
L159:
  mov    -0x1cc(%rbp),%edx
  mov    -0x1d8(%rbp),%rcx
  mov    %r13,%r12
  mov    %r14,%r13
  movq   $0x0,-0x1c0(%rbp)
  lea    0x3(%rdx),%eax
  add    $0x1,%edx
  mov    %edx,-0x1cc(%rbp)
  and    $0x3,%eax
  and    $0x3,%edx
  lea    (%rcx,%rdx,8),%rdx
  lea    (%rcx,%rax,8),%rax
  mov    %rdx,-0x1a0(%rbp)
  mov    %rax,-0x1a8(%rbp)
L130:
  mov    -0x1c0(%rbp),%rdx
  xor    %r14d,%r14d
  lea    0x0(,%rdx,8),%rax
  mov    %rax,-0x58(%rbp)
  mov    %edx,%eax
  add    $0x1,%eax
  and    $0x3,%eax
  shl    $0x3,%rax
  mov    %rax,-0x190(%rbp)
  mov    %edx,%eax
  add    $0x3,%eax
  and    $0x3,%eax
  shl    $0x3,%rax
  mov    %rax,-0x198(%rbp)
L1:
  lea    0x0(,%r14,8),%rax
  mov    -0x58(%rbp),%rbx
  mov    %r12,%rsi
  mov    %r13,%rdi
  mov    %rax,-0xc8(%rbp)
  mov    -0xb8(%rbp),%rax
  mov    (%rax),%rax
  mov    (%rax,%rbx,1),%rax
  mov    (%rax,%r14,8),%rbx
  movsd  (%rbx),%xmm4
  movapd %xmm4,%xmm0
  movsd  %xmm4,-0xa8(%rbp)
  call   <sincos@plt>
  movsd  0x8(%rbx),%xmm2
  mov    %r12,%rsi
  mov    %r13,%rdi
  movsd  -0x50(%rbp),%xmm1
  movsd  -0x48(%rbp),%xmm7
  movapd %xmm2,%xmm0
  movsd  %xmm2,-0x188(%rbp)
  movsd  %xmm1,-0x70(%rbp)
  movsd  %xmm7,-0x60(%rbp)
  call   <sincos@plt>
  xor    %eax,%eax
  mov    -0x50(%rbp),%r15
  mov    -0x48(%rbp),%rbx
  call   <rng_theta@plt>
  xor    %eax,%eax
  call   <rng_phi@plt>
  movq   %rbx,%xmm6
  pxor   %xmm5,%xmm5
  mov    -0x1a0(%rbp),%rdx
  cvtsi2sd %eax,%xmm5
  mov    -0x58(%rbp),%rbx
  movsd  -0x60(%rbp),%xmm7
  mov    %r12,%rsi
  mov    (%rdx),%rax
  movsd  -0x70(%rbp),%xmm1
  mov    %r13,%rdi
  mulsd  %xmm7,%xmm6
  mov    (%rax,%rbx,1),%rax
  subsd  %xmm1,%xmm1
  movsd  %xmm5,-0xa0(%rbp)
  movq   %r15,%xmm5
  mulsd  %xmm7,%xmm5
  mov    (%rax,%r14,8),%r15
  movsd  %xmm1,-0x98(%rbp)
  movsd  (%r15),%xmm0
  movsd  %xmm6,-0x90(%rbp)
  mov    %r15,-0x70(%rbp)
  movsd  %xmm5,-0x88(%rbp)
  call   <sincos@plt>
  movsd  -0x50(%rbp),%xmm4
  mov    %r12,%rsi
  mov    %r13,%rdi
  movsd  -0x48(%rbp),%xmm8
  movsd  0x8(%r15),%xmm0
  movsd  %xmm4,-0x120(%rbp)
  movsd  %xmm8,-0x180(%rbp)
  call   <sincos@plt>
  movsd  -0x48(%rbp),%xmm7
  mov    %r12,%rsi
  mov    %r13,%rdi
  mov    -0x1a8(%rbp),%rdx
  movsd  -0x50(%rbp),%xmm12
  mov    %rbx,-0x58(%rbp)
  movsd  %xmm7,-0x118(%rbp)
  movsd  %xmm12,-0x178(%rbp)
  mov    (%rdx),%rax
  mov    (%rax,%rbx,1),%rax
  mov    (%rax,%r14,8),%r15
  movsd  (%r15),%xmm0
  mov    %r15,-0x78(%rbp)
  call   <sincos@plt>
  movsd  -0x50(%rbp),%xmm0
  mov    %r12,%rsi
  mov    %r13,%rdi
  movsd  -0x48(%rbp),%xmm7
  movsd  %xmm0,-0x110(%rbp)
  movsd  0x8(%r15),%xmm0
  movsd  %xmm7,-0x170(%rbp)
  call   <sincos@plt>
  movsd  -0x50(%rbp),%xmm1
  mov    %r12,%rsi
  mov    %r13,%rdi
  mov    -0xb8(%rbp),%rcx
  movsd  -0x48(%rbp),%xmm14
  movsd  %xmm1,-0x168(%rbp)
  movsd  %xmm14,-0x128(%rbp)
  mov    (%rcx),%rbx
  mov    -0x190(%rbp),%rcx
  mov    (%rbx,%rcx,1),%rax
  mov    (%rax,%r14,8),%r15
  movsd  (%r15),%xmm0
  mov    %r15,-0xc0(%rbp)
  call   <sincos@plt>
  movsd  -0x48(%rbp),%xmm6
  mov    %r12,%rsi
  mov    %r13,%rdi
  movsd  -0x50(%rbp),%xmm15
  movsd  0x8(%r15),%xmm0
  movsd  %xmm6,-0x160(%rbp)
  movsd  %xmm15,-0xf8(%rbp)
  call   <sincos@plt>
  mov    -0x198(%rbp),%rcx
  mov    %r12,%rsi
  mov    %r13,%rdi
  movsd  -0x48(%rbp),%xmm13
  movsd  -0x50(%rbp),%xmm11
  mov    (%rbx,%rcx,1),%rax
  movsd  %xmm13,-0xe0(%rbp)
  movsd  %xmm11,-0x158(%rbp)
  mov    (%rax,%r14,8),%r15
  movsd  (%r15),%xmm0
  call   <sincos@plt>
  movsd  -0x48(%rbp),%xmm5
  mov    %r12,%rsi
  mov    %r13,%rdi
  movsd  -0x50(%rbp),%xmm12
  movsd  0x8(%r15),%xmm0
  movsd  %xmm5,-0x150(%rbp)
  movsd  %xmm12,-0xd8(%rbp)
  call   <sincos@plt>
  mov    -0x58(%rbp),%rax
  mov    %r12,%rsi
  mov    %r13,%rdi
  movsd  -0x50(%rbp),%xmm10
  movsd  -0x48(%rbp),%xmm9
  mov    (%rbx,%rax,1),%rbx
  lea    0x1(%r14),%eax
  movsd  %xmm10,-0x148(%rbp)
  mov    %eax,%ecx
  movsd  %xmm9,-0x100(%rbp)
  and    $0x3,%ecx
  mov    (%rbx,%rcx,8),%rax
  mov    %rcx,-0x1b0(%rbp)
  movsd  (%rax),%xmm0
  mov    %rax,-0x80(%rbp)
  call   <sincos@plt>
  mov    -0x80(%rbp),%rax
  mov    %r12,%rsi
  mov    %r13,%rdi
  movsd  -0x50(%rbp),%xmm8
  movsd  -0x48(%rbp),%xmm4
  movsd  0x8(%rax),%xmm0
  movsd  %xmm8,-0xf0(%rbp)
  movsd  %xmm4,-0x140(%rbp)
  call   <sincos@plt>
  lea    0x3(%r14),%eax
  mov    %r12,%rsi
  mov    %r13,%rdi
  mov    %eax,%edx
  mov    %rbx,-0xb0(%rbp)
  movsd  -0x50(%rbp),%xmm9
  and    $0x3,%edx
  movsd  -0x48(%rbp),%xmm11
  mov    (%rbx,%rdx,8),%rbx
  mov    %rdx,-0x1b8(%rbp)
  movsd  %xmm9,-0x138(%rbp)
  movsd  %xmm11,-0xe8(%rbp)
  movsd  (%rbx),%xmm0
  call   <sincos@plt>
  movsd  -0x48(%rbp),%xmm3
  mov    %r12,%rsi
  mov    %r13,%rdi
  movsd  -0x50(%rbp),%xmm10
  movsd  0x8(%rbx),%xmm0
  movsd  %xmm3,-0x130(%rbp)
  movsd  %xmm10,-0x108(%rbp)
  call   <sincos@plt>
  movsd  -0x170(%rbp),%xmm7
  movsd  -0x178(%rbp),%xmm12
  movsd  -0x180(%rbp),%xmm8
  movsd  -0x50(%rbp),%xmm13
  movsd  -0x168(%rbp),%xmm1
  movapd %xmm12,%xmm0
  movsd  -0x160(%rbp),%xmm6
  mulsd  %xmm8,%xmm0
  movsd  -0x158(%rbp),%xmm11
  movsd  -0x150(%rbp),%xmm5
  mulsd  %xmm7,%xmm1
  movsd  -0x148(%rbp),%xmm10
  movsd  -0x140(%rbp),%xmm4
  mulsd  %xmm6,%xmm11
  movsd  -0x130(%rbp),%xmm3
  movsd  -0x138(%rbp),%xmm9
  mulsd  %xmm5,%xmm10
  movsd  -0x88(%rbp),%xmm2
  mulsd  %xmm4,%xmm9
  mulsd  %xmm3,%xmm13
  addsd  %xmm1,%xmm0
  movapd %xmm2,%xmm1
  subsd  %xmm2,%xmm1
  mulsd  -0x128(%rbp),%xmm7
  movsd  -0x120(%rbp),%xmm2
  mulsd  -0xe0(%rbp),%xmm6
  addsd  -0x110(%rbp),%xmm2
  addsd  %xmm11,%xmm0
  mulsd  -0x100(%rbp),%xmm5
  mulsd  -0xe8(%rbp),%xmm4
  mulsd  -0x48(%rbp),%xmm3
  addsd  %xmm10,%xmm0
  addsd  %xmm9,%xmm0
  addsd  %xmm13,%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x118(%rbp),%xmm1
  mulsd  %xmm8,%xmm1
  addsd  %xmm7,%xmm1
  addsd  %xmm6,%xmm1
  movsd  -0x90(%rbp),%xmm6
  addsd  %xmm5,%xmm1
  movsd  D28(%rip),%xmm5
  addsd  -0xd0(%rbp),%xmm5
  addsd  %xmm4,%xmm1
  addsd  %xmm3,%xmm1
  movapd %xmm6,%xmm3
  subsd  %xmm6,%xmm3
  mulsd  %xmm3,%xmm1
  pxor   %xmm3,%xmm3
  addsd  %xmm1,%xmm0
  movsd  -0xf8(%rbp),%xmm1
  movsd  %xmm5,-0xf8(%rbp)
  addsd  %xmm2,%xmm1
  addsd  -0xd8(%rbp),%xmm1
  movsd  -0x188(%rbp),%xmm2
  addsd  -0xf0(%rbp),%xmm1
  addsd  -0x108(%rbp),%xmm1
  mulsd  -0x98(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  comisd %xmm3,%xmm0
  jb     L217
  mov    -0xb0(%rbp),%rax
  movsd  D28(%rip),%xmm6
  addsd  -0x68(%rbp),%xmm6
  movsd  -0xa8(%rbp),%xmm7
  mov    (%rax,%r14,8),%rax
  movsd  %xmm6,-0x68(%rbp)
  movsd  %xmm7,(%rax)
  movsd  %xmm2,0x8(%rax)
L310:
  movsd  -0xa0(%rbp),%xmm0
  mov    %r12,%rsi
  mov    %r13,%rdi
  call   <sincos@plt>
  mov    -0x70(%rbp),%rax
  mov    %r12,%rsi
  mov    %r13,%rdi
  movsd  -0x48(%rbp),%xmm2
  movsd  -0x50(%rbp),%xmm1
  movsd  (%rax),%xmm0
  movsd  %xmm2,-0x150(%rbp)
  movsd  %xmm1,-0x158(%rbp)
  call   <sincos@plt>
  mov    -0x70(%rbp),%rax
  mov    %r12,%rsi
  mov    %r13,%rdi
  movsd  -0x50(%rbp),%xmm1
  movsd  -0x48(%rbp),%xmm9
  movsd  0x8(%rax),%xmm0
  movsd  %xmm1,-0xd0(%rbp)
  movsd  %xmm9,-0x148(%rbp)
  call   <sincos@plt>
  mov    -0x78(%rbp),%rax
  mov    %r12,%rsi
  mov    %r13,%rdi
  movsd  -0x50(%rbp),%xmm12
  movsd  -0x48(%rbp),%xmm3
  movsd  (%rax),%xmm0
  movsd  %xmm12,-0x140(%rbp)
  movsd  %xmm3,-0x70(%rbp)
  call   <sincos@plt>
  mov    -0x78(%rbp),%rax
  mov    %r12,%rsi
  mov    %r13,%rdi
  movsd  -0x48(%rbp),%xmm8
  movsd  -0x50(%rbp),%xmm4
  movsd  0x8(%rax),%xmm0
  movsd  %xmm8,-0x138(%rbp)
  movsd  %xmm4,-0xf0(%rbp)
  call   <sincos@plt>
  movsd  -0x48(%rbp),%xmm2
  mov    %r12,%rsi
  mov    %r13,%rdi
  mov    -0xc0(%rbp),%rax
  movsd  -0x50(%rbp),%xmm10
  movsd  %xmm2,-0xd8(%rbp)
  movsd  %xmm10,-0x130(%rbp)
  movsd  (%rax),%xmm0
  call   <sincos@plt>
  movsd  -0x50(%rbp),%xmm7
  mov    %r12,%rsi
  mov    %r13,%rdi
  movsd  (%r15),%xmm0
  movsd  %xmm7,-0xe0(%rbp)
  movsd  -0x48(%rbp),%xmm7
  movsd  %xmm7,-0x128(%rbp)
  call   <sincos@plt>
  movsd  -0x48(%rbp),%xmm4
  mov    %r12,%rsi
  mov    %r13,%rdi
  movsd  -0x50(%rbp),%xmm5
  movsd  0x8(%r15),%xmm0
  movsd  %xmm4,-0x120(%rbp)
  movsd  %xmm5,-0xc0(%rbp)
  call   <sincos@plt>
  mov    -0x80(%rbp),%r15
  mov    %r12,%rsi
  mov    %r13,%rdi
  movsd  -0x50(%rbp),%xmm11
  movsd  -0x48(%rbp),%xmm6
  movsd  (%r15),%xmm0
  movsd  %xmm11,-0x118(%rbp)
  movsd  %xmm6,-0x110(%rbp)
  call   <sincos@plt>
  movsd  -0x50(%rbp),%xmm0
  mov    %r12,%rsi
  mov    %r13,%rdi
  movsd  -0x48(%rbp),%xmm5
  movsd  %xmm0,-0x80(%rbp)
  movsd  0x8(%r15),%xmm0
  movsd  %xmm5,-0x108(%rbp)
  call   <sincos@plt>
  movsd  -0x48(%rbp),%xmm5
  mov    %r12,%rsi
  mov    %r13,%rdi
  movsd  (%rbx),%xmm0
  mov    -0x50(%rbp),%r15
  movsd  %xmm5,-0xe8(%rbp)
  call   <sincos@plt>
  movsd  -0x48(%rbp),%xmm3
  mov    %r12,%rsi
  mov    %r13,%rdi
  movsd  -0x50(%rbp),%xmm14
  movsd  0x8(%rbx),%xmm0
  movsd  %xmm3,-0x100(%rbp)
  movsd  %xmm14,-0x78(%rbp)
  call   <sincos@plt>
  movsd  -0x128(%rbp),%xmm7
  movsd  -0x140(%rbp),%xmm12
  movsd  -0x148(%rbp),%xmm9
  movsd  -0x70(%rbp),%xmm6
  movsd  -0x138(%rbp),%xmm8
  movapd %xmm12,%xmm0
  movsd  -0x130(%rbp),%xmm10
  mulsd  %xmm9,%xmm0
  movsd  -0x120(%rbp),%xmm4
  movsd  -0x118(%rbp),%xmm11
  mulsd  %xmm8,%xmm10
  movsd  -0x108(%rbp),%xmm5
  movsd  -0x100(%rbp),%xmm3
  movsd  -0x60(%rbp),%xmm2
  mulsd  %xmm9,%xmm6
  movsd  -0x158(%rbp),%xmm1
  mulsd  -0xd8(%rbp),%xmm8
  mulsd  %xmm2,%xmm1
  subsd  -0x88(%rbp),%xmm1
  addsd  %xmm10,%xmm0
  movapd %xmm7,%xmm10
  mulsd  %xmm11,%xmm10
  mulsd  %xmm4,%xmm11
  addsd  %xmm10,%xmm0
  movq   %r15,%xmm10
  mulsd  %xmm5,%xmm10
  addsd  %xmm11,%xmm0
  addsd  %xmm10,%xmm0
  movsd  -0x50(%rbp),%xmm10
  mulsd  %xmm3,%xmm10
  mulsd  -0x48(%rbp),%xmm3
  addsd  %xmm10,%xmm0
  mulsd  %xmm1,%xmm0
  movapd %xmm6,%xmm1
  movsd  -0x110(%rbp),%xmm6
  addsd  %xmm8,%xmm1
  mulsd  %xmm6,%xmm7
  mulsd  %xmm6,%xmm4
  addsd  %xmm7,%xmm1
  addsd  %xmm4,%xmm1
  movsd  -0xe8(%rbp),%xmm4
  mulsd  %xmm5,%xmm4
  movsd  D28(%rip),%xmm5
  addsd  -0xf8(%rbp),%xmm5
  addsd  %xmm4,%xmm1
  pxor   %xmm4,%xmm4
  addsd  %xmm3,%xmm1
  movapd %xmm2,%xmm3
  movsd  -0x150(%rbp),%xmm2
  mulsd  %xmm3,%xmm2
  subsd  -0x90(%rbp),%xmm2
  mulsd  %xmm2,%xmm1
  addsd  %xmm1,%xmm0
  movsd  -0xd0(%rbp),%xmm1
  addsd  -0xf0(%rbp),%xmm1
  movsd  %xmm5,-0xd0(%rbp)
  addsd  -0xe0(%rbp),%xmm1
  addsd  -0xc0(%rbp),%xmm1
  addsd  -0x80(%rbp),%xmm1
  addsd  -0x78(%rbp),%xmm1
  mulsd  -0x98(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  comisd %xmm4,%xmm0
  jb     L3
  mov    -0xb0(%rbp),%rax
  mov    -0xc8(%rbp),%rcx
  movsd  D28(%rip),%xmm3
  addsd  -0x68(%rbp),%xmm3
  mov    (%rax,%rcx,1),%rax
  movsd  -0xa8(%rbp),%xmm5
  movsd  -0xa0(%rbp),%xmm6
  movsd  %xmm5,(%rax)
  movsd  %xmm6,0x8(%rax)
  movsd  %xmm3,-0x68(%rbp)
L61:
  add    $0x1,%r14
  cmp    $0x4,%r14
  jne    L1
  addq   $0x1,-0x1c0(%rbp)
  mov    -0x1c0(%rbp),%rax
  cmp    $0x4,%rax
  jne    L130
  addq   $0x8,-0xb8(%rbp)
  cmpl   $0x4,-0x1cc(%rbp)
  mov    %r13,%r14
  mov    %r12,%r13
  jne    L159
  subl   $0x1,-0x1d0(%rbp)
  jne    L120
  subl   $0x1,-0x21c(%rbp)
  jne    L186
  pxor   %xmm4,%xmm4
  mov    $0x1,%edx
  movapd %xmm4,%xmm2
  movapd %xmm4,%xmm3
  movapd %xmm4,%xmm1
L144:
  mov    -0x1d8(%rbp),%rdi
  mov    %rdx,%rax
  and    $0x3,%eax
  mov    (%rdi,%rax,8),%r10
  lea    0x2(%rdx),%eax
  mov    -0x8(%rdi,%rdx,8),%rcx
  and    $0x3,%eax
  mov    (%rdi,%rax,8),%r9
  mov    $0x1,%eax
L281:
  mov    -0x8(%r9,%rax,8),%rdi
  mov    %rax,%rsi
  mov    -0x8(%rcx,%rax,8),%r12
  mov    $0x1,%ebx
  and    $0x3,%esi
  mov    -0x8(%r10,%rax,8),%r15
  mov    %rdi,-0x58(%rbp)
  mov    (%rcx,%rsi,8),%rdi
  lea    0x2(%rax),%esi
  and    $0x3,%esi
  mov    %rdi,-0x60(%rbp)
  mov    (%rcx,%rsi,8),%rdi
  mov    %rdi,-0x70(%rbp)
L272:
  mov    -0x8(%r12,%rbx,8),%r8
  mov    %r13,%rsi
  mov    %r14,%rdi
  mov    %rdx,-0x188(%rbp)
  mov    %r9,-0x160(%rbp)
  movsd  (%r8),%xmm0
  mov    %r10,-0x158(%rbp)
  mov    %rcx,-0x150(%rbp)
  movsd  %xmm1,-0x170(%rbp)
  movsd  %xmm2,-0x180(%rbp)
  movsd  %xmm3,-0x178(%rbp)
  mov    %rax,-0x190(%rbp)
  movsd  %xmm4,-0x168(%rbp)
  mov    %r8,-0x80(%rbp)
  call   <sincos@plt>
  mov    -0x80(%rbp),%r8
  mov    %r13,%rsi
  mov    %r14,%rdi
  movsd  -0x50(%rbp),%xmm9
  movsd  -0x48(%rbp),%xmm5
  movsd  0x8(%r8),%xmm0
  movsd  %xmm9,-0x148(%rbp)
  movsd  %xmm5,-0x78(%rbp)
  call   <sincos@plt>
  movsd  -0x78(%rbp),%xmm5
  mov    %r13,%rsi
  mov    %r14,%rdi
  movsd  -0x50(%rbp),%xmm10
  mov    -0x8(%r15,%rbx,8),%r8
  mulsd  %xmm5,%xmm10
  movsd  (%r8),%xmm0
  mov    %r8,-0x78(%rbp)
  mulsd  -0x48(%rbp),%xmm5
  movsd  %xmm10,-0x140(%rbp)
  movsd  %xmm5,-0x138(%rbp)
  call   <sincos@plt>
  movsd  -0x50(%rbp),%xmm0
  mov    %r13,%rsi
  mov    %r14,%rdi
  mov    -0x78(%rbp),%r8
  movsd  -0x48(%rbp),%xmm15
  movsd  %xmm0,-0xb0(%rbp)
  movsd  %xmm15,-0x130(%rbp)
  movsd  0x8(%r8),%xmm0
  call   <sincos@plt>
  mov    -0x58(%rbp),%rax
  mov    %r13,%rsi
  mov    %r14,%rdi
  movsd  -0x50(%rbp),%xmm8
  movsd  -0x48(%rbp),%xmm4
  mov    -0x8(%rax,%rbx,8),%r8
  movsd  %xmm8,-0x128(%rbp)
  movsd  (%r8),%xmm0
  movsd  %xmm4,-0x88(%rbp)
  mov    %r8,-0x78(%rbp)
  call   <sincos@plt>
  mov    -0x78(%rbp),%r8
  mov    %r13,%rsi
  mov    %r14,%rdi
  movsd  -0x48(%rbp),%xmm14
  movsd  -0x50(%rbp),%xmm6
  movsd  0x8(%r8),%xmm0
  movsd  %xmm14,-0x120(%rbp)
  movsd  %xmm6,-0xe8(%rbp)
  call   <sincos@plt>
  mov    -0x60(%rbp),%rax
  mov    %r13,%rsi
  mov    %r14,%rdi
  movsd  -0x50(%rbp),%xmm6
  mov    -0x8(%rax,%rbx,8),%r8
  movsd  %xmm6,-0x118(%rbp)
  movsd  -0x48(%rbp),%xmm6
  movsd  (%r8),%xmm0
  mov    %r8,-0x80(%rbp)
  movsd  %xmm6,-0x78(%rbp)
  call   <sincos@plt>
  mov    -0x80(%rbp),%r8
  mov    %r13,%rsi
  mov    %r14,%rdi
  movsd  -0x48(%rbp),%xmm13
  movsd  -0x50(%rbp),%xmm3
  movsd  0x8(%r8),%xmm0
  movsd  %xmm13,-0x110(%rbp)
  movsd  %xmm3,-0xe0(%rbp)
  call   <sincos@plt>
  mov    -0x70(%rbp),%rax
  mov    %r13,%rsi
  mov    %r14,%rdi
  movsd  -0x50(%rbp),%xmm3
  movsd  -0x48(%rbp),%xmm5
  mov    -0x8(%rax,%rbx,8),%r8
  movsd  %xmm3,-0xa0(%rbp)
  movsd  (%r8),%xmm0
  movsd  %xmm5,-0xa8(%rbp)
  mov    %r8,-0x80(%rbp)
  call   <sincos@plt>
  mov    -0x80(%rbp),%r8
  mov    %r13,%rsi
  mov    %r14,%rdi
  movsd  -0x48(%rbp),%xmm12
  movsd  -0x50(%rbp),%xmm7
  movsd  0x8(%r8),%xmm0
  movsd  %xmm12,-0x108(%rbp)
  movsd  %xmm7,-0xc0(%rbp)
  call   <sincos@plt>
  mov    %rbx,%rsi
  movsd  -0x50(%rbp),%xmm6
  mov    %r14,%rdi
  and    $0x3,%esi
  movsd  -0x48(%rbp),%xmm7
  mov    (%r12,%rsi,8),%r8
  mov    %r13,%rsi
  movsd  %xmm6,-0xc8(%rbp)
  movsd  %xmm7,-0xd8(%rbp)
  movsd  (%r8),%xmm0
  mov    %r8,-0x90(%rbp)
  call   <sincos@plt>
  movsd  -0x50(%rbp),%xmm2
  mov    %r13,%rsi
  mov    %r14,%rdi
  mov    -0x90(%rbp),%r8
  movsd  -0x48(%rbp),%xmm11
  movsd  %xmm2,-0x80(%rbp)
  movsd  %xmm11,-0x100(%rbp)
  movsd  0x8(%r8),%xmm0
  call   <sincos@plt>
  lea    0x2(%rbx),%esi
  movsd  -0x50(%rbp),%xmm2
  mov    %r14,%rdi
  and    $0x3,%esi
  movsd  -0x48(%rbp),%xmm1
  add    $0x1,%rbx
  mov    (%r12,%rsi,8),%r8
  mov    %r13,%rsi
  movsd  %xmm2,-0x90(%rbp)
  movsd  %xmm1,-0x98(%rbp)
  movsd  (%r8),%xmm0
  mov    %r8,-0xf8(%rbp)
  call   <sincos@plt>
  movsd  -0x48(%rbp),%xmm7
  mov    %r13,%rsi
  mov    %r14,%rdi
  mov    -0xf8(%rbp),%r8
  movsd  -0x50(%rbp),%xmm15
  movsd  %xmm7,-0xf0(%rbp)
  movsd  %xmm15,-0xb8(%rbp)
  movsd  0x8(%r8),%xmm0
  call   <sincos@plt>
  movsd  -0x118(%rbp),%xmm6
  movsd  -0x130(%rbp),%xmm15
  cmp    $0x5,%rbx
  movsd  -0x120(%rbp),%xmm14
  movsd  -0xa0(%rbp),%xmm3
  movsd  -0x128(%rbp),%xmm8
  mov    -0x150(%rbp),%rcx
  movsd  -0x110(%rbp),%xmm13
  mulsd  %xmm14,%xmm6
  movsd  -0x108(%rbp),%xmm12
  mulsd  %xmm15,%xmm8
  movsd  -0xf0(%rbp),%xmm7
  movsd  -0x100(%rbp),%xmm11
  mulsd  %xmm13,%xmm3
  movsd  -0x88(%rbp),%xmm4
  movsd  -0xa8(%rbp),%xmm5
  movsd  -0x98(%rbp),%xmm1
  movsd  -0x180(%rbp),%xmm2
  movsd  -0x140(%rbp),%xmm10
  mulsd  %xmm15,%xmm4
  movsd  -0x148(%rbp),%xmm9
  mulsd  %xmm13,%xmm5
  addsd  %xmm8,%xmm6
  movsd  -0x78(%rbp),%xmm8
  mulsd  %xmm11,%xmm1
  addsd  %xmm9,%xmm2
  movapd %xmm3,%xmm0
  movsd  -0x178(%rbp),%xmm3
  mulsd  %xmm14,%xmm8
  addsd  %xmm6,%xmm0
  movsd  -0xc8(%rbp),%xmm6
  mulsd  %xmm12,%xmm6
  addsd  %xmm6,%xmm0
  movsd  -0x90(%rbp),%xmm6
  mulsd  %xmm11,%xmm6
  addsd  %xmm6,%xmm0
  movsd  -0x50(%rbp),%xmm6
  mulsd  %xmm7,%xmm6
  mulsd  -0x48(%rbp),%xmm7
  addsd  %xmm0,%xmm6
  movapd %xmm4,%xmm0
  movsd  -0x168(%rbp),%xmm4
  addsd  %xmm8,%xmm0
  movsd  -0xd8(%rbp),%xmm8
  mulsd  %xmm12,%xmm8
  addsd  %xmm5,%xmm0
  movsd  -0x138(%rbp),%xmm5
  mulsd  %xmm10,%xmm6
  addsd  %xmm5,%xmm3
  addsd  %xmm8,%xmm0
  addsd  %xmm1,%xmm0
  movsd  -0x170(%rbp),%xmm1
  addsd  %xmm10,%xmm1
  addsd  %xmm7,%xmm0
  mulsd  %xmm5,%xmm0
  addsd  %xmm0,%xmm6
  movsd  -0xb0(%rbp),%xmm0
  addsd  -0xe8(%rbp),%xmm0
  addsd  -0xe0(%rbp),%xmm0
  addsd  -0xc0(%rbp),%xmm0
  addsd  -0x80(%rbp),%xmm0
  addsd  -0xb8(%rbp),%xmm0
  mov    -0x158(%rbp),%r10
  mov    -0x160(%rbp),%r9
  mov    -0x188(%rbp),%rdx
  mov    -0x190(%rbp),%rax
  mulsd  %xmm9,%xmm0
  addsd  %xmm6,%xmm0
  subsd  %xmm0,%xmm4
  jne    L272
  add    $0x1,%rax
  cmp    $0x5,%rax
  jne    L281
  add    $0x1,%rdx
  cmp    $0x5,%rdx
  jne    L144
  mulsd  D96(%rip),%xmm4
  mov    -0x1e0(%rbp),%rax
  mov    -0x210(%rbp),%rcx
  mulsd  D40(%rip),%xmm1
  mulsd  D40(%rip),%xmm3
  mulsd  D40(%rip),%xmm2
  movsd  %xmm4,(%rcx,%rax,1)
  mulsd  %xmm4,%xmm4
  mov    -0x218(%rbp),%rcx
  movsd  %xmm4,(%rcx,%rax,1)
  mov    -0x1e8(%rbp),%rcx
  pxor   %xmm4,%xmm4
  movsd  %xmm1,(%rcx,%rax,1)
  mov    -0x1f0(%rbp),%rcx
  mulsd  %xmm1,%xmm1
  movsd  %xmm3,(%rcx,%rax,1)
  mulsd  %xmm3,%xmm3
  mov    -0x1f8(%rbp),%rcx
  movsd  %xmm2,(%rcx,%rax,1)
  mulsd  %xmm2,%xmm2
  addsd  %xmm3,%xmm1
  movapd %xmm1,%xmm0
  addsd  %xmm2,%xmm0
  ucomisd %xmm0,%xmm4
  ja     L214
  sqrtsd %xmm0,%xmm0
L287:
  mov    -0x1e0(%rbp),%rax
  mov    -0x200(%rbp),%rcx
  movsd  %xmm0,(%rcx,%rax,1)
  mulsd  %xmm0,%xmm0
  mov    -0x208(%rbp),%rcx
  movsd  %xmm0,(%rcx,%rax,1)
  add    $0x8,%rax
  mov    %rax,-0x1e0(%rbp)
  cmp    $0x7d0,%rax
  jne    L328
  pxor   %xmm1,%xmm1
  xor    %r12d,%r12d
  lea    D73(%rip),%r13
  movapd %xmm1,%xmm5
  movapd %xmm1,%xmm6
  movapd %xmm1,%xmm8
  movapd %xmm1,%xmm3
  movapd %xmm1,%xmm2
  movapd %xmm1,%xmm0
  lea    D80(%rip),%rbx
L82:
  mov    %r13,%rdi
  mov    $0x1,%eax
  movsd  %xmm1,-0x90(%rbp)
  movsd  %xmm5,-0x88(%rbp)
  movsd  %xmm6,-0x80(%rbp)
  movsd  %xmm8,-0x78(%rbp)
  movsd  %xmm3,-0x70(%rbp)
  movsd  %xmm2,-0x60(%rbp)
  movsd  %xmm0,-0x58(%rbp)
  call   <printf@plt>
  mov    -0x210(%rbp),%rax
  movsd  -0x58(%rbp),%xmm0
  mov    %rbx,%rdi
  addsd  (%rax,%r12,1),%xmm0
  mov    $0x1,%eax
  movsd  %xmm0,-0x58(%rbp)
  call   <printf@plt>
  movsd  -0x60(%rbp),%xmm2
  movsd  -0x70(%rbp),%xmm3
  mov    -0x218(%rbp),%rax
  movsd  -0x78(%rbp),%xmm8
  movsd  -0x80(%rbp),%xmm6
  movsd  -0x88(%rbp),%xmm5
  addsd  (%rax,%r12,1),%xmm2
  mov    -0x200(%rbp),%rax
  movsd  -0x90(%rbp),%xmm1
  movsd  -0x58(%rbp),%xmm0
  addsd  (%rax,%r12,1),%xmm3
  mov    -0x208(%rbp),%rax
  addsd  (%rax,%r12,1),%xmm8
  mov    -0x1e8(%rbp),%rax
  addsd  (%rax,%r12,1),%xmm6
  mov    -0x1f0(%rbp),%rax
  addsd  (%rax,%r12,1),%xmm5
  mov    -0x1f8(%rbp),%rax
  addsd  (%rax,%r12,1),%xmm1
  add    $0x8,%r12
  cmp    $0x7d0,%r12
  jne    L82
  movsd  D205(%rip),%xmm4
  movslq -0x220(%rbp),%rax
  movapd %xmm6,%xmm7
  lea    D1(%rip),%rdi
  mov    -0x228(%rbp),%rcx
  mulsd  %xmm6,%xmm7
  movsd  -0x230(%rbp),%xmm15
  divsd  %xmm4,%xmm3
  lea    (%rax,%rax,2),%rdx
  lea    (%rax,%rdx,4),%rax
  lea    (%rcx,%rax,8),%rbx
  mov    $0x1,%eax
  movsd  %xmm15,(%rbx)
  divsd  %xmm4,%xmm8
  movsd  %xmm3,0x20(%rbx)
  divsd  %xmm4,%xmm0
  movsd  %xmm8,0x28(%rbx)
  movapd %xmm3,%xmm8
  mulsd  %xmm3,%xmm8
  mulsd  D40(%rip),%xmm3
  movsd  %xmm8,0x30(%rbx)
  movsd  %xmm3,0x40(%rbx)
  movapd %xmm15,%xmm3
  mulsd  %xmm15,%xmm3
  mulsd  D74(%rip),%xmm3
  divsd  %xmm4,%xmm2
  movapd %xmm0,%xmm9
  movsd  %xmm0,0x8(%rbx)
  mulsd  %xmm0,%xmm9
  mulsd  D40(%rip),%xmm0
  movsd  %xmm9,0x18(%rbx)
  movsd  %xmm0,0x38(%rbx)
  divsd  %xmm4,%xmm7
  movsd  %xmm2,0x10(%rbx)
  subsd  %xmm9,%xmm2
  divsd  %xmm3,%xmm2
  divsd  %xmm4,%xmm6
  movapd %xmm2,%xmm0
  movsd  %xmm2,0x48(%rbx)
  mulsd  D40(%rip),%xmm0
  movsd  %xmm0,0x50(%rbx)
  movapd %xmm7,%xmm0
  addsd  %xmm7,%xmm0
  addsd  %xmm7,%xmm0
  divsd  %xmm4,%xmm5
  subsd  %xmm6,%xmm0
  divsd  %xmm4,%xmm1
  subsd  %xmm5,%xmm0
  subsd  %xmm1,%xmm0
  mulsd  -0x1c8(%rbp),%xmm0
  movsd  %xmm0,0x58(%rbx)
  call   <printf@plt>
  movsd  D40(%rip),%xmm0
  mulsd  0x58(%rbx),%xmm0
  lea    D132(%rip),%rdi
  mov    $0x1,%eax
  movsd  %xmm0,0x60(%rbx)
  movsd  -0x68(%rbp),%xmm0
  divsd  -0xd0(%rbp),%xmm0
  call   <printf@plt>
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L119
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
  nopw   0x0(%rax,%rax,1)
L3:
  mulsd  -0x1c8(%rbp),%xmm0
  call   <exp@plt>
  xor    %eax,%eax
  movapd %xmm0,%xmm1
  movsd  -0x60(%rbp),%xmm0
  divsd  %xmm0,%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x60(%rbp)
  call   <rng@plt>
  pxor   %xmm1,%xmm1
  movsd  -0x60(%rbp),%xmm0
  cvtsi2sd %eax,%xmm1
  comisd %xmm1,%xmm0
  jb     L61
  mov    -0xb8(%rbp),%rax
  mov    -0x58(%rbp),%rcx
  movsd  D28(%rip),%xmm4
  addsd  -0x68(%rbp),%xmm4
  mov    (%rax),%rax
  movsd  -0xa8(%rbp),%xmm3
  movsd  -0xa0(%rbp),%xmm5
  mov    (%rax,%rcx,1),%rax
  mov    -0xc8(%rbp),%rcx
  movsd  %xmm4,-0x68(%rbp)
  mov    (%rax,%rcx,1),%rax
  movsd  %xmm3,(%rax)
  movsd  %xmm5,0x8(%rax)
  jmp    L61
  xchg   %ax,%ax
L217:
  mulsd  -0x1c8(%rbp),%xmm0
  movsd  %xmm2,-0x78(%rbp)
  call   <exp@plt>
  movsd  -0x60(%rbp),%xmm3
  xor    %eax,%eax
  movapd %xmm0,%xmm1
  movapd %xmm3,%xmm0
  divsd  %xmm3,%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x70(%rbp)
  call   <rng@plt>
  pxor   %xmm1,%xmm1
  movsd  -0x70(%rbp),%xmm0
  movsd  -0x78(%rbp),%xmm2
  cvtsi2sd %eax,%xmm1
  comisd %xmm1,%xmm0
  jae    L21
  mov    -0x1a0(%rbp),%rax
  mov    -0x58(%rbp),%rsi
  mov    -0xc8(%rbp),%rcx
  mov    -0x190(%rbp),%rdx
  mov    (%rax),%rax
  mov    (%rax,%rsi,1),%rax
  mov    (%rax,%rcx,1),%rax
  mov    %rax,-0x70(%rbp)
  mov    -0x1a8(%rbp),%rax
  mov    (%rax),%rax
  mov    (%rax,%rsi,1),%rax
  mov    (%rax,%rcx,1),%rax
  mov    %rax,-0x78(%rbp)
  mov    -0xb8(%rbp),%rax
  mov    (%rax),%rax
  mov    (%rax,%rdx,1),%rdx
  mov    (%rdx,%rcx,1),%rdx
  mov    %rdx,-0xc0(%rbp)
  mov    -0x198(%rbp),%rdx
  mov    (%rax,%rdx,1),%rdx
  mov    (%rax,%rsi,1),%rax
  mov    (%rdx,%rcx,1),%r15
  mov    -0x1b0(%rbp),%rdx
  mov    %rax,-0xb0(%rbp)
  mov    (%rax,%rdx,8),%rdx
  mov    %rdx,-0x80(%rbp)
  mov    -0x1b8(%rbp),%rdx
  mov    (%rax,%rdx,8),%rbx
  jmp    L310
  nop
L21:
  mov    -0xb8(%rbp),%rax
  mov    -0x58(%rbp),%rsi
  mov    -0xc8(%rbp),%rcx
  movsd  -0xa8(%rbp),%xmm3
  mov    (%rax),%rax
  movsd  D28(%rip),%xmm5
  addsd  -0x68(%rbp),%xmm5
  mov    (%rax,%rsi,1),%rdi
  mov    (%rdi,%rcx,1),%rdx
  mov    %rdi,-0xb0(%rbp)
  movsd  %xmm5,-0x68(%rbp)
  movsd  %xmm3,(%rdx)
  movsd  %xmm2,0x8(%rdx)
  mov    -0x1a0(%rbp),%rdx
  mov    (%rdx),%rdx
  mov    (%rdx,%rsi,1),%rdx
  mov    (%rdx,%rcx,1),%rdx
  mov    %rdx,-0x70(%rbp)
  mov    -0x1a8(%rbp),%rdx
  mov    (%rdx),%rdx
  mov    (%rdx,%rsi,1),%rdx
  mov    (%rdx,%rcx,1),%rdx
  mov    %rdx,-0x78(%rbp)
  mov    -0x190(%rbp),%rdx
  mov    (%rax,%rdx,1),%rdx
  mov    (%rdx,%rcx,1),%rdx
  mov    %rdx,-0xc0(%rbp)
  mov    -0x198(%rbp),%rdx
  mov    (%rax,%rdx,1),%rax
  mov    (%rax,%rcx,1),%r15
  mov    -0x1b0(%rbp),%rax
  mov    (%rdi,%rax,8),%rax
  mov    %rax,-0x80(%rbp)
  mov    -0x1b8(%rbp),%rax
  mov    (%rdi,%rax,8),%rbx
  jmp    L310
L214:
  call   <sqrt@plt>
  jmp    L287
L119:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_tag: D28
type_guessed: f64
name: disassemble_data
arguments: data_tag: D96
type_guessed: f32[2]
name: disassemble_data
arguments: data_tag: D40
type_guessed: f32[2]
name: disassemble_data
arguments: data_tag: D73
type_guessed: string
name: disassemble_data
arguments: data_tag: D80
type_guessed: string
name: disassemble_data
arguments: data_tag: D205
type_guessed: f32[2]
name: disassemble_data
arguments: data_tag: D1
type_guessed: string
name: disassemble_data
arguments: data_tag: D74
type_guessed: f32[2]
name: disassemble_data
arguments: data_tag: D132
type_guessed: string

tool: D28: 1

tool: {"D96": [0.0,1.75]}

tool: {"D40": [0.0,1.125]}

tool: D73: eSum 1: %f


tool: D80: eSum 2: %f


tool: {"D205": [0.0,3.73828125]}

tool: D1: Chi: %f


tool: {"D74": [0.0,3.25]}

tool: D132: 		Acceptance Ratio: %f


assistant: ```c
void measurement(double ****lattice, double data[][13], double temperature, double ***energy, double ***magnetization, int t) {
  int RUNS_ = (double)250;
  int N_ = (double)64;
  int eq, sk, sw, sw1, sw2, sw3;
  int ii;
  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;
  double accept, test;
  double Mxsum = 0.0, Mysum = 0.0, Mzsum = 0.0;
  double spinX, spinY, spinZ;
  double X, Y, Z;
  double Mx[RUNS_], My[RUNS_], Mz[RUNS_];
  double m[RUNS_], m2[RUNS_], e[RUNS_], e2[RUNS_];
  double e_storage = 0;
  double eSum = 0, e2Sum = 0, mSum = 0, m2Sum = 0;
  double SxSum = 0, SySum = 0, SzSum = 0;
  double SxAvg, SyAvg, SzAvg;
  double SxAvgSqr, SyAvgSqr, SzAvgSqr;
  for (eq = 0; eq < 250; eq++) {
    for (sk = 1; sk <= 30; sk++) {
      for (sw = 0; sw < 250; sw++) {
        for (sw1 = 0; sw1 < 4; sw1++) {
          for (sw2 = 0; sw2 < 4; sw2++) {
            for (sw3 = 0; sw3 < 4; sw3++) {
              i = sw1;
              j = sw2;
              k = sw3;
              ip = (i + 4 - 1) % 4;
              im = (i + 1) % 4;
              jp = (j + 4 - 1) % 4;
              jm = (j + 1) % 4;
              kp = (k + 4 - 1) % 4;
              km = (k + 1) % 4;
              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 = theta;
              phiPrime = currentSpin[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(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;
              test++;
              if (deltaE <= 0) {
                lattice[i][j][k][0] = thetaPrime;
                lattice[i][j][k][1] = phiPrime;
                accept++;
              } 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;
                  accept++;
                }
              }
              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;
              test++;
              if (deltaE <= 0) {
                lattice[i][j][k][0] = thetaPrime;
                lattice[i][j][k][1] = phiPrime;
                accept++;
              } 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;
                  accept++;
                }
              }
            }
          }
        }
      }
    }
    e_storage = 0;
    Mxsum = 0.0;
    Mysum = 0.0;
    Mzsum = 0.0;
    for (sw1 = 0; sw1 < 4; sw1++) {
      for (sw2 = 0; sw2 < 4; sw2++) {
        for (sw3 = 0; sw3 < 4; sw3++) {
          i = sw1;
          j = sw2;
          k = sw3;
          ip = (i + 4 - 1) % 4;
          im = (i + 1) % 4;
          jp = (j + 4 - 1) % 4;
          jm = (j + 1) % 4;
          kp = (k + 4 - 1) % 4;
          km = (k + 1) % 4;
          theta = lattice[i][j][k][0];
          phi = lattice[i][j][k][1];
          spinX = sin(theta) * cos(phi);
          spinY = sin(theta) * sin(phi);
          spinZ = 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 = spinX * spinSum[0] + spinY * spinSum[1] + spinZ * spinSum[2];
          e_storage = e_storage + -1.0 * dotProduct;
          X = spinX;
          Y = spinY;
          Z = spinZ;
          Mxsum += X;
          Mysum += Y;
          Mzsum += Z;
        }
      }
    }
    e[eq] = e_storage / 2.0;
    e2[eq] = e[eq] * e[eq];
    Mx[eq] = Mxsum / N_;
    My[eq] = Mysum / N_;
    Mz[eq] = Mzsum / N_;
    m[eq] = sqrt(Mx[eq] * Mx[eq] + My[eq] * My[eq] + Mz[eq] * Mz[eq]);
    m2[eq] = m[eq] * m[eq];
    if (0) {
      printf("\t\tMeasurement runs (0-%d): %d\n", 250, eq);
    }
  }
  eSum = 0;
  e2Sum = 0;
  mSum = 0;
  m2Sum = 0;
  SxSum = 0;
  SySum = 0;
  SzSum = 0;
  for (ii = 0; ii < RUNS_; ii++) {
    printf("eSum 1: %f\n", eSum);
    eSum += e[ii];
    printf("eSum 2: %f\n", eSum);
    e2Sum += e2[ii];
    mSum += m[ii];
    m2Sum += m2[ii];
    SxSum += Mx[ii];
    SySum += My[ii];
    SzSum += Mz[ii];
  }
  SxAvg = SxSum / RUNS_;
  SyAvg = SySum / RUNS_;
  SzAvg = SzSum / RUNS_;
  SxAvgSqr = (SxSum * SxSum) / RUNS_;
  SyAvgSqr = (SxSum * SxSum) / RUNS_;
  SzAvgSqr = (SxSum * SxSum) / RUNS_;
  data[t][0] = temperature;
  data[t][1] = eSum / RUNS_;
  data[t][2] = e2Sum / RUNS_;
  data[t][3] = data[t][1] * data[t][1];
  data[t][4] = mSum / RUNS_;
  data[t][5] = m2Sum / RUNS_;
  data[t][6] = data[t][4] * data[t][4];
  data[t][7] = data[t][1] / N_;
  data[t][8] = data[t][4] / N_;
  data[t][9] = (data[t][2] - data[t][3]) / (temperature * temperature * N_);
  data[t][10] = data[t][9] / N_;
  data[t][11] = (1.0 / temperature) * (SxAvgSqr + SyAvgSqr + SzAvgSqr - SxAvg - SyAvg - SzAvg);
  printf("Chi: %f\n", data[t][11]);
  data[t][12] = data[t][11] / N_;
  printf("\t\tAcceptance Ratio: %f\n", accept / test);
}
```