	.file	"extr_e1000_nvm.c_e1000_ready_nvm_eeprom.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"e1000_ready_nvm_eeprom"
.LC1:
	.string	"SPI NVM Status error\n"
	.text
	.p2align 4
	.type	e1000_ready_nvm_eeprom, @function
e1000_ready_nvm_eeprom:
.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	r12d, eax
	call	DEBUGFUNC@PLT
	mov	rax, QWORD PTR 0[rbp]
	cmp	rax, QWORD PTR e1000_nvm_eeprom_microwire[rip]
	je	.L17
	cmp	rax, QWORD PTR e1000_nvm_eeprom_spi[rip]
	je	.L18
.L3:
	mov	eax, DWORD PTR E1000_SUCCESS[rip]
.L1:
	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
.L17:
	.cfi_restore_state
	mov	edx, DWORD PTR E1000_EECD_DI[rip]
	or	edx, DWORD PTR E1000_EECD_SK[rip]
	mov	rdi, rbp
	not	edx
	mov	esi, DWORD PTR E1000_EECD[rip]
	and	r12d, edx
	mov	edx, r12d
	call	E1000_WRITE_REG@PLT
	mov	edx, DWORD PTR E1000_EECD_CS[rip]
	mov	esi, DWORD PTR E1000_EECD[rip]
	mov	rdi, rbp
	or	edx, r12d
	call	E1000_WRITE_REG@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L18:
	mov	edx, DWORD PTR E1000_EECD_CS[rip]
	or	edx, DWORD PTR E1000_EECD_SK[rip]
	mov	rdi, rbp
	mov	esi, DWORD PTR E1000_EECD[rip]
	not	edx
	mov	rbx, QWORD PTR NVM_MAX_RETRY_SPI[rip]
	and	edx, r12d
	call	E1000_WRITE_REG@PLT
	mov	rdi, rbp
	call	E1000_WRITE_FLUSH@PLT
	mov	edi, 1
	call	usec_delay@PLT
	test	rbx, rbx
	je	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	mov	esi, DWORD PTR NVM_RDSR_OPCODE_SPI[rip]
	mov	edx, DWORD PTR 8[rbp]
	mov	rdi, rbp
	call	e1000_shift_out_eec_bits@PLT
	mov	esi, 8
	mov	rdi, rbp
	call	e1000_shift_in_eec_bits@PLT
	test	DWORD PTR NVM_STATUS_RDY_SPI[rip], eax
	je	.L3
	mov	edi, 5
	call	usec_delay@PLT
	mov	rdi, rbp
	call	e1000_standby_nvm@PLT
	sub	rbx, 1
	jne	.L6
.L5:
	lea	rdi, .LC1[rip]
	call	DEBUGOUT@PLT
	mov	eax, DWORD PTR E1000_ERR_NVM[rip]
	neg	eax
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	e1000_ready_nvm_eeprom, .-e1000_ready_nvm_eeprom
	.comm	e1000_nvm_eeprom_spi,8,8
	.comm	e1000_nvm_eeprom_microwire,8,8
	.comm	NVM_STATUS_RDY_SPI,4,4
	.comm	NVM_RDSR_OPCODE_SPI,4,4
	.comm	NVM_MAX_RETRY_SPI,8,8
	.comm	E1000_SUCCESS,4,4
	.comm	E1000_ERR_NVM,4,4
	.comm	E1000_EECD_SK,4,4
	.comm	E1000_EECD_DI,4,4
	.comm	E1000_EECD_CS,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_ready_nvm_eeprom.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"e1000_ready_nvm_eeprom\000"
	.align	2
.LC1:
	.ascii	"SPI NVM Status error\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	e1000_ready_nvm_eeprom, %function
e1000_ready_nvm_eeprom:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r6, .L19
	mov	r4, r0
	ldr	r1, [r6]
	bl	E1000_READ_REG
	mov	r5, r0
	ldr	r0, .L19+4
	bl	DEBUGFUNC
	ldr	r1, .L19+8
	ldr	r3, [r4]
	ldr	r1, [r1]
	cmp	r3, r1
	beq	.L17
	ldr	r2, .L19+12
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L18
.L3:
	ldr	r3, .L19+16
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, pc}
.L17:
	ldr	r2, .L19+20
	ldr	r3, .L19+24
	ldr	r2, [r2]
	ldr	r3, [r3]
	ldr	r1, [r6]
	orr	r2, r2, r3
	bic	r5, r5, r2
	mov	r2, r5
	mov	r0, r4
	bl	E1000_WRITE_REG
	ldr	r3, .L19+28
	mov	r0, r4
	ldr	r2, [r3]
	ldr	r1, [r6]
	orr	r2, r5, r2
	bl	E1000_WRITE_REG
	b	.L3
.L18:
	ldr	r3, .L19+24
	ldr	r2, .L19+28
	ldr	r1, [r3]
	ldr	r2, [r2]
	ldr	r3, .L19+32
	orr	r2, r2, r1
	bic	r2, r5, r2
	ldr	r1, [r6]
	mov	r0, r4
	ldr	r5, [r3]
	bl	E1000_WRITE_REG
	mov	r0, r4
	bl	E1000_WRITE_FLUSH
	mov	r0, #1
	bl	usec_delay
	cmp	r5, #0
	beq	.L5
	ldr	r7, .L19+36
	ldr	r6, .L19+40
.L6:
	ldr	r2, [r4, #4]
	ldr	r1, [r7]
	mov	r0, r4
	bl	e1000_shift_out_eec_bits
	mov	r1, #8
	mov	r0, r4
	bl	e1000_shift_in_eec_bits
	ldr	r3, [r6]
	tst	r0, r3
	beq	.L3
	mov	r0, #5
	bl	usec_delay
	mov	r0, r4
	bl	e1000_standby_nvm
	subs	r5, r5, #1
	bne	.L6
.L5:
	ldr	r0, .L19+44
	bl	DEBUGOUT
	ldr	r3, .L19+48
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L20:
	.align	2
.L19:
	.word	E1000_EECD
	.word	.LC0
	.word	e1000_nvm_eeprom_microwire
	.word	e1000_nvm_eeprom_spi
	.word	E1000_SUCCESS
	.word	E1000_EECD_DI
	.word	E1000_EECD_SK
	.word	E1000_EECD_CS
	.word	NVM_MAX_RETRY_SPI
	.word	NVM_RDSR_OPCODE_SPI
	.word	NVM_STATUS_RDY_SPI
	.word	.LC1
	.word	E1000_ERR_NVM
	.size	e1000_ready_nvm_eeprom, .-e1000_ready_nvm_eeprom
	.comm	e1000_nvm_eeprom_spi,4,4
	.comm	e1000_nvm_eeprom_microwire,4,4
	.comm	NVM_STATUS_RDY_SPI,4,4
	.comm	NVM_RDSR_OPCODE_SPI,4,4
	.comm	NVM_MAX_RETRY_SPI,4,4
	.comm	E1000_SUCCESS,4,4
	.comm	E1000_ERR_NVM,4,4
	.comm	E1000_EECD_SK,4,4
	.comm	E1000_EECD_DI,4,4
	.comm	E1000_EECD_CS,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
