	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ag71xx_check_dma_stuck
_ag71xx_check_dma_stuck:                ## @ag71xx_check_dma_stuck
	.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, %rbx
	movl	(%rdi), %edi
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_netdev_get_tx_queue
	movq	_jiffies@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	_HZ@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	imulq	$1717986919, %rcx, %rcx         ## imm = 0x66666667
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$34, %rcx
	addl	%edx, %ecx
	movslq	%ecx, %rsi
	addq	(%rax), %rsi
	callq	_time_before
	movl	%eax, %edi
	callq	_likely
	testq	%rax, %rax
	je	LBB0_1
LBB0_6:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	(%rbx), %edi
	callq	_netif_carrier_ok
	testl	%eax, %eax
	je	LBB0_6
## %bb.2:
	movq	_AG71XX_REG_RX_SM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ag71xx_rr
	movl	%eax, %r15d
	andl	$119, %eax
	movl	$1, %r14d
	cmpl	$99, %eax
	je	LBB0_6
## %bb.3:
	movl	%r15d, %r13d
	andl	$7, %r13d
	movq	_AG71XX_REG_TX_SM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ag71xx_rr
	movl	%eax, %r12d
	movq	_AG71XX_REG_FIFO_DEPTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ag71xx_rr
	andl	$112, %r12d
	orl	%r13d, %r12d
	jne	LBB0_5
## %bb.4:
	andl	$112, %r15d
	orl	%eax, %r15d
	je	LBB0_6
LBB0_5:
	xorl	%r14d, %r14d
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,4,2                    ## @jiffies
	.comm	_HZ,4,2                         ## @HZ
	.comm	_AG71XX_REG_RX_SM,4,2           ## @AG71XX_REG_RX_SM
	.comm	_AG71XX_REG_TX_SM,4,2           ## @AG71XX_REG_TX_SM
	.comm	_AG71XX_REG_FIFO_DEPTH,4,2      ## @AG71XX_REG_FIFO_DEPTH
	.no_dead_strip	_ag71xx_check_dma_stuck
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ag71xx_check_dma_stuck
_ag71xx_check_dma_stuck:                ; @ag71xx_check_dma_stuck
	.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	w0, [x0]
	mov	w1, #0
	bl	_netdev_get_tx_queue
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _jiffies@GOTPAGE
Lloh1:
	ldr	x9, [x9, _jiffies@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x9]
Lloh3:
	adrp	x9, _HZ@GOTPAGE
Lloh4:
	ldr	x9, [x9, _HZ@GOTPAGEOFF]
Lloh5:
	ldrsw	x9, [x9]
	mov	w10, #26215
	movk	w10, #26214, lsl #16
	mul	x9, x9, x10
	lsr	x10, x9, #63
	asr	x9, x9, #34
	add	w9, w9, w10
	add	x1, x8, w9, sxtw
	bl	_time_before
	bl	_likely
	mov	x8, x0
	mov	w0, #0
	cbz	x8, LBB0_2
LBB0_1:
	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_2:
	ldr	w0, [x19]
	bl	_netif_carrier_ok
	cbz	w0, LBB0_1
; %bb.3:
Lloh6:
	adrp	x8, _AG71XX_REG_RX_SM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AG71XX_REG_RX_SM@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ag71xx_rr
	mov	w8, #119
	and	w8, w0, w8
	cmp	w8, #99
	b.eq	LBB0_6
; %bb.4:
	mov	x20, x0
	and	w22, w0, #0x70
Lloh9:
	adrp	x8, _AG71XX_REG_TX_SM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AG71XX_REG_TX_SM@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ag71xx_rr
	mov	x21, x0
Lloh12:
	adrp	x8, _AG71XX_REG_FIFO_DEPTH@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AG71XX_REG_FIFO_DEPTH@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ag71xx_rr
	and	w8, w21, #0x70
	bfxil	w8, w20, #0, #3
	cmp	w8, #0
	orr	w8, w22, w0
	ccmp	w8, #0, #0, eq
	b.eq	LBB0_6
; %bb.5:
	mov	w0, #0
	b	LBB0_1
LBB0_6:
	mov	w0, #1
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,4,2                    ; @jiffies
	.comm	_HZ,4,2                         ; @HZ
	.comm	_AG71XX_REG_RX_SM,4,2           ; @AG71XX_REG_RX_SM
	.comm	_AG71XX_REG_TX_SM,4,2           ; @AG71XX_REG_TX_SM
	.comm	_AG71XX_REG_FIFO_DEPTH,4,2      ; @AG71XX_REG_FIFO_DEPTH
	.no_dead_strip	_ag71xx_check_dma_stuck
.subsections_via_symbols
