	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vidioc_s_frequency
_vidioc_s_frequency:                    ## @vidioc_s_frequency
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	(%rsi), %r15
	movq	(%r15), %r12
	movl	8(%rdx), %edx
	leaq	L_.str(%rip), %rsi
	movl	$2, %edi
	callq	_dprintk
	cmpl	$0, (%r12)
	je	LBB0_2
## %bb.1:
	cmpl	$1, 4(%r12)
	jne	LBB0_2
## %bb.3:
	movq	_V4L2_TUNER_ANALOG_TV@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	(%r14), %rax
	jne	LBB0_2
## %bb.4:
	movq	_MSP_WR_DSP@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	movl	$65504, %ecx                    ## imm = 0xFFE0
	callq	_msp_writereg
	movl	(%r13), %esi
	movq	%r12, %rdi
	movl	$7, %edx
	movl	$65504, %ecx                    ## imm = 0xFFE0
	callq	_msp_writereg
	movl	(%r12), %eax
	movq	_ANALOG_TUNER_VES1820@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.5:
	movl	8(%r14), %esi
	movq	%r15, %rdi
	callq	_ves1820_set_tv_freq
	jmp	LBB0_8
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_ANALOG_TUNER_STV0297@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_8
## %bb.7:
	movl	8(%r14), %esi
	movq	%r15, %rdi
	callq	_stv0297_set_tv_freq
LBB0_8:
	movl	8(%r14), %eax
	movl	%eax, 8(%r12)
	movl	(%r13), %esi
	movq	%r12, %rdi
	movl	$21, %edx
	movl	$63, %ecx
	callq	_msp_writereg
	movl	(%r13), %esi
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	movl	$21, %edx
	xorl	%ecx, %ecx
	callq	_msp_writereg
	movl	(%r13), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	movl	$20224, %ecx                    ## imm = 0x4F00
	callq	_msp_writereg
	movl	(%r13), %esi
	movq	%r12, %rdi
	movl	$7, %edx
	movl	$20224, %ecx                    ## imm = 0x4F00
	callq	_msp_writereg
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"VIDIOC_S_FREQUENCY: freq:0x%08x\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_V4L2_TUNER_ANALOG_TV,8,3       ## @V4L2_TUNER_ANALOG_TV
	.comm	_MSP_WR_DSP,4,2                 ## @MSP_WR_DSP
	.comm	_ANALOG_TUNER_VES1820,4,2       ## @ANALOG_TUNER_VES1820
	.comm	_ANALOG_TUNER_STV0297,4,2       ## @ANALOG_TUNER_STV0297
	.no_dead_strip	_vidioc_s_frequency
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vidioc_s_frequency
_vidioc_s_frequency:                    ; @vidioc_s_frequency
	.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
	mov	x20, x2
	ldr	x21, [x1]
	ldr	x19, [x21]
	ldr	w2, [x2, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #2
	bl	_dprintk
	ldr	w8, [x19]
	cbz	w8, LBB0_5
; %bb.1:
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.ne	LBB0_5
; %bb.2:
Lloh2:
	adrp	x8, _V4L2_TUNER_ANALOG_TV@GOTPAGE
Lloh3:
	ldr	x8, [x8, _V4L2_TUNER_ANALOG_TV@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	ldr	x9, [x20]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.3:
Lloh5:
	adrp	x22, _MSP_WR_DSP@GOTPAGE
Lloh6:
	ldr	x22, [x22, _MSP_WR_DSP@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #65504
	bl	_msp_writereg
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #7
	mov	w3, #65504
	bl	_msp_writereg
	ldr	w8, [x19]
Lloh7:
	adrp	x9, _ANALOG_TUNER_VES1820@GOTPAGE
Lloh8:
	ldr	x9, [x9, _ANALOG_TUNER_VES1820@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.4:
	ldr	w1, [x20, #8]
	mov	x0, x21
	bl	_ves1820_set_tv_freq
	b	LBB0_9
LBB0_5:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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
LBB0_7:
Lloh13:
	adrp	x9, _ANALOG_TUNER_STV0297@GOTPAGE
Lloh14:
	ldr	x9, [x9, _ANALOG_TUNER_STV0297@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.8:
	ldr	w1, [x20, #8]
	mov	x0, x21
	bl	_stv0297_set_tv_freq
LBB0_9:
	ldr	w8, [x20, #8]
	str	w8, [x19, #8]
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #21
	mov	w3, #63
	bl	_msp_writereg
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #21
	mov	w3, #0
	bl	_msp_writereg
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #20224
	bl	_msp_writereg
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #7
	mov	w3, #20224
	bl	_msp_writereg
	mov	w0, #0
	b	LBB0_6
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"VIDIOC_S_FREQUENCY: freq:0x%08x\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_TUNER_ANALOG_TV,8,3       ; @V4L2_TUNER_ANALOG_TV
	.comm	_MSP_WR_DSP,4,2                 ; @MSP_WR_DSP
	.comm	_ANALOG_TUNER_VES1820,4,2       ; @ANALOG_TUNER_VES1820
	.comm	_ANALOG_TUNER_STV0297,4,2       ; @ANALOG_TUNER_STV0297
	.no_dead_strip	_vidioc_s_frequency
.subsections_via_symbols
