	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iwl_nvm_init                   ## -- Begin function iwl_nvm_init
	.p2align	4, 0x90
_iwl_nvm_init:                          ## @iwl_nvm_init
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	48(%rdi), %rax
	movq	(%rax), %r14
	movl	8(%rax), %eax
	movq	_NVM_MAX_NUM_SECTIONS@GOTPCREL(%rip), %r12
	xorl	%edi, %edi
	cmpl	(%r12), %eax
	setge	%dil
	callq	_WARN_ON_ONCE
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r13d, %r13d
LBB0_3:
	subl	(%rax), %r13d
LBB0_4:
	movl	%r13d, %eax
LBB0_5:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	16(%rbx), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_IWL_DEBUG_EEPROM
	movq	16(%rbx), %rax
	movq	8(%rax), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_15
## %bb.7:
	cmpl	$0, (%r12)
	jle	LBB0_16
## %bb.8:
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movl	$8, %r15d
	xorl	%r14d, %r14d
	movq	_ENODATA@GOTPCREL(%rip), %rbx
	xorl	%r13d, %r13d
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_11 Depth=1
	xorl	%eax, %eax
LBB0_10:                                ##   in Loop: Header=BB0_11 Depth=1
	incq	%r14
	movslq	(%r12), %rcx
	addq	$16, %r15
	cmpq	%rcx, %r14
	jge	LBB0_18
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	%r13, %rcx
	callq	_iwl_nvm_read_section
	movl	(%rbx), %ecx
	addl	%eax, %ecx
	je	LBB0_9
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	testl	%eax, %eax
	js	LBB0_18
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	%r13, %rbx
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movl	%eax, %ecx
	addq	%rcx, %rbx
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %ebx
	movl	%eax, %esi
	callq	_kmemdup
	testq	%rax, %rax
	je	LBB0_17
## %bb.14:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	%rax, %r12
	movq	16(%r13), %rax
	movl	4(%rax), %edi
	movl	%r14d, %esi
	movq	%r12, %rdx
	movl	%ebx, %ecx
	callq	_iwl_nvm_fixups
	movq	24(%r13), %rax
	movq	%r12, (%rax,%r15)
	movl	%ebx, -8(%rax,%r15)
	movl	%ebx, %eax
	movq	_NVM_MAX_NUM_SECTIONS@GOTPCREL(%rip), %r12
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movq	_ENODATA@GOTPCREL(%rip), %rbx
	jmp	LBB0_10
LBB0_15:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_16:
                                        ## implicit-def: $r15d
	jmp	LBB0_19
LBB0_17:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	movq	-64(%rbp), %r13                 ## 8-byte Reload
LBB0_18:
	movl	%eax, %r15d
	testq	%r13, %r13
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	jne	LBB0_20
LBB0_19:
	leaq	L_.str.1(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_IWL_ERR
LBB0_20:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_kfree
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_27
## %bb.21:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	16(%rax), %rdi
	movq	24(%rax), %rdx
	callq	_iwl_read_external_nvm
	testl	%eax, %eax
	je	LBB0_26
## %bb.22:
	movl	%eax, %r13d
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%r14, (%rax)
	movq	_EFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r13d, %eax
	je	LBB0_24
## %bb.23:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r13d, %eax
	jne	LBB0_4
LBB0_24:
	xorl	%r15d, %r15d
	testq	%r14, %r14
	je	LBB0_4
## %bb.25:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	16(%rax), %rdi
	movq	24(%rax), %rdx
	movq	%r14, %rsi
	callq	_iwl_read_external_nvm
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_4
	jmp	LBB0_27
LBB0_26:
	xorl	%r15d, %r15d
LBB0_27:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_iwl_parse_nvm_sections
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	je	LBB0_29
## %bb.28:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	16(%rcx), %rcx
	movl	(%rcx), %edi
	movl	(%rax), %edx
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_IWL_DEBUG_EEPROM
	movl	%r15d, %eax
	sarl	$31, %eax
	andl	%r15d, %eax
	jmp	LBB0_5
LBB0_29:
	movq	_ENODATA@GOTPCREL(%rip), %rax
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_NVM_MAX_NUM_SECTIONS,4,2       ## @NVM_MAX_NUM_SECTIONS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Read from NVM\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ENODATA,4,2                    ## @ENODATA
L_.str.1:                               ## @.str.1
	.asciz	"OTP is blank\n"

	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_ENOENT,4,2                     ## @ENOENT
L_.str.2:                               ## @.str.2
	.asciz	"nvm version = %x\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iwl_nvm_init                   ; -- Begin function iwl_nvm_init
	.p2align	2
_iwl_nvm_init:                          ; @iwl_nvm_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldr	x8, [x0, #48]
	ldr	x20, [x8]
	ldr	w8, [x8, #8]
Lloh0:
	adrp	x26, _NVM_MAX_NUM_SECTIONS@GOTPAGE
Lloh1:
	ldr	x26, [x26, _NVM_MAX_NUM_SECTIONS@GOTPAGEOFF]
	ldr	w9, [x26]
	cmp	w8, w9
	cset	w0, ge
	bl	_WARN_ON_ONCE
	cbz	x0, LBB0_4
; %bb.1:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_4:
	ldr	x8, [x19, #16]
	ldr	w0, [x8]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	bl	_IWL_DEBUG_EEPROM
	ldr	x8, [x19, #16]
	ldr	x8, [x8, #8]
	ldr	x8, [x8]
	ldr	w0, [x8]
Lloh6:
	adrp	x27, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x27, [x27, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x27]
	bl	_kmalloc
	cbz	x0, LBB0_13
; %bb.5:
	mov	x21, x0
	ldr	w8, [x26]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.6:
	str	x20, [sp, #8]                   ; 8-byte Folded Spill
	mov	x28, #0
	mov	x24, #0
	mov	x23, #0
Lloh8:
	adrp	x20, _ENODATA@GOTPAGE
Lloh9:
	ldr	x20, [x20, _ENODATA@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=1
	mov	w22, #0
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x24, x24, #1
	ldrsw	x8, [x26]
	add	x28, x28, #16
	cmp	x24, x8
	b.ge	LBB0_16
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x24
	mov	x2, x21
	mov	x3, x23
	bl	_iwl_nvm_read_section
	ldr	w8, [x20]
	cmn	w0, w8
	b.eq	LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x22, x0
	tbnz	w0, #31, LBB0_16
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x23, x23, w22, uxtw
	ldr	w2, [x27]
	mov	x0, x21
	mov	x1, x22
	bl	_kmemdup
	cbz	x0, LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x25, x0
	ldr	x8, [x19, #16]
	ldr	w0, [x8, #4]
	mov	x1, x24
	mov	x2, x25
	mov	x3, x22
	bl	_iwl_nvm_fixups
	ldr	x8, [x19, #24]
	add	x8, x8, x28
	str	x25, [x8, #8]
	str	w22, [x8]
	b	LBB0_8
LBB0_13:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_2
LBB0_14:
                                        ; implicit-def: $w22
	b	LBB0_17
LBB0_15:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_16:
	ldr	x20, [sp, #8]                   ; 8-byte Folded Reload
	cbnz	x23, LBB0_18
LBB0_17:
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_IWL_ERR
LBB0_18:
	mov	x0, x21
	bl	_kfree
	ldr	x1, [x19]
	cbz	x1, LBB0_25
; %bb.19:
	ldp	x0, x2, [x19, #16]
	bl	_iwl_read_external_nvm
	cbz	w0, LBB0_24
; %bb.20:
	str	x20, [x19]
Lloh17:
	adrp	x8, _EFAULT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	cmn	w0, w8
	b.ne	LBB0_22
; %bb.21:
	cbnz	x20, LBB0_23
	b	LBB0_3
LBB0_22:
Lloh20:
	adrp	x8, _ENOENT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	cmn	w0, w8
	ccmp	x20, #0, #4, eq
	b.eq	LBB0_3
LBB0_23:
	ldp	x0, x2, [x19, #16]
	mov	x1, x20
	bl	_iwl_read_external_nvm
	cbnz	w0, LBB0_3
LBB0_24:
	mov	w22, #0
LBB0_25:
	mov	x0, x19
	bl	_iwl_parse_nvm_sections
	str	x0, [x19, #8]
	cbz	x0, LBB0_27
; %bb.26:
	ldr	x8, [x19, #16]
	ldr	w8, [x8]
	ldr	w9, [x0]
	str	x9, [sp]
Lloh23:
	adrp	x1, l_.str.2@PAGE
Lloh24:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x8
	bl	_IWL_DEBUG_EEPROM
	cmp	w22, #0
	csel	w0, w22, wzr, lt
	b	LBB0_3
LBB0_27:
Lloh25:
	adrp	x8, _ENODATA@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENODATA@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_NVM_MAX_NUM_SECTIONS,4,2       ; @NVM_MAX_NUM_SECTIONS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Read from NVM\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ENODATA,4,2                    ; @ENODATA
l_.str.1:                               ; @.str.1
	.asciz	"OTP is blank\n"

	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_ENOENT,4,2                     ; @ENOENT
l_.str.2:                               ; @.str.2
	.asciz	"nvm version = %x\n"

.subsections_via_symbols
