// File: /workspace/github_cpp_makefile_star2_O3/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 $0x4d8, %rsp            # imm = 0x4D8
movabsq $-0x8000000000000000, %rbp # imm = 0x8000000000000000
xorl %r15d, %r15d
leaq 0x48(%rsp), %rbx
movq %r15, (%rbx)
movl $0xa, %r12d
movq %r12, 0x8(%rbx)
movq %rbp, 0x10(%rbx)
xorl %edi, %edi
movq %rbx, %rsi
callq 0x7e7b4
movq %r12, 0x8(%rbx)
movq %rbp, 0x10(%rbx)
leaq 0x210(%rsp), %rbx
movl %r15d, (%rbx)
leaq 0x108(%rsp), %rdi
leaq 0x48(%rsp), %r14
movq %r14, %rsi
movq %rbx, %rdx
callq 0x7e462
movq %r15, (%r14)
movq %r12, 0x8(%r14)
movq %rbp, 0x10(%r14)
leaq 0x48(%rsp), %r14
xorl %edi, %edi
movq %r14, %rsi
callq 0x7e7b4
movq %r12, 0x8(%rbx)
movq %rbp, 0x10(%rbx)
movl %r15d, (%r14)
leaq 0x1d8(%rsp), %rdi
leaq 0x210(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0x7e462
movq 0x120(%rsp), %rbx
movups 0x128(%rsp), %xmm0
movaps %xmm0, 0x340(%rsp)
movq 0x138(%rsp), %rax
movq %rax, 0x350(%rsp)
movq 0x1f0(%rsp), %r15
movups 0x1f8(%rsp), %xmm0
movaps %xmm0, 0x260(%rsp)
movq 0x208(%rsp), %rax
movq %rax, 0x270(%rsp)
leaq 0x180(%rsp), %rdx
movl $0x0, (%rdx)
leaq 0x210(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
leaq 0x3e8(%rsp), %rcx
callq 0x7e5d8
leaq 0x228(%rsp), %r14
movq (%r14), %r12
leaq 0x58(%rsp), %rsi
movq %r12, -0x10(%rsi)
movq %rbx, (%rsi)
movaps 0x340(%rsp), %xmm0
movups %xmm0, 0x8(%rsi)
movq 0x350(%rsp), %rax
movq %rax, 0x18(%rsi)
movq %r15, 0x20(%rsi)
movaps 0x260(%rsp), %xmm0
movups %xmm0, 0x28(%rsi)
movq 0x270(%rsp), %rax
movq %rax, 0x38(%rsi)
leaq 0x398(%rsp), %rdi
callq 0x7e3e8
leaq 0x128(%rsp), %r13
leaq 0x1f8(%rsp), %r14
movq 0x3a0(%rsp), %rax
testq %rax, %rax
je 0x7ccd7
movq 0x70(%rsp), %rcx
movq 0x90(%rsp), %rdx
movss (%r12), %xmm0
shlq $0x2, %rdx
shlq $0x2, %rcx
movss (%rbx), %xmm1
mulss (%r15), %xmm1
addss %xmm1, %xmm0
movss %xmm0, (%r12)
addq %rdx, %r15
addq %rcx, %rbx
decq %rax
jne 0x7ccb9
leaq 0x210(%rsp), %rbx
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %rsi
movq 0x18(%rbx), %rax
movss (%rax), %xmm0
movss %xmm0, (%rsp)
shlq $0x2, %rsi
callq 0x21f0
movss (%rsp), %xmm0
movss %xmm0, 0xb4(%rsp)
leaq 0x44(%rsp), %rax
movl $0x0, (%rax)
movq 0x120(%rsp), %r15
movups (%r13), %xmm0
leaq 0x58(%rsp), %rsi
movups %xmm0, 0x8(%rsi)
movq 0x10(%r13), %rcx
movq %rcx, 0x18(%rsi)
movq 0x1f0(%rsp), %r12
movups (%r14), %xmm0
movups %xmm0, 0x28(%rsi)
movq 0x10(%r14), %rcx
movq %rcx, 0x38(%rsi)
movq %rax, -0x10(%rsi)
movq %r15, (%rsi)
movq %r12, 0x20(%rsi)
movq %rbx, %rdi
callq 0x7e3e8
movq 0x218(%rsp), %rax
testq %rax, %rax
je 0x7cda7
movq 0x70(%rsp), %rcx
movq 0x90(%rsp), %rdx
movss 0x44(%rsp), %xmm0
shlq $0x2, %rdx
shlq $0x2, %rcx
movss (%r15), %xmm1
mulss (%r12), %xmm1
addss %xmm1, %xmm0
movss %xmm0, 0x44(%rsp)
addq %rdx, %r12
addq %rcx, %r15
decq %rax
jne 0x7cd87
movabsq $0xa0000000a, %rax      # imm = 0xA0000000A
leaq 0x48(%rsp), %rdi
movq %rax, (%rdi)
callq 0x810bb
movslq 0x48(%rsp), %rax
movslq 0x4c(%rsp), %rcx
xorps %xmm0, %xmm0
leaq 0x210(%rsp), %rdi
movups %xmm0, 0x8(%rdi)
movq $0x0, 0x18(%rdi)
movq %rax, 0x28(%rdi)
movq %rcx, 0x40(%rdi)
movq %rbp, 0x48(%rdi)
callq 0x81114
leaq 0x210(%rsp), %rdi
callq 0x811dc
movabsq $0xa0000000f, %rbx      # imm = 0xA0000000F
leaq 0x48(%rsp), %rdi
movq %rbx, (%rdi)
callq 0x810bb
movslq 0x48(%rsp), %rax
movslq 0x4c(%rsp), %rcx
xorps %xmm0, %xmm0
leaq 0x398(%rsp), %rdi
movups %xmm0, 0x8(%rdi)
movq $0x0, 0x18(%rdi)
movq %rax, 0x28(%rdi)
movq %rcx, 0x40(%rdi)
movq %rbp, 0x48(%rdi)
callq 0x81114
leaq 0x398(%rsp), %rdi
callq 0x811dc
leaq 0x48(%rsp), %rdi
movq %rbx, (%rdi)
callq 0x810bb
movslq 0x48(%rsp), %rax
movslq 0x4c(%rsp), %rcx
xorps %xmm0, %xmm0
leaq 0x340(%rsp), %rdi
movups %xmm0, 0x8(%rdi)
movq $0x0, 0x18(%rdi)
movq %rax, 0x28(%rdi)
movq %rcx, 0x40(%rdi)
movq %rbp, 0x48(%rdi)
callq 0x81114
leaq 0x340(%rsp), %rdi
callq 0x811dc
leaq 0x360(%rsp), %rax
movq -0x8(%rax), %rsi
leaq 0x50(%rsp), %rdi
movq %rsi, -0x8(%rdi)
movdqu (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
movdqu %xmm0, (%rdi)
movups %xmm1, 0x10(%rdi)
movups %xmm2, 0x20(%rdi)
leaq 0x260(%rsp), %rdx
movl $0x0, (%rdx)
callq 0x816b2
movq 0x228(%rsp), %rbx
movq 0x238(%rsp), %rax
movq 0x250(%rsp), %r9
movq 0x258(%rsp), %r14
movq 0x3b0(%rsp), %rcx
movq %rcx, (%rsp)
movq 0x3c0(%rsp), %r8
movq 0x3d8(%rsp), %rdi
movq 0x3e0(%rsp), %r12
movq 0x358(%rsp), %r13
movq 0x360(%rsp), %rcx
movdqu 0x368(%rsp), %xmm0
movq 0x378(%rsp), %rdx
movq 0x380(%rsp), %rsi
movq 0x388(%rsp), %rbp
testq %rbp, %rbp
je 0x7cf63
cmpq %r9, %rsi
jle 0x7cf6c
jmp 0x7d6ab
cmpq %r9, %rsi
jne 0x7e0b0
movq %xmm0, %r9
cmpq %r8, %r9
jg 0x7e02a
cmpq %rdi, %rax
jne 0x7e041
leaq 0x48(%rsp), %rdi
movq %rax, 0x8(%rdi)
movq %rcx, 0x18(%rdi)
movdqu %xmm0, 0x20(%rdi)
movq %rdx, 0x30(%rdi)
movq %rsi, 0x38(%rdi)
movq %rbp, 0x40(%rdi)
callq 0x7e74a
movq 0x50(%rsp), %rax
testq %rax, %rax
je 0x7d027
movq 0x68(%rsp), %rcx
movq 0x80(%rsp), %r15
shlq $0x2, %rbp
shlq $0x2, %r14
xorl %esi, %esi
testq %rcx, %rcx
je 0x7d01b
movq %rsi, %rdx
imulq %r12, %rdx
movq (%rsp), %rdi
leaq (%rdi,%rdx,4), %rdi
movq %r13, %r8
xorl %r9d, %r9d
testq %r15, %r15
je 0x7d00f
movq %rbx, %r10
movq %r8, %r11
movq %r15, %rdx
movss (%r10), %xmm0
mulss (%rdi,%r9,4), %xmm0
addss (%r11), %xmm0
movss %xmm0, (%r11)
addq %rbp, %r11
addq %r14, %r10
decq %rdx
jne 0x7cfef
incq %r9
addq $0x4, %r8
cmpq %rcx, %r9
jne 0x7cfe1
incq %rsi
addq $0x4, %rbx
cmpq %rax, %rsi
jne 0x7cfc7
movq 0x228(%rsp), %r14
movq 0x238(%rsp), %rax
movq %rax, (%rsp)
movq 0x250(%rsp), %rbx
movq 0x258(%rsp), %r15
movq 0x3b0(%rsp), %r12
movq 0x3c0(%rsp), %rax
movq 0x3d8(%rsp), %r13
movq 0x3e0(%rsp), %rbp
movl $0x0, 0x3e8(%rsp)
leaq 0x48(%rsp), %rdi
movq %rax, 0x20(%rsp)
movq %rax, 0x8(%rdi)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x10(%rdi)
movq %rbx, 0x20(%rdi)
movq %rax, 0x28(%rdi)
callq 0x7e85d
movdqu 0x48(%rsp), %xmm0
movups 0x58(%rsp), %xmm1
movups 0x68(%rsp), %xmm2
leaq 0x180(%rsp), %rsi
movaps %xmm2, 0x20(%rsi)
movaps %xmm1, 0x10(%rsi)
movdqa %xmm0, (%rsi)
leaq 0xb8(%rsp), %rdi
callq 0x7e7c3
leaq 0x48(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
leaq 0x3e8(%rsp), %rdx
leaq 0x430(%rsp), %rcx
callq 0x7ea8e
cmpq %rbx, 0x88(%rsp)
jg 0x7e02a
movq %r13, %rsi
movq 0x60(%rsp), %rbx
movq 0x68(%rsp), %rax
movq 0x70(%rsp), %rcx
movdqu 0x78(%rsp), %xmm0
movups 0x88(%rsp), %xmm1
movq %xmm0, %r13
testq %r13, %r13
movq (%rsp), %rdx
je 0x7d13a
cmpq 0x20(%rsp), %rcx
jle 0x7d145
jmp 0x7d6ab
cmpq 0x20(%rsp), %rcx
jne 0x7e0b0
cmpq %rsi, %rdx
jne 0x7e041
leaq 0x180(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rax, 0x18(%rdi)
movq %rcx, 0x20(%rdi)
movdqu %xmm0, 0x28(%rdi)
movups %xmm1, 0x38(%rdi)
callq 0x7f2f8
movq 0x188(%rsp), %rcx
testq %rcx, %rcx
je 0x7d1f0
movq 0x1a0(%rsp), %rdx
movq 0x1b8(%rsp), %rsi
shlq $0x2, %r13
shlq $0x2, %r15
xorl %edi, %edi
testq %rdx, %rdx
je 0x7d1e4
movq %rdi, %rax
imulq %rbp, %rax
leaq (%r12,%rax,4), %r8
movq %rbx, %r9
xorl %r10d, %r10d
testq %rsi, %rsi
je 0x7d1d9
movq %r14, %r11
xorl %eax, %eax
movss (%r11), %xmm0
mulss (%r8,%r10,4), %xmm0
addss (%r9,%rax,4), %xmm0
movss %xmm0, (%r9,%rax,4)
incq %rax
addq %r15, %r11
cmpq %rax, %rsi
jne 0x7d1b7
incq %r10
addq %r13, %r9
cmpq %rdx, %r10
jne 0x7d1ad
incq %rdi
addq $0x4, %r14
cmpq %rcx, %rdi
jne 0x7d197
xorl %eax, %eax
movq %rax, 0x288(%rsp)
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
movq %rdx, 0x290(%rsp)
movq %rax, 0x2a0(%rsp)
leaq 0x48(%rsp), %rdi
movq 0x8(%rdi), %rcx
movq %rcx, 0x268(%rsp)
movq %rax, 0x8(%rdi)
movups 0x10(%rdi), %xmm0
movups %xmm0, 0x270(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movq %rdx, 0x190(%rsp)
movq 0x280(%rsp), %rax
movq %rax, 0x180(%rsp)
movq 0x288(%rsp), %rax
movq %rax, 0x188(%rsp)
movq 0x2a8(%rsp), %rax
movq %rax, 0x1a8(%rsp)
movups 0x298(%rsp), %xmm0
movups %xmm0, 0x198(%rsp)
leaq 0x68(%rsp), %rdx
movb 0x28(%rdx), %cl
movb %cl, 0x2a8(%rsp)
movups 0x18(%rdx), %xmm1
movups %xmm1, 0x298(%rsp)
movups (%rdx), %xmm1
movups %xmm1, 0x280(%rsp)
movq 0x10(%rdx), %rcx
movq %rcx, 0x290(%rsp)
movb %al, 0x28(%rdx)
movups %xmm0, 0x18(%rdx)
movq 0x190(%rsp), %rax
movq %rax, 0x10(%rdx)
movdqa 0x180(%rsp), %xmm0
movdqu %xmm0, (%rdx)
callq 0x7efa8
movabsq $0x300000064, %rbx      # imm = 0x300000064
leaq 0x180(%rsp), %rsi
movq %rbx, (%rsi)
leaq 0x48(%rsp), %rdi
callq 0x818f0
pxor %xmm0, %xmm0
leaq 0x3e8(%rsp), %rdi
movdqu %xmm0, 0x8(%rdi)
movq $0x0, 0x18(%rdi)
movdqu 0x48(%rsp), %xmm0
movups 0x58(%rsp), %xmm1
movdqu %xmm0, 0x20(%rdi)
movups %xmm1, 0x30(%rdi)
movq 0x68(%rsp), %rax
movq %rax, 0x40(%rdi)
callq 0x819a6
leaq 0x3e8(%rsp), %rdi
callq 0x81a58
leaq 0x180(%rsp), %rsi
movq %rbx, (%rsi)
leaq 0x48(%rsp), %rdi
callq 0x818f0
pxor %xmm0, %xmm0
leaq 0x430(%rsp), %rdi
movdqu %xmm0, 0x8(%rdi)
movq $0x0, 0x18(%rdi)
movdqu 0x48(%rsp), %xmm0
movups 0x58(%rsp), %xmm1
movdqu %xmm0, 0x20(%rdi)
movups %xmm1, 0x30(%rdi)
movq 0x68(%rsp), %rax
movq %rax, 0x40(%rdi)
callq 0x819a6
leaq 0x430(%rsp), %rdi
callq 0x81a58
leaq 0x180(%rsp), %rsi
movq %rbx, (%rsi)
leaq 0x48(%rsp), %rdi
callq 0x818f0
pxor %xmm0, %xmm0
leaq 0x478(%rsp), %rdi
movdqu %xmm0, 0x8(%rdi)
movq $0x0, 0x18(%rdi)
movdqu 0x48(%rsp), %xmm0
movups 0x58(%rsp), %xmm1
movdqu %xmm0, 0x20(%rdi)
movups %xmm1, 0x30(%rdi)
movq 0x68(%rsp), %rax
movq %rax, 0x40(%rdi)
callq 0x819a6
leaq 0x478(%rsp), %rdi
callq 0x81a58
movq 0x450(%rsp), %rax
movq 0x498(%rsp), %r14
movq %rax, 0x38(%rsp)
cmpq %r14, %rax
jg 0x7e013
movdqu 0x4a0(%rsp), %xmm0
movq %xmm0, %rax
addq %r14, %rax
movq 0x458(%rsp), %rcx
addq 0x38(%rsp), %rcx
cmpq %rcx, %rax
jg 0x7e013
movq 0x408(%rsp), %rbx
cmpq %r14, %rbx
jg 0x7e013
movq 0x410(%rsp), %rcx
addq %rbx, %rcx
cmpq %rcx, %rax
jg 0x7e013
movq 0x400(%rsp), %rax
movq %rax, 0x2c0(%rsp)
movq 0x428(%rsp), %rax
movq %rax, (%rsp)
movq 0x448(%rsp), %rax
movq %rax, 0x2b8(%rsp)
movq 0x470(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x490(%rsp), %r13
movq 0x4b8(%rsp), %r12
leaq 0x48(%rsp), %rdi
movq %r14, (%rdi)
movdqu %xmm0, 0x8(%rdi)
movq %r12, 0x28(%rdi)
callq 0x7f362
movq 0x50(%rsp), %rax
movq %rax, 0x178(%rsp)
testq %rax, %rax
je 0x7d5ee
movq 0x48(%rsp), %rdi
addq %rdi, 0x178(%rsp)
leaq (,%rdi,4), %rax
shlq $0x2, %r14
subq %r14, %rax
addq %rax, %r13
shlq $0x2, %r12
xorl %edx, %edx
movq %rbx, 0x2b0(%rsp)
movq %rdi, %rax
subq %rbx, %rax
movq 0x2c0(%rsp), %rcx
leaq (%rcx,%rax,4), %rsi
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
subq 0x38(%rsp), %rax
movq 0x2b8(%rsp), %rcx
leaq (%rcx,%rax,4), %rdi
xorl %r8d, %r8d
movq %r8, %r9
imulq 0x20(%rsp), %r9
movslq %r8d, %r10
xorl %r11d, %r11d
xorl %eax, %eax
cmpq %r8, %r11
setbe %al
leal -0x1(%rax,%rax), %ebx
cmovel %edx, %ebx
movq %r11, %r15
imulq (%rsp), %r15
movq %r13, %r14
xorl %eax, %eax
cmpq %rax, %r11
movl $0x0, %ecx
sbbl %ecx, %ecx
orl $0x1, %ecx
cmpq %rax, %r11
cmovel %edx, %ecx
cmpq %rax, %r10
movl $0x0, %ebp
sbbl %ebp, %ebp
orl $0x1, %ebp
cmpq %rax, %r8
cmovel %edx, %ebp
imull %ebx, %ecx
imull %ebp, %ecx
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
mulss (%rsi,%r15,4), %xmm0
mulss (%rdi,%r9,4), %xmm0
addss (%r14), %xmm0
movss %xmm0, (%r14)
incq %rax
addq %r12, %r14
cmpq $0x3, %rax
jne 0x7d561
incq %r11
cmpq $0x3, %r11
jne 0x7d545
incq %r8
cmpq $0x3, %r8
jne 0x7d536
movq 0x10(%rsp), %rdi
incq %rdi
addq $0x4, %r13
cmpq 0x178(%rsp), %rdi
movq 0x2b0(%rsp), %rbx
jne 0x7d508
leaq 0x48(%rsp), %rdi
movabsq $0xa0000000a, %rax      # imm = 0xA0000000A
movq %rax, (%rdi)
movabsq $-0x8000000000000000, %r13 # imm = 0x8000000000000000
callq 0x810bb
movslq 0x48(%rsp), %rax
movslq 0x4c(%rsp), %rcx
pxor %xmm0, %xmm0
leaq 0x180(%rsp), %rdi
movdqu %xmm0, 0x8(%rdi)
movq $0x0, 0x18(%rdi)
movq %rax, 0x28(%rdi)
movq %rcx, 0x40(%rdi)
movq %r13, 0x48(%rdi)
callq 0x81114
leaq 0x180(%rsp), %rdi
callq 0x811dc
movq 0x228(%rsp), %rbx
movq 0x238(%rsp), %rdi
movq 0x250(%rsp), %rsi
movq 0x258(%rsp), %r14
movq 0x198(%rsp), %r15
movq 0x1a0(%rsp), %rax
movdqu 0x1a8(%rsp), %xmm0
movq 0x1b8(%rsp), %rcx
movq 0x1c0(%rsp), %rdx
movq 0x1c8(%rsp), %r12
testq %r12, %r12
je 0x7d6c5
cmpq %rdi, %rdx
jle 0x7d6ce
leaq 0x3312e(%rip), %rdi     # 0xb07e0
leaq 0x33146(%rip), %rsi     # 0xb07ff
leaq 0x3de9e(%rip), %rcx     # 0xbb55e
jmp 0x7e070
cmpq %rdi, %rdx
jne 0x7e0b0
movq %xmm0, %rdi
cmpq %rsi, %rdi
jg 0x7e02a
leaq 0x48(%rsp), %rdi
movq %rax, (%rdi)
movdqu %xmm0, 0x8(%rdi)
movq %rcx, 0x18(%rdi)
movq %rdx, 0x20(%rdi)
movq %r12, 0x28(%rdi)
callq 0x7f540
movq 0x50(%rsp), %rax
testq %rax, %rax
je 0x7d740
movq 0x68(%rsp), %rcx
shlq $0x2, %r12
shlq $0x2, %r14
xorl %edx, %edx
testq %rcx, %rcx
je 0x7d731
movq %r15, %rsi
xorl %edi, %edi
movd (%rbx,%rdi,4), %xmm0
movd %xmm0, (%rsi)
incq %rdi
addq %r12, %rsi
cmpq %rdi, %rcx
jne 0x7d71d
incq %rdx
addq $0x4, %r15
addq %r14, %rbx
cmpq %rax, %rdx
jne 0x7d713
leaq 0xb8(%rsp), %rsi
movq $0x0, (%rsi)
movq $0x8, 0x8(%rsi)
movq %r13, 0x10(%rsi)
xorl %edi, %edi
callq 0xd133
pxor %xmm0, %xmm0
leaq 0x48(%rsp), %rdi
movdqu %xmm0, 0x8(%rdi)
movdqu %xmm0, 0x18(%rdi)
movq $0x14, 0x28(%rdi)
movq %r13, 0x30(%rdi)
xorl %eax, %eax
movq %rax, 0x38(%rdi)
movq $0xc, 0x40(%rdi)
movq %r13, 0x48(%rdi)
movq %rax, 0x50(%rdi)
movq $0x8, 0x58(%rdi)
callq 0x81f66
leaq 0x48(%rsp), %rdi
callq 0x8206e
leaq 0xb8(%rsp), %rsi
movq $0x0, (%rsi)
movq $0x14, 0x8(%rsi)
movq %r13, 0x10(%rsi)
xorl %edi, %edi
callq 0xd133
leaq 0x2d0(%rsp), %rsi
movq $0x0, (%rsi)
movq $0x14, 0x8(%rsi)
leaq 0xb8(%rsp), %rdx
movl $0x0, (%rdx)
leaq 0x308(%rsp), %rdi
callq 0x7e4e2
movq 0x328(%rsp), %rbx
movq 0x68(%rsp), %rbp
cmpq %rbx, %rbp
jg 0x7e013
movdqu 0x330(%rsp), %xmm0
movq %xmm0, %rax
addq %rbx, %rax
movq 0x70(%rsp), %rcx
addq %rbp, %rcx
cmpq %rcx, %rax
jg 0x7e013
leaq 0x320(%rsp), %rax
movq (%rax), %r14
movq 0x60(%rsp), %r15
movq 0x78(%rsp), %r12
movups 0x80(%rsp), %xmm1
movq 0x90(%rsp), %r13
movups 0x98(%rsp), %xmm2
leaq 0xb8(%rsp), %rdi
movq %rbx, (%rdi)
movdqu %xmm0, 0x8(%rdi)
movaps %xmm1, (%rsp)
movups %xmm1, 0x18(%rdi)
movaps %xmm2, 0x20(%rsp)
movups %xmm2, 0x30(%rdi)
callq 0x7f58e
movq 0xc0(%rsp), %rax
testq %rax, %rax
je 0x7d974
movq 0xb8(%rsp), %rcx
movq 0xd0(%rsp), %rdx
movq 0xd8(%rsp), %rsi
movq 0xe8(%rsp), %rdi
movq %rdi, 0x10(%rsp)
movq 0xf0(%rsp), %rdi
addq %rcx, %rax
leaq (%rsi,%rdx), %r8
movdqa (%rsp), %xmm0
movq %xmm0, %r10
movdqa 0x20(%rsp), %xmm0
movq %xmm0, %r11
movq %rcx, %r9
subq %rbp, %r9
imulq %r12, %r9
movq %rdx, %rbp
subq %r10, %rbp
imulq %r13, %rbp
shlq $0x2, %rbp
leaq (,%r9,4), %r9
addq %rbp, %r9
movq 0x10(%rsp), %r10
leaq (%r9,%r10,4), %r9
shlq $0x2, %r11
subq %r11, %r9
addq %r9, %r15
shlq $0x2, %r12
shlq $0x2, %r13
testq %rsi, %rsi
je 0x7d969
movq %rcx, %r9
subq %rbx, %r9
movq %r15, %r10
movq %rdx, %r11
testq %rdi, %rdi
je 0x7d95e
movss (%r14,%r9,4), %xmm0
xorl %ebp, %ebp
movss (%r10,%rbp,4), %xmm1
maxss %xmm0, %xmm1
movss %xmm1, (%r14,%r9,4)
incq %rbp
movaps %xmm1, %xmm0
cmpq %rbp, %rdi
jne 0x7d943
incq %r11
addq %r13, %r10
cmpq %r8, %r11
jne 0x7d936
incq %rcx
addq %r12, %r15
cmpq %rax, %rcx
jne 0x7d925
leaq 0x2d0(%rsp), %rsi
movq $0x0, (%rsi)
movq $0xa, 0x8(%rsi)
movabsq $-0x8000000000000000, %rbx # imm = 0x8000000000000000
movq %rbx, 0x10(%rsi)
xorl %edi, %edi
callq 0xd133
pxor %xmm0, %xmm0
leaq 0xb8(%rsp), %rdi
movdqu %xmm0, 0x8(%rdi)
movdqu %xmm0, 0x18(%rdi)
movl $0xa, %eax
movq %rax, 0x28(%rdi)
movq %rbx, 0x30(%rdi)
movq $0x0, 0x38(%rdi)
movq %rax, 0x40(%rdi)
callq 0x82670
leaq 0xb8(%rsp), %rdi
callq 0x82738
movq 0xd8(%rsp), %r14
movq 0xe0(%rsp), %rax
testq %rax, %rax
je 0x7dac8
addq %r14, %rax
movss 0x3d85b(%rip), %xmm1    # 0xbb260
movsd 0x3d843(%rip), %xmm2    # 0xbb250
movabsq $0x100000000, %r15      # imm = 0x100000000
movq %rax, (%rsp)
movq 0xf8(%rsp), %r12
testq %r12, %r12
je 0x7daa1
movq 0xf0(%rsp), %rbx
movslq %r14d, %rbp
movq %rbx, %r13
shlq $0x20, %r13
imull %ebp, %ebx
xorps %xmm0, %xmm0
cvtsi2ss %ebx, %xmm0
divss %xmm1, %xmm0
shufps $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
mulps %xmm2, %xmm0
callq 0x2200
movsd 0x3d7f4(%rip), %xmm2    # 0xbb250
movss 0x3d7fc(%rip), %xmm1    # 0xbb260
movq %r13, %rax
sarq $0x20, %rax
subq 0xf0(%rsp), %rax
movq %rbp, %rcx
subq 0xd8(%rsp), %rcx
imulq 0xe8(%rsp), %rcx
shlq $0x3, %rax
addq 0xd0(%rsp), %rax
movlps %xmm0, (%rax,%rcx,8)
addq %r15, %r13
addl %ebp, %ebx
decq %r12
jne 0x7da3d
incq %r14
movq (%rsp), %rax
cmpq %rax, %r14
jne 0x7da1b
movq 0xd8(%rsp), %r14
movq 0xe0(%rsp), %rax
movq %rax, 0x20(%rsp)
jmp 0x7dad1
movq $0x0, 0x20(%rsp)
movq 0xd0(%rsp), %rbx
movq 0xe8(%rsp), %r15
movq 0xf0(%rsp), %rcx
movq 0xf8(%rsp), %r13
movq 0x120(%rsp), %r12
movq 0x130(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x138(%rsp), %rbp
movq $0x0, 0x2c8(%rsp)
leaq 0x2d0(%rsp), %rsi
movq %rcx, (%rsp)
movq %rcx, (%rsi)
movq %r13, 0x8(%rsi)
movq $0x1, 0x10(%rsi)
xorl %edi, %edi
callq 0xd133
leaq 0x4c0(%rsp), %rsi
movq (%rsp), %rax
movq %rax, (%rsi)
movq %r13, 0x8(%rsi)
leaq 0x140(%rsp), %rdi
leaq 0x2c8(%rsp), %rdx
leaq 0x1f(%rsp), %rcx
callq 0x7f5f0
movq 0x160(%rsp), %rdx
movq (%rsp), %rcx
cmpq %rdx, %rcx
jg 0x7e05b
movdqu 0x168(%rsp), %xmm0
movq %xmm0, %rax
addq %rdx, %rax
addq %rcx, %r13
cmpq %r13, %rax
jg 0x7e05b
testq %r14, %r14
jne 0x7e07a
movq 0x20(%rsp), %rax
cmpq 0x10(%rsp), %rax
jne 0x7e099
leaq 0x158(%rsp), %rcx
movq (%rcx), %r14
leaq 0x2d0(%rsp), %rdi
movq $0x0, (%rdi)
movq %rax, 0x8(%rdi)
movq %rdx, %r13
movq %rdx, 0x18(%rdi)
movdqu %xmm0, 0x20(%rdi)
callq 0x7f97b
movq 0x2d8(%rsp), %rax
testq %rax, %rax
je 0x7dc7a
movq 0x2d0(%rsp), %rcx
movq 0x2e8(%rsp), %rsi
movq 0x2f0(%rsp), %rdx
addq %rcx, %rax
shlq $0x3, %rsi
shlq $0x3, %r13
movq %r15, %rdi
imulq %rcx, %rdi
leaq (%rsi,%rdi,8), %rdi
subq %r13, %rsi
addq %rsi, %r14
movq (%rsp), %r13
shlq $0x3, %r13
subq %r13, %rdi
addq %rdi, %rbx
shlq $0x3, %r15
testq %rdx, %rdx
je 0x7dc6f
movq %rcx, %rsi
imulq %rbp, %rsi
xorl %edi, %edi
movsd (%rbx,%rdi,8), %xmm0
movss (%r12,%rsi,4), %xmm1
unpcklps %xmm1, %xmm1            # xmm1 = xmm1[0,0,1,1]
mulps %xmm0, %xmm1
movsd (%r14,%rdi,8), %xmm0
addps %xmm1, %xmm0
movlps %xmm0, (%r14,%rdi,8)
incq %rdi
cmpq %rdi, %rdx
jne 0x7dc48
incq %rcx
addq %r15, %rbx
cmpq %rax, %rcx
jne 0x7dc3a
leaq 0x140(%rsp), %rbx
movq 0x8(%rbx), %rax
movq %rax, 0x38(%rsp)
movq 0x10(%rbx), %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rbx), %rax
movq %rax, (%rsp)
xorl %r14d, %r14d
leaq 0x2d0(%rsp), %r12
movq %r14, (%r12)
movl $0xa, %r15d
movq %r15, 0x8(%r12)
movabsq $-0x8000000000000000, %r13 # imm = 0x8000000000000000
movq %r13, 0x10(%r12)
xorl %edi, %edi
movq %r12, %rsi
callq 0x7e7b4
leaq 0x4c0(%rsp), %rsi
movq %r15, 0x8(%rsi)
movq %r13, 0x10(%rsi)
movq %r14, (%r12)
leaq 0x2d0(%rsp), %rdx
movq %rbx, %rdi
callq 0x7e556
movq 0xd0(%rsp), %rbx
movq 0xd8(%rsp), %rsi
movq 0xe0(%rsp), %rax
movq 0xe8(%rsp), %r12
movq 0xf0(%rsp), %r9
movq 0xf8(%rsp), %r8
movq 0x120(%rsp), %r13
movq 0x130(%rsp), %rdi
movq 0x138(%rsp), %r15
movq 0x158(%rsp), %rbp
movq 0x160(%rsp), %rcx
movq 0x168(%rsp), %rdx
movq 0x170(%rsp), %r14
testq %r14, %r14
je 0x7dd87
testq %r9, %r9
jg 0x7dd6d
addq %r9, %r8
cmpq %r8, %rdx
jle 0x7dd99
leaq 0x32a6c(%rip), %rdi     # 0xb07e0
leaq 0x32a84(%rip), %rsi     # 0xb07ff
leaq 0x3e387(%rip), %rcx     # 0xbc109
jmp 0x7e070
testq %r9, %r9
jne 0x7e0c7
cmpq %r8, %rdx
jne 0x7e0de
testq %rsi, %rsi
jne 0x7e07a
movq %r9, 0x20(%rsp)
cmpq %rdi, %rax
jne 0x7e099
leaq 0x2d0(%rsp), %rdi
movq $0x0, (%rdi)
movq %rax, 0x8(%rdi)
movq %rcx, 0x18(%rdi)
movq %rdx, 0x20(%rdi)
movq %r14, 0x28(%rdi)
callq 0x7f9e2
movq 0x2d8(%rsp), %rax
testq %rax, %rax
movq 0x20(%rsp), %rdi
je 0x7de5b
movq 0x2d0(%rsp), %rcx
movq 0x2f0(%rsp), %rdx
addq %rcx, %rax
shlq $0x3, %r14
movq %r12, %rsi
imulq %rcx, %rsi
shlq $0x3, %rsi
shlq $0x3, %rdi
subq %rdi, %rsi
addq %rsi, %rbx
shlq $0x3, %r12
testq %rdx, %rdx
je 0x7de50
movq %rcx, %rsi
imulq %r15, %rsi
movq %rbp, %rdi
xorl %r8d, %r8d
movsd (%rbx,%r8,8), %xmm0
movss (%r13,%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 %r14, %rdi
cmpq %r8, %rdx
jne 0x7de28
incq %rcx
addq %r12, %rbx
cmpq %rax, %rcx
jne 0x7de16
leaq 0xb4(%rsp), %rdi
callq 0x7e5d6
cmpq $0x0, 0x158(%rsp)
movabsq $-0x8000000000000000, %rbx # imm = 0x8000000000000000
je 0x7deb0
xorl %eax, %eax
movq %rax, 0x158(%rsp)
movq %rax, 0x168(%rsp)
movq %rbx, 0x170(%rsp)
movq 0x148(%rsp), %rdi
movq 0x150(%rsp), %rsi
shlq $0x3, %rsi
callq 0x21f0
cmpq $0x0, (%rsp)
je 0x7deca
movq 0x10(%rsp), %rsi
shlq $0x3, %rsi
movq 0x38(%rsp), %rdi
callq 0x21f0
leaq 0xb8(%rsp), %rdi
callq 0x8288a
cmpq $0x0, 0x320(%rsp)
je 0x7df13
pxor %xmm0, %xmm0
leaq 0x320(%rsp), %rax
movdqu %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq 0x310(%rsp), %rdi
movq 0x318(%rsp), %rsi
shlq $0x2, %rsi
callq 0x21f0
leaq 0x48(%rsp), %rdi
callq 0x82214
leaq 0x180(%rsp), %rdi
callq 0x815ce
leaq 0x478(%rsp), %rdi
callq 0x81e8a
leaq 0x430(%rsp), %rdi
callq 0x81e8a
leaq 0x3e8(%rsp), %rdi
callq 0x81e8a
leaq 0x260(%rsp), %rdi
callq 0x7efa8
leaq 0x340(%rsp), %rdi
callq 0x815ce
leaq 0x398(%rsp), %rdi
callq 0x815ce
leaq 0x210(%rsp), %rdi
callq 0x815ce
cmpq $0x0, 0x1f0(%rsp)
je 0x7dfc3
xorl %eax, %eax
movq %rax, 0x1f0(%rsp)
movq %rax, 0x200(%rsp)
movq %rbx, 0x208(%rsp)
movq 0x1e0(%rsp), %rdi
movq 0x1e8(%rsp), %rsi
shlq $0x2, %rsi
callq 0x21f0
cmpq $0x0, 0x120(%rsp)
je 0x7e001
xorl %eax, %eax
movq %rax, 0x120(%rsp)
movq %rax, 0x130(%rsp)
movq %rbx, 0x138(%rsp)
movq 0x110(%rsp), %rdi
movq 0x118(%rsp), %rsi
shlq $0x2, %rsi
callq 0x21f0
addq $0x4d8, %rsp            # imm = 0x4D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x327c6(%rip), %rdi     # 0xb07e0
leaq 0x327de(%rip), %rsi     # 0xb07ff
leaq 0x332d9(%rip), %rcx     # 0xb1301
jmp 0x7e070
leaq 0x327af(%rip), %rdi     # 0xb07e0
leaq 0x327c7(%rip), %rsi     # 0xb07ff
leaq 0x3d599(%rip), %rcx     # 0xbb5d8
jmp 0x7e070
leaq 0x3d481(%rip), %rdi     # 0xbb4c9
leaq 0x327b0(%rip), %rsi     # 0xb07ff
leaq 0x3d3f2(%rip), %rcx     # 0xbb448
jmp 0x7e0f3
leaq 0x3277e(%rip), %rdi     # 0xb07e0
leaq 0x32796(%rip), %rsi     # 0xb07ff
leaq 0x33e92(%rip), %rcx     # 0xb1f02
movl $0xf2, %edx
callq 0x2100
leaq 0x3281c(%rip), %rdi     # 0xb089d
leaq 0x32777(%rip), %rsi     # 0xb07ff
leaq 0x3dff8(%rip), %rcx     # 0xbc087
movl $0xf7, %edx
callq 0x2100
leaq 0x3d429(%rip), %rdi     # 0xbb4c9
leaq 0x32758(%rip), %rsi     # 0xb07ff
leaq 0x3dfd9(%rip), %rcx     # 0xbc087
jmp 0x7e0f3
leaq 0x3d412(%rip), %rdi     # 0xbb4c9
leaq 0x32741(%rip), %rsi     # 0xb07ff
leaq 0x3d499(%rip), %rcx     # 0xbb55e
jmp 0x7e0f3
leaq 0x327cf(%rip), %rdi     # 0xb089d
leaq 0x3272a(%rip), %rsi     # 0xb07ff
leaq 0x3e02d(%rip), %rcx     # 0xbc109
jmp 0x7e08f
leaq 0x3d3e4(%rip), %rdi     # 0xbb4c9
leaq 0x32713(%rip), %rsi     # 0xb07ff
leaq 0x3e016(%rip), %rcx     # 0xbc109
movl $0xf8, %edx
callq 0x2100
jmp 0x7e3e0
jmp 0x7e3e0
jmp 0x7e3e0
jmp 0x7e3e0
jmp 0x7e3e0
jmp 0x7e3e0
jmp 0x7e3e0
jmp 0x7e3e0
jmp 0x7e3e0
jmp 0x7e3e0
movq %rax, %rbx
cmpq $0x0, 0x158(%rsp)
je 0x7e17f
xorl %eax, %eax
movq %rax, 0x158(%rsp)
movq %rax, 0x168(%rsp)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x170(%rsp)
movq 0x148(%rsp), %rdi
movq 0x150(%rsp), %rsi
shlq $0x3, %rsi
callq 0x21f0
jmp 0x7e17f
movq %rax, %rbx
cmpq $0x0, (%rsp)
je 0x7e246
movq 0x10(%rsp), %rsi
shlq $0x3, %rsi
movq 0x38(%rsp), %rdi
callq 0x21f0
jmp 0x7e246
leaq 0x158(%rsp), %rsi
movq %rax, %rbx
cmpq $0x0, 0x158(%rsp)
je 0x7e246
leaq 0x140(%rsp), %rdi
callq 0x2a22
jmp 0x7e246
jmp 0x7e25a
jmp 0x7e1d2
movq %rax, %rbx
jmp 0x7e299
jmp 0x7e2a5
jmp 0x7e2b7
jmp 0x7e3e0
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x7efa8
jmp 0x7e302
jmp 0x7e3e0
jmp 0x7e2ff
jmp 0x7e2ff
jmp 0x7e335
movq %rax, %rbx
cmpq $0x0, 0x228(%rsp)
je 0x7e338
leaq 0x210(%rsp), %rsi
movq %r14, %rdi
callq 0x2a07
jmp 0x7e338
jmp 0x7e335
movq %rax, %rbx
jmp 0x7e380
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
callq 0x8288a
jmp 0x7e25d
jmp 0x7e3e0
movq %rax, %rbx
cmpq $0x0, 0x320(%rsp)
je 0x7e299
pxor %xmm0, %xmm0
leaq 0x320(%rsp), %rax
movdqu %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq 0x310(%rsp), %rdi
movq 0x318(%rsp), %rsi
shlq $0x2, %rsi
callq 0x21f0
leaq 0x48(%rsp), %rdi
callq 0x82214
jmp 0x7e2a8
movq %rax, %rbx
leaq 0x180(%rsp), %rdi
callq 0x815ce
jmp 0x7e2ba
movq %rax, %rbx
leaq 0x478(%rsp), %rdi
callq 0x81e8a
jmp 0x7e2cc
movq %rax, %rbx
leaq 0x430(%rsp), %rdi
callq 0x81e8a
jmp 0x7e2de
movq %rax, %rbx
leaq 0x3e8(%rsp), %rdi
callq 0x81e8a
jmp 0x7e2f0
movq %rax, %rbx
leaq 0x260(%rsp), %rdi
callq 0x7efa8
jmp 0x7e302
movq %rax, %rbx
leaq 0x340(%rsp), %rdi
callq 0x815ce
jmp 0x7e314
movq %rax, %rbx
leaq 0x398(%rsp), %rdi
callq 0x815ce
jmp 0x7e326
movq %rax, %rbx
leaq 0x210(%rsp), %rdi
callq 0x815ce
jmp 0x7e338
movq %rax, %rbx
cmpq $0x0, 0x1f0(%rsp)
je 0x7e380
xorl %eax, %eax
movq %rax, 0x1f0(%rsp)
movq %rax, 0x200(%rsp)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x208(%rsp)
movq 0x1e0(%rsp), %rdi
movq 0x1e8(%rsp), %rsi
shlq $0x2, %rsi
callq 0x21f0
cmpq $0x0, 0x120(%rsp)
je 0x7e3c8
xorl %eax, %eax
movq %rax, 0x120(%rsp)
movq %rax, 0x130(%rsp)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x138(%rsp)
movq 0x110(%rsp), %rdi
movq 0x118(%rsp), %rsi
shlq $0x2, %rsi
callq 0x21f0
movq %rbx, %rdi
callq 0x2300
jmp 0x7e3e0
jmp 0x7e3e0
jmp 0x7e3e0
jmp 0x7e3e0
jmp 0x7e3e0
jmp 0x7e3e0
jmp 0x7e3e0
jmp 0x7e3e0
movq %rax, %rdi
callq 0xc0a9