	.file	"extr_tg3.c_tg3_nvram_read_using_eeprom.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	tg3_nvram_read_using_eeprom, @function
tg3_nvram_read_using_eeprom:
.LFB0:
	.cfi_startproc
	endbr64
	cmp	DWORD PTR EEPROM_ADDR_ADDR_MASK[rip], esi
	jl	.L9
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	ebx, esi
	test	sil, 3
	je	.L3
	mov	eax, DWORD PTR EINVAL[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	neg	eax
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	mov	edi, DWORD PTR GRC_EEPROM_ADDR[rip]
	mov	r12, rdx
	mov	ebp, 1000
	call	tr32@PLT
	mov	ecx, DWORD PTR EEPROM_ADDR_ADDR_SHIFT[rip]
	mov	esi, ebx
	mov	edx, DWORD PTR EEPROM_ADDR_ADDR_MASK[rip]
	mov	edi, DWORD PTR EEPROM_ADDR_READ[rip]
	mov	ebx, DWORD PTR EEPROM_ADDR_START[rip]
	sal	esi, cl
	and	esi, edx
	or	edx, DWORD PTR EEPROM_ADDR_DEVID_MASK[rip]
	or	ebx, edi
	or	edx, edi
	or	esi, ebx
	mov	edi, DWORD PTR GRC_EEPROM_ADDR[rip]
	not	edx
	and	edx, eax
	or	esi, edx
	call	tw32@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L14:
	mov	edi, 1
	call	msleep@PLT
	sub	ebp, 1
	je	.L13
.L6:
	mov	edi, DWORD PTR GRC_EEPROM_ADDR[rip]
	call	tr32@PLT
	mov	ebx, eax
	test	DWORD PTR EEPROM_ADDR_COMPLETE[rip], eax
	je	.L14
.L5:
	mov	edi, DWORD PTR GRC_EEPROM_DATA[rip]
	call	tr32@PLT
	mov	edi, eax
	call	swab32@PLT
	mov	DWORD PTR [r12], eax
	xor	eax, eax
	pop	rbx
	.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 3
	.cfi_restore 6
	.cfi_restore 12
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	.cfi_offset 6, -24
	.cfi_offset 12, -16
	test	DWORD PTR EEPROM_ADDR_COMPLETE[rip], ebx
	jne	.L5
	mov	eax, DWORD PTR EBUSY[rip]
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	neg	eax
	ret
	.cfi_endproc
.LFE0:
	.size	tg3_nvram_read_using_eeprom, .-tg3_nvram_read_using_eeprom
	.comm	GRC_EEPROM_DATA,4,4
	.comm	GRC_EEPROM_ADDR,4,4
	.comm	EINVAL,4,4
	.comm	EEPROM_ADDR_START,4,4
	.comm	EEPROM_ADDR_READ,4,4
	.comm	EEPROM_ADDR_DEVID_SHIFT,4,4
	.comm	EEPROM_ADDR_DEVID_MASK,4,4
	.comm	EEPROM_ADDR_COMPLETE,4,4
	.comm	EEPROM_ADDR_ADDR_SHIFT,4,4
	.comm	EEPROM_ADDR_ADDR_MASK,4,4
	.comm	EBUSY,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_tg3.c_tg3_nvram_read_using_eeprom.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	tg3_nvram_read_using_eeprom, %function
tg3_nvram_read_using_eeprom:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r7, .L12
	ldr	r3, [r7]
	cmp	r3, r1
	blt	.L2
	tst	r1, #3
	mov	r4, r1
	beq	.L3
.L2:
	ldr	r3, .L12+4
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L3:
	ldr	r6, .L12+8
	mov	r8, r2
	ldr	r0, [r6]
	bl	tr32
	ldr	ip, .L12+12
	ldr	r2, .L12+16
	ldr	r3, .L12+20
	ldr	lr, [ip]
	ldr	ip, [r2]
	ldr	r2, .L12+24
	ldr	r1, [r7]
	ldr	r3, [r3]
	ldr	r2, [r2]
	orr	r3, r1, r3
	and	r4, r1, r4, lsl lr
	orr	r2, ip, r2
	orr	r1, r3, ip
	orr	r4, r4, r2
	bic	r1, r0, r1
	orr	r1, r4, r1
	ldr	r0, [r6]
	mov	r5, #1000
	bl	tw32
	ldr	r7, .L12+28
	b	.L6
.L11:
	mov	r0, #1
	bl	msleep
	subs	r5, r5, #1
	beq	.L10
.L6:
	ldr	r0, [r6]
	bl	tr32
	ldr	r3, [r7]
	mov	r4, r0
	tst	r0, r3
	beq	.L11
.L5:
	ldr	r3, .L12+32
	ldr	r0, [r3]
	bl	tr32
	bl	swab32
	mov	r3, r0
	mov	r0, #0
	str	r3, [r8]
	pop	{r4, r5, r6, r7, r8, pc}
.L10:
	ldr	r3, [r7]
	tst	r4, r3
	bne	.L5
	ldr	r3, .L12+36
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L13:
	.align	2
.L12:
	.word	EEPROM_ADDR_ADDR_MASK
	.word	EINVAL
	.word	GRC_EEPROM_ADDR
	.word	EEPROM_ADDR_ADDR_SHIFT
	.word	EEPROM_ADDR_READ
	.word	EEPROM_ADDR_DEVID_MASK
	.word	EEPROM_ADDR_START
	.word	EEPROM_ADDR_COMPLETE
	.word	GRC_EEPROM_DATA
	.word	EBUSY
	.size	tg3_nvram_read_using_eeprom, .-tg3_nvram_read_using_eeprom
	.comm	GRC_EEPROM_DATA,4,4
	.comm	GRC_EEPROM_ADDR,4,4
	.comm	EINVAL,4,4
	.comm	EEPROM_ADDR_START,4,4
	.comm	EEPROM_ADDR_READ,4,4
	.comm	EEPROM_ADDR_DEVID_SHIFT,4,4
	.comm	EEPROM_ADDR_DEVID_MASK,4,4
	.comm	EEPROM_ADDR_COMPLETE,4,4
	.comm	EEPROM_ADDR_ADDR_SHIFT,4,4
	.comm	EEPROM_ADDR_ADDR_MASK,4,4
	.comm	EBUSY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
