	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qed_find_nvram_image
_qed_find_nvram_image:                  ## @qed_find_nvram_image
	.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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r14
	movq	%rcx, %r12
	movl	%edx, %r15d
	movq	%rdi, %rbx
	movq	_DRV_MSG_CODE_NVM_GET_FILE_ATT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-48(%rbp), %rax
	leaq	-52(%rbp), %r10
	leaq	-36(%rbp), %r8
	leaq	-56(%rbp), %r9
	movl	%r15d, %ecx
	pushq	%rax
	pushq	%r10
	callq	_qed_mcp_nvm_rd_cmd
	addq	$16, %rsp
	movq	_DBG_STATUS_NVRAM_GET_IMAGE_FAILED@GOTPCREL(%rip), %rcx
	testl	%eax, %eax
	jne	LBB0_5
## %bb.1:
	movq	_FW_MSG_CODE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-36(%rbp), %eax
	movq	_FW_MSG_CODE_NVM_OK@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %eax
	jne	LBB0_5
## %bb.2:
	movl	-48(%rbp), %eax
	movl	%eax, (%r12)
	movl	-44(%rbp), %r9d
	movl	%r9d, (%r14)
	movq	_QED_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %r8d
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	movl	%r15d, %ecx
	callq	_DP_VERBOSE
	testb	$3, (%r14)
	jne	LBB0_3
## %bb.4:
	movq	_DBG_STATUS_OK@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_3:
	movq	_DBG_STATUS_NON_ALIGNED_NVRAM_IMAGE@GOTPCREL(%rip), %rcx
LBB0_5:
	movl	(%rcx), %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DRV_MSG_CODE_NVM_GET_FILE_ATT,4,2 ## @DRV_MSG_CODE_NVM_GET_FILE_ATT
	.comm	_FW_MSG_CODE_MASK,4,2           ## @FW_MSG_CODE_MASK
	.comm	_FW_MSG_CODE_NVM_OK,4,2         ## @FW_MSG_CODE_NVM_OK
	.comm	_DBG_STATUS_NVRAM_GET_IMAGE_FAILED,4,2 ## @DBG_STATUS_NVRAM_GET_IMAGE_FAILED
	.comm	_QED_MSG_DEBUG,4,2              ## @QED_MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"find_nvram_image: found NVRAM image of type %d in NVRAM offset %d bytes with size %d bytes\n"

	.comm	_DBG_STATUS_NON_ALIGNED_NVRAM_IMAGE,4,2 ## @DBG_STATUS_NON_ALIGNED_NVRAM_IMAGE
	.comm	_DBG_STATUS_OK,4,2              ## @DBG_STATUS_OK
	.no_dead_strip	_qed_find_nvram_image
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qed_find_nvram_image
_qed_find_nvram_image:                  ; @qed_find_nvram_image
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x4
	mov	x22, x3
	mov	x20, x2
	mov	x21, x0
Lloh0:
	adrp	x8, _DRV_MSG_CODE_NVM_GET_FILE_ATT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRV_MSG_CODE_NVM_GET_FILE_ATT@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	add	x4, sp, #28
	add	x5, sp, #24
	add	x6, sp, #20
	add	x7, sp, #8
	mov	x3, x20
	bl	_qed_mcp_nvm_rd_cmd
	cbnz	w0, LBB0_3
; %bb.1:
	ldr	w8, [sp, #28]
Lloh3:
	adrp	x9, _FW_MSG_CODE_MASK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _FW_MSG_CODE_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh6:
	adrp	x9, _FW_MSG_CODE_NVM_OK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _FW_MSG_CODE_NVM_OK@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_3
; %bb.2:
	ldp	w8, w5, [sp, #8]
	str	w8, [x22]
	str	w5, [x19]
Lloh9:
	adrp	x8, _QED_MSG_DEBUG@GOTPAGE
Lloh10:
	ldr	x8, [x8, _QED_MSG_DEBUG@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	ldr	w4, [x22]
Lloh12:
	adrp	x2, l_.str@PAGE
Lloh13:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x21
	mov	x3, x20
	bl	_DP_VERBOSE
	ldrb	w8, [x19]
Lloh14:
	adrp	x9, _DBG_STATUS_NON_ALIGNED_NVRAM_IMAGE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _DBG_STATUS_NON_ALIGNED_NVRAM_IMAGE@GOTPAGEOFF]
Lloh16:
	adrp	x10, _DBG_STATUS_OK@GOTPAGE
Lloh17:
	ldr	x10, [x10, _DBG_STATUS_OK@GOTPAGEOFF]
	tst	w8, #0x3
	csel	x8, x10, x9, eq
	b	LBB0_4
LBB0_3:
Lloh18:
	adrp	x8, _DBG_STATUS_NVRAM_GET_IMAGE_FAILED@GOTPAGE
Lloh19:
	ldr	x8, [x8, _DBG_STATUS_NVRAM_GET_IMAGE_FAILED@GOTPAGEOFF]
LBB0_4:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_DRV_MSG_CODE_NVM_GET_FILE_ATT,4,2 ; @DRV_MSG_CODE_NVM_GET_FILE_ATT
	.comm	_FW_MSG_CODE_MASK,4,2           ; @FW_MSG_CODE_MASK
	.comm	_FW_MSG_CODE_NVM_OK,4,2         ; @FW_MSG_CODE_NVM_OK
	.comm	_DBG_STATUS_NVRAM_GET_IMAGE_FAILED,4,2 ; @DBG_STATUS_NVRAM_GET_IMAGE_FAILED
	.comm	_QED_MSG_DEBUG,4,2              ; @QED_MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"find_nvram_image: found NVRAM image of type %d in NVRAM offset %d bytes with size %d bytes\n"

	.comm	_DBG_STATUS_NON_ALIGNED_NVRAM_IMAGE,4,2 ; @DBG_STATUS_NON_ALIGNED_NVRAM_IMAGE
	.comm	_DBG_STATUS_OK,4,2              ; @DBG_STATUS_OK
	.no_dead_strip	_qed_find_nvram_image
.subsections_via_symbols
