// File: /workspace/github_cpp_makefile_star2_O2/manikandan5[P]Image-Matching-Stitching-Warping/./CImg.h
// Function: cimg_library::CImgDisplay::_init_fullscreen()
void _init_fullscreen() {
      if (!_is_fullscreen || _is_closed) return;
      Display *const dpy = cimg::X11_attr().display;
      _background_window = 0;

#ifdef cimg_use_xrandr
      int foo;
      if (XRRQueryExtension(dpy,&foo,&foo)) {
        XRRRotations(dpy,DefaultScreen(dpy),&cimg::X11_attr().curr_rotation);
        if (!cimg::X11_attr().resolutions) {
          cimg::X11_attr().resolutions = XRRSizes(dpy,DefaultScreen(dpy),&foo);
          cimg::X11_attr().nb_resolutions = (unsigned int)foo;
        }
        if (cimg::X11_attr().resolutions) {
          cimg::X11_attr().curr_resolution = 0;
          for (unsigned int i = 0; i<cimg::X11_attr().nb_resolutions; ++i) {
            const unsigned int
              nw = (unsigned int)(cimg::X11_attr().resolutions[i].width),
              nh = (unsigned int)(cimg::X11_attr().resolutions[i].height);
            if (nw>=_width && nh>=_height &&
                nw<=(unsigned int)(cimg::X11_attr().resolutions[cimg::X11_attr().curr_resolution].width) &&
                nh<=(unsigned int)(cimg::X11_attr().resolutions[cimg::X11_attr().curr_resolution].height))
              cimg::X11_attr().curr_resolution = i;
          }
          if (cimg::X11_attr().curr_resolution>0) {
            XRRScreenConfiguration *config = XRRGetScreenInfo(dpy,DefaultRootWindow(dpy));
            XRRSetScreenConfig(dpy,config,DefaultRootWindow(dpy),
                               cimg::X11_attr().curr_resolution,cimg::X11_attr().curr_rotation,CurrentTime);
            XRRFreeScreenConfigInfo(config);
            XSync(dpy,0);
          }
        }
      }
      if (!cimg::X11_attr().resolutions)
        cimg::warn(_cimgdisplay_instance
                   "init_fullscreen(): Xrandr extension not supported by the X server.",
                   cimgdisplay_instance);
#endif

      const unsigned int sx = screen_width(), sy = screen_height();
      if (sx==_width && sy==_height) return;
      XSetWindowAttributes winattr;
      winattr.override_redirect = 1;
      _background_window = XCreateWindow(dpy,DefaultRootWindow(dpy),0,0,sx,sy,0,0,
                                         InputOutput,CopyFromParent,CWOverrideRedirect,&winattr);
      const unsigned long buf_size = (unsigned long)sx*sy*(cimg::X11_attr().nb_bits==8?1:
                                                           (cimg::X11_attr().nb_bits==16?2:4));
      void *background_data = std::malloc(buf_size);
      std::memset(background_data,0,buf_size);
      XImage *background_image = XCreateImage(dpy,DefaultVisual(dpy,DefaultScreen(dpy)),cimg::X11_attr().nb_bits,
                                              ZPixmap,0,(char*)background_data,sx,sy,8,0);
      XEvent event;
      XSelectInput(dpy,_background_window,StructureNotifyMask);
      XMapRaised(dpy,_background_window);
      do XWindowEvent(dpy,_background_window,StructureNotifyMask,&event);
      while (event.type!=MapNotify);
      GC gc = DefaultGC(dpy,DefaultScreen(dpy));
#ifdef cimg_use_xshm
      if (_shminfo) XShmPutImage(dpy,_background_window,gc,background_image,0,0,0,0,sx,sy,0);
      else XPutImage(dpy,_background_window,gc,background_image,0,0,0,0,sx,sy);
#else
      XPutImage(dpy,_background_window,gc,background_image,0,0,0,0,sx,sy);
#endif
      XWindowAttributes attr;
      XGetWindowAttributes(dpy,_background_window,&attr);
      while (attr.map_state!=IsViewable) XSync(dpy,0);
      XDestroyImage(background_image);
    }

// Assembly:
cmpb $0x1, 0x30(%rdi)
jne 0x1ba3c
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1e8, %rsp            # imm = 0x1E8
movq %rdi, %r14
cmpb $0x0, 0x460(%rdi)
jne 0x1ba2b
callq 0x1a004
movq 0x2068(%rax), %rbx
andq $0x0, 0x4d8(%r14)
callq 0xc76c
movl %eax, %ebp
callq 0xc814
movl %eax, %r15d
cmpl 0x18(%r14), %ebp
jne 0x1b878
cmpl 0x1c(%r14), %r15d
je 0x1ba2b
pushq $0x1
popq %rax
leaq 0x178(%rsp), %rcx
movl %eax, 0x58(%rcx)
movq 0xe8(%rbx), %rdx
movslq 0xe0(%rbx), %rsi
shlq $0x7, %rsi
movq 0x10(%rdx,%rsi), %rsi
andq $0x0, 0x18(%rsp)
andl $0x0, 0x8(%rsp)
movq %rcx, 0x28(%rsp)
andl $0x0, (%rsp)
movl %eax, 0x10(%rsp)
movq $0x200, 0x20(%rsp)      # imm = 0x200
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
movl %ebp, %r8d
movl %r15d, %r9d
callq 0x4830
movq %rax, 0x4d8(%r14)
movl %ebp, %eax
movl %r15d, %r12d
imulq %rax, %r12
callq 0x1a004
cmpl $0x8, 0x2070(%rax)
jne 0x1b8f3
pushq $0x1
popq %rax
jmp 0x1b90c
callq 0x1a004
xorl %ecx, %ecx
cmpl $0x10, 0x2070(%rax)
setne %cl
leaq 0x2(,%rcx,2), %rax
imulq %rax, %r12
pushq $0x1
popq %rdi
movq %r12, %rsi
callq 0x4340
movq %rax, %r12
movq 0xe8(%rbx), %rax
movslq 0xe0(%rbx), %rcx
shlq $0x7, %rcx
movq 0x40(%rax,%rcx), %r13
callq 0x1a004
movl 0x2070(%rax), %edx
movl %r15d, 0x8(%rsp)
movl %ebp, (%rsp)
andl $0x0, 0x18(%rsp)
movl $0x8, 0x10(%rsp)
pushq $0x2
popq %rcx
movq %rbx, %rdi
movq %r13, %rsi
xorl %r8d, %r8d
movq %r12, %r9
callq 0x4610
movq %rax, %r12
movq 0x4d8(%r14), %rsi
movl $0x20000, %edx          # imm = 0x20000
movq %rbx, %rdi
callq 0x42e0
movq 0x4d8(%r14), %rsi
movq %rbx, %rdi
callq 0x4a20
leaq 0xb8(%rsp), %r13
movq 0x4d8(%r14), %rsi
movl $0x20000, %edx          # imm = 0x20000
movq %rbx, %rdi
movq %r13, %rcx
callq 0x40f0
cmpl $0x13, 0xb8(%rsp)
jne 0x1b997
movq 0xe8(%rbx), %rax
movslq 0xe0(%rbx), %rcx
shlq $0x7, %rcx
movq 0x48(%rax,%rcx), %rdx
movq 0x4d8(%r14), %rsi
andl $0x0, 0x8(%rsp)
andl $0x0, (%rsp)
movl %r15d, 0x18(%rsp)
movl %ebp, 0x10(%rsp)
movq %rbx, %rdi
movq %r12, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x4a90
movq 0x4d8(%r14), %rsi
leaq 0x30(%rsp), %rdx
movq %rbx, %rdi
callq 0x4960
cmpl $0x2, 0x8c(%rsp)
je 0x1ba23
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4a10
jmp 0x1ba0d
movq %r12, %rdi
callq *0x60(%r12)
addq $0x1e8, %rsp            # imm = 0x1E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop