	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pt3_stop_dma                   ## -- Begin function pt3_stop_dma
	.p2align	4, 0x90
_pt3_stop_dma:                          ## @pt3_stop_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %r15
	movl	(%rdi), %edi
	callq	_get_dma_base
	movl	%eax, %ebx
	movq	(%r15), %rax
	movl	(%rax), %edi
	addl	%ebx, %edi
	movq	_OFST_STATUS@GOTPCREL(%rip), %r12
	addl	(%r12), %edi
	callq	_ioread32
	xorl	%r14d, %r14d
	testb	$1, %al
	je	LBB0_7
## %bb.1:
	movq	(%r15), %rax
	movl	(%rax), %esi
	addl	%ebx, %esi
	movq	_OFST_DMA_CTL@GOTPCREL(%rip), %rax
	addl	(%rax), %esi
	movl	$2, %edi
	callq	_iowrite32
	movq	(%r15), %rax
	movl	(%rax), %edi
	addl	%ebx, %edi
	addl	(%r12), %edi
	callq	_ioread32
	testb	$1, %al
	je	LBB0_7
## %bb.2:
	movl	$50, %edi
	callq	_msleep
	movq	(%r15), %rax
	movl	(%rax), %edi
	addl	%ebx, %edi
	addl	(%r12), %edi
	callq	_ioread32
	testb	$1, %al
	je	LBB0_7
## %bb.3:
	movl	$50, %edi
	callq	_msleep
	movq	(%r15), %rax
	movl	(%rax), %edi
	addl	%ebx, %edi
	addl	(%r12), %edi
	callq	_ioread32
	testb	$1, %al
	je	LBB0_7
## %bb.4:
	movl	$50, %edi
	callq	_msleep
	movq	(%r15), %rax
	movl	(%rax), %edi
	addl	%ebx, %edi
	addl	(%r12), %edi
	callq	_ioread32
	testb	$1, %al
	je	LBB0_7
## %bb.5:
	movl	$50, %edi
	callq	_msleep
	movq	(%r15), %rax
	addl	(%rax), %ebx
	addl	(%r12), %ebx
	movl	%ebx, %edi
	callq	_ioread32
	testb	$1, %al
	je	LBB0_7
## %bb.6:
	movl	$50, %edi
	callq	_msleep
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_7:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OFST_STATUS,4,2                ## @OFST_STATUS
	.comm	_OFST_DMA_CTL,4,2               ## @OFST_DMA_CTL
	.comm	_EIO,4,2                        ## @EIO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pt3_stop_dma                   ; -- Begin function pt3_stop_dma
	.p2align	2
_pt3_stop_dma:                          ; @pt3_stop_dma
	.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
	ldr	x20, [x0, #8]
	ldr	w0, [x0]
	bl	_get_dma_base
	mov	x19, x0
	ldr	x8, [x20]
	ldr	w8, [x8]
Lloh0:
	adrp	x21, _OFST_STATUS@GOTPAGE
Lloh1:
	ldr	x21, [x21, _OFST_STATUS@GOTPAGEOFF]
	ldr	w9, [x21]
	add	w8, w8, w0
	add	w0, w8, w9
	bl	_ioread32
	tbz	w0, #0, LBB0_6
; %bb.1:
	ldr	x8, [x20]
	ldr	w8, [x8]
Lloh2:
	adrp	x9, _OFST_DMA_CTL@GOTPAGE
Lloh3:
	ldr	x9, [x9, _OFST_DMA_CTL@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	add	w8, w8, w19
	add	w1, w8, w9
	mov	w0, #2
	bl	_iowrite32
	ldr	x8, [x20]
	ldr	w8, [x8]
	ldr	w9, [x21]
	add	w8, w8, w19
	add	w0, w8, w9
	bl	_ioread32
	tbz	w0, #0, LBB0_6
; %bb.2:
	mov	w0, #50
	bl	_msleep
	ldr	x8, [x20]
	ldr	w8, [x8]
	ldr	w9, [x21]
	add	w8, w8, w19
	add	w0, w8, w9
	bl	_ioread32
	tbz	w0, #0, LBB0_6
; %bb.3:
	mov	w0, #50
	bl	_msleep
	ldr	x8, [x20]
	ldr	w8, [x8]
	ldr	w9, [x21]
	add	w8, w8, w19
	add	w0, w8, w9
	bl	_ioread32
	tbz	w0, #0, LBB0_6
; %bb.4:
	mov	w0, #50
	bl	_msleep
	ldr	x8, [x20]
	ldr	w8, [x8]
	ldr	w9, [x21]
	add	w8, w8, w19
	add	w0, w8, w9
	bl	_ioread32
	tbz	w0, #0, LBB0_6
; %bb.5:
	mov	w0, #50
	bl	_msleep
	ldr	x8, [x20]
	ldr	w8, [x8]
	ldr	w9, [x21]
	add	w8, w8, w19
	add	w0, w8, w9
	bl	_ioread32
	tbnz	w0, #0, LBB0_8
LBB0_6:
	mov	w0, #0
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
LBB0_8:
	mov	w0, #50
	bl	_msleep
Lloh5:
	adrp	x8, _EIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_OFST_STATUS,4,2                ; @OFST_STATUS
	.comm	_OFST_DMA_CTL,4,2               ; @OFST_DMA_CTL
	.comm	_EIO,4,2                        ; @EIO
.subsections_via_symbols
