	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___sdma_txclean                 ## -- Begin function __sdma_txclean
	.p2align	4, 0x90
___sdma_txclean:                        ## @__sdma_txclean
	.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	%rsi, %r12
	cmpq	$0, (%rsi)
	je	LBB0_5
## %bb.1:
	movq	%rdi, %r14
	movq	%r12, %rdi
	callq	_ahg_mode
	movl	%eax, %r15d
	movq	16(%r12), %rsi
	movq	%r14, %rdi
	callq	_sdma_unmap_desc
	movq	_SDMA_AHG_APPLY_UPDATE1@GOTPCREL(%rip), %rax
	movl	%r15d, %ecx
	sarl	%ecx
	incl	%ecx
	cmpl	(%rax), %r15d
	movl	$1, %eax
	cmovgl	%ecx, %eax
	movslq	%eax, %r15
	cmpq	%r15, (%r12)
	jbe	LBB0_4
## %bb.2:
	leaq	(,%r15,4), %rbx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r12), %rsi
	addq	%rbx, %rsi
	movq	%r14, %rdi
	callq	_sdma_unmap_desc
	incq	%r15
	addq	$4, %rbx
	cmpq	(%r12), %r15
	jb	LBB0_3
LBB0_4:
	movq	$0, (%r12)
LBB0_5:
	movq	32(%r12), %rdi
	callq	_kfree
	movq	$0, 32(%r12)
	movq	8(%r12), %rbx
	movl	24(%r12), %edi
	callq	_ARRAY_SIZE
	xorl	%edi, %edi
	cmpq	%rax, %rbx
	setg	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movl	24(%r12), %edi
	callq	_ARRAY_SIZE
	movq	%rax, 8(%r12)
	movq	16(%r12), %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SDMA_AHG_APPLY_UPDATE1,4,2     ## @SDMA_AHG_APPLY_UPDATE1
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___sdma_txclean                 ; -- Begin function __sdma_txclean
	.p2align	2
___sdma_txclean:                        ; @__sdma_txclean
	.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, x1
	ldr	x8, [x1]
	cbz	x8, LBB0_5
; %bb.1:
	mov	x20, x0
	mov	x0, x19
	bl	_ahg_mode
	mov	x21, x0
	ldr	x1, [x19, #16]
	mov	x0, x20
	bl	_sdma_unmap_desc
Lloh0:
	adrp	x8, _SDMA_AHG_APPLY_UPDATE1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SDMA_AHG_APPLY_UPDATE1@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	asr	w9, w21, #1
	cmp	w21, w8
	mov	w8, #1
	csinc	w8, w8, w9, le
	sxtw	x21, w8
	ldr	x8, [x19]
	cmp	x8, x21
	b.ls	LBB0_4
; %bb.2:
	lsl	x22, x21, #2
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	add	x1, x8, x22
	mov	x0, x20
	bl	_sdma_unmap_desc
	add	x21, x21, #1
	ldr	x8, [x19]
	add	x22, x22, #4
	cmp	x21, x8
	b.lo	LBB0_3
LBB0_4:
	str	xzr, [x19]
LBB0_5:
	ldr	x0, [x19, #32]
	bl	_kfree
	str	xzr, [x19, #32]
	ldr	x20, [x19, #8]
	ldr	w0, [x19, #24]
	bl	_ARRAY_SIZE
	cmp	x20, x0
	cset	w0, gt
	bl	_unlikely
	cbz	x0, LBB0_7
; %bb.6:
	ldr	w0, [x19, #24]
	bl	_ARRAY_SIZE
	str	x0, [x19, #8]
	ldr	x0, [x19, #16]
	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	_kfree
LBB0_7:
	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	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SDMA_AHG_APPLY_UPDATE1,4,2     ; @SDMA_AHG_APPLY_UPDATE1
.subsections_via_symbols
