	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vpdma_list_cleanup             ## -- Begin function vpdma_list_cleanup
	.p2align	4, 0x90
_vpdma_list_cleanup:                    ## @vpdma_list_cleanup
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r13d
	movq	%rdx, %r14
	movl	%esi, %r15d
	movq	_VPDMA_LIST_ATTR@GOTPCREL(%rip), %rax
	movq	_VPDMA_LIST_NUM_SHFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	%esi, %edx
	shll	%cl, %edx
	movl	(%rax), %esi
	movq	_VPDMA_LIST_STOP_SHFT@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	btsl	%eax, %edx
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_write_reg
	xorl	%r12d, %r12d
	testq	%r14, %r14
	je	LBB0_14
## %bb.1:
	testl	%r13d, %r13d
	jle	LBB0_14
## %bb.2:
	leal	(,%r13,4), %esi
	movq	_VPDMA_LIST_TYPE_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-48(%rbp), %rdi
	callq	_vpdma_create_desc_list
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_14
## %bb.3:
	movl	%r13d, %r13d
	xorl	%ebx, %ebx
	leaq	-48(%rbp), %r12
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14,%rbx,4), %esi
	movq	%r12, %rdi
	callq	_vpdma_add_abort_channel_ctd
	incq	%rbx
	cmpq	%rbx, %r13
	jne	LBB0_4
## %bb.5:
	leaq	-48(%rbp), %rsi
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_vpdma_map_desc_buf
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.6:
	leaq	-48(%rbp), %rsi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_vpdma_submit_descs
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.7:
	movl	$-500, %ebx                     ## imm = 0xFE0C
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_vpdma_list_busy
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	incl	%ebx
	jne	LBB0_8
	jmp	LBB0_11
LBB0_10:
	xorl	%r12d, %r12d
	testl	%ebx, %ebx
	jne	LBB0_12
LBB0_11:
	movq	(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_12:
	leaq	-48(%rbp), %rsi
	movq	%r14, %rdi
	callq	_vpdma_unmap_desc_buf
LBB0_13:
	leaq	-48(%rbp), %rdi
	callq	_vpdma_free_desc_buf
LBB0_14:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VPDMA_LIST_ATTR,4,2            ## @VPDMA_LIST_ATTR
	.comm	_VPDMA_LIST_NUM_SHFT,4,2        ## @VPDMA_LIST_NUM_SHFT
	.comm	_VPDMA_LIST_STOP_SHFT,4,2       ## @VPDMA_LIST_STOP_SHFT
	.comm	_VPDMA_LIST_TYPE_NORMAL,4,2     ## @VPDMA_LIST_TYPE_NORMAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Timed out cleaning up VPDMA list\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vpdma_list_cleanup             ; -- Begin function vpdma_list_cleanup
	.p2align	2
_vpdma_list_cleanup:                    ; @vpdma_list_cleanup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x3
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _VPDMA_LIST_ATTR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VPDMA_LIST_ATTR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _VPDMA_LIST_NUM_SHFT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VPDMA_LIST_NUM_SHFT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	w8, w20, w8
Lloh6:
	adrp	x9, _VPDMA_LIST_STOP_SHFT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _VPDMA_LIST_STOP_SHFT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	mov	w10, #1
	lsl	w9, w10, w9
	orr	w2, w9, w8
	bl	_write_reg
	mov	w23, #0
	cbz	x21, LBB0_15
; %bb.1:
	cmp	w22, #1
	b.lt	LBB0_15
; %bb.2:
	lsl	w1, w22, #2
Lloh9:
	adrp	x8, _VPDMA_LIST_TYPE_NORMAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _VPDMA_LIST_TYPE_NORMAL@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	add	x0, sp, #8
	bl	_vpdma_create_desc_list
	mov	x23, x0
	cbnz	w0, LBB0_15
; %bb.3:
	mov	w22, w22
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x21], #4
	add	x0, sp, #8
	bl	_vpdma_add_abort_channel_ctd
	subs	x22, x22, #1
	b.ne	LBB0_4
; %bb.5:
	add	x1, sp, #8
	mov	x0, x19
	bl	_vpdma_map_desc_buf
	mov	x23, x0
	cbnz	w0, LBB0_14
; %bb.6:
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, x20
	bl	_vpdma_submit_descs
	mov	x23, x0
	cbnz	w0, LBB0_13
; %bb.7:
	mov	w21, #-500
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_vpdma_list_busy
	cbz	x0, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	adds	w21, w21, #1
	b.lo	LBB0_8
	b	LBB0_12
LBB0_10:
	cbz	w21, LBB0_12
; %bb.11:
	mov	w23, #0
	b	LBB0_13
LBB0_12:
	ldr	x0, [x19]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh14:
	adrp	x8, _EBUSY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_13:
	add	x1, sp, #8
	mov	x0, x19
	bl	_vpdma_unmap_desc_buf
LBB0_14:
	add	x0, sp, #8
	bl	_vpdma_free_desc_buf
LBB0_15:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_VPDMA_LIST_ATTR,4,2            ; @VPDMA_LIST_ATTR
	.comm	_VPDMA_LIST_NUM_SHFT,4,2        ; @VPDMA_LIST_NUM_SHFT
	.comm	_VPDMA_LIST_STOP_SHFT,4,2       ; @VPDMA_LIST_STOP_SHFT
	.comm	_VPDMA_LIST_TYPE_NORMAL,4,2     ; @VPDMA_LIST_TYPE_NORMAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Timed out cleaning up VPDMA list\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
.subsections_via_symbols
