	.file	"extr_ag71xx_main.c_ag71xx_check_dma_stuck.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ag71xx_check_dma_stuck, @function
ag71xx_check_dma_stuck:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	xor	esi, esi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	edi, DWORD PTR [rdi]
	call	netdev_get_tx_queue@PLT
	movsx	rsi, DWORD PTR HZ[rip]
	mov	edi, DWORD PTR jiffies[rip]
	mov	r8, rax
	mov	rax, rsi
	imul	rsi, rsi, 1717986919
	sar	eax, 31
	sar	rsi, 34
	sub	esi, eax
	movsx	rsi, esi
	add	rsi, QWORD PTR [r8]
	call	time_before@PLT
	mov	edi, eax
	call	likely@PLT
	test	rax, rax
	je	.L2
.L4:
	xor	eax, eax
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	edi, DWORD PTR 0[rbp]
	call	netif_carrier_ok@PLT
	test	eax, eax
	je	.L4
	mov	esi, DWORD PTR AG71XX_REG_RX_SM[rip]
	mov	rdi, rbp
	call	ag71xx_rr@PLT
	mov	r12d, eax
	and	eax, 7
	mov	r13d, r12d
	sar	r13d, 4
	and	r13d, 7
	cmp	eax, 3
	jne	.L6
	mov	eax, 1
	cmp	r13d, 6
	je	.L1
.L6:
	mov	esi, DWORD PTR AG71XX_REG_TX_SM[rip]
	mov	rdi, rbp
	call	ag71xx_rr@PLT
	mov	esi, DWORD PTR AG71XX_REG_FIFO_DEPTH[rip]
	mov	rdi, rbp
	mov	ebx, eax
	call	ag71xx_rr@PLT
	sar	ebx, 4
	or	ebx, r12d
	or	r13d, eax
	xor	eax, eax
	and	ebx, 7
	or	ebx, r13d
	sete	al
	add	rsp, 8
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	ag71xx_check_dma_stuck, .-ag71xx_check_dma_stuck
	.comm	jiffies,4,4
	.comm	HZ,4,4
	.comm	AG71XX_REG_TX_SM,4,4
	.comm	AG71XX_REG_RX_SM,4,4
	.comm	AG71XX_REG_FIFO_DEPTH,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_ag71xx_main.c_ag71xx_check_dma_stuck.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ag71xx_check_dma_stuck, %function
ag71xx_check_dma_stuck:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r1, #0
	mov	r4, r0
	ldr	r0, [r0]
	bl	netdev_get_tx_queue
	ldr	r3, .L13
	ldr	r2, .L13+4
	ldr	r3, [r3]
	ldr	r1, [r0]
	smull	r0, r2, r3, r2
	ldr	r0, .L13+8
	asr	r3, r3, #31
	rsb	r3, r3, r2, asr #2
	add	r1, r3, r1
	ldr	r0, [r0]
	bl	time_before
	bl	likely
	cmp	r0, #0
	beq	.L2
.L4:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	ldr	r0, [r4]
	bl	netif_carrier_ok
	cmp	r0, #0
	beq	.L4
	ldr	r3, .L13+12
	mov	r0, r4
	ldr	r1, [r3]
	bl	ag71xx_rr
	and	r3, r0, #7
	asr	r6, r0, #4
	cmp	r3, #3
	mov	r5, r0
	and	r6, r6, #7
	bne	.L6
	cmp	r6, #6
	beq	.L7
.L6:
	ldr	r3, .L13+16
	mov	r0, r4
	ldr	r1, [r3]
	bl	ag71xx_rr
	ldr	r3, .L13+20
	mov	r7, r0
	ldr	r1, [r3]
	mov	r0, r4
	bl	ag71xx_rr
	orr	r5, r5, r7, asr #4
	orr	r6, r0, r6
	and	r5, r5, #7
	orrs	r3, r5, r6
	moveq	r0, #1
	movne	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L7:
	mov	r0, #1
	pop	{r4, r5, r6, r7, r8, pc}
.L14:
	.align	2
.L13:
	.word	HZ
	.word	1717986919
	.word	jiffies
	.word	AG71XX_REG_RX_SM
	.word	AG71XX_REG_TX_SM
	.word	AG71XX_REG_FIFO_DEPTH
	.size	ag71xx_check_dma_stuck, .-ag71xx_check_dma_stuck
	.comm	jiffies,4,4
	.comm	HZ,4,4
	.comm	AG71XX_REG_TX_SM,4,4
	.comm	AG71XX_REG_RX_SM,4,4
	.comm	AG71XX_REG_FIFO_DEPTH,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
