	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function au8522_g_tuner
_au8522_g_tuner:                        ## @au8522_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	callq	_to_state
	movq	%rax, %rbx
	xorl	%r12d, %r12d
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_au8522_readreg
	movl	%eax, %r15d
	movq	%rbx, %rdi
	movl	$126, %esi
	callq	_au8522_readreg
	shll	$27, %eax
	sarl	$31, %eax
	cmpl	$162, %r15d
	movzwl	%ax, %eax
	cmovnel	%r12d, %eax
	movl	%eax, (%r14)
	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
	movq	_V4L2_TUNER_CAP_SAP@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	orl	%ecx, 4(%r14)
	movq	_V4L2_TUNER_SUB_MONO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r14)
	movq	_V4L2_TUNER_MODE_STEREO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r14)
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.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
	.comm	_V4L2_TUNER_CAP_SAP,4,2         ## @V4L2_TUNER_CAP_SAP
	.comm	_V4L2_TUNER_SUB_MONO,4,2        ## @V4L2_TUNER_SUB_MONO
	.comm	_V4L2_TUNER_MODE_STEREO,4,2     ## @V4L2_TUNER_MODE_STEREO
	.no_dead_strip	_au8522_g_tuner
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function au8522_g_tuner
_au8522_g_tuner:                        ; @au8522_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
	bl	_to_state
	mov	x20, x0
	mov	w1, #0
	bl	_au8522_readreg
	mov	x21, x0
	mov	x0, x20
	mov	w1, #126
	bl	_au8522_readreg
	tst	w0, #0x10
	mov	w8, #162
	ccmp	w21, w8, #0, ne
	mov	w8, #65535
	csel	w8, wzr, w8, ne
	str	w8, [x19]
Lloh0:
	adrp	x8, _V4L2_TUNER_CAP_STEREO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_TUNER_CAP_STEREO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _V4L2_TUNER_CAP_LANG1@GOTPAGE
Lloh4:
	ldr	x9, [x9, _V4L2_TUNER_CAP_LANG1@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh6:
	adrp	x9, _V4L2_TUNER_CAP_LANG2@GOTPAGE
Lloh7:
	ldr	x9, [x9, _V4L2_TUNER_CAP_LANG2@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh9:
	adrp	x9, _V4L2_TUNER_CAP_SAP@GOTPAGE
Lloh10:
	ldr	x9, [x9, _V4L2_TUNER_CAP_SAP@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w8, w9
	ldr	w9, [x19, #4]
	orr	w8, w8, w9
Lloh12:
	adrp	x9, _V4L2_TUNER_SUB_MONO@GOTPAGE
Lloh13:
	ldr	x9, [x9, _V4L2_TUNER_SUB_MONO@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	stp	w8, w9, [x19, #4]
Lloh15:
	adrp	x8, _V4L2_TUNER_MODE_STEREO@GOTPAGE
Lloh16:
	ldr	x8, [x8, _V4L2_TUNER_MODE_STEREO@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	str	w8, [x19, #12]
	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	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.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
	.comm	_V4L2_TUNER_CAP_SAP,4,2         ; @V4L2_TUNER_CAP_SAP
	.comm	_V4L2_TUNER_SUB_MONO,4,2        ; @V4L2_TUNER_SUB_MONO
	.comm	_V4L2_TUNER_MODE_STEREO,4,2     ; @V4L2_TUNER_MODE_STEREO
	.no_dead_strip	_au8522_g_tuner
.subsections_via_symbols
