	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pvr2_hdw_cmd_modeswitch
_pvr2_hdw_cmd_modeswitch:               ## @pvr2_hdw_cmd_modeswitch
	.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
	movq	%rdi, %rbx
	testl	%esi, %esi
	jne	LBB0_1
## %bb.2:
	movq	_PVR2_PATHWAY_ANALOG@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_PVR2_PATHWAY_DIGITAL@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %r14d
	cmpl	(%rbx), %r14d
	je	LBB0_10
## %bb.4:
	movq	8(%rbx), %rax
	movl	(%rax), %eax
	cmpl	$128, %eax
	je	LBB0_8
## %bb.5:
	cmpl	$129, %eax
	jne	LBB0_9
## %bb.6:
	movq	%rbx, %rdi
	callq	_pvr2_hdw_cmd_hcw_demod_reset
	movq	_PVR2_PATHWAY_ANALOG@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jne	LBB0_9
## %bb.7:
	movq	%rbx, %rdi
	callq	_pvr2_hdw_cmd_decoder_reset
	jmp	LBB0_9
LBB0_8:
	movq	%rbx, %rdi
	callq	_pvr2_hdw_cmd_onair_fe_power_ctrl
LBB0_9:
	movq	%rbx, %rdi
	callq	_pvr2_hdw_untrip_unlocked
	movl	%r14d, (%rbx)
LBB0_10:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PVR2_PATHWAY_DIGITAL,4,2       ## @PVR2_PATHWAY_DIGITAL
	.comm	_PVR2_PATHWAY_ANALOG,4,2        ## @PVR2_PATHWAY_ANALOG
	.no_dead_strip	_pvr2_hdw_cmd_modeswitch
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pvr2_hdw_cmd_modeswitch
_pvr2_hdw_cmd_modeswitch:               ; @pvr2_hdw_cmd_modeswitch
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
Lloh0:
	adrp	x8, _PVR2_PATHWAY_DIGITAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PVR2_PATHWAY_DIGITAL@GOTPAGEOFF]
Lloh2:
	adrp	x21, _PVR2_PATHWAY_ANALOG@GOTPAGE
Lloh3:
	ldr	x21, [x21, _PVR2_PATHWAY_ANALOG@GOTPAGEOFF]
	cmp	w1, #0
	csel	x8, x21, x8, eq
	ldr	w20, [x8]
	ldr	w8, [x0]
	cmp	w20, w8
	b.eq	LBB0_7
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldr	w8, [x8]
	cmp	w8, #128
	b.eq	LBB0_5
; %bb.2:
	cmp	w8, #129
	b.ne	LBB0_6
; %bb.3:
	mov	x0, x19
	bl	_pvr2_hdw_cmd_hcw_demod_reset
	ldr	w8, [x21]
	cmp	w20, w8
	b.ne	LBB0_6
; %bb.4:
	mov	x0, x19
	bl	_pvr2_hdw_cmd_decoder_reset
	b	LBB0_6
LBB0_5:
	mov	x0, x19
	bl	_pvr2_hdw_cmd_onair_fe_power_ctrl
LBB0_6:
	mov	x0, x19
	bl	_pvr2_hdw_untrip_unlocked
	str	w20, [x19]
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_PVR2_PATHWAY_DIGITAL,4,2       ; @PVR2_PATHWAY_DIGITAL
	.comm	_PVR2_PATHWAY_ANALOG,4,2        ; @PVR2_PATHWAY_ANALOG
	.no_dead_strip	_pvr2_hdw_cmd_modeswitch
.subsections_via_symbols
