	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_wss_free                   ## -- Begin function snd_wss_free
	.p2align	4, 0x90
_snd_wss_free:                          ## @snd_wss_free
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movl	48(%rdi), %edi
	callq	_release_and_free_resource
	movl	44(%rbx), %edi
	callq	_release_and_free_resource
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	js	LBB0_3
## %bb.1:
	callq	_disable_irq
	movq	_WSS_HWSHARE_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%rbx)
	jne	LBB0_3
## %bb.2:
	movq	(%rbx), %rdi
	movq	%rbx, %rsi
	callq	_free_irq
LBB0_3:
	movl	8(%rbx), %eax
	movq	_WSS_HWSHARE_DMA1@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_6
## %bb.4:
	movq	16(%rbx), %rdi
	testq	%rdi, %rdi
	js	LBB0_6
## %bb.5:
	callq	_snd_dma_disable
	movq	16(%rbx), %rdi
	callq	_free_dma
	movl	8(%rbx), %eax
LBB0_6:
	movq	_WSS_HWSHARE_DMA2@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_7
LBB0_10:
	movq	32(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_12
## %bb.11:
	movl	40(%rbx), %edi
	callq	_snd_device_free
LBB0_12:
	movq	%rbx, %rdi
	callq	_kfree
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_7:
	movq	24(%rbx), %rdi
	testq	%rdi, %rdi
	js	LBB0_10
## %bb.8:
	cmpq	16(%rbx), %rdi
	je	LBB0_10
## %bb.9:
	callq	_snd_dma_disable
	movq	24(%rbx), %rdi
	callq	_free_dma
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_WSS_HWSHARE_IRQ,4,2            ## @WSS_HWSHARE_IRQ
	.comm	_WSS_HWSHARE_DMA1,4,2           ## @WSS_HWSHARE_DMA1
	.comm	_WSS_HWSHARE_DMA2,4,2           ## @WSS_HWSHARE_DMA2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_wss_free                   ; -- Begin function snd_wss_free
	.p2align	2
_snd_wss_free:                          ; @snd_wss_free
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w0, [x0, #48]
	bl	_release_and_free_resource
	ldr	w0, [x19, #44]
	bl	_release_and_free_resource
	ldr	x0, [x19]
	tbnz	x0, #63, LBB0_3
; %bb.1:
	bl	_disable_irq
	ldr	w8, [x19, #8]
Lloh0:
	adrp	x9, _WSS_HWSHARE_IRQ@GOTPAGE
Lloh1:
	ldr	x9, [x9, _WSS_HWSHARE_IRQ@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_3
; %bb.2:
	ldr	x0, [x19]
	mov	x1, x19
	bl	_free_irq
LBB0_3:
	ldr	w8, [x19, #8]
Lloh3:
	adrp	x9, _WSS_HWSHARE_DMA1@GOTPAGE
Lloh4:
	ldr	x9, [x9, _WSS_HWSHARE_DMA1@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_6
; %bb.4:
	ldr	x0, [x19, #16]
	tbnz	x0, #63, LBB0_6
; %bb.5:
	bl	_snd_dma_disable
	ldr	x0, [x19, #16]
	bl	_free_dma
	ldr	w8, [x19, #8]
LBB0_6:
Lloh6:
	adrp	x9, _WSS_HWSHARE_DMA2@GOTPAGE
Lloh7:
	ldr	x9, [x9, _WSS_HWSHARE_DMA2@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
LBB0_7:
	ldr	x1, [x19, #32]
	cbz	x1, LBB0_9
; %bb.8:
	ldr	w0, [x19, #40]
	bl	_snd_device_free
LBB0_9:
	mov	x0, x19
	bl	_kfree
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_10:
	ldr	x0, [x19, #24]
	tbnz	x0, #63, LBB0_7
; %bb.11:
	ldr	x8, [x19, #16]
	cmp	x0, x8
	b.eq	LBB0_7
; %bb.12:
	bl	_snd_dma_disable
	ldr	x0, [x19, #24]
	bl	_free_dma
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_WSS_HWSHARE_IRQ,4,2            ; @WSS_HWSHARE_IRQ
	.comm	_WSS_HWSHARE_DMA1,4,2           ; @WSS_HWSHARE_DMA1
	.comm	_WSS_HWSHARE_DMA2,4,2           ; @WSS_HWSHARE_DMA2
.subsections_via_symbols
