	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__glfwPlatformPollJoystick      ## -- Begin function _glfwPlatformPollJoystick
	.p2align	4, 0x90
__glfwPlatformPollJoystick:             ## @_glfwPlatformPollJoystick
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_errno@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movl	4(%rdi), %edi
	leaq	-64(%rbp), %rsi
	movl	$24, %edx
	callq	_read
	testq	%rax, %rax
	js	LBB0_5
## %bb.1:
	movq	_EV_SYN@GOTPCREL(%rip), %r12
	movq	__glfw@GOTPCREL(%rip), %r13
	leaq	-64(%rbp), %r14
	jmp	LBB0_2
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rsi
	movl	-48(%rbp), %edx
	movq	%rbx, %rdi
	callq	_handleKeyEvent
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_errno@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movl	4(%rbx), %edi
	movq	%r14, %rsi
	movl	$24, %edx
	callq	_read
	testq	%rax, %rax
	js	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	-64(%rbp), %r15
	cmpq	(%r12), %r15
	jne	LBB0_10
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rax
	movq	_SYN_DROPPED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_GLFW_TRUE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r13)
	testq	%rax, %rax
	jne	LBB0_16
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_SYN_REPORT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_GLFW_FALSE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r13)
	movq	%rbx, %rdi
	callq	_pollAbsState
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r13), %rax
	testq	%rax, %rax
	jne	LBB0_16
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_EV_KEY@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	je	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_EV_ABS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	jne	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rsi
	movl	-48(%rbp), %edx
	movq	%rbx, %rdi
	callq	_handleAbsEvent
	jmp	LBB0_16
LBB0_5:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	callq	_closeJoystick
LBB0_7:
	movl	(%rbx), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_errno,8,3                      ## @errno
	.comm	_ENODEV,8,3                     ## @ENODEV
	.comm	_EV_SYN,8,3                     ## @EV_SYN
	.comm	_SYN_DROPPED,8,3                ## @SYN_DROPPED
	.comm	_GLFW_TRUE,8,3                  ## @GLFW_TRUE
	.comm	__glfw,8,3                      ## @_glfw
	.comm	_SYN_REPORT,8,3                 ## @SYN_REPORT
	.comm	_GLFW_FALSE,8,3                 ## @GLFW_FALSE
	.comm	_EV_KEY,8,3                     ## @EV_KEY
	.comm	_EV_ABS,8,3                     ## @EV_ABS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__glfwPlatformPollJoystick      ; -- Begin function _glfwPlatformPollJoystick
	.p2align	2
__glfwPlatformPollJoystick:             ; @_glfwPlatformPollJoystick
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x20, _errno@GOTPAGE
Lloh1:
	ldr	x20, [x20, _errno@GOTPAGEOFF]
	str	xzr, [x20]
	ldr	w0, [x0, #4]
	add	x1, sp, #8
	mov	w2, #24
	bl	_read
	tbnz	x0, #63, LBB0_13
; %bb.1:
Lloh2:
	adrp	x21, _EV_SYN@GOTPAGE
Lloh3:
	ldr	x21, [x21, _EV_SYN@GOTPAGEOFF]
Lloh4:
	adrp	x22, _SYN_DROPPED@GOTPAGE
Lloh5:
	ldr	x22, [x22, _SYN_DROPPED@GOTPAGEOFF]
Lloh6:
	adrp	x23, _GLFW_TRUE@GOTPAGE
Lloh7:
	ldr	x23, [x23, _GLFW_TRUE@GOTPAGEOFF]
Lloh8:
	adrp	x24, __glfw@GOTPAGE
Lloh9:
	ldr	x24, [x24, __glfw@GOTPAGEOFF]
Lloh10:
	adrp	x25, _SYN_REPORT@GOTPAGE
Lloh11:
	ldr	x25, [x25, _SYN_REPORT@GOTPAGEOFF]
Lloh12:
	adrp	x27, _EV_KEY@GOTPAGE
Lloh13:
	ldr	x27, [x27, _EV_KEY@GOTPAGEOFF]
Lloh14:
	adrp	x28, _EV_ABS@GOTPAGE
Lloh15:
	ldr	x28, [x28, _EV_ABS@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x1, [sp, #16]
	ldr	w2, [sp, #24]
	mov	x0, x19
	bl	_handleKeyEvent
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	str	xzr, [x20]
	ldr	w0, [x19, #4]
	add	x1, sp, #8
	mov	w2, #24
	bl	_read
	tbnz	x0, #63, LBB0_13
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x26, [sp, #8]
	ldr	x8, [x21]
	cmp	x26, x8
	b.ne	LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [sp, #16]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x23]
	str	x8, [x24]
	cbnz	x8, LBB0_3
	b	LBB0_10
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh16:
	adrp	x8, _GLFW_FALSE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _GLFW_FALSE@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	str	x8, [x24]
	mov	x0, x19
	bl	_pollAbsState
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x24]
	cbnz	x8, LBB0_3
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x27]
	cmp	x26, x8
	b.eq	LBB0_2
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x28]
	cmp	x26, x8
	b.ne	LBB0_3
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x1, [sp, #16]
	ldr	w2, [sp, #24]
	mov	x0, x19
	bl	_handleAbsEvent
	b	LBB0_3
LBB0_13:
	ldr	x8, [x20]
Lloh19:
	adrp	x9, _ENODEV@GOTPAGE
Lloh20:
	ldr	x9, [x9, _ENODEV@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.14:
	mov	x0, x19
	bl	_closeJoystick
LBB0_15:
	ldr	w0, [x19]
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_errno,8,3                      ; @errno
	.comm	_ENODEV,8,3                     ; @ENODEV
	.comm	_EV_SYN,8,3                     ; @EV_SYN
	.comm	_SYN_DROPPED,8,3                ; @SYN_DROPPED
	.comm	_GLFW_TRUE,8,3                  ; @GLFW_TRUE
	.comm	__glfw,8,3                      ; @_glfw
	.comm	_SYN_REPORT,8,3                 ; @SYN_REPORT
	.comm	_GLFW_FALSE,8,3                 ; @GLFW_FALSE
	.comm	_EV_KEY,8,3                     ; @EV_KEY
	.comm	_EV_ABS,8,3                     ; @EV_ABS
.subsections_via_symbols
