	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_avermedia_tvphone_audio        ## -- Begin function avermedia_tvphone_audio
	.p2align	4, 0x90
_avermedia_tvphone_audio:               ## @avermedia_tvphone_audio
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	testl	%edx, %edx
	je	LBB0_4
## %bb.1:
	movl	(%rsi), %eax
	movq	_V4L2_TUNER_MODE_LANG2@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_V4L2_TUNER_MODE_STEREO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, %esi
	orl	%edx, %esi
	testl	%eax, %esi
	je	LBB0_5
## %bb.2:
	movq	%rdi, %rbx
	xorl	%edi, %edi
	testl	%eax, %edx
	setne	%dil
	addl	%edi, %edi
	testl	%eax, %ecx
	movl	$1, %esi
	cmovel	%edi, %esi
	movl	$3, %edi
	callq	_gpio_bits
	movq	_bttv_gpio@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.3:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_bttv_gpio_tracking             ## TAILCALL
LBB0_4:
	movq	_V4L2_TUNER_MODE_MONO@GOTPCREL(%rip), %rax
	movq	_V4L2_TUNER_MODE_STEREO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_V4L2_TUNER_MODE_LANG1@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, (%rsi)
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_TUNER_MODE_LANG2,4,2      ## @V4L2_TUNER_MODE_LANG2
	.comm	_V4L2_TUNER_MODE_STEREO,4,2     ## @V4L2_TUNER_MODE_STEREO
	.comm	_bttv_gpio,8,3                  ## @bttv_gpio
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"avermedia"

	.comm	_V4L2_TUNER_MODE_MONO,4,2       ## @V4L2_TUNER_MODE_MONO
	.comm	_V4L2_TUNER_MODE_LANG1,4,2      ## @V4L2_TUNER_MODE_LANG1
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_avermedia_tvphone_audio        ; -- Begin function avermedia_tvphone_audio
	.p2align	2
_avermedia_tvphone_audio:               ; @avermedia_tvphone_audio
	.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
	cbz	w2, LBB0_4
; %bb.1:
	ldr	w9, [x1]
Lloh0:
	adrp	x8, _V4L2_TUNER_MODE_LANG2@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_TUNER_MODE_LANG2@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w8, w8, w9
Lloh3:
	adrp	x10, _V4L2_TUNER_MODE_STEREO@GOTPAGE
Lloh4:
	ldr	x10, [x10, _V4L2_TUNER_MODE_STEREO@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	and	w9, w10, w9
	orr	w10, w9, w8
	cbz	w10, LBB0_5
; %bb.2:
	mov	x19, x0
	cmp	w8, #0
	cset	w8, ne
	lsl	w8, w8, #1
	cmp	w9, #0
	csinc	w1, w8, wzr, eq
	mov	w0, #3
	bl	_gpio_bits
Lloh6:
	adrp	x8, _bttv_gpio@GOTPAGE
Lloh7:
	ldr	x8, [x8, _bttv_gpio@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.3:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_bttv_gpio_tracking
LBB0_4:
Lloh11:
	adrp	x8, _V4L2_TUNER_MODE_MONO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _V4L2_TUNER_MODE_MONO@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _V4L2_TUNER_MODE_STEREO@GOTPAGE
Lloh15:
	ldr	x9, [x9, _V4L2_TUNER_MODE_STEREO@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh17:
	adrp	x9, _V4L2_TUNER_MODE_LANG1@GOTPAGE
Lloh18:
	ldr	x9, [x9, _V4L2_TUNER_MODE_LANG1@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x1]
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_TUNER_MODE_LANG2,4,2      ; @V4L2_TUNER_MODE_LANG2
	.comm	_V4L2_TUNER_MODE_STEREO,4,2     ; @V4L2_TUNER_MODE_STEREO
	.comm	_bttv_gpio,8,3                  ; @bttv_gpio
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"avermedia"

	.comm	_V4L2_TUNER_MODE_MONO,4,2       ; @V4L2_TUNER_MODE_MONO
	.comm	_V4L2_TUNER_MODE_LANG1,4,2      ; @V4L2_TUNER_MODE_LANG1
.subsections_via_symbols
