// File: dsharlet[P]array/include/array/array.h
// Function: void nda::internal::assert_dim_compatible<nda::dim<4l, 3l, 1l>, nda::dim<-9l, -9l, -9l>>(unsigned long, nda::dim<-9l, -9l, -9l> const&)
NDARRAY_HOST_DEVICE void assert_dim_compatible(size_t dim_index, const DimSrc& src) {
  bool compatible = true;
  if (is_static(DimDst::Min) && src.min() != DimDst::Min) {
    NDARRAY_PRINT_ERR("Error converting dim %zu: expected static min " NDARRAY_INDEX_T_FMT
                      ", got " NDARRAY_INDEX_T_FMT "\n",
        dim_index, DimDst::Min, src.min());
    compatible = false;
  }
  if (is_static(DimDst::Extent) && src.extent() != DimDst::Extent) {
    NDARRAY_PRINT_ERR("Error converting dim %zu: expected static extent " NDARRAY_INDEX_T_FMT
                      ", got " NDARRAY_INDEX_T_FMT "\n",
        dim_index, DimDst::Extent, src.extent());
    compatible = false;
  }
  if (is_static(DimDst::Stride) && is_resolved(src.stride()) && src.stride() != DimDst::Stride) {
    NDARRAY_PRINT_ERR("Error converting dim %zu: expected static stride " NDARRAY_INDEX_T_FMT
                      ", got " NDARRAY_INDEX_T_FMT "\n",
        dim_index, DimDst::Stride, src.stride());
    compatible = false;
  }
  assert(compatible);
  (void)compatible;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x80(%rbp)
movq %rsi, -0x88(%rbp)
movb $0x1, -0x89(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x4, (%rax)
je 0x9c20c
movq 0x1f5dff(%rip), %rax    # 0x291fd0
movq (%rax), %rdi
movq -0x80(%rbp), %rdx
movq -0x88(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %r8
leaq 0x14c03f(%rip), %rsi    # 0x1e8238
movl $0x4, %ecx
movb $0x0, %al
callq 0x3310
movb $0x0, -0x89(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq $0x3, (%rax)
je 0x9c273
movq 0x1f5d9c(%rip), %rax    # 0x291fd0
movq (%rax), %rdi
movq -0x80(%rbp), %rdx
movq -0x88(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %r8
leaq 0x14c0d1(%rip), %rsi    # 0x1e8331
movl $0x3, %ecx
movb $0x0, %al
callq 0x3310
movb $0x0, -0x89(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
cmpq %rax, -0x8(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpq $0x0, %rax
je 0x9c318
movq -0x88(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq $0x1, (%rax)
je 0x9c318
movq 0x1f5cf7(%rip), %rax    # 0x291fd0
movq (%rax), %rdi
movq -0x80(%rbp), %rdx
movq -0x88(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %r8
leaq 0x1404a3(%rip), %rsi    # 0x1dc7a8
movl $0x1, %ecx
movb $0x0, %al
callq 0x3310
movb $0x0, -0x89(%rbp)
testb $0x1, -0x89(%rbp)
je 0x9c323
jmp 0x9c342
leaq 0x140043(%rip), %rdi    # 0x1dc36d
leaq 0x13fdb0(%rip), %rsi    # 0x1dc0e1
movl $0x3f5, %edx            # imm = 0x3F5
leaq 0x14c033(%rip), %rcx    # 0x1e8370
callq 0x3130
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax,%rax)