	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function e1000_update_nvm_checksum_ich8lan
LCPI0_0:
	.long	0                               ## 0x0
	.long	65535                           ## 0xffff
	.long	0                               ## 0x0
	.long	65535                           ## 0xffff
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_e1000_update_nvm_checksum_ich8lan:     ## @e1000_update_nvm_checksum_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	$0, -44(%rbp)
	callq	_e1000e_update_nvm_checksum_generic
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_21
## %bb.1:
	movq	8(%r15), %rax
	movq	_e1000_nvm_flash_sw@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_39
## %bb.2:
	movq	%r15, %rdi
	callq	*40(%r15)
	leaq	-72(%rbp), %rsi
	movq	%r15, %rdi
	callq	_e1000_valid_nvm_bank_detect_ich8lan
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_e_dbg
	movq	$0, -72(%rbp)
LBB0_5:
	movq	16(%r15), %r14
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_e1000_erase_flash_bank_ich8lan
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_20
## %bb.6:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_9
LBB0_4:
	cmpq	$0, -72(%rbp)
	je	LBB0_5
## %bb.7:
	movq	16(%r15), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_e1000_erase_flash_bank_ich8lan
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_20
## %bb.8:
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
LBB0_9:
	movq	_E1000_ICH8_SHADOW_RAM_WORDS@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jle	LBB0_22
## %bb.10:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%rax), %r12
	xorl	%r13d, %r13d
	movq	_E1000_ICH_NVM_SIG_WORD@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rax
	cmpl	$0, (%rax,%r13,8)
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	4(%rax,%r13,8), %eax
	movl	%eax, -44(%rbp)
	jmp	LBB0_15
LBB0_14:                                ##   in Loop: Header=BB0_12 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r13), %rsi
	movq	%r15, %rdi
	leaq	-44(%rbp), %rdx
	callq	_e1000_read_flash_word_ich8lan
	testq	%rax, %rax
	jne	LBB0_19
LBB0_15:                                ##   in Loop: Header=BB0_12 Depth=1
	cmpq	(%r14), %r13
	jne	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	_E1000_ICH_NVM_SIG_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, -44(%rbp)
LBB0_17:                                ##   in Loop: Header=BB0_12 Depth=1
	movl	$100, %edi
	movl	$200, %esi
	callq	_usleep_range
	movl	-44(%rbp), %edx
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_e1000_retry_write_flash_byte_ich8lan
	testq	%rax, %rax
	jne	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	$100, %edi
	movl	$200, %esi
	callq	_usleep_range
	leaq	1(%r12), %rsi
	movl	-44(%rbp), %edx
	sarl	$8, %edx
	movq	%r15, %rdi
	callq	_e1000_retry_write_flash_byte_ich8lan
	testq	%rax, %rax
	jne	LBB0_19
## %bb.11:                              ##   in Loop: Header=BB0_12 Depth=1
	incq	%r13
	addq	$2, %r12
	movq	_E1000_ICH8_SHADOW_RAM_WORDS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	jl	LBB0_12
LBB0_22:
	movq	_E1000_ICH_NVM_SIG_WORD@GOTPCREL(%rip), %r14
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	addq	(%r14), %r12
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_e1000_read_flash_word_ich8lan
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_20
## %bb.23:
	movl	$49151, %edx                    ## imm = 0xBFFF
	andl	-44(%rbp), %edx
	movl	%edx, -44(%rbp)
	leaq	(%r12,%r12), %rsi
	incq	%rsi
	shrl	$8, %edx
	movq	%r15, %rdi
	callq	_e1000_retry_write_flash_byte_ich8lan
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_20
## %bb.24:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	addq	(%r14), %rax
	leaq	(%rax,%rax), %rsi
	incq	%rsi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_e1000_retry_write_flash_byte_ich8lan
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_20
## %bb.25:
	movq	_E1000_ICH8_SHADOW_RAM_WORDS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	jle	LBB0_38
## %bb.26:
	movq	(%r15), %rcx
	cmpq	$4, %rax
	jae	LBB0_28
## %bb.27:
	xorl	%edx, %edx
	jmp	LBB0_36
LBB0_19:
	movq	%rax, %rbx
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_e_dbg
LBB0_20:
	movq	%r15, %rdi
	callq	*32(%r15)
LBB0_21:
	leaq	L_.str.2(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_e_dbg
LBB0_40:
	movq	%rbx, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_28:
	movq	%rax, %rdx
	andq	$-4, %rdx
	leaq	-4(%rdx), %rdi
	movq	%rdi, %rsi
	shrq	$2, %rsi
	incq	%rsi
	movl	%esi, %ebx
	andl	$3, %ebx
	cmpq	$12, %rdi
	jae	LBB0_30
## %bb.29:
	xorl	%edi, %edi
	jmp	LBB0_32
LBB0_30:
	andq	$-4, %rsi
	xorl	%edi, %edi
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [0,65535,0,65535]
LBB0_31:                                ## =>This Inner Loop Header: Depth=1
	movups	%xmm0, (%rcx,%rdi,8)
	movups	%xmm0, 16(%rcx,%rdi,8)
	movups	%xmm0, 32(%rcx,%rdi,8)
	movups	%xmm0, 48(%rcx,%rdi,8)
	movups	%xmm0, 64(%rcx,%rdi,8)
	movups	%xmm0, 80(%rcx,%rdi,8)
	movups	%xmm0, 96(%rcx,%rdi,8)
	movups	%xmm0, 112(%rcx,%rdi,8)
	addq	$16, %rdi
	addq	$-4, %rsi
	jne	LBB0_31
LBB0_32:
	testq	%rbx, %rbx
	je	LBB0_35
## %bb.33:
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [0,65535,0,65535]
LBB0_34:                                ## =>This Inner Loop Header: Depth=1
	leaq	(,%rdi,8), %rsi
	orq	$16, %rsi
	movups	%xmm0, (%rcx,%rdi,8)
	movups	%xmm0, (%rcx,%rsi)
	addq	$4, %rdi
	decq	%rbx
	jne	LBB0_34
LBB0_35:
	cmpq	%rdx, %rax
	je	LBB0_38
LBB0_36:
	movabsq	$281470681743360, %rsi          ## imm = 0xFFFF00000000
LBB0_37:                                ## =>This Inner Loop Header: Depth=1
	movq	%rsi, (%rcx,%rdx,8)
	incq	%rdx
	cmpq	%rdx, %rax
	jne	LBB0_37
LBB0_38:
	movq	%r15, %rdi
	callq	*32(%r15)
	movq	%r15, %rdi
	callq	*24(%r15)
	movl	$10000, %edi                    ## imm = 0x2710
	movl	$11000, %esi                    ## imm = 0x2AF8
	callq	_usleep_range
LBB0_39:
	xorl	%ebx, %ebx
	jmp	LBB0_40
	.cfi_endproc
                                        ## -- End function
	.comm	_e1000_nvm_flash_sw,8,3         ## @e1000_nvm_flash_sw
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not detect valid bank, assuming bank 0\n"

	.comm	_E1000_ICH8_SHADOW_RAM_WORDS,8,3 ## @E1000_ICH8_SHADOW_RAM_WORDS
	.comm	_E1000_ICH_NVM_SIG_WORD,8,3     ## @E1000_ICH_NVM_SIG_WORD
	.comm	_E1000_ICH_NVM_SIG_MASK,4,2     ## @E1000_ICH_NVM_SIG_MASK
L_.str.1:                               ## @.str.1
	.asciz	"Flash commit failed.\n"

L_.str.2:                               ## @.str.2
	.asciz	"NVM update error: %d\n"

	.no_dead_strip	_e1000_update_nvm_checksum_ich8lan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function e1000_update_nvm_checksum_ich8lan
_e1000_update_nvm_checksum_ich8lan:     ; @e1000_update_nvm_checksum_ich8lan
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	str	wzr, [sp, #20]
	bl	_e1000e_update_nvm_checksum_generic
	mov	x20, x0
	cbnz	x0, LBB0_27
; %bb.1:
	ldr	x8, [x19, #8]
Lloh0:
	adrp	x9, _e1000_nvm_flash_sw@GOTPAGE
Lloh1:
	ldr	x9, [x9, _e1000_nvm_flash_sw@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_35
; %bb.2:
	ldr	x8, [x19, #40]
	mov	x0, x19
	blr	x8
	add	x1, sp, #24
	mov	x0, x19
	bl	_e1000_valid_nvm_bank_detect_ich8lan
	cbz	x0, LBB0_6
; %bb.3:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_e_dbg
	str	xzr, [sp, #24]
LBB0_4:
	ldr	x25, [x19, #16]
	mov	x0, x19
	mov	w1, #1
	bl	_e1000_erase_flash_bank_ich8lan
	mov	x20, x0
	cbnz	x0, LBB0_26
; %bb.5:
	mov	x22, #0
	b	LBB0_9
LBB0_6:
	ldr	x8, [sp, #24]
	cbz	x8, LBB0_4
; %bb.7:
	ldr	x22, [x19, #16]
	mov	x0, x19
	mov	w1, #0
	bl	_e1000_erase_flash_bank_ich8lan
	mov	x20, x0
	cbnz	x0, LBB0_26
; %bb.8:
	mov	x25, #0
LBB0_9:
Lloh5:
	adrp	x23, _E1000_ICH8_SHADOW_RAM_WORDS@GOTPAGE
Lloh6:
	ldr	x23, [x23, _E1000_ICH8_SHADOW_RAM_WORDS@GOTPAGEOFF]
	ldr	x8, [x23]
Lloh7:
	adrp	x24, _E1000_ICH_NVM_SIG_WORD@GOTPAGE
Lloh8:
	ldr	x24, [x24, _E1000_ICH_NVM_SIG_WORD@GOTPAGEOFF]
	cmp	x8, #1
	b.lt	LBB0_19
; %bb.10:
	mov	x26, #0
	mov	x27, #0
	lsl	x28, x25, #1
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldr	w9, [x8, x26, lsl #2]
	cbz	w9, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	add	x8, x8, x26, lsl #2
	ldr	w8, [x8, #4]
	str	w8, [sp, #20]
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x1, x22, x27
	add	x2, sp, #20
	mov	x0, x19
	bl	_e1000_read_flash_word_ich8lan
	cbnz	x0, LBB0_25
LBB0_14:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	x8, [x24]
	cmp	x27, x8
	b.ne	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_11 Depth=1
Lloh9:
	adrp	x8, _E1000_ICH_NVM_SIG_MASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _E1000_ICH_NVM_SIG_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldr	w9, [sp, #20]
	orr	w8, w9, w8
	str	w8, [sp, #20]
LBB0_16:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x21, x28, x26
	mov	w0, #100
	mov	w1, #200
	bl	_usleep_range
	ldr	w2, [sp, #20]
	mov	x0, x19
	mov	x1, x21
	bl	_e1000_retry_write_flash_byte_ich8lan
	cbnz	x0, LBB0_25
; %bb.17:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	w0, #100
	mov	w1, #200
	bl	_usleep_range
	add	x1, x21, #1
	ldr	w8, [sp, #20]
	asr	w2, w8, #8
	mov	x0, x19
	bl	_e1000_retry_write_flash_byte_ich8lan
	cbnz	x0, LBB0_25
; %bb.18:                               ;   in Loop: Header=BB0_11 Depth=1
	add	x27, x27, #1
	ldr	x8, [x23]
	add	x26, x26, #2
	cmp	x27, x8
	b.lt	LBB0_11
LBB0_19:
	ldr	x8, [x24]
	add	x21, x8, x25
	add	x2, sp, #20
	mov	x0, x19
	mov	x1, x21
	bl	_e1000_read_flash_word_ich8lan
	mov	x20, x0
	cbnz	x0, LBB0_26
; %bb.20:
	ldr	w8, [sp, #20]
	mov	w9, #49151
	and	w8, w8, w9
	str	w8, [sp, #20]
	mov	w1, #1
	bfi	x1, x21, #1, #63
	lsr	w2, w8, #8
	mov	x0, x19
	bl	_e1000_retry_write_flash_byte_ich8lan
	mov	x20, x0
	cbnz	x0, LBB0_26
; %bb.21:
	ldr	x8, [x24]
	add	x8, x8, x22
	mov	w1, #1
	bfi	x1, x8, #1, #63
	mov	x0, x19
	mov	w2, #0
	bl	_e1000_retry_write_flash_byte_ich8lan
	mov	x20, x0
	cbnz	x0, LBB0_26
; %bb.22:
	ldr	x8, [x23]
	cmp	x8, #1
	b.lt	LBB0_34
; %bb.23:
	ldr	x9, [x19]
	cmp	x8, #16
	b.hs	LBB0_29
; %bb.24:
	mov	x10, #0
	b	LBB0_32
LBB0_25:
	mov	x20, x0
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_e_dbg
LBB0_26:
	ldr	x8, [x19, #32]
	mov	x0, x19
	blr	x8
LBB0_27:
	str	x20, [sp]
Lloh14:
	adrp	x0, l_.str.2@PAGE
Lloh15:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_e_dbg
LBB0_28:
	mov	x0, x20
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_29:
	and	x10, x8, #0xfffffffffffffff0
	add	x11, x9, #64
	movi.2d	v0, #0x00ffff00000000
	mov	x12, x10
LBB0_30:                                ; =>This Inner Loop Header: Depth=1
	stp	q0, q0, [x11, #-64]
	stp	q0, q0, [x11, #-32]
	stp	q0, q0, [x11]
	stp	q0, q0, [x11, #32]
	add	x11, x11, #128
	subs	x12, x12, #16
	b.ne	LBB0_30
; %bb.31:
	cmp	x8, x10
	b.eq	LBB0_34
LBB0_32:
	sub	x8, x8, x10
	add	x9, x9, x10, lsl #3
	movi	d0, #0x00ffff00000000
LBB0_33:                                ; =>This Inner Loop Header: Depth=1
	str	d0, [x9], #8
	subs	x8, x8, #1
	b.ne	LBB0_33
LBB0_34:
	ldr	x8, [x19, #32]
	mov	x0, x19
	blr	x8
	ldr	x8, [x19, #24]
	mov	x0, x19
	blr	x8
	mov	w0, #10000
	mov	w1, #11000
	bl	_usleep_range
LBB0_35:
	mov	x20, #0
	b	LBB0_28
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_e1000_nvm_flash_sw,8,3         ; @e1000_nvm_flash_sw
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not detect valid bank, assuming bank 0\n"

	.comm	_E1000_ICH8_SHADOW_RAM_WORDS,8,3 ; @E1000_ICH8_SHADOW_RAM_WORDS
	.comm	_E1000_ICH_NVM_SIG_WORD,8,3     ; @E1000_ICH_NVM_SIG_WORD
	.comm	_E1000_ICH_NVM_SIG_MASK,4,2     ; @E1000_ICH_NVM_SIG_MASK
l_.str.1:                               ; @.str.1
	.asciz	"Flash commit failed.\n"

l_.str.2:                               ; @.str.2
	.asciz	"NVM update error: %d\n"

	.no_dead_strip	_e1000_update_nvm_checksum_ich8lan
.subsections_via_symbols
