	.file	"extr_qlge_main.c_ql_get_8012_flash_params.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Error reading flash.\n"
.LC1:
	.string	"8012"
.LC2:
	.string	"Invalid flash.\n"
	.text
	.p2align 4
	.type	ql_get_8012_flash_params, @function
ql_get_8012_flash_params:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	esi, DWORD PTR SEM_FLASH_MASK[rip]
	mov	r12, QWORD PTR 16[rdi]
	call	ql_sem_spinlock@PLT
	test	rax, rax
	je	.L2
	mov	r12d, DWORD PTR ETIMEDOUT[rip]
	add	rsp, 8
	.cfi_remember_state
	.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
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	xor	esi, esi
	test	r12, r12
	lea	rdx, 8[rbp]
	mov	rdi, rbp
	setne	sil
	call	ql_read_flash_word@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L12
	mov	rdx, QWORD PTR 0[rbp]
	mov	esi, DWORD PTR ifup[rip]
	lea	rcx, .LC0[rip]
	mov	rdi, rbp
	call	netif_err@PLT
.L4:
	mov	esi, DWORD PTR SEM_FLASH_MASK[rip]
	mov	rdi, rbp
	call	ql_sem_unlock@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	lea	rdx, .LC1[rip]
	mov	esi, 1
	mov	rdi, rbp
	call	ql_validate_flash@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L13
	mov	edi, DWORD PTR 8[rbp]
	call	is_valid_ether_addr@PLT
	test	eax, eax
	jne	.L6
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rax, QWORD PTR 0[rbp]
	mov	esi, DWORD PTR 8[rbp]
	mov	edi, DWORD PTR 4[rax]
	mov	edx, DWORD PTR [rax]
	call	memcpy@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L13:
	mov	rdx, QWORD PTR 0[rbp]
	mov	esi, DWORD PTR ifup[rip]
	lea	rcx, .LC2[rip]
	mov	rdi, rbp
	call	netif_err@PLT
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	ql_get_8012_flash_params, .-ql_get_8012_flash_params
	.comm	ifup,4,4
	.comm	SEM_FLASH_MASK,4,4
	.comm	ETIMEDOUT,4,4
	.comm	EINVAL,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_qlge_main.c_ql_get_8012_flash_params.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Error reading flash.\012\000"
	.align	2
.LC1:
	.ascii	"8012\000"
	.align	2
.LC2:
	.ascii	"Invalid flash.\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ql_get_8012_flash_params, %function
ql_get_8012_flash_params:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r6, .L14
	mov	r4, r0
	ldr	r1, [r6]
	ldr	r5, [r0, #8]
	bl	ql_sem_spinlock
	cmp	r0, #0
	beq	.L2
	ldr	r3, .L14+4
	ldr	r5, [r3]
	rsb	r5, r5, #0
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L2:
	subs	r1, r5, #0
	movne	r1, #1
	mov	r0, r4
	add	r2, r4, #4
	bl	ql_read_flash_word
	subs	r5, r0, #0
	beq	.L12
	ldr	r2, .L14+8
	mov	r0, r4
	ldr	r1, [r2]
	ldr	r3, .L14+12
	ldr	r2, [r4]
	bl	netif_err
.L4:
	mov	r0, r4
	ldr	r1, [r6]
	bl	ql_sem_unlock
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L12:
	mov	r1, #1
	mov	r0, r4
	ldr	r2, .L14+16
	bl	ql_validate_flash
	subs	r5, r0, #0
	bne	.L13
	ldr	r0, [r4, #4]
	bl	is_valid_ether_addr
	cmp	r0, #0
	ldreq	r3, .L14+20
	ldreq	r5, [r3]
	rsbeq	r5, r5, #0
	beq	.L4
.L6:
	ldr	r3, [r4]
	ldr	r1, [r4, #4]
	ldr	r2, [r3]
	ldr	r0, [r3, #4]
	bl	memcpy
	b	.L4
.L13:
	ldr	r2, .L14+8
	ldr	r3, .L14+24
	ldr	r1, [r2]
	mov	r0, r4
	ldr	r2, [r4]
	bl	netif_err
	ldr	r3, .L14+20
	ldr	r5, [r3]
	rsb	r5, r5, #0
	b	.L4
.L15:
	.align	2
.L14:
	.word	SEM_FLASH_MASK
	.word	ETIMEDOUT
	.word	ifup
	.word	.LC0
	.word	.LC1
	.word	EINVAL
	.word	.LC2
	.size	ql_get_8012_flash_params, .-ql_get_8012_flash_params
	.comm	ifup,4,4
	.comm	SEM_FLASH_MASK,4,4
	.comm	ETIMEDOUT,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
