	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dinput_lightgun_aiming_state
_dinput_lightgun_aiming_state:          ## @dinput_lightgun_aiming_state
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$80, %rsp
	movl	$0, -16(%rbp)
	movl	$0, -12(%rbp)
	movl	$0, -8(%rbp)
	movl	$0, -4(%rbp)
	movq	8(%rdi), %rax
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -48(%rbp)
	movaps	%xmm0, -64(%rbp)
	movq	$0, -32(%rbp)
	testq	%rax, %rax
	setne	%r8b
	je	LBB0_5
## %bb.1:
	testl	%esi, %esi
	je	LBB0_5
## %bb.2:
	movl	$1, %edx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rax), %rax
	testq	%rax, %rax
	setne	%r8b
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	leal	1(%rdx), %ecx
	cmpl	%esi, %edx
	movl	%ecx, %edx
	jb	LBB0_3
LBB0_5:
	testl	%esi, %esi
	je	LBB0_7
## %bb.6:
	testq	%rax, %rax
	je	LBB0_8
LBB0_7:
	leaq	4(%rdi), %rcx
	leaq	4(%rax), %rdx
	testb	%r8b, %r8b
	cmovneq	%rax, %rdi
	cmovneq	%rdx, %rcx
	movl	(%rcx), %edx
	movl	(%rdi), %esi
	leaq	-4(%rbp), %rax
	movq	%rax, (%rsp)
	leaq	-64(%rbp), %rdi
	leaq	-16(%rbp), %rcx
	leaq	-12(%rbp), %r8
	leaq	-8(%rbp), %r9
	callq	_video_driver_translate_coord_viewport_wrap
LBB0_8:
	xorl	%eax, %eax
	addq	$80, %rsp
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_dinput_lightgun_aiming_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dinput_lightgun_aiming_state
_dinput_lightgun_aiming_state:          ; @dinput_lightgun_aiming_state
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	stp	xzr, xzr, [sp]
	ldr	x8, [x0, #8]
	cmp	x8, #0
	cset	w9, ne
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp, #16]
	str	xzr, [sp, #48]
	cmp	x8, #0
	ccmp	w1, #0, #4, ne
	b.eq	LBB0_3
; %bb.1:
	mov	w10, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x8, #8]
	cmp	x8, #0
	cset	w9, ne
	ccmp	w10, w1, #2, ne
	add	w10, w10, #1
	b.lo	LBB0_2
LBB0_3:
	cbz	w1, LBB0_5
; %bb.4:
	cbz	x8, LBB0_6
LBB0_5:
	add	x10, x0, #4
	add	x11, x8, #4
	cmp	w9, #0
	csel	x8, x8, x0, ne
	csel	x9, x11, x10, ne
	ldr	w2, [x9]
	ldr	w1, [x8]
	add	x0, sp, #16
	add	x3, sp, #12
	add	x4, sp, #8
	add	x5, sp, #4
	mov	x6, sp
	bl	_video_driver_translate_coord_viewport_wrap
LBB0_6:
	mov	w0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_dinput_lightgun_aiming_state
.subsections_via_symbols
