	.file	"extr_ice_nvm.c_ice_init_nvm.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"NVM init error: unsupported blank mode.\n"
	.align 8
.LC1:
	.string	"Failed to read DEV starter version.\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"Failed to read EETRACK lo.\n"
.LC3:
	.string	"Failed to read EETRACK hi.\n"
	.text
	.p2align 4
	.globl	ice_init_nvm
	.type	ice_init_nvm, @function
ice_init_nvm:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	sub	rsp, 24
	.cfi_def_cfa_offset 48
	mov	esi, DWORD PTR GLNVM_GENS[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	rd32@PLT
	mov	ecx, DWORD PTR GLNVM_GENS_SR_SIZE_S[rip]
	and	eax, DWORD PTR GLNVM_GENS_SR_SIZE_M[rip]
	sar	eax, cl
	mov	edi, eax
	call	BIT@PLT
	imul	eax, DWORD PTR ICE_SR_WORDS_IN_1KB[rip]
	mov	esi, DWORD PTR GLNVM_FLA[rip]
	mov	rdi, rbp
	mov	DWORD PTR 0[rbp], eax
	call	rd32@PLT
	test	DWORD PTR GLNVM_FLA_LOCKED_M[rip], eax
	je	.L2
	mov	DWORD PTR 4[rbp], 0
	mov	esi, DWORD PTR ICE_SR_NVM_DEV_STARTER_VER[rip]
	lea	rdx, 8[rbp]
	mov	rdi, rbp
	call	ice_read_sr_word@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L12
	mov	esi, DWORD PTR ICE_SR_NVM_EETRACK_LO[rip]
	mov	rdx, rsp
	mov	rdi, rbp
	call	ice_read_sr_word@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L13
	mov	esi, DWORD PTR ICE_SR_NVM_EETRACK_HI[rip]
	lea	rdx, 4[rsp]
	mov	rdi, rbp
	call	ice_read_sr_word@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L14
	mov	eax, DWORD PTR 4[rsp]
	sal	eax, 16
	or	eax, DWORD PTR [rsp]
	mov	DWORD PTR 12[rbp], eax
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L15
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	mov	esi, DWORD PTR ICE_DBG_INIT[rip]
	lea	rdx, .LC1[rip]
	mov	rdi, rbp
	call	ice_debug@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L2:
	mov	DWORD PTR 4[rbp], 1
	mov	esi, DWORD PTR ICE_DBG_NVM[rip]
	mov	rdi, rbp
	lea	rdx, .LC0[rip]
	mov	r12d, DWORD PTR ICE_ERR_NVM_BLANK_MODE[rip]
	call	ice_debug@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L13:
	mov	esi, DWORD PTR ICE_DBG_INIT[rip]
	lea	rdx, .LC2[rip]
	mov	rdi, rbp
	call	ice_debug@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L14:
	mov	esi, DWORD PTR ICE_DBG_INIT[rip]
	lea	rdx, .LC3[rip]
	mov	rdi, rbp
	call	ice_debug@PLT
	jmp	.L1
.L15:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ice_init_nvm, .-ice_init_nvm
	.comm	ICE_SR_WORDS_IN_1KB,4,4
	.comm	ICE_SR_NVM_EETRACK_LO,4,4
	.comm	ICE_SR_NVM_EETRACK_HI,4,4
	.comm	ICE_SR_NVM_DEV_STARTER_VER,4,4
	.comm	ICE_ERR_NVM_BLANK_MODE,4,4
	.comm	ICE_DBG_NVM,4,4
	.comm	ICE_DBG_INIT,4,4
	.comm	GLNVM_GENS_SR_SIZE_S,4,4
	.comm	GLNVM_GENS_SR_SIZE_M,4,4
	.comm	GLNVM_GENS,4,4
	.comm	GLNVM_FLA_LOCKED_M,4,4
	.comm	GLNVM_FLA,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_ice_nvm.c_ice_init_nvm.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"NVM init error: unsupported blank mode.\012\000"
	.align	2
.LC1:
	.ascii	"Failed to read DEV starter version.\012\000"
	.align	2
.LC2:
	.ascii	"Failed to read EETRACK lo.\012\000"
	.align	2
.LC3:
	.ascii	"Failed to read EETRACK hi.\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	ice_init_nvm
	.syntax unified
	.arm
	.fpu softvfp
	.type	ice_init_nvm, %function
ice_init_nvm:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, lr}
	ldr	r3, .L16
	ldr	r2, .L16+4
	ldr	r1, [r3]
	sub	sp, sp, #20
	mov	r4, r0
	ldr	r2, [r2]
	str	r2, [sp, #12]
	mov	r2,#0
	bl	rd32
	ldr	r2, .L16+8
	ldr	r3, .L16+12
	ldr	r2, [r2]
	ldr	r3, [r3]
	and	r0, r0, r2
	asr	r0, r0, r3
	bl	BIT
	mov	r1, r0
	ldr	r3, .L16+16
	ldr	r2, .L16+20
	ldr	r3, [r3]
	mov	r0, r4
	mul	r3, r1, r3
	ldr	r1, [r2]
	str	r3, [r4]
	bl	rd32
	ldr	r3, .L16+24
	ldr	r3, [r3]
	tst	r0, r3
	beq	.L2
	mov	r2, #0
	ldr	r3, .L16+28
	str	r2, [r4, #4]
	mov	r0, r4
	ldr	r1, [r3]
	add	r2, r4, #8
	bl	ice_read_sr_word
	subs	r5, r0, #0
	bne	.L12
	ldr	r3, .L16+32
	mov	r0, r4
	ldr	r1, [r3]
	add	r2, sp, #4
	bl	ice_read_sr_word
	subs	r5, r0, #0
	bne	.L13
	ldr	r3, .L16+36
	mov	r0, r4
	ldr	r1, [r3]
	add	r2, sp, #8
	bl	ice_read_sr_word
	subs	r5, r0, #0
	bne	.L14
	ldr	r2, [sp, #8]
	ldr	r3, [sp, #4]
	orr	r3, r3, r2, lsl #16
	str	r3, [r4, #12]
.L1:
	ldr	r3, .L16+4
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L15
	mov	r0, r5
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, pc}
.L12:
	ldr	r3, .L16+40
	mov	r0, r4
	ldr	r1, [r3]
	ldr	r2, .L16+44
	bl	ice_debug
	b	.L1
.L2:
	mov	r1, #1
	ldr	r2, .L16+48
	ldr	r3, .L16+52
	str	r1, [r4, #4]
	mov	r0, r4
	ldr	r1, [r2]
	ldr	r2, .L16+56
	ldr	r5, [r3]
	bl	ice_debug
	b	.L1
.L13:
	ldr	r3, .L16+40
	mov	r0, r4
	ldr	r1, [r3]
	ldr	r2, .L16+60
	bl	ice_debug
	b	.L1
.L14:
	ldr	r3, .L16+40
	mov	r0, r4
	ldr	r1, [r3]
	ldr	r2, .L16+64
	bl	ice_debug
	b	.L1
.L15:
	bl	__stack_chk_fail
.L17:
	.align	2
.L16:
	.word	GLNVM_GENS
	.word	.LC4
	.word	GLNVM_GENS_SR_SIZE_M
	.word	GLNVM_GENS_SR_SIZE_S
	.word	ICE_SR_WORDS_IN_1KB
	.word	GLNVM_FLA
	.word	GLNVM_FLA_LOCKED_M
	.word	ICE_SR_NVM_DEV_STARTER_VER
	.word	ICE_SR_NVM_EETRACK_LO
	.word	ICE_SR_NVM_EETRACK_HI
	.word	ICE_DBG_INIT
	.word	.LC1
	.word	ICE_DBG_NVM
	.word	ICE_ERR_NVM_BLANK_MODE
	.word	.LC0
	.word	.LC2
	.word	.LC3
	.size	ice_init_nvm, .-ice_init_nvm
	.comm	ICE_SR_WORDS_IN_1KB,4,4
	.comm	ICE_SR_NVM_EETRACK_LO,4,4
	.comm	ICE_SR_NVM_EETRACK_HI,4,4
	.comm	ICE_SR_NVM_DEV_STARTER_VER,4,4
	.comm	ICE_ERR_NVM_BLANK_MODE,4,4
	.comm	ICE_DBG_NVM,4,4
	.comm	ICE_DBG_INIT,4,4
	.comm	GLNVM_GENS_SR_SIZE_S,4,4
	.comm	GLNVM_GENS_SR_SIZE_M,4,4
	.comm	GLNVM_GENS,4,4
	.comm	GLNVM_FLA_LOCKED_M,4,4
	.comm	GLNVM_FLA,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
