// File: manikandan5[P]Image-Matching-Stitching-Warping/./CImg.h
// Function: cimg_library::CImgDisplay::resize(int, int, bool)
CImgDisplay& resize(const int nwidth, const int nheight, const bool force_redraw=true) {
      if (!nwidth || !nheight || (is_empty() && (nwidth<0 || nheight<0))) return assign();
      if (is_empty()) return assign(nwidth,nheight);
      Display *const dpy = cimg::X11_attr().display;
      const unsigned int
        tmpdimx = (nwidth>0)?nwidth:(-nwidth*width()/100),
        tmpdimy = (nheight>0)?nheight:(-nheight*height()/100),
        dimx = tmpdimx?tmpdimx:1,
        dimy = tmpdimy?tmpdimy:1;
      XLockDisplay(dpy);
      if (_window_width!=dimx || _window_height!=dimy) {
        XWindowAttributes attr;
        for (unsigned int i = 0; i<10; ++i) {
          XResizeWindow(dpy,_window,dimx,dimy);
          XGetWindowAttributes(dpy,_window,&attr);
          if (attr.width==(int)dimx && attr.height==(int)dimy) break;
          cimg::wait(5);
        }
      }
      if (_width!=dimx || _height!=dimy) switch (cimg::X11_attr().nb_bits) {
        case 8 :  { unsigned char pixel_type = 0; _resize(pixel_type,dimx,dimy,force_redraw); } break;
        case 16 : { unsigned short pixel_type = 0; _resize(pixel_type,dimx,dimy,force_redraw); } break;
        default : { unsigned int pixel_type = 0; _resize(pixel_type,dimx,dimy,force_redraw); }
        }
      _window_width = _width = dimx; _window_height = _height = dimy;
      _is_resized = false;
      XUnlockDisplay(dpy);
      if (_is_fullscreen) move((screen_width()-_width)/2,(screen_height()-_height)/2);
      if (force_redraw) return paint();
      return *this;
    }

// Assembly:
subq $0x108, %rsp            # imm = 0x108
movb %cl, %al
movq %rdi, 0xf8(%rsp)
movl %esi, 0xf4(%rsp)
movl %edx, 0xf0(%rsp)
andb $0x1, %al
movb %al, 0xef(%rsp)
movq 0xf8(%rsp), %rax
movq %rax, 0x30(%rsp)
cmpl $0x0, 0xf4(%rsp)
je 0x5b44d
cmpl $0x0, 0xf0(%rsp)
je 0x5b44d
movq 0x30(%rsp), %rdi
callq 0x37140
testb $0x1, %al
jne 0x5b439
jmp 0x5b464
cmpl $0x0, 0xf4(%rsp)
jl 0x5b44d
cmpl $0x0, 0xf0(%rsp)
jge 0x5b464
movq 0x30(%rsp), %rdi
callq 0x32b00
movq %rax, 0x100(%rsp)
jmp 0x5b7f3
movq 0x30(%rsp), %rdi
callq 0x37140
testb $0x1, %al
jne 0x5b474
jmp 0x5b4ad
movq 0x30(%rsp), %rdi
movl 0xf4(%rsp), %esi
movl 0xf0(%rsp), %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x3, %r8d
xorl %r9d, %r9d
movl $0x0, (%rsp)
callq 0x5b810
movq %rax, 0x100(%rsp)
jmp 0x5b7f3
callq 0x37200
movq 0x2068(%rax), %rax
movq %rax, 0xe0(%rsp)
cmpl $0x0, 0xf4(%rsp)
jle 0x5b4d8
movl 0xf4(%rsp), %eax
movl %eax, 0x2c(%rsp)
jmp 0x5b504
movq 0x30(%rsp), %rdi
xorl %eax, %eax
subl 0xf4(%rsp), %eax
movl %eax, 0x28(%rsp)
callq 0x17aa0
movl %eax, %ecx
movl 0x28(%rsp), %eax
imull %ecx, %eax
movl $0x64, %ecx
cltd
idivl %ecx
movl %eax, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
movl %eax, 0xdc(%rsp)
cmpl $0x0, 0xf0(%rsp)
jle 0x5b526
movl 0xf0(%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0x5b552
movq 0x30(%rsp), %rdi
xorl %eax, %eax
subl 0xf0(%rsp), %eax
movl %eax, 0x20(%rsp)
callq 0x17bc0
movl %eax, %ecx
movl 0x20(%rsp), %eax
imull %ecx, %eax
movl $0x64, %ecx
cltd
idivl %ecx
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
movl %eax, 0xd8(%rsp)
cmpl $0x0, 0xdc(%rsp)
je 0x5b574
movl 0xdc(%rsp), %eax
movl %eax, 0x1c(%rsp)
jmp 0x5b57f
movl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x5b57f
movl 0x1c(%rsp), %eax
movl %eax, 0xd4(%rsp)
cmpl $0x0, 0xd8(%rsp)
je 0x5b5a1
movl 0xd8(%rsp), %eax
movl %eax, 0x18(%rsp)
jmp 0x5b5ac
movl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x5b5ac
movl 0x18(%rsp), %eax
movl %eax, 0xd0(%rsp)
movq 0xe0(%rsp), %rdi
callq 0x5290
movq 0x30(%rsp), %rax
movl 0x40(%rax), %eax
cmpl 0xd4(%rsp), %eax
jne 0x5b5ea
movq 0x30(%rsp), %rax
movl 0x44(%rax), %eax
cmpl 0xd0(%rsp), %eax
je 0x5b673
movl $0x0, 0x44(%rsp)
cmpl $0xa, 0x44(%rsp)
jae 0x5b671
movq 0x30(%rsp), %rax
movq 0xe0(%rsp), %rdi
movq 0x4d0(%rax), %rsi
movl 0xd4(%rsp), %edx
movl 0xd0(%rsp), %ecx
callq 0x5790
movq 0x30(%rsp), %rax
movq 0xe0(%rsp), %rdi
movq 0x4d0(%rax), %rsi
leaq 0x48(%rsp), %rdx
callq 0x5990
movl 0x50(%rsp), %eax
cmpl 0xd4(%rsp), %eax
jne 0x5b65a
movl 0x54(%rsp), %eax
cmpl 0xd0(%rsp), %eax
jne 0x5b65a
jmp 0x5b671
movl $0x5, %edi
callq 0x5b970
movl 0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x44(%rsp)
jmp 0x5b5f2
jmp 0x5b673
movq 0x30(%rsp), %rax
movl 0x18(%rax), %eax
cmpl 0xd4(%rsp), %eax
jne 0x5b699
movq 0x30(%rsp), %rax
movl 0x1c(%rax), %eax
cmpl 0xd0(%rsp), %eax
je 0x5b758
callq 0x37200
movl 0x2070(%rax), %eax
movl %eax, 0x14(%rsp)
subl $0x8, %eax
je 0x5b6ba
jmp 0x5b6af
movl 0x14(%rsp), %eax
subl $0x10, %eax
je 0x5b6ef
jmp 0x5b725
movq 0x30(%rsp), %rdi
movb $0x0, 0x43(%rsp)
movb 0x43(%rsp), %sil
movl 0xd4(%rsp), %edx
movl 0xd0(%rsp), %ecx
movb 0xef(%rsp), %al
andb $0x1, %al
movzbl %sil, %esi
movzbl %al, %r8d
callq 0x5b9c0
jmp 0x5b756
movq 0x30(%rsp), %rdi
movw $0x0, 0x40(%rsp)
movw 0x40(%rsp), %si
movl 0xd4(%rsp), %edx
movl 0xd0(%rsp), %ecx
movb 0xef(%rsp), %al
andb $0x1, %al
movzwl %si, %esi
movzbl %al, %r8d
callq 0x5bb30
jmp 0x5b756
movq 0x30(%rsp), %rdi
movl $0x0, 0x3c(%rsp)
movl 0x3c(%rsp), %esi
movl 0xd4(%rsp), %edx
movl 0xd0(%rsp), %ecx
movb 0xef(%rsp), %al
andb $0x1, %al
movzbl %al, %r8d
callq 0x5bca0
jmp 0x5b758
movq 0x30(%rsp), %rax
movl 0xd4(%rsp), %ecx
movl %ecx, 0x18(%rax)
movl %ecx, 0x40(%rax)
movl 0xd0(%rsp), %ecx
movl %ecx, 0x1c(%rax)
movl %ecx, 0x44(%rax)
movb $0x0, 0x461(%rax)
movq 0xe0(%rsp), %rdi
callq 0x5220
movq 0x30(%rsp), %rax
testb $0x1, 0x30(%rax)
je 0x5b7c3
callq 0x17990
movq 0x30(%rsp), %rcx
subl 0x18(%rcx), %eax
shrl %eax
movl %eax, 0x10(%rsp)
callq 0x17ab0
movq 0x30(%rsp), %rdi
movl 0x10(%rsp), %esi
movl %eax, %edx
subl 0x1c(%rdi), %edx
shrl %edx
callq 0x178d0
testb $0x1, 0xef(%rsp)
je 0x5b7e6
movq 0x30(%rsp), %rdi
movl $0x1, %esi
callq 0x370c0
movq %rax, 0x100(%rsp)
jmp 0x5b7f3
movq 0x30(%rsp), %rax
movq %rax, 0x100(%rsp)
movq 0x100(%rsp), %rax
addq $0x108, %rsp            # imm = 0x108
retq
nopw %cs:(%rax,%rax)
nopl (%rax)