	.file	"extr_e1000_nvm.c_e1000_acquire_nvm_generic.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"e1000_acquire_nvm_generic"
.LC1:
	.string	"Could not acquire NVM grant\n"
	.text
	.p2align 4
	.globl	e1000_acquire_nvm_generic
	.type	e1000_acquire_nvm_generic, @function
e1000_acquire_nvm_generic:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	esi, DWORD PTR E1000_EECD[rip]
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	E1000_READ_REG@PLT
	lea	rdi, .LC0[rip]
	mov	rbx, QWORD PTR E1000_NVM_GRANT_ATTEMPTS[rip]
	mov	r12d, eax
	call	DEBUGFUNC@PLT
	mov	edx, DWORD PTR E1000_EECD_REQ[rip]
	mov	esi, DWORD PTR E1000_EECD[rip]
	mov	rdi, rbp
	or	edx, r12d
	call	E1000_WRITE_REG@PLT
	mov	esi, DWORD PTR E1000_EECD[rip]
	mov	rdi, rbp
	call	E1000_READ_REG@PLT
	test	rbx, rbx
	jne	.L5
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L12:
	mov	edi, 5
	call	usec_delay@PLT
	mov	esi, DWORD PTR E1000_EECD[rip]
	mov	rdi, rbp
	call	E1000_READ_REG@PLT
	sub	rbx, 1
	je	.L2
.L5:
	test	DWORD PTR E1000_EECD_GNT[rip], eax
	je	.L12
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rax, QWORD PTR E1000_SUCCESS[rip]
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	edx, DWORD PTR E1000_EECD_REQ[rip]
	mov	esi, DWORD PTR E1000_EECD[rip]
	mov	rdi, rbp
	not	edx
	and	edx, eax
	call	E1000_WRITE_REG@PLT
	lea	rdi, .LC1[rip]
	call	DEBUGOUT@PLT
	mov	rax, QWORD PTR E1000_ERR_NVM[rip]
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	neg	rax
	ret
	.cfi_endproc
.LFE0:
	.size	e1000_acquire_nvm_generic, .-e1000_acquire_nvm_generic
	.comm	E1000_SUCCESS,8,8
	.comm	E1000_NVM_GRANT_ATTEMPTS,8,8
	.comm	E1000_ERR_NVM,8,8
	.comm	E1000_EECD_REQ,4,4
	.comm	E1000_EECD_GNT,4,4
	.comm	E1000_EECD,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_e1000_nvm.c_e1000_acquire_nvm_generic.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"e1000_acquire_nvm_generic\000"
	.align	2
.LC1:
	.ascii	"Could not acquire NVM grant\012\000"
	.text
	.align	2
	.global	e1000_acquire_nvm_generic
	.syntax unified
	.arm
	.fpu softvfp
	.type	e1000_acquire_nvm_generic, %function
e1000_acquire_nvm_generic:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r6, .L12
	mov	r5, r0
	ldr	r1, [r6]
	bl	E1000_READ_REG
	mov	r8, r0
	ldr	r3, .L12+4
	ldr	r7, .L12+8
	ldr	r0, .L12+12
	ldr	r4, [r3]
	bl	DEBUGFUNC
	ldr	r2, [r7]
	ldr	r1, [r6]
	orr	r2, r8, r2
	mov	r0, r5
	bl	E1000_WRITE_REG
	mov	r0, r5
	ldr	r1, [r6]
	bl	E1000_READ_REG
	cmp	r4, #0
	beq	.L2
	ldr	r8, .L12+16
	ldr	r3, [r8]
	tst	r0, r3
	beq	.L4
	b	.L3
.L5:
	ldr	r3, [r8]
	tst	r0, r3
	bne	.L3
.L4:
	mov	r0, #5
	bl	usec_delay
	mov	r0, r5
	ldr	r1, [r6]
	bl	E1000_READ_REG
	subs	r4, r4, #1
	bne	.L5
.L2:
	ldr	r2, [r7]
	ldr	r1, [r6]
	bic	r2, r0, r2
	mov	r0, r5
	bl	E1000_WRITE_REG
	ldr	r0, .L12+20
	bl	DEBUGOUT
	ldr	r3, .L12+24
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L3:
	ldr	r3, .L12+28
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, pc}
.L13:
	.align	2
.L12:
	.word	E1000_EECD
	.word	E1000_NVM_GRANT_ATTEMPTS
	.word	E1000_EECD_REQ
	.word	.LC0
	.word	E1000_EECD_GNT
	.word	.LC1
	.word	E1000_ERR_NVM
	.word	E1000_SUCCESS
	.size	e1000_acquire_nvm_generic, .-e1000_acquire_nvm_generic
	.comm	E1000_SUCCESS,4,4
	.comm	E1000_NVM_GRANT_ATTEMPTS,4,4
	.comm	E1000_ERR_NVM,4,4
	.comm	E1000_EECD_REQ,4,4
	.comm	E1000_EECD_GNT,4,4
	.comm	E1000_EECD,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
