// File: /workspace/github_cpp_makefile_star2_O1/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 $0x4e8, %rsp            # imm = 0x4E8
movabsq $-0x8000000000000000, %r13 # imm = 0x8000000000000000
xorl %r15d, %r15d
leaq 0x18(%rsp), %rbx
movq %r15, (%rbx)
movl $0xa, %r12d
movq %r12, 0x8(%rbx)
movq %r13, 0x10(%rbx)
xorl %edi, %edi
movq %rbx, %rsi
callq 0x7ccc9
movq %r12, 0x8(%rbx)
movq %r13, 0x10(%rbx)
leaq 0x140(%rsp), %rbx
movl %r15d, (%rbx)
leaq 0x270(%rsp), %rdi
leaq 0x18(%rsp), %r14
movq %r14, %rsi
movq %rbx, %rdx
callq 0x7c8e8
movq %r15, (%r14)
movq %r12, 0x8(%r14)
movq %r13, 0x10(%r14)
leaq 0x18(%rsp), %r14
xorl %edi, %edi
movq %r14, %rsi
callq 0x7ccc9
movq %r12, 0x8(%rbx)
movq %r13, 0x10(%rbx)
movl %r15d, (%r14)
leaq 0x3d0(%rsp), %rdi
leaq 0x140(%rsp), %rsi
leaq 0x18(%rsp), %rdx
callq 0x7c8e8
movq 0x288(%rsp), %rbx
movups 0x290(%rsp), %xmm0
movaps %xmm0, 0x2b0(%rsp)
movq 0x2a0(%rsp), %rax
movq %rax, 0x2c0(%rsp)
movq 0x3e8(%rsp), %r12
movups 0x3f0(%rsp), %xmm0
movaps %xmm0, 0x200(%rsp)
movq 0x400(%rsp), %rax
movq %rax, 0x210(%rsp)
leaq 0xf0(%rsp), %rdx
movl $0x0, (%rdx)
leaq 0x140(%rsp), %rdi
leaq 0x98(%rsp), %rsi
leaq 0x388(%rsp), %rcx
callq 0x7ca90
leaq 0x158(%rsp), %r14
movq (%r14), %r15
leaq 0x28(%rsp), %rsi
movq %r15, -0x10(%rsi)
movq %rbx, (%rsi)
movaps 0x2b0(%rsp), %xmm0
movups %xmm0, 0x8(%rsi)
movq 0x2c0(%rsp), %rax
movq %rax, 0x18(%rsi)
movq %r12, 0x20(%rsi)
movaps 0x200(%rsp), %xmm0
movups %xmm0, 0x28(%rsi)
movq 0x210(%rsp), %rax
movq %rax, 0x38(%rsi)
leaq 0x338(%rsp), %rdi
callq 0x7c86b
leaq 0x290(%rsp), %r12
leaq 0x3f0(%rsp), %r14
movq 0x340(%rsp), %rax
testq %rax, %rax
je 0x7b246
movq 0x40(%rsp), %rcx
movq 0x48(%rsp), %rdx
movq 0x60(%rsp), %rsi
movss (%r15), %xmm0
shlq $0x2, %rsi
shlq $0x2, %rcx
movss (%rbx), %xmm1
mulss (%rdx), %xmm1
addss %xmm1, %xmm0
movss %xmm0, (%r15)
addq %rsi, %rdx
addq %rcx, %rbx
decq %rax
jne 0x7b22a
leaq 0x140(%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, 0x94(%rsp)
leaq 0x14(%rsp), %rax
movl $0x0, (%rax)
movq 0x288(%rsp), %r15
movups (%r12), %xmm0
leaq 0x28(%rsp), %rsi
movups %xmm0, 0x8(%rsi)
movq 0x10(%r12), %rcx
movq %rcx, 0x18(%rsi)
movq 0x3e8(%rsp), %rcx
movups (%r14), %xmm0
movups %xmm0, 0x28(%rsi)
movq 0x10(%r14), %rdx
movq %rdx, 0x38(%rsi)
movq %rax, -0x10(%rsi)
movq %r15, (%rsi)
movq %rcx, 0x20(%rsi)
movq %rbx, %rdi
callq 0x7c86b
movq 0x148(%rsp), %rax
testq %rax, %rax
je 0x7b317
movq 0x40(%rsp), %rcx
movq 0x48(%rsp), %rdx
movq 0x60(%rsp), %rsi
movss 0x14(%rsp), %xmm0
shlq $0x2, %rsi
shlq $0x2, %rcx
movss (%r15), %xmm1
mulss (%rdx), %xmm1
addss %xmm1, %xmm0
movss %xmm0, 0x14(%rsp)
addq %rsi, %rdx
addq %rcx, %r15
decq %rax
jne 0x7b2f9
movabsq $0xa0000000a, %rax      # imm = 0xA0000000A
leaq 0x18(%rsp), %rdi
movq %rax, (%rdi)
callq 0x7f333
movslq 0x18(%rsp), %rax
movslq 0x1c(%rsp), %rcx
xorps %xmm0, %xmm0
leaq 0x140(%rsp), %rdi
movups %xmm0, 0x8(%rdi)
movq $0x0, 0x18(%rdi)
movq %rax, 0x28(%rdi)
movq %rcx, 0x40(%rdi)
movq %r13, 0x48(%rdi)
callq 0x7f38c
leaq 0x140(%rsp), %rdi
callq 0x7f446
movabsq $0xa0000000f, %rbx      # imm = 0xA0000000F
leaq 0x18(%rsp), %rdi
movq %rbx, (%rdi)
callq 0x7f333
movslq 0x18(%rsp), %rax
movslq 0x1c(%rsp), %rcx
xorps %xmm0, %xmm0
leaq 0x338(%rsp), %rdi
movups %xmm0, 0x8(%rdi)
movq $0x0, 0x18(%rdi)
movq %rax, 0x28(%rdi)
movq %rcx, 0x40(%rdi)
movq %r13, 0x48(%rdi)
callq 0x7f38c
leaq 0x338(%rsp), %rdi
callq 0x7f446
leaq 0x18(%rsp), %rdi
movq %rbx, (%rdi)
callq 0x7f333
movslq 0x18(%rsp), %rax
movslq 0x1c(%rsp), %rcx
xorps %xmm0, %xmm0
leaq 0x2b0(%rsp), %rdi
movups %xmm0, 0x8(%rdi)
movq $0x0, 0x18(%rdi)
movq %rax, 0x28(%rdi)
movq %rcx, 0x40(%rdi)
movq %r13, 0x48(%rdi)
callq 0x7f38c
leaq 0x2b0(%rsp), %rdi
callq 0x7f446
leaq 0x2d0(%rsp), %rax
movq -0x8(%rax), %rsi
leaq 0x20(%rsp), %rdi
movq %rsi, -0x8(%rdi)
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
movups %xmm0, (%rdi)
movups %xmm1, 0x10(%rdi)
movups %xmm2, 0x20(%rdi)
leaq 0x200(%rsp), %rdx
movl $0x0, (%rdx)
callq 0x7f946
movq 0x158(%rsp), %rbx
movq 0x168(%rsp), %rax
movq 0x180(%rsp), %r11
movq 0x188(%rsp), %r14
movq 0x350(%rsp), %rcx
movq %rcx, (%rsp)
movq 0x360(%rsp), %r10
movq 0x378(%rsp), %rdi
movq 0x380(%rsp), %r12
movq 0x2c8(%rsp), %r13
movq 0x2d0(%rsp), %rcx
movq 0x2d8(%rsp), %rdx
movq 0x2e0(%rsp), %rsi
movq 0x2e8(%rsp), %r8
movq 0x2f0(%rsp), %r9
movq 0x2f8(%rsp), %rbp
testq %rbp, %rbp
je 0x7b4d8
cmpq %r11, %r9
jle 0x7b4e1
jmp 0x7bc2c
cmpq %r11, %r9
jne 0x7c5ff
cmpq %r10, %rdx
jg 0x7c562
cmpq %rdi, %rax
jne 0x7c579
leaq 0x18(%rsp), %rdi
movq %rax, 0x8(%rdi)
movq %rcx, 0x18(%rdi)
movq %rdx, 0x20(%rdi)
movq %rsi, 0x28(%rdi)
movq %r8, 0x30(%rdi)
movq %r9, 0x38(%rdi)
movq %rbp, 0x40(%rdi)
callq 0x7cc49
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x7b597
movq 0x38(%rsp), %rcx
movq 0x50(%rsp), %r15
shlq $0x2, %rbp
shlq $0x2, %r14
xorl %esi, %esi
testq %rcx, %rcx
je 0x7b58b
movq %rsi, %rdx
imulq %r12, %rdx
movq (%rsp), %rdi
leaq (%rdi,%rdx,4), %rdi
movq %r13, %r8
xorl %r9d, %r9d
testq %r15, %r15
je 0x7b57f
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 0x7b55f
incq %r9
addq $0x4, %r8
cmpq %rcx, %r9
jne 0x7b551
incq %rsi
addq $0x4, %rbx
cmpq %rax, %rsi
jne 0x7b537
movq 0x158(%rsp), %r14
movq 0x168(%rsp), %rax
movq %rax, (%rsp)
movq 0x180(%rsp), %rbx
movq 0x188(%rsp), %r12
movq 0x350(%rsp), %r13
movq 0x360(%rsp), %rax
movq 0x378(%rsp), %r15
movq 0x380(%rsp), %rbp
movl $0x0, 0x388(%rsp)
leaq 0x18(%rsp), %rdi
movq %rax, 0x8(%rsp)
movq %rax, 0x8(%rdi)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x10(%rdi)
movq %rbx, 0x20(%rdi)
movq %rax, 0x28(%rdi)
callq 0x7cd72
movups 0x18(%rsp), %xmm0
movups 0x28(%rsp), %xmm1
movups 0x38(%rsp), %xmm2
leaq 0xf0(%rsp), %rsi
movaps %xmm2, 0x20(%rsi)
movaps %xmm1, 0x10(%rsi)
movaps %xmm0, (%rsi)
leaq 0x98(%rsp), %rdi
callq 0x7ccd8
leaq 0x18(%rsp), %rdi
leaq 0x98(%rsp), %rsi
leaq 0x388(%rsp), %rdx
leaq 0x488(%rsp), %rcx
callq 0x7cfc2
movq 0x58(%rsp), %rax
cmpq %rbx, %rax
jg 0x7c562
movq %r15, %rdi
movq 0x30(%rsp), %rbx
movq 0x38(%rsp), %rdx
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %r15
movq 0x50(%rsp), %r8
movq 0x60(%rsp), %rcx
testq %r15, %r15
movq (%rsp), %r9
je 0x7b6a4
cmpq 0x8(%rsp), %rsi
jle 0x7b6af
jmp 0x7bc2c
cmpq 0x8(%rsp), %rsi
jne 0x7c5ff
cmpq %rdi, %r9
jne 0x7c579
leaq 0xf0(%rsp), %rdi
movq %r9, 0x8(%rdi)
movq %rdx, 0x18(%rdi)
movq %rsi, 0x20(%rdi)
movq %r15, 0x28(%rdi)
movq %r8, 0x30(%rdi)
movq %rax, 0x38(%rdi)
movq %rcx, 0x40(%rdi)
callq 0x7d6b3
movq 0xf8(%rsp), %rcx
testq %rcx, %rcx
je 0x7b768
movq 0x110(%rsp), %rdx
movq 0x128(%rsp), %rsi
shlq $0x2, %r15
shlq $0x2, %r12
xorl %edi, %edi
testq %rdx, %rdx
je 0x7b75c
movq %rdi, %rax
imulq %rbp, %rax
leaq (,%rax,4), %r8
addq %r13, %r8
movq %rbx, %r9
xorl %r10d, %r10d
testq %rsi, %rsi
je 0x7b751
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 %r12, %r11
cmpq %rax, %rsi
jne 0x7b72f
incq %r10
addq %r15, %r9
cmpq %rdx, %r10
jne 0x7b725
incq %rdi
addq $0x4, %r14
cmpq %rcx, %rdi
jne 0x7b708
xorl %eax, %eax
movq %rax, 0x228(%rsp)
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
movq %rcx, 0x230(%rsp)
movq %rax, 0x240(%rsp)
leaq 0x18(%rsp), %rdi
movups 0x8(%rdi), %xmm0
movups %xmm0, 0x208(%rsp)
movq %rax, 0x8(%rdi)
xorps %xmm0, %xmm0
movq 0x18(%rdi), %rax
movups %xmm0, 0x10(%rdi)
movq %rax, 0x218(%rsp)
movq %rcx, 0x100(%rsp)
movq 0x220(%rsp), %rax
movq %rax, 0xf0(%rsp)
movq 0x228(%rsp), %rax
movq %rax, 0xf8(%rsp)
movq 0x248(%rsp), %rax
movq %rax, 0x118(%rsp)
movups 0x238(%rsp), %xmm0
movups %xmm0, 0x108(%rsp)
leaq 0x38(%rsp), %rdx
movb 0x28(%rdx), %cl
movb %cl, 0x248(%rsp)
movups 0x18(%rdx), %xmm1
movups %xmm1, 0x238(%rsp)
movq 0x10(%rdx), %rcx
movq %rcx, 0x230(%rsp)
movups (%rdx), %xmm1
movups %xmm1, 0x220(%rsp)
movb %al, 0x28(%rdx)
movups %xmm0, 0x18(%rdx)
movq 0x100(%rsp), %rax
movq %rax, 0x10(%rdx)
movaps 0xf0(%rsp), %xmm0
movups %xmm0, (%rdx)
callq 0x7d4ea
movabsq $0x300000064, %rbx      # imm = 0x300000064
leaq 0xf0(%rsp), %rsi
movq %rbx, (%rsi)
leaq 0x18(%rsp), %rdi
callq 0x7fa14
xorps %xmm0, %xmm0
leaq 0x388(%rsp), %rdi
movups %xmm0, 0x8(%rdi)
movq $0x0, 0x18(%rdi)
movups 0x18(%rsp), %xmm0
movups 0x28(%rsp), %xmm1
movups %xmm0, 0x20(%rdi)
movups %xmm1, 0x30(%rdi)
movq 0x38(%rsp), %rax
movq %rax, 0x40(%rdi)
callq 0x7faca
leaq 0x388(%rsp), %rdi
callq 0x7fb7a
leaq 0xf0(%rsp), %rsi
movq %rbx, (%rsi)
leaq 0x18(%rsp), %rdi
callq 0x7fa14
xorps %xmm0, %xmm0
leaq 0x488(%rsp), %rdi
movups %xmm0, 0x8(%rdi)
movq $0x0, 0x18(%rdi)
movups 0x18(%rsp), %xmm0
movups 0x28(%rsp), %xmm1
movups %xmm0, 0x20(%rdi)
movups %xmm1, 0x30(%rdi)
movq 0x38(%rsp), %rax
movq %rax, 0x40(%rdi)
callq 0x7faca
leaq 0x488(%rsp), %rdi
callq 0x7fb7a
leaq 0xf0(%rsp), %rsi
movq %rbx, (%rsi)
leaq 0x18(%rsp), %rdi
callq 0x7fa14
xorps %xmm0, %xmm0
leaq 0x440(%rsp), %rdi
movups %xmm0, 0x8(%rdi)
movq $0x0, 0x18(%rdi)
movups 0x18(%rsp), %xmm0
movups 0x28(%rsp), %xmm1
movups %xmm0, 0x20(%rdi)
movups %xmm1, 0x30(%rdi)
movq 0x38(%rsp), %rax
movq %rax, 0x40(%rdi)
callq 0x7faca
leaq 0x440(%rsp), %rdi
callq 0x7fb7a
movq 0x4a8(%rsp), %rax
movq 0x460(%rsp), %r14
movq %rax, 0x80(%rsp)
cmpq %r14, %rax
jg 0x7c593
movq 0x468(%rsp), %rax
leaq (%rax,%r14), %rcx
movq 0x4b0(%rsp), %rdx
addq 0x80(%rsp), %rdx
cmpq %rdx, %rcx
jg 0x7c593
movq 0x3a8(%rsp), %rbx
cmpq %r14, %rbx
jg 0x7c593
movq 0x3b0(%rsp), %rdx
addq %rbx, %rdx
cmpq %rdx, %rcx
jg 0x7c593
movq 0x3a0(%rsp), %rcx
movq %rcx, 0x268(%rsp)
movq 0x3c8(%rsp), %rcx
movq %rcx, (%rsp)
movq 0x4a0(%rsp), %rcx
movq %rcx, 0x260(%rsp)
movq 0x4c8(%rsp), %rcx
movq %rcx, 0x8(%rsp)
movq 0x458(%rsp), %r15
movq 0x480(%rsp), %r13
movq 0x470(%rsp), %rcx
leaq 0x18(%rsp), %rdi
movq %r14, (%rdi)
movq %rax, 0x8(%rdi)
movq %rcx, 0x10(%rdi)
movq %r13, 0x28(%rdi)
callq 0x7d733
movq 0x20(%rsp), %rax
movq %rax, 0xe8(%rsp)
testq %rax, %rax
je 0x7bb6a
movq 0x18(%rsp), %rdi
addq %rdi, 0xe8(%rsp)
leaq (,%rdi,4), %rax
shlq $0x2, %r14
subq %r14, %rax
addq %rax, %r15
shlq $0x2, %r13
xorl %edx, %edx
movq %rbx, 0x258(%rsp)
movq %rdi, %rax
subq %rbx, %rax
movq %rdi, 0x88(%rsp)
subq 0x80(%rsp), %rdi
movq 0x268(%rsp), %rcx
leaq (%rcx,%rax,4), %rsi
movq 0x260(%rsp), %rax
leaq (%rax,%rdi,4), %rdi
xorl %r8d, %r8d
movq %r8, %r9
imulq 0x8(%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, %r12
imulq (%rsp), %r12
movq %r15, %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,%r12,4), %xmm0
mulss (%rdi,%r9,4), %xmm0
addss (%r14), %xmm0
movss %xmm0, (%r14)
incq %rax
addq %r13, %r14
cmpq $0x3, %rax
jne 0x7bada
incq %r11
cmpq $0x3, %r11
jne 0x7babe
incq %r8
cmpq $0x3, %r8
jne 0x7baaf
movq 0x88(%rsp), %rdi
incq %rdi
addq $0x4, %r15
cmpq 0xe8(%rsp), %rdi
movq 0x258(%rsp), %rbx
jne 0x7ba7e
leaq 0x18(%rsp), %rdi
movabsq $0xa0000000a, %rax      # imm = 0xA0000000A
movq %rax, (%rdi)
callq 0x7f333
movabsq $-0x8000000000000000, %r13 # imm = 0x8000000000000000
movslq 0x18(%rsp), %rax
movslq 0x1c(%rsp), %rcx
xorps %xmm0, %xmm0
leaq 0xf0(%rsp), %rdi
movups %xmm0, 0x8(%rdi)
movq $0x0, 0x18(%rdi)
movq %rax, 0x28(%rdi)
movq %rcx, 0x40(%rdi)
movq %r13, 0x48(%rdi)
callq 0x7f38c
leaq 0xf0(%rsp), %rdi
callq 0x7f446
movq 0x158(%rsp), %rbx
movq 0x168(%rsp), %r9
movq 0x180(%rsp), %rdi
movq 0x188(%rsp), %r14
movq 0x108(%rsp), %r15
movq 0x110(%rsp), %rax
movq 0x118(%rsp), %rcx
movq 0x120(%rsp), %rdx
movq 0x128(%rsp), %rsi
movq 0x130(%rsp), %r8
movq 0x138(%rsp), %r12
testq %r12, %r12
je 0x7bc46
cmpq %r9, %r8
jle 0x7bc4f
leaq 0x32c7d(%rip), %rdi     # 0xae8b0
leaq 0x32c95(%rip), %rsi     # 0xae8cf
leaq 0x3da61(%rip), %rcx     # 0xb96a2
jmp 0x7c5bf
cmpq %r9, %r8
jne 0x7c5ff
cmpq %rdi, %rcx
jg 0x7c562
leaq 0x18(%rsp), %rdi
movq %rax, (%rdi)
movq %rcx, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rsi, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r12, 0x28(%rdi)
callq 0x7d90d
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x7bcbf
movq 0x38(%rsp), %rcx
shlq $0x2, %r12
shlq $0x2, %r14
xorl %edx, %edx
testq %rcx, %rcx
je 0x7bcb0
movq %r15, %rsi
xorl %edi, %edi
movss (%rbx,%rdi,4), %xmm0
movss %xmm0, (%rsi)
incq %rdi
addq %r12, %rsi
cmpq %rdi, %rcx
jne 0x7bc9c
incq %rdx
addq $0x4, %r15
addq %r14, %rbx
cmpq %rax, %rdx
jne 0x7bc92
leaq 0x98(%rsp), %rsi
movq $0x0, (%rsi)
movq $0x8, 0x8(%rsi)
movq %r13, 0x10(%rsi)
xorl %edi, %edi
callq 0xd09f
xorps %xmm0, %xmm0
leaq 0x18(%rsp), %rdi
movups %xmm0, 0x8(%rdi)
movups %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 0x800a0
leaq 0x18(%rsp), %rdi
callq 0x80188
leaq 0x98(%rsp), %rsi
movq $0x0, (%rsi)
movq $0x14, 0x8(%rsi)
movq %r13, 0x10(%rsi)
xorl %edi, %edi
callq 0xd09f
leaq 0x190(%rsp), %rsi
movq $0x0, (%rsi)
movq $0x14, 0x8(%rsi)
leaq 0x98(%rsp), %rdx
movl $0x0, (%rdx)
leaq 0x408(%rsp), %rdi
callq 0x7c99a
movq 0x428(%rsp), %rbx
movq 0x38(%rsp), %rsi
cmpq %rbx, %rsi
jg 0x7c593
movq 0x430(%rsp), %rax
leaq (%rax,%rbx), %rcx
movq 0x40(%rsp), %rdx
addq %rsi, %rdx
cmpq %rdx, %rcx
jg 0x7c593
movq %rsi, (%rsp)
movq 0x420(%rsp), %r14
movq 0x30(%rsp), %r15
movq 0x48(%rsp), %r12
movq 0x50(%rsp), %r8
movq 0x60(%rsp), %r13
movq 0x68(%rsp), %rbp
movq 0x58(%rsp), %rcx
movq 0x70(%rsp), %rdx
movq 0x438(%rsp), %rsi
leaq 0x98(%rsp), %rdi
movq %rbx, (%rdi)
movq %rax, 0x8(%rdi)
movq %rsi, 0x10(%rdi)
movq %r8, 0x8(%rsp)
movq %r8, 0x18(%rdi)
movq %rcx, 0x20(%rdi)
movq %rbp, 0x30(%rdi)
movq %rdx, 0x38(%rdi)
callq 0x7d971
movq 0xa0(%rsp), %rax
testq %rax, %rax
je 0x7bed9
movq 0x98(%rsp), %rcx
movq 0xb0(%rsp), %rdx
movq 0xb8(%rsp), %rsi
movq 0xc8(%rsp), %r9
movq 0xd0(%rsp), %rdi
addq %rcx, %rax
leaq (%rsi,%rdx), %r8
movq %rcx, %r10
subq (%rsp), %r10
imulq %r12, %r10
movq %rdx, %r11
subq 0x8(%rsp), %r11
imulq %r13, %r11
shlq $0x2, %r11
leaq (%r11,%r10,4), %r10
leaq (%r10,%r9,4), %r9
shlq $0x2, %rbp
subq %rbp, %r9
addq %r9, %r15
shlq $0x2, %r12
shlq $0x2, %r13
testq %rsi, %rsi
je 0x7bece
movq %rcx, %r9
subq %rbx, %r9
movq %r15, %r10
movq %rdx, %r11
testq %rdi, %rdi
je 0x7bec3
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 0x7bea8
incq %r11
addq %r13, %r10
cmpq %r8, %r11
jne 0x7be9b
incq %rcx
addq %r12, %r15
cmpq %rax, %rcx
jne 0x7be8a
leaq 0x190(%rsp), %rsi
movq $0x0, (%rsi)
movq $0xa, 0x8(%rsi)
movabsq $-0x8000000000000000, %rbx # imm = 0x8000000000000000
movq %rbx, 0x10(%rsi)
xorl %edi, %edi
callq 0xd09f
xorps %xmm0, %xmm0
leaq 0x98(%rsp), %rdi
movups %xmm0, 0x8(%rdi)
movups %xmm0, 0x18(%rdi)
movl $0xa, %eax
movq %rax, 0x28(%rdi)
movq %rbx, 0x30(%rdi)
movq $0x0, 0x38(%rdi)
movq %rax, 0x40(%rdi)
callq 0x806c0
leaq 0x98(%rsp), %rdi
callq 0x8077a
movq 0xc0(%rsp), %rax
movq %rax, (%rsp)
testq %rax, %rax
je 0x7c02c
movq 0xb8(%rsp), %r14
addq %r14, (%rsp)
movss 0x3d3b4(%rip), %xmm0    # 0xb9320
movss 0x3d3b0(%rip), %xmm2    # 0xb9324
movss 0x3d3ac(%rip), %xmm3    # 0xb9328
movabsq $0x100000000, %r15      # imm = 0x100000000
movq 0xd8(%rsp), %r12
testq %r12, %r12
je 0x7c01f
movq 0xd0(%rsp), %rbx
movslq %r14d, %rbp
movq %rbx, %r13
shlq $0x20, %r13
imull %ebp, %ebx
xorps %xmm1, %xmm1
cvtsi2ss %ebx, %xmm1
divss %xmm0, %xmm1
movaps %xmm1, %xmm0
mulss %xmm2, %xmm0
mulss %xmm3, %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
callq 0x2200
movss 0x3d356(%rip), %xmm3    # 0xb9328
movss 0x3d34a(%rip), %xmm2    # 0xb9324
movq %r13, %rax
sarq $0x20, %rax
subq 0xd0(%rsp), %rax
movq %rbp, %rcx
subq 0xb8(%rsp), %rcx
imulq 0xc8(%rsp), %rcx
shlq $0x3, %rax
addq 0xb0(%rsp), %rax
movlps %xmm0, (%rax,%rcx,8)
movss 0x3d30b(%rip), %xmm0    # 0xb9320
addq %r15, %r13
addl %ebp, %ebx
decq %r12
jne 0x7bfac
incq %r14
cmpq (%rsp), %r14
jne 0x7bf86
movq 0xb0(%rsp), %rbx
movq 0xb8(%rsp), %rax
movq %rax, (%rsp)
movq 0xc0(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0xc8(%rsp), %r14
movq 0xd0(%rsp), %rbp
movq 0xd8(%rsp), %r15
movq 0x288(%rsp), %r12
movq 0x298(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x2a0(%rsp), %r13
movq $0x0, 0x2a8(%rsp)
leaq 0x190(%rsp), %rsi
movq %rbp, (%rsi)
movq %r15, 0x8(%rsi)
movq $0x1, 0x10(%rsi)
xorl %edi, %edi
callq 0xd09f
leaq 0x4d0(%rsp), %rsi
movq %rbp, (%rsi)
movq %r15, 0x8(%rsi)
leaq 0x1c8(%rsp), %rdi
leaq 0x2a8(%rsp), %rdx
leaq 0x13(%rsp), %rcx
callq 0x7d9d2
movq %rbp, %rdx
movq 0x1e8(%rsp), %rbp
cmpq %rbp, %rdx
jg 0x7c5aa
movq 0x1f0(%rsp), %rax
leaq (%rax,%rbp), %rcx
addq %rdx, %r15
cmpq %r15, %rcx
jg 0x7c5aa
movq %rdx, 0x80(%rsp)
cmpq $0x0, (%rsp)
movq 0x8(%rsp), %rsi
jne 0x7c5c9
cmpq 0x88(%rsp), %rsi
jne 0x7c5e8
movq 0x1e0(%rsp), %r15
movq 0x1f8(%rsp), %rcx
leaq 0x190(%rsp), %rdi
movq (%rsp), %rdx
movq %rdx, (%rdi)
movq %rsi, 0x8(%rdi)
movq %rbp, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movq %rcx, 0x28(%rdi)
callq 0x7dcf6
leaq 0x1e8(%rsp), %rax
movq 0x198(%rsp), %rcx
testq %rcx, %rcx
je 0x7c220
movq 0x190(%rsp), %rdx
movq 0x1a8(%rsp), %rdi
movq 0x1b0(%rsp), %rsi
addq %rdx, %rcx
shlq $0x3, %rdi
shlq $0x3, %rbp
movq %rdx, %r8
subq (%rsp), %r8
imulq %r14, %r8
leaq (%rdi,%r8,8), %r8
subq %rbp, %rdi
addq %r15, %rdi
addq $0x4, %rdi
movq 0x80(%rsp), %r9
shlq $0x3, %r9
subq %r9, %r8
addq %r8, %rbx
shlq $0x3, %r14
testq %rsi, %rsi
je 0x7c215
movq %rdx, %r8
imulq %r13, %r8
xorl %r9d, %r9d
movsd (%rbx,%r9,8), %xmm0
movss (%r12,%r8,4), %xmm1
movaps %xmm0, %xmm2
shufps $0x55, %xmm0, %xmm2     # xmm2 = xmm2[1,1],xmm0[1,1]
mulss %xmm1, %xmm0
mulss %xmm1, %xmm2
addss -0x4(%rdi,%r9,8), %xmm0
addss (%rdi,%r9,8), %xmm2
movss %xmm0, -0x4(%rdi,%r9,8)
movss %xmm2, (%rdi,%r9,8)
incq %r9
cmpq %r9, %rsi
jne 0x7c1d8
incq %rdx
addq %r14, %rbx
cmpq %rcx, %rdx
jne 0x7c1c9
xorps %xmm0, %xmm0
movups %xmm0, 0x318(%rsp)
movq $0x0, 0x328(%rsp)
leaq 0x1c8(%rsp), %rdi
movups 0x8(%rdi), %xmm1
movups %xmm1, 0x308(%rsp)
movups %xmm0, 0x8(%rdi)
movq 0x318(%rsp), %rcx
movq 0x18(%rdi), %rdx
movq %rdx, 0x318(%rsp)
movq %rcx, 0x18(%rdi)
movq 0x330(%rsp), %rcx
movq %rcx, 0x1a0(%rsp)
movups 0x320(%rsp), %xmm0
movaps %xmm0, 0x190(%rsp)
movb 0x10(%rax), %dl
movb %dl, 0x330(%rsp)
movups (%rax), %xmm1
movups %xmm1, 0x320(%rsp)
movups %xmm0, (%rax)
movb %cl, 0x10(%rax)
callq 0x7dc1a
xorl %r14d, %r14d
leaq 0x190(%rsp), %rbx
movq %r14, (%rbx)
movl $0xa, %r15d
movq %r15, 0x8(%rbx)
movabsq $-0x8000000000000000, %r12 # imm = 0x8000000000000000
movq %r12, 0x10(%rbx)
xorl %edi, %edi
movq %rbx, %rsi
callq 0x7ccc9
leaq 0x4d0(%rsp), %rsi
movq %r15, 0x8(%rsi)
movq %r12, 0x10(%rsi)
movq %r14, (%rbx)
leaq 0x1c8(%rsp), %rdi
leaq 0x190(%rsp), %rdx
callq 0x7ca0e
movq 0xb0(%rsp), %rbx
movq 0xb8(%rsp), %r9
movq 0xc0(%rsp), %rax
movq 0xc8(%rsp), %r14
movq 0xd0(%rsp), %r8
movq 0xd8(%rsp), %rdi
movq 0x288(%rsp), %r15
movq 0x298(%rsp), %rsi
movq 0x2a0(%rsp), %r12
movq 0x1e0(%rsp), %r13
movq 0x1e8(%rsp), %rcx
movq 0x1f0(%rsp), %rdx
movq 0x1f8(%rsp), %rbp
testq %rbp, %rbp
je 0x7c393
testq %r8, %r8
jg 0x7c379
addq %r8, %rdi
cmpq %rdi, %rdx
jle 0x7c3a5
leaq 0x32530(%rip), %rdi     # 0xae8b0
leaq 0x32548(%rip), %rsi     # 0xae8cf
leaq 0x3df75(%rip), %rcx     # 0xba303
jmp 0x7c5bf
testq %r8, %r8
jne 0x7c616
cmpq %rdi, %rdx
jne 0x7c62d
testq %r9, %r9
jne 0x7c5c9
movq %r8, (%rsp)
cmpq %rsi, %rax
jne 0x7c5e8
leaq 0x190(%rsp), %rdi
movq %r9, 0x8(%rsp)
movq %r9, (%rdi)
movq %rax, 0x8(%rdi)
movq %rcx, 0x18(%rdi)
movq %rdx, 0x20(%rdi)
movq %rbp, 0x28(%rdi)
callq 0x7dd5f
movq 0x198(%rsp), %rax
testq %rax, %rax
movq (%rsp), %rdi
je 0x7c483
movq 0x190(%rsp), %rcx
movq 0x1b0(%rsp), %rdx
addq %rcx, %rax
addq $0x4, %r13
shlq $0x3, %rbp
movq %rcx, %rsi
subq 0x8(%rsp), %rsi
imulq %r14, %rsi
shlq $0x3, %rsi
shlq $0x3, %rdi
subq %rdi, %rsi
addq %rsi, %rbx
shlq $0x3, %r14
testq %rdx, %rdx
je 0x7c478
movq %rcx, %rsi
imulq %r12, %rsi
movq %r13, %rdi
xorl %r8d, %r8d
movsd (%rbx,%r8,8), %xmm0
movss (%r15,%rsi,4), %xmm1
movaps %xmm0, %xmm2
shufps $0x55, %xmm0, %xmm2     # xmm2 = xmm2[1,1],xmm0[1,1]
mulss %xmm1, %xmm0
addss -0x4(%rdi), %xmm0
mulss %xmm1, %xmm2
addss (%rdi), %xmm2
movss %xmm0, -0x4(%rdi)
movss %xmm2, (%rdi)
incq %r8
addq %rbp, %rdi
cmpq %r8, %rdx
jne 0x7c440
incq %rcx
addq %r14, %rbx
cmpq %rax, %rcx
jne 0x7c42e
leaq 0x94(%rsp), %rdi
callq 0x7ca8e
leaq 0x1c8(%rsp), %rdi
callq 0x80c20
leaq 0x300(%rsp), %rdi
callq 0x7dc1a
leaq 0x98(%rsp), %rdi
callq 0x808ee
leaq 0x408(%rsp), %rdi
callq 0x805e2
leaq 0x18(%rsp), %rdi
callq 0x8032e
leaq 0xf0(%rsp), %rdi
callq 0x7f860
leaq 0x440(%rsp), %rdi
callq 0x7ffc4
leaq 0x488(%rsp), %rdi
callq 0x7ffc4
leaq 0x388(%rsp), %rdi
callq 0x7ffc4
leaq 0x200(%rsp), %rdi
callq 0x7d4ea
leaq 0x2b0(%rsp), %rdi
callq 0x7f860
leaq 0x338(%rsp), %rdi
callq 0x7f860
leaq 0x140(%rsp), %rdi
callq 0x7f860
leaq 0x3d0(%rsp), %rdi
callq 0x7f222
leaq 0x270(%rsp), %rdi
callq 0x7f222
addq $0x4e8, %rsp            # imm = 0x4E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x32347(%rip), %rdi     # 0xae8b0
leaq 0x3235f(%rip), %rsi     # 0xae8cf
leaq 0x3d1a5(%rip), %rcx     # 0xb971c
jmp 0x7c5bf
leaq 0x3d08d(%rip), %rdi     # 0xb960d
leaq 0x32348(%rip), %rsi     # 0xae8cf
leaq 0x3cffe(%rip), %rcx     # 0xb958c
jmp 0x7c642
leaq 0x32316(%rip), %rdi     # 0xae8b0
leaq 0x3232e(%rip), %rsi     # 0xae8cf
leaq 0x32e29(%rip), %rcx     # 0xaf3d1
jmp 0x7c5bf
leaq 0x322ff(%rip), %rdi     # 0xae8b0
leaq 0x32317(%rip), %rsi     # 0xae8cf
leaq 0x33a13(%rip), %rcx     # 0xaffd2
movl $0xf2, %edx
callq 0x2100
leaq 0x3239d(%rip), %rdi     # 0xae96d
leaq 0x322f8(%rip), %rsi     # 0xae8cf
leaq 0x3dca3(%rip), %rcx     # 0xba281
movl $0xf7, %edx
callq 0x2100
leaq 0x3d01e(%rip), %rdi     # 0xb960d
leaq 0x322d9(%rip), %rsi     # 0xae8cf
leaq 0x3dc84(%rip), %rcx     # 0xba281
jmp 0x7c642
leaq 0x3d007(%rip), %rdi     # 0xb960d
leaq 0x322c2(%rip), %rsi     # 0xae8cf
leaq 0x3d08e(%rip), %rcx     # 0xb96a2
jmp 0x7c642
leaq 0x32350(%rip), %rdi     # 0xae96d
leaq 0x322ab(%rip), %rsi     # 0xae8cf
leaq 0x3dcd8(%rip), %rcx     # 0xba303
jmp 0x7c5de
leaq 0x3cfd9(%rip), %rdi     # 0xb960d
leaq 0x32294(%rip), %rsi     # 0xae8cf
leaq 0x3dcc1(%rip), %rcx     # 0xba303
movl $0xf8, %edx
callq 0x2100
jmp 0x7c863
jmp 0x7c863
jmp 0x7c863
jmp 0x7c863
jmp 0x7c863
jmp 0x7c863
jmp 0x7c863
jmp 0x7c863
jmp 0x7c863
jmp 0x7c863
jmp 0x7c863
jmp 0x7c863
jmp 0x7c863
jmp 0x7c863
jmp 0x7c863
movq %rax, %rbx
leaq 0x1c8(%rsp), %rdi
callq 0x80c20
jmp 0x7c6b1
jmp 0x7c863
movq %rax, %rbx
leaq 0x300(%rsp), %rdi
callq 0x7dc1a
jmp 0x7c762
jmp 0x7c863
jmp 0x7c863
movq %rax, %rbx
leaq 0x1c8(%rsp), %rdi
callq 0x7dc1a
jmp 0x7c762
jmp 0x7c863
jmp 0x7c776
jmp 0x7c6ee
movq %rax, %rbx
jmp 0x7c786
jmp 0x7c79c
jmp 0x7c7ae
jmp 0x7c863
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x7d4ea
jmp 0x7c7f9
jmp 0x7c863
jmp 0x7c7f6
jmp 0x7c7f6
jmp 0x7c82c
movq %rax, %rbx
cmpq $0x0, 0x158(%rsp)
je 0x7c82f
leaq 0x140(%rsp), %rsi
movq %r14, %rdi
callq 0x29f7
jmp 0x7c82f
jmp 0x7c82c
movq %rax, %rbx
jmp 0x7c83c
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0x808ee
jmp 0x7c779
jmp 0x7c863
movq %rax, %rbx
leaq 0x408(%rsp), %rdi
callq 0x805e2
leaq 0x18(%rsp), %rdi
callq 0x8032e
jmp 0x7c79f
jmp 0x7c863
jmp 0x7c863
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x7f860
jmp 0x7c7b1
movq %rax, %rbx
leaq 0x440(%rsp), %rdi
callq 0x7ffc4
jmp 0x7c7c3
movq %rax, %rbx
leaq 0x488(%rsp), %rdi
callq 0x7ffc4
jmp 0x7c7d5
movq %rax, %rbx
leaq 0x388(%rsp), %rdi
callq 0x7ffc4
jmp 0x7c7e7
movq %rax, %rbx
leaq 0x200(%rsp), %rdi
callq 0x7d4ea
jmp 0x7c7f9
movq %rax, %rbx
leaq 0x2b0(%rsp), %rdi
callq 0x7f860
jmp 0x7c80b
movq %rax, %rbx
leaq 0x338(%rsp), %rdi
callq 0x7f860
jmp 0x7c81d
movq %rax, %rbx
leaq 0x140(%rsp), %rdi
callq 0x7f860
jmp 0x7c82f
movq %rax, %rbx
leaq 0x3d0(%rsp), %rdi
callq 0x7f222
leaq 0x270(%rsp), %rdi
callq 0x7f222
movq %rbx, %rdi
callq 0x2300
jmp 0x7c863
jmp 0x7c863
jmp 0x7c863
jmp 0x7c863
jmp 0x7c863
jmp 0x7c863
jmp 0x7c863
jmp 0x7c863
jmp 0x7c863
movq %rax, %rdi
callq 0xc036