// File: /workspace/github_cpp_makefile_star2_O1/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 0x23565
movq %rdi, %rbx
cmpb $0x0, 0x460(%rdi)
jne 0x23565
movb 0x8c989(%rip), %al      # 0xafcf0
testb %al, %al
je 0x23577
movq 0x8c96a(%rip), %r14     # 0xafce0
movq $0x0, 0x4d8(%rbx)
callq 0xf224
movl %eax, %r15d
callq 0xf32a
movl %eax, %r12d
cmpl 0x18(%rbx), %r15d
jne 0x233a1
cmpl 0x1c(%rbx), %r12d
je 0x23565
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 0x4820
addq $0x30, %rsp
movq %rax, 0x4d8(%rbx)
movb 0x8c8f3(%rip), %al      # 0xafcf0
testb %al, %al
je 0x235c2
movl $0x1, %eax
cmpl $0x8, 0x8c8d7(%rip)     # 0xafce8
je 0x23435
movb 0x8c8d7(%rip), %al      # 0xafcf0
testb %al, %al
je 0x23658
xorl %eax, %eax
cmpl $0x10, 0x8c8be(%rip)    # 0xafce8
setne %al
leaq 0x2(,%rax,2), %rax
movl %r15d, %ecx
movl %r12d, %ebp
imulq %rcx, %rbp
imulq %rax, %rbp
movq %rbp, %rdi
callq 0x46a0
movq %rax, %r13
movq %rax, %rdi
xorl %esi, %esi
movq %rbp, %rdx
callq 0x4290
movq 0xe8(%r14), %rax
movslq 0xe0(%r14), %rcx
shlq $0x7, %rcx
movq 0x40(%rax,%rcx), %rbp
movb 0x8c878(%rip), %al      # 0xafcf0
testb %al, %al
je 0x2360d
movl 0x8c862(%rip), %edx     # 0xafce8
movq %r14, %rdi
movq %rbp, %rsi
movl $0x2, %ecx
xorl %r8d, %r8d
movq %r13, %r9
pushq $0x0
pushq $0x8
pushq %r12
pushq %r15
callq 0x4620
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 0x4a30
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 0x234d6
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 0x4a90
addq $0x20, %rsp
movq 0x4d8(%rbx), %rsi
movq %rsp, %rbx
movq %r14, %rdi
movq %rbx, %rdx
callq 0x4960
cmpl $0x2, 0x5c(%rbx)
je 0x2355e
movq %r14, %rdi
xorl %esi, %esi
callq 0x4a20
cmpl $0x2, 0x5c(%rsp)
jne 0x2354d
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 0x8c772(%rip), %rdi     # 0xafcf0
callq 0x49b0
testl %eax, %eax
je 0x2336f
leaq 0x8a6e6(%rip), %rdi     # 0xadc78
callq 0x21188
leaq -0x23d8(%rip), %rdi     # 0x211c6
leaq 0x8a6d3(%rip), %rsi     # 0xadc78
leaq 0x89fac(%rip), %rdx     # 0xad558
callq 0x44b0
leaq 0x8c738(%rip), %rdi     # 0xafcf0
callq 0x4330
jmp 0x2336f
leaq 0x8c727(%rip), %rdi     # 0xafcf0
callq 0x49b0
testl %eax, %eax
je 0x23405
leaq 0x8a69b(%rip), %rdi     # 0xadc78
callq 0x21188
leaq -0x2423(%rip), %rdi     # 0x211c6
leaq 0x8a688(%rip), %rsi     # 0xadc78
leaq 0x89f61(%rip), %rdx     # 0xad558
callq 0x44b0
leaq 0x8c6ed(%rip), %rdi     # 0xafcf0
callq 0x4330
jmp 0x23405
leaq 0x8c6dc(%rip), %rdi     # 0xafcf0
callq 0x49b0
testl %eax, %eax
je 0x23480
leaq 0x8a650(%rip), %rdi     # 0xadc78
callq 0x21188
leaq -0x246e(%rip), %rdi     # 0x211c6
leaq 0x8a63d(%rip), %rsi     # 0xadc78
leaq 0x89f16(%rip), %rdx     # 0xad558
callq 0x44b0
leaq 0x8c6a2(%rip), %rdi     # 0xafcf0
callq 0x4330
jmp 0x23480
leaq 0x8c691(%rip), %rdi     # 0xafcf0
callq 0x49b0
testl %eax, %eax
je 0x23421
leaq 0x8a605(%rip), %rdi     # 0xadc78
callq 0x21188
leaq -0x24b9(%rip), %rdi     # 0x211c6
leaq 0x8a5f2(%rip), %rsi     # 0xadc78
leaq 0x89ecb(%rip), %rdx     # 0xad558
callq 0x44b0
leaq 0x8c657(%rip), %rdi     # 0xafcf0
callq 0x4330
jmp 0x23421
jmp 0x236a9
jmp 0x236a9
jmp 0x236a9
movq %rax, %rbx
leaq 0x8c63d(%rip), %rdi     # 0xafcf0
callq 0x4310
movq %rbx, %rdi
callq 0x4950