	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_terratv_audio                  ## -- Begin function terratv_audio
	.p2align	4, 0x90
_terratv_audio:                         ## @terratv_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	testl	%edx, %edx
	je	LBB0_3
## %bb.1:
	movq	%rdi, %r14
	movl	$1572864, %r15d                 ## imm = 0x180000
	movl	$1572864, %edi                  ## imm = 0x180000
	movl	$1572864, %esi                  ## imm = 0x180000
	callq	_gpio_inout
	movl	(%rbx), %eax
	movq	_V4L2_TUNER_MODE_LANG2@GOTPCREL(%rip), %rcx
	xorl	%esi, %esi
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	setne	%sil
	shll	$19, %esi
	movq	_V4L2_TUNER_MODE_STEREO@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	cmovnel	%r15d, %esi
	movl	$1572864, %edi                  ## imm = 0x180000
	callq	_gpio_bits
	movq	_bttv_gpio@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bttv_gpio_tracking             ## TAILCALL
LBB0_3:
	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
	movq	_V4L2_TUNER_MODE_LANG2@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, (%rbx)
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	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	"terratv"

	.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	_terratv_audio                  ; -- Begin function terratv_audio
	.p2align	2
_terratv_audio:                         ; @terratv_audio
	.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	x20, x1
	cbz	w2, LBB0_3
; %bb.1:
	mov	x19, x0
	mov	w21, #1572864
	mov	w0, #1572864
	mov	w1, #1572864
	bl	_gpio_inout
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _V4L2_TUNER_MODE_LANG2@GOTPAGE
Lloh1:
	ldr	x9, [x9, _V4L2_TUNER_MODE_LANG2@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w9, ne
	lsl	w9, w9, #19
Lloh3:
	adrp	x10, _V4L2_TUNER_MODE_STEREO@GOTPAGE
Lloh4:
	ldr	x10, [x10, _V4L2_TUNER_MODE_STEREO@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	tst	w10, w8
	csel	w1, w9, w21, eq
	mov	w0, #1572864
	bl	_gpio_bits
Lloh6:
	adrp	x8, _bttv_gpio@GOTPAGE
Lloh7:
	ldr	x8, [x8, _bttv_gpio@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.2:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	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
	b	_bttv_gpio_tracking
LBB0_3:
Lloh11:
	adrp	x8, _V4L2_TUNER_MODE_MONO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _V4L2_TUNER_MODE_MONO@GOTPAGEOFF]
Lloh13:
	adrp	x9, _V4L2_TUNER_MODE_STEREO@GOTPAGE
Lloh14:
	ldr	x9, [x9, _V4L2_TUNER_MODE_STEREO@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
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
Lloh20:
	adrp	x9, _V4L2_TUNER_MODE_LANG2@GOTPAGE
Lloh21:
	ldr	x9, [x9, _V4L2_TUNER_MODE_LANG2@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x20]
LBB0_4:
	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
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh15
	.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	"terratv"

	.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
