	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tvaudio_getstereo
_tvaudio_getstereo:                     ## @tvaudio_getstereo
	.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
	movl	(%rsi), %eax
	movl	$-1, %r14d
	leal	-128(%rax), %ecx
	cmpl	$2, %ecx
	jb	LBB0_10
## %bb.1:
	leal	-132(%rax), %ecx
	cmpl	$2, %ecx
	jae	LBB0_2
## %bb.4:
	movq	_SAA7134_IDENT_SIF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_saa_readb
	movl	%eax, %ebx
	movl	%eax, %esi
	shrl	$5, %esi
	andl	$7, %esi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_dprintk
	movl	%ebx, %eax
	notl	%eax
	testb	$96, %al
	je	LBB0_5
## %bb.7:
	testb	$-96, %al
	je	LBB0_8
## %bb.9:
	testb	$32, %bl
	je	LBB0_16
	jmp	LBB0_13
LBB0_10:
	movq	_SAA7134_AUDIO_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_saa_readb
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_dprintk
	testb	$1, %bl
	je	LBB0_16
## %bb.11:
	movq	_SAA7134_NICAM_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_saa_readb
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_dprintk
	andl	$3, %ebx
	cmpl	$2, %ebx
	je	LBB0_8
## %bb.12:
	cmpl	$1, %ebx
	jne	LBB0_13
LBB0_5:
	movq	_V4L2_TUNER_SUB_LANG1@GOTPCREL(%rip), %rax
	movq	_V4L2_TUNER_SUB_LANG2@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
LBB0_2:
	cmpl	$131, %eax
	jne	LBB0_16
## %bb.3:
	movq	_V4L2_TUNER_SUB_MONO@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_16
LBB0_8:
	movq	_V4L2_TUNER_SUB_MONO@GOTPCREL(%rip), %rax
	movq	_V4L2_TUNER_SUB_STEREO@GOTPCREL(%rip), %rcx
LBB0_6:
	movl	(%rcx), %ebx
	orl	(%rax), %ebx
	cmpl	$-1, %ebx
	je	LBB0_16
LBB0_15:
	movq	_V4L2_TUNER_SUB_MONO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%ebx, %eax
	leaq	L_.str.5(%rip), %rax
	leaq	L_.str.4(%rip), %rsi
	cmoveq	%rax, %rsi
	movq	_V4L2_TUNER_SUB_STEREO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%ebx, %ecx
	leaq	L_.str.6(%rip), %rdx
	cmoveq	%rax, %rdx
	movq	_V4L2_TUNER_SUB_LANG1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%ebx, %ecx
	leaq	L_.str.7(%rip), %rcx
	cmoveq	%rax, %rcx
	movq	_V4L2_TUNER_SUB_LANG2@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
	andl	%ebx, %edi
	leaq	L_.str.8(%rip), %r8
	cmoveq	%rax, %r8
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_dprintk
	movl	%ebx, %r14d
LBB0_16:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_13:
	movq	_V4L2_TUNER_SUB_MONO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	cmpl	$-1, %ebx
	jne	LBB0_15
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_TUNER_SUB_MONO,4,2        ## @V4L2_TUNER_SUB_MONO
	.comm	_SAA7134_IDENT_SIF,4,2          ## @SAA7134_IDENT_SIF
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"getstereo: fm/stereo: idp=0x%x\n"

	.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_STEREO,4,2      ## @V4L2_TUNER_SUB_STEREO
	.comm	_SAA7134_AUDIO_STATUS,4,2       ## @SAA7134_AUDIO_STATUS
L_.str.1:                               ## @.str.1
	.asciz	"getstereo: nicam=0x%x\n"

	.comm	_SAA7134_NICAM_STATUS,4,2       ## @SAA7134_NICAM_STATUS
L_.str.2:                               ## @.str.2
	.asciz	"getstereo: nicam_status=0x%x\n"

L_.str.3:                               ## @.str.3
	.asciz	"found audio subchannels:%s%s%s%s\n"

L_.str.4:                               ## @.str.4
	.asciz	" mono"

L_.str.5:                               ## @.str.5
	.space	1

L_.str.6:                               ## @.str.6
	.asciz	" stereo"

L_.str.7:                               ## @.str.7
	.asciz	" lang1"

L_.str.8:                               ## @.str.8
	.asciz	" lang2"

	.no_dead_strip	_tvaudio_getstereo
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tvaudio_getstereo
_tvaudio_getstereo:                     ; @tvaudio_getstereo
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	w8, [x1]
	sub	w9, w8, #128
	cmp	w9, #2
	b.lo	LBB0_5
; %bb.1:
	sub	w9, w8, #132
	cmp	w9, #2
	b.hs	LBB0_9
; %bb.2:
Lloh0:
	adrp	x8, _SAA7134_IDENT_SIF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SAA7134_IDENT_SIF@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_saa_readb
	mov	x19, x0
	mvn	w20, w0
	ubfx	w8, w0, #5, #3
	str	x8, [sp]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dprintk
	tst	w20, #0x60
	b.eq	LBB0_8
; %bb.3:
	mov	w8, #160
	bics	wzr, w8, w19
	b.eq	LBB0_12
; %bb.4:
	tbnz	w19, #5, LBB0_16
	b	LBB0_11
LBB0_5:
Lloh5:
	adrp	x8, _SAA7134_AUDIO_STATUS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SAA7134_AUDIO_STATUS@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_saa_readb
	mov	x19, x0
	str	x19, [sp]
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_dprintk
	tbz	w19, #0, LBB0_11
; %bb.6:
Lloh10:
	adrp	x8, _SAA7134_NICAM_STATUS@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SAA7134_NICAM_STATUS@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	bl	_saa_readb
	mov	x19, x0
	str	x19, [sp]
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_dprintk
	and	w8, w19, #0x3
	cmp	w8, #2
	b.eq	LBB0_12
; %bb.7:
	cmp	w8, #1
	b.ne	LBB0_16
LBB0_8:
Lloh15:
	adrp	x8, _V4L2_TUNER_SUB_LANG1@GOTPAGE
Lloh16:
	ldr	x8, [x8, _V4L2_TUNER_SUB_LANG1@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _V4L2_TUNER_SUB_LANG2@GOTPAGE
Lloh19:
	ldr	x9, [x9, _V4L2_TUNER_SUB_LANG2@GOTPAGEOFF]
	b	LBB0_13
LBB0_9:
	cmp	w8, #131
	b.ne	LBB0_11
; %bb.10:
Lloh20:
	adrp	x8, _V4L2_TUNER_SUB_MONO@GOTPAGE
Lloh21:
	ldr	x8, [x8, _V4L2_TUNER_SUB_MONO@GOTPAGEOFF]
Lloh22:
	ldr	w19, [x8]
	b	LBB0_15
LBB0_11:
	mov	w19, #-1
	b	LBB0_15
LBB0_12:
Lloh23:
	adrp	x8, _V4L2_TUNER_SUB_MONO@GOTPAGE
Lloh24:
	ldr	x8, [x8, _V4L2_TUNER_SUB_MONO@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
Lloh26:
	adrp	x9, _V4L2_TUNER_SUB_STEREO@GOTPAGE
Lloh27:
	ldr	x9, [x9, _V4L2_TUNER_SUB_STEREO@GOTPAGEOFF]
LBB0_13:
	ldr	w9, [x9]
	orr	w19, w9, w8
	cmn	w19, #1
	b.eq	LBB0_15
LBB0_14:
Lloh28:
	adrp	x8, _V4L2_TUNER_SUB_MONO@GOTPAGE
Lloh29:
	ldr	x8, [x8, _V4L2_TUNER_SUB_MONO@GOTPAGEOFF]
Lloh30:
	adrp	x9, l_.str.4@PAGE
Lloh31:
	add	x9, x9, l_.str.4@PAGEOFF
Lloh32:
	adrp	x10, l_.str.5@PAGE
Lloh33:
	add	x10, x10, l_.str.5@PAGEOFF
Lloh34:
	ldr	w8, [x8]
	tst	w8, w19
	csel	x8, x10, x9, eq
Lloh35:
	adrp	x9, _V4L2_TUNER_SUB_STEREO@GOTPAGE
Lloh36:
	ldr	x9, [x9, _V4L2_TUNER_SUB_STEREO@GOTPAGEOFF]
Lloh37:
	ldr	w9, [x9]
Lloh38:
	adrp	x11, l_.str.6@PAGE
Lloh39:
	add	x11, x11, l_.str.6@PAGEOFF
	tst	w9, w19
	csel	x9, x10, x11, eq
Lloh40:
	adrp	x11, _V4L2_TUNER_SUB_LANG1@GOTPAGE
Lloh41:
	ldr	x11, [x11, _V4L2_TUNER_SUB_LANG1@GOTPAGEOFF]
Lloh42:
	ldr	w11, [x11]
Lloh43:
	adrp	x12, l_.str.7@PAGE
Lloh44:
	add	x12, x12, l_.str.7@PAGEOFF
	tst	w11, w19
Lloh45:
	adrp	x11, _V4L2_TUNER_SUB_LANG2@GOTPAGE
Lloh46:
	ldr	x11, [x11, _V4L2_TUNER_SUB_LANG2@GOTPAGEOFF]
	csel	x12, x10, x12, eq
Lloh47:
	ldr	w11, [x11]
Lloh48:
	adrp	x13, l_.str.8@PAGE
Lloh49:
	add	x13, x13, l_.str.8@PAGEOFF
	tst	w11, w19
	csel	x10, x10, x13, eq
	stp	x12, x10, [sp, #16]
	stp	x8, x9, [sp]
Lloh50:
	adrp	x0, l_.str.3@PAGE
Lloh51:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_dprintk
LBB0_15:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_16:
Lloh52:
	adrp	x8, _V4L2_TUNER_SUB_MONO@GOTPAGE
Lloh53:
	ldr	x8, [x8, _V4L2_TUNER_SUB_MONO@GOTPAGEOFF]
Lloh54:
	ldr	w19, [x8]
	cmn	w19, #1
	b.ne	LBB0_14
	b	LBB0_15
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh34
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_TUNER_SUB_MONO,4,2        ; @V4L2_TUNER_SUB_MONO
	.comm	_SAA7134_IDENT_SIF,4,2          ; @SAA7134_IDENT_SIF
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"getstereo: fm/stereo: idp=0x%x\n"

	.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_STEREO,4,2      ; @V4L2_TUNER_SUB_STEREO
	.comm	_SAA7134_AUDIO_STATUS,4,2       ; @SAA7134_AUDIO_STATUS
l_.str.1:                               ; @.str.1
	.asciz	"getstereo: nicam=0x%x\n"

	.comm	_SAA7134_NICAM_STATUS,4,2       ; @SAA7134_NICAM_STATUS
l_.str.2:                               ; @.str.2
	.asciz	"getstereo: nicam_status=0x%x\n"

l_.str.3:                               ; @.str.3
	.asciz	"found audio subchannels:%s%s%s%s\n"

l_.str.4:                               ; @.str.4
	.asciz	" mono"

l_.str.5:                               ; @.str.5
	.space	1

l_.str.6:                               ; @.str.6
	.asciz	" stereo"

l_.str.7:                               ; @.str.7
	.asciz	" lang1"

l_.str.8:                               ; @.str.8
	.asciz	" lang2"

	.no_dead_strip	_tvaudio_getstereo
.subsections_via_symbols
