	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function e1000_write_flash_data_ich8lan
_e1000_write_flash_data_ich8lan:        ## @e1000_write_flash_data_ich8lan
	.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
                                        ## kill: def $edx killed $edx def $rdx
	leal	-3(%rdx), %eax
	cmpl	$-2, %eax
	jb	LBB0_3
## %bb.1:
	movl	%edx, %eax
	shll	$8, %eax
	subl	%edx, %eax
	cmpl	%ecx, %eax
	jl	LBB0_3
## %bb.2:
	movq	_ICH_FLASH_LINEAR_ADDR_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	cmpl	%esi, %r14d
	jge	LBB0_4
LBB0_3:
	movq	_E1000_ERR_NVM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subq	(%rax), %rbx
LBB0_10:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%rdi, %r12
	andl	%esi, %r14d
	addl	(%rdi), %r14d
	leal	-1(%rdx), %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	cmpl	$1, %edx
	movzbl	%cl, %r15d
	cmovnel	%ecx, %r15d
	movq	$-1, %r13
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, %edi
	callq	_udelay
	movq	%r12, %rdi
	callq	_e1000_flash_cycle_init_ich8lan
	testq	%rax, %rax
	jne	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_ICH_FLASH_HSFCTL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_er16flash
	movq	_ICH_CYCLE_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	shlq	$32, %rsi
	addq	-48(%rbp), %rsi                 ## 8-byte Folded Reload
	movl	(%rbx), %edi
	callq	_ew16flash
	movq	_ICH_FLASH_FADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r14d, %esi
	callq	_ew32flash
	movq	_ICH_FLASH_FDATA0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r15d, %esi
	callq	_ew32flash
	movq	_ICH_FLASH_WRITE_COMMAND_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_e1000_flash_cycle_ich8lan
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%rax, %rbx
	movq	_ICH_FLASH_HSFSTS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_er16flash
	incq	%r13
	movq	_ICH_FLASH_CYCLE_REPEAT_COUNT@GOTPCREL(%rip), %rax
	cmpq	%r13, (%rax)
	jg	LBB0_5
	jmp	LBB0_10
LBB0_6:
	movq	%rax, %rbx
	jmp	LBB0_10
LBB0_8:
	xorl	%ebx, %ebx
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_ICH_FLASH_LINEAR_ADDR_MASK,4,2 ## @ICH_FLASH_LINEAR_ADDR_MASK
	.comm	_E1000_ERR_NVM,8,3              ## @E1000_ERR_NVM
	.comm	_ICH_FLASH_HSFCTL,4,2           ## @ICH_FLASH_HSFCTL
	.comm	_ICH_CYCLE_WRITE,4,2            ## @ICH_CYCLE_WRITE
	.comm	_ICH_FLASH_FADDR,4,2            ## @ICH_FLASH_FADDR
	.comm	_ICH_FLASH_FDATA0,4,2           ## @ICH_FLASH_FDATA0
	.comm	_ICH_FLASH_WRITE_COMMAND_TIMEOUT,4,2 ## @ICH_FLASH_WRITE_COMMAND_TIMEOUT
	.comm	_ICH_FLASH_HSFSTS,4,2           ## @ICH_FLASH_HSFSTS
	.comm	_ICH_FLASH_CYCLE_REPEAT_COUNT,8,3 ## @ICH_FLASH_CYCLE_REPEAT_COUNT
	.no_dead_strip	_e1000_write_flash_data_ich8lan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function e1000_write_flash_data_ich8lan
_e1000_write_flash_data_ich8lan:        ; @e1000_write_flash_data_ich8lan
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	w8, w2, #3
	cmn	w8, #2
	b.lo	LBB0_3
; %bb.1:
	lsl	w8, w2, #8
	sub	w8, w8, w2
	cmp	w8, w3
	b.lt	LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _ICH_FLASH_LINEAR_ADDR_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ICH_FLASH_LINEAR_ADDR_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.ge	LBB0_5
LBB0_3:
Lloh3:
	adrp	x8, _E1000_ERR_NVM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _E1000_ERR_NVM@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	neg	x22, x8
LBB0_4:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_5:
	mov	x19, x0
	and	w8, w8, w1
	ldr	w9, [x0]
	add	w20, w9, w8
	subs	w23, w2, #1
	and	w8, w3, #0xff
	csel	w21, w8, w3, eq
	mov	x24, #-1
Lloh6:
	adrp	x25, _ICH_FLASH_HSFCTL@GOTPAGE
Lloh7:
	ldr	x25, [x25, _ICH_FLASH_HSFCTL@GOTPAGEOFF]
Lloh8:
	adrp	x28, _ICH_FLASH_FDATA0@GOTPAGE
Lloh9:
	ldr	x28, [x28, _ICH_FLASH_FDATA0@GOTPAGEOFF]
Lloh10:
	adrp	x26, _ICH_FLASH_WRITE_COMMAND_TIMEOUT@GOTPAGE
Lloh11:
	ldr	x26, [x26, _ICH_FLASH_WRITE_COMMAND_TIMEOUT@GOTPAGEOFF]
Lloh12:
	adrp	x27, _ICH_FLASH_CYCLE_REPEAT_COUNT@GOTPAGE
Lloh13:
	ldr	x27, [x27, _ICH_FLASH_CYCLE_REPEAT_COUNT@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #1
	bl	_udelay
	mov	x0, x19
	bl	_e1000_flash_cycle_init_ich8lan
	cbnz	x0, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [x25]
	bl	_er16flash
Lloh14:
	adrp	x8, _ICH_CYCLE_WRITE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ICH_CYCLE_WRITE@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	mov	x1, x23
	bfi	x1, x8, #32, #32
	ldr	w0, [x25]
	bl	_ew16flash
Lloh17:
	adrp	x8, _ICH_FLASH_FADDR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ICH_FLASH_FADDR@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_ew32flash
	ldr	w0, [x28]
	mov	x1, x21
	bl	_ew32flash
	ldr	w1, [x26]
	mov	x0, x19
	bl	_e1000_flash_cycle_ich8lan
	mov	x22, x0
	cbz	x0, LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
Lloh20:
	adrp	x8, _ICH_FLASH_HSFSTS@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ICH_FLASH_HSFSTS@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	bl	_er16flash
	ldr	x8, [x27]
	add	x24, x24, #1
	cmp	x8, x24
	b.gt	LBB0_6
	b	LBB0_4
LBB0_9:
	mov	x22, x0
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_ICH_FLASH_LINEAR_ADDR_MASK,4,2 ; @ICH_FLASH_LINEAR_ADDR_MASK
	.comm	_E1000_ERR_NVM,8,3              ; @E1000_ERR_NVM
	.comm	_ICH_FLASH_HSFCTL,4,2           ; @ICH_FLASH_HSFCTL
	.comm	_ICH_CYCLE_WRITE,4,2            ; @ICH_CYCLE_WRITE
	.comm	_ICH_FLASH_FADDR,4,2            ; @ICH_FLASH_FADDR
	.comm	_ICH_FLASH_FDATA0,4,2           ; @ICH_FLASH_FDATA0
	.comm	_ICH_FLASH_WRITE_COMMAND_TIMEOUT,4,2 ; @ICH_FLASH_WRITE_COMMAND_TIMEOUT
	.comm	_ICH_FLASH_HSFSTS,4,2           ; @ICH_FLASH_HSFSTS
	.comm	_ICH_FLASH_CYCLE_REPEAT_COUNT,8,3 ; @ICH_FLASH_CYCLE_REPEAT_COUNT
	.no_dead_strip	_e1000_write_flash_data_ich8lan
.subsections_via_symbols
