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

```asm
<equilibration>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x198,%rsp
  mov    %rdi,0x170(%rsp)
  movsd  D2(%rip),%xmm1
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x158(%rsp)
  movl   $0xfa,0x17c(%rsp)
  lea    0x188(%rsp),%r12
  lea    0x180(%rsp),%r14
  mov    %r14,%rax
  mov    %r12,%r14
  mov    %rax,%r12
  jmp    L142
L70:
  mulsd  0x158(%rsp),%xmm0
  call   <exp@plt>
  movapd %xmm0,%xmm1
  movsd  0x50(%rsp),%xmm0
  divsd  0x8(%rsp),%xmm0
  mulsd  %xmm1,%xmm0
  movq   %xmm0,%rbx
  mov    $0x0,%eax
  call   <rng@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movq   %rbx,%xmm7
  comisd %xmm0,%xmm7
  jb     L5
  mov    0x38(%rsp),%rcx
  mov    (%rcx),%rax
  mov    (%rax,%r13,1),%rax
  mov    (%rsp),%rdx
  mov    (%rax,%rdx,1),%rax
  movsd  0x150(%rsp),%xmm7
  movsd  %xmm7,(%rax)
  mov    (%rcx),%rax
  mov    (%rax,%r13,1),%rax
  mov    (%rax,%rdx,1),%rax
  movsd  0x148(%rsp),%xmm7
  movsd  %xmm7,0x8(%rax)
  jmp    L5
L122:
  mulsd  0x158(%rsp),%xmm0
  call   <exp@plt>
  movapd %xmm0,%xmm1
  movsd  0x8(%rsp),%xmm0
  divsd  %xmm0,%xmm0
  mulsd  %xmm1,%xmm0
  movq   %xmm0,%rbx
  mov    $0x0,%eax
  call   <rng@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movq   %rbx,%xmm3
  comisd %xmm0,%xmm3
  jb     L81
  mov    0x38(%rsp),%rcx
  mov    (%rcx),%rax
  mov    (%rax,%r13,1),%rax
  mov    (%rsp),%rdx
  mov    (%rax,%rdx,1),%rax
  movsd  0x140(%rsp),%xmm5
  movsd  %xmm5,(%rax)
  mov    (%rcx),%rax
  mov    (%rax,%r13,1),%rax
  mov    (%rax,%rdx,1),%rax
  movsd  0x40(%rsp),%xmm3
  movsd  %xmm3,0x8(%rax)
L81:
  add    $0x1,%r12
  cmp    $0x18,%r12
  je     L1
L44:
  mov    0x48(%rsp),%rbp
  mov    %rbp,0x38(%rsp)
  lea    0x0(,%r12,8),%rax
  mov    %rax,(%rsp)
  mov    0x0(%rbp),%rax
  mov    (%rax,%r13,1),%rax
  mov    (%rax,%r12,8),%rbx
  movsd  (%rbx),%xmm6
  movsd  %xmm6,0x140(%rsp)
  mov    %r15,%rsi
  mov    %r14,%rdi
  movapd %xmm6,%xmm0
  call   <sincos@plt>
  movsd  0x180(%rsp),%xmm3
  movsd  %xmm3,0x20(%rsp)
  movsd  0x188(%rsp),%xmm3
  movsd  %xmm3,0x8(%rsp)
  movsd  0x8(%rbx),%xmm6
  movsd  %xmm6,0x148(%rsp)
  mov    %r15,%rsi
  mov    %r14,%rdi
  movapd %xmm6,%xmm0
  call   <sincos@plt>
  movsd  0x180(%rsp),%xmm4
  movsd  %xmm4,0x28(%rsp)
  movsd  0x188(%rsp),%xmm2
  movsd  %xmm2,0x30(%rsp)
  mov    $0x0,%eax
  call   <rng_theta@plt>
  pxor   %xmm7,%xmm7
  cvtsi2sd %eax,%xmm7
  movsd  %xmm7,0x150(%rsp)
  mov    %r15,%rsi
  mov    %r14,%rdi
  movapd %xmm7,%xmm0
  call   <sincos@plt>
  movsd  0x180(%rsp),%xmm5
  movsd  %xmm5,0x98(%rsp)
  movsd  0x188(%rsp),%xmm7
  movsd  %xmm7,0x50(%rsp)
  mov    $0x0,%eax
  call   <rng_phi@plt>
  pxor   %xmm6,%xmm6
  cvtsi2sd %eax,%xmm6
  movsd  %xmm6,0x40(%rsp)
  movsd  0x28(%rsp),%xmm4
  movsd  0x8(%rsp),%xmm3
  mulsd  %xmm3,%xmm4
  movsd  %xmm4,0x10(%rsp)
  mulsd  0x30(%rsp),%xmm3
  movsd  %xmm3,0x18(%rsp)
  mov    0x68(%rsp),%rax
  mov    (%rax),%rax
  mov    (%rax,%r13,1),%rax
  mov    (%rax,%r12,8),%rbx
  mov    %r15,%rsi
  mov    %r14,%rdi
  movsd  (%rbx),%xmm0
  call   <sincos@plt>
  movsd  0x180(%rsp),%xmm6
  movsd  %xmm6,0x120(%rsp)
  movsd  0x188(%rsp),%xmm8
  movsd  %xmm8,0x128(%rsp)
  movsd  0x8(%rbx),%xmm0
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <sincos@plt>
  movsd  0x180(%rsp),%xmm0
  movsd  %xmm0,0x110(%rsp)
  movsd  0x188(%rsp),%xmm9
  movsd  %xmm9,0x118(%rsp)
  mov    0x70(%rsp),%rax
  mov    (%rax),%rax
  mov    (%rax,%r13,1),%rax
  mov    (%rax,%r12,8),%rbx
  mov    %r15,%rsi
  mov    %r14,%rdi
  movsd  (%rbx),%xmm0
  call   <sincos@plt>
  movsd  0x180(%rsp),%xmm12
  movsd  %xmm12,0x100(%rsp)
  movsd  0x188(%rsp),%xmm10
  movsd  %xmm10,0x108(%rsp)
  movsd  0x8(%rbx),%xmm0
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <sincos@plt>
  movsd  0x180(%rsp),%xmm11
  movsd  %xmm11,0xf0(%rsp)
  movsd  0x188(%rsp),%xmm12
  movsd  %xmm12,0xf8(%rsp)
  mov    %rbp,0x48(%rsp)
  mov    0x0(%rbp),%rbx
  mov    0x58(%rsp),%rax
  mov    (%rbx,%rax,1),%rax
  mov    (%rax,%r12,8),%rbp
  mov    %r15,%rsi
  mov    %r14,%rdi
  movsd  0x0(%rbp),%xmm0
  call   <sincos@plt>
  movsd  0x180(%rsp),%xmm13
  movsd  %xmm13,0xe0(%rsp)
  movsd  0x188(%rsp),%xmm13
  movsd  %xmm13,0xe8(%rsp)
  movsd  0x8(%rbp),%xmm0
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <sincos@plt>
  movsd  0x180(%rsp),%xmm14
  movsd  %xmm14,0xd0(%rsp)
  movsd  0x188(%rsp),%xmm15
  movsd  %xmm15,0xd8(%rsp)
  mov    0x60(%rsp),%rax
  mov    (%rbx,%rax,1),%rax
  mov    (%rax,%r12,8),%rbp
  mov    %r15,%rsi
  mov    %r14,%rdi
  movsd  0x0(%rbp),%xmm0
  call   <sincos@plt>
  movsd  0x180(%rsp),%xmm5
  movsd  %xmm5,0xc0(%rsp)
  movsd  0x188(%rsp),%xmm5
  movsd  %xmm5,0xc8(%rsp)
  movsd  0x8(%rbp),%xmm0
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <sincos@plt>
  movsd  0x180(%rsp),%xmm6
  movsd  %xmm6,0xb0(%rsp)
  movsd  0x188(%rsp),%xmm9
  movsd  %xmm9,0xb8(%rsp)
  mov    (%rbx,%r13,1),%rbp
  lea    0x1(%r12),%edx
  movslq %edx,%rax
  imul   $0x2aaaaaab,%rax,%rax
  sar    $0x22,%rax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  lea    (%rax,%rax,2),%eax
  shl    $0x3,%eax
  sub    %eax,%edx
  movslq %edx,%rax
  mov    %rax,0x130(%rsp)
  mov    0x0(%rbp,%rax,8),%rbx
  mov    %r15,%rsi
  mov    %r14,%rdi
  movsd  (%rbx),%xmm0
  call   <sincos@plt>
  movsd  0x180(%rsp),%xmm15
  movsd  %xmm15,0xa0(%rsp)
  movsd  0x188(%rsp),%xmm12
  movsd  %xmm12,0xa8(%rsp)
  movsd  0x8(%rbx),%xmm0
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <sincos@plt>
  movsd  0x180(%rsp),%xmm15
  movsd  %xmm15,0x88(%rsp)
  movsd  0x188(%rsp),%xmm5
  movsd  %xmm5,0x90(%rsp)
  lea    0x17(%r12),%edx
  movslq %edx,%rax
  imul   $0x2aaaaaab,%rax,%rax
  sar    $0x22,%rax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  lea    (%rax,%rax,2),%eax
  shl    $0x3,%eax
  sub    %eax,%edx
  movslq %edx,%rax
  mov    %rax,0x138(%rsp)
  mov    0x0(%rbp,%rax,8),%rbx
  mov    %r15,%rsi
  mov    %r14,%rdi
  movsd  (%rbx),%xmm0
  call   <sincos@plt>
  movsd  0x180(%rsp),%xmm1
  movsd  %xmm1,0x78(%rsp)
  movsd  0x188(%rsp),%xmm5
  movsd  %xmm5,0x80(%rsp)
  movsd  0x8(%rbx),%xmm0
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <sincos@plt>
  movsd  0x110(%rsp),%xmm0
  movsd  0x128(%rsp),%xmm8
  mulsd  %xmm8,%xmm0
  movsd  0xf0(%rsp),%xmm11
  movsd  0x108(%rsp),%xmm10
  mulsd  %xmm10,%xmm11
  addsd  %xmm11,%xmm0
  movsd  0xd0(%rsp),%xmm14
  movsd  0xe8(%rsp),%xmm13
  mulsd  %xmm13,%xmm14
  addsd  %xmm14,%xmm0
  movsd  0xb0(%rsp),%xmm14
  movsd  0xc8(%rsp),%xmm11
  mulsd  %xmm11,%xmm14
  addsd  %xmm14,%xmm0
  movsd  0x88(%rsp),%xmm6
  movsd  0xa8(%rsp),%xmm14
  mulsd  %xmm14,%xmm6
  addsd  %xmm6,%xmm0
  movsd  0x80(%rsp),%xmm5
  movapd %xmm5,%xmm6
  mulsd  0x180(%rsp),%xmm6
  addsd  %xmm6,%xmm0
  movsd  0x28(%rsp),%xmm1
  movsd  0x50(%rsp),%xmm7
  mulsd  %xmm7,%xmm1
  subsd  0x10(%rsp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  0x118(%rsp),%xmm4
  mulsd  %xmm8,%xmm4
  movapd %xmm4,%xmm1
  movsd  0xf8(%rsp),%xmm4
  mulsd  %xmm10,%xmm4
  addsd  %xmm4,%xmm1
  movsd  0xd8(%rsp),%xmm4
  mulsd  %xmm13,%xmm4
  addsd  %xmm4,%xmm1
  movsd  0xb8(%rsp),%xmm4
  mulsd  %xmm11,%xmm4
  addsd  %xmm4,%xmm1
  movsd  0x90(%rsp),%xmm4
  mulsd  %xmm14,%xmm4
  addsd  %xmm4,%xmm1
  mulsd  0x188(%rsp),%xmm5
  addsd  %xmm5,%xmm1
  movsd  0x30(%rsp),%xmm2
  mulsd  %xmm7,%xmm2
  subsd  0x18(%rsp),%xmm2
  mulsd  %xmm2,%xmm1
  addsd  %xmm1,%xmm0
  movsd  0x120(%rsp),%xmm1
  addsd  0x100(%rsp),%xmm1
  addsd  0xe0(%rsp),%xmm1
  addsd  0xc0(%rsp),%xmm1
  addsd  0xa0(%rsp),%xmm1
  addsd  0x78(%rsp),%xmm1
  movsd  0x98(%rsp),%xmm2
  subsd  0x20(%rsp),%xmm2
  mulsd  %xmm2,%xmm1
  addsd  %xmm1,%xmm0
  pxor   %xmm7,%xmm7
  comisd %xmm7,%xmm0
  jb     L70
  mov    0x0(%rbp,%r12,8),%rax
  movsd  0x150(%rsp),%xmm5
  movsd  %xmm5,(%rax)
  mov    0x48(%rsp),%rbp
  mov    0x0(%rbp),%rax
  mov    (%rax,%r13,1),%rax
  mov    (%rax,%r12,8),%rax
  movsd  0x148(%rsp),%xmm7
  movsd  %xmm7,0x8(%rax)
L5:
  mov    %r15,%rsi
  mov    %r14,%rdi
  movsd  0x40(%rsp),%xmm0
  call   <sincos@plt>
  movsd  0x180(%rsp),%xmm3
  movsd  %xmm3,0x28(%rsp)
  movsd  0x188(%rsp),%xmm2
  movsd  %xmm2,0x30(%rsp)
  mov    0x68(%rsp),%rax
  mov    (%rax),%rax
  mov    (%rax,%r13,1),%rax
  mov    (%rsp),%rbp
  mov    (%rax,%rbp,1),%rbx
  mov    %r15,%rsi
  mov    %r14,%rdi
  movsd  (%rbx),%xmm0
  call   <sincos@plt>
  movsd  0x180(%rsp),%xmm7
  movsd  %xmm7,0xc0(%rsp)
  movsd  0x188(%rsp),%xmm9
  movsd  %xmm9,0xc8(%rsp)
  movsd  0x8(%rbx),%xmm0
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <sincos@plt>
  movsd  0x180(%rsp),%xmm0
  movsd  %xmm0,0x50(%rsp)
  movsd  0x188(%rsp),%xmm5
  movsd  %xmm5,0x78(%rsp)
  mov    0x70(%rsp),%rax
  mov    (%rax),%rax
  mov    (%rax,%r13,1),%rax
  mov    (%rax,%rbp,1),%rbx
  mov    %r15,%rsi
  mov    %r14,%rdi
  movsd  (%rbx),%xmm0
  call   <sincos@plt>
  movsd  0x180(%rsp),%xmm4
  movsd  %xmm4,0xb0(%rsp)
  movsd  0x188(%rsp),%xmm12
  movsd  %xmm12,0xb8(%rsp)
  movsd  0x8(%rbx),%xmm0
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <sincos@plt>
  movsd  0x180(%rsp),%xmm15
  movsd  %xmm15,0x80(%rsp)
  movsd  0x188(%rsp),%xmm6
  movsd  %xmm6,0x88(%rsp)
  mov    0x38(%rsp),%rax
  mov    (%rax),%rbx
  mov    0x58(%rsp),%rdx
  mov    (%rbx,%rdx,1),%rax
  mov    (%rax,%rbp,1),%rax
  mov    %r15,%rsi
  mov    %r14,%rdi
  movsd  (%rax),%xmm0
  call   <sincos@plt>
  movsd  0x180(%rsp),%xmm8
  movsd  %xmm8,0xa0(%rsp)
  movsd  0x188(%rsp),%xmm7
  movsd  %xmm7,0xa8(%rsp)
  mov    0x60(%rsp),%rdx
  mov    (%rbx,%rdx,1),%rax
  mov    %rbp,(%rsp)
  mov    (%rax,%rbp,1),%rbp
  mov    %r15,%rsi
  mov    %r14,%rdi
  movsd  0x0(%rbp),%xmm0
  call   <sincos@plt>
  movsd  0x180(%rsp),%xmm11
  movsd  %xmm11,0xd0(%rsp)
  movsd  0x188(%rsp),%xmm4
  movsd  %xmm4,0xd8(%rsp)
  movsd  0x8(%rbp),%xmm0
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <sincos@plt>
  movsd  0x180(%rsp),%xmm5
  movsd  %xmm5,0x90(%rsp)
  movsd  0x188(%rsp),%xmm8
  movsd  %xmm8,0x98(%rsp)
  mov    (%rbx,%r13,1),%rbp
  mov    0x130(%rsp),%rdx
  mov    0x0(%rbp,%rdx,8),%rbx
  mov    %r15,%rsi
  mov    %r14,%rdi
  movsd  (%rbx),%xmm0
  call   <sincos@plt>
  movsd  0x180(%rsp),%xmm14
  movsd  %xmm14,0x100(%rsp)
  movsd  0x188(%rsp),%xmm10
  movsd  %xmm10,0x108(%rsp)
  movsd  0x8(%rbx),%xmm0
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <sincos@plt>
  movsd  0x180(%rsp),%xmm13
  movsd  %xmm13,0xf0(%rsp)
  movsd  0x188(%rsp),%xmm11
  movsd  %xmm11,0xf8(%rsp)
  mov    0x138(%rsp),%rdx
  mov    0x0(%rbp,%rdx,8),%rbx
  mov    %r15,%rsi
  mov    %r14,%rdi
  movsd  (%rbx),%xmm0
  call   <sincos@plt>
  movsd  0x180(%rsp),%xmm6
  movsd  %xmm6,0xe0(%rsp)
  movsd  0x188(%rsp),%xmm6
  movsd  %xmm6,0xe8(%rsp)
  movsd  0x8(%rbx),%xmm0
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <sincos@plt>
  movsd  0x50(%rsp),%xmm0
  movsd  0xc8(%rsp),%xmm9
  mulsd  %xmm9,%xmm0
  movsd  0x80(%rsp),%xmm15
  movsd  0xb8(%rsp),%xmm12
  mulsd  %xmm12,%xmm15
  addsd  %xmm15,%xmm0
  movsd  0xa8(%rsp),%xmm7
  movapd %xmm7,%xmm1
  movsd  0x90(%rsp),%xmm5
  mulsd  %xmm5,%xmm1
  addsd  %xmm1,%xmm0
  movsd  0xd8(%rsp),%xmm4
  mulsd  %xmm4,%xmm5
  addsd  %xmm5,%xmm0
  movsd  0xf0(%rsp),%xmm13
  movsd  0x108(%rsp),%xmm10
  mulsd  %xmm10,%xmm13
  addsd  %xmm13,%xmm0
  movsd  0xe8(%rsp),%xmm6
  movapd %xmm6,%xmm1
  mulsd  0x180(%rsp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  0x28(%rsp),%xmm1
  movsd  0x8(%rsp),%xmm15
  mulsd  %xmm15,%xmm1
  subsd  0x10(%rsp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  0x78(%rsp),%xmm3
  mulsd  %xmm9,%xmm3
  movapd %xmm3,%xmm1
  movsd  0x88(%rsp),%xmm3
  mulsd  %xmm12,%xmm3
  addsd  %xmm3,%xmm1
  movsd  0x98(%rsp),%xmm3
  mulsd  %xmm3,%xmm7
  addsd  %xmm7,%xmm1
  mulsd  %xmm3,%xmm4
  addsd  %xmm4,%xmm1
  movsd  0xf8(%rsp),%xmm5
  mulsd  %xmm10,%xmm5
  addsd  %xmm5,%xmm1
  mulsd  0x188(%rsp),%xmm6
  addsd  %xmm6,%xmm1
  movsd  0x30(%rsp),%xmm2
  mulsd  %xmm15,%xmm2
  subsd  0x18(%rsp),%xmm2
  mulsd  %xmm2,%xmm1
  addsd  %xmm1,%xmm0
  movsd  0xc0(%rsp),%xmm1
  addsd  0xb0(%rsp),%xmm1
  addsd  0xa0(%rsp),%xmm1
  addsd  0xd0(%rsp),%xmm1
  addsd  0x100(%rsp),%xmm1
  addsd  0xe0(%rsp),%xmm1
  movsd  0x20(%rsp),%xmm2
  subsd  %xmm2,%xmm2
  mulsd  %xmm2,%xmm1
  addsd  %xmm1,%xmm0
  pxor   %xmm7,%xmm7
  comisd %xmm7,%xmm0
  jb     L122
  mov    (%rsp),%rcx
  mov    0x0(%rbp,%rcx,1),%rax
  movsd  0x140(%rsp),%xmm5
  movsd  %xmm5,(%rax)
  mov    0x38(%rsp),%rax
  mov    (%rax),%rax
  mov    (%rax,%r13,1),%rax
  mov    (%rax,%rcx,1),%rax
  movsd  0x40(%rsp),%xmm3
  movsd  %xmm3,0x8(%rax)
  jmp    L81
L1:
  addq   $0x1,0x160(%rsp)
  mov    0x160(%rsp),%rax
  cmp    $0x18,%rax
  je     L68
L32:
  mov    0x160(%rsp),%rsi
  lea    0x0(,%rsi,8),%r13
  lea    0x1(%rsi),%edx
  movslq %edx,%rax
  imul   $0x2aaaaaab,%rax,%rax
  sar    $0x22,%rax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  lea    (%rax,%rax,2),%eax
  shl    $0x3,%eax
  sub    %eax,%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rax
  mov    %rax,0x58(%rsp)
  lea    0x17(%rsi),%edx
  movslq %edx,%rax
  imul   $0x2aaaaaab,%rax,%rax
  sar    $0x22,%rax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  lea    (%rax,%rax,2),%eax
  shl    $0x3,%eax
  sub    %eax,%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rax
  mov    %rax,0x60(%rsp)
  mov    $0x0,%r12d
  jmp    L44
L68:
  mov    %r15,%r12
  addq   $0x8,0x48(%rsp)
  cmpl   $0x18,0x16c(%rsp)
  je     L28
L47:
  mov    0x16c(%rsp),%edi
  mov    %edi,%eax
  add    $0x1,%edi
  mov    %edi,0x16c(%rsp)
  movslq %edi,%rdx
  imul   $0x2aaaaaab,%rdx,%rdx
  sar    $0x22,%rdx
  mov    %edi,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  lea    (%rdx,%rdx,2),%ecx
  shl    $0x3,%ecx
  mov    %edi,%edx
  sub    %ecx,%edx
  movslq %edx,%rdx
  mov    0x170(%rsp),%rdi
  lea    (%rdi,%rdx,8),%rcx
  mov    %rcx,0x68(%rsp)
  add    $0x17,%eax
  movslq %eax,%rdx
  imul   $0x2aaaaaab,%rdx,%rdx
  sar    $0x22,%rdx
  mov    %eax,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%edx
  lea    (%rdx,%rdx,2),%edx
  shl    $0x3,%edx
  sub    %edx,%eax
  cltq
  lea    (%rdi,%rax,8),%rax
  mov    %rax,0x70(%rsp)
  movq   $0x0,0x160(%rsp)
  mov    %r12,%r15
  jmp    L32
L28:
  subl   $0x1,0x178(%rsp)
  je     L67
L108:
  mov    0x170(%rsp),%rax
  mov    %rax,0x48(%rsp)
  movl   $0x0,0x16c(%rsp)
  jmp    L47
L67:
  subl   $0x1,0x17c(%rsp)
  je     L4
L142:
  movl   $0xfa,0x178(%rsp)
  jmp    L108
L4:
  add    $0x198,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: read_data
arguments: data_label: D2
data_type: f64

tool: D2: 1

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