	.file	"extr_nvm.c_iwl_nvm_init.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Read from NVM\n"
.LC1:
	.string	"OTP is blank\n"
.LC2:
	.string	"nvm version = %x\n"
	.text
	.p2align 4
	.globl	iwl_nvm_init
	.type	iwl_nvm_init, @function
iwl_nvm_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR 48[rdi]
	xor	edi, edi
	mov	rcx, QWORD PTR [rax]
	mov	QWORD PTR 8[rsp], rcx
	mov	ecx, DWORD PTR NVM_MAX_NUM_SECTIONS[rip]
	cmp	DWORD PTR 8[rax], ecx
	setge	dil
	call	WARN_ON_ONCE@PLT
	test	rax, rax
	je	.L2
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	r14, rax
	mov	rax, QWORD PTR 16[r12]
	lea	rsi, .LC0[rip]
	mov	edi, DWORD PTR [rax]
	xor	eax, eax
	call	IWL_DEBUG_EEPROM@PLT
	mov	rax, QWORD PTR 16[r12]
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	mov	rax, QWORD PTR 8[rax]
	mov	rax, QWORD PTR [rax]
	mov	edi, DWORD PTR [rax]
	call	kmalloc@PLT
	mov	r15, rax
	test	rax, rax
	je	.L4
	mov	eax, DWORD PTR NVM_MAX_NUM_SECTIONS[rip]
	xor	ebp, ebp
	test	eax, eax
	jg	.L5
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L29:
	test	ebx, ebx
	js	.L8
	mov	edx, DWORD PTR GFP_KERNEL[rip]
	movsx	rax, ebx
	mov	esi, ebx
	mov	rdi, r15
	add	r14, rax
	call	kmemdup@PLT
	mov	r13, rax
	test	rax, rax
	je	.L28
	mov	rax, QWORD PTR 16[r12]
	mov	esi, ebp
	mov	ecx, ebx
	mov	rdx, r13
	mov	edi, DWORD PTR 4[rax]
	call	iwl_nvm_fixups@PLT
	mov	rax, rbp
	add	rbp, 1
	sal	rax, 4
	add	rax, QWORD PTR 24[r12]
	cmp	DWORD PTR NVM_MAX_NUM_SECTIONS[rip], ebp
	mov	QWORD PTR 8[rax], r13
	mov	DWORD PTR [rax], ebx
	jle	.L8
.L5:
	mov	rcx, r14
	mov	rdx, r15
	mov	esi, ebp
	mov	rdi, r12
	call	iwl_nvm_read_section@PLT
	mov	ebx, eax
	add	eax, DWORD PTR ENODATA[rip]
	jne	.L29
	xor	ebx, ebx
	add	rbp, 1
	cmp	DWORD PTR NVM_MAX_NUM_SECTIONS[rip], ebp
	jg	.L5
	.p2align 4,,10
	.p2align 3
.L8:
	test	r14, r14
	je	.L6
.L10:
	mov	rdi, r15
	call	kfree@PLT
	mov	rsi, QWORD PTR [r12]
	test	rsi, rsi
	je	.L11
	mov	rdx, QWORD PTR 24[r12]
	mov	rdi, QWORD PTR 16[r12]
	call	iwl_read_external_nvm@PLT
	test	eax, eax
	je	.L14
	mov	rcx, QWORD PTR 8[rsp]
	mov	edx, eax
	add	edx, DWORD PTR EFAULT[rip]
	mov	QWORD PTR [r12], rcx
	je	.L13
	mov	ecx, eax
	add	ecx, DWORD PTR ENOENT[rip]
	jne	.L1
.L13:
	mov	rsi, QWORD PTR 8[rsp]
	test	rsi, rsi
	je	.L1
	mov	rdx, QWORD PTR 24[r12]
	mov	rdi, QWORD PTR 16[r12]
	call	iwl_read_external_nvm@PLT
	test	eax, eax
	jne	.L1
.L14:
	xor	ebx, ebx
.L11:
	mov	rdi, r12
	call	iwl_parse_nvm_sections@PLT
	mov	QWORD PTR 8[r12], rax
	test	rax, rax
	je	.L30
	mov	rcx, QWORD PTR 16[r12]
	mov	edx, DWORD PTR [rax]
	lea	rsi, .LC2[rip]
	xor	eax, eax
	mov	edi, DWORD PTR [rcx]
	call	IWL_DEBUG_EEPROM@PLT
	test	ebx, ebx
	mov	eax, 0
	cmovle	eax, ebx
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	lea	rsi, .LC1[rip]
	mov	rdi, r12
	call	IWL_ERR@PLT
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L28:
	mov	ebx, DWORD PTR ENOMEM[rip]
	neg	ebx
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L30:
	mov	eax, DWORD PTR ENODATA[rip]
	neg	eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L4:
	mov	eax, DWORD PTR ENOMEM[rip]
	neg	eax
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	iwl_nvm_init, .-iwl_nvm_init
	.comm	NVM_MAX_NUM_SECTIONS,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	ENOENT,4,4
	.comm	ENODATA,4,4
	.comm	EINVAL,4,4
	.comm	EFAULT,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_nvm.c_iwl_nvm_init.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Read from NVM\012\000"
	.align	2
.LC1:
	.ascii	"OTP is blank\012\000"
	.align	2
.LC2:
	.ascii	"nvm version = %x\012\000"
	.text
	.align	2
	.global	iwl_nvm_init
	.syntax unified
	.arm
	.fpu softvfp
	.type	iwl_nvm_init, %function
iwl_nvm_init:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r2, [r0, #24]
	ldr	r8, .L31
	mov	r5, r0
	ldr	r1, [r8]
	ldr	r0, [r2, #4]
	ldr	r3, [r2]
	cmp	r0, r1
	movlt	r0, #0
	movge	r0, #1
	sub	sp, sp, #12
	str	r3, [sp, #4]
	bl	WARN_ON_ONCE
	subs	r6, r0, #0
	beq	.L2
	ldr	r3, .L31+4
	ldr	r0, [r3]
	rsb	r0, r0, #0
.L1:
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	ldr	r2, [r5, #8]
	ldr	r1, .L31+8
	ldr	r0, [r2]
	bl	IWL_DEBUG_EEPROM
	ldr	r2, [r5, #8]
	ldr	r3, .L31+12
	ldr	r2, [r2, #8]
	ldr	r1, [r3]
	ldr	r2, [r2]
	ldr	r0, [r2]
	bl	kmalloc
	subs	r7, r0, #0
	beq	.L4
	ldr	r2, [r8]
	cmp	r2, #0
	movgt	r4, r6
	ldrgt	r9, .L31+16
	bgt	.L5
	b	.L6
.L29:
	cmp	r0, #0
	blt	.L8
	ldr	r3, .L31+12
	mov	r1, r0
	ldr	r2, [r3]
	mov	r0, r7
	bl	kmemdup
	subs	r10, r0, #0
	add	r6, r6, fp
	beq	.L28
	ldr	r2, [r5, #8]
	mov	r3, fp
	mov	r1, r4
	ldr	r0, [r2, #4]
	mov	r2, r10
	bl	iwl_nvm_fixups
	ldr	r3, [r5, #12]
	add	r2, r3, r4, lsl #3
	str	r10, [r2, #4]
	str	fp, [r3, r4, lsl #3]
	ldr	r3, [r8]
	add	r4, r4, #1
	cmp	r3, r4
	ble	.L8
.L5:
	mov	r3, r6
	mov	r2, r7
	mov	r1, r4
	mov	r0, r5
	bl	iwl_nvm_read_section
	ldr	r3, [r9]
	mov	fp, r0
	cmn	r0, r3
	bne	.L29
	ldr	r3, [r8]
	add	r4, r4, #1
	cmp	r3, r4
	mov	fp, #0
	bgt	.L5
.L8:
	cmp	r6, #0
	beq	.L6
.L10:
	mov	r0, r7
	bl	kfree
	ldr	r1, [r5]
	cmp	r1, #0
	beq	.L11
	ldr	r2, [r5, #12]
	ldr	r0, [r5, #8]
	bl	iwl_read_external_nvm
	cmp	r0, #0
	beq	.L14
	ldr	r3, .L31+20
	ldr	r2, [sp, #4]
	ldr	r3, [r3]
	str	r2, [r5]
	cmn	r0, r3
	beq	.L13
	ldr	r3, .L31+24
	ldr	r3, [r3]
	cmn	r0, r3
	bne	.L1
.L13:
	ldr	r3, [sp, #4]
	cmp	r3, #0
	beq	.L1
	mov	r1, r3
	ldr	r2, [r5, #12]
	ldr	r0, [r5, #8]
	bl	iwl_read_external_nvm
	cmp	r0, #0
	bne	.L1
.L14:
	mov	fp, #0
.L11:
	mov	r0, r5
	bl	iwl_parse_nvm_sections
	cmp	r0, #0
	str	r0, [r5, #4]
	beq	.L30
	ldr	r1, [r5, #8]
	ldr	r2, [r0]
	ldr	r0, [r1]
	ldr	r1, .L31+28
	bl	IWL_DEBUG_EEPROM
	and	r0, fp, fp, asr #31
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L6:
	mov	r0, r5
	ldr	r1, .L31+32
	bl	IWL_ERR
	b	.L10
.L28:
	ldr	r3, .L31+36
	ldr	r3, [r3]
	rsb	fp, r3, #0
	b	.L8
.L30:
	ldr	r3, .L31+16
	ldr	r3, [r3]
	rsb	r0, r3, #0
	b	.L1
.L4:
	ldr	r3, .L31+36
	ldr	r3, [r3]
	rsb	r0, r3, #0
	b	.L1
.L32:
	.align	2
.L31:
	.word	NVM_MAX_NUM_SECTIONS
	.word	EINVAL
	.word	.LC0
	.word	GFP_KERNEL
	.word	ENODATA
	.word	EFAULT
	.word	ENOENT
	.word	.LC2
	.word	.LC1
	.word	ENOMEM
	.size	iwl_nvm_init, .-iwl_nvm_init
	.comm	NVM_MAX_NUM_SECTIONS,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	ENOENT,4,4
	.comm	ENODATA,4,4
	.comm	EINVAL,4,4
	.comm	EFAULT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
