	.file	"extr_niu.c_niu_reset_rx_xmac.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Port %u RX XMAC would not reset, XRXMAC_SW_RST[%llx]\n"
	.text
	.p2align 4
	.type	niu_reset_rx_xmac, @function
niu_reset_rx_xmac:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	ebx, 1000
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	edi, DWORD PTR XRXMAC_SW_RST[rip]
	mov	esi, DWORD PTR XRXMAC_SW_RST_REG_RS[rip]
	or	esi, DWORD PTR XRXMAC_SW_RST_SOFT_RST[rip]
	call	nw64_mac@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L12:
	mov	edi, 100
	call	udelay@PLT
	sub	ebx, 1
	je	.L11
.L3:
	mov	edi, DWORD PTR XRXMAC_SW_RST[rip]
	call	nr64_mac@PLT
	mov	r8d, eax
	mov	eax, DWORD PTR XRXMAC_SW_RST_REG_RS[rip]
	or	eax, DWORD PTR XRXMAC_SW_RST_SOFT_RST[rip]
	and	eax, r8d
	jne	.L12
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
.L11:
	.cfi_restore_state
	mov	edi, DWORD PTR XRXMAC_SW_RST[rip]
	call	nr64_mac@PLT
	mov	edi, DWORD PTR 4[rbp]
	mov	edx, DWORD PTR 0[rbp]
	lea	rsi, .LC0[rip]
	movsx	rcx, eax
	call	dev_err@PLT
	mov	eax, DWORD PTR ENODEV[rip]
	add	rsp, 8
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	neg	eax
	ret
	.cfi_endproc
.LFE0:
	.size	niu_reset_rx_xmac, .-niu_reset_rx_xmac
	.comm	XRXMAC_SW_RST_SOFT_RST,4,4
	.comm	XRXMAC_SW_RST_REG_RS,4,4
	.comm	XRXMAC_SW_RST,4,4
	.comm	ENODEV,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_niu.c_niu_reset_rx_xmac.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Port %u RX XMAC would not reset, XRXMAC_SW_RST[%llx"
	.ascii	"]\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	niu_reset_rx_xmac, %function
niu_reset_rx_xmac:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r7, .L13
	ldr	r6, .L13+4
	ldr	r1, [r7]
	ldr	r3, [r6]
	ldr	r5, .L13+8
	mov	r8, r0
	sub	sp, sp, #8
	ldr	r0, [r5]
	orr	r1, r1, r3
	bl	nw64_mac
	mov	r4, #1000
	b	.L3
.L12:
	mov	r0, #100
	bl	udelay
	subs	r4, r4, #1
	beq	.L11
.L3:
	ldr	r0, [r5]
	bl	nr64_mac
	ldr	r3, [r7]
	ldr	r2, [r6]
	orr	r3, r3, r2
	ands	r0, r3, r0
	bne	.L12
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L11:
	ldr	r0, [r5]
	ldr	r6, [r8, #4]
	ldr	r7, [r8]
	bl	nr64_mac
	mov	r4, r0
	asr	r5, r0, #31
	mov	r2, r7
	mov	r0, r6
	stm	sp, {r4-r5}
	ldr	r1, .L13+12
	bl	dev_err
	ldr	r3, .L13+16
	ldr	r3, [r3]
	rsb	r0, r3, #0
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L14:
	.align	2
.L13:
	.word	XRXMAC_SW_RST_REG_RS
	.word	XRXMAC_SW_RST_SOFT_RST
	.word	XRXMAC_SW_RST
	.word	.LC0
	.word	ENODEV
	.size	niu_reset_rx_xmac, .-niu_reset_rx_xmac
	.comm	XRXMAC_SW_RST_SOFT_RST,4,4
	.comm	XRXMAC_SW_RST_REG_RS,4,4
	.comm	XRXMAC_SW_RST,4,4
	.comm	ENODEV,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
