	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rsxx_complete_dma
_rsxx_complete_dma:                     ## @rsxx_complete_dma
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_DMA_SW_ERR@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	je	LBB0_2
## %bb.1:
	incl	12(%rbx)
LBB0_2:
	movq	_DMA_HW_FAULT@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	je	LBB0_4
## %bb.3:
	incl	8(%rbx)
LBB0_4:
	movq	_DMA_CANCELLED@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	je	LBB0_6
## %bb.5:
	incl	4(%rbx)
LBB0_6:
	movq	8(%r14), %rcx
	testq	%rcx, %rcx
	je	LBB0_8
## %bb.7:
	movl	(%rbx), %edi
	movl	(%r14), %esi
	xorl	%eax, %eax
	testl	%edx, %edx
	setne	%al
	movl	%eax, %edx
	callq	*%rcx
LBB0_8:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_rsxx_free_dma                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_SW_ERR,4,2                 ## @DMA_SW_ERR
	.comm	_DMA_HW_FAULT,4,2               ## @DMA_HW_FAULT
	.comm	_DMA_CANCELLED,4,2              ## @DMA_CANCELLED
	.no_dead_strip	_rsxx_complete_dma
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rsxx_complete_dma
_rsxx_complete_dma:                     ; @rsxx_complete_dma
	.cfi_startproc
; %bb.0:
	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, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _DMA_SW_ERR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_SW_ERR@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w2
	b.eq	LBB0_2
; %bb.1:
	ldr	w8, [x20, #12]
	add	w8, w8, #1
	str	w8, [x20, #12]
LBB0_2:
Lloh3:
	adrp	x8, _DMA_HW_FAULT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DMA_HW_FAULT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w2
	b.eq	LBB0_4
; %bb.3:
	ldr	w8, [x20, #8]
	add	w8, w8, #1
	str	w8, [x20, #8]
LBB0_4:
Lloh6:
	adrp	x8, _DMA_CANCELLED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DMA_CANCELLED@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w2
	b.eq	LBB0_6
; %bb.5:
	ldr	w8, [x20, #4]
	add	w8, w8, #1
	str	w8, [x20, #4]
LBB0_6:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_8
; %bb.7:
	ldr	w0, [x20]
	ldr	w1, [x19]
	cmp	w2, #0
	cset	w2, ne
	blr	x8
LBB0_8:
	mov	x0, x20
	mov	x1, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_rsxx_free_dma
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_SW_ERR,4,2                 ; @DMA_SW_ERR
	.comm	_DMA_HW_FAULT,4,2               ; @DMA_HW_FAULT
	.comm	_DMA_CANCELLED,4,2              ; @DMA_CANCELLED
	.no_dead_strip	_rsxx_complete_dma
.subsections_via_symbols
