	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pvr2_g_input
_pvr2_g_input:                          ## @pvr2_g_input
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %r14
	movq	(%rdi), %rbx
	movq	16(%rbx), %rax
	movq	(%rax), %rdi
	movq	_PVR2_CID_INPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_pvr2_hdw_get_ctrl_by_id
	movl	$0, -20(%rbp)
	leaq	-20(%rbp), %rsi
	movq	%rax, %rdi
	callq	_pvr2_ctrl_get_value
	movl	$0, (%r14)
	movl	(%rbx), %ecx
	testq	%rcx, %rcx
	je	LBB0_5
## %bb.1:
	movq	8(%rbx), %rsi
	movl	-20(%rbp), %edi
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%edi, (%rsi,%rdx,4)
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rdx
	cmpq	%rdx, %rcx
	jne	LBB0_2
	jmp	LBB0_5
LBB0_3:
	movl	%edx, (%r14)
LBB0_5:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PVR2_CID_INPUT,4,2             ## @PVR2_CID_INPUT
	.no_dead_strip	_pvr2_g_input
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pvr2_g_input
_pvr2_g_input:                          ; @pvr2_g_input
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x2
	ldr	x20, [x0]
	ldr	x8, [x20, #16]
	ldr	x0, [x8]
Lloh0:
	adrp	x8, _PVR2_CID_INPUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PVR2_CID_INPUT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_pvr2_hdw_get_ctrl_by_id
	str	wzr, [sp, #12]
	add	x1, sp, #12
	bl	_pvr2_ctrl_get_value
	str	wzr, [x19]
	ldr	w8, [x20]
	cbz	w8, LBB0_5
; %bb.1:
	mov	x9, #0
	ldr	x10, [x20, #8]
	ldr	w11, [sp, #12]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x10, x9, lsl #2]
	cmp	w12, w11
	b.eq	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x9, x9, #1
	cmp	x8, x9
	b.ne	LBB0_2
	b	LBB0_5
LBB0_4:
	str	w9, [x19]
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PVR2_CID_INPUT,4,2             ; @PVR2_CID_INPUT
	.no_dead_strip	_pvr2_g_input
.subsections_via_symbols
