	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_glfwGetJoystickButtons         ## -- Begin function glfwGetJoystickButtons
	.p2align	4, 0x90
_glfwGetJoystickButtons:                ## @glfwGetJoystickButtons
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -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_7
## %bb.1:
	cmpl	%ebx, (%r15)
	jl	LBB0_7
## %bb.2:
	movq	__glfw@GOTPCREL(%rip), %r13
	movq	8(%r13), %r15
	movl	%ebx, %eax
	leaq	(%rax,%rax,2), %rbx
	cmpl	$0, 16(%r15,%rbx,8)
	je	LBB0_9
## %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_9
## %bb.4:
	cmpq	$0, (%r13)
	movl	(%r12), %eax
	je	LBB0_6
## %bb.5:
	movl	4(%r15,%rbx,8), %ecx
	leal	(%rax,%rcx,4), %eax
LBB0_6:
	movl	%eax, (%r14)
	movq	8(%r15,%rbx,8), %rax
	jmp	LBB0_10
LBB0_7:
	movq	_GLFW_INVALID_ENUM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	__glfwInputError
LBB0_9:
	xorl	%eax, %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	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,16,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	_glfwGetJoystickButtons         ; -- Begin function glfwGetJoystickButtons
	.p2align	2
_glfwGetJoystickButtons:                ; @glfwGetJoystickButtons
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	mov	x20, 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, w20
	cset	w0, ge
	bl	_assert
	cmp	x19, #0
	cset	w0, ne
	bl	_assert
	str	wzr, [x19]
	mov	x0, #0
	bl	__GLFW_REQUIRE_INIT_OR_RETURN
	tbnz	w20, #31, LBB0_7
; %bb.1:
	ldr	w8, [x21]
	cmp	w8, w20
	b.lt	LBB0_7
; %bb.2:
Lloh5:
	adrp	x23, __glfw@GOTPAGE
Lloh6:
	ldr	x23, [x23, __glfw@GOTPAGEOFF]
	ldr	x22, [x23, #8]
	mov	w8, #24
	umaddl	x21, w20, w8, x22
	ldr	w8, [x21, #16]
	cbz	w8, LBB0_8
; %bb.3:
Lloh7:
	adrp	x8, __GLFW_POLL_BUTTONS@GOTPAGE
Lloh8:
	ldr	x8, [x8, __GLFW_POLL_BUTTONS@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x21
	bl	__glfwPlatformPollJoystick
	cbz	w0, LBB0_8
; %bb.4:
	mov	w8, w20
	ldr	x10, [x23]
	ldr	w9, [x21]
	cbz	x10, LBB0_6
; %bb.5:
	mov	w10, #24
	madd	x10, x8, x10, x22
	ldr	w10, [x10, #4]
	add	w9, w9, w10, lsl #2
LBB0_6:
	str	w9, [x19]
	mov	w9, #24
	madd	x8, x8, x9, x22
	ldr	x0, [x8, #8]
	b	LBB0_9
LBB0_7:
Lloh10:
	adrp	x8, _GLFW_INVALID_ENUM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _GLFW_INVALID_ENUM@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	__glfwInputError
LBB0_8:
	mov	x0, #0
LBB0_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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.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,16,3                     ; @_glfw
	.comm	__GLFW_POLL_BUTTONS,4,2         ; @_GLFW_POLL_BUTTONS
.subsections_via_symbols
