	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function e1000_do_write_eeprom
_e1000_do_write_eeprom:                 ## @e1000_do_write_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, %r14
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	(%rdi), %rax
	movq	_e1000_ce4100@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_GBE_CONFIG_BASE_VIRT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	movq	%r15, %rdx
	movq	%r14, %rcx
	callq	_GBE_CONFIG_FLASH_WRITE
	movq	_E1000_SUCCESS@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	jmp	LBB0_12
LBB0_2:
	movq	%rdi, %r13
	movq	8(%rdi), %rax
	subq	%r12, %rax
	jle	LBB0_5
## %bb.3:
	testq	%r15, %r15
	je	LBB0_5
## %bb.4:
	cmpq	%r15, %rax
	jl	LBB0_5
## %bb.6:
	movq	%r13, %rdi
	callq	_e1000_acquire_eeprom
	movq	_E1000_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.8:
	movq	16(%r13), %rax
	movq	_e1000_eeprom_microwire@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.9:
	movq	%r13, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	movq	%r14, %rcx
	callq	_e1000_write_eeprom_microwire
	movq	%rax, %rbx
	jmp	LBB0_11
LBB0_5:
	leaq	L_.str(%rip), %rdi
	callq	_e_dbg
LBB0_7:
	movq	_E1000_ERR_EEPROM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subq	(%rax), %rbx
LBB0_12:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	%r13, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	movq	%r14, %rcx
	callq	_e1000_write_eeprom_spi
	movq	%rax, %rbx
	movl	$10, %edi
	callq	_msleep
LBB0_11:
	movq	%r13, %rdi
	callq	_e1000_release_eeprom
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.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
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\"words\" parameter out of bounds\n"

	.comm	_E1000_ERR_EEPROM,8,3           ## @E1000_ERR_EEPROM
	.comm	_e1000_eeprom_microwire,8,3     ## @e1000_eeprom_microwire
	.no_dead_strip	_e1000_do_write_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_write_eeprom
_e1000_do_write_eeprom:                 ; @e1000_do_write_eeprom
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _e1000_ce4100@GOTPAGE
Lloh1:
	ldr	x9, [x9, _e1000_ce4100@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _GBE_CONFIG_BASE_VIRT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GBE_CONFIG_BASE_VIRT@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	bl	_GBE_CONFIG_FLASH_WRITE
Lloh6:
	adrp	x8, _E1000_SUCCESS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _E1000_SUCCESS@GOTPAGEOFF]
Lloh8:
	ldr	x20, [x8]
	b	LBB0_10
LBB0_2:
	mov	x19, x0
	ldr	x8, [x0, #8]
	subs	x8, x8, x22
	b.le	LBB0_8
; %bb.3:
	cbz	x21, LBB0_8
; %bb.4:
	cmp	x8, x21
	b.lt	LBB0_8
; %bb.5:
	mov	x0, x19
	bl	_e1000_acquire_eeprom
Lloh9:
	adrp	x8, _E1000_SUCCESS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _E1000_SUCCESS@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.6:
	ldr	x8, [x19, #16]
Lloh12:
	adrp	x9, _e1000_eeprom_microwire@GOTPAGE
Lloh13:
	ldr	x9, [x9, _e1000_eeprom_microwire@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.7:
	bl	_e1000_write_eeprom_microwire
	mov	x20, x0
	b	LBB0_12
LBB0_8:
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	bl	_e_dbg
LBB0_9:
Lloh17:
	adrp	x8, _E1000_ERR_EEPROM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _E1000_ERR_EEPROM@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	neg	x20, x8
LBB0_10:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_11:
	bl	_e1000_write_eeprom_spi
	mov	x20, x0
	mov	w0, #10
	bl	_msleep
LBB0_12:
	mov	x0, x19
	bl	_e1000_release_eeprom
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.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
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\"words\" parameter out of bounds\n"

	.comm	_E1000_ERR_EEPROM,8,3           ; @E1000_ERR_EEPROM
	.comm	_e1000_eeprom_microwire,8,3     ; @e1000_eeprom_microwire
	.no_dead_strip	_e1000_do_write_eeprom
.subsections_via_symbols
