	.file	"extr_sni_ave.c_ave_open.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ave_open, @function
ave_open:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	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
	call	netdev_priv@PLT
	mov	ecx, DWORD PTR 4[rbp]
	mov	edx, DWORD PTR IRQF_SHARED[rip]
	mov	r8, rbp
	mov	edi, DWORD PTR 4[rax]
	mov	esi, DWORD PTR ave_irq_handler[rip]
	mov	rbx, rax
	call	request_irq@PLT
	mov	r13d, eax
	test	eax, eax
	je	.L16
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	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
.L16:
	.cfi_restore_state
	mov	edi, DWORD PTR 56[rbx]
	mov	edx, DWORD PTR GFP_KERNEL[rip]
	mov	esi, 1
	call	kcalloc@PLT
	mov	QWORD PTR 80[rbx], rax
	test	rax, rax
	je	.L14
	mov	edi, DWORD PTR 24[rbx]
	mov	edx, DWORD PTR GFP_KERNEL[rip]
	mov	esi, 1
	call	kcalloc@PLT
	mov	QWORD PTR 48[rbx], rax
	test	rax, rax
	je	.L17
	mov	eax, DWORD PTR 56[rbx]
	mov	QWORD PTR 72[rbx], 0
	mov	QWORD PTR 64[rbx], 0
	test	eax, eax
	jle	.L6
	xor	r12d, r12d
	.p2align 4,,10
	.p2align 3
.L7:
	mov	esi, DWORD PTR AVE_DESCID_TX[rip]
	mov	edx, r12d
	xor	ecx, ecx
	mov	rdi, rbp
	call	ave_desc_write_cmdsts@PLT
	mov	esi, DWORD PTR AVE_DESCID_TX[rip]
	mov	edx, r12d
	xor	ecx, ecx
	mov	rdi, rbp
	add	r12d, 1
	call	ave_desc_write_addr@PLT
	mov	eax, DWORD PTR 56[rbx]
	cmp	eax, r12d
	jg	.L7
.L6:
	imul	eax, DWORD PTR [rbx]
	mov	rsi, QWORD PTR AVE_TXDC[rip]
	add	rsi, QWORD PTR 16[rbx]
	mov	edi, eax
	sal	edi, 16
	and	edi, DWORD PTR AVE_TXDC_SIZE[rip]
	or	edi, DWORD PTR AVE_TXDC_ADDR_START[rip]
	call	writel@PLT
	mov	eax, DWORD PTR 24[rbx]
	mov	QWORD PTR 40[rbx], 0
	mov	QWORD PTR 32[rbx], 0
	test	eax, eax
	jle	.L8
	xor	r12d, r12d
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L9:
	mov	eax, DWORD PTR 24[rbx]
	add	r12d, 1
	cmp	eax, r12d
	jle	.L8
.L10:
	mov	esi, r12d
	mov	rdi, rbp
	call	ave_rxdesc_prepare@PLT
	test	rax, rax
	je	.L9
	mov	eax, DWORD PTR 24[rbx]
.L8:
	imul	eax, DWORD PTR [rbx]
	mov	rsi, QWORD PTR AVE_RXDC0[rip]
	add	rsi, QWORD PTR 16[rbx]
	mov	edi, eax
	sal	edi, 16
	and	edi, DWORD PTR AVE_RXDC0_SIZE[rip]
	or	edi, DWORD PTR AVE_RXDC0_ADDR_START[rip]
	call	writel@PLT
	mov	esi, DWORD PTR AVE_DESC_START[rip]
	mov	rdi, rbp
	call	ave_desc_switch@PLT
	mov	rdi, rbp
	call	ave_pfsel_init@PLT
	mov	rdi, rbp
	call	ave_macaddr_init@PLT
	mov	edi, DWORD PTR AVE_RXCR_RXEN[rip]
	mov	eax, DWORD PTR AVE_MAX_ETHFRAME[rip]
	or	edi, DWORD PTR AVE_RXCR_FDUPEN[rip]
	and	eax, DWORD PTR AVE_RXCR_MPSIZ_MASK[rip]
	or	edi, DWORD PTR AVE_RXCR_DRPEN[rip]
	or	edi, DWORD PTR AVE_RXCR_FLOCTR[rip]
	or	edi, eax
	mov	rsi, QWORD PTR AVE_RXCR[rip]
	add	rsi, QWORD PTR 16[rbx]
	call	writel@PLT
	mov	edi, DWORD PTR AVE_TXCR_FLOCTR[rip]
	mov	rsi, QWORD PTR AVE_TXCR[rip]
	add	rsi, QWORD PTR 16[rbx]
	call	writel@PLT
	mov	rdi, QWORD PTR AVE_IIRQC[rip]
	add	rdi, QWORD PTR 16[rbx]
	call	readl@PLT
	mov	edi, DWORD PTR AVE_INTM_COUNT[rip]
	and	eax, DWORD PTR AVE_IIRQC_BSCK[rip]
	mov	rsi, QWORD PTR AVE_IIRQC[rip]
	add	rsi, QWORD PTR 16[rbx]
	sal	edi, 16
	or	edi, DWORD PTR AVE_IIRQC_EN0[rip]
	or	edi, eax
	call	writel@PLT
	mov	rdi, rbp
	mov	esi, DWORD PTR AVE_GI_RXIINT[rip]
	or	esi, DWORD PTR AVE_GI_RXOVF[rip]
	or	esi, DWORD PTR AVE_GI_TX[rip]
	or	esi, DWORD PTR AVE_GI_RXDROP[rip]
	call	ave_irq_restore@PLT
	lea	rdi, 12[rbx]
	call	napi_enable@PLT
	lea	rdi, 8[rbx]
	call	napi_enable@PLT
	mov	edi, DWORD PTR 0[rbp]
	call	phy_start@PLT
	mov	edi, DWORD PTR 0[rbp]
	call	phy_start_aneg@PLT
	mov	rdi, rbp
	call	netif_start_queue@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	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
.L17:
	.cfi_restore_state
	mov	rdi, QWORD PTR 80[rbx]
	call	kfree@PLT
.L14:
.L4:
	endbr64
	mov	edi, DWORD PTR 4[rbx]
	mov	r13d, DWORD PTR ENOMEM[rip]
	call	disable_irq@PLT
	mov	edi, DWORD PTR 4[rbx]
	mov	rsi, rbp
	neg	r13d
	call	free_irq@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	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	ave_open, .-ave_open
	.comm	ave_irq_handler,4,4
	.comm	IRQF_SHARED,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	AVE_TXDC_SIZE,4,4
	.comm	AVE_TXDC_ADDR_START,4,4
	.comm	AVE_TXDC,8,8
	.comm	AVE_TXCR_FLOCTR,4,4
	.comm	AVE_TXCR,8,8
	.comm	AVE_RXDC0_SIZE,4,4
	.comm	AVE_RXDC0_ADDR_START,4,4
	.comm	AVE_RXDC0,8,8
	.comm	AVE_RXCR_RXEN,4,4
	.comm	AVE_RXCR_MPSIZ_MASK,4,4
	.comm	AVE_RXCR_FLOCTR,4,4
	.comm	AVE_RXCR_FDUPEN,4,4
	.comm	AVE_RXCR_DRPEN,4,4
	.comm	AVE_RXCR,8,8
	.comm	AVE_MAX_ETHFRAME,4,4
	.comm	AVE_INTM_COUNT,4,4
	.comm	AVE_IIRQC_EN0,4,4
	.comm	AVE_IIRQC_BSCK,4,4
	.comm	AVE_IIRQC,8,8
	.comm	AVE_GI_TX,4,4
	.comm	AVE_GI_RXOVF,4,4
	.comm	AVE_GI_RXIINT,4,4
	.comm	AVE_GI_RXDROP,4,4
	.comm	AVE_DESC_START,4,4
	.comm	AVE_DESCID_TX,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_sni_ave.c_ave_open.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ave_open, %function
ave_open:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	sub	sp, sp, #8
	mov	r5, r0
	bl	netdev_priv
	ldr	r2, .L18
	ldr	r1, .L18+4
	mov	r4, r0
	ldr	r0, [r0, #4]
	str	r5, [sp]
	ldr	r3, [r5, #4]
	ldr	r2, [r2]
	ldr	r1, [r1]
	bl	request_irq
	subs	r7, r0, #0
	beq	.L16
	mov	r0, r7
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L16:
	ldr	r6, .L18+8
	mov	r1, #1
	ldr	r2, [r6]
	ldr	r0, [r4, #36]
	bl	kcalloc
	cmp	r0, #0
	str	r0, [r4, #48]
	beq	.L14
	mov	r1, #1
	ldr	r2, [r6]
	ldr	r0, [r4, #20]
	bl	kcalloc
	cmp	r0, #0
	str	r0, [r4, #32]
	beq	.L17
	ldr	r0, [r4, #36]
	str	r7, [r4, #44]
	cmp	r0, #0
	str	r7, [r4, #40]
	ble	.L6
	mov	r6, r7
	ldr	r8, .L18+12
.L7:
	mov	r2, r6
	mov	r3, #0
	ldr	r1, [r8]
	mov	r0, r5
	bl	ave_desc_write_cmdsts
	mov	r2, r6
	mov	r3, #0
	mov	r0, r5
	ldr	r1, [r8]
	bl	ave_desc_write_addr
	ldr	r0, [r4, #36]
	add	r6, r6, #1
	cmp	r0, r6
	bgt	.L7
.L6:
	mov	r6, #0
	ldr	r2, [r4]
	ldr	r3, .L18+16
	mul	r0, r2, r0
	ldr	r1, .L18+20
	ldr	r2, .L18+24
	ldr	r3, [r3]
	ldr	ip, [r1]
	ldr	r2, [r2]
	ldr	r1, [r4, #16]
	and	r0, r3, r0, lsl #16
	orr	r0, r0, ip
	add	r1, r1, r2
	bl	writel
	ldr	r3, [r4, #20]
	str	r6, [r4, #28]
	cmp	r3, r6
	str	r6, [r4, #24]
	bgt	.L10
	b	.L8
.L9:
	cmp	r3, r6
	ble	.L8
.L10:
	mov	r1, r6
	mov	r0, r5
	bl	ave_rxdesc_prepare
	cmp	r0, #0
	ldr	r3, [r4, #20]
	add	r6, r6, #1
	beq	.L9
.L8:
	ldr	r0, [r4]
	ldr	r2, .L18+28
	mul	r3, r0, r3
	ldr	r1, .L18+32
	ldr	r0, .L18+36
	ldr	r2, [r2]
	ldr	ip, [r4, #16]
	ldr	r0, [r0]
	ldr	r1, [r1]
	and	r3, r2, r3, lsl #16
	add	r1, ip, r1
	orr	r0, r3, r0
	bl	writel
	ldr	r3, .L18+40
	mov	r0, r5
	ldr	r1, [r3]
	bl	ave_desc_switch
	mov	r0, r5
	bl	ave_pfsel_init
	mov	r0, r5
	bl	ave_macaddr_init
	ldr	r1, .L18+44
	ldr	r3, .L18+48
	ldr	r2, .L18+52
	ldr	ip, [r1]
	ldr	r3, [r3]
	ldr	r2, [r2]
	ldr	r1, .L18+56
	orr	r3, r3, ip
	ldr	r0, .L18+60
	ldr	ip, .L18+64
	ldr	r1, [r1]
	orr	r3, r3, r2
	ldr	r2, .L18+68
	ldr	ip, [ip]
	ldr	r0, [r0]
	orr	r3, r3, r1
	ldr	r2, [r2]
	ldr	r1, [r4, #16]
	and	r0, r0, ip
	add	r1, r1, r2
	orr	r0, r3, r0
	bl	writel
	ldr	r3, .L18+72
	ldr	r1, [r4, #16]
	ldr	r2, [r3]
	ldr	r3, .L18+76
	ldr	r6, .L18+80
	add	r1, r1, r2
	ldr	r0, [r3]
	bl	writel
	ldr	r3, [r6]
	ldr	r0, [r4, #16]
	add	r0, r0, r3
	bl	readl
	ldr	r1, .L18+84
	ldr	r2, .L18+88
	ldr	r3, .L18+92
	ldr	lr, [r1]
	ldr	ip, [r2]
	ldr	r3, [r3]
	ldr	r2, [r6]
	ldr	r1, [r4, #16]
	orr	r3, r3, ip, lsl #16
	and	r0, r0, lr
	add	r1, r1, r2
	orr	r0, r3, r0
	bl	writel
	ldr	r3, .L18+96
	ldr	r1, .L18+100
	ldr	r2, .L18+104
	ldr	r1, [r1]
	ldr	r3, [r3]
	ldr	r0, .L18+108
	ldr	r2, [r2]
	orr	r3, r3, r1
	ldr	r1, [r0]
	orr	r3, r3, r2
	orr	r1, r3, r1
	mov	r0, r5
	bl	ave_irq_restore
	add	r0, r4, #12
	bl	napi_enable
	add	r0, r4, #8
	bl	napi_enable
	ldr	r0, [r5]
	bl	phy_start
	ldr	r0, [r5]
	bl	phy_start_aneg
	mov	r0, r5
	bl	netif_start_queue
	mov	r0, r7
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L17:
	ldr	r0, [r4, #48]
	bl	kfree
.L14:
.L4:
	ldr	r3, .L18+112
	ldr	r0, [r4, #4]
	ldr	r7, [r3]
	bl	disable_irq
	rsb	r7, r7, #0
	mov	r1, r5
	ldr	r0, [r4, #4]
	bl	free_irq
	mov	r0, r7
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L19:
	.align	2
.L18:
	.word	IRQF_SHARED
	.word	ave_irq_handler
	.word	GFP_KERNEL
	.word	AVE_DESCID_TX
	.word	AVE_TXDC_SIZE
	.word	AVE_TXDC_ADDR_START
	.word	AVE_TXDC
	.word	AVE_RXDC0_SIZE
	.word	AVE_RXDC0
	.word	AVE_RXDC0_ADDR_START
	.word	AVE_DESC_START
	.word	AVE_RXCR_FDUPEN
	.word	AVE_RXCR_RXEN
	.word	AVE_RXCR_DRPEN
	.word	AVE_RXCR_FLOCTR
	.word	AVE_MAX_ETHFRAME
	.word	AVE_RXCR_MPSIZ_MASK
	.word	AVE_RXCR
	.word	AVE_TXCR
	.word	AVE_TXCR_FLOCTR
	.word	AVE_IIRQC
	.word	AVE_IIRQC_BSCK
	.word	AVE_INTM_COUNT
	.word	AVE_IIRQC_EN0
	.word	AVE_GI_RXIINT
	.word	AVE_GI_RXOVF
	.word	AVE_GI_TX
	.word	AVE_GI_RXDROP
	.word	ENOMEM
	.size	ave_open, .-ave_open
	.comm	ave_irq_handler,4,4
	.comm	IRQF_SHARED,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	AVE_TXDC_SIZE,4,4
	.comm	AVE_TXDC_ADDR_START,4,4
	.comm	AVE_TXDC,4,4
	.comm	AVE_TXCR_FLOCTR,4,4
	.comm	AVE_TXCR,4,4
	.comm	AVE_RXDC0_SIZE,4,4
	.comm	AVE_RXDC0_ADDR_START,4,4
	.comm	AVE_RXDC0,4,4
	.comm	AVE_RXCR_RXEN,4,4
	.comm	AVE_RXCR_MPSIZ_MASK,4,4
	.comm	AVE_RXCR_FLOCTR,4,4
	.comm	AVE_RXCR_FDUPEN,4,4
	.comm	AVE_RXCR_DRPEN,4,4
	.comm	AVE_RXCR,4,4
	.comm	AVE_MAX_ETHFRAME,4,4
	.comm	AVE_INTM_COUNT,4,4
	.comm	AVE_IIRQC_EN0,4,4
	.comm	AVE_IIRQC_BSCK,4,4
	.comm	AVE_IIRQC,4,4
	.comm	AVE_GI_TX,4,4
	.comm	AVE_GI_RXOVF,4,4
	.comm	AVE_GI_RXIINT,4,4
	.comm	AVE_GI_RXDROP,4,4
	.comm	AVE_DESC_START,4,4
	.comm	AVE_DESCID_TX,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
