// File: /workspace/github_cpp_makefile_star2_O2/dsharlet[P]array/test/readme.cpp
// Function: nda::test_readme_ein_reduce_body()
TEST(readme_ein_reduce) {
  // Name the dimensions we use in Einstein reductions.
  enum { i = 0, j = 1, k = 2, l = 3 };

  // Dot product dot1 = dot2 = x.y:
  vector<float> x({10}, 0.0f);
  vector<float> y({10}, 0.0f);
  float dot1 = make_ein_sum<float>(ein<i>(x) * ein<i>(y));
  float dot2 = 0.0f;
  ein_reduce(ein(dot2) += ein<i>(x) * ein<i>(y));

  // Matrix multiply C1 = C2 = A*B:
  matrix<float> A({10, 10});
  matrix<float> B({10, 15});
  matrix<float> C1({10, 15});
  fill(C1, 0.0f);
  ein_reduce(ein<i, j>(C1) += ein<i, k>(A) * ein<k, j>(B));
  auto C2 = make_ein_sum<float, i, j>(ein<i, k>(A) * ein<k, j>(B));

  // Cross product array crosses_n = x_n x y_n:
  using vector_array = array<float, shape<dim<0, 3>, dense_dim<>>>;
  vector_array xs({3, 100});
  vector_array ys({3, 100});
  vector_array crosses({3, 100});
  auto epsilon3 = [](int i, int j, int k) { return sgn(j - i) * sgn(k - i) * sgn(k - j); };
  ein_reduce(ein<i, l>(crosses) += ein<i, j, k>(epsilon3) * ein<j, l>(xs) * ein<k, l>(ys));

  // Matrix transpose AT = A^T:
  matrix<float> AT({10, 10});
  ein_reduce(ein<i, j>(AT) = ein<j, i>(A));

  // Maximum of each x-y plane of a 3D volume:
  dense_array<float, 3> volume({8, 12, 20});
  dense_array<float, 1> max_xy({20}, 0.0f);
  auto r = ein<k>(max_xy);
  ein_reduce(r = max(r, ein<i, j, k>(volume)));

  const float pi = std::acos(-1.0f);

  // Compute X1 = X2 = DFT[x]:
  using complex = std::complex<float>;
  dense_array<complex, 2> W({10, 10});
  for_all_indices(W.shape(), [&](int j, int k) {
    W(j, k) = exp(-2.0f * pi * complex(0, 1) * (static_cast<float>(j * k) / 10));
  });
  // Using `make_ein_sum`, returning the result:
  auto X1 = make_ein_sum<complex, j>(ein<j, k>(W) * ein<k>(x));
  // Using `ein_reduce`, computing the result in place:
  vector<complex> X2({10}, 0.0f);
  ein_reduce(ein<j>(X2) += ein<j, k>(W) * ein<k>(x));

  assert_used(dot1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x5c8, %rsp            # imm = 0x5C8
leaq 0x88(%rsp), %rbx
pushq $0xa
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x6a83e
leaq 0x170(%rsp), %rdx
andl $0x0, (%rdx)
leaq 0x228(%rsp), %rdi
movq %rbx, %rsi
callq 0x6a850
leaq 0x88(%rsp), %rdi
movl %ebp, %esi
callq 0x6a83e
leaq 0x170(%rsp), %rdx
andl $0x0, (%rdx)
leaq 0x488(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x6a850
movq 0x240(%rsp), %rbx
movups 0x248(%rsp), %xmm0
movaps %xmm0, 0x2b0(%rsp)
movq 0x258(%rsp), %rax
movq %rax, 0x2c0(%rsp)
movq 0x4a0(%rsp), %r14
movdqu 0x4a8(%rsp), %xmm0
movdqa %xmm0, 0x520(%rsp)
movq 0x4b8(%rsp), %rax
movq %rax, 0x530(%rsp)
leaq 0x320(%rsp), %rdx
andl $0x0, (%rdx)
leaq 0x170(%rsp), %rdi
leaq 0x128(%rsp), %rsi
leaq 0x440(%rsp), %rcx
callq 0x6ae08
movq 0x188(%rsp), %rax
leaq 0x98(%rsp), %rsi
movq %rax, -0x10(%rsi)
movq %rbx, (%rsi)
movaps 0x2b0(%rsp), %xmm0
movups %xmm0, 0x8(%rsi)
movq 0x2c0(%rsp), %rax
movq %rax, 0x18(%rsi)
movq %r14, 0x20(%rsi)
movdqa 0x520(%rsp), %xmm0
movdqu %xmm0, 0x28(%rsi)
movq 0x530(%rsp), %rax
movq %rax, 0x38(%rsi)
leaq 0x370(%rsp), %rdi
callq 0x6a4e7
leaq 0x370(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x6a582
leaq 0x260(%rsp), %rdi
leaq 0x170(%rsp), %rsi
callq 0x6adf6
leaq 0x248(%rsp), %rbx
leaq 0x4a8(%rsp), %r14
leaq 0x170(%rsp), %rdi
callq 0x6a8a2
leaq 0x260(%rsp), %rdi
movq 0x18(%rdi), %rax
movss (%rax), %xmm0
movss %xmm0, 0x30(%rsp)
callq 0x6a8a2
leaq 0x224(%rsp), %rax
andl $0x0, (%rax)
movss 0x30(%rsp), %xmm0
movss %xmm0, 0x124(%rsp)
movq -0x8(%rbx), %rcx
movups (%rbx), %xmm0
leaq 0x98(%rsp), %rsi
movups %xmm0, 0x8(%rsi)
movq 0x10(%rbx), %rdx
movq %rdx, 0x18(%rsi)
movq -0x8(%r14), %rdx
movdqu (%r14), %xmm0
movdqu %xmm0, 0x28(%rsi)
movq 0x10(%r14), %rdi
movq %rdi, 0x38(%rsi)
movq %rax, -0x10(%rsi)
movq %rcx, (%rsi)
movq %rdx, 0x20(%rsi)
leaq 0x170(%rsp), %rdi
callq 0x6a4e7
leaq 0x170(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x6a582
leaq 0x88(%rsp), %rdi
pushq $0xa
popq %rdx
movl %edx, %esi
callq 0x6a8b2
leaq 0x260(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x6a8c6
leaq 0x88(%rsp), %rdi
pushq $0xa
popq %rsi
pushq $0xf
popq %rdx
callq 0x6a8b2
leaq 0x370(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x6a8c6
leaq 0x88(%rsp), %rdi
pushq $0xa
popq %rsi
pushq $0xf
popq %rdx
callq 0x6a8b2
leaq 0x2b0(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x6a8c6
leaq 0x88(%rsp), %rsi
andl $0x0, (%rsi)
leaq 0x2b0(%rsp), %rdi
callq 0x6a8fb
movq 0x278(%rsp), %r12
movq 0x288(%rsp), %r14
movq 0x2a0(%rsp), %rdx
movq 0x2a8(%rsp), %r13
movq 0x388(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x398(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x3b0(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x3b8(%rsp), %rbx
movq 0x2c8(%rsp), %rbp
movq 0x2d0(%rsp), %rax
movq %rax, 0x78(%rsp)
movdqu 0x2d8(%rsp), %xmm0
movdqa %xmm0, 0x50(%rsp)
movq 0x2e8(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x2f0(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x2f8(%rsp), %r15
leaq 0x88(%rsp), %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x6b1ba
movq 0x90(%rsp), %rax
testq %r15, %r15
je 0x6915c
cmpq %rax, 0x20(%rsp)
jle 0x69167
jmp 0x698fb
cmpq %rax, 0x20(%rsp)
jne 0x6a30c
leaq 0x88(%rsp), %rdi
xorl %esi, %esi
movq 0x60(%rsp), %rdx
xorl %ecx, %ecx
callq 0x6b1ba
movdqa 0x50(%rsp), %xmm0
movq %xmm0, %rax
cmpq 0x90(%rsp), %rax
jg 0x6a286
leaq 0x88(%rsp), %rdi
xorl %esi, %esi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x6b1ba
leaq 0x88(%rsp), %rdi
movq (%rdi), %r14
movdqu 0x8(%rdi), %xmm0
movdqa %xmm0, 0x60(%rsp)
xorl %esi, %esi
movq 0x18(%rsp), %rdx
xorl %ecx, %ecx
callq 0x6b1ba
movdqa 0x60(%rsp), %xmm0
movq %xmm0, %rax
cmpq 0x90(%rsp), %rax
jne 0x6a29d
leaq 0x170(%rsp), %rcx
movq %r14, (%rcx)
movdqu %xmm0, 0x8(%rcx)
leaq 0x520(%rsp), %rdx
movq 0x78(%rsp), %rax
movq %rax, (%rdx)
movdqa 0x50(%rsp), %xmm0
movdqu %xmm0, 0x8(%rdx)
leaq 0x320(%rsp), %rsi
movq 0x48(%rsp), %rax
movq %rax, (%rsi)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsi)
movq %r15, 0x10(%rsi)
leaq 0x88(%rsp), %rdi
callq 0x6b1e6
movq 0x90(%rsp), %rax
movq 0xa8(%rsp), %rcx
shlq $0x2, %r15
shlq $0x2, %r13
xorl %edx, %edx
cmpq %rax, %rdx
je 0x692bc
movq 0xc0(%rsp), %rsi
movq %rdx, %rdi
imulq %rbx, %rdi
movq 0x30(%rsp), %r8
leaq (%r8,%rdi,4), %rdi
movq %rbp, %r14
xorl %r9d, %r9d
cmpq %rcx, %r9
je 0x692b3
movq %rsi, %r10
movq %r12, %r11
movq %r14, %r8
subq $0x1, %r10
jb 0x692aa
movss (%r11), %xmm0
mulss (%rdi,%r9,4), %xmm0
addss (%r8), %xmm0
movss %xmm0, (%r8)
addq %r15, %r8
addq %r13, %r11
jmp 0x69287
incq %r9
addq $0x4, %r14
jmp 0x69279
incq %rdx
addq $0x4, %r12
jmp 0x69256
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq 0x278(%rsp), %rbp
movq 0x288(%rsp), %rcx
movq %rcx, 0x18(%rsp)
movq 0x2a0(%rsp), %rdi
movq 0x2a8(%rsp), %r13
movq 0x388(%rsp), %rbx
movq 0x398(%rsp), %rsi
andl $0x0, 0x3f8(%rsp)
movq 0x3b0(%rsp), %rcx
movq %rcx, 0x48(%rsp)
movq 0x3b8(%rsp), %r14
leaq 0x170(%rsp), %rdx
movq %rsi, 0x60(%rsp)
movq %rsi, 0x8(%rdx)
movq %rax, 0x10(%rdx)
leaq 0x128(%rsp), %rsi
movq %rdi, 0x50(%rsp)
movq %rdi, 0x8(%rsi)
movq %rax, 0x10(%rsi)
leaq 0x88(%rsp), %rdi
callq 0x6b38e
leaq 0x320(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x6b31c
leaq 0x88(%rsp), %rdi
leaq 0x320(%rsp), %rsi
leaq 0x3f8(%rsp), %rdx
leaq 0x1e0(%rsp), %rcx
callq 0x6b63a
movq 0xa0(%rsp), %r15
movq 0xa8(%rsp), %rax
movq %rax, 0x118(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0xb8(%rsp), %r12
movq 0xc0(%rsp), %rax
movq %rax, 0x78(%rsp)
movdqu 0xc8(%rsp), %xmm0
movdqa %xmm0, 0x30(%rsp)
leaq 0x170(%rsp), %rdi
xorl %esi, %esi
movq 0x50(%rsp), %rdx
xorl %ecx, %ecx
callq 0x6b1ba
movdqa 0x30(%rsp), %xmm0
movq %xmm0, %rax
cmpq 0x178(%rsp), %rax
jg 0x6a286
leaq 0x170(%rsp), %rdi
xorl %esi, %esi
movq 0x60(%rsp), %rdx
xorl %ecx, %ecx
callq 0x6b1ba
movq 0x178(%rsp), %rax
testq %r12, %r12
je 0x69430
cmpq %rax, 0x20(%rsp)
jle 0x6943b
jmp 0x698fb
cmpq %rax, 0x20(%rsp)
jne 0x6a30c
leaq 0x170(%rsp), %rdi
xorl %esi, %esi
movq 0x18(%rsp), %rdx
xorl %ecx, %ecx
callq 0x6b1ba
leaq 0x170(%rsp), %rdi
movq (%rdi), %rax
movq %rax, 0x60(%rsp)
movdqu 0x8(%rdi), %xmm0
movdqa %xmm0, 0x50(%rsp)
xorl %esi, %esi
movq 0x48(%rsp), %rdx
xorl %ecx, %ecx
callq 0x6b1ba
movdqa 0x50(%rsp), %xmm0
movq %xmm0, %rax
cmpq 0x178(%rsp), %rax
jne 0x6a29d
leaq 0x128(%rsp), %rcx
movq 0x60(%rsp), %rax
movq %rax, (%rcx)
movdqu %xmm0, 0x8(%rcx)
leaq 0x440(%rsp), %rdx
movq 0x118(%rsp), %rax
movq %rax, (%rdx)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rdx)
movq %r12, 0x10(%rdx)
leaq 0x4d8(%rsp), %rsi
movq 0x78(%rsp), %rax
movq %rax, (%rsi)
movdqa 0x30(%rsp), %xmm0
movdqu %xmm0, 0x8(%rsi)
leaq 0x170(%rsp), %rdi
callq 0x6bd40
movq 0x178(%rsp), %rax
movq 0x190(%rsp), %rcx
shlq $0x2, %r12
shlq $0x2, %r13
xorl %edx, %edx
cmpq %rax, %rdx
je 0x69568
movq 0x1a8(%rsp), %rsi
movq %rdx, %rdi
imulq %r14, %rdi
leaq (%rbx,%rdi,4), %rdi
movq %r15, %r8
xorl %r9d, %r9d
cmpq %rcx, %r9
je 0x6955f
movq %rbp, %r10
xorl %r11d, %r11d
cmpq %r11, %rsi
je 0x69557
movss (%r10), %xmm0
mulss (%rdi,%r9,4), %xmm0
addss (%r8,%r11,4), %xmm0
movss %xmm0, (%r8,%r11,4)
incq %r11
addq %r13, %r10
jmp 0x69533
incq %r9
addq %r12, %r8
jmp 0x69528
incq %rdx
addq $0x4, %rbp
jmp 0x6950a
leaq 0x520(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x6b2ea
leaq 0x88(%rsp), %rdi
callq 0x6aaee
leaq 0x88(%rsp), %rdi
pushq $0x3
popq %rsi
pushq $0x64
popq %rdx
callq 0x6a92e
leaq 0x440(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x6a942
leaq 0x88(%rsp), %rdi
pushq $0x3
popq %rsi
pushq $0x64
popq %rdx
callq 0x6a92e
leaq 0x4d8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x6a942
leaq 0x88(%rsp), %rdi
pushq $0x3
popq %rsi
pushq $0x64
popq %rdx
callq 0x6a92e
leaq 0x3f8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x6a942
movq 0x458(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x460(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x468(%rsp), %r13
movq 0x480(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x4f0(%rsp), %rax
movq %rax, 0x118(%rsp)
movq 0x4f8(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x500(%rsp), %r15
movq 0x518(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x410(%rsp), %r14
movq 0x418(%rsp), %r12
movups 0x420(%rsp), %xmm0
movaps %xmm0, 0x50(%rsp)
movq 0x438(%rsp), %rbx
leaq 0x88(%rsp), %rdi
pushq $0x3
popq %rdx
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x6c100
leaq 0x88(%rsp), %rdi
pushq $0x3
popq %rdx
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x6c100
cmpq %r12, 0x18(%rsp)
movdqa 0x50(%rsp), %xmm0
jg 0x6a26f
movq %xmm0, %rax
addq %r12, %rax
addq 0x18(%rsp), %r15
cmpq %r15, %rax
jg 0x6a26f
cmpq %r12, 0x60(%rsp)
jg 0x6a26f
addq 0x60(%rsp), %r13
cmpq %r13, %rax
jg 0x6a26f
movq %r12, 0x170(%rsp)
movdqu %xmm0, 0x178(%rsp)
movq 0x180(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x170(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x88(%rsp), %rdi
movq %rbx, %rsi
callq 0x6be93
movq 0x88(%rsp), %rdi
movq 0x90(%rsp), %rax
addq %rdi, %rax
movq %rax, 0x48(%rsp)
leaq (,%rdi,4), %rcx
shlq $0x2, %r12
subq %r12, %rcx
addq %rcx, %r14
shlq $0x2, %rbx
xorl %edx, %edx
cmpq 0x48(%rsp), %rdi
je 0x69850
movq %rdi, %rcx
subq 0x60(%rsp), %rcx
movq 0x78(%rsp), %rax
leaq (%rax,%rcx,4), %rsi
movq %rdi, 0x50(%rsp)
movq %rdi, %rcx
subq 0x18(%rsp), %rcx
movq 0x118(%rsp), %rax
leaq (%rax,%rcx,4), %rdi
xorl %r8d, %r8d
cmpq $0x3, %r8
je 0x6983f
movq %r8, %r9
imulq 0x20(%rsp), %r9
movslq %r8d, %r10
xorl %r11d, %r11d
cmpq $0x3, %r11
je 0x69837
xorl %ecx, %ecx
cmpq %r8, %r11
setbe %cl
leal -0x1(%rcx,%rcx), %r15d
cmovel %edx, %r15d
movq %r11, %rbp
imulq 0x30(%rsp), %rbp
movq %r14, %r13
xorl %ecx, %ecx
cmpq $0x3, %rcx
je 0x6982f
cmpq %rcx, %r11
movl $0x0, %eax
sbbl %eax, %eax
orl $0x1, %eax
cmpq %rcx, %r11
cmovel %edx, %eax
cmpq %rcx, %r10
movl $0x0, %r12d
sbbl %r12d, %r12d
orl $0x1, %r12d
cmpq %rcx, %r8
cmovel %edx, %r12d
imull %r15d, %eax
imull %r12d, %eax
cvtsi2ss %eax, %xmm0
mulss (%rsi,%rbp,4), %xmm0
mulss (%rdi,%r9,4), %xmm0
addss (%r13), %xmm0
movss %xmm0, (%r13)
incq %rcx
addq %rbx, %r13
jmp 0x697d4
incq %r11
jmp 0x697ab
incq %r8
jmp 0x69792
movq 0x50(%rsp), %rdi
incq %rdi
addq $0x4, %r14
jmp 0x6975a
leaq 0x88(%rsp), %rdi
pushq $0xa
popq %rdx
movl %edx, %esi
callq 0x6a8b2
leaq 0x320(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x6a8c6
movq 0x278(%rsp), %r14
movq 0x288(%rsp), %rdx
movq 0x2a0(%rsp), %rbx
movq 0x2a8(%rsp), %r15
movq 0x338(%rsp), %r12
movq 0x340(%rsp), %rax
movq %rax, 0x50(%rsp)
movdqu 0x348(%rsp), %xmm0
movdqa %xmm0, 0x30(%rsp)
movq 0x358(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x360(%rsp), %rbp
movq 0x368(%rsp), %r13
leaq 0x88(%rsp), %rdi
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x6b1ba
movq 0x90(%rsp), %rax
testq %r13, %r13
je 0x69915
cmpq %rax, %rbp
jle 0x6991e
leaq 0x3159e(%rip), %rdi     # 0x9aea0
leaq 0x315b6(%rip), %rsi     # 0x9aebf
leaq 0x3cf75(%rip), %rcx     # 0xa6885
jmp 0x6a2cc
cmpq %rax, %rbp
jne 0x6a30c
leaq 0x88(%rsp), %rdi
xorl %esi, %esi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x6b1ba
movdqa 0x30(%rsp), %xmm0
movq %xmm0, %rax
cmpq 0x90(%rsp), %rax
jg 0x6a286
leaq 0x170(%rsp), %rdx
movq 0x50(%rsp), %rax
movq %rax, (%rdx)
movdqu %xmm0, 0x8(%rdx)
leaq 0x128(%rsp), %rsi
movq 0x20(%rsp), %rax
movq %rax, (%rsi)
movq %rbp, 0x8(%rsi)
movq %r13, 0x10(%rsi)
leaq 0x88(%rsp), %rdi
callq 0x6c126
movq 0x90(%rsp), %rax
movq 0xa8(%rsp), %rcx
shlq $0x2, %r13
shlq $0x2, %r15
xorl %edx, %edx
cmpq %rax, %rdx
je 0x699cc
movq %r12, %rsi
xorl %edi, %edi
cmpq %rdi, %rcx
je 0x699c0
movd (%r14,%rdi,4), %xmm0
movd %xmm0, (%rsi)
incq %rdi
addq %r13, %rsi
jmp 0x699a9
incq %rdx
addq $0x4, %r12
addq %r15, %r14
jmp 0x6999f
leaq 0x88(%rsp), %rdi
pushq $0x8
popq %rsi
pushq $0xc
popq %rdx
pushq $0x14
popq %rcx
callq 0x10810
leaq 0x170(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x6a978
leaq 0x88(%rsp), %rdi
pushq $0x14
popq %rsi
callq 0x106be
leaq 0x128(%rsp), %rdx
andl $0x0, (%rdx)
leaq 0x3c0(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x6a9a4
movq 0x3d8(%rsp), %rax
movq 0x3f0(%rsp), %rcx
movq %rcx, 0xa0(%rsp)
movups 0x3e0(%rsp), %xmm0
movups %xmm0, 0x90(%rsp)
movq 0x188(%rsp), %rcx
movups 0x190(%rsp), %xmm0
movups %xmm0, 0xd0(%rsp)
movq 0x1a0(%rsp), %rdx
movq %rdx, 0xe0(%rsp)
movups 0x1a8(%rsp), %xmm0
movups %xmm0, 0xe8(%rsp)
movq 0x1b8(%rsp), %rdx
movq %rdx, 0xf8(%rsp)
movups 0x1c0(%rsp), %xmm0
movups %xmm0, 0x100(%rsp)
movq 0x1d0(%rsp), %rdx
movq %rdx, 0x110(%rsp)
movq 0x3f0(%rsp), %rdx
movq %rdx, 0xc0(%rsp)
movdqu 0x3e0(%rsp), %xmm0
movdqu %xmm0, 0xb0(%rsp)
movq %rax, 0x88(%rsp)
movq %rax, 0xa8(%rsp)
movq %rcx, 0xc8(%rsp)
movq 0x90(%rsp), %rax
movq 0xd0(%rsp), %rdx
cmpq %rax, %rdx
jg 0x6a26f
movdqu 0x98(%rsp), %xmm0
movq %xmm0, %rcx
addq %rax, %rcx
addq 0xd8(%rsp), %rdx
cmpq %rdx, %rcx
jg 0x6a26f
movq 0xb0(%rsp), %rdx
cmpq %rax, %rdx
jg 0x6a26f
addq 0xb8(%rsp), %rdx
cmpq %rdx, %rcx
jg 0x6a26f
movups 0x100(%rsp), %xmm1
movups 0xe8(%rsp), %xmm2
leaq 0x1e0(%rsp), %rcx
movq %rax, (%rcx)
movdqu %xmm0, 0x8(%rcx)
leaq 0x590(%rsp), %rdx
movaps %xmm2, (%rdx)
leaq 0x300(%rsp), %rsi
movaps %xmm1, (%rsi)
leaq 0x128(%rsp), %rdi
callq 0x6c1c0
movq 0x128(%rsp), %r14
movq 0x130(%rsp), %rax
addq %r14, %rax
movq %rax, 0x20(%rsp)
cmpq 0x20(%rsp), %r14
je 0x69c49
movq 0x140(%rsp), %r15
movq 0x148(%rsp), %rax
addq %r15, %rax
movq %rax, 0x30(%rsp)
cmpq 0x30(%rsp), %r15
je 0x69c41
movq 0x158(%rsp), %r12
movq 0x160(%rsp), %r13
subq $0x1, %r13
jb 0x69c3c
movq 0xa8(%rsp), %rbp
movq 0xb0(%rsp), %rbx
leaq 0xc8(%rsp), %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x6c270
movq %r14, %rcx
subq %rbx, %rcx
movss (%rax), %xmm0
maxss (%rbp,%rcx,4), %xmm0
movq 0x88(%rsp), %rax
movq %r14, %rcx
subq 0x90(%rsp), %rcx
movss %xmm0, (%rax,%rcx,4)
incq %r12
jmp 0x69be3
incq %r15
jmp 0x69bcc
incq %r14
jmp 0x69ba9
leaq 0x128(%rsp), %rdi
pushq $0xa
popq %rdx
movl %edx, %esi
callq 0x10754
leaq 0x88(%rsp), %rdi
leaq 0x128(%rsp), %rsi
callq 0x6a9f6
movq 0xa8(%rsp), %rax
movq 0xb0(%rsp), %rcx
addq %rax, %rcx
movq %rcx, 0x20(%rsp)
leaq 0x128(%rsp), %rbx
movabsq $0x100000000, %r12      # imm = 0x100000000
cmpq 0x20(%rsp), %rax
je 0x69d3d
movq 0xc0(%rsp), %r14
movq 0xc8(%rsp), %rbp
movq %rax, 0x30(%rsp)
movslq %eax, %r15
movq %r14, %r13
shlq $0x20, %r13
imull %r15d, %r14d
subq $0x1, %rbp
jb 0x69d30
cvtsi2ss %r14d, %xmm0
divss 0x3c659(%rip), %xmm0    # 0xa6334
unpcklps %xmm0, %xmm0            # xmm0 = xmm0[0,0,1,1]
mulps 0x3c65b(%rip), %xmm0    # 0xa6340
movlps %xmm0, 0x128(%rsp)
movq %rbx, %rdi
callq 0x4cf71
movq %r13, %rax
sarq $0x20, %rax
subq 0xc0(%rsp), %rax
movq %r15, %rcx
subq 0xa8(%rsp), %rcx
imulq 0xb8(%rsp), %rcx
shlq $0x3, %rax
addq 0xa0(%rsp), %rax
movlps %xmm0, (%rax,%rcx,8)
addq %r12, %r13
addl %r15d, %r14d
jmp 0x69cc8
movq 0x30(%rsp), %rax
incq %rax
jmp 0x69c9a
movq 0xa0(%rsp), %r14
movq 0xa8(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0xb8(%rsp), %r15
movq 0xc0(%rsp), %rax
movq 0xc8(%rsp), %rdx
movq 0x240(%rsp), %r12
movq 0x250(%rsp), %rcx
movq %rcx, 0x60(%rsp)
movq 0x258(%rsp), %r13
andq $0x0, 0x218(%rsp)
leaq 0x128(%rsp), %rsi
movq %rax, 0x30(%rsp)
movq %rax, (%rsi)
movq %rdx, 0x50(%rsp)
movq %rdx, 0x8(%rsi)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x10(%rsi)
leaq 0x4c0(%rsp), %rdi
callq 0x3cc70
leaq 0x1e0(%rsp), %rdi
leaq 0x4c0(%rsp), %rsi
leaq 0x218(%rsp), %rdx
leaq 0x87(%rsp), %rcx
callq 0x6c29a
movq 0x1f8(%rsp), %rbp
movq 0x200(%rsp), %rbx
movdqu 0x208(%rsp), %xmm0
movdqa %xmm0, 0x20(%rsp)
leaq 0x128(%rsp), %rdi
callq 0x4a34a
movq 0x30(%rsp), %rcx
cmpq %rbx, %rcx
jg 0x6a2b7
movdqa 0x20(%rsp), %xmm0
movq %xmm0, %rax
addq %rbx, %rax
movq 0x50(%rsp), %rdx
addq %rcx, %rdx
cmpq %rdx, %rax
jg 0x6a2b7
leaq 0x128(%rsp), %rdi
xorl %esi, %esi
movq 0x60(%rsp), %rdx
xorl %ecx, %ecx
callq 0x6b1ba
cmpq $0x0, 0x18(%rsp)
jne 0x6a2d6
movq 0x48(%rsp), %rax
cmpq 0x130(%rsp), %rax
jne 0x6a2f5
leaq 0x300(%rsp), %rcx
andq $0x0, (%rcx)
movq %rax, 0x8(%rcx)
leaq 0x578(%rsp), %rdx
movq %rbx, (%rdx)
movdqa 0x20(%rsp), %xmm0
movdqu %xmm0, 0x8(%rdx)
leaq 0x128(%rsp), %rdi
leaq 0x1dd(%rsp), %rsi
callq 0x6c5d0
movq 0x128(%rsp), %rax
movq 0x130(%rsp), %rcx
addq %rax, %rcx
shlq $0x3, %rbx
subq %rbx, %rbp
movq %r15, %rdx
imulq %rax, %rdx
shlq $0x3, %rdx
movq 0x30(%rsp), %rsi
shlq $0x3, %rsi
subq %rsi, %rdx
addq %rdx, %r14
shlq $0x3, %r15
cmpq %rcx, %rax
je 0x69f57
movq 0x140(%rsp), %r8
movq 0x148(%rsp), %rdx
movq %rax, %rsi
imulq %r13, %rsi
leaq (,%r8,8), %rdi
addq %rbp, %rdi
leaq (%r14,%r8,8), %r8
xorl %r9d, %r9d
cmpq %r9, %rdx
je 0x69f4f
movsd (%r8,%r9,8), %xmm0
movss (%r12,%rsi,4), %xmm1
unpcklps %xmm1, %xmm1            # xmm1 = xmm1[0,0,1,1]
mulps %xmm0, %xmm1
movsd (%rdi,%r9,8), %xmm0
addps %xmm1, %xmm0
movlps %xmm0, (%rdi,%r9,8)
incq %r9
jmp 0x69f25
incq %rax
addq %r15, %r14
jmp 0x69ef7
leaq 0x590(%rsp), %rdi
leaq 0x1e0(%rsp), %rsi
callq 0x6c284
leaq 0x1e0(%rsp), %rdi
callq 0x6aa8e
leaq 0x128(%rsp), %rdi
pushq $0xa
popq %rsi
callq 0x6a83e
leaq 0x300(%rsp), %rdx
andq $0x0, (%rdx)
leaq 0x1e0(%rsp), %rdi
leaq 0x128(%rsp), %rsi
callq 0x6aa2c
movq 0xa0(%rsp), %r14
movq 0xa8(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0xb8(%rsp), %r15
movq 0xc0(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0xc8(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x240(%rsp), %r12
movq 0x250(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x258(%rsp), %r13
movq 0x1f8(%rsp), %rbp
movq 0x200(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x208(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x210(%rsp), %rbx
leaq 0x128(%rsp), %rdi
callq 0x4a34a
testq %rbx, %rbx
je 0x6a07a
cmpq $0x0, 0x30(%rsp)
jg 0x6a060
movq 0x50(%rsp), %rax
addq 0x30(%rsp), %rax
cmpq %rax, 0x20(%rsp)
jle 0x6a096
leaq 0x30e39(%rip), %rdi     # 0x9aea0
leaq 0x30e51(%rip), %rsi     # 0x9aebf
leaq 0x3d471(%rip), %rcx     # 0xa74e6
jmp 0x6a2cc
cmpq $0x0, 0x30(%rsp)
jne 0x6a323
movq 0x50(%rsp), %rax
cmpq %rax, 0x20(%rsp)
jne 0x6a33a
leaq 0x128(%rsp), %rdi
xorl %esi, %esi
movq 0x60(%rsp), %rdx
xorl %ecx, %ecx
callq 0x6b1ba
cmpq $0x0, 0x18(%rsp)
jne 0x6a2d6
movq 0x48(%rsp), %rax
cmpq 0x130(%rsp), %rax
jne 0x6a2f5
leaq 0x300(%rsp), %rcx
andq $0x0, (%rcx)
movq %rax, 0x8(%rcx)
leaq 0x578(%rsp), %rdx
movq 0x78(%rsp), %rax
movq %rax, (%rdx)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rdx)
movq %rbx, 0x10(%rdx)
leaq 0x128(%rsp), %rdi
leaq 0x4c0(%rsp), %rsi
callq 0x6c6fc
movq 0x128(%rsp), %rax
movq 0x130(%rsp), %rcx
addq %rax, %rcx
shlq $0x3, %rbx
movq %r15, %rdx
imulq %rax, %rdx
shlq $0x3, %rdx
movq 0x30(%rsp), %rsi
shlq $0x3, %rsi
subq %rsi, %rdx
addq %rdx, %r14
shlq $0x3, %r15
cmpq %rcx, %rax
je 0x6a18d
movq 0x148(%rsp), %rdx
movq %rax, %rsi
imulq %r13, %rsi
movq %rbp, %rdi
xorl %r8d, %r8d
cmpq %r8, %rdx
je 0x6a185
movsd (%r14,%r8,8), %xmm0
movss (%r12,%rsi,4), %xmm1
unpcklps %xmm1, %xmm1            # xmm1 = xmm1[0,0,1,1]
mulps %xmm0, %xmm1
movsd (%rdi), %xmm0
addps %xmm1, %xmm0
movlps %xmm0, (%rdi)
incq %r8
addq %rbx, %rdi
jmp 0x6a15c
incq %rax
addq %r15, %r14
jmp 0x6a142
leaq 0x124(%rsp), %rdi
callq 0x6aa7d
leaq 0x1e0(%rsp), %rdi
callq 0x6aa7e
leaq 0x590(%rsp), %rdi
callq 0x6aa8e
leaq 0x88(%rsp), %rdi
callq 0x6aa9e
leaq 0x3c0(%rsp), %rdi
callq 0x6aaae
leaq 0x170(%rsp), %rdi
callq 0x6aabe
leaq 0x320(%rsp), %rdi
callq 0x6aace
leaq 0x3f8(%rsp), %rdi
callq 0x6aade
leaq 0x4d8(%rsp), %rdi
callq 0x6aade
leaq 0x440(%rsp), %rdi
callq 0x6aade
leaq 0x520(%rsp), %rdi
callq 0x6aaee
leaq 0x2b0(%rsp), %rdi
callq 0x6aace
leaq 0x370(%rsp), %rdi
callq 0x6aace
leaq 0x260(%rsp), %rdi
callq 0x6aace
leaq 0x488(%rsp), %rdi
callq 0x6aafe
leaq 0x228(%rsp), %rdi
callq 0x6aafe
addq $0x5c8, %rsp            # imm = 0x5C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x30c2a(%rip), %rdi     # 0x9aea0
leaq 0x30c42(%rip), %rsi     # 0x9aebf
leaq 0x3181b(%rip), %rcx     # 0x9ba9f
jmp 0x6a2cc
leaq 0x30c13(%rip), %rdi     # 0x9aea0
leaq 0x30c2b(%rip), %rsi     # 0x9aebf
leaq 0x3c664(%rip), %rcx     # 0xa68ff
jmp 0x6a2cc
leaq 0x3c54c(%rip), %rdi     # 0xa67f0
leaq 0x30c14(%rip), %rsi     # 0x9aebf
leaq 0x3c4bd(%rip), %rcx     # 0xa676f
jmp 0x6a34f
leaq 0x30be2(%rip), %rdi     # 0x9aea0
leaq 0x30bfa(%rip), %rsi     # 0x9aebf
leaq 0x324c4(%rip), %rcx     # 0x9c790
movl $0xf2, %edx
callq 0x20e0
leaq 0x30c80(%rip), %rdi     # 0x9af5d
leaq 0x30bdb(%rip), %rsi     # 0x9aebf
leaq 0x3d179(%rip), %rcx     # 0xa7464
movl $0xf7, %edx
callq 0x20e0
leaq 0x3c4f4(%rip), %rdi     # 0xa67f0
leaq 0x30bbc(%rip), %rsi     # 0x9aebf
leaq 0x3d15a(%rip), %rcx     # 0xa7464
jmp 0x6a34f
leaq 0x3c4dd(%rip), %rdi     # 0xa67f0
leaq 0x30ba5(%rip), %rsi     # 0x9aebf
leaq 0x3c564(%rip), %rcx     # 0xa6885
jmp 0x6a34f
leaq 0x30c33(%rip), %rdi     # 0x9af5d
leaq 0x30b8e(%rip), %rsi     # 0x9aebf
leaq 0x3d1ae(%rip), %rcx     # 0xa74e6
jmp 0x6a2eb
leaq 0x3c4af(%rip), %rdi     # 0xa67f0
leaq 0x30b77(%rip), %rsi     # 0x9aebf
leaq 0x3d197(%rip), %rcx     # 0xa74e6
movl $0xf8, %edx
callq 0x20e0
jmp 0x6a35b
movq %rax, %rbx
jmp 0x6a3f4
jmp 0x6a3fe
jmp 0x6a440
jmp 0x6a36f
movq %rax, %rbx
jmp 0x6a450
jmp 0x6a41c
jmp 0x6a429
jmp 0x6a3dc
jmp 0x6a385
movq %rax, %rbx
leaq 0x170(%rsp), %rdi
callq 0x6a8a2
jmp 0x6a4c5
jmp 0x6a3dc
jmp 0x6a39e
movq %rax, %rbx
jmp 0x6a4d2
jmp 0x6a42e
jmp 0x6a440
jmp 0x6a410
jmp 0x6a415
movq %rax, %rbx
jmp 0x6a477
movq %rax, %rbx
jmp 0x6a484
movq %rax, %rbx
jmp 0x6a491
movq %rax, %rbx
jmp 0x6a4ab
movq %rax, %rbx
jmp 0x6a4b8
movq %rax, %rbx
jmp 0x6a4c5
movq %rax, %rbx
leaq 0x1e0(%rsp), %rdi
callq 0x6aa7e
leaq 0x590(%rsp), %rdi
jmp 0x6a409
movq %rax, %rbx
leaq 0x1e0(%rsp), %rdi
callq 0x6aa8e
jmp 0x6a431
movq %rax, %rbx
jmp 0x6a45d
movq %rax, %rbx
jmp 0x6a46a
jmp 0x6a429
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
jmp 0x6a499
movq %rax, %rbx
jmp 0x6a49e
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x6aa9e
jmp 0x6a443
movq %rax, %rbx
leaq 0x3c0(%rsp), %rdi
callq 0x6aaae
leaq 0x170(%rsp), %rdi
callq 0x6aabe
leaq 0x320(%rsp), %rdi
callq 0x6aace
leaq 0x3f8(%rsp), %rdi
callq 0x6aade
leaq 0x4d8(%rsp), %rdi
callq 0x6aade
leaq 0x440(%rsp), %rdi
callq 0x6aade
leaq 0x520(%rsp), %rdi
callq 0x6aaee
leaq 0x2b0(%rsp), %rdi
callq 0x6aace
leaq 0x370(%rsp), %rdi
callq 0x6aace
leaq 0x260(%rsp), %rdi
callq 0x6aace
leaq 0x488(%rsp), %rdi
callq 0x6aafe
leaq 0x228(%rsp), %rdi
callq 0x6aafe
movq %rbx, %rdi
callq 0x22f0