	.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
	subq	$24, %rsp
	.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
	movq	%rdi, %r13
	movq	(%rdi), %rax
	movq	_e1000_pch_spt@GOTPCREL(%rip), %rdi
	cmpq	(%rdi), %rax
	jge	LBB0_1
## %bb.4:
	leal	-3(%rdx), %eax
	cmpl	$-2, %eax
	jae	LBB0_2
	jmp	LBB0_3
LBB0_1:
	cmpl	$4, %edx
	jne	LBB0_3
LBB0_2:
	movq	_ICH_FLASH_LINEAR_ADDR_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	cmpl	%esi, %r14d
	jl	LBB0_3
## %bb.5:
	andl	%esi, %r14d
	addl	8(%r13), %r14d
	leal	-1(%rdx), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	shll	$16, %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	cmpl	$1, %edx
	movzbl	%cl, %eax
	cmovnel	%ecx, %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	$-1, %r12
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, %edi
	callq	_udelay
	movq	%r13, %rdi
	callq	_e1000_flash_cycle_init_ich8lan
	testq	%rax, %rax
	jne	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	(%r13), %rax
	movq	_e1000_pch_spt@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rax
	jge	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	_ICH_FLASH_HSFCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_er16flash
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	_ICH_FLASH_HSFSTS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_er32flash
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	(%r13), %rax
	cmpq	(%rbx), %rax
	jge	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	_ICH_FLASH_HSFCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_ew16flash
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	_ICH_FLASH_HSFSTS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_ew32flash
LBB0_14:                                ##   in Loop: Header=BB0_6 Depth=1
	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	-52(%rbp), %esi                 ## 4-byte Reload
	callq	_ew32flash
	movq	_ICH_FLASH_WRITE_COMMAND_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_e1000_flash_cycle_ich8lan
	testq	%rax, %rax
	je	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	%rax, %r15
	movq	_ICH_FLASH_HSFSTS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_er16flash
	incq	%r12
	movq	_ICH_FLASH_CYCLE_REPEAT_COUNT@GOTPCREL(%rip), %rax
	cmpq	%r12, (%rax)
	jg	LBB0_6
	jmp	LBB0_17
LBB0_3:
	movq	_E1000_ERR_NVM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subq	(%rax), %r15
	jmp	LBB0_17
LBB0_7:
	movq	%rax, %r15
	jmp	LBB0_17
LBB0_15:
	xorl	%r15d, %r15d
LBB0_17:
	movq	%r15, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_e1000_pch_spt,8,3              ## @e1000_pch_spt
	.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_HSFSTS,4,2           ## @ICH_FLASH_HSFSTS
	.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_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:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x25, _e1000_pch_spt@GOTPAGE
Lloh1:
	ldr	x25, [x25, _e1000_pch_spt@GOTPAGEOFF]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ge	LBB0_2
; %bb.1:
	sub	w8, w2, #3
	cmn	w8, #2
	b.hs	LBB0_3
	b	LBB0_14
LBB0_2:
	cmp	w2, #4
	b.ne	LBB0_14
LBB0_3:
Lloh2:
	adrp	x8, _ICH_FLASH_LINEAR_ADDR_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ICH_FLASH_LINEAR_ADDR_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w8, w1
	b.lt	LBB0_14
; %bb.4:
	and	w8, w8, w1
	ldr	w9, [x19, #8]
	add	w20, w8, w9
	subs	w21, w2, #1
	lsl	w8, w21, #16
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
	and	w8, w3, #0xff
	csel	w23, w8, w3, eq
	mov	x26, #-1
Lloh5:
	adrp	x27, _ICH_FLASH_FDATA0@GOTPAGE
Lloh6:
	ldr	x27, [x27, _ICH_FLASH_FDATA0@GOTPAGEOFF]
Lloh7:
	adrp	x28, _ICH_FLASH_WRITE_COMMAND_TIMEOUT@GOTPAGE
Lloh8:
	ldr	x28, [x28, _ICH_FLASH_WRITE_COMMAND_TIMEOUT@GOTPAGEOFF]
Lloh9:
	adrp	x22, _ICH_FLASH_HSFSTS@GOTPAGE
Lloh10:
	ldr	x22, [x22, _ICH_FLASH_HSFSTS@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #1
	bl	_udelay
	mov	x0, x19
	bl	_e1000_flash_cycle_init_ich8lan
	cbnz	x0, LBB0_15
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ge	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh11:
	adrp	x8, _ICH_FLASH_HSFCTL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ICH_FLASH_HSFCTL@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_er16flash
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x22]
	bl	_er32flash
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ge	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
Lloh14:
	adrp	x8, _ICH_FLASH_HSFCTL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ICH_FLASH_HSFCTL@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_ew16flash
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x22]
	ldr	w1, [sp, #12]                   ; 4-byte Folded Reload
	bl	_ew32flash
LBB0_12:                                ;   in Loop: Header=BB0_5 Depth=1
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, [x27]
	mov	x1, x23
	bl	_ew32flash
	ldr	w1, [x28]
	mov	x0, x19
	bl	_e1000_flash_cycle_ich8lan
	mov	x24, x0
	cbz	x0, LBB0_16
; %bb.13:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x22]
	bl	_er16flash
Lloh20:
	adrp	x8, _ICH_FLASH_CYCLE_REPEAT_COUNT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ICH_FLASH_CYCLE_REPEAT_COUNT@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
	add	x26, x26, #1
	cmp	x8, x26
	b.gt	LBB0_5
	b	LBB0_16
LBB0_14:
Lloh23:
	adrp	x8, _E1000_ERR_NVM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _E1000_ERR_NVM@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
	neg	x24, x8
	b	LBB0_16
LBB0_15:
	mov	x24, x0
LBB0_16:
	mov	x0, x24
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_e1000_pch_spt,8,3              ; @e1000_pch_spt
	.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_HSFSTS,4,2           ; @ICH_FLASH_HSFSTS
	.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_CYCLE_REPEAT_COUNT,8,3 ; @ICH_FLASH_CYCLE_REPEAT_COUNT
	.no_dead_strip	_e1000_write_flash_data_ich8lan
.subsections_via_symbols
