// File: manikandan5[P]Image-Matching-Stitching-Warping/./CImg.h
// Function: cimg_library::CImg<unsigned char>::get_crop(int, int, int, int, int, int, int, int, bool) const
CImg<T> get_crop(const int x0, const int y0, const int z0, const int c0,
                     const int x1, const int y1, const int z1, const int c1,
                     const bool boundary_conditions=false) const {
      if (is_empty())
        throw CImgInstanceException(_cimg_instance
                                    "crop(): Empty instance.",
                                    cimg_instance);
      const int
        nx0 = x0<x1?x0:x1, nx1 = x0^x1^nx0,
        ny0 = y0<y1?y0:y1, ny1 = y0^y1^ny0,
        nz0 = z0<z1?z0:z1, nz1 = z0^z1^nz0,
        nc0 = c0<c1?c0:c1, nc1 = c0^c1^nc0;
      CImg<T> res(1U + nx1 - nx0,1U + ny1 - ny0,1U + nz1 - nz0,1U + nc1 - nc0);
      if (nx0<0 || nx1>=width() || ny0<0 || ny1>=height() || nz0<0 || nz1>=depth() || nc0<0 || nc1>=spectrum()) {
        if (boundary_conditions) cimg_forXYZC(res,x,y,z,c) res(x,y,z,c) = _atXYZC(nx0+x,ny0+y,nz0+z,nc0+c);
        else res.fill(0).draw_image(-nx0,-ny0,-nz0,-nc0,*this);
      } else res.draw_image(-nx0,-ny0,-nz0,-nc0,*this);
      return res;
    }

// Assembly:
subq $0x118, %rsp            # imm = 0x118
movq %rdi, 0x98(%rsp)
movq %rdi, %rax
movq %rax, 0xa0(%rsp)
movb 0x140(%rsp), %al
movl 0x138(%rsp), %r10d
movl 0x130(%rsp), %r10d
movl 0x128(%rsp), %r10d
movl 0x120(%rsp), %r10d
movq %rdi, 0x110(%rsp)
movq %rsi, 0x108(%rsp)
movl %edx, 0x104(%rsp)
movl %ecx, 0x100(%rsp)
movl %r8d, 0xfc(%rsp)
movl %r9d, 0xf8(%rsp)
andb $0x1, %al
movb %al, 0xf7(%rsp)
movq 0x108(%rsp), %rdi
movq %rdi, 0xa8(%rsp)
callq 0x1f750
testb $0x1, %al
jne 0x1f8e6
jmp 0x1f9de
movl $0x4008, %edi           # imm = 0x4008
callq 0x5240
movq %rax, %rcx
movq 0xa8(%rsp), %rax
movq %rcx, 0x68(%rsp)
movl (%rax), %ecx
movl %ecx, 0x70(%rsp)
movl 0x4(%rax), %ecx
movl %ecx, 0x74(%rsp)
movl 0x8(%rax), %ecx
movl %ecx, 0x78(%rsp)
movl 0xc(%rax), %ecx
movl %ecx, 0x7c(%rsp)
movq 0x18(%rax), %rcx
movq %rcx, 0x80(%rsp)
movb 0x10(%rax), %dl
leaq 0xc90a1(%rip), %rcx     # 0xe89d2
leaq 0xaa1a9(%rip), %rax     # 0xc9ae1
testb $0x1, %dl
cmovneq %rcx, %rax
movq %rax, 0x88(%rsp)
callq 0x1c2e0
movq %rax, 0x90(%rsp)
jmp 0x1f956
movl 0x7c(%rsp), %r9d
movl 0x78(%rsp), %r8d
movl 0x74(%rsp), %ecx
movl 0x70(%rsp), %edx
movq 0x68(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %r10
movq 0x90(%rsp), %r11
movq %rsp, %rax
movq %r11, 0x10(%rax)
movq %r10, 0x8(%rax)
movq %rsi, (%rax)
leaq 0xc875e(%rip), %rsi     # 0xe80f8
xorl %eax, %eax
callq 0x11fd0
jmp 0x1f9a3
movq 0x68(%rsp), %rdi
leaq 0xe0199(%rip), %rsi     # 0xffb48
leaq -0xd7a6(%rip), %rdx     # 0x12210
callq 0x5920
movq 0x68(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe8(%rsp)
movl %eax, 0xe4(%rsp)
callq 0x53a0
jmp 0x1fed8
movl 0x104(%rsp), %eax
cmpl 0x120(%rsp), %eax
jge 0x1f9fb
movl 0x104(%rsp), %eax
movl %eax, 0x64(%rsp)
jmp 0x1fa06
movl 0x120(%rsp), %eax
movl %eax, 0x64(%rsp)
movl 0x64(%rsp), %eax
movl %eax, 0xe0(%rsp)
movl 0x104(%rsp), %eax
xorl 0x120(%rsp), %eax
xorl 0xe0(%rsp), %eax
movl %eax, 0xdc(%rsp)
movl 0x100(%rsp), %eax
cmpl 0x128(%rsp), %eax
jge 0x1fa4a
movl 0x100(%rsp), %eax
movl %eax, 0x60(%rsp)
jmp 0x1fa55
movl 0x128(%rsp), %eax
movl %eax, 0x60(%rsp)
movl 0x60(%rsp), %eax
movl %eax, 0xd8(%rsp)
movl 0x100(%rsp), %eax
xorl 0x128(%rsp), %eax
xorl 0xd8(%rsp), %eax
movl %eax, 0xd4(%rsp)
movl 0xfc(%rsp), %eax
cmpl 0x130(%rsp), %eax
jge 0x1fa99
movl 0xfc(%rsp), %eax
movl %eax, 0x5c(%rsp)
jmp 0x1faa4
movl 0x130(%rsp), %eax
movl %eax, 0x5c(%rsp)
movl 0x5c(%rsp), %eax
movl %eax, 0xd0(%rsp)
movl 0xfc(%rsp), %eax
xorl 0x130(%rsp), %eax
xorl 0xd0(%rsp), %eax
movl %eax, 0xcc(%rsp)
movl 0xf8(%rsp), %eax
cmpl 0x138(%rsp), %eax
jge 0x1fae8
movl 0xf8(%rsp), %eax
movl %eax, 0x58(%rsp)
jmp 0x1faf3
movl 0x138(%rsp), %eax
movl %eax, 0x58(%rsp)
movq 0x98(%rsp), %rdi
movl 0x58(%rsp), %eax
movl %eax, 0xc8(%rsp)
movl 0xf8(%rsp), %eax
xorl 0x138(%rsp), %eax
xorl 0xc8(%rsp), %eax
movl %eax, 0xc4(%rsp)
movb $0x0, 0xc3(%rsp)
movl 0xdc(%rsp), %esi
addl $0x1, %esi
subl 0xe0(%rsp), %esi
movl 0xd4(%rsp), %edx
addl $0x1, %edx
subl 0xd8(%rsp), %edx
movl 0xcc(%rsp), %ecx
addl $0x1, %ecx
subl 0xd0(%rsp), %ecx
movl 0xc4(%rsp), %r8d
addl $0x1, %r8d
subl 0xc8(%rsp), %r8d
callq 0x15df0
cmpl $0x0, 0xe0(%rsp)
jl 0x1fc56
movq 0xa8(%rsp), %rdi
movl 0xdc(%rsp), %eax
movl %eax, 0x50(%rsp)
callq 0x173f0
movl %eax, 0x54(%rsp)
jmp 0x1fba2
movl 0x50(%rsp), %eax
movl 0x54(%rsp), %ecx
cmpl %ecx, %eax
jge 0x1fc56
cmpl $0x0, 0xd8(%rsp)
jl 0x1fc56
movq 0xa8(%rsp), %rdi
movl 0xd4(%rsp), %eax
movl %eax, 0x48(%rsp)
callq 0x17400
movl %eax, 0x4c(%rsp)
jmp 0x1fbde
movl 0x48(%rsp), %eax
movl 0x4c(%rsp), %ecx
cmpl %ecx, %eax
jge 0x1fc56
cmpl $0x0, 0xd0(%rsp)
jl 0x1fc56
movq 0xa8(%rsp), %rdi
movl 0xcc(%rsp), %eax
movl %eax, 0x40(%rsp)
callq 0x20220
movl %eax, 0x44(%rsp)
jmp 0x1fc12
movl 0x40(%rsp), %eax
movl 0x44(%rsp), %ecx
cmpl %ecx, %eax
jge 0x1fc56
cmpl $0x0, 0xc8(%rsp)
jl 0x1fc56
movq 0xa8(%rsp), %rdi
movl 0xc4(%rsp), %eax
movl %eax, 0x38(%rsp)
callq 0x20350
movl %eax, 0x3c(%rsp)
jmp 0x1fc46
movl 0x38(%rsp), %eax
movl 0x3c(%rsp), %ecx
cmpl %ecx, %eax
jl 0x1fe62
testb $0x1, 0xf7(%rsp)
je 0x1fe06
movl $0x0, 0xbc(%rsp)
movq 0x98(%rsp), %rcx
movl 0xbc(%rsp), %eax
cmpl 0xc(%rcx), %eax
jge 0x1fe04
movl $0x0, 0xb8(%rsp)
movq 0x98(%rsp), %rcx
movl 0xb8(%rsp), %eax
cmpl 0x8(%rcx), %eax
jge 0x1fdec
movl $0x0, 0xb4(%rsp)
movq 0x98(%rsp), %rcx
movl 0xb4(%rsp), %eax
cmpl 0x4(%rcx), %eax
jge 0x1fdd4
movl $0x0, 0xb0(%rsp)
movq 0x98(%rsp), %rcx
movl 0xb0(%rsp), %eax
cmpl (%rcx), %eax
jge 0x1fdbc
movq 0xa8(%rsp), %rdi
movl 0xe0(%rsp), %esi
movl 0xb0(%rsp), %eax
addl %eax, %esi
movl 0xd8(%rsp), %edx
movl 0xb4(%rsp), %eax
addl %eax, %edx
movl 0xd0(%rsp), %ecx
movl 0xb8(%rsp), %eax
addl %eax, %ecx
movl 0xc8(%rsp), %r8d
movl 0xbc(%rsp), %eax
addl %eax, %r8d
callq 0x20940
movb %al, 0x37(%rsp)
jmp 0x1fd44
movq 0x98(%rsp), %rdi
movl 0xb0(%rsp), %esi
movl 0xb4(%rsp), %edx
movl 0xb8(%rsp), %ecx
movl 0xbc(%rsp), %r8d
callq 0x20ae0
movq %rax, 0x28(%rsp)
jmp 0x1fd75
movq 0x28(%rsp), %rax
movb 0x37(%rsp), %cl
movb %cl, (%rax)
movl 0xb0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xb0(%rsp)
jmp 0x1fcd8
movq 0x98(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe8(%rsp)
movl %eax, 0xe4(%rsp)
callq 0x15650
jmp 0x1fed8
jmp 0x1fdbe
movl 0xb4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xb4(%rsp)
jmp 0x1fcb5
jmp 0x1fdd6
movl 0xb8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xb8(%rsp)
jmp 0x1fc92
jmp 0x1fdee
movl 0xbc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xbc(%rsp)
jmp 0x1fc6f
jmp 0x1fe60
movq 0x98(%rsp), %rdi
xorl %esi, %esi
callq 0x20b50
movq %rax, 0x20(%rsp)
jmp 0x1fe1c
movq 0xa8(%rsp), %r9
movq 0x20(%rsp), %rdi
movl 0xe0(%rsp), %esi
negl %esi
movl 0xd8(%rsp), %edx
negl %edx
movl 0xd0(%rsp), %ecx
negl %ecx
movl 0xc8(%rsp), %r8d
negl %r8d
movss 0xa82c9(%rip), %xmm0    # 0xc8120
callq 0x20c30
jmp 0x1fe5e
jmp 0x1fe60
jmp 0x1fea9
movq 0xa8(%rsp), %r9
movq 0x98(%rsp), %rdi
movl 0xe0(%rsp), %esi
negl %esi
movl 0xd8(%rsp), %edx
negl %edx
movl 0xd0(%rsp), %ecx
negl %ecx
movl 0xc8(%rsp), %r8d
negl %r8d
movss 0xa8280(%rip), %xmm0    # 0xc8120
callq 0x20c30
jmp 0x1fea7
jmp 0x1fea9
movb $0x1, 0xc3(%rsp)
testb $0x1, 0xc3(%rsp)
jne 0x1fec8
movq 0x98(%rsp), %rdi
callq 0x15650
movq 0xa0(%rsp), %rax
addq $0x118, %rsp            # imm = 0x118
retq
movq 0xe8(%rsp), %rdi
callq 0x5970
nopw %cs:(%rax,%rax)
nop