	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qed_nvram_read
_qed_nvram_read:                        ## @qed_nvram_read
	.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
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movl	%edx, %r15d
	movq	%rsi, %r12
	movq	%rdi, %r13
	movslq	%ecx, %rbx
	movq	_QED_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movl	%ebx, %ecx
	callq	_DP_VERBOSE
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	_MCP_DRV_NVM_BUF_LEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rbx
	cmovlq	%rbx, %rax
	movq	_DRV_MSG_CODE_NVM_READ_NVRAM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_DRV_MB_PARAM_NVM_LEN_OFFSET@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	shll	%cl, %eax
	leal	(%r14,%r15), %ecx
	orl	%ecx, %eax
	movslq	%r14d, %rcx
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	leaq	(%rsi,%rcx,4), %r10
	movq	%r13, %rdi
	movq	%r12, %rsi
	movl	%eax, %ecx
	leaq	-48(%rbp), %r8
	leaq	-60(%rbp), %r9
	pushq	%r10
	leaq	-44(%rbp), %rax
	pushq	%rax
	callq	_qed_mcp_nvm_rd_cmd
	addq	$16, %rsp
	testq	%rax, %rax
	jne	LBB0_6
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_FW_MSG_CODE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-48(%rbp), %eax
	movq	_FW_MSG_CODE_NVM_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movslq	-44(%rbp), %rax
	addl	%eax, %r14d
	subq	%rax, %rbx
	jg	LBB0_1
## %bb.4:
	movq	_DBG_STATUS_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_6:
	movq	_DBG_STATUS_NVRAM_READ_FAILED@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_QED_MSG_DEBUG,4,2              ## @QED_MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"nvram_read: reading image of size %d bytes from NVRAM\n"

	.comm	_MCP_DRV_NVM_BUF_LEN,8,3        ## @MCP_DRV_NVM_BUF_LEN
	.comm	_DRV_MSG_CODE_NVM_READ_NVRAM,4,2 ## @DRV_MSG_CODE_NVM_READ_NVRAM
	.comm	_DRV_MB_PARAM_NVM_LEN_OFFSET,4,2 ## @DRV_MB_PARAM_NVM_LEN_OFFSET
	.comm	_DBG_STATUS_NVRAM_READ_FAILED,4,2 ## @DBG_STATUS_NVRAM_READ_FAILED
	.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_OK,4,2              ## @DBG_STATUS_OK
	.no_dead_strip	_qed_nvram_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qed_nvram_read
_qed_nvram_read:                        ; @qed_nvram_read
	.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, x4
                                        ; kill: def $w3 killed $w3 def $x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	sxtw	x23, w3
Lloh0:
	adrp	x8, _QED_MSG_DEBUG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _QED_MSG_DEBUG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
                                        ; kill: def $w3 killed $w3 killed $x3
	bl	_DP_VERBOSE
	mov	w25, #0
Lloh5:
	adrp	x27, _DRV_MSG_CODE_NVM_READ_NVRAM@GOTPAGE
Lloh6:
	ldr	x27, [x27, _DRV_MSG_CODE_NVM_READ_NVRAM@GOTPAGEOFF]
Lloh7:
	adrp	x28, _DRV_MB_PARAM_NVM_LEN_OFFSET@GOTPAGE
Lloh8:
	ldr	x28, [x28, _DRV_MB_PARAM_NVM_LEN_OFFSET@GOTPAGEOFF]
Lloh9:
	adrp	x24, _FW_MSG_CODE_MASK@GOTPAGE
Lloh10:
	ldr	x24, [x24, _FW_MSG_CODE_MASK@GOTPAGEOFF]
Lloh11:
	adrp	x26, _FW_MSG_CODE_NVM_OK@GOTPAGE
Lloh12:
	ldr	x26, [x26, _FW_MSG_CODE_NVM_OK@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
Lloh13:
	adrp	x8, _MCP_DRV_NVM_BUF_LEN@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MCP_DRV_NVM_BUF_LEN@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	cmp	x23, x8
	csel	x8, x23, x8, lt
	ldr	w2, [x27]
	ldr	w9, [x28]
	lsl	w8, w8, w9
	add	w9, w25, w20
	orr	w3, w8, w9
	add	x7, x19, w25, sxtw #2
	add	x4, sp, #12
	add	x5, sp, #8
	add	x6, sp, #4
	mov	x0, x22
	mov	x1, x21
	bl	_qed_mcp_nvm_rd_cmd
	cbnz	x0, LBB0_5
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [sp, #12]
	ldr	w9, [x24]
	and	w8, w9, w8
	ldr	w9, [x26]
	cmp	w8, w9
	b.ne	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	ldrsw	x8, [sp, #4]
	add	w25, w8, w25
	sub	x23, x23, x8
	cmp	x23, #0
	b.gt	LBB0_1
; %bb.4:
Lloh16:
	adrp	x8, _DBG_STATUS_OK@GOTPAGE
Lloh17:
	ldr	x8, [x8, _DBG_STATUS_OK@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh18:
	adrp	x8, _DBG_STATUS_NVRAM_READ_FAILED@GOTPAGE
Lloh19:
	ldr	x8, [x8, _DBG_STATUS_NVRAM_READ_FAILED@GOTPAGEOFF]
LBB0_6:
	ldr	w0, [x8]
	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
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_QED_MSG_DEBUG,4,2              ; @QED_MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"nvram_read: reading image of size %d bytes from NVRAM\n"

	.comm	_MCP_DRV_NVM_BUF_LEN,8,3        ; @MCP_DRV_NVM_BUF_LEN
	.comm	_DRV_MSG_CODE_NVM_READ_NVRAM,4,2 ; @DRV_MSG_CODE_NVM_READ_NVRAM
	.comm	_DRV_MB_PARAM_NVM_LEN_OFFSET,4,2 ; @DRV_MB_PARAM_NVM_LEN_OFFSET
	.comm	_DBG_STATUS_NVRAM_READ_FAILED,4,2 ; @DBG_STATUS_NVRAM_READ_FAILED
	.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_OK,4,2              ; @DBG_STATUS_OK
	.no_dead_strip	_qed_nvram_read
.subsections_via_symbols
