	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_DTestButtonJoy                 ## -- Begin function DTestButtonJoy
	.p2align	4, 0x90
_DTestButtonJoy:                        ## @DTestButtonJoy
	.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
	cmpl	$0, (%rdi)
	jle	LBB0_6
## %bb.1:
	movq	%rdi, %r14
	xorl	%ebx, %ebx
	movq	_Joysticks@GOTPCREL(%rip), %r15
	movl	$16384, %r12d                   ## imm = 0x4000
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	shrl	$8, %esi
	andl	$31, %esi
	callq	_SDL_JoystickGetHat
	movq	8(%r14), %rcx
	testb	%al, (%rcx,%rbx,4)
	jne	LBB0_10
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jge	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rax
	movl	(%rax,%rbx,4), %esi
	testl	$32768, %esi                    ## imm = 0x8000
	jne	LBB0_3
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r15), %rax
	movq	16(%r14), %rcx
	movq	(%rcx,%rbx,8), %rcx
	movl	(%rax,%rcx,4), %edi
	testl	$8192, %esi                     ## imm = 0x2000
	jne	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	callq	_SDL_JoystickGetButton
	testq	%rax, %rax
	je	LBB0_5
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r15), %rax
	movq	16(%r14), %rcx
	movq	(%rcx,%rbx,8), %rcx
	movl	(%rax,%rcx,4), %edi
	andl	$16383, %esi                    ## imm = 0x3FFF
	callq	_SDL_JoystickGetAxis
	movq	8(%r14), %rcx
	movl	(%rcx,%rbx,4), %ecx
	andl	%r12d, %ecx
	sete	%sil
	cmpl	$-16382, %eax                   ## imm = 0xC002
	setge	%dl
	orb	%sil, %dl
	cmpl	$16363, %eax                    ## imm = 0x3FEB
	setl	%sil
	movl	$1, %eax
	cmpb	$1, %dl
	jne	LBB0_11
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	shrl	$14, %ecx
	orb	%sil, %cl
	jne	LBB0_5
	jmp	LBB0_11
LBB0_6:
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_10:
	movl	$1, %eax
LBB0_11:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_Joysticks,8,3                  ## @Joysticks
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_DTestButtonJoy                 ; -- Begin function DTestButtonJoy
	.p2align	2
_DTestButtonJoy:                        ; @DTestButtonJoy
	.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
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.1:
	mov	x19, x0
	mov	x20, #0
Lloh0:
	adrp	x21, _Joysticks@GOTPAGE
Lloh1:
	ldr	x21, [x21, _Joysticks@GOTPAGEOFF]
	mov	w22, #16363
	mov	w23, #-16383
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ubfx	w1, w1, #8, #5
	bl	_SDL_JoystickGetHat
	ldr	x8, [x19, #8]
	lsl	x9, x20, #2
	ldrb	w8, [x8, x9]
	tst	w0, w8
	b.ne	LBB0_10
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x20, x20, #1
	ldrsw	x8, [x19]
	cmp	x20, x8
	b.ge	LBB0_9
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	w1, [x8, x20, lsl #2]
	tbnz	w1, #15, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x21]
	ldr	x9, [x19, #16]
	ldr	x9, [x9, x20, lsl #3]
	ldr	w0, [x8, x9, lsl #2]
	tbnz	w1, #13, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	_SDL_JoystickGetButton
	cbz	x0, LBB0_3
	b	LBB0_10
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x21]
	ldr	x9, [x19, #16]
	ldr	x9, [x9, x20, lsl #3]
	ldr	w0, [x8, x9, lsl #2]
	and	w1, w1, #0x3fff
	bl	_SDL_JoystickGetAxis
	ldr	x8, [x19, #8]
	ldr	w8, [x8, x20, lsl #2]
	and	w8, w8, #0x4000
	cmp	w0, w22
	cset	w9, lt
	cmp	w0, w23
	ccmp	w8, #0, #4, le
	mov	w0, #1
	b.ne	LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	orr	w8, w9, w8, lsr #14
	tbnz	w8, #0, LBB0_3
	b	LBB0_11
LBB0_9:
	mov	w0, #0
	b	LBB0_11
LBB0_10:
	mov	w0, #1
LBB0_11:
	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	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_Joysticks,8,3                  ; @Joysticks
.subsections_via_symbols
