	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tuner_g_frequency
_tuner_g_frequency:                     ## @tuner_g_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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	callq	_to_tuner
	movq	%rax, %rbx
	movq	(%r14), %rsi
	movq	%rax, %rdi
	callq	_check_mode
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	je	LBB0_10
## %bb.1:
	movq	(%r14), %rax
	cmpq	(%rbx), %rax
	jne	LBB0_8
## %bb.2:
	movq	%rbx, %rdi
	addq	$16, %rdi
	movq	(%rdi), %rcx
	testq	%rcx, %rcx
	je	LBB0_8
## %bb.3:
	cmpl	$0, 24(%rbx)
	je	LBB0_4
LBB0_8:
	movq	_V4L2_TUNER_RADIO@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpq	%rax, (%rcx)
	sete	%dl
	movl	8(%rbx,%rdx,4), %eax
LBB0_9:
	movl	%eax, 8(%r14)
LBB0_10:
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	leaq	-20(%rbp), %rsi
	callq	*%rcx
	movq	_V4L2_TUNER_RADIO@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	-20(%rbp), %edi
	cmpq	(%rbx), %rax
	jne	LBB0_6
## %bb.5:
	addl	%edi, %edi
	movl	$125, %esi
	callq	_DIV_ROUND_CLOSEST
	jmp	LBB0_9
LBB0_6:
	movl	$62500, %esi                    ## imm = 0xF424
	callq	_DIV_ROUND_CLOSEST
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_V4L2_TUNER_RADIO,8,3           ## @V4L2_TUNER_RADIO
	.no_dead_strip	_tuner_g_frequency
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tuner_g_frequency
_tuner_g_frequency:                     ; @tuner_g_frequency
	.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, x1
	bl	_to_tuner
	mov	x20, x0
	ldr	x1, [x19]
	bl	_check_mode
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmn	w0, w8
	b.eq	LBB0_5
; %bb.1:
	ldr	x8, [x19]
	ldr	x9, [x20]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.2:
	add	x0, x20, #16
	ldr	x9, [x0]
	cbz	x9, LBB0_4
; %bb.3:
	ldr	w10, [x20, #24]
	cbz	w10, LBB0_6
LBB0_4:
Lloh3:
	adrp	x9, _V4L2_TUNER_RADIO@GOTPAGE
Lloh4:
	ldr	x9, [x9, _V4L2_TUNER_RADIO@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	mov	w10, #8
	mov	w11, #12
	cmp	x9, x8
	csel	x8, x11, x10, eq
	ldr	w8, [x20, x8]
	str	w8, [x19, #8]
LBB0_5:
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_6:
	add	x1, sp, #12
	blr	x9
Lloh6:
	adrp	x8, _V4L2_TUNER_RADIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _V4L2_TUNER_RADIO@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	ldr	x9, [x20]
	ldr	w0, [sp, #12]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.7:
	lsl	w0, w0, #1
	mov	w1, #125
	b	LBB0_9
LBB0_8:
	mov	w1, #62500
LBB0_9:
	bl	_DIV_ROUND_CLOSEST
	str	w0, [x19, #8]
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_TUNER_RADIO,8,3           ; @V4L2_TUNER_RADIO
	.no_dead_strip	_tuner_g_frequency
.subsections_via_symbols
