	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function e1000_valid_nvm_bank_detect_ich8lan
_e1000_valid_nvm_bank_detect_ich8lan:   ## @e1000_valid_nvm_bank_detect_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
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	4(%rdi), %r12d
	movq	_E1000_ICH_NVM_SIG_WORD@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	$0, -44(%rbp)
	movl	(%rdi), %eax
	andl	$-2, %eax
	cmpl	$128, %eax
	jne	LBB0_4
## %bb.1:
	movq	_EECD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_er32
	movq	_E1000_EECD_SEC1VAL_VALID_MASK@GOTPCREL(%rip), %rcx
	movl	%eax, %edx
	notl	%edx
	testl	%edx, (%rcx)
	jne	LBB0_3
## %bb.2:
	movq	_E1000_EECD_SEC1VAL@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	andl	(%rcx), %eax
	setne	%dl
	movl	%edx, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_3:
	leaq	L_.str(%rip), %rdi
	callq	_e_dbg
LBB0_4:
	addl	%r15d, %r15d
	incl	%r15d
	movl	$0, (%r14)
	leaq	-44(%rbp), %rdx
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_e1000_read_flash_byte_ich8lan
	testl	%eax, %eax
	jne	LBB0_11
## %bb.5:
	movq	_E1000_ICH_NVM_VALID_SIG_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-44(%rbp), %eax
	movq	_E1000_ICH_NVM_SIG_VALUE@GOTPCREL(%rip), %r13
	cmpl	(%r13), %eax
	jne	LBB0_7
## %bb.6:
	movl	$0, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_7:
	shll	$2, %r12d
	addl	%r12d, %r15d
	leaq	-44(%rbp), %rdx
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_e1000_read_flash_byte_ich8lan
	testl	%eax, %eax
	jne	LBB0_11
## %bb.8:
	movq	_E1000_ICH_NVM_VALID_SIG_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-44(%rbp), %eax
	cmpl	(%r13), %eax
	jne	LBB0_10
## %bb.9:
	movl	$1, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_10:
	leaq	L_.str.1(%rip), %rdi
	callq	_e_dbg
	movq	_E1000_ERR_NVM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_E1000_ICH_NVM_SIG_WORD,4,2     ## @E1000_ICH_NVM_SIG_WORD
	.comm	_EECD,4,2                       ## @EECD
	.comm	_E1000_EECD_SEC1VAL_VALID_MASK,4,2 ## @E1000_EECD_SEC1VAL_VALID_MASK
	.comm	_E1000_EECD_SEC1VAL,4,2         ## @E1000_EECD_SEC1VAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to determine valid NVM bank via EEC - reading flash signature\n"

	.comm	_E1000_ICH_NVM_VALID_SIG_MASK,4,2 ## @E1000_ICH_NVM_VALID_SIG_MASK
	.comm	_E1000_ICH_NVM_SIG_VALUE,4,2    ## @E1000_ICH_NVM_SIG_VALUE
L_.str.1:                               ## @.str.1
	.asciz	"ERROR: No valid NVM bank present\n"

	.comm	_E1000_ERR_NVM,4,2              ## @E1000_ERR_NVM
	.no_dead_strip	_e1000_valid_nvm_bank_detect_ich8lan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function e1000_valid_nvm_bank_detect_ich8lan
_e1000_valid_nvm_bank_detect_ich8lan:   ; @e1000_valid_nvm_bank_detect_ich8lan
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _E1000_ICH_NVM_SIG_WORD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _E1000_ICH_NVM_SIG_WORD@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
	str	wzr, [sp, #12]
	ldp	w8, w22, [x0]
	and	w8, w8, #0xfffffffe
	cmp	w8, #128
	b.ne	LBB0_4
; %bb.1:
Lloh3:
	adrp	x8, _EECD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EECD@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_er32
Lloh6:
	adrp	x9, _E1000_EECD_SEC1VAL_VALID_MASK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _E1000_EECD_SEC1VAL_VALID_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	bics	wzr, w9, w0
	b.ne	LBB0_3
; %bb.2:
	mov	x8, x0
	mov	w0, #0
Lloh9:
	adrp	x9, _E1000_EECD_SEC1VAL@GOTPAGE
Lloh10:
	ldr	x9, [x9, _E1000_EECD_SEC1VAL@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w8, ne
	str	w8, [x19]
	b	LBB0_11
LBB0_3:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_e_dbg
LBB0_4:
	mov	w21, #1
	bfi	w21, w23, #1, #31
	str	wzr, [x19]
	add	x2, sp, #12
	mov	x0, x20
	mov	x1, x21
	bl	_e1000_read_flash_byte_ich8lan
	cbnz	w0, LBB0_11
; %bb.5:
	ldr	w8, [sp, #12]
Lloh14:
	adrp	x23, _E1000_ICH_NVM_VALID_SIG_MASK@GOTPAGE
Lloh15:
	ldr	x23, [x23, _E1000_ICH_NVM_VALID_SIG_MASK@GOTPAGEOFF]
	ldr	w9, [x23]
	and	w8, w9, w8
Lloh16:
	adrp	x24, _E1000_ICH_NVM_SIG_VALUE@GOTPAGE
Lloh17:
	ldr	x24, [x24, _E1000_ICH_NVM_SIG_VALUE@GOTPAGEOFF]
	ldr	w9, [x24]
	cmp	w8, w9
	b.ne	LBB0_7
; %bb.6:
	mov	w0, #0
	str	wzr, [x19]
	b	LBB0_11
LBB0_7:
	lsl	w8, w22, #2
	add	w1, w21, w8
	add	x2, sp, #12
	mov	x0, x20
	bl	_e1000_read_flash_byte_ich8lan
	cbnz	w0, LBB0_11
; %bb.8:
	ldr	w8, [sp, #12]
	ldr	w9, [x23]
	and	w8, w9, w8
	ldr	w9, [x24]
	cmp	w8, w9
	b.ne	LBB0_10
; %bb.9:
	mov	w0, #0
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_11
LBB0_10:
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_e_dbg
Lloh20:
	adrp	x8, _E1000_ERR_NVM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _E1000_ERR_NVM@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_E1000_ICH_NVM_SIG_WORD,4,2     ; @E1000_ICH_NVM_SIG_WORD
	.comm	_EECD,4,2                       ; @EECD
	.comm	_E1000_EECD_SEC1VAL_VALID_MASK,4,2 ; @E1000_EECD_SEC1VAL_VALID_MASK
	.comm	_E1000_EECD_SEC1VAL,4,2         ; @E1000_EECD_SEC1VAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to determine valid NVM bank via EEC - reading flash signature\n"

	.comm	_E1000_ICH_NVM_VALID_SIG_MASK,4,2 ; @E1000_ICH_NVM_VALID_SIG_MASK
	.comm	_E1000_ICH_NVM_SIG_VALUE,4,2    ; @E1000_ICH_NVM_SIG_VALUE
l_.str.1:                               ; @.str.1
	.asciz	"ERROR: No valid NVM bank present\n"

	.comm	_E1000_ERR_NVM,4,2              ; @E1000_ERR_NVM
	.no_dead_strip	_e1000_valid_nvm_bank_detect_ich8lan
.subsections_via_symbols
