	.file	"extr_3945.c_il3945_hw_nic_init.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Unable to initialize Rx queue\n"
	.text
	.p2align 4
	.globl	il3945_hw_nic_init
	.type	il3945_hw_nic_init, @function
il3945_hw_nic_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	lea	r14, 8[rdi]
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	xor	r13d, r13d
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	lea	r12, 4[rdi]
	mov	rsi, r13
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	mov	rdi, r12
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	spin_lock_irqsave@PLT
	mov	rdi, rbp
	call	il3945_apm_init@PLT
	mov	rsi, r13
	mov	rdi, r12
	call	spin_unlock_irqrestore@PLT
	mov	rdi, rbp
	call	il3945_set_pwr_vmain@PLT
	mov	rdi, rbp
	call	il3945_nic_config@PLT
	mov	eax, DWORD PTR 12[rbp]
	test	eax, eax
	jne	.L2
	mov	rdi, rbp
	call	il_rx_queue_alloc@PLT
	test	eax, eax
	jne	.L10
.L3:
	mov	rdi, rbp
	call	il3945_rx_replenish@PLT
	mov	rsi, r14
	mov	rdi, rbp
	call	il3945_rx_init@PLT
	mov	r12d, DWORD PTR 8[rbp]
	xor	edi, edi
	call	FH39_RCSR_WPTR@PLT
	mov	rdi, rbp
	and	r12d, -8
	mov	esi, eax
	mov	edx, r12d
	call	il_wr@PLT
	mov	rdi, rbp
	call	il3945_txq_ctx_reset@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L11
	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
.L11:
	.cfi_restore_state
	mov	edi, DWORD PTR S_INIT[rip]
	mov	rsi, rbp
	call	set_bit@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
.L2:
	.cfi_restore_state
	mov	rsi, r14
	mov	rdi, rbp
	call	il3945_rx_queue_reset@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L10:
	lea	rdi, .LC0[rip]
	call	IL_ERR@PLT
	mov	r12d, DWORD PTR ENOMEM[rip]
	add	rsp, 8
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	neg	r12d
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	il3945_hw_nic_init, .-il3945_hw_nic_init
	.comm	S_INIT,4,4
	.comm	ENOMEM,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_3945.c_il3945_hw_nic_init.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Unable to initialize Rx queue\012\000"
	.text
	.align	2
	.global	il3945_hw_nic_init
	.syntax unified
	.arm
	.fpu softvfp
	.type	il3945_hw_nic_init, %function
il3945_hw_nic_init:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r6, #0
	mov	r4, r0
	add	r5, r0, #4
	mov	r1, r6
	mov	r0, r5
	bl	spin_lock_irqsave
	mov	r0, r4
	bl	il3945_apm_init
	mov	r1, r6
	mov	r0, r5
	bl	spin_unlock_irqrestore
	mov	r0, r4
	bl	il3945_set_pwr_vmain
	mov	r0, r4
	bl	il3945_nic_config
	ldr	r3, [r4, #12]
	add	r5, r4, #8
	cmp	r3, r6
	bne	.L2
	mov	r0, r4
	bl	il_rx_queue_alloc
	cmp	r0, r6
	bne	.L10
.L3:
	mov	r0, r4
	bl	il3945_rx_replenish
	mov	r1, r5
	mov	r0, r4
	bl	il3945_rx_init
	mov	r0, #0
	bl	FH39_RCSR_WPTR
	ldr	r2, [r4, #8]
	mov	r1, r0
	bic	r2, r2, #7
	mov	r0, r4
	bl	il_wr
	mov	r0, r4
	bl	il3945_txq_ctx_reset
	subs	r5, r0, #0
	beq	.L11
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L11:
	ldr	r3, .L12
	mov	r1, r4
	ldr	r0, [r3]
	bl	set_bit
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L2:
	mov	r1, r5
	mov	r0, r4
	bl	il3945_rx_queue_reset
	b	.L3
.L10:
	ldr	r0, .L12+4
	bl	IL_ERR
	ldr	r3, .L12+8
	ldr	r0, [r3]
	rsb	r5, r0, #0
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L13:
	.align	2
.L12:
	.word	S_INIT
	.word	.LC0
	.word	ENOMEM
	.size	il3945_hw_nic_init, .-il3945_hw_nic_init
	.comm	S_INIT,4,4
	.comm	ENOMEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
