	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	__glfw@GOTPCREL(%rip), %r13
	movq	32(%r13), %r15
	movq	%r15, %rdi
	callq	_wl_display_get_fd
	movl	%eax, -96(%rbp)
	movq	_POLLIN@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	movl	%eax, -92(%rbp)
	movl	$0, -88(%rbp)
	movl	4(%r13), %ecx
	movl	24(%r13), %edx
	movl	%edx, -84(%rbp)
	movl	%eax, -80(%rbp)
	movl	$0, -76(%rbp)
	movl	%ecx, -72(%rbp)
	movl	%eax, -68(%rbp)
	movl	$0, -64(%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_10
## %bb.4:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
LBB0_10:
	leaq	-96(%rbp), %rdi
	movl	$3, %esi
	movl	%r14d, %edx
	callq	_poll
	testq	%rax, %rax
	jle	LBB0_22
## %bb.11:
	movl	(%r12), %eax
	testl	%eax, -92(%rbp)
	je	LBB0_13
## %bb.12:
	movq	%r15, %rdi
	callq	_wl_display_read_events
	movq	%r15, %rdi
	callq	_wl_display_dispatch_pending
	jmp	LBB0_14
LBB0_22:
	movq	%r15, %rdi
	callq	_wl_display_cancel_read
	jmp	LBB0_23
LBB0_13:
	movq	%r15, %rdi
	callq	_wl_display_cancel_read
LBB0_14:
	movl	(%r12), %eax
	testl	%eax, -80(%rbp)
	je	LBB0_19
## %bb.15:
	movl	24(%r13), %edi
	leaq	-104(%rbp), %rsi
	movl	$8, %edx
	callq	_read
	cmpl	$8, %eax
	jne	LBB0_23
## %bb.16:
	movq	-104(%rbp), %rbx
	testq	%rbx, %rbx
	jle	LBB0_19
## %bb.17:
	movq	_GLFW_REPEAT@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movl	20(%r13), %edi
	movl	16(%r13), %esi
	movl	8(%r13), %r8d
	movl	12(%r13), %edx
	movl	(%r14), %ecx
	callq	__glfwInputKey
	decq	%rbx
	jne	LBB0_18
LBB0_19:
	movl	(%r12), %eax
	testl	%eax, -68(%rbp)
	je	LBB0_23
## %bb.20:
	movl	4(%r13), %edi
	leaq	-104(%rbp), %rsi
	movl	$8, %edx
	callq	_read
	cmpl	$8, %eax
	jne	LBB0_23
## %bb.21:
	movl	(%r13), %edi
	callq	_incrementCursorImage
LBB0_23:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_25
## %bb.24:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	40(%r13), %rbx
	testq	%rbx, %rbx
	je	LBB0_8
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	__glfwInputWindowCloseRequest
	movq	(%rbx), %rbx
	testq	%rbx, %rbx
	jne	LBB0_6
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_25
## %bb.9:
	movq	%r15, %rdi
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wl_display_cancel_read         ## TAILCALL
LBB0_25:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	__glfw,48,3                     ## @_glfw
	.comm	_POLLIN,4,2                     ## @POLLIN
	.comm	_errno,8,3                      ## @errno
	.comm	_EAGAIN,8,3                     ## @EAGAIN
	.comm	_GLFW_REPEAT,4,2                ## @GLFW_REPEAT
	.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, #112
	.cfi_def_cfa_offset 112
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x21, __glfw@GOTPAGE
Lloh4:
	ldr	x21, [x21, __glfw@GOTPAGEOFF]
	ldr	x19, [x21, #32]
	mov	x0, x19
	bl	_wl_display_get_fd
Lloh5:
	adrp	x22, _POLLIN@GOTPAGE
Lloh6:
	ldr	x22, [x22, _POLLIN@GOTPAGEOFF]
	ldr	w8, [x22]
	stp	w0, w8, [sp, #16]
	ldr	w9, [x21, #24]
	stp	wzr, w9, [sp, #24]
	stp	w8, wzr, [sp, #32]
	ldr	w9, [x21, #4]
	stp	w9, w8, [sp, #40]
	str	wzr, [sp, #48]
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:
Lloh7:
	adrp	x8, _errno@GOTPAGE
Lloh8:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
Lloh10:
	adrp	x9, _EAGAIN@GOTPAGE
Lloh11:
	ldr	x9, [x9, _EAGAIN@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_20
LBB0_5:
	add	x0, sp, #16
	mov	w1, #3
	mov	x2, x20
	bl	_poll
	cmp	x0, #1
	b.lt	LBB0_8
; %bb.6:
	ldr	w8, [sp, #20]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.7:
	mov	x0, x19
	bl	_wl_display_read_events
	mov	x0, x19
	bl	_wl_display_dispatch_pending
	b	LBB0_10
LBB0_8:
	mov	x0, x19
	bl	_wl_display_cancel_read
	b	LBB0_18
LBB0_9:
	mov	x0, x19
	bl	_wl_display_cancel_read
LBB0_10:
	ldr	w8, [sp, #32]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_15
; %bb.11:
	ldr	w0, [x21, #24]
	add	x1, sp, #8
	mov	w2, #8
	bl	_read
	cmp	w0, #8
	b.ne	LBB0_18
; %bb.12:
	ldr	x19, [sp, #8]
	cmp	x19, #1
	b.lt	LBB0_15
; %bb.13:
Lloh13:
	adrp	x20, _GLFW_REPEAT@GOTPAGE
Lloh14:
	ldr	x20, [x20, _GLFW_REPEAT@GOTPAGEOFF]
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldp	w1, w0, [x21, #16]
	ldr	w3, [x20]
	ldp	w4, w2, [x21, #8]
	bl	__glfwInputKey
	subs	x19, x19, #1
	b.ne	LBB0_14
LBB0_15:
	ldr	w8, [sp, #44]
	ldr	w9, [x22]
	tst	w9, w8
	b.eq	LBB0_18
; %bb.16:
	ldr	w0, [x21, #4]
	add	x1, sp, #8
	mov	w2, #8
	bl	_read
	cmp	w0, #8
	b.ne	LBB0_18
; %bb.17:
	ldr	w0, [x21]
	bl	_incrementCursorImage
LBB0_18:
	ldur	x8, [x29, #-40]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_24
; %bb.19:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_20:
	ldr	x20, [x21, #40]
	cbz	x20, LBB0_22
LBB0_21:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	__glfwInputWindowCloseRequest
	ldr	x20, [x20]
	cbnz	x20, LBB0_21
LBB0_22:
	ldur	x8, [x29, #-40]
Lloh18:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh19:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_24
; %bb.23:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_wl_display_cancel_read
LBB0_24:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	__glfw,48,3                     ; @_glfw
	.comm	_POLLIN,4,2                     ; @POLLIN
	.comm	_errno,8,3                      ; @errno
	.comm	_EAGAIN,8,3                     ; @EAGAIN
	.comm	_GLFW_REPEAT,4,2                ; @GLFW_REPEAT
	.no_dead_strip	_handleEvents
.subsections_via_symbols
