	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pvr2_ctrl_range_check
_pvr2_ctrl_range_check:                 ## @pvr2_ctrl_range_check
	.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
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	(%rdi), %rcx
	movq	40(%rcx), %rax
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	*%rax
	movl	%eax, %ecx
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jne	LBB0_13
	jmp	LBB0_2
LBB0_3:
	movq	(%rcx), %rax
	movq	_pvr2_ctl_enum@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_6
## %bb.4:
	testl	%r14d, %r14d
	js	LBB0_2
## %bb.5:
	xorl	%eax, %eax
	cmpl	%r14d, 24(%rcx)
	jle	LBB0_2
	jmp	LBB0_13
LBB0_6:
	movl	16(%rcx), %eax
	movl	%eax, -20(%rbp)
	movq	32(%rcx), %rcx
	testq	%rcx, %rcx
	je	LBB0_8
## %bb.7:
	leaq	-20(%rbp), %rsi
	movq	%rbx, %rdi
	callq	*%rcx
	movl	-20(%rbp), %eax
LBB0_8:
	cmpl	%r14d, %eax
	jg	LBB0_2
## %bb.9:
	movq	(%rbx), %rcx
	movl	20(%rcx), %eax
	movl	%eax, -20(%rbp)
	movq	8(%rcx), %rcx
	testq	%rcx, %rcx
	je	LBB0_11
## %bb.10:
	leaq	-20(%rbp), %rsi
	movq	%rbx, %rdi
	callq	*%rcx
	movl	-20(%rbp), %eax
LBB0_11:
	cmpl	%r14d, %eax
	jge	LBB0_12
LBB0_2:
	movq	_ERANGE@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_12:
	xorl	%eax, %eax
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_ERANGE,4,2                     ## @ERANGE
	.comm	_pvr2_ctl_enum,8,3              ## @pvr2_ctl_enum
	.no_dead_strip	_pvr2_ctrl_range_check
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pvr2_ctrl_range_check
_pvr2_ctrl_range_check:                 ; @pvr2_ctrl_range_check
	.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, x1
	mov	x20, x0
	ldr	x8, [x0]
	ldr	x9, [x8, #40]
	cbz	x9, LBB0_3
; %bb.1:
	mov	x0, x20
	mov	x1, x19
	blr	x9
	cbz	w0, LBB0_12
LBB0_2:
	mov	w0, #0
	b	LBB0_13
LBB0_3:
	ldr	x9, [x8]
Lloh0:
	adrp	x10, _pvr2_ctl_enum@GOTPAGE
Lloh1:
	ldr	x10, [x10, _pvr2_ctl_enum@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_6
; %bb.4:
	tbnz	w19, #31, LBB0_12
; %bb.5:
	ldr	w8, [x8, #24]
	cmp	w8, w19
	b.gt	LBB0_2
	b	LBB0_12
LBB0_6:
	ldr	w9, [x8, #16]
	str	w9, [sp, #12]
	ldr	x8, [x8, #32]
	cbz	x8, LBB0_8
; %bb.7:
	add	x1, sp, #12
	mov	x0, x20
	blr	x8
	ldr	w9, [sp, #12]
LBB0_8:
	cmp	w9, w19
	b.gt	LBB0_12
; %bb.9:
	ldr	x9, [x20]
	ldr	w8, [x9, #20]
	str	w8, [sp, #12]
	ldr	x9, [x9, #8]
	cbz	x9, LBB0_11
; %bb.10:
	add	x1, sp, #12
	mov	x0, x20
	blr	x9
	ldr	w8, [sp, #12]
LBB0_11:
	cmp	w8, w19
	b.ge	LBB0_2
LBB0_12:
Lloh3:
	adrp	x8, _ERANGE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_13:
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ERANGE,4,2                     ; @ERANGE
	.comm	_pvr2_ctl_enum,8,3              ; @pvr2_ctl_enum
	.no_dead_strip	_pvr2_ctrl_range_check
.subsections_via_symbols
