	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function radio_g_tuner
_radio_g_tuner:                         ## @radio_g_tuner
	.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, %r14
	callq	_video_drvdata
	cmpq	$0, (%r14)
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_2:
	movq	%rax, %rbx
	movl	20(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	$4, %edx
	callq	_strscpy
	movq	_tuner@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_g_tuner@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%r14, %rcx
	callq	_saa_call_all
	movq	_V4L2_TUNER_MODE_MONO@GOTPCREL(%rip), %rax
	movq	_V4L2_TUNER_MODE_STEREO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	andl	%ecx, 8(%r14)
	movq	(%rbx), %rax
	movq	(%rax), %rax
	movq	_TV@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.3:
	movl	$1409, %edi                     ## imm = 0x581
	callq	_saa_readb
	shll	$11, %eax
	notl	%eax
	andl	$63488, %eax                    ## imm = 0xF800
	movl	%eax, 12(%r14)
	movl	$1321, %edi                     ## imm = 0x529
	callq	_saa_readb
	testb	$8, %al
	jne	LBB0_4
## %bb.5:
	movq	_V4L2_TUNER_SUB_MONO@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_4:
	movq	_V4L2_TUNER_SUB_STEREO@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %eax
	movl	%eax, 16(%r14)
LBB0_7:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Radio"

	.comm	_tuner,4,2                      ## @tuner
	.comm	_g_tuner,4,2                    ## @g_tuner
	.comm	_V4L2_TUNER_MODE_MONO,4,2       ## @V4L2_TUNER_MODE_MONO
	.comm	_V4L2_TUNER_MODE_STEREO,4,2     ## @V4L2_TUNER_MODE_STEREO
	.comm	_TV,8,3                         ## @TV
	.comm	_V4L2_TUNER_SUB_STEREO,4,2      ## @V4L2_TUNER_SUB_STEREO
	.comm	_V4L2_TUNER_SUB_MONO,4,2        ## @V4L2_TUNER_SUB_MONO
	.no_dead_strip	_radio_g_tuner
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function radio_g_tuner
_radio_g_tuner:                         ; @radio_g_tuner
	.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	x19, x2
	bl	_video_drvdata
	ldr	x8, [x19]
	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_5
LBB0_2:
	mov	x20, x0
	ldr	w0, [x19, #20]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #4
	bl	_strscpy
Lloh5:
	adrp	x8, _tuner@GOTPAGE
Lloh6:
	ldr	x8, [x8, _tuner@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x8, _g_tuner@GOTPAGE
Lloh9:
	ldr	x8, [x8, _g_tuner@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x3, x19
	bl	_saa_call_all
Lloh11:
	adrp	x8, _V4L2_TUNER_MODE_MONO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _V4L2_TUNER_MODE_MONO@GOTPAGEOFF]
Lloh13:
	adrp	x9, _V4L2_TUNER_MODE_STEREO@GOTPAGE
Lloh14:
	ldr	x9, [x9, _V4L2_TUNER_MODE_STEREO@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x19, #8]
	and	w8, w9, w8
	str	w8, [x19, #8]
	ldr	x8, [x20]
	ldr	x8, [x8]
Lloh17:
	adrp	x9, _TV@GOTPAGE
Lloh18:
	ldr	x9, [x9, _TV@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	mov	w0, #1409
	bl	_saa_readb
	mov	w8, #63488
	bic	w8, w8, w0, lsl #11
	str	w8, [x19, #12]
	mov	w0, #1321
	bl	_saa_readb
	mov	x8, x0
	mov	w0, #0
Lloh20:
	adrp	x9, _V4L2_TUNER_SUB_STEREO@GOTPAGE
Lloh21:
	ldr	x9, [x9, _V4L2_TUNER_SUB_STEREO@GOTPAGEOFF]
Lloh22:
	adrp	x10, _V4L2_TUNER_SUB_MONO@GOTPAGE
Lloh23:
	ldr	x10, [x10, _V4L2_TUNER_SUB_MONO@GOTPAGEOFF]
	tst	w8, #0x8
	csel	x8, x10, x9, eq
	ldr	w8, [x8]
	str	w8, [x19, #16]
	b	LBB0_5
LBB0_4:
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh15
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Radio"

	.comm	_tuner,4,2                      ; @tuner
	.comm	_g_tuner,4,2                    ; @g_tuner
	.comm	_V4L2_TUNER_MODE_MONO,4,2       ; @V4L2_TUNER_MODE_MONO
	.comm	_V4L2_TUNER_MODE_STEREO,4,2     ; @V4L2_TUNER_MODE_STEREO
	.comm	_TV,8,3                         ; @TV
	.comm	_V4L2_TUNER_SUB_STEREO,4,2      ; @V4L2_TUNER_SUB_STEREO
	.comm	_V4L2_TUNER_SUB_MONO,4,2        ; @V4L2_TUNER_SUB_MONO
	.no_dead_strip	_radio_g_tuner
.subsections_via_symbols
