	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_via82xx_pcm_close
_snd_via82xx_pcm_close:                 ## @snd_via82xx_pcm_close
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_snd_pcm_substream_chip
	movq	(%rbx), %rcx
	movq	(%rcx), %r15
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	8(%rax), %rbx
	movq	(%r15), %r14
	shlq	$4, %r14
	leaq	(%rbx,%r14), %r12
	leaq	(%rbx,%r14), %r13
	addq	$8, %r13
	movq	%r13, %rdi
	callq	_spin_lock_irq
	decl	12(%rbx,%r14)
	jne	LBB0_2
## %bb.1:
	movq	$0, (%r12)
LBB0_2:
	movq	%r13, %rdi
	callq	_spin_unlock_irq
	cmpq	$0, (%r12)
	jne	LBB0_7
## %bb.3:
	cmpq	$0, (%r15)
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %edi
	je	LBB0_5
## %bb.4:
	movq	_AC97_PCM_LR_ADC_RATE@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_5:
	movq	_AC97_PCM_FRONT_DAC_RATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_snd_ac97_update_power
	movl	(%rbx), %edi
	movq	_AC97_PCM_SURR_DAC_RATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_snd_ac97_update_power
	movl	(%rbx), %edi
	movq	_AC97_PCM_LFE_DAC_RATE@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_snd_ac97_update_power
LBB0_7:
	movq	$0, 8(%r15)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.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_PCM_LR_ADC_RATE,4,2       ## @AC97_PCM_LR_ADC_RATE
	.no_dead_strip	_snd_via82xx_pcm_close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_via82xx_pcm_close
_snd_via82xx_pcm_close:                 ; @snd_via82xx_pcm_close
	.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	x8, [x20]
	ldr	x21, [x8]
	ldr	x8, [x0, #8]
	ldr	x9, [x21]
	add	x22, x8, x9, lsl #4
	add	x20, x22, #8
	mov	x0, x20
	bl	_spin_lock_irq
	ldr	w8, [x22, #12]
	subs	w8, w8, #1
	str	w8, [x22, #12]
	b.ne	LBB0_2
; %bb.1:
	str	xzr, [x22]
LBB0_2:
	mov	x0, x20
	bl	_spin_unlock_irq
	ldr	x8, [x22]
	cbnz	x8, LBB0_7
; %bb.3:
	ldr	x8, [x21]
	ldr	w0, [x19]
	cbz	x8, LBB0_5
; %bb.4:
Lloh0:
	adrp	x8, _AC97_PCM_LR_ADC_RATE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AC97_PCM_LR_ADC_RATE@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh2:
	adrp	x8, _AC97_PCM_FRONT_DAC_RATE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AC97_PCM_FRONT_DAC_RATE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_snd_ac97_update_power
	ldr	w0, [x19]
Lloh5:
	adrp	x8, _AC97_PCM_SURR_DAC_RATE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AC97_PCM_SURR_DAC_RATE@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_snd_ac97_update_power
	ldr	w0, [x19]
Lloh8:
	adrp	x8, _AC97_PCM_LFE_DAC_RATE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AC97_PCM_LFE_DAC_RATE@GOTPAGEOFF]
LBB0_6:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_snd_ac97_update_power
LBB0_7:
	str	xzr, [x21, #8]
	mov	w0, #0
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.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_PCM_LR_ADC_RATE,4,2       ; @AC97_PCM_LR_ADC_RATE
	.no_dead_strip	_snd_via82xx_pcm_close
.subsections_via_symbols
