	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tda9874a_getrxsubchans
_tda9874a_getrxsubchans:                ## @tda9874a_getrxsubchans
	.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	%rdi, %rbx
	movq	_V4L2_TUNER_SUB_MONO@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_TDA9874A_DSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_chip_read2
	testl	%eax, %eax
	js	LBB0_12
## %bb.1:
	movl	%eax, %r15d
	movq	_TDA9874A_NSR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_chip_read2
	testl	%eax, %eax
	js	LBB0_12
## %bb.2:
	movl	%eax, %r12d
	movq	_TDA9874A_NECR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_chip_read2
                                        ## kill: def $eax killed $eax def $rax
	testl	%eax, %eax
	js	LBB0_12
## %bb.3:
	movq	(%rbx), %rcx
	addq	$8, %rbx
	movq	_MAXREGS@GOTPCREL(%rip), %rdx
	movslq	(%rdx), %rsi
	movl	%r15d, -8(%rcx,%rsi,4)
	movslq	(%rdx), %rdx
	movl	%r12d, -4(%rcx,%rdx,4)
	movq	_tda9874a_mode@GOTPCREL(%rip), %rcx
	cmpq	$0, (%rcx)
	je	LBB0_7
## %bb.4:
	testb	$2, %r12b
	je	LBB0_6
## %bb.5:
	movq	_V4L2_TUNER_SUB_STEREO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
LBB0_6:
	testb	$1, %r12b
	je	LBB0_11
LBB0_10:
	movq	_V4L2_TUNER_SUB_LANG1@GOTPCREL(%rip), %rcx
	movq	_V4L2_TUNER_SUB_LANG2@GOTPCREL(%rip), %rdx
	orl	(%rcx), %r14d
	orl	(%rdx), %r14d
LBB0_11:
	movq	_debug@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str(%rip), %rcx
	movl	$1, %edi
	movq	%rbx, %rdx
	movl	%r15d, %r8d
	movl	%r12d, %r9d
	pushq	%r14
	pushq	%rax
	callq	_v4l2_dbg
	addq	$16, %rsp
LBB0_12:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	testb	$2, %r15b
	je	LBB0_9
## %bb.8:
	movq	_V4L2_TUNER_SUB_STEREO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
LBB0_9:
	testb	$4, %r15b
	jne	LBB0_10
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_TUNER_SUB_MONO,4,2        ## @V4L2_TUNER_SUB_MONO
	.comm	_TDA9874A_DSR,4,2               ## @TDA9874A_DSR
	.comm	_TDA9874A_NSR,4,2               ## @TDA9874A_NSR
	.comm	_TDA9874A_NECR,4,2              ## @TDA9874A_NECR
	.comm	_MAXREGS,4,2                    ## @MAXREGS
	.comm	_tda9874a_mode,8,3              ## @tda9874a_mode
	.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	_debug,4,2                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tda9874a_getrxsubchans(): DSR=0x%X, NSR=0x%X, NECR=0x%X, return: %d.\n"

	.no_dead_strip	_tda9874a_getrxsubchans
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tda9874a_getrxsubchans
_tda9874a_getrxsubchans:                ; @tda9874a_getrxsubchans
	.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	x22, x0
Lloh0:
	adrp	x8, _V4L2_TUNER_SUB_MONO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_TUNER_SUB_MONO@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
Lloh3:
	adrp	x8, _TDA9874A_DSR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TDA9874A_DSR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_chip_read2
	tbnz	w0, #31, LBB0_7
; %bb.1:
	mov	x20, x0
Lloh6:
	adrp	x8, _TDA9874A_NSR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TDA9874A_NSR@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_chip_read2
	tbnz	w0, #31, LBB0_7
; %bb.2:
	mov	x21, x0
Lloh9:
	adrp	x8, _TDA9874A_NECR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TDA9874A_NECR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_chip_read2
	tbnz	w0, #31, LBB0_7
; %bb.3:
	mov	x6, x0
	add	x2, x22, #8
	ldr	x8, [x22]
Lloh12:
	adrp	x9, _MAXREGS@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MAXREGS@GOTPAGEOFF]
	ldrsw	x10, [x9]
	add	x10, x8, x10, lsl #2
	stur	w20, [x10, #-8]
	ldrsw	x9, [x9]
	add	x8, x8, x9, lsl #2
	stur	w21, [x8, #-4]
Lloh14:
	adrp	x8, _tda9874a_mode@GOTPAGE
Lloh15:
	ldr	x8, [x8, _tda9874a_mode@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	cbz	x8, LBB0_8
; %bb.4:
Lloh17:
	adrp	x8, _V4L2_TUNER_SUB_STEREO@GOTPAGE
Lloh18:
	ldr	x8, [x8, _V4L2_TUNER_SUB_STEREO@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	tst	w21, #0x2
	csel	w19, w19, w8, eq
	tbz	w21, #0, LBB0_6
LBB0_5:
Lloh20:
	adrp	x8, _V4L2_TUNER_SUB_LANG1@GOTPAGE
Lloh21:
	ldr	x8, [x8, _V4L2_TUNER_SUB_LANG1@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	adrp	x9, _V4L2_TUNER_SUB_LANG2@GOTPAGE
Lloh24:
	ldr	x9, [x9, _V4L2_TUNER_SUB_LANG2@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	orr	w8, w8, w19
	orr	w19, w8, w9
LBB0_6:
Lloh26:
	adrp	x8, _debug@GOTPAGE
Lloh27:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
Lloh29:
	adrp	x3, l_.str@PAGE
Lloh30:
	add	x3, x3, l_.str@PAGEOFF
	mov	w0, #1
	mov	x4, x20
	mov	x5, x21
	mov	x7, x19
	bl	_v4l2_dbg
LBB0_7:
	mov	x0, x19
	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
LBB0_8:
Lloh31:
	adrp	x8, _V4L2_TUNER_SUB_STEREO@GOTPAGE
Lloh32:
	ldr	x8, [x8, _V4L2_TUNER_SUB_STEREO@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	tst	w20, #0x2
	csel	w19, w19, w8, eq
	tbnz	w20, #2, LBB0_5
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_TUNER_SUB_MONO,4,2        ; @V4L2_TUNER_SUB_MONO
	.comm	_TDA9874A_DSR,4,2               ; @TDA9874A_DSR
	.comm	_TDA9874A_NSR,4,2               ; @TDA9874A_NSR
	.comm	_TDA9874A_NECR,4,2              ; @TDA9874A_NECR
	.comm	_MAXREGS,4,2                    ; @MAXREGS
	.comm	_tda9874a_mode,8,3              ; @tda9874a_mode
	.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	_debug,4,2                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tda9874a_getrxsubchans(): DSR=0x%X, NSR=0x%X, NECR=0x%X, return: %d.\n"

	.no_dead_strip	_tda9874a_getrxsubchans
.subsections_via_symbols
