	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function audio_mux_gpio
_audio_mux_gpio:                        ## @audio_mux_gpio
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_bttv_tvcards@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movq	(%rdi), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	movl	16(%rax,%rcx,8), %edi
	movl	%edi, %esi
	callq	_gpio_inout
	movq	_BT848_DSTATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_btread
	testl	%ebx, %ebx
	je	LBB0_1
LBB0_5:
	movq	(%r12), %rax
	movq	(%r15), %rcx
	leaq	(%rcx,%rcx,2), %rdx
	leaq	(%rax,%rdx,8), %rdx
	movb	$1, %bl
	jmp	LBB0_7
LBB0_1:
	cmpq	$0, 16(%r15)
	je	LBB0_6
## %bb.2:
	movq	_BT848_DSTATUS_HLOC@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	je	LBB0_4
## %bb.3:
	cmpl	$0, 12(%r15)
	jne	LBB0_6
LBB0_4:
	cmpl	$0, 8(%r15)
	je	LBB0_5
LBB0_6:
	movq	(%r12), %rax
	movq	(%r15), %rcx
	leaq	(%rcx,%rcx,2), %rsi
	movslq	%r14d, %rdx
	shlq	$2, %rdx
	addq	8(%rax,%rsi,8), %rdx
	xorl	%ebx, %ebx
LBB0_7:
	movl	(%rdx), %esi
	movq	%rcx, %rdx
	andq	$-2, %rdx
	cmpq	$128, %rdx
	jne	LBB0_9
## %bb.8:
	movq	%r15, %rdi
	callq	_bttv_tda9880_setnorm
	jmp	LBB0_10
LBB0_9:
	leaq	(%rcx,%rcx,2), %rcx
	movl	16(%rax,%rcx,8), %edi
	callq	_gpio_bits
LBB0_10:
	movq	_bttv_gpio@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_11
## %bb.12:
	movq	_audio_modes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%r14d, %rcx
	testb	%bl, %bl
	movl	$4, %edx
	cmoveq	%rcx, %rdx
	movl	(%rax,%rdx,4), %esi
	movq	%r15, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bttv_gpio_tracking             ## TAILCALL
LBB0_11:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_bttv_tvcards,8,3               ## @bttv_tvcards
	.comm	_BT848_DSTATUS,4,2              ## @BT848_DSTATUS
	.comm	_BT848_DSTATUS_HLOC,4,2         ## @BT848_DSTATUS_HLOC
	.comm	_bttv_gpio,8,3                  ## @bttv_gpio
	.comm	_audio_modes,8,3                ## @audio_modes
	.no_dead_strip	_audio_mux_gpio
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function audio_mux_gpio
_audio_mux_gpio:                        ; @audio_mux_gpio
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x22, _bttv_tvcards@GOTPAGE
Lloh1:
	ldr	x22, [x22, _bttv_tvcards@GOTPAGEOFF]
	ldr	x8, [x22]
	ldr	x9, [x0]
	mov	w10, #24
	madd	x8, x9, x10, x8
	ldr	w0, [x8, #16]
	mov	x1, x0
	bl	_gpio_inout
Lloh2:
	adrp	x8, _BT848_DSTATUS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BT848_DSTATUS@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_btread
	cbz	w21, LBB0_2
LBB0_1:
	ldr	x8, [x22]
	ldr	x9, [x19]
	mov	w10, #24
	madd	x10, x9, x10, x8
	mov	w21, #1
	b	LBB0_7
LBB0_2:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_6
; %bb.3:
Lloh5:
	adrp	x8, _BT848_DSTATUS_HLOC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BT848_DSTATUS_HLOC@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	and	w8, w8, w0
	cbz	w8, LBB0_5
; %bb.4:
	ldr	w8, [x19, #12]
	cbnz	w8, LBB0_6
LBB0_5:
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_1
LBB0_6:
	mov	w21, #0
	ldr	x8, [x22]
	ldr	x9, [x19]
	mov	w10, #24
	madd	x10, x9, x10, x8
	ldr	x10, [x10, #8]
	add	x10, x10, w20, sxtw #2
LBB0_7:
	ldr	w1, [x10]
	and	x10, x9, #0xfffffffffffffffe
	cmp	x10, #128
	b.ne	LBB0_9
; %bb.8:
	mov	x0, x19
	bl	_bttv_tda9880_setnorm
	b	LBB0_10
LBB0_9:
	mov	w10, #24
	madd	x8, x9, x10, x8
	ldr	w0, [x8, #16]
	bl	_gpio_bits
LBB0_10:
Lloh8:
	adrp	x8, _bttv_gpio@GOTPAGE
Lloh9:
	ldr	x8, [x8, _bttv_gpio@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cbz	x8, LBB0_12
; %bb.11:
Lloh11:
	adrp	x8, _audio_modes@GOTPAGE
Lloh12:
	ldr	x8, [x8, _audio_modes@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	sxtw	x9, w20
	cmp	w21, #0
	mov	w10, #4
	csel	x9, x10, x9, ne
	ldr	w1, [x8, x9, lsl #2]
	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_12:
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_bttv_tvcards,8,3               ; @bttv_tvcards
	.comm	_BT848_DSTATUS,4,2              ; @BT848_DSTATUS
	.comm	_BT848_DSTATUS_HLOC,4,2         ; @BT848_DSTATUS_HLOC
	.comm	_bttv_gpio,8,3                  ; @bttv_gpio
	.comm	_audio_modes,8,3                ; @audio_modes
	.no_dead_strip	_audio_mux_gpio
.subsections_via_symbols
