	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdl_joypad_button
_sdl_joypad_button:                     ## @sdl_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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_sdl_pads@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	xorl	%r14d, %r14d
	testq	%rax, %rax
	je	LBB0_14
## %bb.1:
	movl	%edi, %ecx
	leaq	(%rax,%rcx,4), %rbx
	cmpl	$0, 16(%rbx)
	je	LBB0_14
## %bb.2:
	movq	%rsi, %r15
	movq	%rsi, %rdi
	callq	_GET_HAT_DIR
	testl	%eax, %eax
	je	LBB0_11
## %bb.3:
	movl	%eax, %r12d
	movq	%r15, %rdi
	callq	_GET_HAT
	cmpq	(%rbx), %rax
	jge	LBB0_14
## %bb.4:
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_sdl_pad_get_hat
	addl	$-128, %r12d
	movl	$0, %r14d
	cmpl	$3, %r12d
	ja	LBB0_14
## %bb.5:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%r12,4), %rdx
	addq	%rcx, %rdx
	jmpq	*%rdx
LBB0_6:
	movq	_SDL_HAT_UP@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_11:
	cmpq	%r15, 8(%rbx)
	jle	LBB0_13
## %bb.12:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_sdl_pad_get_button
	movl	$1, %r14d
	testq	%rax, %rax
	jne	LBB0_14
LBB0_13:
	xorl	%r14d, %r14d
	jmp	LBB0_14
LBB0_9:
	movq	_SDL_HAT_LEFT@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_8:
	movq	_SDL_HAT_DOWN@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_10:
	movq	_SDL_HAT_RIGHT@GOTPCREL(%rip), %rcx
LBB0_7:
	andl	(%rcx), %eax
	movl	%eax, %r14d
LBB0_14:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
LJTI0_0:
	.long	L0_0_set_6
	.long	L0_0_set_10
	.long	L0_0_set_9
	.long	L0_0_set_8
	.end_data_region
                                        ## -- End function
	.comm	_sdl_pads,8,3                   ## @sdl_pads
	.comm	_SDL_HAT_UP,4,2                 ## @SDL_HAT_UP
	.comm	_SDL_HAT_DOWN,4,2               ## @SDL_HAT_DOWN
	.comm	_SDL_HAT_LEFT,4,2               ## @SDL_HAT_LEFT
	.comm	_SDL_HAT_RIGHT,4,2              ## @SDL_HAT_RIGHT
	.no_dead_strip	_sdl_joypad_button
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdl_joypad_button
_sdl_joypad_button:                     ; @sdl_joypad_button
	.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
Lloh0:
	adrp	x8, _sdl_pads@GOTPAGE
Lloh1:
	ldr	x8, [x8, _sdl_pads@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_10
; %bb.1:
	add	x19, x8, w0, uxtw #2
	ldr	w8, [x19, #16]
	cbz	w8, LBB0_10
; %bb.2:
	mov	x20, x1
	mov	x0, x1
	bl	_GET_HAT_DIR
	cbz	w0, LBB0_7
; %bb.3:
	mov	x21, x0
	mov	x0, x20
	bl	_GET_HAT
	ldr	x8, [x19]
	cmp	x0, x8
	b.ge	LBB0_10
; %bb.4:
	mov	x1, x0
	mov	x0, x19
	bl	_sdl_pad_get_hat
	sub	w8, w21, #128
	cmp	w8, #3
	b.hi	LBB0_10
; %bb.5:
Lloh3:
	adrp	x9, lJTI0_0@PAGE
Lloh4:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_6
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_6:
Lloh5:
	adrp	x8, _SDL_HAT_UP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SDL_HAT_UP@GOTPAGEOFF]
	b	LBB0_15
LBB0_7:
	ldr	x8, [x19, #8]
	cmp	x8, x20
	b.le	LBB0_10
; %bb.8:
	mov	x0, x19
	mov	x1, x20
	bl	_sdl_pad_get_button
	cbz	x0, LBB0_10
; %bb.9:
	mov	w0, #1
	b	LBB0_11
LBB0_10:
	mov	w0, #0
LBB0_11:
	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
LBB0_12:
Lloh7:
	adrp	x8, _SDL_HAT_LEFT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SDL_HAT_LEFT@GOTPAGEOFF]
	b	LBB0_15
LBB0_13:
Lloh9:
	adrp	x8, _SDL_HAT_DOWN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SDL_HAT_DOWN@GOTPAGEOFF]
	b	LBB0_15
LBB0_14:
Lloh11:
	adrp	x8, _SDL_HAT_RIGHT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SDL_HAT_RIGHT@GOTPAGEOFF]
LBB0_15:
	ldr	w8, [x8]
	and	w0, w8, w0
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_6-LBB0_6)>>2
	.byte	(LBB0_14-LBB0_6)>>2
	.byte	(LBB0_12-LBB0_6)>>2
	.byte	(LBB0_13-LBB0_6)>>2
                                        ; -- End function
	.comm	_sdl_pads,8,3                   ; @sdl_pads
	.comm	_SDL_HAT_UP,4,2                 ; @SDL_HAT_UP
	.comm	_SDL_HAT_DOWN,4,2               ; @SDL_HAT_DOWN
	.comm	_SDL_HAT_LEFT,4,2               ; @SDL_HAT_LEFT
	.comm	_SDL_HAT_RIGHT,4,2              ; @SDL_HAT_RIGHT
	.no_dead_strip	_sdl_joypad_button
.subsections_via_symbols
