	.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_spt
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_spt:         ## @e1000_update_nvm_checksum_spt
	.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
	movq	%rdi, %r14
	movq	$0, -48(%rbp)
	callq	_e1000e_update_nvm_checksum_generic
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_22
## %bb.1:
	movq	8(%r14), %rax
	movq	_e1000_nvm_flash_sw@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_41
## %bb.2:
	movq	%r14, %rdi
	callq	*40(%r14)
	leaq	-56(%rbp), %rsi
	movq	%r14, %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, -56(%rbp)
LBB0_5:
	movq	16(%r14), %r12
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_e1000_erase_flash_bank_ich8lan
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_21
## %bb.6:
	xorl	%r13d, %r13d
	jmp	LBB0_8
LBB0_4:
	cmpq	$0, -56(%rbp)
	je	LBB0_5
## %bb.7:
	movq	16(%r14), %r13
	xorl	%r12d, %r12d
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_e1000_erase_flash_bank_ich8lan
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_21
LBB0_8:
	movq	_E1000_ICH8_SHADOW_RAM_WORDS@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jle	LBB0_23
## %bb.9:
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	leaq	(%r15,%r13), %rsi
	movq	%r14, %rdi
	leaq	-48(%rbp), %rdx
	callq	_e1000_read_flash_dword_ich8lan
	movq	%rax, %rbx
	movq	(%r14), %rax
	cmpl	$0, (%rax,%r15,8)
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movzwl	-46(%rbp), %ecx
	shlq	$16, %rcx
	movzwl	4(%rax,%r15,8), %edx
	orq	%rcx, %rdx
	movq	%rdx, -48(%rbp)
LBB0_13:                                ##   in Loop: Header=BB0_11 Depth=1
	cmpl	$0, 8(%rax,%r15,8)
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_11 Depth=1
	movzwl	-48(%rbp), %ecx
	movl	12(%rax,%r15,8), %eax
	shll	$16, %eax
	cltq
	orq	%rcx, %rax
	movq	%rax, -48(%rbp)
LBB0_15:                                ##   in Loop: Header=BB0_11 Depth=1
	testq	%rbx, %rbx
	jne	LBB0_20
## %bb.16:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	_E1000_ICH_NVM_SIG_WORD@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	decq	%rax
	cmpq	%rax, %r15
	jne	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	_E1000_ICH_NVM_SIG_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shll	$16, %eax
	cltq
	orq	%rax, -48(%rbp)
LBB0_18:                                ##   in Loop: Header=BB0_11 Depth=1
	leaq	(%r12,%r15), %rbx
	movl	$100, %edi
	movl	$200, %esi
	callq	_usleep_range
	movq	-48(%rbp), %rdx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_e1000_retry_write_flash_dword_ich8lan
	testq	%rax, %rax
	jne	LBB0_19
## %bb.10:                              ##   in Loop: Header=BB0_11 Depth=1
	addq	$2, %r15
	movq	_E1000_ICH8_SHADOW_RAM_WORDS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	jl	LBB0_11
LBB0_23:
	movq	_E1000_ICH_NVM_SIG_WORD@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	leaq	(%r12,%rax), %r15
	decq	%r15
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_e1000_read_flash_dword_ich8lan
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_21
## %bb.24:
	movq	-48(%rbp), %rdx
	andl	$-1073741825, %edx              ## imm = 0xBFFFFFFF
	movq	%rdx, -48(%rbp)
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_e1000_retry_write_flash_dword_ich8lan
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_21
## %bb.25:
	movq	_E1000_ICH_NVM_SIG_WORD@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	leaq	(%rax,%r13), %r15
	decq	%r15
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_e1000_read_flash_dword_ich8lan
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_21
## %bb.26:
	movq	-48(%rbp), %rdx
	andl	$16777215, %edx                 ## imm = 0xFFFFFF
	movq	%rdx, -48(%rbp)
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_e1000_retry_write_flash_dword_ich8lan
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_21
## %bb.27:
	movq	_E1000_ICH8_SHADOW_RAM_WORDS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	jle	LBB0_40
## %bb.28:
	movq	(%r14), %rcx
	cmpq	$4, %rax
	jae	LBB0_30
## %bb.29:
	xorl	%edx, %edx
	jmp	LBB0_38
LBB0_19:
	movq	%rax, %rbx
LBB0_20:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_e_dbg
LBB0_21:
	movq	%r14, %rdi
	callq	*32(%r14)
LBB0_22:
	leaq	L_.str.2(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_e_dbg
LBB0_42:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_30:
	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_32
## %bb.31:
	xorl	%edi, %edi
	jmp	LBB0_34
LBB0_32:
	andq	$-4, %rsi
	xorl	%edi, %edi
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [0,65535,0,65535]
LBB0_33:                                ## =>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_33
LBB0_34:
	testq	%rbx, %rbx
	je	LBB0_37
## %bb.35:
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [0,65535,0,65535]
LBB0_36:                                ## =>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_36
LBB0_37:
	cmpq	%rdx, %rax
	je	LBB0_40
LBB0_38:
	movabsq	$281470681743360, %rsi          ## imm = 0xFFFF00000000
LBB0_39:                                ## =>This Inner Loop Header: Depth=1
	movq	%rsi, (%rcx,%rdx,8)
	incq	%rdx
	cmpq	%rdx, %rax
	jne	LBB0_39
LBB0_40:
	movq	%r14, %rdi
	callq	*32(%r14)
	movq	%r14, %rdi
	callq	*24(%r14)
	movl	$10000, %edi                    ## imm = 0x2710
	movl	$11000, %esi                    ## imm = 0x2AF8
	callq	_usleep_range
LBB0_41:
	xorl	%ebx, %ebx
	jmp	LBB0_42
	.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,4,2     ## @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_spt
.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_spt
_e1000_update_nvm_checksum_spt:         ; @e1000_update_nvm_checksum_spt
	.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	xzr, [sp, #16]
	bl	_e1000e_update_nvm_checksum_generic
	mov	x20, x0
	cbnz	x0, LBB0_30
; %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_38
; %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	x21, [x19, #16]
	mov	x0, x19
	mov	w1, #1
	bl	_e1000_erase_flash_bank_ich8lan
	mov	x20, x0
	cbnz	x0, LBB0_29
; %bb.5:
	mov	x23, #0
	b	LBB0_9
LBB0_6:
	ldr	x8, [sp, #24]
	cbz	x8, LBB0_4
; %bb.7:
	ldr	x23, [x19, #16]
	mov	x0, x19
	mov	w1, #0
	bl	_e1000_erase_flash_bank_ich8lan
	mov	x20, x0
	cbnz	x0, LBB0_29
; %bb.8:
	mov	x21, #0
LBB0_9:
Lloh5:
	adrp	x22, _E1000_ICH8_SHADOW_RAM_WORDS@GOTPAGE
Lloh6:
	ldr	x22, [x22, _E1000_ICH8_SHADOW_RAM_WORDS@GOTPAGEOFF]
	ldr	x8, [x22]
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_20
; %bb.10:
	mov	x25, #0
	mov	x26, #0
Lloh9:
	adrp	x27, _E1000_ICH_NVM_SIG_MASK@GOTPAGE
Lloh10:
	ldr	x27, [x27, _E1000_ICH_NVM_SIG_MASK@GOTPAGEOFF]
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	add	x1, x23, x26
	add	x2, sp, #16
	mov	x0, x19
	bl	_e1000_read_flash_dword_ich8lan
	mov	x20, x0
	ldr	x8, [x19]
	ldr	w9, [x8, x25]
	cbz	w9, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldrh	w9, [sp, #18]
	add	x10, x8, x25
	ldrh	w10, [x10, #4]
	bfi	x10, x9, #16, #16
	str	x10, [sp, #16]
LBB0_13:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x8, x8, x25
	ldr	w9, [x8, #8]
	cbz	w9, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_11 Depth=1
	ldrh	w9, [sp, #16]
	ldr	w8, [x8, #12]
	lsl	w8, w8, #16
	sxtw	x8, w8
	orr	x8, x9, x8
	str	x8, [sp, #16]
LBB0_15:                                ;   in Loop: Header=BB0_11 Depth=1
	cbnz	x20, LBB0_28
; %bb.16:                               ;   in Loop: Header=BB0_11 Depth=1
	ldrsw	x8, [x24]
	sub	x8, x8, #1
	cmp	x26, x8
	b.ne	LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w8, [x27]
	lsl	w8, w8, #16
	sxtw	x8, w8
	ldr	x9, [sp, #16]
	orr	x8, x9, x8
	str	x8, [sp, #16]
LBB0_18:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x20, x21, x26
	mov	w0, #100
	mov	w1, #200
	bl	_usleep_range
	ldr	x2, [sp, #16]
	mov	x0, x19
	mov	x1, x20
	bl	_e1000_retry_write_flash_dword_ich8lan
	cbnz	x0, LBB0_27
; %bb.19:                               ;   in Loop: Header=BB0_11 Depth=1
	add	x26, x26, #2
	ldr	x8, [x22]
	add	x25, x25, #16
	cmp	x26, x8
	b.lt	LBB0_11
LBB0_20:
	ldrsw	x8, [x24]
	add	x8, x21, x8
	sub	x21, x8, #1
	add	x2, sp, #16
	mov	x0, x19
	mov	x1, x21
	bl	_e1000_read_flash_dword_ich8lan
	mov	x20, x0
	cbnz	x0, LBB0_29
; %bb.21:
	ldr	x8, [sp, #16]
	and	x8, x8, #0xffffffff
	and	x2, x8, #0xffffffffbfffffff
	str	x2, [sp, #16]
	mov	x0, x19
	mov	x1, x21
	bl	_e1000_retry_write_flash_dword_ich8lan
	mov	x20, x0
	cbnz	x0, LBB0_29
; %bb.22:
	ldrsw	x8, [x24]
	add	x8, x23, x8
	sub	x21, x8, #1
	add	x2, sp, #16
	mov	x0, x19
	mov	x1, x21
	bl	_e1000_read_flash_dword_ich8lan
	mov	x20, x0
	cbnz	x0, LBB0_29
; %bb.23:
	ldr	x8, [sp, #16]
	and	x2, x8, #0xffffff
	str	x2, [sp, #16]
	mov	x0, x19
	mov	x1, x21
	bl	_e1000_retry_write_flash_dword_ich8lan
	mov	x20, x0
	cbnz	x0, LBB0_29
; %bb.24:
	ldr	x8, [x22]
	cmp	x8, #1
	b.lt	LBB0_37
; %bb.25:
	ldr	x9, [x19]
	cmp	x8, #16
	b.hs	LBB0_32
; %bb.26:
	mov	x10, #0
	b	LBB0_35
LBB0_27:
	mov	x20, x0
LBB0_28:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_e_dbg
LBB0_29:
	ldr	x8, [x19, #32]
	mov	x0, x19
	blr	x8
LBB0_30:
	str	x20, [sp]
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_e_dbg
LBB0_31:
	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_32:
	and	x10, x8, #0xfffffffffffffff0
	add	x11, x9, #64
	movi.2d	v0, #0x00ffff00000000
	mov	x12, x10
LBB0_33:                                ; =>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_33
; %bb.34:
	cmp	x8, x10
	b.eq	LBB0_37
LBB0_35:
	sub	x8, x8, x10
	add	x9, x9, x10, lsl #3
	movi	d0, #0x00ffff00000000
LBB0_36:                                ; =>This Inner Loop Header: Depth=1
	str	d0, [x9], #8
	subs	x8, x8, #1
	b.ne	LBB0_36
LBB0_37:
	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_38:
	mov	x20, #0
	b	LBB0_31
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.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,4,2     ; @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_spt
.subsections_via_symbols
