	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ag71xx_dma_wait_stop
_ag71xx_dma_wait_stop:                  ## @ag71xx_dma_wait_stop
	.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	%rdi, %r15
	movq	(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_AG71XX_DMA_RETRY@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_5
## %bb.1:
	xorl	%r13d, %r13d
	movq	_AG71XX_REG_TX_CTRL@GOTPCREL(%rip), %r14
	movq	_TX_CTRL_TXE@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	_AG71XX_DMA_DELAY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_mdelay
	movq	_AG71XX_REG_RX_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ag71xx_rr
	movl	%eax, %ebx
	movq	_RX_CTRL_RXE@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_ag71xx_rr
	andl	(%r12), %eax
	orl	%ebx, %eax
	je	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	incl	%r13d
	movq	_AG71XX_DMA_RETRY@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jl	LBB0_3
LBB0_5:
	movq	_hw@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rcx
	movq	%r15, %rdi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_netif_err                      ## TAILCALL
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AG71XX_DMA_RETRY,4,2           ## @AG71XX_DMA_RETRY
	.comm	_AG71XX_DMA_DELAY,4,2           ## @AG71XX_DMA_DELAY
	.comm	_AG71XX_REG_RX_CTRL,4,2         ## @AG71XX_REG_RX_CTRL
	.comm	_RX_CTRL_RXE,4,2                ## @RX_CTRL_RXE
	.comm	_AG71XX_REG_TX_CTRL,4,2         ## @AG71XX_REG_TX_CTRL
	.comm	_TX_CTRL_TXE,4,2                ## @TX_CTRL_TXE
	.comm	_hw,4,2                         ## @hw
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DMA stop operation timed out\n"

	.no_dead_strip	_ag71xx_dma_wait_stop
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ag71xx_dma_wait_stop
_ag71xx_dma_wait_stop:                  ; @ag71xx_dma_wait_stop
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x0
	ldr	x19, [x0]
Lloh0:
	adrp	x21, _AG71XX_DMA_RETRY@GOTPAGE
Lloh1:
	ldr	x21, [x21, _AG71XX_DMA_RETRY@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	w22, #0
Lloh2:
	adrp	x23, _AG71XX_DMA_DELAY@GOTPAGE
Lloh3:
	ldr	x23, [x23, _AG71XX_DMA_DELAY@GOTPAGEOFF]
Lloh4:
	adrp	x24, _AG71XX_REG_RX_CTRL@GOTPAGE
Lloh5:
	ldr	x24, [x24, _AG71XX_REG_RX_CTRL@GOTPAGEOFF]
Lloh6:
	adrp	x25, _RX_CTRL_RXE@GOTPAGE
Lloh7:
	ldr	x25, [x25, _RX_CTRL_RXE@GOTPAGEOFF]
Lloh8:
	adrp	x26, _AG71XX_REG_TX_CTRL@GOTPAGE
Lloh9:
	ldr	x26, [x26, _AG71XX_REG_TX_CTRL@GOTPAGEOFF]
Lloh10:
	adrp	x27, _TX_CTRL_TXE@GOTPAGE
Lloh11:
	ldr	x27, [x27, _TX_CTRL_TXE@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x23]
	bl	_mdelay
	ldr	w1, [x24]
	mov	x0, x20
	bl	_ag71xx_rr
	ldr	w8, [x25]
	and	w28, w8, w0
	ldr	w1, [x26]
	mov	x0, x20
	bl	_ag71xx_rr
	ldr	w8, [x27]
	and	w8, w8, w0
	orr	w8, w28, w8
	cbz	w8, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w22, w22, #1
	ldr	w8, [x21]
	cmp	w22, w8
	b.lt	LBB0_2
LBB0_4:
Lloh12:
	adrp	x8, _hw@GOTPAGE
Lloh13:
	ldr	x8, [x8, _hw@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x3, l_.str@PAGE
Lloh16:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_netif_err
LBB0_5:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_AG71XX_DMA_RETRY,4,2           ; @AG71XX_DMA_RETRY
	.comm	_AG71XX_DMA_DELAY,4,2           ; @AG71XX_DMA_DELAY
	.comm	_AG71XX_REG_RX_CTRL,4,2         ; @AG71XX_REG_RX_CTRL
	.comm	_RX_CTRL_RXE,4,2                ; @RX_CTRL_RXE
	.comm	_AG71XX_REG_TX_CTRL,4,2         ; @AG71XX_REG_TX_CTRL
	.comm	_TX_CTRL_TXE,4,2                ; @TX_CTRL_TXE
	.comm	_hw,4,2                         ; @hw
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DMA stop operation timed out\n"

	.no_dead_strip	_ag71xx_dma_wait_stop
.subsections_via_symbols
