	.file	"extr_e1000_hw.c_e1000_init_eeprom_params.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	e1000_init_eeprom_params
	.type	e1000_init_eeprom_params, @function
e1000_init_eeprom_params:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	mov	rbx, rdi
	sub	rsp, 16
	.cfi_def_cfa_offset 32
	mov	edi, DWORD PTR EECD[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	er32@PLT
	mov	esi, DWORD PTR [rbx]
	mov	r8, QWORD PTR E1000_SUCCESS[rip]
	lea	edx, -128[rsi]
	cmp	edx, 12
	ja	.L2
	lea	rcx, .L4[rip]
	movsx	rdx, DWORD PTR [rcx+rdx*4]
	add	rdx, rcx
	notrack jmp	rdx
	.section	.rodata
	.align 4
	.align 4
.L4:
	.long	.L5-.L4
	.long	.L5-.L4
	.long	.L3-.L4
	.long	.L3-.L4
	.long	.L3-.L4
	.long	.L3-.L4
	.long	.L6-.L4
	.long	.L6-.L4
	.long	.L6-.L4
	.long	.L6-.L4
	.long	.L5-.L4
	.long	.L5-.L4
	.long	.L3-.L4
	.text
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rdx, QWORD PTR e1000_eeprom_microwire[rip]
	mov	DWORD PTR 20[rbx], 3
	mov	DWORD PTR 28[rbx], 50
	mov	rcx, QWORD PTR e1000_eeprom_spi[rip]
	mov	QWORD PTR 8[rbx], rdx
	test	DWORD PTR E1000_EECD_SIZE[rip], eax
	je	.L12
.L21:
	mov	DWORD PTR 16[rbx], 256
	mov	DWORD PTR 24[rbx], 8
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L5:
	mov	esi, DWORD PTR E1000_EECD_ADDR_BITS[rip]
	mov	rcx, QWORD PTR e1000_eeprom_spi[rip]
	and	esi, eax
	test	DWORD PTR E1000_EECD_TYPE[rip], eax
	je	.L9
	mov	QWORD PTR 8[rbx], rcx
	mov	DWORD PTR 20[rbx], 8
	mov	DWORD PTR 28[rbx], 1
	test	esi, esi
	je	.L10
	mov	DWORD PTR 32[rbx], 32
	mov	DWORD PTR 24[rbx], 16
.L11:
	mov	DWORD PTR 16[rbx], 64
	mov	esi, DWORD PTR EEPROM_CFG[rip]
	lea	rcx, 4[rsp]
	mov	rdi, rbx
	mov	edx, 1
	call	e1000_read_eeprom@PLT
	mov	r8, rax
	test	rax, rax
	jne	.L1
	mov	ecx, DWORD PTR 4[rsp]
	mov	eax, DWORD PTR EEPROM_SIZE_MASK[rip]
	and	eax, ecx
	mov	ecx, DWORD PTR EEPROM_SIZE_SHIFT[rip]
	sar	eax, cl
	cmp	eax, 1
	mov	ecx, eax
	mov	eax, 1
	sbb	ecx, -1
	add	ecx, DWORD PTR EEPROM_WORD_SIZE_SHIFT[rip]
	sal	eax, cl
	mov	DWORD PTR 16[rbx], eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rdx, QWORD PTR e1000_eeprom_microwire[rip]
	mov	rcx, QWORD PTR e1000_eeprom_spi[rip]
	movabs	rax, 12884901952
	mov	QWORD PTR 16[rbx], rax
	movabs	rax, 214748364806
	mov	QWORD PTR 8[rbx], rdx
	mov	QWORD PTR 24[rbx], rax
.L7:
	cmp	rdx, rcx
	je	.L11
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L23
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	mov	rax, r8
	pop	rbx
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	mov	rdx, QWORD PTR 8[rbx]
	mov	rcx, QWORD PTR e1000_eeprom_spi[rip]
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rdx, QWORD PTR e1000_eeprom_microwire[rip]
	mov	DWORD PTR 20[rbx], 3
	mov	DWORD PTR 28[rbx], 50
	mov	QWORD PTR 8[rbx], rdx
	test	esi, esi
	jne	.L21
.L12:
	mov	DWORD PTR 16[rbx], 64
	mov	DWORD PTR 24[rbx], 6
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L10:
	mov	DWORD PTR 32[rbx], 8
	mov	DWORD PTR 24[rbx], 8
	jmp	.L11
.L23:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	e1000_init_eeprom_params, .-e1000_init_eeprom_params
	.comm	e1000_eeprom_spi,8,8
	.comm	e1000_eeprom_microwire,8,8
	.comm	EEPROM_WORD_SIZE_SHIFT,4,4
	.comm	EEPROM_SIZE_SHIFT,4,4
	.comm	EEPROM_SIZE_MASK,4,4
	.comm	EEPROM_CFG,4,4
	.comm	EECD,4,4
	.comm	E1000_SUCCESS,8,8
	.comm	E1000_EECD_TYPE,4,4
	.comm	E1000_EECD_SIZE,4,4
	.comm	E1000_EECD_ADDR_BITS,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_hw.c_e1000_init_eeprom_params.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	e1000_init_eeprom_params
	.syntax unified
	.arm
	.fpu softvfp
	.type	e1000_init_eeprom_params, %function
e1000_init_eeprom_params:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, lr}
	ldr	r3, .L25
	mov	r4, r0
	ldr	r0, [r3]
	ldr	r3, .L25+4
	sub	sp, sp, #8
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bl	er32
	ldr	r3, [r4]
	ldr	r2, .L25+8
	sub	r3, r3, #128
	mov	r1, r0
	ldr	r0, [r2]
	cmp	r3, #12
	ldrls	pc, [pc, r3, asl #2]
	b	.L2
.L4:
	.word	.L5
	.word	.L5
	.word	.L3
	.word	.L3
	.word	.L3
	.word	.L3
	.word	.L6
	.word	.L6
	.word	.L6
	.word	.L6
	.word	.L5
	.word	.L5
	.word	.L3
.L3:
	mov	lr, #3
	mov	ip, #50
	ldr	r3, .L25+12
	ldr	r2, .L25+16
	ldr	r3, [r3]
	ldr	r2, [r2]
	tst	r1, r3
	ldr	r3, .L25+20
	str	r2, [r4, #4]
	ldr	r1, [r3]
	str	lr, [r4, #12]
	str	ip, [r4, #20]
	beq	.L12
.L22:
	mov	ip, #256
	mov	r3, #8
	str	ip, [r4, #8]
	str	r3, [r4, #16]
	b	.L7
.L5:
	ldr	r2, .L25+24
	ldr	r3, .L25+28
	ldr	ip, [r2]
	ldr	r3, [r3]
	ldr	r2, .L25+20
	tst	r1, ip
	and	r3, r3, r1
	ldr	r1, [r2]
	beq	.L9
	mov	r2, #8
	cmp	r3, #0
	mov	r0, #1
	movne	r3, #16
	str	r2, [r4, #12]
	movne	r2, #32
	str	r1, [r4, #4]
	str	r0, [r4, #20]
	strne	r2, [r4, #24]
	strne	r3, [r4, #16]
	streq	r2, [r4, #24]
	streq	r2, [r4, #16]
.L11:
	mov	r2, #64
	ldr	r3, .L25+32
	str	r2, [r4, #8]
	ldr	r1, [r3]
	mov	r2, #1
	mov	r3, sp
	mov	r0, r4
	bl	e1000_read_eeprom
	cmp	r0, #0
	bne	.L1
	ldr	r3, .L25+36
	ldr	r2, .L25+40
	ldr	r1, [r3]
	ldr	r3, [sp]
	ldr	r2, [r2]
	and	r3, r3, r1
	asrs	r3, r3, r2
	mov	r2, #1
	ldr	r1, .L25+44
	addne	r3, r3, #1
	ldr	r1, [r1]
	add	r3, r3, r1
	lsl	r3, r2, r3
	str	r3, [r4, #8]
	b	.L1
.L6:
	mov	r3, #3
	mov	r1, #50
	mov	lr, #64
	mov	ip, #6
	ldr	r2, .L25+16
	str	r3, [r4, #12]
	ldr	r3, .L25+20
	ldr	r2, [r2]
	str	r1, [r4, #20]
	ldr	r1, [r3]
	str	lr, [r4, #8]
	str	r2, [r4, #4]
	str	ip, [r4, #16]
.L7:
	cmp	r2, r1
	beq	.L11
.L1:
	ldr	r3, .L25+4
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L24
	add	sp, sp, #8
	@ sp needed
	pop	{r4, pc}
.L9:
	mov	lr, #3
	mov	ip, #50
	ldr	r2, .L25+16
	cmp	r3, #0
	ldr	r2, [r2]
	str	lr, [r4, #12]
	str	r2, [r4, #4]
	str	ip, [r4, #20]
	bne	.L22
.L12:
	mov	ip, #64
	mov	r3, #6
	str	ip, [r4, #8]
	str	r3, [r4, #16]
	b	.L7
.L24:
	bl	__stack_chk_fail
.L2:
	ldr	r3, .L25+20
	ldr	r2, [r4, #4]
	ldr	r1, [r3]
	b	.L7
.L26:
	.align	2
.L25:
	.word	EECD
	.word	.LC0
	.word	E1000_SUCCESS
	.word	E1000_EECD_SIZE
	.word	e1000_eeprom_microwire
	.word	e1000_eeprom_spi
	.word	E1000_EECD_TYPE
	.word	E1000_EECD_ADDR_BITS
	.word	EEPROM_CFG
	.word	EEPROM_SIZE_MASK
	.word	EEPROM_SIZE_SHIFT
	.word	EEPROM_WORD_SIZE_SHIFT
	.size	e1000_init_eeprom_params, .-e1000_init_eeprom_params
	.comm	e1000_eeprom_spi,4,4
	.comm	e1000_eeprom_microwire,4,4
	.comm	EEPROM_WORD_SIZE_SHIFT,4,4
	.comm	EEPROM_SIZE_SHIFT,4,4
	.comm	EEPROM_SIZE_MASK,4,4
	.comm	EEPROM_CFG,4,4
	.comm	EECD,4,4
	.comm	E1000_SUCCESS,4,4
	.comm	E1000_EECD_TYPE,4,4
	.comm	E1000_EECD_SIZE,4,4
	.comm	E1000_EECD_ADDR_BITS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
