	.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_init_nvm_params_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_init_nvm_params_ich8lan:         ## @e1000_init_nvm_params_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_e1000_nvm_flash_sw@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%rdi)
	movq	16(%rdi), %rax
	movq	_e1000_pch_spt@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_1
## %bb.2:
	cmpq	$0, (%rbx)
	je	LBB0_3
## %bb.4:
	movq	_ICH_FLASH_GFPREG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_er32flash
	movq	_FLASH_GFPREG_BASE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, %edx
	andl	%eax, %edx
	sarl	$16, %eax
	andl	%ecx, %eax
	movq	_FLASH_SECTOR_ADDR_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	subl	%edx, %eax
	shll	%cl, %edx
	movl	%edx, 32(%rbx)
	incl	%eax
	shll	%cl, %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	$4, %ecx
	movl	%ecx, 36(%rbx)
	jmp	LBB0_5
LBB0_1:
	movl	$0, 32(%rbx)
	movq	_STRAP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_er32
	shrl	%eax
	andl	$31, %eax
	incl	%eax
	movq	_NVM_SIZE_MULTIPLIER@GOTPCREL(%rip), %rcx
	imull	(%rcx), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	$4, %ecx
	movl	%ecx, 36(%rbx)
	movq	_E1000_FLASH_BASE_ADDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	8(%rbx), %rax
	movq	%rax, (%rbx)
LBB0_5:
	movq	_E1000_ICH8_SHADOW_RAM_WORDS@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%rcx, 40(%rbx)
	testq	%rcx, %rcx
	je	LBB0_18
## %bb.6:
	movq	24(%rbx), %rdx
	cmpq	$4, %rcx
	jae	LBB0_8
## %bb.7:
	xorl	%esi, %esi
	jmp	LBB0_16
LBB0_8:
	movq	%rcx, %rsi
	andq	$-4, %rsi
	leaq	-4(%rsi), %rdi
	movq	%rdi, %rax
	shrq	$2, %rax
	incq	%rax
	movl	%eax, %ebx
	andl	$3, %ebx
	cmpq	$12, %rdi
	jae	LBB0_10
## %bb.9:
	xorl	%edi, %edi
	jmp	LBB0_12
LBB0_3:
	leaq	L_.str(%rip), %rdi
	callq	_e_dbg
	movq	_E1000_ERR_CONFIG@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_19
LBB0_10:
	andq	$-4, %rax
	xorl	%edi, %edi
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [0,65535,0,65535]
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movups	%xmm0, (%rdx,%rdi,8)
	movups	%xmm0, 16(%rdx,%rdi,8)
	movups	%xmm0, 32(%rdx,%rdi,8)
	movups	%xmm0, 48(%rdx,%rdi,8)
	movups	%xmm0, 64(%rdx,%rdi,8)
	movups	%xmm0, 80(%rdx,%rdi,8)
	movups	%xmm0, 96(%rdx,%rdi,8)
	movups	%xmm0, 112(%rdx,%rdi,8)
	addq	$16, %rdi
	addq	$-4, %rax
	jne	LBB0_11
LBB0_12:
	testq	%rbx, %rbx
	je	LBB0_15
## %bb.13:
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [0,65535,0,65535]
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	leaq	(,%rdi,8), %rax
	orq	$16, %rax
	movups	%xmm0, (%rdx,%rdi,8)
	movups	%xmm0, (%rdx,%rax)
	addq	$4, %rdi
	decq	%rbx
	jne	LBB0_14
LBB0_15:
	xorl	%eax, %eax
	cmpq	%rsi, %rcx
	je	LBB0_19
LBB0_16:
	movabsq	$281470681743360, %rax          ## imm = 0xFFFF00000000
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movq	%rax, (%rdx,%rsi,8)
	incq	%rsi
	cmpq	%rsi, %rcx
	jne	LBB0_17
LBB0_18:
	xorl	%eax, %eax
LBB0_19:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_e1000_nvm_flash_sw,4,2         ## @e1000_nvm_flash_sw
	.comm	_e1000_pch_spt,8,3              ## @e1000_pch_spt
	.comm	_STRAP,4,2                      ## @STRAP
	.comm	_NVM_SIZE_MULTIPLIER,4,2        ## @NVM_SIZE_MULTIPLIER
	.comm	_E1000_FLASH_BASE_ADDR,8,3      ## @E1000_FLASH_BASE_ADDR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ERROR: Flash registers not mapped\n"

	.comm	_E1000_ERR_CONFIG,4,2           ## @E1000_ERR_CONFIG
	.comm	_ICH_FLASH_GFPREG,4,2           ## @ICH_FLASH_GFPREG
	.comm	_FLASH_GFPREG_BASE_MASK,4,2     ## @FLASH_GFPREG_BASE_MASK
	.comm	_FLASH_SECTOR_ADDR_SHIFT,4,2    ## @FLASH_SECTOR_ADDR_SHIFT
	.comm	_E1000_ICH8_SHADOW_RAM_WORDS,8,3 ## @E1000_ICH8_SHADOW_RAM_WORDS
	.no_dead_strip	_e1000_init_nvm_params_ich8lan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function e1000_init_nvm_params_ich8lan
_e1000_init_nvm_params_ich8lan:         ; @e1000_init_nvm_params_ich8lan
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _e1000_nvm_flash_sw@GOTPAGE
Lloh1:
	ldr	x8, [x8, _e1000_nvm_flash_sw@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x0, #48]
	ldr	x8, [x0, #16]
Lloh3:
	adrp	x9, _e1000_pch_spt@GOTPAGE
Lloh4:
	ldr	x9, [x9, _e1000_pch_spt@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_3
; %bb.1:
	ldr	x8, [x19]
	cbz	x8, LBB0_13
; %bb.2:
Lloh6:
	adrp	x8, _ICH_FLASH_GFPREG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ICH_FLASH_GFPREG@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_er32flash
Lloh9:
	adrp	x8, _FLASH_GFPREG_BASE_MASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _FLASH_GFPREG_BASE_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	and	w9, w8, w0
	and	w8, w8, w0, asr #16
Lloh12:
	adrp	x10, _FLASH_SECTOR_ADDR_SHIFT@GOTPAGE
Lloh13:
	ldr	x10, [x10, _FLASH_SECTOR_ADDR_SHIFT@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	lsl	w11, w9, w10
	sub	w8, w8, w9
	add	w8, w8, #1
	lsl	w8, w8, w10
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #4
	stp	w11, w8, [x19, #32]
	b	LBB0_4
LBB0_3:
	str	wzr, [x19, #32]
Lloh15:
	adrp	x8, _STRAP@GOTPAGE
Lloh16:
	ldr	x8, [x8, _STRAP@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_er32
	ubfx	w8, w0, #1, #5
Lloh18:
	adrp	x9, _NVM_SIZE_MULTIPLIER@GOTPAGE
Lloh19:
	ldr	x9, [x9, _NVM_SIZE_MULTIPLIER@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	madd	w8, w9, w8, w9
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #4
	str	w8, [x19, #36]
	ldr	x8, [x19, #8]
Lloh21:
	adrp	x9, _E1000_FLASH_BASE_ADDR@GOTPAGE
Lloh22:
	ldr	x9, [x9, _E1000_FLASH_BASE_ADDR@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	add	x8, x9, x8
	str	x8, [x19]
LBB0_4:
Lloh24:
	adrp	x8, _E1000_ICH8_SHADOW_RAM_WORDS@GOTPAGE
Lloh25:
	ldr	x8, [x8, _E1000_ICH8_SHADOW_RAM_WORDS@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	str	x8, [x19, #40]
	cbz	x8, LBB0_12
; %bb.5:
	ldr	x9, [x19, #24]
	cmp	x8, #16
	b.hs	LBB0_7
; %bb.6:
	mov	x10, #0
	b	LBB0_10
LBB0_7:
	and	x10, x8, #0xfffffffffffffff0
	add	x11, x9, #64
	movi.2d	v0, #0x00ffff00000000
	mov	x12, x10
LBB0_8:                                 ; =>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_8
; %bb.9:
	cmp	x8, x10
	b.eq	LBB0_12
LBB0_10:
	sub	x8, x8, x10
	add	x9, x9, x10, lsl #3
	movi	d0, #0x00ffff00000000
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	str	d0, [x9], #8
	subs	x8, x8, #1
	b.ne	LBB0_11
LBB0_12:
	mov	w0, #0
	b	LBB0_14
LBB0_13:
Lloh27:
	adrp	x0, l_.str@PAGE
Lloh28:
	add	x0, x0, l_.str@PAGEOFF
	bl	_e_dbg
Lloh29:
	adrp	x8, _E1000_ERR_CONFIG@GOTPAGE
Lloh30:
	ldr	x8, [x8, _E1000_ERR_CONFIG@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_14:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_e1000_nvm_flash_sw,4,2         ; @e1000_nvm_flash_sw
	.comm	_e1000_pch_spt,8,3              ; @e1000_pch_spt
	.comm	_STRAP,4,2                      ; @STRAP
	.comm	_NVM_SIZE_MULTIPLIER,4,2        ; @NVM_SIZE_MULTIPLIER
	.comm	_E1000_FLASH_BASE_ADDR,8,3      ; @E1000_FLASH_BASE_ADDR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ERROR: Flash registers not mapped\n"

	.comm	_E1000_ERR_CONFIG,4,2           ; @E1000_ERR_CONFIG
	.comm	_ICH_FLASH_GFPREG,4,2           ; @ICH_FLASH_GFPREG
	.comm	_FLASH_GFPREG_BASE_MASK,4,2     ; @FLASH_GFPREG_BASE_MASK
	.comm	_FLASH_SECTOR_ADDR_SHIFT,4,2    ; @FLASH_SECTOR_ADDR_SHIFT
	.comm	_E1000_ICH8_SHADOW_RAM_WORDS,8,3 ; @E1000_ICH8_SHADOW_RAM_WORDS
	.no_dead_strip	_e1000_init_nvm_params_ich8lan
.subsections_via_symbols
