// File: /workspace/github_cpp_makefile_star2_O3/manikandan5[P]Image-Matching-Stitching-Warping/./CImg.h
// Function: cimg_library::CImgDisplay::_events_thread(void*)
static void* _events_thread(void *arg) { // Thread to manage events for all opened display windows.
      Display *const dpy = cimg::X11_attr().display;
      XEvent event;
      pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED,0);
      pthread_setcancelstate(PTHREAD_CANCEL_ENABLE,0);
      if (!arg) for (;;) {
        XLockDisplay(dpy);
        bool event_flag = XCheckTypedEvent(dpy,ClientMessage,&event);
        if (!event_flag) event_flag = XCheckMaskEvent(dpy,
                                                      ExposureMask | StructureNotifyMask | ButtonPressMask |
                                                      KeyPressMask | PointerMotionMask | EnterWindowMask |
                                                      LeaveWindowMask | ButtonReleaseMask | KeyReleaseMask,&event);
        if (event_flag)
          for (unsigned int i = 0; i<cimg::X11_attr().nb_wins; ++i)
            if (!cimg::X11_attr().wins[i]->_is_closed && event.xany.window==cimg::X11_attr().wins[i]->_window)
              cimg::X11_attr().wins[i]->_handle_events(&event);
        XUnlockDisplay(dpy);
        pthread_testcancel();
        cimg::sleep(8);
      }
      return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %r14
movb 0x87bb6(%rip), %al      # 0xaad00
testb %al, %al
je 0x23377
movq 0x87b97(%rip), %rbx     # 0xaacf0
xorl %edi, %edi
xorl %esi, %esi
callq 0x4120
xorl %edi, %edi
xorl %esi, %esi
callq 0x47f0
testq %r14, %r14
je 0x23184
xorl %eax, %eax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x18(%rsp), %r14
leaq 0x8(%rsp), %r15
leaq 0x85af3(%rip), %r13     # 0xa8c88
movq %rbx, %rdi
callq 0x4280
movq %rbx, %rdi
movl $0x21, %esi
movq %r14, %rdx
callq 0x4920
testl %eax, %eax
jne 0x231c9
movl $0x2807f, %esi          # imm = 0x2807F
movq %rbx, %rdi
movq %r14, %rdx
callq 0x46d0
testl %eax, %eax
je 0x23349
xorl %ebp, %ebp
movb 0x87b2f(%rip), %al      # 0xaad00
testb %al, %al
je 0x23241
movl 0x85aad(%rip), %eax     # 0xa8c88
cmpq %rax, %rbp
jae 0x23349
movb 0x87b16(%rip), %al      # 0xaad00
testb %al, %al
je 0x23280
movq 0x68(%r13,%rbp,8), %rax
cmpb $0x0, 0x460(%rax)
jne 0x2323c
movq 0x38(%rsp), %r12
movb 0x87af5(%rip), %al      # 0xaad00
testb %al, %al
je 0x232c3
movq 0x68(%r13,%rbp,8), %rax
cmpq 0x4d0(%rax), %r12
jne 0x2323c
movb 0x87ad9(%rip), %al      # 0xaad00
testb %al, %al
je 0x23306
movq 0x68(%r13,%rbp,8), %rdi
movq %r14, %rsi
callq 0x23a76
incq %rbp
jmp 0x231cb
leaq 0x87ab8(%rip), %rdi     # 0xaad00
callq 0x49c0
testl %eax, %eax
je 0x231d5
movq %r13, %rdi
callq 0x211ec
leaq -0x2036(%rip), %rdi     # 0x2122a
movq %r13, %rsi
leaq 0x852f6(%rip), %rdx     # 0xa8560
callq 0x44c0
leaq 0x87a8a(%rip), %rdi     # 0xaad00
callq 0x4330
jmp 0x231d5
leaq 0x87a79(%rip), %rdi     # 0xaad00
callq 0x49c0
testl %eax, %eax
je 0x231f2
movq %r13, %rdi
callq 0x211ec
leaq -0x2079(%rip), %rdi     # 0x2122a
movq %r13, %rsi
leaq 0x852b3(%rip), %rdx     # 0xa8560
callq 0x44c0
leaq 0x87a47(%rip), %rdi     # 0xaad00
callq 0x4330
jmp 0x231f2
leaq 0x87a36(%rip), %rdi     # 0xaad00
callq 0x49c0
testl %eax, %eax
je 0x23213
movq %r13, %rdi
callq 0x211ec
leaq -0x20bc(%rip), %rdi     # 0x2122a
movq %r13, %rsi
leaq 0x85270(%rip), %rdx     # 0xa8560
callq 0x44c0
leaq 0x87a04(%rip), %rdi     # 0xaad00
callq 0x4330
jmp 0x23213
leaq 0x879f3(%rip), %rdi     # 0xaad00
callq 0x49c0
testl %eax, %eax
je 0x2322f
movq %r13, %rdi
callq 0x211ec
leaq -0x20ff(%rip), %rdi     # 0x2122a
movq %r13, %rsi
leaq 0x8522d(%rip), %rdx     # 0xa8560
callq 0x44c0
leaq 0x879c1(%rip), %rdi     # 0xaad00
callq 0x4330
jmp 0x2322f
movq %rbx, %rdi
callq 0x41f0
callq 0x4370
movq $0x0, 0x8(%rsp)
movq $0x7a1200, 0x10(%rsp)   # imm = 0x7A1200
movq %r15, %rdi
xorl %esi, %esi
callq 0x4130
jmp 0x23195
leaq 0x87982(%rip), %rdi     # 0xaad00
callq 0x49c0
testl %eax, %eax
je 0x23152
leaq 0x858f6(%rip), %rdi     # 0xa8c88
callq 0x211ec
leaq -0x2174(%rip), %rdi     # 0x2122a
leaq 0x858e3(%rip), %rsi     # 0xa8c88
leaq 0x851b4(%rip), %rdx     # 0xa8560
callq 0x44c0
leaq 0x87948(%rip), %rdi     # 0xaad00
callq 0x4330
jmp 0x23152
jmp 0x233ca
jmp 0x233ca
jmp 0x233ca
jmp 0x233ca
movq %rax, %rbx
leaq 0x8792c(%rip), %rdi     # 0xaad00
callq 0x4310
movq %rbx, %rdi
callq 0x4960
nop