	.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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %rbx
	callq	_video_drvdata
	cmpq	$0, (%rbx)
	jne	LBB0_2
## %bb.1:
	movq	%rax, %r14
	movq	8(%rbx), %rax
	movq	_V4L2_TUNER_RADIO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.3:
	cmpq	$0, 24(%r14)
	je	LBB0_6
## %bb.4:
	cmpl	$320000, 16(%rbx)               ## imm = 0x4E200
	jge	LBB0_6
## %bb.5:
	movq	_BAND_AM@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_6:
	cmpq	$0, 16(%r14)
	jne	LBB0_7
## %bb.8:
	movq	_BAND_FM@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movq	_BAND_FM_JAPAN@GOTPCREL(%rip), %rax
LBB0_9:
	movq	(%rax), %rax
	movq	%rax, (%r14)
	movq	_u32@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	16(%rbx), %esi
	movq	_bands@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movl	(%rdx,%rax,8), %ecx
	movl	4(%rdx,%rax,8), %edx
	callq	_clamp_t
	movl	%eax, 8(%r14)
	movq	%r14, %rdi
	callq	_snd_tea575x_set_freq
	xorl	%eax, %eax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_TUNER_RADIO,8,3           ## @V4L2_TUNER_RADIO
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_BAND_AM,8,3                    ## @BAND_AM
	.comm	_BAND_FM_JAPAN,8,3              ## @BAND_FM_JAPAN
	.comm	_BAND_FM,8,3                    ## @BAND_FM
	.comm	_u32,4,2                        ## @u32
	.comm	_bands,8,3                      ## @bands
	.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	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
	mov	x20, x2
	bl	_video_drvdata
	ldr	x8, [x20]
	cbnz	x8, LBB0_5
; %bb.1:
	ldr	x8, [x20, #8]
Lloh0:
	adrp	x9, _V4L2_TUNER_RADIO@GOTPAGE
Lloh1:
	ldr	x9, [x9, _V4L2_TUNER_RADIO@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.2:
	mov	x19, x0
	ldr	x8, [x0, #24]
	cbz	x8, LBB0_7
; %bb.3:
	ldr	w8, [x20, #16]
	mov	w9, #57856
	movk	w9, #4, lsl #16
	cmp	w8, w9
	b.ge	LBB0_7
; %bb.4:
Lloh3:
	adrp	x8, _BAND_AM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BAND_AM@GOTPAGEOFF]
	b	LBB0_8
LBB0_5:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_7:
	ldr	x8, [x19, #16]
Lloh8:
	adrp	x9, _BAND_FM_JAPAN@GOTPAGE
Lloh9:
	ldr	x9, [x9, _BAND_FM_JAPAN@GOTPAGEOFF]
Lloh10:
	adrp	x10, _BAND_FM@GOTPAGE
Lloh11:
	ldr	x10, [x10, _BAND_FM@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x10, x9, eq
LBB0_8:
	ldr	x8, [x8]
	str	x8, [x19]
Lloh12:
	adrp	x9, _u32@GOTPAGE
Lloh13:
	ldr	x9, [x9, _u32@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x9]
	ldr	w1, [x20, #16]
Lloh15:
	adrp	x9, _bands@GOTPAGE
Lloh16:
	ldr	x9, [x9, _bands@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	add	x8, x9, x8, lsl #3
	ldp	w3, w2, [x8]
	bl	_clamp_t
	str	w0, [x19, #8]
	mov	x0, x19
	bl	_snd_tea575x_set_freq
	mov	w0, #0
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_TUNER_RADIO,8,3           ; @V4L2_TUNER_RADIO
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_BAND_AM,8,3                    ; @BAND_AM
	.comm	_BAND_FM_JAPAN,8,3              ; @BAND_FM_JAPAN
	.comm	_BAND_FM,8,3                    ; @BAND_FM
	.comm	_u32,4,2                        ; @u32
	.comm	_bands,8,3                      ; @bands
	.no_dead_strip	_vidioc_s_frequency
.subsections_via_symbols
