	.file	"extr_aq_nic.c_aq_nic_ndev_register.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	aq_nic_ndev_register
	.type	aq_nic_ndev_register, @function
aq_nic_ndev_register:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12d, DWORD PTR EINVAL[rip]
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	neg	r12d
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	cmp	QWORD PTR 8[rdi], 0
	je	.L1
	lea	rsi, 32[rdi]
	mov	rbx, rdi
	mov	edi, DWORD PTR 28[rdi]
	call	hw_atl_utils_initfw@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L9
.L3:
.L1:
	mov	eax, r12d
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	lea	rbp, 24[rbx]
	mov	rdi, rbp
	call	mutex_lock@PLT
	mov	rdx, QWORD PTR 8[rbx]
	mov	rax, QWORD PTR 32[rbx]
	mov	edi, DWORD PTR 28[rbx]
	mov	esi, DWORD PTR [rdx]
	call	[QWORD PTR [rax]]
	mov	rdi, rbp
	mov	r12d, eax
	call	mutex_unlock@PLT
	test	r12d, r12d
	jne	.L1
	mov	QWORD PTR [rbx], 0
	xor	ebp, ebp
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rdi, rbx
	call	aq_nic_get_cfg@PLT
	mov	rsi, QWORD PTR [rbx]
	mov	rdi, rbx
	mov	rdx, rax
	mov	rax, QWORD PTR 16[rbx]
	lea	rbp, [rax+rsi*4]
	call	aq_vec_alloc@PLT
	mov	DWORD PTR 0[rbp], eax
	mov	rbp, QWORD PTR [rbx]
	mov	rax, QWORD PTR 16[rbx]
	mov	eax, DWORD PTR [rax+rbp*4]
	test	eax, eax
	je	.L10
	add	rbp, 1
	mov	QWORD PTR [rbx], rbp
.L4:
	mov	rdi, rbx
	call	aq_nic_get_cfg@PLT
	cmp	QWORD PTR [rax], rbp
	ja	.L6
	mov	rdi, QWORD PTR 8[rbx]
	call	netif_carrier_off@PLT
	mov	rdi, QWORD PTR 8[rbx]
	call	netif_tx_disable@PLT
	mov	rdi, QWORD PTR 8[rbx]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	register_netdev@PLT
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	r12d, DWORD PTR ENOMEM[rip]
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	neg	r12d
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	aq_nic_ndev_register, .-aq_nic_ndev_register
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.comm	AQ_CFG_MAC_ADDR_PERMANENT,8,8
	.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_aq_nic.c_aq_nic_ndev_register.c"
	.text
	.align	2
	.global	aq_nic_ndev_register
	.syntax unified
	.arm
	.fpu softvfp
	.type	aq_nic_ndev_register, %function
aq_nic_ndev_register:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r0, #4]
	push	{r4, r5, r6, r7, r8, lr}
	cmp	r3, #0
	beq	.L9
	add	r1, r0, #20
	mov	r4, r0
	ldr	r0, [r0, #16]
	bl	hw_atl_utils_initfw
	subs	r5, r0, #0
	beq	.L10
.L3:
.L1:
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L10:
	add	r6, r4, #12
	mov	r0, r6
	bl	mutex_lock
	ldr	r2, [r4, #4]
	ldr	r3, [r4, #20]
	ldr	r1, [r2]
	ldr	r3, [r3]
	ldr	r0, [r4, #16]
	blx	r3
	mov	r5, r0
	mov	r0, r6
	bl	mutex_unlock
	cmp	r5, #0
	beq	.L5
	b	.L1
.L6:
	mov	r0, r4
	ldr	r5, [r4]
	bl	aq_nic_get_cfg
	mov	r1, r5
	mov	r2, r0
	mov	r0, r4
	ldr	r7, [r4]
	ldr	r6, [r4, #8]
	bl	aq_vec_alloc
	ldr	r5, [r4]
	ldr	r3, [r4, #8]
	str	r0, [r6, r7, lsl #2]
	ldr	r3, [r3, r5, lsl #2]
	add	r5, r5, #1
	cmp	r3, #0
	beq	.L11
.L5:
	mov	r0, r4
	str	r5, [r4]
	bl	aq_nic_get_cfg
	ldr	r3, [r0]
	cmp	r3, r5
	bhi	.L6
	ldr	r0, [r4, #4]
	bl	netif_carrier_off
	ldr	r0, [r4, #4]
	bl	netif_tx_disable
	ldr	r0, [r4, #4]
	pop	{r4, r5, r6, r7, r8, lr}
	b	register_netdev
.L9:
	ldr	r3, .L12
	ldr	r5, [r3]
	rsb	r5, r5, #0
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L11:
	ldr	r3, .L12+4
	ldr	r5, [r3]
	rsb	r5, r5, #0
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L13:
	.align	2
.L12:
	.word	EINVAL
	.word	ENOMEM
	.size	aq_nic_ndev_register, .-aq_nic_ndev_register
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.comm	AQ_CFG_MAC_ADDR_PERMANENT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
