// File: /workspace/github_cpp_makefile_star2_O3/dsharlet[P]array/include/array/array.h
// Function: void nda::copy_shape_traits<nda::shape<nda::dim<-9l, -9l, 1l>, nda::dim<-9l, -9l, -9l>, nda::dim<-9l, -9l, -9l>>, nda::shape<nda::dim<-9l, -9l, 1l>, nda::dim<-9l, -9l, -9l>, nda::dim<-9l, -9l, -9l>>>::for_each_value<void (&)(int const&, int&), int const*, int*>(nda::shape<nda::dim<-9l, -9l, 1l>, nda::dim<-9l, -9l, -9l>, nda::dim<-9l, -9l, -9l>> const&, int const*, nda::shape<nda::dim<-9l, -9l, 1l>, nda::dim<-9l, -9l, -9l>, nda::dim<-9l, -9l, -9l>> const&, int*, void (&)(int const&, int&))
NDARRAY_HOST_DEVICE static void for_each_value(
      const ShapeSrc& shape_src, TSrc src, const ShapeDst& shape_dst, TDst dst, Fn&& fn) {
    // For this function, we don't care about the order in which the callback is
    // called. Optimize the shapes for memory access order.
    auto opt_shape = internal::optimize_copy_shapes(shape_src, shape_dst);
    const auto& opt_shape_src = opt_shape.first;
    const auto& opt_shape_dst = opt_shape.second;

    for_each_value_in_order(opt_shape_dst, opt_shape_src, src, opt_shape_dst, dst, fn);
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %r8, %rbx
movq %rcx, %r14
movq %rsi, %r15
movq %rdi, %rsi
leaq 0x98(%rsp), %rdi
callq 0xcde5
testq %r15, %r15
setne %al
movq %r14, 0x30(%rsp)
testq %r14, %r14
setne %cl
testb %cl, %al
je 0xcd2d
movq 0xe8(%rsp), %rax
movq %rax, 0x60(%rsp)
testq %rax, %rax
jle 0xcd4c
movq 0xd8(%rsp), %r13
movq 0xa8(%rsp), %r9
movq 0xc0(%rsp), %r10
movq 0x120(%rsp), %rbp
movq 0x108(%rsp), %r14
movq 0xf0(%rsp), %r12
movq 0x118(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x100(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0xe0(%rsp), %rax
movq 0xf8(%rsp), %rcx
subq 0xb0(%rsp), %rcx
movq 0x110(%rsp), %rdx
imulq %r10, %rcx
subq 0xc8(%rsp), %rdx
leaq (%r15,%rcx,4), %rsi
imulq %r13, %rdx
subq 0x98(%rsp), %rax
leaq (%rsi,%rdx,4), %rsi
imulq %r9, %rax
leaq (%rsi,%rax,4), %rsi
movq %rsi, 0x10(%rsp)
movq %r13, %rsi
xorq $0x1, %rsi
movq %rbp, %rdi
xorq $0x1, %rdi
orq %rsi, %rdi
sete 0xf(%rsp)
shlq $0x2, %rdx
leaq (%rdx,%rax,4), %rax
leaq (%rax,%rcx,4), %rax
addq %r15, %rax
movq %rax, 0x28(%rsp)
movq %r9, 0x58(%rsp)
leaq (,%r9,4), %rax
movq %rax, 0x48(%rsp)
movq %r10, 0x80(%rsp)
leaq (,%r10,4), %rax
movq %rax, 0x70(%rsp)
shlq $0x2, %r13
shlq $0x2, %r12
movq %r12, 0x50(%rsp)
shlq $0x2, %r14
movq %r14, 0x78(%rsp)
shlq $0x2, %rbp
xorl %ecx, %ecx
movq %rcx, 0x68(%rsp)
cmpq $0x0, 0x38(%rsp)
jle 0xccf1
movq 0x30(%rsp), %r15
movq 0x28(%rsp), %r12
movq 0x10(%rsp), %rax
movq %rax, 0x20(%rsp)
xorl %eax, %eax
movq %rax, 0x88(%rsp)
cmpb $0x0, 0xf(%rsp)
movq %r15, 0x40(%rsp)
movq %r12, 0x90(%rsp)
je 0xcc8e
cmpq $0x0, 0x18(%rsp)
jle 0xccae
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rdi
leaq (%rdi,%rax,4), %r14
movq 0x40(%rsp), %rsi
leaq 0x4(%rdi), %r15
leaq 0x4(%rsi), %r12
callq *%rbx
movq %r15, %rdi
movq %r12, %rsi
cmpq %r14, %r15
jb 0xcc77
jmp 0xccae
movq 0x18(%rsp), %rax
movq %rax, %r14
testq %rax, %rax
jle 0xccae
movq %r12, %rdi
movq %r15, %rsi
callq *%rbx
addq %r13, %r12
addq %rbp, %r15
decq %r14
jne 0xcc9b
movq 0x80(%rsp), %rax
movq 0x20(%rsp), %rcx
leaq (%rcx,%rax,4), %rcx
movq %rcx, 0x20(%rsp)
movq 0x40(%rsp), %r15
addq 0x78(%rsp), %r15
movq 0x88(%rsp), %rax
incq %rax
movq 0x90(%rsp), %r12
addq 0x70(%rsp), %r12
cmpq 0x38(%rsp), %rax
jne 0xcc40
movq 0x58(%rsp), %rax
movq 0x10(%rsp), %rcx
leaq (%rcx,%rax,4), %rcx
movq %rcx, 0x10(%rsp)
movq 0x68(%rsp), %rcx
incq %rcx
movq 0x48(%rsp), %rax
addq %rax, 0x28(%rsp)
movq 0x50(%rsp), %rax
addq %rax, 0x30(%rsp)
cmpq 0x60(%rsp), %rcx
jne 0xcc19
jmp 0xcd4c
movq 0x100(%rsp), %rax
imulq 0x118(%rsp), %rax
imulq 0xe8(%rsp), %rax
testq %rax, %rax
jg 0xcd5e
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x96576(%rip), %rdi     # 0xa32db
leaq 0x963b1(%rip), %rsi     # 0xa311d
leaq 0x96780(%rip), %rcx     # 0xa34f3
movl $0x6b8, %edx            # imm = 0x6B8
callq 0x2100