	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_via8233_multi_prepare
_snd_via8233_multi_prepare:             ## @snd_via8233_multi_prepare
	.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
	movq	%rdi, %rbx
	callq	_snd_pcm_substream_chip
	movq	%rax, %r12
	movq	(%rbx), %r15
	movq	16(%r15), %r14
	movq	16(%rax), %rdi
	movl	12(%r15), %esi
	callq	_via_lock_rate
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	movl	8(%r12), %edi
	movq	_AC97_PCM_FRONT_DAC_RATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	12(%r15), %edx
	callq	_snd_ac97_set_rate
	movl	8(%r12), %edi
	movq	_AC97_PCM_SURR_DAC_RATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	12(%r15), %edx
	callq	_snd_ac97_set_rate
	movl	8(%r12), %edi
	movq	_AC97_PCM_LFE_DAC_RATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	12(%r15), %edx
	callq	_snd_ac97_set_rate
	movl	8(%r12), %edi
	movq	_AC97_SPDIF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	12(%r15), %edx
	callq	_snd_ac97_set_rate
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_snd_via82xx_channel_reset
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_snd_via82xx_set_table_ptr
	movq	(%r15), %rax
	movq	_SNDRV_PCM_FORMAT_S16_LE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.4:
	movq	_VIA_REG_MULTPLAY_FMT_16BIT@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_3:
	movq	_VIA_REG_MULTPLAY_FMT_8BIT@GOTPCREL(%rip), %rax
LBB0_5:
	movl	8(%r15), %ebx
	shll	$4, %ebx
	orl	(%rax), %ebx
	movq	_OFS_MULTPLAY_FORMAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_VIADEV_REG
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_outb
	movl	8(%r15), %eax
	decl	%eax
	movl	$-16777216, %r15d               ## imm = 0xFF000000
	cmpl	$5, %eax
	ja	LBB0_7
## %bb.6:
	cltq
	leaq	l_switch.table.snd_via8233_multi_prepare(%rip), %rcx
	movl	(%rcx,%rax,4), %r15d
LBB0_7:
	movq	_OFFSET_STOP_IDX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_VIADEV_REG
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_outl
	movl	$20, %edi
	callq	_udelay
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_snd_via82xx_codec_ready
LBB0_8:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AC97_PCM_FRONT_DAC_RATE,4,2    ## @AC97_PCM_FRONT_DAC_RATE
	.comm	_AC97_PCM_SURR_DAC_RATE,4,2     ## @AC97_PCM_SURR_DAC_RATE
	.comm	_AC97_PCM_LFE_DAC_RATE,4,2      ## @AC97_PCM_LFE_DAC_RATE
	.comm	_AC97_SPDIF,4,2                 ## @AC97_SPDIF
	.comm	_SNDRV_PCM_FORMAT_S16_LE,8,3    ## @SNDRV_PCM_FORMAT_S16_LE
	.comm	_VIA_REG_MULTPLAY_FMT_16BIT,4,2 ## @VIA_REG_MULTPLAY_FMT_16BIT
	.comm	_VIA_REG_MULTPLAY_FMT_8BIT,4,2  ## @VIA_REG_MULTPLAY_FMT_8BIT
	.comm	_OFS_MULTPLAY_FORMAT,4,2        ## @OFS_MULTPLAY_FORMAT
	.comm	_OFFSET_STOP_IDX,4,2            ## @OFFSET_STOP_IDX
	.comm	_VIA_REV_8233A,8,3              ## @VIA_REV_8233A
	.no_dead_strip	_snd_via8233_multi_prepare
	.section	__TEXT,__const
	.p2align	2                               ## @switch.table.snd_via8233_multi_prepare
l_switch.table.snd_via8233_multi_prepare:
	.long	4278190097                      ## 0xff000011
	.long	4278190113                      ## 0xff000021
	.long	4278191393                      ## 0xff000521
	.long	4278207265                      ## 0xff004321
	.long	4278534945                      ## 0xff054321
	.long	4284826401                      ## 0xff654321

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_via8233_multi_prepare
_snd_via8233_multi_prepare:             ; @snd_via8233_multi_prepare
	.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, x0
	bl	_snd_pcm_substream_chip
	mov	x19, x0
	ldr	x22, [x20]
	ldr	x20, [x22, #16]
	ldr	x0, [x0, #16]
	ldr	w1, [x22, #12]
	bl	_via_lock_rate
	tbnz	x0, #63, LBB0_3
; %bb.1:
	ldr	w0, [x19, #8]
Lloh0:
	adrp	x8, _AC97_PCM_FRONT_DAC_RATE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AC97_PCM_FRONT_DAC_RATE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	w2, [x22, #12]
	bl	_snd_ac97_set_rate
	ldr	w0, [x19, #8]
Lloh3:
	adrp	x8, _AC97_PCM_SURR_DAC_RATE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AC97_PCM_SURR_DAC_RATE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldr	w2, [x22, #12]
	bl	_snd_ac97_set_rate
	ldr	w0, [x19, #8]
Lloh6:
	adrp	x8, _AC97_PCM_LFE_DAC_RATE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AC97_PCM_LFE_DAC_RATE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldr	w2, [x22, #12]
	bl	_snd_ac97_set_rate
	ldr	w0, [x19, #8]
Lloh9:
	adrp	x8, _AC97_SPDIF@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AC97_SPDIF@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	ldr	w2, [x22, #12]
	bl	_snd_ac97_set_rate
	mov	x0, x19
	mov	x1, x20
	bl	_snd_via82xx_channel_reset
	mov	x0, x19
	mov	x1, x20
	bl	_snd_via82xx_set_table_ptr
	ldr	x8, [x22]
Lloh12:
	adrp	x9, _SNDRV_PCM_FORMAT_S16_LE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _SNDRV_PCM_FORMAT_S16_LE@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
Lloh15:
	adrp	x10, _VIA_REG_MULTPLAY_FMT_16BIT@GOTPAGE
Lloh16:
	ldr	x10, [x10, _VIA_REG_MULTPLAY_FMT_16BIT@GOTPAGEOFF]
Lloh17:
	adrp	x11, _VIA_REG_MULTPLAY_FMT_8BIT@GOTPAGE
Lloh18:
	ldr	x11, [x11, _VIA_REG_MULTPLAY_FMT_8BIT@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x10, x11, eq
	ldr	w8, [x8]
	ldr	w9, [x22, #8]
	orr	w21, w8, w9, lsl #4
Lloh19:
	adrp	x8, _OFS_MULTPLAY_FORMAT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _OFS_MULTPLAY_FORMAT@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_VIADEV_REG
	mov	x1, x0
	mov	x0, x21
	bl	_outb
	ldr	w8, [x22, #8]
	sub	w8, w8, #1
	cmp	w8, #5
	b.hi	LBB0_4
; %bb.2:
Lloh22:
	adrp	x9, l_switch.table.snd_via8233_multi_prepare@PAGE
Lloh23:
	add	x9, x9, l_switch.table.snd_via8233_multi_prepare@PAGEOFF
	ldr	w21, [x9, w8, sxtw #2]
	b	LBB0_5
LBB0_3:
Lloh24:
	adrp	x8, _EINVAL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_4:
	mov	w21, #-16777216
LBB0_5:
Lloh27:
	adrp	x8, _OFFSET_STOP_IDX@GOTPAGE
Lloh28:
	ldr	x8, [x8, _OFFSET_STOP_IDX@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_VIADEV_REG
	mov	x1, x0
	mov	x0, x21
	bl	_outl
	mov	w0, #20
	bl	_udelay
	mov	x0, x19
	mov	w1, #0
	bl	_snd_via82xx_codec_ready
	mov	w0, #0
LBB0_6:
	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	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AC97_PCM_FRONT_DAC_RATE,4,2    ; @AC97_PCM_FRONT_DAC_RATE
	.comm	_AC97_PCM_SURR_DAC_RATE,4,2     ; @AC97_PCM_SURR_DAC_RATE
	.comm	_AC97_PCM_LFE_DAC_RATE,4,2      ; @AC97_PCM_LFE_DAC_RATE
	.comm	_AC97_SPDIF,4,2                 ; @AC97_SPDIF
	.comm	_SNDRV_PCM_FORMAT_S16_LE,8,3    ; @SNDRV_PCM_FORMAT_S16_LE
	.comm	_VIA_REG_MULTPLAY_FMT_16BIT,4,2 ; @VIA_REG_MULTPLAY_FMT_16BIT
	.comm	_VIA_REG_MULTPLAY_FMT_8BIT,4,2  ; @VIA_REG_MULTPLAY_FMT_8BIT
	.comm	_OFS_MULTPLAY_FORMAT,4,2        ; @OFS_MULTPLAY_FORMAT
	.comm	_OFFSET_STOP_IDX,4,2            ; @OFFSET_STOP_IDX
	.comm	_VIA_REV_8233A,8,3              ; @VIA_REV_8233A
	.no_dead_strip	_snd_via8233_multi_prepare
	.section	__TEXT,__const
	.p2align	2                               ; @switch.table.snd_via8233_multi_prepare
l_switch.table.snd_via8233_multi_prepare:
	.long	4278190097                      ; 0xff000011
	.long	4278190113                      ; 0xff000021
	.long	4278191393                      ; 0xff000521
	.long	4278207265                      ; 0xff004321
	.long	4278534945                      ; 0xff054321
	.long	4284826401                      ; 0xff654321

.subsections_via_symbols
