	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vivid_radio_s_frequency        ## -- Begin function vivid_radio_s_frequency
	.p2align	4, 0x90
_vivid_radio_s_frequency:               ## @vivid_radio_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r14
	callq	_video_drvdata
	cmpq	$0, (%rbx)
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_8
LBB0_2:
	movq	%rax, %r15
	movl	8(%rbx), %esi
	movq	_FM_FREQ_RANGE_LOW@GOTPCREL(%rip), %rax
	movq	_SW_FREQ_RANGE_HIGH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	(%rax), %ecx
	movl	%ecx, %eax
	shrl	$31, %eax
	addl	%ecx, %eax
	sarl	%eax
	cmpl	%eax, %esi
	jge	LBB0_3
## %bb.4:
	movq	_AM_FREQ_RANGE_HIGH@GOTPCREL(%rip), %rax
	movq	_SW_FREQ_RANGE_LOW@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	(%rax), %ecx
	movl	%ecx, %eax
	shrl	$31, %eax
	addl	%ecx, %eax
	sarl	%eax
	cmpl	%eax, %esi
	jle	LBB0_5
## %bb.6:
	movq	_BAND_SW@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_3:
	movq	_BAND_FM@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	movq	_BAND_AM@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
	movq	_u32@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	_vivid_radio_bands@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movl	(%rdx,%rax,8), %ecx
	movl	4(%rdx,%rax,8), %edx
	callq	_clamp_t
	movl	%eax, (%r14)
	movq	%r15, %rdi
	callq	_vivid_radio_calc_sig_qual
	movq	%r15, %rdi
	callq	_vivid_radio_rds_init
	xorl	%eax, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_FM_FREQ_RANGE_LOW,4,2          ## @FM_FREQ_RANGE_LOW
	.comm	_SW_FREQ_RANGE_HIGH,4,2         ## @SW_FREQ_RANGE_HIGH
	.comm	_BAND_FM,4,2                    ## @BAND_FM
	.comm	_AM_FREQ_RANGE_HIGH,4,2         ## @AM_FREQ_RANGE_HIGH
	.comm	_SW_FREQ_RANGE_LOW,4,2          ## @SW_FREQ_RANGE_LOW
	.comm	_BAND_AM,4,2                    ## @BAND_AM
	.comm	_BAND_SW,4,2                    ## @BAND_SW
	.comm	_u32,4,2                        ## @u32
	.comm	_vivid_radio_bands,8,3          ## @vivid_radio_bands
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vivid_radio_s_frequency        ; -- Begin function vivid_radio_s_frequency
	.p2align	2
_vivid_radio_s_frequency:               ; @vivid_radio_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	x21, x2
	mov	x19, x1
	bl	_video_drvdata
	ldr	x8, [x21]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_2:
	mov	x20, x0
	ldr	w1, [x21, #8]
Lloh3:
	adrp	x8, _FM_FREQ_RANGE_LOW@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FM_FREQ_RANGE_LOW@GOTPAGEOFF]
Lloh5:
	adrp	x9, _SW_FREQ_RANGE_HIGH@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SW_FREQ_RANGE_HIGH@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	ldr	w9, [x9]
	add	w8, w9, w8
	cmp	w8, #0
	cinc	w8, w8, lt
	cmp	w1, w8, asr #1
	b.ge	LBB0_4
; %bb.3:
Lloh9:
	adrp	x8, _AM_FREQ_RANGE_HIGH@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AM_FREQ_RANGE_HIGH@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _SW_FREQ_RANGE_LOW@GOTPAGE
Lloh13:
	ldr	x9, [x9, _SW_FREQ_RANGE_LOW@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	add	w8, w9, w8
	cmp	w8, #0
	cinc	w8, w8, lt
Lloh15:
	adrp	x9, _BAND_AM@GOTPAGE
Lloh16:
	ldr	x9, [x9, _BAND_AM@GOTPAGEOFF]
Lloh17:
	adrp	x10, _BAND_SW@GOTPAGE
Lloh18:
	ldr	x10, [x10, _BAND_SW@GOTPAGEOFF]
	cmp	w1, w8, asr #1
	csel	x8, x10, x9, gt
	b	LBB0_5
LBB0_4:
Lloh19:
	adrp	x8, _BAND_FM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _BAND_FM@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _u32@GOTPAGE
Lloh22:
	ldr	x9, [x9, _u32@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x9]
Lloh24:
	adrp	x9, _vivid_radio_bands@GOTPAGE
Lloh25:
	ldr	x9, [x9, _vivid_radio_bands@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	add	x8, x9, x8, lsl #3
	ldp	w3, w2, [x8]
	bl	_clamp_t
	str	w0, [x19]
	mov	x0, x20
	bl	_vivid_radio_calc_sig_qual
	mov	x0, x20
	bl	_vivid_radio_rds_init
	mov	w0, #0
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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_FM_FREQ_RANGE_LOW,4,2          ; @FM_FREQ_RANGE_LOW
	.comm	_SW_FREQ_RANGE_HIGH,4,2         ; @SW_FREQ_RANGE_HIGH
	.comm	_BAND_FM,4,2                    ; @BAND_FM
	.comm	_AM_FREQ_RANGE_HIGH,4,2         ; @AM_FREQ_RANGE_HIGH
	.comm	_SW_FREQ_RANGE_LOW,4,2          ; @SW_FREQ_RANGE_LOW
	.comm	_BAND_AM,4,2                    ; @BAND_AM
	.comm	_BAND_SW,4,2                    ; @BAND_SW
	.comm	_u32,4,2                        ; @u32
	.comm	_vivid_radio_bands,8,3          ; @vivid_radio_bands
.subsections_via_symbols
