	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ctrl_channel_set
_ctrl_channel_set:                      ## @ctrl_channel_set
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	testl	%edx, %edx
	js	LBB0_8
## %bb.1:
	movl	%edx, %ebx
	movq	_FREQTABLE_SIZE@GOTPCREL(%rip), %rax
	cmpl	%edx, (%rax)
	jl	LBB0_8
## %bb.2:
	movq	(%rdi), %r14
	testl	%ebx, %ebx
	je	LBB0_5
## %bb.3:
	movq	(%r14), %rax
	leal	-1(%rbx), %ecx
	movl	(%rax,%rcx,4), %esi
	testl	%esi, %esi
	je	LBB0_8
## %bb.4:
	movq	%r14, %rdi
	callq	_pvr2_hdw_set_cur_freq
LBB0_5:
	cmpq	$0, 16(%r14)
	je	LBB0_7
## %bb.6:
	movl	%ebx, 8(%r14)
	jmp	LBB0_8
LBB0_7:
	movl	%ebx, 12(%r14)
LBB0_8:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FREQTABLE_SIZE,4,2             ## @FREQTABLE_SIZE
	.no_dead_strip	_ctrl_channel_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ctrl_channel_set
_ctrl_channel_set:                      ; @ctrl_channel_set
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	tbnz	w2, #31, LBB0_8
; %bb.1:
	mov	x19, x2
Lloh0:
	adrp	x8, _FREQTABLE_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FREQTABLE_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w2
	b.lt	LBB0_8
; %bb.2:
	ldr	x20, [x0]
	cbz	w19, LBB0_5
; %bb.3:
	ldr	x8, [x20]
	sub	w9, w19, #1
	ldr	w1, [x8, w9, uxtw #2]
	cbz	w1, LBB0_8
; %bb.4:
	mov	x0, x20
	bl	_pvr2_hdw_set_cur_freq
LBB0_5:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_7
; %bb.6:
	str	w19, [x20, #8]
	b	LBB0_8
LBB0_7:
	str	w19, [x20, #12]
LBB0_8:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_FREQTABLE_SIZE,4,2             ; @FREQTABLE_SIZE
	.no_dead_strip	_ctrl_channel_set
.subsections_via_symbols
