// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
cmpb $0x1, 0x30(%rdi)
jne 0x23606
movq %rdi, %rbx
cmpb $0x0, 0x460(%rdi)
jne 0x23606
movb 0x878ed(%rip), %al      # 0xaad00
testb %al, %al
je 0x23618
movq 0x878ce(%rip), %r14     # 0xaacf0
movq $0x0, 0x4d8(%rbx)
callq 0xf284
movl %eax, %r15d
callq 0xf38a
movl %eax, %r12d
cmpl 0x18(%rbx), %r15d
jne 0x2344d
cmpl 0x1c(%rbx), %r12d
je 0x23606
movl $0x1, %eax
leaq 0x148(%rsp), %r10
movl %eax, 0x58(%r10)
movq 0xe8(%r14), %rcx
movslq 0xe0(%r14), %rdx
shlq $0x7, %rdx
movq 0x10(%rcx,%rdx), %rsi
xorl %r11d, %r11d
movq %r14, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
movl %r15d, %r8d
movl %r12d, %r9d
pushq %r10
pushq $0x200                  # imm = 0x200
pushq $0x0
pushq %rax
pushq %r11
pushq %r11
callq 0x4830
addq $0x30, %rsp
movq %rax, 0x4d8(%rbx)
movb 0x87857(%rip), %al      # 0xaad00
testb %al, %al
je 0x23663
movl $0x1, %eax
cmpl $0x8, 0x8783b(%rip)     # 0xaacf8
je 0x234e1
movb 0x8783b(%rip), %al      # 0xaad00
testb %al, %al
je 0x236f9
xorl %eax, %eax
cmpl $0x10, 0x87822(%rip)    # 0xaacf8
setne %al
leaq 0x2(,%rax,2), %rax
movl %r15d, %ecx
movl %r12d, %esi
imulq %rcx, %rsi
imulq %rax, %rsi
movl $0x1, %edi
callq 0x4350
movq %rax, %r13
movq 0xe8(%r14), %rax
movslq 0xe0(%r14), %rcx
shlq $0x7, %rcx
movq 0x40(%rax,%rcx), %rbp
movb 0x877e7(%rip), %al      # 0xaad00
testb %al, %al
je 0x236ae
movl 0x877d1(%rip), %edx     # 0xaacf8
movq %r14, %rdi
movq %rbp, %rsi
movl $0x2, %ecx
xorl %r8d, %r8d
movq %r13, %r9
pushq $0x0
pushq $0x8
pushq %r12
pushq %r15
callq 0x4630
addq $0x20, %rsp
movq %rax, %r13
movq 0x4d8(%rbx), %rsi
movl $0x20000, %edx          # imm = 0x20000
movq %r14, %rdi
callq 0x42f0
movq 0x4d8(%rbx), %rsi
movq %r14, %rdi
callq 0x4a40
leaq 0x88(%rsp), %rbp
movq 0x4d8(%rbx), %rsi
movl $0x20000, %edx          # imm = 0x20000
movq %r14, %rdi
movq %rbp, %rcx
callq 0x40e0
cmpl $0x13, 0x88(%rsp)
jne 0x23577
movq 0xe8(%r14), %rax
movslq 0xe0(%r14), %rcx
shlq $0x7, %rcx
movq 0x48(%rax,%rcx), %rdx
movq 0x4d8(%rbx), %rsi
xorl %eax, %eax
movq %r14, %rdi
movq %r13, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %r12
pushq %r15
pushq %rax
pushq %rax
callq 0x4aa0
addq $0x20, %rsp
movq 0x4d8(%rbx), %rsi
movq %rsp, %rbx
movq %r14, %rdi
movq %rbx, %rdx
callq 0x4970
cmpl $0x2, 0x5c(%rbx)
je 0x235ff
movq %r14, %rdi
xorl %esi, %esi
callq 0x4a30
cmpl $0x2, 0x5c(%rsp)
jne 0x235ee
movq %r13, %rdi
callq *0x60(%r13)
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x876e1(%rip), %rdi     # 0xaad00
callq 0x49c0
testl %eax, %eax
je 0x2341b
leaq 0x85655(%rip), %rdi     # 0xa8c88
callq 0x211ec
leaq -0x2415(%rip), %rdi     # 0x2122a
leaq 0x85642(%rip), %rsi     # 0xa8c88
leaq 0x84f13(%rip), %rdx     # 0xa8560
callq 0x44c0
leaq 0x876a7(%rip), %rdi     # 0xaad00
callq 0x4330
jmp 0x2341b
leaq 0x87696(%rip), %rdi     # 0xaad00
callq 0x49c0
testl %eax, %eax
je 0x234b1
leaq 0x8560a(%rip), %rdi     # 0xa8c88
callq 0x211ec
leaq -0x2460(%rip), %rdi     # 0x2122a
leaq 0x855f7(%rip), %rsi     # 0xa8c88
leaq 0x84ec8(%rip), %rdx     # 0xa8560
callq 0x44c0
leaq 0x8765c(%rip), %rdi     # 0xaad00
callq 0x4330
jmp 0x234b1
leaq 0x8764b(%rip), %rdi     # 0xaad00
callq 0x49c0
testl %eax, %eax
je 0x23521
leaq 0x855bf(%rip), %rdi     # 0xa8c88
callq 0x211ec
leaq -0x24ab(%rip), %rdi     # 0x2122a
leaq 0x855ac(%rip), %rsi     # 0xa8c88
leaq 0x84e7d(%rip), %rdx     # 0xa8560
callq 0x44c0
leaq 0x87611(%rip), %rdi     # 0xaad00
callq 0x4330
jmp 0x23521
leaq 0x87600(%rip), %rdi     # 0xaad00
callq 0x49c0
testl %eax, %eax
je 0x234cd
leaq 0x85574(%rip), %rdi     # 0xa8c88
callq 0x211ec
leaq -0x24f6(%rip), %rdi     # 0x2122a
leaq 0x85561(%rip), %rsi     # 0xa8c88
leaq 0x84e32(%rip), %rdx     # 0xa8560
callq 0x44c0
leaq 0x875c6(%rip), %rdi     # 0xaad00
callq 0x4330
jmp 0x234cd
jmp 0x2374a
jmp 0x2374a
jmp 0x2374a
movq %rax, %rbx
leaq 0x875ac(%rip), %rdi     # 0xaad00
callq 0x4310
movq %rbx, %rdi
callq 0x4960
nop