	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function b43legacy_destroy_dmaring
_b43legacy_destroy_dmaring:             ## @b43legacy_destroy_dmaring
	.cfi_startproc
## %bb.0:
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	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
	movq	48(%rdi), %rax
	movl	(%rax), %edi
	movl	40(%rbx), %edx
	movl	32(%rbx), %ecx
	cmpq	$0, 24(%rbx)
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %r8
	cmoveq	%rax, %r8
	movl	16(%rbx), %eax
	movl	20(%rbx), %r9d
	movl	%eax, (%rsp)
	leaq	L_.str(%rip), %rsi
	callq	_b43legacydbg
	movq	%rbx, %rdi
	callq	_dmacontroller_cleanup
	movq	%rbx, %rdi
	callq	_free_all_descbuffers
	movq	%rbx, %rdi
	callq	_free_ringmemory
	movq	8(%rbx), %rdi
	callq	_kfree
	movq	(%rbx), %rdi
	callq	_kfree
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
LBB0_1:
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DMA-%u 0x%04X (%s) max used slots: %d/%d\n"

L_.str.1:                               ## @.str.1
	.asciz	"TX"

L_.str.2:                               ## @.str.2
	.asciz	"RX"

	.no_dead_strip	_b43legacy_destroy_dmaring
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function b43legacy_destroy_dmaring
_b43legacy_destroy_dmaring:             ; @b43legacy_destroy_dmaring
	.cfi_startproc
; %bb.0:
	cbz	x0, LBB0_2
; %bb.1:
	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	x8, [x0, #48]
	ldr	w0, [x8]
	ldr	w2, [x19, #40]
	ldr	w3, [x19, #32]
	ldr	x8, [x19, #24]
Lloh0:
	adrp	x9, l_.str.1@PAGE
Lloh1:
	add	x9, x9, l_.str.1@PAGEOFF
Lloh2:
	adrp	x10, l_.str.2@PAGE
Lloh3:
	add	x10, x10, l_.str.2@PAGEOFF
	cmp	x8, #0
	csel	x4, x10, x9, eq
	ldp	w6, w5, [x19, #16]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	bl	_b43legacydbg
	mov	x0, x19
	bl	_dmacontroller_cleanup
	mov	x0, x19
	bl	_free_all_descbuffers
	mov	x0, x19
	bl	_free_ringmemory
	ldr	x0, [x19, #8]
	bl	_kfree
	ldr	x0, [x19]
	bl	_kfree
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_kfree
LBB0_2:
	.cfi_def_cfa wsp, 0
	.cfi_same_value w30
	.cfi_same_value w29
	.cfi_same_value w19
	.cfi_same_value w20
	ret
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DMA-%u 0x%04X (%s) max used slots: %d/%d\n"

l_.str.1:                               ; @.str.1
	.asciz	"TX"

l_.str.2:                               ; @.str.2
	.asciz	"RX"

	.no_dead_strip	_b43legacy_destroy_dmaring
.subsections_via_symbols
