	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function audio_mux
_audio_mux:                             ## @audio_mux
	.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
	subq	$16, %rsp
	.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	24(%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
	movq	_BT848_DSTATUS_HLOC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ebx, (%r15)
	movl	%r14d, 4(%r15)
	testl	%ebx, %ebx
	je	LBB0_1
LBB0_4:
	movq	(%r12), %rax
	movq	24(%r15), %rcx
	leaq	(%rcx,%rcx,2), %rdx
	leaq	(%rax,%rdx,8), %rdx
	movb	$1, %bl
	jmp	LBB0_6
LBB0_1:
	cmpq	$0, 40(%r15)
	je	LBB0_5
## %bb.2:
	andl	%eax, %ecx
	jne	LBB0_5
## %bb.3:
	cmpl	$0, 32(%r15)
	je	LBB0_4
LBB0_5:
	movq	(%r12), %rax
	movq	24(%r15), %rcx
	leaq	(%rcx,%rcx,2), %rsi
	movslq	%r14d, %rdx
	shlq	$2, %rdx
	addq	8(%rax,%rsi,8), %rdx
	xorl	%ebx, %ebx
LBB0_6:
	movl	(%rdx), %esi
	movq	%rcx, %rdx
	andq	$-2, %rdx
	cmpq	$132, %rdx
	jne	LBB0_8
## %bb.7:
	movq	%r15, %rdi
	callq	_bttv_tda9880_setnorm
	jmp	LBB0_9
LBB0_8:
	leaq	(%rcx,%rcx,2), %rcx
	movl	16(%rax,%rcx,8), %edi
	callq	_gpio_bits
LBB0_9:
	movq	_bttv_gpio@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_11
## %bb.10:
	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
	callq	_bttv_gpio_tracking
LBB0_11:
	xorl	%eax, %eax
	callq	_in_interrupt
	testq	%rax, %rax
	jne	LBB0_26
## %bb.12:
	movq	_V4L2_CID_AUDIO_MUTE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -36(%rbp)
	movl	(%r15), %eax
	movl	%eax, -40(%rbp)
	movq	_core@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_s_ctrl@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-40(%rbp), %rcx
	movq	%r15, %rdi
	callq	_bttv_call_all
	cmpq	$0, 16(%r15)
	je	LBB0_24
## %bb.13:
	cmpl	$131, %r14d
	je	LBB0_19
## %bb.14:
	cmpl	$130, %r14d
	je	LBB0_16
## %bb.15:
	cmpl	$129, %r14d
	jne	LBB0_20
LBB0_16:
	movq	_MSP_IN_SCART2@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_19:
	movq	_MSP_IN_SCART1@GOTPCREL(%rip), %rax
LBB0_17:
	movl	(%rax), %edi
	movq	_MSP_IN_TUNER1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MSP_DSP_IN_SCART@GOTPCREL(%rip), %rax
LBB0_18:
	movl	(%rax), %ecx
	movl	%ecx, %edx
	callq	_MSP_INPUT
	movl	%eax, %ecx
LBB0_23:
	movq	16(%r15), %rdi
	movq	_audio@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_s_routing@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MSP_OUTPUT_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	xorl	%r9d, %r9d
	callq	_v4l2_subdev_call
LBB0_24:
	movq	8(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_26
## %bb.25:
	movq	_audio@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_s_routing@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_v4l2_subdev_call
LBB0_26:
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	cmpq	$133, 24(%r15)
	jne	LBB0_22
## %bb.21:
	movq	_MSP_IN_SCART1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_MSP_IN_TUNER2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MSP_DSP_IN_TUNER@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_22:
	movq	_MSP_INPUT_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	jmp	LBB0_23
	.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
	.comm	_V4L2_CID_AUDIO_MUTE,4,2        ## @V4L2_CID_AUDIO_MUTE
	.comm	_core,4,2                       ## @core
	.comm	_s_ctrl,4,2                     ## @s_ctrl
	.comm	_MSP_IN_SCART2,4,2              ## @MSP_IN_SCART2
	.comm	_MSP_IN_TUNER1,4,2              ## @MSP_IN_TUNER1
	.comm	_MSP_DSP_IN_SCART,4,2           ## @MSP_DSP_IN_SCART
	.comm	_MSP_IN_SCART1,4,2              ## @MSP_IN_SCART1
	.comm	_MSP_IN_TUNER2,4,2              ## @MSP_IN_TUNER2
	.comm	_MSP_DSP_IN_TUNER,4,2           ## @MSP_DSP_IN_TUNER
	.comm	_MSP_INPUT_DEFAULT,4,2          ## @MSP_INPUT_DEFAULT
	.comm	_audio,4,2                      ## @audio
	.comm	_s_routing,4,2                  ## @s_routing
	.comm	_MSP_OUTPUT_DEFAULT,4,2         ## @MSP_OUTPUT_DEFAULT
	.no_dead_strip	_audio_mux
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function audio_mux
_audio_mux:                             ; @audio_mux
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x22, _bttv_tvcards@GOTPAGE
Lloh1:
	ldr	x22, [x22, _bttv_tvcards@GOTPAGEOFF]
	ldr	x8, [x22]
	ldr	x9, [x0, #24]
	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
Lloh5:
	adrp	x8, _BT848_DSTATUS_HLOC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BT848_DSTATUS_HLOC@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	stp	w21, w19, [x20]
	cbz	w21, LBB0_2
LBB0_1:
	ldr	x8, [x22]
	ldr	x9, [x20, #24]
	mov	w10, #24
	madd	x10, x9, x10, x8
	mov	w21, #1
	b	LBB0_6
LBB0_2:
	ldr	x9, [x20, #40]
	cbz	x9, LBB0_5
; %bb.3:
	and	w8, w8, w0
	cbnz	w8, LBB0_5
; %bb.4:
	ldr	w8, [x20, #32]
	cbz	w8, LBB0_1
LBB0_5:
	mov	w21, #0
	ldr	x8, [x22]
	ldr	x9, [x20, #24]
	mov	w10, #24
	madd	x10, x9, x10, x8
	ldr	x10, [x10, #8]
	add	x10, x10, w19, sxtw #2
LBB0_6:
	ldr	w1, [x10]
	and	x10, x9, #0xfffffffffffffffe
	cmp	x10, #132
	b.ne	LBB0_8
; %bb.7:
	mov	x0, x20
	bl	_bttv_tda9880_setnorm
	b	LBB0_9
LBB0_8:
	mov	w10, #24
	madd	x8, x9, x10, x8
	ldr	w0, [x8, #16]
	bl	_gpio_bits
LBB0_9:
Lloh8:
	adrp	x8, _bttv_gpio@GOTPAGE
Lloh9:
	ldr	x8, [x8, _bttv_gpio@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cbz	x8, LBB0_11
; %bb.10:
Lloh11:
	adrp	x8, _audio_modes@GOTPAGE
Lloh12:
	ldr	x8, [x8, _audio_modes@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	sxtw	x9, w19
	cmp	w21, #0
	mov	w10, #4
	csel	x9, x10, x9, ne
	ldr	w1, [x8, x9, lsl #2]
	mov	x0, x20
	bl	_bttv_gpio_tracking
LBB0_11:
	bl	_in_interrupt
	cbnz	x0, LBB0_23
; %bb.12:
Lloh14:
	adrp	x8, _V4L2_CID_AUDIO_MUTE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _V4L2_CID_AUDIO_MUTE@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	ldr	w9, [x20]
	stp	w9, w8, [sp, #8]
Lloh17:
	adrp	x8, _core@GOTPAGE
Lloh18:
	ldr	x8, [x8, _core@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
Lloh20:
	adrp	x8, _s_ctrl@GOTPAGE
Lloh21:
	ldr	x8, [x8, _s_ctrl@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
	add	x3, sp, #8
	mov	x0, x20
	bl	_bttv_call_all
	ldr	x8, [x20, #16]
Lloh23:
	adrp	x21, _audio@GOTPAGE
Lloh24:
	ldr	x21, [x21, _audio@GOTPAGEOFF]
Lloh25:
	adrp	x22, _s_routing@GOTPAGE
Lloh26:
	ldr	x22, [x22, _s_routing@GOTPAGEOFF]
	cbz	x8, LBB0_21
; %bb.13:
	cmp	w19, #131
	b.eq	LBB0_17
; %bb.14:
	cmp	w19, #130
	b.eq	LBB0_16
; %bb.15:
	cmp	w19, #129
	b.ne	LBB0_24
LBB0_16:
Lloh27:
	adrp	x8, _MSP_IN_SCART2@GOTPAGE
Lloh28:
	ldr	x8, [x8, _MSP_IN_SCART2@GOTPAGEOFF]
	b	LBB0_18
LBB0_17:
Lloh29:
	adrp	x8, _MSP_IN_SCART1@GOTPAGE
Lloh30:
	ldr	x8, [x8, _MSP_IN_SCART1@GOTPAGEOFF]
LBB0_18:
	ldr	w0, [x8]
Lloh31:
	adrp	x8, _MSP_IN_TUNER1@GOTPAGE
Lloh32:
	ldr	x8, [x8, _MSP_IN_TUNER1@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
Lloh34:
	adrp	x8, _MSP_DSP_IN_SCART@GOTPAGE
Lloh35:
	ldr	x8, [x8, _MSP_DSP_IN_SCART@GOTPAGEOFF]
LBB0_19:
	ldr	w2, [x8]
	mov	x3, x2
	bl	_MSP_INPUT
	mov	x3, x0
LBB0_20:
	ldr	x0, [x20, #16]
	ldr	w1, [x21]
	ldr	w2, [x22]
Lloh36:
	adrp	x8, _MSP_OUTPUT_DEFAULT@GOTPAGE
Lloh37:
	ldr	x8, [x8, _MSP_OUTPUT_DEFAULT@GOTPAGEOFF]
Lloh38:
	ldr	w4, [x8]
	mov	w5, #0
	bl	_v4l2_subdev_call
LBB0_21:
	ldr	x0, [x20, #8]
	cbz	x0, LBB0_23
; %bb.22:
	ldr	w1, [x21]
	ldr	w2, [x22]
	mov	x3, x19
	mov	w4, #0
	mov	w5, #0
	bl	_v4l2_subdev_call
LBB0_23:
	mov	w0, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_24:
	ldr	x8, [x20, #24]
	cmp	x8, #133
	b.ne	LBB0_26
; %bb.25:
Lloh39:
	adrp	x8, _MSP_IN_SCART1@GOTPAGE
Lloh40:
	ldr	x8, [x8, _MSP_IN_SCART1@GOTPAGEOFF]
Lloh41:
	ldr	w0, [x8]
Lloh42:
	adrp	x8, _MSP_IN_TUNER2@GOTPAGE
Lloh43:
	ldr	x8, [x8, _MSP_IN_TUNER2@GOTPAGEOFF]
Lloh44:
	ldr	w1, [x8]
Lloh45:
	adrp	x8, _MSP_DSP_IN_TUNER@GOTPAGE
Lloh46:
	ldr	x8, [x8, _MSP_DSP_IN_TUNER@GOTPAGEOFF]
	b	LBB0_19
LBB0_26:
Lloh47:
	adrp	x8, _MSP_INPUT_DEFAULT@GOTPAGE
Lloh48:
	ldr	x8, [x8, _MSP_INPUT_DEFAULT@GOTPAGEOFF]
Lloh49:
	ldr	w3, [x8]
	b	LBB0_20
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.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
	.comm	_V4L2_CID_AUDIO_MUTE,4,2        ; @V4L2_CID_AUDIO_MUTE
	.comm	_core,4,2                       ; @core
	.comm	_s_ctrl,4,2                     ; @s_ctrl
	.comm	_MSP_IN_SCART2,4,2              ; @MSP_IN_SCART2
	.comm	_MSP_IN_TUNER1,4,2              ; @MSP_IN_TUNER1
	.comm	_MSP_DSP_IN_SCART,4,2           ; @MSP_DSP_IN_SCART
	.comm	_MSP_IN_SCART1,4,2              ; @MSP_IN_SCART1
	.comm	_MSP_IN_TUNER2,4,2              ; @MSP_IN_TUNER2
	.comm	_MSP_DSP_IN_TUNER,4,2           ; @MSP_DSP_IN_TUNER
	.comm	_MSP_INPUT_DEFAULT,4,2          ; @MSP_INPUT_DEFAULT
	.comm	_audio,4,2                      ; @audio
	.comm	_s_routing,4,2                  ; @s_routing
	.comm	_MSP_OUTPUT_DEFAULT,4,2         ; @MSP_OUTPUT_DEFAULT
	.no_dead_strip	_audio_mux
.subsections_via_symbols
