	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handleEvents
_handleEvents:                          ## @handleEvents
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	__glfw@GOTPCREL(%rip), %rbx
	movq	8(%rbx), %r15
	movq	%r15, %rdi
	callq	_wl_display_get_fd
	movl	%eax, -40(%rbp)
	movq	_POLLIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -36(%rbp)
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_wl_display_prepare_read
	movq	%r15, %rdi
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:                               ##   in Loop: Header=BB0_2 Depth=1
	callq	_wl_display_dispatch_pending
	jmp	LBB0_2
LBB0_3:
	callq	_wl_display_flush
	testq	%rax, %rax
	jns	LBB0_5
## %bb.4:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
LBB0_5:
	leaq	-40(%rbp), %rdi
	movl	$1, %esi
	movl	%r14d, %edx
	callq	_poll
	testq	%rax, %rax
	jle	LBB0_11
## %bb.6:
	movq	%r15, %rdi
	callq	_wl_display_read_events
	movq	%r15, %rdi
	callq	_wl_display_dispatch_pending
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rbx
	testq	%rbx, %rbx
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	%rbx, %rdi
	callq	__glfwInputWindowCloseRequest
	jmp	LBB0_8
LBB0_11:
	movq	%r15, %rdi
	callq	_wl_display_cancel_read
LBB0_12:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_14
## %bb.13:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_14
## %bb.10:
	movq	%r15, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wl_display_cancel_read         ## TAILCALL
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	__glfw,16,3                     ## @_glfw
	.comm	_POLLIN,4,2                     ## @POLLIN
	.comm	_errno,8,3                      ## @errno
	.comm	_EAGAIN,8,3                     ## @EAGAIN
	.no_dead_strip	_handleEvents
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handleEvents
_handleEvents:                          ; @handleEvents
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #8]
Lloh3:
	adrp	x21, __glfw@GOTPAGE
Lloh4:
	ldr	x21, [x21, __glfw@GOTPAGEOFF]
	ldr	x19, [x21, #8]
	mov	x0, x19
	bl	_wl_display_get_fd
Lloh5:
	adrp	x8, _POLLIN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _POLLIN@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	stp	w0, w8, [sp]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_wl_display_prepare_read
	cbz	x0, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x19
	bl	_wl_display_dispatch_pending
	b	LBB0_1
LBB0_3:
	mov	x0, x19
	bl	_wl_display_flush
	tbz	x0, #63, LBB0_5
; %bb.4:
Lloh8:
	adrp	x8, _errno@GOTPAGE
Lloh9:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
Lloh11:
	adrp	x9, _EAGAIN@GOTPAGE
Lloh12:
	ldr	x9, [x9, _EAGAIN@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
LBB0_5:
	mov	x0, sp
	mov	w1, #1
	mov	x2, x20
	bl	_poll
	cmp	x0, #1
	b.lt	LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_wl_display_read_events
	mov	x0, x19
	bl	_wl_display_dispatch_pending
	b	LBB0_8
LBB0_7:
	mov	x0, x19
	bl	_wl_display_cancel_read
LBB0_8:
	ldr	x8, [sp, #8]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_10:
	ldr	x20, [x21]
	cbz	x20, LBB0_12
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	__glfwInputWindowCloseRequest
	ldr	x20, [x20]
	cbnz	x20, LBB0_11
LBB0_12:
	ldr	x8, [sp, #8]
Lloh17:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh18:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.13:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_wl_display_cancel_read
LBB0_14:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	__glfw,16,3                     ; @_glfw
	.comm	_POLLIN,4,2                     ; @POLLIN
	.comm	_errno,8,3                      ; @errno
	.comm	_EAGAIN,8,3                     ; @EAGAIN
	.no_dead_strip	_handleEvents
.subsections_via_symbols
