	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_tvaudio
_set_tvaudio:                           ## @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
	movq	%rdi, %rbx
	movl	(%rdi), %r14d
	movl	16(%rdi), %edi
	callq	_INPUT
	movq	_CX88_VMUX_TELEVISION@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_2
## %bb.1:
	movl	16(%rbx), %edi
	callq	_INPUT
	movq	_CX88_VMUX_CABLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_16
LBB0_2:
	movq	_V4L2_STD_PAL_BG@GOTPCREL(%rip), %rcx
	movq	_WW_BG@GOTPCREL(%rip), %rax
	testl	%r14d, (%rcx)
	jne	LBB0_15
## %bb.3:
	movq	_V4L2_STD_PAL_DK@GOTPCREL(%rip), %rdx
	movq	_WW_DK@GOTPCREL(%rip), %rcx
	testl	%r14d, (%rdx)
	je	LBB0_5
## %bb.4:
	movq	%rcx, %rax
	jmp	LBB0_15
LBB0_5:
	movq	_V4L2_STD_PAL_I@GOTPCREL(%rip), %rdx
	testl	%r14d, (%rdx)
	je	LBB0_7
## %bb.6:
	movq	_WW_I@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_7:
	movq	_V4L2_STD_SECAM_L@GOTPCREL(%rip), %rdx
	testl	%r14d, (%rdx)
	je	LBB0_9
## %bb.8:
	movq	_WW_L@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_9:
	movq	_V4L2_STD_SECAM_B@GOTPCREL(%rip), %rdx
	movq	_V4L2_STD_SECAM_G@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	orl	(%rdx), %esi
	movq	_V4L2_STD_SECAM_H@GOTPCREL(%rip), %rdx
	orl	(%rdx), %esi
	testl	%r14d, %esi
	jne	LBB0_15
## %bb.10:
	movq	_V4L2_STD_SECAM_DK@GOTPCREL(%rip), %rdx
	movq	%rcx, %rax
	testl	%r14d, (%rdx)
	jne	LBB0_15
## %bb.11:
	movq	_V4L2_STD_NTSC_M@GOTPCREL(%rip), %rcx
	movq	_WW_BTSC@GOTPCREL(%rip), %rax
	testl	%r14d, (%rcx)
	jne	LBB0_15
## %bb.12:
	movq	_V4L2_STD_PAL_M@GOTPCREL(%rip), %rcx
	testl	%r14d, (%rcx)
	jne	LBB0_15
## %bb.13:
	movq	_V4L2_STD_NTSC_M_JP@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_17
## %bb.14:
	movq	_WW_EIAJ@GOTPCREL(%rip), %rax
LBB0_15:
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
	movq	_MO_AFECFG_IO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$31, %esi
	xorl	%edx, %edx
	callq	_cx_andor
	movq	%rbx, %rdi
	callq	_cx88_set_tvaudio
	movq	%rbx, %rdi
	callq	_cx88_start_audio_dma
LBB0_16:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_17:
	movl	(%rbx), %edi
	callq	_v4l2_norm_to_name
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_info
	movq	_WW_NONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_CX88_VMUX_TELEVISION,8,3       ## @CX88_VMUX_TELEVISION
	.comm	_CX88_VMUX_CABLE,8,3            ## @CX88_VMUX_CABLE
	.comm	_V4L2_STD_PAL_BG,4,2            ## @V4L2_STD_PAL_BG
	.comm	_WW_BG,8,3                      ## @WW_BG
	.comm	_V4L2_STD_PAL_DK,4,2            ## @V4L2_STD_PAL_DK
	.comm	_WW_DK,8,3                      ## @WW_DK
	.comm	_V4L2_STD_PAL_I,4,2             ## @V4L2_STD_PAL_I
	.comm	_WW_I,8,3                       ## @WW_I
	.comm	_V4L2_STD_SECAM_L,4,2           ## @V4L2_STD_SECAM_L
	.comm	_WW_L,8,3                       ## @WW_L
	.comm	_V4L2_STD_SECAM_B,4,2           ## @V4L2_STD_SECAM_B
	.comm	_V4L2_STD_SECAM_G,4,2           ## @V4L2_STD_SECAM_G
	.comm	_V4L2_STD_SECAM_H,4,2           ## @V4L2_STD_SECAM_H
	.comm	_V4L2_STD_SECAM_DK,4,2          ## @V4L2_STD_SECAM_DK
	.comm	_V4L2_STD_NTSC_M,4,2            ## @V4L2_STD_NTSC_M
	.comm	_V4L2_STD_PAL_M,4,2             ## @V4L2_STD_PAL_M
	.comm	_WW_BTSC,8,3                    ## @WW_BTSC
	.comm	_V4L2_STD_NTSC_M_JP,4,2         ## @V4L2_STD_NTSC_M_JP
	.comm	_WW_EIAJ,8,3                    ## @WW_EIAJ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tvaudio support needs work for this tv norm [%s], sorry\n"

	.comm	_WW_NONE,8,3                    ## @WW_NONE
	.comm	_MO_AFECFG_IO,4,2               ## @MO_AFECFG_IO
	.no_dead_strip	_set_tvaudio
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_tvaudio
_set_tvaudio:                           ; @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
	mov	x19, x0
	ldr	w20, [x0]
	ld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PAGE
Lloh22:
	ldr	x8, [x8, _V4L2_STD_SECAM_L@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_12
; %bb.9:
Lloh24:
	adrp	x8, _WW_L@GOTPAGE
Lloh25:
	ldr	x8, [x8, _WW_L@GOTPAGEOFF]
LBB0_10:
	ldr	x8, [x8]
	str	x8, [x19, #8]
Lloh26:
	adrp	x8, _MO_AFECFG_IO@GOTPAGE
Lloh27:
	ldr	x8, [x8, _MO_AFECFG_IO@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	mov	w1, #31
	mov	w2, #0
	bl	_cx_andor
	mov	x0, x19
	bl	_cx88_set_tvaudio
	mov	x0, x19
	bl	_cx88_start_audio_dma
LBB0_11:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_12:
Lloh29:
	adrp	x8, _V4L2_STD_SECAM_B@GOTPAGE
Lloh30:
	ldr	x8, [x8, _V4L2_STD_SECAM_B@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
Lloh32:
	adrp	x9, _V4L2_STD_SECAM_G@GOTPAGE
Lloh33:
	ldr	x9, [x9, _V4L2_STD_SECAM_G@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh35:
	adrp	x9, _V4L2_STD_SECAM_H@GOTPAGE
Lloh36:
	ldr	x9, [x9, _V4L2_STD_SECAM_H@GOTPAGEOFF]
Lloh37:
	ldr	w9, [x9]
	orr	w8, w8, w9
	tst	w8, w20
	b.ne	LBB0_3
; %bb.13:
Lloh38:
	adrp	x8, _V4L2_STD_SECAM_DK@GOTPAGE
Lloh39:
	ldr	x8, [x8, _V4L2_STD_SECAM_DK@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	tst	w8, w20
	b.ne	LBB0_5
; %bb.14:
Lloh41:
	adrp	x8, _V4L2_STD_NTSC_M@GOTPAGE
Lloh42:
	ldr	x8, [x8, _V4L2_STD_NTSC_M@GOTPAGEOFF]
Lloh43:
	ldr	w8, [x8]
	tst	w8, w20
	b.ne	LBB0_16
; %bb.15:
Lloh44:
	adrp	x8, _V4L2_STD_PAL_M@GOTPAGE
Lloh45:
	ldr	x8, [x8, _V4L2_STD_PAL_M@GOTPAGEOFF]
Lloh46:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_17
LBB0_16:
Lloh47:
	adrp	x8, _WW_BTSC@GOTPAGE
Lloh48:
	ldr	x8, [x8, _WW_BTSC@GOTPAGEOFF]
	b	LBB0_10
LBB0_17:
Lloh49:
	adrp	x8, _V4L2_STD_NTSC_M_JP@GOTPAGE
Lloh50:
	ldr	x8, [x8, _V4L2_STD_NTSC_M_JP@GOTPAGEOFF]
Lloh51:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_19
; %bb.18:
Lloh52:
	adrp	x8, _WW_EIAJ@GOTPAGE
Lloh53:
	ldr	x8, [x8, _WW_EIAJ@GOTPAGEOFF]
	b	LBB0_10
LBB0_19:
	ldr	w0, [x19]
	bl	_v4l2_norm_to_name
	mov	x1, x0
Lloh54:
	adrp	x0, l_.str@PAGE
Lloh55:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_info
Lloh56:
	adrp	x8, _WW_NONE@GOTPAGE
Lloh57:
	ldr	x8, [x8, _WW_NONE@GOTPAGEOFF]
Lloh58:
	ldr	x8, [x8]
	str	x8, [x19, #8]
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGot	Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpAdd	Lloh54, Lloh55
	.cfi_endproc
                                        ; -- End function
	.comm	_CX88_VMUX_TELEVISION,8,3       ; @CX88_VMUX_TELEVISION
	.comm	_CX88_VMUX_CABLE,8,3            ; @CX88_VMUX_CABLE
	.comm	_V4L2_STD_PAL_BG,4,2            ; @V4L2_STD_PAL_BG
	.comm	_WW_BG,8,3                      ; @WW_BG
	.comm	_V4L2_STD_PAL_DK,4,2            ; @V4L2_STD_PAL_DK
	.comm	_WW_DK,8,3                      ; @WW_DK
	.comm	_V4L2_STD_PAL_I,4,2             ; @V4L2_STD_PAL_I
	.comm	_WW_I,8,3                       ; @WW_I
	.comm	_V4L2_STD_SECAM_L,4,2           ; @V4L2_STD_SECAM_L
	.comm	_WW_L,8,3                       ; @WW_L
	.comm	_V4L2_STD_SECAM_B,4,2           ; @V4L2_STD_SECAM_B
	.comm	_V4L2_STD_SECAM_G,4,2           ; @V4L2_STD_SECAM_G
	.comm	_V4L2_STD_SECAM_H,4,2           ; @V4L2_STD_SECAM_H
	.comm	_V4L2_STD_SECAM_DK,4,2          ; @V4L2_STD_SECAM_DK
	.comm	_V4L2_STD_NTSC_M,4,2            ; @V4L2_STD_NTSC_M
	.comm	_V4L2_STD_PAL_M,4,2             ; @V4L2_STD_PAL_M
	.comm	_WW_BTSC,8,3                    ; @WW_BTSC
	.comm	_V4L2_STD_NTSC_M_JP,4,2         ; @V4L2_STD_NTSC_M_JP
	.comm	_WW_EIAJ,8,3                    ; @WW_EIAJ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tvaudio support needs work for this tv norm [%s], sorry\n"

	.comm	_WW_NONE,8,3                    ; @WW_NONE
	.comm	_MO_AFECFG_IO,4,2               ; @MO_AFECFG_IO
	.no_dead_strip	_set_tvaudio
.subsections_via_symbols
