	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function msp_g_tuner
_msp_g_tuner:                           ## @msp_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	callq	_to_state
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_v4l2_get_subdevdata
	movq	(%r15), %rcx
	movq	_V4L2_TUNER_ANALOG_TV@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_6
## %bb.1:
	cmpl	$0, 16(%r14)
	jne	LBB0_5
## %bb.2:
	movq	(%r14), %rcx
	movq	_OPMODE_AUTOSELECT@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_4
## %bb.3:
	movq	%rax, %rdi
	callq	_msp_detect_stereo
LBB0_4:
	movl	12(%r14), %eax
	movl	%eax, 16(%r15)
LBB0_5:
	movl	8(%r14), %eax
	movl	%eax, 12(%r15)
	movq	_V4L2_TUNER_CAP_STEREO@GOTPCREL(%rip), %rax
	movq	_V4L2_TUNER_CAP_LANG1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_V4L2_TUNER_CAP_LANG2@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	orl	%ecx, 8(%r15)
LBB0_6:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_TUNER_ANALOG_TV,8,3       ## @V4L2_TUNER_ANALOG_TV
	.comm	_OPMODE_AUTOSELECT,8,3          ## @OPMODE_AUTOSELECT
	.comm	_V4L2_TUNER_CAP_STEREO,4,2      ## @V4L2_TUNER_CAP_STEREO
	.comm	_V4L2_TUNER_CAP_LANG1,4,2       ## @V4L2_TUNER_CAP_LANG1
	.comm	_V4L2_TUNER_CAP_LANG2,4,2       ## @V4L2_TUNER_CAP_LANG2
	.no_dead_strip	_msp_g_tuner
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function msp_g_tuner
_msp_g_tuner:                           ; @msp_g_tuner
	.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	x19, x1
	mov	x21, x0
	bl	_to_state
	mov	x20, x0
	mov	x0, x21
	bl	_v4l2_get_subdevdata
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _V4L2_TUNER_ANALOG_TV@GOTPAGE
Lloh1:
	ldr	x9, [x9, _V4L2_TUNER_ANALOG_TV@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.1:
	ldr	w8, [x20, #16]
	cbnz	w8, LBB0_5
; %bb.2:
	ldr	x8, [x20]
Lloh3:
	adrp	x9, _OPMODE_AUTOSELECT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _OPMODE_AUTOSELECT@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	bl	_msp_detect_stereo
LBB0_4:
	ldr	w8, [x20, #12]
	str	w8, [x19, #16]
LBB0_5:
	ldr	w8, [x20, #8]
Lloh6:
	adrp	x9, _V4L2_TUNER_CAP_STEREO@GOTPAGE
Lloh7:
	ldr	x9, [x9, _V4L2_TUNER_CAP_STEREO@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _V4L2_TUNER_CAP_LANG1@GOTPAGE
Lloh10:
	ldr	x10, [x10, _V4L2_TUNER_CAP_LANG1@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	orr	w9, w10, w9
Lloh12:
	adrp	x10, _V4L2_TUNER_CAP_LANG2@GOTPAGE
Lloh13:
	ldr	x10, [x10, _V4L2_TUNER_CAP_LANG2@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	orr	w9, w9, w10
	ldr	w10, [x19, #8]
	orr	w9, w9, w10
	stp	w9, w8, [x19, #8]
LBB0_6:
	mov	w0, #0
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_TUNER_ANALOG_TV,8,3       ; @V4L2_TUNER_ANALOG_TV
	.comm	_OPMODE_AUTOSELECT,8,3          ; @OPMODE_AUTOSELECT
	.comm	_V4L2_TUNER_CAP_STEREO,4,2      ; @V4L2_TUNER_CAP_STEREO
	.comm	_V4L2_TUNER_CAP_LANG1,4,2       ; @V4L2_TUNER_CAP_LANG1
	.comm	_V4L2_TUNER_CAP_LANG2,4,2       ; @V4L2_TUNER_CAP_LANG2
	.no_dead_strip	_msp_g_tuner
.subsections_via_symbols
