	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function subdev_g_tuner
_subdev_g_tuner:                        ## @subdev_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	%rsi, %r14
	callq	_sd_to_ivtv
	movq	(%rax), %rax
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	je	LBB0_2
## %bb.1:
	movq	_IVTV_REG_GPIO_IN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_read_reg
	testl	%ebx, %eax
	je	LBB0_3
LBB0_2:
	movq	_V4L2_TUNER_SUB_STEREO@GOTPCREL(%rip), %rcx
	movq	_V4L2_TUNER_SUB_LANG1@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
	movq	_V4L2_TUNER_SUB_LANG2@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	jmp	LBB0_4
LBB0_3:
	movq	_V4L2_TUNER_SUB_MONO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_4:
	movl	%eax, (%r14)
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IVTV_REG_GPIO_IN,4,2           ## @IVTV_REG_GPIO_IN
	.comm	_V4L2_TUNER_SUB_STEREO,4,2      ## @V4L2_TUNER_SUB_STEREO
	.comm	_V4L2_TUNER_SUB_LANG1,4,2       ## @V4L2_TUNER_SUB_LANG1
	.comm	_V4L2_TUNER_SUB_LANG2,4,2       ## @V4L2_TUNER_SUB_LANG2
	.comm	_V4L2_TUNER_SUB_MONO,4,2        ## @V4L2_TUNER_SUB_MONO
	.no_dead_strip	_subdev_g_tuner
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function subdev_g_tuner
_subdev_g_tuner:                        ; @subdev_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, x1
	bl	_sd_to_ivtv
	ldr	x8, [x0]
	ldr	w20, [x8]
	cbz	w20, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _IVTV_REG_GPIO_IN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IVTV_REG_GPIO_IN@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_read_reg
	tst	w0, w20
	b.eq	LBB0_3
LBB0_2:
Lloh3:
	adrp	x8, _V4L2_TUNER_SUB_STEREO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _V4L2_TUNER_SUB_STEREO@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _V4L2_TUNER_SUB_LANG1@GOTPAGE
Lloh7:
	ldr	x9, [x9, _V4L2_TUNER_SUB_LANG1@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh9:
	adrp	x9, _V4L2_TUNER_SUB_LANG2@GOTPAGE
Lloh10:
	ldr	x9, [x9, _V4L2_TUNER_SUB_LANG2@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w8, w9
	b	LBB0_4
LBB0_3:
Lloh12:
	adrp	x8, _V4L2_TUNER_SUB_MONO@GOTPAGE
Lloh13:
	ldr	x8, [x8, _V4L2_TUNER_SUB_MONO@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
LBB0_4:
	str	w8, [x19]
	mov	w0, #0
	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	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_IVTV_REG_GPIO_IN,4,2           ; @IVTV_REG_GPIO_IN
	.comm	_V4L2_TUNER_SUB_STEREO,4,2      ; @V4L2_TUNER_SUB_STEREO
	.comm	_V4L2_TUNER_SUB_LANG1,4,2       ; @V4L2_TUNER_SUB_LANG1
	.comm	_V4L2_TUNER_SUB_LANG2,4,2       ; @V4L2_TUNER_SUB_LANG2
	.comm	_V4L2_TUNER_SUB_MONO,4,2        ; @V4L2_TUNER_SUB_MONO
	.no_dead_strip	_subdev_g_tuner
.subsections_via_symbols
