	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx88_set_tvaudio               ## -- Begin function cx88_set_tvaudio
	.p2align	4, 0x90
_cx88_set_tvaudio:                      ## @cx88_set_tvaudio
	.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	(%rdi), %esi
	leal	-128(%rsi), %eax
	cmpl	$10, %eax
	ja	LBB0_10
## %bb.1:
	movq	%rdi, %rbx
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_3:
	movq	_EN_A2_FORCE_MONO1@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_set_audio_standard_A2
	movq	_EN_NICAM_AUTO_STEREO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_set_audio_standard_NICAM
	movq	%rbx, %rdi
	callq	_cx88_detect_nicam
	testl	%eax, %eax
	je	LBB0_4
## %bb.9:
	movl	$1, 4(%rbx)
	jmp	LBB0_10
LBB0_8:
	leaq	L_.str(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_pr_info                        ## TAILCALL
LBB0_4:
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_set_audio_standard_A2
	movq	_V4L2_TUNER_MODE_MONO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	movl	$0, 4(%rbx)
LBB0_10:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_7:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_set_audio_start
	movq	_AUD_I2SINPUTCNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%rbx), %esi
	callq	_cx_write
	movq	_AUD_I2SCNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$1, %esi
	callq	_cx_write
	movq	_EN_I2SIN_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_set_audio_finish               ## TAILCALL
LBB0_6:
	movq	_radio_deemphasis@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_set_audio_standard_FM          ## TAILCALL
LBB0_5:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_set_audio_standard_EIAJ        ## TAILCALL
LBB0_2:
	movq	_EN_BTSC_AUTO_STEREO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_set_audio_standard_BTSC        ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
LJTI0_0:
	.long	L0_0_set_8
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_8
	.long	L0_0_set_7
	.long	L0_0_set_3
	.long	L0_0_set_6
	.long	L0_0_set_5
	.long	L0_0_set_3
	.long	L0_0_set_2
	.long	L0_0_set_3
	.end_data_region
                                        ## -- End function
	.comm	_EN_BTSC_AUTO_STEREO,4,2        ## @EN_BTSC_AUTO_STEREO
	.comm	_EN_A2_FORCE_MONO1,4,2          ## @EN_A2_FORCE_MONO1
	.comm	_EN_NICAM_AUTO_STEREO,4,2       ## @EN_NICAM_AUTO_STEREO
	.comm	_V4L2_TUNER_MODE_MONO,4,2       ## @V4L2_TUNER_MODE_MONO
	.comm	_radio_deemphasis,4,2           ## @radio_deemphasis
	.comm	_AUD_I2SINPUTCNTL,4,2           ## @AUD_I2SINPUTCNTL
	.comm	_AUD_I2SCNTL,4,2                ## @AUD_I2SCNTL
	.comm	_EN_I2SIN_ENABLE,4,2            ## @EN_I2SIN_ENABLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unknown tv audio mode [%d]\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx88_set_tvaudio               ; -- Begin function cx88_set_tvaudio
	.p2align	2
_cx88_set_tvaudio:                      ; @cx88_set_tvaudio
	.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
	ldr	w1, [x0]
	sub	w8, w1, #128
	cmp	w8, #10
	b.hi	LBB0_6
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
Lloh2:
	adrp	x20, _EN_A2_FORCE_MONO1@GOTPAGE
Lloh3:
	ldr	x20, [x20, _EN_A2_FORCE_MONO1@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_set_audio_standard_A2
Lloh4:
	adrp	x8, _EN_NICAM_AUTO_STEREO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EN_NICAM_AUTO_STEREO@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_set_audio_standard_NICAM
	mov	x0, x19
	bl	_cx88_detect_nicam
	cbz	w0, LBB0_5
; %bb.3:
	mov	w8, #1
	str	w8, [x19, #4]
	b	LBB0_6
LBB0_4:
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_pr_info
LBB0_5:
	ldr	w1, [x20]
	mov	x0, x19
	bl	_set_audio_standard_A2
Lloh9:
	adrp	x8, _V4L2_TUNER_MODE_MONO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _V4L2_TUNER_MODE_MONO@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [x19, #12]
	str	wzr, [x19, #4]
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_7:
	mov	x0, x19
	mov	w1, #1
	bl	_set_audio_start
Lloh12:
	adrp	x8, _AUD_I2SINPUTCNTL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AUD_I2SINPUTCNTL@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	ldr	w1, [x19, #8]
	bl	_cx_write
Lloh15:
	adrp	x8, _AUD_I2SCNTL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AUD_I2SCNTL@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	mov	w1, #1
	bl	_cx_write
Lloh18:
	adrp	x8, _EN_I2SIN_ENABLE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EN_I2SIN_ENABLE@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_set_audio_finish
LBB0_8:
Lloh21:
	adrp	x8, _radio_deemphasis@GOTPAGE
Lloh22:
	ldr	x8, [x8, _radio_deemphasis@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_set_audio_standard_FM
LBB0_9:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_set_audio_standard_EIAJ
LBB0_10:
Lloh24:
	adrp	x8, _EN_BTSC_AUTO_STEREO@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EN_BTSC_AUTO_STEREO@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_set_audio_standard_BTSC
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_9-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_10-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
                                        ; -- End function
	.comm	_EN_BTSC_AUTO_STEREO,4,2        ; @EN_BTSC_AUTO_STEREO
	.comm	_EN_A2_FORCE_MONO1,4,2          ; @EN_A2_FORCE_MONO1
	.comm	_EN_NICAM_AUTO_STEREO,4,2       ; @EN_NICAM_AUTO_STEREO
	.comm	_V4L2_TUNER_MODE_MONO,4,2       ; @V4L2_TUNER_MODE_MONO
	.comm	_radio_deemphasis,4,2           ; @radio_deemphasis
	.comm	_AUD_I2SINPUTCNTL,4,2           ; @AUD_I2SINPUTCNTL
	.comm	_AUD_I2SCNTL,4,2                ; @AUD_I2SCNTL
	.comm	_EN_I2SIN_ENABLE,4,2            ; @EN_I2SIN_ENABLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unknown tv audio mode [%d]\n"

.subsections_via_symbols
