// File: /workspace/github_cpp_makefile_star2_O1/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 0x8cc5a(%rip), %al      # 0xafcf0
testb %al, %al
je 0x232cb
movq 0x8cc3b(%rip), %rbx     # 0xafce0
xorl %edi, %edi
xorl %esi, %esi
callq 0x4120
xorl %edi, %edi
xorl %esi, %esi
callq 0x47e0
testq %r14, %r14
je 0x230d0
xorl %eax, %eax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x18(%rsp), %r14
leaq 0x8ab9c(%rip), %r12     # 0xadc78
leaq 0x8(%rsp), %r13
movq %rbx, %rdi
callq 0x4280
movq %rbx, %rdi
movl $0x21, %esi
movq %r14, %rdx
callq 0x4910
testl %eax, %eax
setne %al
jne 0x23115
movl $0x2807f, %esi          # imm = 0x2807F
movq %rbx, %rdi
movq %r14, %rdx
callq 0x46c0
testl %eax, %eax
setne %al
testb %al, %al
je 0x2329d
xorl %ebp, %ebp
movb 0x8cbcb(%rip), %al      # 0xafcf0
testb %al, %al
je 0x23195
movl 0x8ab49(%rip), %eax     # 0xadc78
cmpq %rax, %rbp
jae 0x2329d
movb 0x8cbb2(%rip), %al      # 0xafcf0
testb %al, %al
je 0x231d4
movq 0x68(%r12,%rbp,8), %rax
cmpb $0x0, 0x460(%rax)
jne 0x23190
movq 0x38(%rsp), %r15
movb 0x8cb91(%rip), %al      # 0xafcf0
testb %al, %al
je 0x23217
movq 0x68(%r12,%rbp,8), %rax
cmpq 0x4d0(%rax), %r15
jne 0x23190
movb 0x8cb75(%rip), %al      # 0xafcf0
testb %al, %al
je 0x2325a
movq 0x68(%r12,%rbp,8), %rdi
movq %r14, %rsi
callq 0x239ba
incq %rbp
jmp 0x2311f
leaq 0x8cb54(%rip), %rdi     # 0xafcf0
callq 0x49b0
testl %eax, %eax
je 0x23129
movq %r12, %rdi
callq 0x21188
leaq -0x1fee(%rip), %rdi     # 0x211c6
movq %r12, %rsi
leaq 0x8a39a(%rip), %rdx     # 0xad558
callq 0x44b0
leaq 0x8cb26(%rip), %rdi     # 0xafcf0
callq 0x4330
jmp 0x23129
leaq 0x8cb15(%rip), %rdi     # 0xafcf0
callq 0x49b0
testl %eax, %eax
je 0x23146
movq %r12, %rdi
callq 0x21188
leaq -0x2031(%rip), %rdi     # 0x211c6
movq %r12, %rsi
leaq 0x8a357(%rip), %rdx     # 0xad558
callq 0x44b0
leaq 0x8cae3(%rip), %rdi     # 0xafcf0
callq 0x4330
jmp 0x23146
leaq 0x8cad2(%rip), %rdi     # 0xafcf0
callq 0x49b0
testl %eax, %eax
je 0x23167
movq %r12, %rdi
callq 0x21188
leaq -0x2074(%rip), %rdi     # 0x211c6
movq %r12, %rsi
leaq 0x8a314(%rip), %rdx     # 0xad558
callq 0x44b0
leaq 0x8caa0(%rip), %rdi     # 0xafcf0
callq 0x4330
jmp 0x23167
leaq 0x8ca8f(%rip), %rdi     # 0xafcf0
callq 0x49b0
testl %eax, %eax
je 0x23183
movq %r12, %rdi
callq 0x21188
leaq -0x20b7(%rip), %rdi     # 0x211c6
movq %r12, %rsi
leaq 0x8a2d1(%rip), %rdx     # 0xad558
callq 0x44b0
leaq 0x8ca5d(%rip), %rdi     # 0xafcf0
callq 0x4330
jmp 0x23183
movq %rbx, %rdi
callq 0x41f0
callq 0x4360
movq $0x0, 0x8(%rsp)
movq $0x7a1200, 0x10(%rsp)   # imm = 0x7A1200
movq %r13, %rdi
xorl %esi, %esi
callq 0x4130
jmp 0x230e1
leaq 0x8ca1e(%rip), %rdi     # 0xafcf0
callq 0x49b0
testl %eax, %eax
je 0x2309e
leaq 0x8a992(%rip), %rdi     # 0xadc78
callq 0x21188
leaq -0x212c(%rip), %rdi     # 0x211c6
leaq 0x8a97f(%rip), %rsi     # 0xadc78
leaq 0x8a258(%rip), %rdx     # 0xad558
callq 0x44b0
leaq 0x8c9e4(%rip), %rdi     # 0xafcf0
callq 0x4330
jmp 0x2309e
jmp 0x2331e
jmp 0x2331e
jmp 0x2331e
jmp 0x2331e
movq %rax, %rbx
leaq 0x8c9c8(%rip), %rdi     # 0xafcf0
callq 0x4310
movq %rbx, %rdi
callq 0x4950
nop