	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pvr2_encoder_start             ## -- Begin function pvr2_encoder_start
	.p2align	4, 0x90
_pvr2_encoder_start:                    ## @pvr2_encoder_start
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movl	$72, %esi
	movl	$-1073741825, %edx              ## imm = 0xBFFFFFFF
	callq	_pvr2_write_register
	movq	_CX2341X_ENC_MUTE_VIDEO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%rbx), %rax
	movq	_PVR2_CVAL_INPUT_RADIO@GOTPCREL(%rip), %rdx
	xorl	%ecx, %ecx
	cmpq	(%rdx), %rax
	sete	%cl
	movq	%rbx, %rdi
	movl	$1, %edx
	xorl	%eax, %eax
	callq	_pvr2_encoder_vcmd
	movl	8(%rbx), %eax
	cmpl	$129, %eax
	je	LBB0_4
## %bb.1:
	cmpl	$128, %eax
	jne	LBB0_4
## %bb.2:
	movq	_CX2341X_ENC_START_CAPTURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$2, %edx
	movl	$1, %ecx
	movl	$20, %r8d
	jmp	LBB0_3
LBB0_4:
	movq	_CX2341X_ENC_START_CAPTURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$2, %edx
	xorl	%ecx, %ecx
	movl	$19, %r8d
LBB0_3:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_pvr2_encoder_vcmd              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CX2341X_ENC_MUTE_VIDEO,4,2     ## @CX2341X_ENC_MUTE_VIDEO
	.comm	_PVR2_CVAL_INPUT_RADIO,8,3      ## @PVR2_CVAL_INPUT_RADIO
	.comm	_CX2341X_ENC_START_CAPTURE,4,2  ## @CX2341X_ENC_START_CAPTURE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pvr2_encoder_start             ; -- Begin function pvr2_encoder_start
	.p2align	2
_pvr2_encoder_start:                    ; @pvr2_encoder_start
	.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, x0
	mov	w1, #72
	mov	w2, #-1073741825
	bl	_pvr2_write_register
Lloh0:
	adrp	x8, _CX2341X_ENC_MUTE_VIDEO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CX2341X_ENC_MUTE_VIDEO@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	x8, [x19]
Lloh3:
	adrp	x9, _PVR2_CVAL_INPUT_RADIO@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PVR2_CVAL_INPUT_RADIO@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w3, eq
	mov	x0, x19
	mov	w2, #1
	bl	_pvr2_encoder_vcmd
	ldr	w8, [x19, #8]
	cmp	w8, #129
	b.eq	LBB0_3
; %bb.1:
	cmp	w8, #128
	b.ne	LBB0_3
; %bb.2:
Lloh6:
	adrp	x8, _CX2341X_ENC_START_CAPTURE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CX2341X_ENC_START_CAPTURE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	w8, #20
	str	x8, [sp]
	mov	x0, x19
	mov	w2, #2
	mov	w3, #1
	b	LBB0_4
LBB0_3:
Lloh9:
	adrp	x8, _CX2341X_ENC_START_CAPTURE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CX2341X_ENC_START_CAPTURE@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	w8, #19
	str	x8, [sp]
	mov	x0, x19
	mov	w2, #2
	mov	w3, #0
LBB0_4:
	bl	_pvr2_encoder_vcmd
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_CX2341X_ENC_MUTE_VIDEO,4,2     ; @CX2341X_ENC_MUTE_VIDEO
	.comm	_PVR2_CVAL_INPUT_RADIO,8,3      ; @PVR2_CVAL_INPUT_RADIO
	.comm	_CX2341X_ENC_START_CAPTURE,4,2  ; @CX2341X_ENC_START_CAPTURE
.subsections_via_symbols
