	.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, -48(%rbp)
	movl	$0, -44(%rbp)
	movl	(%rdi), %eax
	leal	-130(%rax), %ecx
	cmpl	$2, %ecx
	jb	LBB0_7
## %bb.1:
	addl	$-128, %eax
	cmpl	$1, %eax
	ja	LBB0_10
## %bb.2:
	movl	$0, (%r14)
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_e1000_read_flash_dword_ich8lan
	testl	%eax, %eax
	jne	LBB0_17
## %bb.3:
	movl	-48(%rbp), %eax
	shrl	$8, %eax
	movq	_E1000_ICH_NVM_VALID_SIG_MASK@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	andl	%eax, %ecx
	movq	_E1000_ICH_NVM_SIG_VALUE@GOTPCREL(%rip), %r13
	cmpl	(%r13), %ecx
	je	LBB0_12
## %bb.4:
	addl	%r12d, %r15d
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_e1000_read_flash_dword_ich8lan
	testl	%eax, %eax
	jne	LBB0_17
## %bb.5:
	movzbl	-47(%rbp), %eax
	movl	%eax, -44(%rbp)
	movq	_E1000_ICH_NVM_VALID_SIG_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	cmpl	(%r13), %eax
	je	LBB0_15
LBB0_6:
	leaq	L_.str(%rip), %rdi
	callq	_e_dbg
	movq	_E1000_ERR_NVM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_17
LBB0_7:
	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_9
## %bb.8:
	movq	_E1000_EECD_SEC1VAL@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	andl	(%rcx), %eax
	setne	%dl
	movl	%edx, (%r14)
	jmp	LBB0_16
LBB0_9:
	leaq	L_.str.1(%rip), %rdi
	callq	_e_dbg
LBB0_10:
	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_17
## %bb.11:
	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_13
LBB0_12:
	movl	$0, (%r14)
LBB0_16:
	xorl	%eax, %eax
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	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_17
## %bb.14:
	movq	_E1000_ICH_NVM_VALID_SIG_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-44(%rbp), %eax
	cmpl	(%r13), %eax
	jne	LBB0_6
LBB0_15:
	movl	$1, (%r14)
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_E1000_ICH_NVM_SIG_WORD,4,2     ## @E1000_ICH_NVM_SIG_WORD
	.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
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ERROR: No valid NVM bank present\n"

	.comm	_E1000_ERR_NVM,4,2              ## @E1000_ERR_NVM
	.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
L_.str.1:                               ## @.str.1
	.asciz	"Unable to determine valid NVM bank via EEC - reading flash signature\n"

	.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	w21, [x8]
	str	xzr, [sp, #8]
	ldp	w8, w23, [x0]
	sub	w9, w8, #130
	cmp	w9, #2
	b.lo	LBB0_6
; %bb.1:
	sub	w8, w8, #128
	cmp	w8, #1
	b.hi	LBB0_9
; %bb.2:
	str	wzr, [x19]
	add	x2, sp, #12
	mov	x0, x20
	mov	x1, x21
	bl	_e1000_read_flash_dword_ich8lan
	cbnz	w0, LBB0_17
; %bb.3:
	ldr	w8, [sp, #12]
Lloh3:
	adrp	x22, _E1000_ICH_NVM_VALID_SIG_MASK@GOTPAGE
Lloh4:
	ldr	x22, [x22, _E1000_ICH_NVM_VALID_SIG_MASK@GOTPAGEOFF]
	ldrb	w9, [x22]
	and	w8, w9, w8, lsr #8
Lloh5:
	adrp	x24, _E1000_ICH_NVM_SIG_VALUE@GOTPAGE
Lloh6:
	ldr	x24, [x24, _E1000_ICH_NVM_SIG_VALUE@GOTPAGEOFF]
	ldr	w9, [x24]
	cmp	w9, w8
	b.eq	LBB0_11
; %bb.4:
	add	w1, w21, w23
	add	x2, sp, #12
	mov	x0, x20
	bl	_e1000_read_flash_dword_ich8lan
	cbnz	w0, LBB0_17
; %bb.5:
	ldrb	w8, [sp, #13]
	str	w8, [sp, #8]
	ldr	w9, [x22]
	and	w8, w8, w9
	b	LBB0_14
LBB0_6:
Lloh7:
	adrp	x8, _EECD@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EECD@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_er32
Lloh10:
	adrp	x9, _E1000_EECD_SEC1VAL_VALID_MASK@GOTPAGE
Lloh11:
	ldr	x9, [x9, _E1000_EECD_SEC1VAL_VALID_MASK@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	bics	wzr, w9, w0
	b.ne	LBB0_8
; %bb.7:
	mov	x8, x0
	mov	w0, #0
Lloh13:
	adrp	x9, _E1000_EECD_SEC1VAL@GOTPAGE
Lloh14:
	ldr	x9, [x9, _E1000_EECD_SEC1VAL@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w8, ne
	str	w8, [x19]
	b	LBB0_17
LBB0_8:
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_e_dbg
LBB0_9:
	mov	w22, #1
	bfi	w22, w21, #1, #31
	str	wzr, [x19]
	add	x2, sp, #8
	mov	x0, x20
	mov	x1, x22
	bl	_e1000_read_flash_byte_ich8lan
	cbnz	w0, LBB0_17
; %bb.10:
	ldr	w8, [sp, #8]
Lloh18:
	adrp	x21, _E1000_ICH_NVM_VALID_SIG_MASK@GOTPAGE
Lloh19:
	ldr	x21, [x21, _E1000_ICH_NVM_VALID_SIG_MASK@GOTPAGEOFF]
	ldr	w9, [x21]
	and	w8, w9, w8
Lloh20:
	adrp	x24, _E1000_ICH_NVM_SIG_VALUE@GOTPAGE
Lloh21:
	ldr	x24, [x24, _E1000_ICH_NVM_SIG_VALUE@GOTPAGEOFF]
	ldr	w9, [x24]
	cmp	w8, w9
	b.ne	LBB0_12
LBB0_11:
	mov	w0, #0
	str	wzr, [x19]
	b	LBB0_17
LBB0_12:
	lsl	w8, w23, #2
	add	w1, w22, w8
	add	x2, sp, #8
	mov	x0, x20
	bl	_e1000_read_flash_byte_ich8lan
	cbnz	w0, LBB0_17
; %bb.13:
	ldr	w8, [sp, #8]
	ldr	w9, [x21]
	and	w8, w9, w8
LBB0_14:
	ldr	w9, [x24]
	cmp	w8, w9
	b.ne	LBB0_16
; %bb.15:
	mov	w0, #0
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_17
LBB0_16:
Lloh22:
	adrp	x0, l_.str@PAGE
Lloh23:
	add	x0, x0, l_.str@PAGEOFF
	bl	_e_dbg
Lloh24:
	adrp	x8, _E1000_ERR_NVM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _E1000_ERR_NVM@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_17:
	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 AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_E1000_ICH_NVM_SIG_WORD,4,2     ; @E1000_ICH_NVM_SIG_WORD
	.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
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ERROR: No valid NVM bank present\n"

	.comm	_E1000_ERR_NVM,4,2              ; @E1000_ERR_NVM
	.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
l_.str.1:                               ; @.str.1
	.asciz	"Unable to determine valid NVM bank via EEC - reading flash signature\n"

	.no_dead_strip	_e1000_valid_nvm_bank_detect_ich8lan
.subsections_via_symbols
