	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vidioc_g_tuner
_vidioc_g_tuner:                        ## @vidioc_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, %rbx
	callq	_video_drvdata
	cmpq	$0, (%rbx)
	jle	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
LBB0_2:
	movq	%rax, %r14
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_radio_tea5777_update_read_reg
	testl	%eax, %eax
	jne	LBB0_10
## %bb.3:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	cmpq	$0, 16(%r14)
	movl	36(%rbx), %edi
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str(%rip), %rsi
	cmoveq	%rax, %rsi
	movl	$4, %edx
	callq	_strscpy
	movq	_V4L2_TUNER_RADIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movq	_V4L2_TUNER_CAP_LOW@GOTPCREL(%rip), %rax
	movq	_V4L2_TUNER_CAP_STEREO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_V4L2_TUNER_CAP_FREQ_BANDS@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_V4L2_TUNER_CAP_HWSEEK_BOUNDED@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_V4L2_TUNER_CAP_HWSEEK_PROG_LIM@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, 8(%rbx)
	cmpq	$0, 16(%r14)
	movq	_bands@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_BAND_FM@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, %rdx
	je	LBB0_5
## %bb.4:
	movq	_BAND_AM@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
LBB0_5:
	movl	4(%rax,%rdx,8), %edx
	movl	%edx, 28(%rbx)
	movl	(%rax,%rcx,8), %eax
	movl	%eax, 24(%rbx)
	movl	8(%r14), %eax
	cmpq	%rcx, (%r14)
	jne	LBB0_8
## %bb.6:
	movq	_TEA5777_R_FM_STEREO_MASK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_8
## %bb.7:
	movq	_V4L2_TUNER_SUB_STEREO@GOTPCREL(%rip), %rcx
	jmp	LBB0_9
LBB0_8:
	movq	_V4L2_TUNER_SUB_MONO@GOTPCREL(%rip), %rcx
LBB0_9:
	movl	(%rcx), %ecx
	movl	%ecx, 20(%rbx)
	movl	12(%r14), %ecx
	movl	%ecx, 16(%rbx)
	movq	_TEA5777_R_LEVEL_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_TEA5777_R_LEVEL_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	addb	$-12, %cl
	sarl	%cl, %eax
	movl	%eax, 12(%rbx)
	movl	$-1, 8(%r14)
	xorl	%eax, %eax
LBB0_10:
	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	"AM/FM"

L_.str.1:                               ## @.str.1
	.asciz	"FM"

	.comm	_V4L2_TUNER_RADIO,4,2           ## @V4L2_TUNER_RADIO
	.comm	_V4L2_TUNER_CAP_LOW,4,2         ## @V4L2_TUNER_CAP_LOW
	.comm	_V4L2_TUNER_CAP_STEREO,4,2      ## @V4L2_TUNER_CAP_STEREO
	.comm	_V4L2_TUNER_CAP_FREQ_BANDS,4,2  ## @V4L2_TUNER_CAP_FREQ_BANDS
	.comm	_V4L2_TUNER_CAP_HWSEEK_BOUNDED,4,2 ## @V4L2_TUNER_CAP_HWSEEK_BOUNDED
	.comm	_V4L2_TUNER_CAP_HWSEEK_PROG_LIM,4,2 ## @V4L2_TUNER_CAP_HWSEEK_PROG_LIM
	.comm	_bands,8,3                      ## @bands
	.comm	_BAND_AM,8,3                    ## @BAND_AM
	.comm	_BAND_FM,8,3                    ## @BAND_FM
	.comm	_TEA5777_R_FM_STEREO_MASK,4,2   ## @TEA5777_R_FM_STEREO_MASK
	.comm	_V4L2_TUNER_SUB_STEREO,4,2      ## @V4L2_TUNER_SUB_STEREO
	.comm	_V4L2_TUNER_SUB_MONO,4,2        ## @V4L2_TUNER_SUB_MONO
	.comm	_TEA5777_R_LEVEL_MASK,4,2       ## @TEA5777_R_LEVEL_MASK
	.comm	_TEA5777_R_LEVEL_SHIFT,4,2      ## @TEA5777_R_LEVEL_SHIFT
	.no_dead_strip	_vidioc_g_tuner
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vidioc_g_tuner
_vidioc_g_tuner:                        ; @vidioc_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]
	cmp	x8, #1
	b.lt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_2:
	mov	x20, x0
	mov	w1, #0
	bl	_radio_tea5777_update_read_reg
	cbnz	w0, LBB0_8
; %bb.3:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #40
	bl	_memset
	ldr	x8, [x20, #16]
	ldr	w0, [x19, #36]
Lloh3:
	adrp	x9, l_.str@PAGE
Lloh4:
	add	x9, x9, l_.str@PAGEOFF
Lloh5:
	adrp	x10, l_.str.1@PAGE
Lloh6:
	add	x10, x10, l_.str.1@PAGEOFF
	cmp	x8, #0
	csel	x1, x10, x9, eq
	mov	w2, #4
	bl	_strscpy
Lloh7:
	adrp	x8, _V4L2_TUNER_RADIO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _V4L2_TUNER_RADIO@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [x19, #32]
Lloh10:
	adrp	x8, _V4L2_TUNER_CAP_LOW@GOTPAGE
Lloh11:
	ldr	x8, [x8, _V4L2_TUNER_CAP_LOW@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _V4L2_TUNER_CAP_STEREO@GOTPAGE
Lloh14:
	ldr	x9, [x9, _V4L2_TUNER_CAP_STEREO@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh16:
	adrp	x9, _V4L2_TUNER_CAP_FREQ_BANDS@GOTPAGE
Lloh17:
	ldr	x9, [x9, _V4L2_TUNER_CAP_FREQ_BANDS@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
Lloh19:
	adrp	x10, _V4L2_TUNER_CAP_HWSEEK_BOUNDED@GOTPAGE
Lloh20:
	ldr	x10, [x10, _V4L2_TUNER_CAP_HWSEEK_BOUNDED@GOTPAGEOFF]
	orr	w8, w8, w9
Lloh21:
	ldr	w9, [x10]
	orr	w8, w8, w9
Lloh22:
	adrp	x9, _V4L2_TUNER_CAP_HWSEEK_PROG_LIM@GOTPAGE
Lloh23:
	ldr	x9, [x9, _V4L2_TUNER_CAP_HWSEEK_PROG_LIM@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x19, #8]
	ldr	x8, [x20, #16]
Lloh25:
	adrp	x9, _bands@GOTPAGE
Lloh26:
	ldr	x9, [x9, _bands@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
Lloh28:
	adrp	x10, _BAND_AM@GOTPAGE
Lloh29:
	ldr	x10, [x10, _BAND_AM@GOTPAGEOFF]
Lloh30:
	ldr	x10, [x10]
Lloh31:
	adrp	x11, _BAND_FM@GOTPAGE
Lloh32:
	ldr	x11, [x11, _BAND_FM@GOTPAGEOFF]
Lloh33:
	ldr	x11, [x11]
	cmp	x8, #0
	csel	x8, x11, x10, eq
	add	x8, x9, x8, lsl #3
	lsl	x10, x11, #3
	ldr	w9, [x9, x10]
	ldr	w8, [x8, #4]
	stp	w9, w8, [x19, #24]
	ldr	x9, [x20]
	ldr	w8, [x20, #8]
	cmp	x9, x11
	b.ne	LBB0_6
; %bb.4:
Lloh34:
	adrp	x9, _TEA5777_R_FM_STEREO_MASK@GOTPAGE
Lloh35:
	ldr	x9, [x9, _TEA5777_R_FM_STEREO_MASK@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.5:
Lloh37:
	adrp	x9, _V4L2_TUNER_SUB_STEREO@GOTPAGE
Lloh38:
	ldr	x9, [x9, _V4L2_TUNER_SUB_STEREO@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh39:
	adrp	x9, _V4L2_TUNER_SUB_MONO@GOTPAGE
Lloh40:
	ldr	x9, [x9, _V4L2_TUNER_SUB_MONO@GOTPAGEOFF]
LBB0_7:
	mov	w0, #0
	ldr	w9, [x9]
	str	w9, [x19, #20]
Lloh41:
	adrp	x9, _TEA5777_R_LEVEL_MASK@GOTPAGE
Lloh42:
	ldr	x9, [x9, _TEA5777_R_LEVEL_MASK@GOTPAGEOFF]
Lloh43:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh44:
	adrp	x9, _TEA5777_R_LEVEL_SHIFT@GOTPAGE
Lloh45:
	ldr	x9, [x9, _TEA5777_R_LEVEL_SHIFT@GOTPAGEOFF]
Lloh46:
	ldr	w9, [x9]
	sub	w9, w9, #12
	asr	w8, w8, w9
	ldr	w9, [x20, #12]
	stp	w8, w9, [x19, #12]
	mov	w8, #-1
	str	w8, [x20, #8]
LBB0_8:
	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	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"AM/FM"

l_.str.1:                               ; @.str.1
	.asciz	"FM"

	.comm	_V4L2_TUNER_RADIO,4,2           ; @V4L2_TUNER_RADIO
	.comm	_V4L2_TUNER_CAP_LOW,4,2         ; @V4L2_TUNER_CAP_LOW
	.comm	_V4L2_TUNER_CAP_STEREO,4,2      ; @V4L2_TUNER_CAP_STEREO
	.comm	_V4L2_TUNER_CAP_FREQ_BANDS,4,2  ; @V4L2_TUNER_CAP_FREQ_BANDS
	.comm	_V4L2_TUNER_CAP_HWSEEK_BOUNDED,4,2 ; @V4L2_TUNER_CAP_HWSEEK_BOUNDED
	.comm	_V4L2_TUNER_CAP_HWSEEK_PROG_LIM,4,2 ; @V4L2_TUNER_CAP_HWSEEK_PROG_LIM
	.comm	_bands,8,3                      ; @bands
	.comm	_BAND_AM,8,3                    ; @BAND_AM
	.comm	_BAND_FM,8,3                    ; @BAND_FM
	.comm	_TEA5777_R_FM_STEREO_MASK,4,2   ; @TEA5777_R_FM_STEREO_MASK
	.comm	_V4L2_TUNER_SUB_STEREO,4,2      ; @V4L2_TUNER_SUB_STEREO
	.comm	_V4L2_TUNER_SUB_MONO,4,2        ; @V4L2_TUNER_SUB_MONO
	.comm	_TEA5777_R_LEVEL_MASK,4,2       ; @TEA5777_R_LEVEL_MASK
	.comm	_TEA5777_R_LEVEL_SHIFT,4,2      ; @TEA5777_R_LEVEL_SHIFT
	.no_dead_strip	_vidioc_g_tuner
.subsections_via_symbols
