	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mantis_dma_exit                ## -- Begin function mantis_dma_exit
	.p2align	4, 0x90
_mantis_dma_exit:                       ## @mantis_dma_exit
	.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	%rdi, %rbx
	movq	24(%rdi), %r8
	testq	%r8, %r8
	je	LBB0_2
## %bb.1:
	movq	_MANTIS_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	32(%rbx), %rcx
	movq	_MANTIS_BUF_SIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %r9d
	leaq	L_.str(%rip), %rdx
	movl	$1, %esi
	callq	_dprintk
	movl	16(%rbx), %edi
	movl	(%r14), %esi
	movq	24(%rbx), %rdx
	movq	32(%rbx), %rcx
	callq	_pci_free_consistent
	movq	$0, 24(%rbx)
LBB0_2:
	movq	(%rbx), %r8
	testq	%r8, %r8
	je	LBB0_4
## %bb.3:
	movq	_MANTIS_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	8(%rbx), %rcx
	movq	_MANTIS_RISC_SIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %r9d
	leaq	L_.str.1(%rip), %rdx
	movl	$1, %esi
	callq	_dprintk
	movl	16(%rbx), %edi
	movl	(%r14), %esi
	movq	(%rbx), %rdx
	movq	8(%rbx), %rcx
	callq	_pci_free_consistent
	movq	$0, (%rbx)
LBB0_4:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MANTIS_ERROR,4,2               ## @MANTIS_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DMA=0x%lx cpu=0x%p size=%d"

	.comm	_MANTIS_BUF_SIZE,4,2            ## @MANTIS_BUF_SIZE
L_.str.1:                               ## @.str.1
	.asciz	"RISC=0x%lx cpu=0x%p size=%lx"

	.comm	_MANTIS_RISC_SIZE,4,2           ## @MANTIS_RISC_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mantis_dma_exit                ; -- Begin function mantis_dma_exit
	.p2align	2
_mantis_dma_exit:                       ; @mantis_dma_exit
	.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, x0
	ldr	x4, [x0, #24]
Lloh0:
	adrp	x20, _MANTIS_ERROR@GOTPAGE
Lloh1:
	ldr	x20, [x20, _MANTIS_ERROR@GOTPAGEOFF]
	cbz	x4, LBB0_2
; %bb.1:
	ldr	w0, [x20]
	ldr	x3, [x19, #32]
Lloh2:
	adrp	x21, _MANTIS_BUF_SIZE@GOTPAGE
Lloh3:
	ldr	x21, [x21, _MANTIS_BUF_SIZE@GOTPAGEOFF]
	ldr	w5, [x21]
Lloh4:
	adrp	x2, l_.str@PAGE
Lloh5:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #1
	bl	_dprintk
	ldr	w0, [x19, #16]
	ldr	w1, [x21]
	ldp	x2, x3, [x19, #24]
	bl	_pci_free_consistent
	str	xzr, [x19, #24]
LBB0_2:
	ldr	x4, [x19]
	cbz	x4, LBB0_4
; %bb.3:
	ldr	w0, [x20]
	ldr	x3, [x19, #8]
Lloh6:
	adrp	x20, _MANTIS_RISC_SIZE@GOTPAGE
Lloh7:
	ldr	x20, [x20, _MANTIS_RISC_SIZE@GOTPAGEOFF]
	ldr	w5, [x20]
Lloh8:
	adrp	x2, l_.str.1@PAGE
Lloh9:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	w1, #1
	bl	_dprintk
	ldr	w0, [x19, #16]
	ldr	w1, [x20]
	ldp	x2, x3, [x19]
	bl	_pci_free_consistent
	str	xzr, [x19]
LBB0_4:
	mov	w0, #0
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_MANTIS_ERROR,4,2               ; @MANTIS_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DMA=0x%lx cpu=0x%p size=%d"

	.comm	_MANTIS_BUF_SIZE,4,2            ; @MANTIS_BUF_SIZE
l_.str.1:                               ; @.str.1
	.asciz	"RISC=0x%lx cpu=0x%p size=%lx"

	.comm	_MANTIS_RISC_SIZE,4,2           ; @MANTIS_RISC_SIZE
.subsections_via_symbols
