	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_glfwGetJoystickHats            ## -- Begin function glfwGetJoystickHats
	.p2align	4, 0x90
_glfwGetJoystickHats:                   ## @glfwGetJoystickHats
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movl	%edi, %ebx
	movq	_GLFW_JOYSTICK_1@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpl	%ebx, (%rax)
	setle	%dil
	callq	_assert
	movq	_GLFW_JOYSTICK_LAST@GOTPCREL(%rip), %r15
	xorl	%edi, %edi
	cmpl	%ebx, (%r15)
	setge	%dil
	callq	_assert
	xorl	%edi, %edi
	testq	%r14, %r14
	setne	%dil
	callq	_assert
	movl	$0, (%r14)
	xorl	%edi, %edi
	callq	__GLFW_REQUIRE_INIT_OR_RETURN
	testl	%ebx, %ebx
	js	LBB0_5
## %bb.1:
	cmpl	%ebx, (%r15)
	jl	LBB0_5
## %bb.2:
	movq	__glfw@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movl	%ebx, %eax
	leaq	(%rax,%rax,2), %rbx
	cmpl	$0, 16(%r15,%rbx,8)
	je	LBB0_7
## %bb.3:
	leaq	(%r15,%rbx,8), %r12
	movq	__GLFW_POLL_BUTTONS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	__glfwPlatformPollJoystick
	testl	%eax, %eax
	je	LBB0_7
## %bb.4:
	movl	(%r12), %eax
	movl	%eax, (%r14)
	movq	8(%r15,%rbx,8), %rax
	jmp	LBB0_8
LBB0_5:
	movq	_GLFW_INVALID_ENUM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	__glfwInputError
LBB0_7:
	xorl	%eax, %eax
LBB0_8:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GLFW_JOYSTICK_1,4,2            ## @GLFW_JOYSTICK_1
	.comm	_GLFW_JOYSTICK_LAST,4,2         ## @GLFW_JOYSTICK_LAST
	.comm	_GLFW_INVALID_ENUM,4,2          ## @GLFW_INVALID_ENUM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid joystick ID %i"

	.comm	__glfw,8,3                      ## @_glfw
	.comm	__GLFW_POLL_BUTTONS,4,2         ## @_GLFW_POLL_BUTTONS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_glfwGetJoystickHats            ; -- Begin function glfwGetJoystickHats
	.p2align	2
_glfwGetJoystickHats:                   ; @glfwGetJoystickHats
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _GLFW_JOYSTICK_1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GLFW_JOYSTICK_1@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w0
	cset	w0, le
	bl	_assert
Lloh3:
	adrp	x21, _GLFW_JOYSTICK_LAST@GOTPAGE
Lloh4:
	ldr	x21, [x21, _GLFW_JOYSTICK_LAST@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, w19
	cset	w0, ge
	bl	_assert
	cmp	x20, #0
	cset	w0, ne
	bl	_assert
	str	wzr, [x20]
	mov	x0, #0
	bl	__GLFW_REQUIRE_INIT_OR_RETURN
	tbnz	w19, #31, LBB0_5
; %bb.1:
	ldr	w8, [x21]
	cmp	w8, w19
	b.lt	LBB0_5
; %bb.2:
Lloh5:
	adrp	x8, __glfw@GOTPAGE
Lloh6:
	ldr	x8, [x8, __glfw@GOTPAGEOFF]
Lloh7:
	ldr	x22, [x8]
	mov	w8, #24
	umaddl	x21, w19, w8, x22
	ldr	w8, [x21, #16]
	cbz	w8, LBB0_6
; %bb.3:
Lloh8:
	adrp	x8, __GLFW_POLL_BUTTONS@GOTPAGE
Lloh9:
	ldr	x8, [x8, __GLFW_POLL_BUTTONS@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x21
	bl	__glfwPlatformPollJoystick
	cbz	w0, LBB0_6
; %bb.4:
	mov	w8, w19
	ldr	w9, [x21]
	str	w9, [x20]
	mov	w9, #24
	madd	x8, x8, x9, x22
	ldr	x0, [x8, #8]
	b	LBB0_7
LBB0_5:
Lloh11:
	adrp	x8, _GLFW_INVALID_ENUM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _GLFW_INVALID_ENUM@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	__glfwInputError
LBB0_6:
	mov	x0, #0
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_GLFW_JOYSTICK_1,4,2            ; @GLFW_JOYSTICK_1
	.comm	_GLFW_JOYSTICK_LAST,4,2         ; @GLFW_JOYSTICK_LAST
	.comm	_GLFW_INVALID_ENUM,4,2          ; @GLFW_INVALID_ENUM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid joystick ID %i"

	.comm	__glfw,8,3                      ; @_glfw
	.comm	__GLFW_POLL_BUTTONS,4,2         ; @_GLFW_POLL_BUTTONS
.subsections_via_symbols
