	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iohidmanager_hid_joypad_button
_iohidmanager_hid_joypad_button:        ## @iohidmanager_hid_joypad_button
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movl	%esi, %r15d
	movq	%rdi, %r14
	movl	%edx, %edi
	callq	_GET_HAT_DIR
	movl	%eax, %ebx
	leaq	-36(%rbp), %rdx
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_iohidmanager_hid_joypad_get_buttons
	testl	%ebx, %ebx
	je	LBB0_3
## %bb.1:
	movl	%r12d, %edi
	callq	_GET_HAT
	testl	%eax, %eax
	je	LBB0_7
LBB0_2:
	xorl	%eax, %eax
LBB0_16:
	movzbl	%al, %eax
LBB0_17:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	xorl	%eax, %eax
	cmpl	$31, %r12d
	jg	LBB0_17
## %bb.4:
	movq	_MAX_USERS@GOTPCREL(%rip), %rcx
	cmpl	%r15d, (%rcx)
	jbe	LBB0_17
## %bb.5:
	movl	-36(%rbp), %edi
	movl	%r12d, %esi
	callq	_BIT256_GET
	movq	%rax, %rcx
	movl	$1, %eax
	testq	%rcx, %rcx
	jne	LBB0_17
## %bb.6:
	movq	(%r14), %rax
	movl	%r15d, %ecx
	movl	(%rax,%rcx,4), %ecx
	xorl	%eax, %eax
	btl	%r12d, %ecx
	setb	%al
	jmp	LBB0_17
LBB0_7:
	addl	$-128, %ebx
	cmpl	$3, %ebx
	ja	LBB0_2
## %bb.8:
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rbx,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_9:
	movq	8(%r14), %rax
	movl	%r15d, %ecx
	movq	(%rax,%rcx,8), %rax
	movl	4(%rax), %eax
	jmp	LBB0_13
LBB0_11:
	movq	8(%r14), %rax
	movl	%r15d, %ecx
	movq	(%rax,%rcx,8), %rax
	cmpl	$0, (%rax)
	jmp	LBB0_15
LBB0_12:
	movq	8(%r14), %rax
	movl	%r15d, %ecx
	movq	(%rax,%rcx,8), %rax
	movl	(%rax), %eax
LBB0_13:
	shrl	$31, %eax
	jmp	LBB0_16
LBB0_14:
	movq	8(%r14), %rax
	movl	%r15d, %ecx
	movq	(%rax,%rcx,8), %rax
	cmpl	$0, 4(%rax)
LBB0_15:
	setg	%al
	jmp	LBB0_16
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
LJTI0_0:
	.long	L0_0_set_9
	.long	L0_0_set_11
	.long	L0_0_set_12
	.long	L0_0_set_14
	.end_data_region
                                        ## -- End function
	.comm	_MAX_USERS,4,2                  ## @MAX_USERS
	.no_dead_strip	_iohidmanager_hid_joypad_button
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iohidmanager_hid_joypad_button
_iohidmanager_hid_joypad_button:        ; @iohidmanager_hid_joypad_button
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
	mov	x0, x2
	bl	_GET_HAT_DIR
	mov	x22, x0
	add	x2, sp, #12
	mov	x0, x20
	mov	x1, x19
	bl	_iohidmanager_hid_joypad_get_buttons
	cbz	w22, LBB0_3
; %bb.1:
	mov	x0, x21
	bl	_GET_HAT
	cbz	w0, LBB0_7
LBB0_2:
	mov	w0, #0
	b	LBB0_15
LBB0_3:
	mov	w0, #0
	cmp	w21, #31
	b.gt	LBB0_15
; %bb.4:
Lloh0:
	adrp	x8, _MAX_USERS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_USERS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w19
	b.ls	LBB0_15
; %bb.5:
	ldr	w0, [sp, #12]
	mov	x1, x21
	bl	_BIT256_GET
	cbz	x0, LBB0_10
; %bb.6:
	mov	w0, #1
	b	LBB0_15
LBB0_7:
	sub	w8, w22, #128
	cmp	w8, #3
	b.hi	LBB0_2
; %bb.8:
Lloh3:
	adrp	x9, lJTI0_0@PAGE
Lloh4:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_9
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_9:
	ldr	x8, [x20, #8]
	ldr	x8, [x8, w19, uxtw #3]
	ldr	w8, [x8, #4]
	lsr	w0, w8, #31
	b	LBB0_15
LBB0_10:
	ldr	x8, [x20]
	ldr	w8, [x8, w19, uxtw #2]
	lsr	w8, w8, w21
	and	w0, w8, #0x1
	b	LBB0_15
LBB0_11:
	ldr	x8, [x20, #8]
	ldr	x8, [x8, w19, uxtw #3]
	ldr	w8, [x8]
	b	LBB0_14
LBB0_12:
	ldr	x8, [x20, #8]
	ldr	x8, [x8, w19, uxtw #3]
	ldr	w8, [x8]
	lsr	w0, w8, #31
	b	LBB0_15
LBB0_13:
	ldr	x8, [x20, #8]
	ldr	x8, [x8, w19, uxtw #3]
	ldr	w8, [x8, #4]
LBB0_14:
	cmp	w8, #0
	cset	w0, gt
LBB0_15:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_9-LBB0_9)>>2
	.byte	(LBB0_11-LBB0_9)>>2
	.byte	(LBB0_12-LBB0_9)>>2
	.byte	(LBB0_13-LBB0_9)>>2
                                        ; -- End function
	.comm	_MAX_USERS,4,2                  ; @MAX_USERS
	.no_dead_strip	_iohidmanager_hid_joypad_button
.subsections_via_symbols
