	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_dbri_hw_free
_snd_dbri_hw_free:                      ## @snd_dbri_hw_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_snd_pcm_substream_chip
	movq	%rax, %r14
	movq	%rax, %rdi
	movq	%r15, %rsi
	callq	_DBRI_STREAM
	movq	%rax, %rbx
	movq	_D_USR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dprintk
	cmpq	$0, 8(%rbx)
	je	LBB0_5
## %bb.1:
	movq	%r15, %rdi
	callq	_DBRI_STREAMNO
	movq	_DBRI_PLAY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.3:
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %ecx
	movq	(%r14), %rdi
	movq	8(%rbx), %rsi
	movq	(%r15), %rax
	movl	(%rax), %edx
	callq	_dma_unmap_single
	movq	$0, 8(%rbx)
LBB0_5:
	movl	(%rbx), %esi
	cmpl	$-1, %esi
	je	LBB0_7
## %bb.6:
	movq	%r14, %rdi
	callq	_reset_pipe
	movl	$-1, (%rbx)
LBB0_7:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_snd_pcm_lib_free_pages         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_D_USR,4,2                      ## @D_USR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hw_free.\n"

	.comm	_DBRI_PLAY,8,3                  ## @DBRI_PLAY
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.no_dead_strip	_snd_dbri_hw_free
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_dbri_hw_free
_snd_dbri_hw_free:                      ; @snd_dbri_hw_free
	.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	x19, x0
	bl	_snd_pcm_substream_chip
	mov	x20, x0
	mov	x1, x19
	bl	_DBRI_STREAM
	mov	x21, x0
Lloh0:
	adrp	x8, _D_USR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _D_USR@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dprintk
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_DBRI_STREAMNO
Lloh5:
	adrp	x8, _DBRI_PLAY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DBRI_PLAY@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
Lloh8:
	adrp	x9, _DMA_TO_DEVICE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh10:
	adrp	x10, _DMA_FROM_DEVICE@GOTPAGE
Lloh11:
	ldr	x10, [x10, _DMA_FROM_DEVICE@GOTPAGEOFF]
	cmp	x0, x8
	csel	x8, x9, x10, eq
	ldr	w3, [x8]
	ldr	x0, [x20]
	ldr	x1, [x21, #8]
	ldr	x8, [x19]
	ldr	w2, [x8]
	bl	_dma_unmap_single
	str	xzr, [x21, #8]
LBB0_2:
	ldr	w1, [x21]
	cmn	w1, #1
	b.eq	LBB0_4
; %bb.3:
	mov	x0, x20
	bl	_reset_pipe
	mov	w8, #-1
	str	w8, [x21]
LBB0_4:
	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	_snd_pcm_lib_free_pages
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_D_USR,4,2                      ; @D_USR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hw_free.\n"

	.comm	_DBRI_PLAY,8,3                  ; @DBRI_PLAY
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.no_dead_strip	_snd_dbri_hw_free
.subsections_via_symbols
