	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qed_mcp_nvm_info_populate      ## -- Begin function qed_mcp_nvm_info_populate
	.p2align	4, 0x90
_qed_mcp_nvm_info_populate:             ## @qed_mcp_nvm_info_populate
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%r15d, %r15d
	cmpl	$0, (%rdi)
	jne	LBB0_20
## %bb.1:
	movq	%rdi, %rbx
	callq	_qed_ptt_acquire
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %r13
	movq	$0, -56(%rbp)
	leaq	-56(%rbp), %rdx
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_qed_mcp_bist_nvm_get_num_images
	movl	%eax, %r12d
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r12d, %eax
	jne	LBB0_7
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_DP_INFO
	movq	-56(%rbp), %rax
LBB0_5:
	testq	%rax, %rax
	je	LBB0_19
## %bb.6:
	movq	%rax, 8(%rbx)
	movq	16(%rbx), %rdi
	callq	_kfree
	movq	-48(%rbp), %rax
	movq	%rax, 16(%rbx)
	movl	$1, (%rbx)
	jmp	LBB0_19
LBB0_2:
	leaq	L_.str(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_DP_ERR
	movq	_EBUSY@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_20
LBB0_7:
	testl	%r12d, %r12d
	jne	LBB0_9
## %bb.8:
	movq	-56(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.10:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$4, %esi
	callq	_kmalloc_array
	movq	%rax, -48(%rbp)
	testq	%rax, %rax
	je	LBB0_18
## %bb.11:
	cmpq	$0, -56(%rbp)
	je	LBB0_19
## %bb.12:
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, %rsi
	movq	%rax, %rdx
	xorl	%ecx, %ecx
	callq	_qed_mcp_bist_nvm_get_image_att
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_17
## %bb.13:
	movl	$4, %r14d
	xorl	%r12d, %r12d
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	_QED_MSG_SP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-48(%rbp), %rax
	movl	(%rax,%r12,4), %r8d
	movq	%rbx, %rdi
	leaq	L_.str.4(%rip), %rdx
	movq	%r12, %rcx
	callq	_DP_VERBOSE
	incq	%r12
	movq	-56(%rbp), %rax
	cmpq	%rax, %r12
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	jae	LBB0_5
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	-48(%rbp), %rdx
	addq	%r14, %rdx
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movq	%r12, %rcx
	callq	_qed_mcp_bist_nvm_get_image_att
	addq	$4, %r14
	testl	%eax, %eax
	je	LBB0_14
## %bb.16:
	movl	%eax, %r13d
LBB0_17:
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_DP_ERR
	movq	-48(%rbp), %rdi
	callq	_kfree
	movl	%r13d, %r15d
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_19
LBB0_9:
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_DP_ERR
	movl	%r12d, %r15d
	jmp	LBB0_19
LBB0_18:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_19:
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_qed_ptt_release
LBB0_20:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to acquire ptt\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
L_.str.1:                               ## @.str.1
	.asciz	"DRV_MSG_CODE_BIST_TEST is not supported\n"

L_.str.2:                               ## @.str.2
	.asciz	"Failed getting number of images\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.3:                               ## @.str.3
	.asciz	"Failed getting image index %d attributes\n"

	.comm	_QED_MSG_SP,4,2                 ## @QED_MSG_SP
L_.str.4:                               ## @.str.4
	.asciz	"image index %d, size %x\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qed_mcp_nvm_info_populate      ; -- Begin function qed_mcp_nvm_info_populate
	.p2align	2
_qed_mcp_nvm_info_populate:             ; @qed_mcp_nvm_info_populate
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	ldr	w8, [x0]
	cbz	w8, LBB0_3
LBB0_1:
	mov	w21, #0
LBB0_2:
	mov	x0, x21
	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
	add	sp, sp, #112
	ret
LBB0_3:
	mov	x19, x0
	bl	_qed_ptt_acquire
	cbz	x0, LBB0_9
; %bb.4:
	mov	x20, x0
	str	xzr, [sp, #16]
	add	x2, sp, #16
	mov	x0, x19
	mov	x1, x20
	bl	_qed_mcp_bist_nvm_get_num_images
Lloh0:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmn	w0, w8
	b.ne	LBB0_10
; %bb.5:
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_DP_INFO
	ldr	x8, [sp, #16]
LBB0_6:
	cbz	x8, LBB0_8
; %bb.7:
	str	x8, [x19, #8]
	ldr	x0, [x19, #16]
	bl	_kfree
	ldr	x8, [sp, #24]
	str	x8, [x19, #16]
	mov	w8, #1
	str	w8, [x19]
LBB0_8:
	mov	x0, x19
	mov	x1, x20
	bl	_qed_ptt_release
	b	LBB0_1
LBB0_9:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_DP_ERR
Lloh7:
	adrp	x8, _EBUSY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_2
LBB0_10:
	mov	x21, x0
	cbnz	w0, LBB0_16
; %bb.11:
	ldr	x0, [sp, #16]
	cbz	x0, LBB0_16
; %bb.12:
Lloh10:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	mov	w1, #4
	bl	_kmalloc_array
	str	x0, [sp, #24]
	cbz	x0, LBB0_17
; %bb.13:
	ldr	x8, [sp, #16]
	cbz	x8, LBB0_8
; %bb.14:
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	mov	x3, #0
	bl	_qed_mcp_bist_nvm_get_image_att
	cbz	w0, LBB0_18
; %bb.15:
	mov	x21, x0
	mov	x22, #0
	b	LBB0_22
LBB0_16:
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_DP_ERR
	b	LBB0_23
LBB0_17:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_23
LBB0_18:
	mov	x22, #0
	mov	w24, #4
Lloh18:
	adrp	x25, _QED_MSG_SP@GOTPAGE
Lloh19:
	ldr	x25, [x25, _QED_MSG_SP@GOTPAGEOFF]
Lloh20:
	adrp	x23, l_.str.4@PAGE
Lloh21:
	add	x23, x23, l_.str.4@PAGEOFF
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x25]
	ldr	x8, [sp, #24]
	ldr	w4, [x8, x22, lsl #2]
	mov	x0, x19
	mov	x2, x23
	mov	x3, x22
	bl	_DP_VERBOSE
	add	x22, x22, #1
	ldr	x8, [sp, #16]
	cmp	x22, x8
	b.hs	LBB0_6
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=1
	ldr	x8, [sp, #24]
	add	x2, x8, x24
	mov	x0, x19
	mov	x1, x20
	mov	x3, x22
	bl	_qed_mcp_bist_nvm_get_image_att
	add	x24, x24, #4
	cbz	w0, LBB0_19
; %bb.21:
	mov	x21, x0
LBB0_22:
	str	x22, [sp]
Lloh22:
	adrp	x1, l_.str.3@PAGE
Lloh23:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_DP_ERR
	ldr	x0, [sp, #24]
	bl	_kfree
LBB0_23:
	mov	x0, x19
	mov	x1, x20
	bl	_qed_ptt_release
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to acquire ptt\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
l_.str.1:                               ; @.str.1
	.asciz	"DRV_MSG_CODE_BIST_TEST is not supported\n"

l_.str.2:                               ; @.str.2
	.asciz	"Failed getting number of images\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.3:                               ; @.str.3
	.asciz	"Failed getting image index %d attributes\n"

	.comm	_QED_MSG_SP,4,2                 ; @QED_MSG_SP
l_.str.4:                               ; @.str.4
	.asciz	"image index %d, size %x\n"

.subsections_via_symbols
