// File: /workspace/github_cpp_makefile_star2_O3/dsharlet[P]array/test/readme.cpp
// Function: nda::test_readme_body()
TEST(readme) {
  // Define a 3 dimensional shape, and an array of this shape.
  using my_3d_shape_type = shape<dim<>, dim<>, dim<>>;
  constexpr int width = 16;
  constexpr int height = 10;
  constexpr int depth = 3;
  my_3d_shape_type my_3d_shape(width, height, depth);
  array<int, my_3d_shape_type> my_array(my_3d_shape);

  // Access elements of this array.
  for (int z = 0; z < depth; z++) {
    for (int y = 0; y < height; y++) {
      for (int x = 0; x < width; x++) {
        my_array(x, y, z) = 5;
      }
    }
  }

  // Use for_each_value helper to access this array.
  my_array.for_each_value([](int& value) { value = 5; });

  // Use for_all_indices/for_each_index helper to access this array.
  for_all_indices(my_3d_shape, [&](int x, int y, int z) { my_array(x, y, z) = 5; });
  for_each_index(my_3d_shape, [&](my_3d_shape_type::index_type i) { my_array[i] = 5; });

  // This shows the default iteration order of for_all_indices.
  my_3d_shape_type my_shape(2, 2, 2);
  for_all_indices(
      my_shape, [](int x, int y, int z) { std::cout << x << ", " << y << ", " << z << std::endl; });
  // Output:
  // 0, 0, 0
  // 1, 0, 0
  // 0, 1, 0
  // 1, 1, 0
  // 0, 0, 1
  // 1, 0, 1
  // 0, 1, 1
  // 1, 1, 1

  // This shows the iteration order of for_all_indices with
  // a permutation.
  for_all_indices<2, 0, 1>(
      my_shape, [](int x, int y, int z) { std::cout << x << ", " << y << ", " << z << std::endl; });
  // Output:
  // 0, 0, 0
  // 0, 0, 1
  // 1, 0, 0
  // 1, 0, 1
  // 0, 1, 0
  // 0, 1, 1
  // 1, 1, 0
  // 1, 1, 1

  index_t y = 0;
  index_t z = 0;

  // Define a compile-time dense 3 dimensional shape.
  using my_dense_3d_shape_type =
      shape<dim</*Min=*/dynamic, /*Extent=*/dynamic, /*Stride=*/1>, dim<>, dim<>>;
  array<char, my_dense_3d_shape_type> my_dense_array({16, 3, 3});
  for (auto x : my_dense_array.x()) {
    // The compiler knows that each loop iteration accesses
    // elements that are contiguous in memory for contiguous x.
    my_dense_array(x, y, z) = 0;
  }

  // Define a matrix type with row, column indices.
  using matrix_shape = shape<dim<>, dense_dim<>>;
  array<double, matrix_shape> my_matrix({10, 4});
  for (auto i : my_matrix.i()) {
    for (auto j : my_matrix.j()) {
      // This loop ordering is efficient for this type.
      my_matrix(i, j) = 0.0;
    }
  }

  // Demonstrate slicing an array.
  // Slicing
  array_ref_of_rank<int, 2> channel1 = my_array(_, _, 1);
  array_ref_of_rank<int, 1> row4_channel2 = my_array(_, 4, 2);

  // Cropping
  array_ref_of_rank<int, 3> top_left = my_array(interval<>{0, 2}, interval<>{0, 4}, _);
  array_ref_of_rank<int, 2> center_channel0 = my_array(interval<>{1, 2}, interval<>{2, 4}, 0);

  assert_used(channel1);
  assert_used(row4_channel2);
  assert_used(top_left);
  assert_used(center_channel0);

  // Demonstrate iterating over an array in tiles using split.
  constexpr index_t x_split_factor = 3;
  const index_t y_split_factor = 5;
  for (auto yo : split(my_array.y(), y_split_factor)) {
    for (auto xo : split<x_split_factor>(my_array.x())) {
      auto tile = my_array(xo, yo, _);
      for (auto x : tile.x()) {
        // The compiler knows this loop has a fixed extent x_split_factor!
        tile(x, y, z) = x;
      }
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x288, %rsp            # imm = 0x288
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
leaq 0x60(%rsp), %r15
pxor %xmm0, %xmm0
movdqu %xmm0, -0x8(%r15)
movdqu %xmm0, -0x18(%r15)
movq $0x3, 0x8(%r15)
movq %rax, 0x10(%r15)
xorl %r14d, %r14d
movq %r14, 0x18(%r15)
movq $0xa, 0x20(%r15)
movq %rax, 0x28(%r15)
movq %r14, 0x30(%r15)
movq $0x10, 0x38(%r15)
movq %rax, 0x40(%r15)
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
callq 0x1a8cc
movq %rbx, %rdi
callq 0x1a9a6
movq 0x18(%rbx), %r8
movq 0x30(%rbx), %rax
movq 0x60(%rbx), %rcx
movq 0x48(%rbx), %rdx
movq 0x50(%rbx), %rsi
imulq %rcx, %rsi
movq 0x38(%rbx), %rdi
imulq %rdx, %rdi
shlq $0x2, %rdi
leaq (%rdi,%rsi,4), %rsi
movq 0x20(%rbx), %rdi
imulq %rax, %rdi
leaq (%rsi,%rdi,4), %rdi
movq %r8, (%rsp)
movq %r8, %rsi
subq %rdi, %rsi
shlq $0x2, %rax
shlq $0x2, %rdx
shlq $0x2, %rcx
movq %rsi, %rdi
xorl %r8d, %r8d
movl $0x10, %r9d
movq %rdi, %r10
movl $0x5, (%r10)
addq %rcx, %r10
decq %r9
jne 0x7c0c1
incq %r8
addq %rdx, %rdi
cmpq $0xa, %r8
jne 0x7c0b8
incq %r14
addq %rax, %rsi
cmpq $0x3, %r14
jne 0x7c0b2
leaq 0xd0(%rsp), %rdi
movq %r15, %rsi
callq 0x1ad7f
movq 0xd8(%rsp), %rax
movq %rax, 0xc8(%rsp)
testq %rax, %rax
jle 0x7c3a2
movq 0x110(%rsp), %rcx
movq 0xf8(%rsp), %rdx
movq 0xe0(%rsp), %rsi
movq 0x108(%rsp), %rdi
movq 0xf0(%rsp), %r8
movq (%rsp), %rax
leaq (%rax,%rdi,4), %r9
shlq $0x2, %rsi
shlq $0x2, %rdx
leaq 0x4(%rax), %r10
notq %rax
movq %rsi, 0x20(%rsp)
negq %rsi
movq %rsi, 0xa8(%rsp)
movq %rdx, %rsi
negq %rsi
movq %rsi, 0x28(%rsp)
leaq (,%rcx,4), %r12
movq $0x0, 0x8(%rsp)
movdqa 0x26e9c(%rip), %xmm0    # 0xa3020
movdqa 0x26ea4(%rip), %xmm1    # 0xa3030
movdqa 0x26eac(%rip), %xmm2    # 0xa3040
pcmpeqd %xmm3, %xmm3
movq %rax, 0xb0(%rsp)
movq %rax, 0x18(%rsp)
movq %r10, 0xb8(%rsp)
movq %r10, 0x38(%rsp)
movq %r9, 0xc0(%rsp)
movq %r9, 0x30(%rsp)
testq %r8, %r8
jle 0x7c36f
movq 0x20(%rsp), %rsi
movq 0x8(%rsp), %r9
imulq %r9, %rsi
movq 0xc0(%rsp), %rax
leaq (%rax,%rsi), %r11
addq 0xb8(%rsp), %rsi
movq 0xa8(%rsp), %rax
imulq %r9, %rax
addq 0xb0(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rbp
movq 0x38(%rsp), %r15
movq 0x30(%rsp), %r9
movq (%rsp), %rbx
xorl %r14d, %r14d
cmpq %r15, %r9
movq %r15, %r10
cmovaq %r9, %r10
movq %rdx, %r13
imulq %r14, %r13
leaq (%r11,%r13), %rax
addq %rsi, %r13
cmpq %r13, %rax
cmovaq %rax, %r13
cmpq $0x1, %rcx
jne 0x7c33c
testq %rdi, %rdi
jle 0x7c357
addq %rbp, %r10
shrq $0x2, %r10
addq $0x4, %r10
andq $-0x4, %r10
movq 0x28(%rsp), %rax
imulq %r14, %rax
addq 0x10(%rsp), %rax
addq %rax, %r13
shrq $0x2, %r13
movq %r13, %xmm4
pshufd $0x44, %xmm4, %xmm4     # xmm4 = xmm4[0,1,0,1]
pxor %xmm2, %xmm4
xorl %r13d, %r13d
movq %r13, %xmm5
pshufd $0x44, %xmm5, %xmm5     # xmm5 = xmm5[0,1,0,1]
movdqa %xmm5, %xmm6
por %xmm1, %xmm6
pxor %xmm2, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm4, %xmm7
pcmpeqd %xmm4, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %eax
notl %eax
testb $0x1, %al
je 0x7c2c9
movl $0x5, (%rbx,%r13,4)
pxor %xmm3, %xmm6
pextrw $0x4, %xmm6, %eax
testb $0x1, %al
je 0x7c2df
movl $0x5, 0x4(%rbx,%r13,4)
por %xmm0, %xmm5
pxor %xmm2, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm4, %xmm6
pcmpeqd %xmm4, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
pxor %xmm3, %xmm5
pextrw $0x0, %xmm5, %eax
testb $0x1, %al
je 0x7c31b
movl $0x5, 0x8(%rbx,%r13,4)
pextrw $0x4, %xmm5, %eax
testb $0x1, %al
je 0x7c32d
movl $0x5, 0xc(%rbx,%r13,4)
addq $0x4, %r13
cmpq %r13, %r10
jne 0x7c280
jmp 0x7c357
movq %rdi, %r10
movq %rbx, %r13
testq %rdi, %rdi
jle 0x7c357
movl $0x5, (%r13)
addq %r12, %r13
decq %r10
jne 0x7c347
incq %r14
addq %rdx, %rbx
addq %rdx, %r9
addq %rdx, %r15
subq %rdx, %rbp
cmpq %r8, %r14
jne 0x7c219
movq 0x8(%rsp), %rsi
incq %rsi
movq 0x20(%rsp), %rax
addq %rax, (%rsp)
addq %rax, 0x30(%rsp)
addq %rax, 0x38(%rsp)
subq %rax, 0x18(%rsp)
movq %rsi, 0x8(%rsp)
cmpq 0xc8(%rsp), %rsi
jne 0x7c1bf
movq 0x58(%rsp), %rax
movq 0xa0(%rsp), %rcx
movq 0x88(%rsp), %rdx
movq 0x70(%rsp), %rsi
movq 0x90(%rsp), %rdi
imulq %rcx, %rdi
movq 0x78(%rsp), %r8
imulq %rdx, %r8
shlq $0x2, %r8
leaq (%r8,%rdi,4), %rdi
movq 0x60(%rsp), %r8
imulq %rsi, %r8
leaq (%rdi,%r8,4), %rdi
movq %rax, %r8
subq %rdi, %r8
shlq $0x2, %rsi
shlq $0x2, %rdx
shlq $0x2, %rcx
xorl %r9d, %r9d
movq %r8, %r10
xorl %r11d, %r11d
movl $0x10, %ebx
movq %r10, %r14
movl $0x5, (%r14)
addq %rcx, %r14
decq %rbx
jne 0x7c409
incq %r11
addq %rdx, %r10
cmpq $0xa, %r11
jne 0x7c401
incq %r9
addq %rsi, %r8
cmpq $0x3, %r9
jne 0x7c3fb
subq %rdi, %rax
xorl %edi, %edi
movq %rax, %r8
xorl %r9d, %r9d
movl $0x10, %r10d
movq %r8, %r11
movl $0x5, (%r11)
addq %rcx, %r11
decq %r10
jne 0x7c444
incq %r9
addq %rdx, %r8
cmpq $0xa, %r9
jne 0x7c43b
incq %rdi
addq %rsi, %rax
cmpq $0x3, %rdi
jne 0x7c435
xorl %r14d, %r14d
movq 0x6ab53(%rip), %r15     # 0xe6fc8
leaq 0x3de1c(%rip), %r12     # 0xba298
xorl %r13d, %r13d
xorl %ebp, %ebp
movq %r15, %rdi
movl %ebp, %esi
callq 0x22f0
movq %rax, %rbx
movl $0x2, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x2210
movq %rbx, %rdi
movl %r13d, %esi
callq 0x22f0
movq %rax, %rbx
movl $0x2, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x2210
movq %rbx, %rdi
movl %r14d, %esi
callq 0x22f0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
incq %rbp
cmpq $0x2, %rbp
jne 0x7c481
incq %r13
cmpq $0x2, %r13
jne 0x7c47f
incq %r14
cmpq $0x2, %r14
jne 0x7c47c
xorl %r14d, %r14d
movq 0x6aaaa(%rip), %r15     # 0xe6fc8
leaq 0x3dd73(%rip), %r12     # 0xba298
xorl %r13d, %r13d
xorl %ebp, %ebp
movq %r15, %rdi
movl %r13d, %esi
callq 0x22f0
movq %rax, %rbx
movl $0x2, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x2210
movq %rbx, %rdi
movl %r14d, %esi
callq 0x22f0
movq %rax, %rbx
movl $0x2, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x2210
movq %rbx, %rdi
movl %ebp, %esi
callq 0x22f0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
incq %rbp
cmpq $0x2, %rbp
jne 0x7c52a
incq %r13
cmpq $0x2, %r13
jne 0x7c528
incq %r14
cmpq $0x2, %r14
jne 0x7c525
leaq 0x150(%rsp), %rsi
movq $0x0, (%rsi)
movq $0x10, 0x8(%rsi)
movabsq $-0x8000000000000000, %rbx # imm = 0x8000000000000000
movq %rbx, 0x10(%rsi)
xorl %edi, %edi
callq 0xd133
pxor %xmm0, %xmm0
leaq 0xd0(%rsp), %rdi
movdqu %xmm0, 0x8(%rdi)
movdqu %xmm0, 0x18(%rdi)
movl $0x3, %eax
movq %rax, 0x28(%rdi)
movq %rbx, 0x30(%rdi)
xorl %ecx, %ecx
movq %rcx, 0x38(%rdi)
movq %rax, 0x40(%rdi)
movq %rbx, 0x48(%rdi)
movq %rcx, 0x50(%rdi)
movq $0x10, 0x58(%rdi)
callq 0x80554
leaq 0xd0(%rsp), %rdi
callq 0x80656
movq 0x128(%rsp), %rax
testq %rax, %rax
je 0x7c691
movq 0x120(%rsp), %rcx
movq 0x108(%rsp), %rdx
imulq 0x118(%rsp), %rdx
movq 0xf0(%rsp), %rsi
imulq 0x100(%rsp), %rsi
movq 0xe8(%rsp), %rdi
addq %rdx, %rsi
addq 0x120(%rsp), %rsi
subq %rsi, %rdi
movb $0x0, (%rcx,%rdi)
incq %rcx
decq %rax
jne 0x7c64d
leaq 0x1c0(%rsp), %rsi
movq $0x0, (%rsi)
movq $0x4, 0x8(%rsi)
movq %rbx, 0x10(%rsi)
movl $0x1, %edi
callq 0xd133
pxor %xmm0, %xmm0
leaq 0x150(%rsp), %rdi
movdqu %xmm0, 0x8(%rdi)
movdqu %xmm0, 0x18(%rdi)
movq $0x4, 0x28(%rdi)
movq $0x0, 0x38(%rdi)
movq $0xa, 0x40(%rdi)
movq %rbx, 0x48(%rdi)
callq 0x808b2
leaq 0x150(%rsp), %rdi
callq 0x8097a
movq 0x190(%rsp), %rbx
testq %rbx, %rbx
je 0x7c745
movq 0x168(%rsp), %r14
movq 0x178(%rsp), %r12
movq 0x198(%rsp), %r13
shlq $0x3, %r13
leaq (,%r12,8), %r15
testq %r12, %r12
je 0x7c73d
movq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x20e0
addq %r13, %r14
decq %rbx
jne 0x7c72b
movq 0x58(%rsp), %rax
movq 0x60(%rsp), %rcx
leaq 0x60(%rsp), %r13
movq 0x40(%r13), %rdx
leaq 0x1c0(%rsp), %r14
movq %rdx, 0x28(%r14)
movups 0x30(%r13), %xmm0
movups %xmm0, 0x18(%r14)
movq 0x28(%r13), %rdx
movq %rdx, 0x10(%r14)
movups 0x18(%r13), %xmm0
movl $0x1, %r9d
movl $0x1, %edx
subq %rcx, %rdx
movq 0x70(%rsp), %r10
imulq %r10, %rdx
testq %rax, %rax
leaq (%rax,%rdx,4), %rdx
cmoveq %rax, %rdx
leaq 0x250(%rsp), %rdi
movq %rdx, (%rdi)
movq 0x20(%r14), %rdx
movq %rdx, 0x28(%rdi)
movq 0x28(%r14), %rdx
movq %rdx, 0x30(%rdi)
movups %xmm0, 0x8(%rdi)
movq 0x10(%r14), %rdx
movq %rdx, 0x18(%rdi)
movq 0x18(%r14), %rdx
movq %rdx, 0x20(%rdi)
movq 0x40(%r13), %rdx
leaq 0x1a0(%rsp), %r15
movq %rdx, 0x18(%r15)
movups 0x30(%r13), %xmm0
movups %xmm0, 0x8(%r15)
movq 0x78(%rsp), %rbx
movq 0x88(%rsp), %rdx
movl $0x4, %esi
movl $0x4, %r11d
subq %rbx, %r11
imulq %rdx, %r11
movl $0x2, %r8d
movl $0x2, %r12d
subq %rcx, %r12
imulq %r10, %r12
testq %rax, %rax
leaq (%rax,%r11,4), %r11
leaq (%r11,%r12,4), %r11
cmoveq %rax, %r11
movq %r11, (%r15)
movq 0xa0(%rsp), %r11
movdqu (%r13), %xmm0
movdqu %xmm0, 0x8(%r14)
movq 0x10(%r13), %r12
movq %r12, 0x18(%r14)
movq 0x90(%rsp), %r12
subq %r12, %r9
imulq %r11, %r9
movl $0x2, %r13d
subq %rbx, %r13
imulq %rdx, %r13
imulq %r10, %rcx
leaq (%rax,%r13,4), %r10
leaq (%r10,%r9,4), %r9
shlq $0x2, %rcx
subq %rcx, %r9
testq %rax, %rax
cmoveq %rax, %r9
imulq %r11, %r12
imulq %rdx, %rbx
shlq $0x2, %rbx
movq %rax, %rcx
subq %rbx, %rcx
shlq $0x2, %r12
subq %r12, %rcx
testq %rax, %rax
cmoveq %rax, %rcx
movq %rcx, (%r14)
xorl %eax, %eax
movq %rax, 0x20(%r14)
movq %rsi, 0x28(%r14)
movq %rdx, 0x30(%r14)
movq %rax, 0x38(%r14)
movq %r8, 0x40(%r14)
movq %r11, 0x48(%r14)
leaq 0x218(%rsp), %rbx
movq %r9, (%rbx)
movq %r8, 0x8(%rbx)
movq %rsi, 0x10(%rbx)
movq %rdx, 0x18(%rbx)
movq $0x1, 0x20(%rbx)
movq %r8, 0x28(%rbx)
movq %r11, 0x30(%rbx)
callq 0x7e45e
movq %r15, %rdi
callq 0x7e45f
movq %r14, %rdi
callq 0x7e460
movq %rbx, %rdi
callq 0x7e45e
movq 0x80(%rsp), %rax
testq %rax, %rax
je 0x7ca74
movq 0x78(%rsp), %rcx
leaq (%rax,%rcx), %rdx
movq %rdx, 0x20(%rsp)
movq %rcx, 0x10(%rsp)
addq %rax, %rcx
decq %rcx
movq %rcx, 0x18(%rsp)
cmpq $0x5, %rax
movl $0x5, %edx
cmovlq %rax, %rdx
movq %rdx, (%rsp)
movq 0x98(%rsp), %rax
cmpq $0x2, %rax
jle 0x7caaa
movq 0x90(%rsp), %r15
leaq (%r15,%rax), %rcx
movq %rcx, 0x28(%rsp)
addq %r15, %rax
addq $-0x3, %rax
movq %rax, 0x8(%rsp)
movq 0xa0(%rsp), %rbx
movq 0x58(%rsp), %r14
movq 0x60(%rsp), %r13
movq 0x88(%rsp), %r12
imulq 0x70(%rsp), %r13
movq 0x10(%rsp), %rbp
imulq %rbp, %r12
movq %r15, 0x138(%rsp)
movq $0x3, 0x140(%rsp)
movq %rbx, 0x148(%rsp)
xorl %edi, %edi
leaq 0x138(%rsp), %rsi
callq 0x58d3d
movq %r15, %rax
subq 0x90(%rsp), %rax
imulq 0xa0(%rsp), %rax
subq 0x78(%rsp), %rbp
imulq 0x88(%rsp), %rbp
testq %r14, %r14
leaq (%r14,%rbp,4), %rcx
leaq (%rcx,%rax,4), %rcx
cmoveq %r14, %rcx
leaq 0x3(%r15), %rax
shlq $0x2, %r12
subq %r12, %rcx
shlq $0x2, %r13
subq %r13, %rcx
shlq $0x2, %rbx
xorl %edx, %edx
leal (%r15,%rdx), %esi
movl %esi, (%rcx)
incq %rdx
addq %rbx, %rcx
cmpq $0x3, %rdx
jne 0x7ca09
addq $0x5, %r15
movq 0x28(%rsp), %rcx
cmpq %rcx, %r15
movq %rax, %r15
cmovgeq 0x8(%rsp), %r15
cmpq %rcx, %rax
cmovgeq %rax, %r15
cmpq %rcx, %r15
jne 0x7c96c
movq 0x10(%rsp), %rax
movq (%rsp), %rdx
addq %rdx, %rax
addq %rax, %rdx
decq %rdx
movq 0x18(%rsp), %rcx
cmpq %rdx, %rcx
cmovlq %rcx, %rdx
subq %rax, %rdx
incq %rdx
movq %rax, 0x10(%rsp)
cmpq 0x20(%rsp), %rax
jne 0x7c939
leaq 0x150(%rsp), %rdi
callq 0x80ae8
leaq 0xd0(%rsp), %rdi
callq 0x807ba
leaq 0x40(%rsp), %rdi
callq 0x1d848
addq $0x288, %rsp            # imm = 0x288
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4056a(%rip), %rdi     # 0xbd01b
leaq 0x26665(%rip), %rsi     # 0xa311d
leaq 0x40576(%rip), %rcx     # 0xbd035
movl $0x269, %edx            # imm = 0x269
callq 0x2100
jmp 0x7cafe
jmp 0x7cafe
jmp 0x7cafe
jmp 0x7cae9
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
callq 0x807ba
jmp 0x7caec
jmp 0x7cafe
jmp 0x7cae9
jmp 0x7cae9
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x1d848
movq %rbx, %rdi
callq 0x2300
movq %rax, %rdi
callq 0xc0a9