	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ppc440spe_adma_clean_slot
_ppc440spe_adma_clean_slot:             ## @ppc440spe_adma_clean_slot
	.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	%rsi, %r14
	movq	%rdi, %r12
	addq	$32, %rdi
	callq	_async_tx_test_ack
	xorl	%ebx, %ebx
	testl	%eax, %eax
	je	LBB0_6
## %bb.1:
	leaq	8(%r12), %r15
	leaq	8(%r14), %rsi
	movq	%r15, %rdi
	callq	_list_is_last
	movl	$1, %ebx
	testq	%rax, %rax
	jne	LBB0_6
## %bb.2:
	movq	(%r12), %r13
	movq	%r14, %rdi
	callq	_ppc440spe_chan_get_current_descriptor
	cmpq	%rax, %r13
	je	LBB0_6
## %bb.3:
	movq	(%r14), %rax
	movq	(%rax), %rcx
	movq	_PPC440SPE_XOR_ID@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_5
## %bb.4:
	movq	24(%r12), %rcx
	movq	(%rcx), %rcx
	movq	_DMA_CDB_OPC_DCHECK128@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_6
LBB0_5:
	movl	8(%rax), %edi
	movq	(%r12), %rdx
	movl	16(%r12), %ecx
	movl	12(%r12), %r8d
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movq	%r15, %rdi
	callq	_list_del
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_ppc440spe_adma_free_slots
	xorl	%ebx, %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PPC440SPE_XOR_ID,8,3           ## @PPC440SPE_XOR_ID
	.comm	_DMA_CDB_OPC_DCHECK128,8,3      ## @DMA_CDB_OPC_DCHECK128
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\tfree slot %llx: %d stride: %d\n"

	.no_dead_strip	_ppc440spe_adma_clean_slot
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ppc440spe_adma_clean_slot
_ppc440spe_adma_clean_slot:             ; @ppc440spe_adma_clean_slot
	.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
	mov	x20, x0
	add	x0, x0, #32
	bl	_async_tx_test_ack
	cbz	w0, LBB0_4
; %bb.1:
	add	x21, x20, #8
	add	x1, x19, #8
	mov	x0, x21
	bl	_list_is_last
	cbnz	x0, LBB0_3
; %bb.2:
	ldr	x22, [x20]
	mov	x0, x19
	bl	_ppc440spe_chan_get_current_descriptor
	cmp	x22, x0
	b.ne	LBB0_5
LBB0_3:
	mov	w0, #1
LBB0_4:
	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
LBB0_5:
	ldr	x8, [x19]
	ldr	x9, [x8]
Lloh0:
	adrp	x10, _PPC440SPE_XOR_ID@GOTPAGE
Lloh1:
	ldr	x10, [x10, _PPC440SPE_XOR_ID@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x9, x10
	b.eq	LBB0_7
; %bb.6:
	ldr	x9, [x20, #24]
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _DMA_CDB_OPC_DCHECK128@GOTPAGE
Lloh4:
	ldr	x10, [x10, _DMA_CDB_OPC_DCHECK128@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x9, x10
	b.eq	LBB0_3
LBB0_7:
	ldr	w0, [x8, #8]
	ldr	x2, [x20]
	ldp	w4, w3, [x20, #12]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	mov	x0, x21
	bl	_list_del
	mov	x0, x20
	mov	x1, x19
	bl	_ppc440spe_adma_free_slots
	mov	w0, #0
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_PPC440SPE_XOR_ID,8,3           ; @PPC440SPE_XOR_ID
	.comm	_DMA_CDB_OPC_DCHECK128,8,3      ; @DMA_CDB_OPC_DCHECK128
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\tfree slot %llx: %d stride: %d\n"

	.no_dead_strip	_ppc440spe_adma_clean_slot
.subsections_via_symbols
