	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function e1000_do_read_eeprom
_e1000_do_read_eeprom:                  ## @e1000_do_read_eeprom
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %rbx
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_e_dbg
	movq	(%r14), %rax
	movq	_e1000_ce4100@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.1:
	movq	_GBE_CONFIG_BASE_VIRT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	movq	%r15, %rdx
	movq	%rbx, %rcx
	callq	_GBE_CONFIG_FLASH_READ
LBB0_2:
	movq	_E1000_SUCCESS@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	jmp	LBB0_15
LBB0_3:
	movq	8(%r14), %rdx
	testq	%rdx, %rdx
	jne	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	callq	_e1000_init_eeprom_params
	movq	8(%r14), %rdx
LBB0_5:
	movq	%rdx, %rax
	subq	%r12, %rax
	jle	LBB0_13
## %bb.6:
	testq	%r15, %r15
	je	LBB0_13
## %bb.7:
	cmpq	%r15, %rax
	jl	LBB0_13
## %bb.8:
	movq	%r14, %rdi
	callq	_e1000_acquire_eeprom
	movq	_E1000_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.9:
	movq	16(%r14), %rax
	movq	_e1000_eeprom_spi@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_16
## %bb.10:
	movq	_EEPROM_READ_OPCODE_SPI@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movq	%r14, %rdi
	callq	_e1000_spi_eeprom_ready
	testq	%rax, %rax
	je	LBB0_20
## %bb.11:
	movq	%r14, %rdi
	callq	_e1000_release_eeprom
LBB0_12:
	movq	_E1000_ERR_EEPROM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_14
LBB0_13:
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_e_dbg
	movq	_E1000_ERR_EEPROM@GOTPCREL(%rip), %rax
LBB0_14:
	subq	(%rax), %rbx
LBB0_15:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	_e1000_eeprom_microwire@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_25
## %bb.17:
	testq	%r15, %r15
	jle	LBB0_25
## %bb.18:
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	_EEPROM_READ_OPCODE_MICROWIRE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	28(%r14), %edx
	movq	%r14, %rdi
	callq	_e1000_shift_out_ee_bits
	leaq	(%r12,%r13), %rsi
	movl	24(%r14), %edx
	movq	%r14, %rdi
	callq	_e1000_shift_out_ee_bits
	movq	%r14, %rdi
	movl	$16, %esi
	callq	_e1000_shift_in_ee_bits
	movq	%rax, (%rbx,%r13,8)
	movq	%r14, %rdi
	callq	_e1000_standby_eeprom
	incq	%r13
	cmpq	%r13, %r15
	jne	LBB0_19
	jmp	LBB0_25
LBB0_20:
	movq	%r14, %rdi
	callq	_e1000_standby_eeprom
	movl	28(%r14), %edx
	xorl	%esi, %esi
	cmpl	$8, 24(%r14)
	movl	$0, %eax
	jne	LBB0_22
## %bb.21:
	movq	_EEPROM_A8_OPCODE_SPI@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_22:
	cmpq	$127, %r12
	cmovgq	%rax, %rsi
	orq	%r13, %rsi
	movq	%r14, %rdi
	callq	_e1000_shift_out_ee_bits
	addq	%r12, %r12
	movl	24(%r14), %edx
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_e1000_shift_out_ee_bits
	testq	%r15, %r15
	jle	LBB0_25
## %bb.23:
	movq	%rbx, %r12
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	$16, %esi
	callq	_e1000_shift_in_ee_bits
	movq	%rax, %rcx
	sarq	$8, %rcx
	shlq	$8, %rax
	orq	%rcx, %rax
	movq	%rax, (%r12,%rbx,8)
	incq	%rbx
	cmpq	%rbx, %r15
	jne	LBB0_24
LBB0_25:
	movq	%r14, %rdi
	callq	_e1000_release_eeprom
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"e1000_read_eeprom"

	.comm	_e1000_ce4100,8,3               ## @e1000_ce4100
	.comm	_GBE_CONFIG_BASE_VIRT,4,2       ## @GBE_CONFIG_BASE_VIRT
	.comm	_E1000_SUCCESS,8,3              ## @E1000_SUCCESS
L_.str.1:                               ## @.str.1
	.asciz	"\"words\" parameter out of bounds. Words = %d,size = %d\n"

	.comm	_E1000_ERR_EEPROM,8,3           ## @E1000_ERR_EEPROM
	.comm	_e1000_eeprom_spi,8,3           ## @e1000_eeprom_spi
	.comm	_EEPROM_READ_OPCODE_SPI,8,3     ## @EEPROM_READ_OPCODE_SPI
	.comm	_EEPROM_A8_OPCODE_SPI,8,3       ## @EEPROM_A8_OPCODE_SPI
	.comm	_e1000_eeprom_microwire,8,3     ## @e1000_eeprom_microwire
	.comm	_EEPROM_READ_OPCODE_MICROWIRE,8,3 ## @EEPROM_READ_OPCODE_MICROWIRE
	.no_dead_strip	_e1000_do_read_eeprom
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function e1000_do_read_eeprom
_e1000_do_read_eeprom:                  ; @e1000_do_read_eeprom
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x3
	mov	x20, x2
	mov	x22, x1
	mov	x21, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_e_dbg
	ldr	x8, [x21]
Lloh2:
	adrp	x9, _e1000_ce4100@GOTPAGE
Lloh3:
	ldr	x9, [x9, _e1000_ce4100@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _GBE_CONFIG_BASE_VIRT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GBE_CONFIG_BASE_VIRT@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	mov	x1, x22
	mov	x2, x20
	mov	x3, x19
	bl	_GBE_CONFIG_FLASH_READ
Lloh8:
	adrp	x8, _E1000_SUCCESS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _E1000_SUCCESS@GOTPAGEOFF]
Lloh10:
	ldr	x0, [x8]
	b	LBB0_13
LBB0_2:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_4
; %bb.3:
	subs	x9, x8, x22
	b.gt	LBB0_5
	b	LBB0_11
LBB0_4:
	mov	x0, x21
	bl	_e1000_init_eeprom_params
	ldr	x8, [x21, #8]
	subs	x9, x8, x22
	b.le	LBB0_11
LBB0_5:
	cbz	x20, LBB0_11
; %bb.6:
	cmp	x9, x20
	b.lt	LBB0_11
; %bb.7:
	mov	x0, x21
	bl	_e1000_acquire_eeprom
Lloh11:
	adrp	x23, _E1000_SUCCESS@GOTPAGE
Lloh12:
	ldr	x23, [x23, _E1000_SUCCESS@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_12
; %bb.8:
	ldr	x8, [x21, #16]
Lloh13:
	adrp	x9, _e1000_eeprom_spi@GOTPAGE
Lloh14:
	ldr	x9, [x9, _e1000_eeprom_spi@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.9:
Lloh16:
	adrp	x8, _EEPROM_READ_OPCODE_SPI@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EEPROM_READ_OPCODE_SPI@GOTPAGEOFF]
Lloh18:
	ldr	x24, [x8]
	mov	x0, x21
	bl	_e1000_spi_eeprom_ready
	cbz	x0, LBB0_17
; %bb.10:
	mov	x0, x21
	bl	_e1000_release_eeprom
	b	LBB0_12
LBB0_11:
	stp	x22, x8, [sp]
Lloh19:
	adrp	x0, l_.str.1@PAGE
Lloh20:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_e_dbg
LBB0_12:
Lloh21:
	adrp	x8, _E1000_ERR_EEPROM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _E1000_ERR_EEPROM@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	neg	x0, x8
LBB0_13:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_14:
Lloh24:
	adrp	x9, _e1000_eeprom_microwire@GOTPAGE
Lloh25:
	ldr	x9, [x9, _e1000_eeprom_microwire@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	cmp	x8, x9
	ccmp	x20, #1, #8, eq
	b.lt	LBB0_19
; %bb.15:
Lloh27:
	adrp	x24, _EEPROM_READ_OPCODE_MICROWIRE@GOTPAGE
Lloh28:
	ldr	x24, [x24, _EEPROM_READ_OPCODE_MICROWIRE@GOTPAGEOFF]
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	x1, [x24]
	ldr	w2, [x21, #28]
	mov	x0, x21
	bl	_e1000_shift_out_ee_bits
	ldr	w2, [x21, #24]
	mov	x0, x21
	mov	x1, x22
	bl	_e1000_shift_out_ee_bits
	mov	x0, x21
	mov	w1, #16
	bl	_e1000_shift_in_ee_bits
	str	x0, [x19], #8
	mov	x0, x21
	bl	_e1000_standby_eeprom
	add	x22, x22, #1
	subs	x20, x20, #1
	b.ne	LBB0_16
	b	LBB0_19
LBB0_17:
	mov	x0, x21
	bl	_e1000_standby_eeprom
	ldp	w8, w2, [x21, #24]
	cmp	w8, #8
	mov	w8, #127
	ccmp	x22, x8, #4, eq
Lloh29:
	adrp	x8, _EEPROM_A8_OPCODE_SPI@GOTPAGE
Lloh30:
	ldr	x8, [x8, _EEPROM_A8_OPCODE_SPI@GOTPAGEOFF]
Lloh31:
	ldr	x8, [x8]
	csel	x8, x8, xzr, gt
	orr	x1, x8, x24
	mov	x0, x21
	bl	_e1000_shift_out_ee_bits
	lsl	x1, x22, #1
	ldr	w2, [x21, #24]
	mov	x0, x21
	bl	_e1000_shift_out_ee_bits
	cmp	x20, #1
	b.lt	LBB0_19
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	w1, #16
	bl	_e1000_shift_in_ee_bits
	asr	x8, x0, #8
	orr	x8, x8, x0, lsl #8
	str	x8, [x19], #8
	subs	x20, x20, #1
	b.ne	LBB0_18
LBB0_19:
	mov	x0, x21
	bl	_e1000_release_eeprom
	ldr	x0, [x23]
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"e1000_read_eeprom"

	.comm	_e1000_ce4100,8,3               ; @e1000_ce4100
	.comm	_GBE_CONFIG_BASE_VIRT,4,2       ; @GBE_CONFIG_BASE_VIRT
	.comm	_E1000_SUCCESS,8,3              ; @E1000_SUCCESS
l_.str.1:                               ; @.str.1
	.asciz	"\"words\" parameter out of bounds. Words = %d,size = %d\n"

	.comm	_E1000_ERR_EEPROM,8,3           ; @E1000_ERR_EEPROM
	.comm	_e1000_eeprom_spi,8,3           ; @e1000_eeprom_spi
	.comm	_EEPROM_READ_OPCODE_SPI,8,3     ; @EEPROM_READ_OPCODE_SPI
	.comm	_EEPROM_A8_OPCODE_SPI,8,3       ; @EEPROM_A8_OPCODE_SPI
	.comm	_e1000_eeprom_microwire,8,3     ; @e1000_eeprom_microwire
	.comm	_EEPROM_READ_OPCODE_MICROWIRE,8,3 ; @EEPROM_READ_OPCODE_MICROWIRE
	.no_dead_strip	_e1000_do_read_eeprom
.subsections_via_symbols
