	.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_1
## %bb.2:
	movq	%rdi, %r14
	movl	$1572864, %r15d                 ## imm = 0x180000
	movl	$1572864, %edi                  ## imm = 0x180000
	movl	$1572864, %esi                  ## imm = 0x180000
	callq	_gpio_inout
	movl	(%rbx), %eax
	xorl	%ecx, %ecx
	cmpl	$128, %eax
	cmovel	%r15d, %ecx
	cmpl	$129, %eax
	movl	$524288, %esi                   ## imm = 0x80000
	cmovnel	%ecx, %esi
	movl	$1572864, %edi                  ## imm = 0x180000
	callq	_gpio_bits
	movq	_bttv_gpio@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_3
## %bb.4:
	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_1:
	movq	_V4L2_TUNER_MODE_LANG1@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movq	_V4L2_TUNER_SUB_MONO@GOTPCREL(%rip), %rax
	movq	_V4L2_TUNER_SUB_STEREO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_V4L2_TUNER_SUB_LANG1@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_V4L2_TUNER_SUB_LANG2@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, 4(%rbx)
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_TUNER_MODE_LANG1,4,2      ## @V4L2_TUNER_MODE_LANG1
	.comm	_V4L2_TUNER_SUB_MONO,4,2        ## @V4L2_TUNER_SUB_MONO
	.comm	_V4L2_TUNER_SUB_STEREO,4,2      ## @V4L2_TUNER_SUB_STEREO
	.comm	_V4L2_TUNER_SUB_LANG1,4,2       ## @V4L2_TUNER_SUB_LANG1
	.comm	_V4L2_TUNER_SUB_LANG2,4,2       ## @V4L2_TUNER_SUB_LANG2
	.comm	_bttv_gpio,8,3                  ## @bttv_gpio
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"terratv"

.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]
	cmp	w8, #128
	csel	w9, w21, wzr, eq
	mov	w10, #524288
	cmp	w8, #129
	csel	w1, w10, w9, eq
	mov	w0, #1572864
	bl	_gpio_bits
Lloh0:
	adrp	x8, _bttv_gpio@GOTPAGE
Lloh1:
	ldr	x8, [x8, _bttv_gpio@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.2:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	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:
Lloh5:
	adrp	x8, _V4L2_TUNER_MODE_LANG1@GOTPAGE
Lloh6:
	ldr	x8, [x8, _V4L2_TUNER_MODE_LANG1@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [x20]
Lloh8:
	adrp	x8, _V4L2_TUNER_SUB_MONO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _V4L2_TUNER_SUB_MONO@GOTPAGEOFF]
Lloh10:
	adrp	x9, _V4L2_TUNER_SUB_STEREO@GOTPAGE
Lloh11:
	ldr	x9, [x9, _V4L2_TUNER_SUB_STEREO@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh14:
	adrp	x9, _V4L2_TUNER_SUB_LANG1@GOTPAGE
Lloh15:
	ldr	x9, [x9, _V4L2_TUNER_SUB_LANG1@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh17:
	adrp	x9, _V4L2_TUNER_SUB_LANG2@GOTPAGE
Lloh18:
	ldr	x9, [x9, _V4L2_TUNER_SUB_LANG2@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x20, #4]
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	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh12
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_TUNER_MODE_LANG1,4,2      ; @V4L2_TUNER_MODE_LANG1
	.comm	_V4L2_TUNER_SUB_MONO,4,2        ; @V4L2_TUNER_SUB_MONO
	.comm	_V4L2_TUNER_SUB_STEREO,4,2      ; @V4L2_TUNER_SUB_STEREO
	.comm	_V4L2_TUNER_SUB_LANG1,4,2       ; @V4L2_TUNER_SUB_LANG1
	.comm	_V4L2_TUNER_SUB_LANG2,4,2       ; @V4L2_TUNER_SUB_LANG2
	.comm	_bttv_gpio,8,3                  ; @bttv_gpio
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"terratv"

.subsections_via_symbols
