	.file	"extr_mtk_eth_soc.c_fe_open.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	fe_open, @function
fe_open:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	netdev_priv@PLT
	mov	rdi, rax
	mov	rbp, rax
	call	fe_init_dma@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L20
	lea	r14, 32[rbp]
	xor	esi, esi
	mov	rdi, r14
	call	spin_lock_irqsave@PLT
	mov	edi, DWORD PTR FE_TX_WB_DDONE[rip]
	mov	eax, DWORD PTR 0[rbp]
	or	edi, DWORD PTR FE_RX_DMA_EN[rip]
	or	edi, DWORD PTR FE_TX_DMA_EN[rip]
	test	DWORD PTR FE_FLAG_RX_2B_OFFSET[rip], eax
	je	.L4
	or	edi, DWORD PTR FE_RX_2B_OFFSET[rip]
.L4:
	mov	rax, QWORD PTR 8[rbp]
	mov	esi, DWORD PTR FE_REG_PDMA_GLO_CFG[rip]
	or	edi, DWORD PTR [rax]
	call	fe_reg_w32@PLT
	xor	esi, esi
	mov	rdi, r14
	call	spin_unlock_irqrestore@PLT
	mov	rax, QWORD PTR 24[rbp]
	test	rax, rax
	je	.L5
	mov	rdi, rbp
	call	[QWORD PTR [rax]]
.L5:
	mov	rax, QWORD PTR 8[rbp]
	mov	rax, QWORD PTR 16[rax]
	test	rax, rax
	je	.L7
	mov	rdi, rbp
	call	rax
	test	rax, rax
	jne	.L21
.L7:
	lea	rdi, 16[rbp]
	call	napi_enable@PLT
	mov	rax, QWORD PTR 8[rbp]
	mov	edi, DWORD PTR 4[rax]
	or	edi, DWORD PTR 8[rax]
	call	fe_int_enable@PLT
	mov	rdi, r13
	call	netif_start_queue@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L20:
	.cfi_restore_state
	mov	rdi, rbp
	call	fe_free_dma@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L21:
	.cfi_restore_state
	mov	rdi, r13
	call	netif_carrier_on@PLT
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	fe_open, .-fe_open
	.comm	FE_TX_WB_DDONE,4,4
	.comm	FE_TX_DMA_EN,4,4
	.comm	FE_RX_DMA_EN,4,4
	.comm	FE_RX_2B_OFFSET,4,4
	.comm	FE_REG_PDMA_GLO_CFG,4,4
	.comm	FE_FLAG_RX_2B_OFFSET,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_mtk_eth_soc.c_fe_open.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	fe_open, %function
fe_open:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, r0
	bl	netdev_priv
	mov	r4, r0
	bl	fe_init_dma
	subs	r5, r0, #0
	bne	.L20
	add	r7, r4, #16
	mov	r1, #0
	mov	r0, r7
	bl	spin_lock_irqsave
	ldr	r3, .L22
	ldr	r1, .L22+4
	ldr	r3, [r3]
	ldr	r1, [r1]
	ldr	r2, .L22+8
	orr	r3, r3, r1
	ldr	r2, [r2]
	ldr	r1, [r4]
	ldr	r0, .L22+12
	tst	r1, r2
	ldrne	r2, .L22+16
	ldr	r0, [r0]
	ldrne	r2, [r2]
	ldr	r1, [r4, #4]
	orr	r3, r3, r0
	orrne	r3, r3, r2
	ldr	r0, [r1]
	ldr	r2, .L22+20
	orr	r0, r3, r0
	ldr	r1, [r2]
	bl	fe_reg_w32
	mov	r0, r7
	mov	r1, #0
	bl	spin_unlock_irqrestore
	ldr	r3, [r4, #12]
	cmp	r3, #0
	beq	.L5
	mov	r0, r4
	ldr	r3, [r3]
	blx	r3
.L5:
	ldr	r3, [r4, #4]
	ldr	r3, [r3, #12]
	cmp	r3, #0
	beq	.L7
	mov	r0, r4
	blx	r3
	cmp	r0, #0
	bne	.L21
.L7:
	add	r0, r4, #8
	bl	napi_enable
	ldr	r3, [r4, #4]
	ldmib	r3, {r0, r3}
	orr	r0, r0, r3
	bl	fe_int_enable
	mov	r0, r6
	bl	netif_start_queue
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L20:
	mov	r0, r4
	bl	fe_free_dma
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L21:
	mov	r0, r6
	bl	netif_carrier_on
	b	.L7
.L23:
	.align	2
.L22:
	.word	FE_TX_WB_DDONE
	.word	FE_RX_DMA_EN
	.word	FE_FLAG_RX_2B_OFFSET
	.word	FE_TX_DMA_EN
	.word	FE_RX_2B_OFFSET
	.word	FE_REG_PDMA_GLO_CFG
	.size	fe_open, .-fe_open
	.comm	FE_TX_WB_DDONE,4,4
	.comm	FE_TX_DMA_EN,4,4
	.comm	FE_RX_DMA_EN,4,4
	.comm	FE_RX_2B_OFFSET,4,4
	.comm	FE_REG_PDMA_GLO_CFG,4,4
	.comm	FE_FLAG_RX_2B_OFFSET,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
