// File: manikandan5[P]Image-Matching-Stitching-Warping/./CImg.h
// Function: cimg_library::CImgDisplay::assign()
CImgDisplay& assign() {
      if (is_empty()) return flush();
      Display *const dpy = cimg::X11_attr().display;
      XLockDisplay(dpy);

      // Remove display window from event thread list.
      unsigned int i;
      for (i = 0; i<cimg::X11_attr().nb_wins && cimg::X11_attr().wins[i]!=this; ++i) {}
      for (; i<cimg::X11_attr().nb_wins-1; ++i) cimg::X11_attr().wins[i] = cimg::X11_attr().wins[i+1];
      --cimg::X11_attr().nb_wins;

      // Destroy window, image, colormap and title.
      if (_is_fullscreen && !_is_closed) _desinit_fullscreen();
      XDestroyWindow(dpy,_window);
      _window = 0;
#ifdef cimg_use_xshm
      if (_shminfo) {
        XShmDetach(dpy,_shminfo);
        XDestroyImage(_image);
        shmdt(_shminfo->shmaddr);
        shmctl(_shminfo->shmid,IPC_RMID,0);
        delete _shminfo;
        _shminfo = 0;
      } else
#endif
        XDestroyImage(_image);
      _data = 0; _image = 0;
      if (cimg::X11_attr().nb_bits==8) XFreeColormap(dpy,_colormap);
      _colormap = 0;
      XSync(dpy,0);

      // Reset display variables.
      delete[] _title;
      _width = _height = _normalization = _window_width = _window_height = 0;
      _window_x = _window_y = 0;
      _is_fullscreen = false;
      _is_closed = true;
      _min = _max = 0;
      _title = 0;
      flush();

      XUnlockDisplay(dpy);
      return *this;
    }

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq 0x38(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x37140
testb $0x1, %al
jne 0x32b1e
jmp 0x32b32
movq 0x20(%rsp), %rdi
callq 0x37180
movq %rax, 0x40(%rsp)
jmp 0x32d50
callq 0x37200
movq 0x2068(%rax), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rdi
callq 0x5290
movl $0x0, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
movl %eax, 0x18(%rsp)
callq 0x37200
movl 0x18(%rsp), %ecx
movl (%rax), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, 0x1f(%rsp)
jae 0x32b8c
callq 0x37200
movq 0x20(%rsp), %rdx
movl 0x2c(%rsp), %ecx
cmpq %rdx, 0x68(%rax,%rcx,8)
setne %al
movb %al, 0x1f(%rsp)
movb 0x1f(%rsp), %al
testb $0x1, %al
jne 0x32b96
jmp 0x32ba5
jmp 0x32b98
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x32b55
jmp 0x32ba7
movl 0x2c(%rsp), %eax
movl %eax, 0x14(%rsp)
callq 0x37200
movq %rax, %rcx
movl 0x14(%rsp), %eax
movl (%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jae 0x32bfc
callq 0x37200
movl 0x2c(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movq 0x68(%rax,%rcx,8), %rax
movq %rax, 0x8(%rsp)
callq 0x37200
movq 0x8(%rsp), %rdx
movl 0x2c(%rsp), %ecx
movq %rdx, 0x68(%rax,%rcx,8)
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x32ba7
callq 0x37200
movq %rax, %rcx
movq 0x20(%rsp), %rax
movl (%rcx), %edx
addl $-0x1, %edx
movl %edx, (%rcx)
testb $0x1, 0x30(%rax)
je 0x32c2f
movq 0x20(%rsp), %rax
movb 0x460(%rax), %al
testb $0x1, %al
jne 0x32c2f
movq 0x20(%rsp), %rdi
callq 0x37290
movq 0x20(%rsp), %rax
movq 0x30(%rsp), %rdi
movq 0x4d0(%rax), %rsi
callq 0x5880
movq 0x20(%rsp), %rcx
movq $0x0, 0x4d0(%rcx)
movq 0x4e8(%rcx), %rax
movq 0x60(%rax), %rax
movq 0x4e8(%rcx), %rdi
callq *%rax
movq 0x20(%rsp), %rax
movq $0x0, 0x4f0(%rax)
movq $0x0, 0x4e8(%rax)
callq 0x37200
cmpl $0x8, 0x2070(%rax)
jne 0x32ca8
movq 0x20(%rsp), %rax
movq 0x30(%rsp), %rdi
movq 0x4e0(%rax), %rsi
callq 0x50b0
movq 0x20(%rsp), %rax
movq $0x0, 0x4e0(%rax)
movq 0x30(%rsp), %rdi
xorl %esi, %esi
callq 0x5a60
movq 0x20(%rsp), %rax
movq 0x38(%rax), %rax
movq %rax, (%rsp)
cmpq $0x0, %rax
je 0x32ce0
movq (%rsp), %rdi
callq 0x5680
movq 0x20(%rsp), %rdi
movl $0x0, 0x44(%rdi)
movl 0x44(%rdi), %eax
movl %eax, 0x40(%rdi)
movl 0x40(%rdi), %eax
movl %eax, 0x20(%rdi)
movl %eax, 0x1c(%rdi)
movl %eax, 0x18(%rdi)
movl $0x0, 0x450(%rdi)
movl 0x450(%rdi), %eax
movl %eax, 0x44c(%rdi)
movb $0x0, 0x30(%rdi)
movb $0x1, 0x460(%rdi)
xorps %xmm0, %xmm0
movss %xmm0, 0x2c(%rdi)
xorps %xmm0, %xmm0
movss %xmm0, 0x28(%rdi)
movq $0x0, 0x38(%rdi)
callq 0x37180
movq 0x30(%rsp), %rdi
callq 0x5220
movq 0x20(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nopw (%rax,%rax)