	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qed_nvm_flash_image_access
_qed_nvm_flash_image_access:            ## @qed_nvm_flash_image_access
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rsi), %rax
	leaq	32(%rax), %rcx
	movq	%rcx, (%rsi)
	movq	32(%rax), %rbx
	callq	_QED_LEADING_HWFN
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	jle	LBB0_4
## %bb.1:
	movq	8(%rax), %rsi
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	(%rsi), %rbx
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rdx
	addq	$16, %rsi
	cmpq	%rdx, %rcx
	jne	LBB0_2
	jmp	LBB0_6
LBB0_4:
	xorl	%edx, %edx
LBB0_5:
	cmpl	%ecx, %edx
	jne	LBB0_7
LBB0_6:
	leaq	L_.str(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r13, %rdi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_DP_ERR
	movq	_ENOENT@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_15
LBB0_7:
	movq	8(%rax), %rax
	movl	%edx, %ecx
	shlq	$4, %rcx
	movslq	8(%rax,%rcx), %r14
	movl	%r14d, -88(%rbp)
	movl	12(%rax,%rcx), %eax
	movl	%eax, -84(%rbp)
	movq	_NETIF_MSG_DRV@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	(%r12), %rcx
	movq	(%rcx), %rcx
	addl	%r14d, %eax
	decl	%eax
	movslq	%eax, %r10
	subq	$8, %rsp
	leaq	L_.str.1(%rip), %rdx
	xorl	%r15d, %r15d
	movq	%r13, %rdi
	movq	%rbx, %r8
	movq	%r14, %r9
	xorl	%eax, %eax
	pushq	%r10
	callq	_DP_VERBOSE
	addq	$16, %rsp
	movq	(%r12), %rax
	leaq	8(%rax), %rcx
	movq	%rcx, (%r12)
	movq	8(%rax), %rbx
	xorl	%edi, %edi
	callq	_BIT
	movq	(%r12), %rcx
	leaq	24(%rcx), %rdx
	movq	8(%rcx), %rsi
	movq	%rdx, (%r12)
	testq	%rbx, %rax
	je	LBB0_10
## %bb.8:
	movq	$0, -80(%rbp)
	leaq	-88(%rbp), %rsi
	leaq	-80(%rbp), %rdx
	movq	%r13, %rdi
	callq	_qed_nvm_flash_image_access_crc
	testl	%eax, %eax
	je	LBB0_17
## %bb.9:
	movl	%eax, %r15d
	movslq	%eax, %rdx
	leaq	L_.str.2(%rip), %rsi
	movq	%r13, %rdi
	jmp	LBB0_14
LBB0_10:
	testq	%rsi, %rsi
	je	LBB0_15
## %bb.11:
	movq	%rsi, -112(%rbp)                ## 8-byte Spill
	movq	24(%rcx), %rax
	movq	%rax, -96(%rbp)
	movq	%r14, %rbx
	movq	56(%rcx), %r14
	movq	%r13, %rdi
	movq	88(%rcx), %r13
	addq	%rbx, %r13
	addq	$120, %rcx
	movq	%rcx, (%r12)
	leaq	-80(%rbp), %rdx
	movq	%rdi, -104(%rbp)                ## 8-byte Spill
	movq	%r13, %rsi
	movl	$4, %ecx
	callq	_qed_mcp_nvm_read
	testl	%eax, %eax
	je	LBB0_19
LBB0_12:
	movl	%eax, %r15d
	leaq	L_.str.4(%rip), %rsi
LBB0_13:
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	movq	%r13, %rdx
LBB0_14:
	xorl	%eax, %eax
	callq	_DP_ERR
LBB0_15:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_26
## %bb.16:
	movl	%r15d, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movq	_QED_NVM_WRITE_NVRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-88(%rbp), %eax
	movl	-84(%rbp), %ecx
	addl	%ecx, %eax
	addl	$-4, %eax
	movslq	%eax, %rdx
	leaq	-80(%rbp), %rcx
	movq	%r13, %rdi
	movl	$4, %r8d
	callq	_qed_mcp_nvm_write
	testl	%eax, %eax
	je	LBB0_23
## %bb.18:
	movl	%eax, %r15d
	movl	-88(%rbp), %eax
	movl	-84(%rbp), %ecx
	addl	%ecx, %eax
	addl	$-4, %eax
	movslq	%eax, %rdx
	leaq	L_.str.3(%rip), %rsi
	movq	%r13, %rdi
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_DP_ERR
	jmp	LBB0_15
LBB0_19:
	movq	%rbx, -120(%rbp)                ## 8-byte Spill
	movq	%r12, -128(%rbp)                ## 8-byte Spill
	movq	-104(%rbp), %r12                ## 8-byte Reload
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movl	-80(%rbp), %edi
	callq	_le32_to_cpu
	movq	_NETIF_MSG_DRV@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r14, %rbx
	notq	%rbx
	andq	%rax, %rbx
	movq	-96(%rbp), %r10
	movq	%r10, %r9
	andq	%r14, %r9
	orq	%rbx, %r9
	movq	%r12, %rdi
	leaq	L_.str.5(%rip), %rdx
	movq	%r13, %rcx
	movq	%rax, %r8
	xorl	%eax, %eax
	pushq	%r14
	pushq	%r10
	callq	_DP_VERBOSE
	addq	$16, %rsp
	andq	-96(%rbp), %r14
	orq	%rbx, %r14
	movq	%r14, -96(%rbp)
	movq	_QED_NVM_WRITE_NVRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movq	%r13, %rdx
	leaq	-96(%rbp), %rcx
	movl	$4, %r8d
	callq	_qed_mcp_nvm_write
	testl	%eax, %eax
	jne	LBB0_24
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=1
	movq	-112(%rbp), %rax                ## 8-byte Reload
	decq	%rax
	je	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_20 Depth=1
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	movq	-128(%rbp), %rdx                ## 8-byte Reload
	movq	(%rdx), %rax
	movq	(%rax), %rcx
	movq	%rcx, -96(%rbp)
	movq	32(%rax), %r14
	movq	64(%rax), %r13
	addq	-120(%rbp), %r13                ## 8-byte Folded Reload
	addq	$96, %rax
	movq	%rax, (%rdx)
	movq	-104(%rbp), %r12                ## 8-byte Reload
	movq	%r12, %rdi
	movq	%r13, %rsi
	leaq	-80(%rbp), %rdx
	movl	$4, %ecx
	callq	_qed_mcp_nvm_read
	testl	%eax, %eax
	je	LBB0_20
	jmp	LBB0_12
LBB0_23:
	xorl	%r15d, %r15d
	jmp	LBB0_15
LBB0_24:
	movl	%eax, %r15d
	leaq	L_.str.6(%rip), %rsi
	jmp	LBB0_13
LBB0_26:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to find nvram image of type %08x\n"

	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_NETIF_MSG_DRV,4,2              ## @NETIF_MSG_DRV
L_.str.1:                               ## @.str.1
	.asciz	"Read image %02x; type = %08x; NVM [%08x,...,%08x]\n"

L_.str.2:                               ## @.str.2
	.asciz	"Failed calculating CRC, rc = %d\n"

	.comm	_QED_NVM_WRITE_NVRAM,4,2        ## @QED_NVM_WRITE_NVRAM
L_.str.3:                               ## @.str.3
	.asciz	"Failed writing to %08x, rc = %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"Failed reading from %08x\n"

L_.str.5:                               ## @.str.5
	.asciz	"NVM %08x: %08x -> %08x [Value %08x Mask %08x]\n"

L_.str.6:                               ## @.str.6
	.asciz	"Failed writing to %08x\n"

	.no_dead_strip	_qed_nvm_flash_image_access
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qed_nvm_flash_image_access
_qed_nvm_flash_image_access:            ; @qed_nvm_flash_image_access
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #56]
	ldr	x8, [x1]
	ldr	x22, [x8, #32]!
	str	x8, [x1]
	bl	_QED_LEADING_HWFN
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x9, #0
	ldr	x10, [x0, #8]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x10]
	cmp	x22, x11
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x9, x9, #1
	add	x10, x10, #16
	cmp	x8, x9
	b.ne	LBB0_2
	b	LBB0_6
LBB0_4:
	mov	w9, #0
LBB0_5:
	cmp	w9, w8
	b.ne	LBB0_9
LBB0_6:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	bl	_DP_ERR
Lloh5:
	adrp	x8, _ENOENT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_7:
	ldr	x8, [sp, #56]
Lloh8:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh9:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_24
; %bb.8:
	mov	x0, x23
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_9:
	ldr	x8, [x0, #8]
	add	x8, x8, w9, uxtw #4
	ldrsw	x21, [x8, #8]
	str	w21, [sp, #16]
	ldr	w8, [x8, #12]
	str	w8, [sp, #20]
Lloh11:
	adrp	x25, _NETIF_MSG_DRV@GOTPAGE
Lloh12:
	ldr	x25, [x25, _NETIF_MSG_DRV@GOTPAGEOFF]
	ldr	w1, [x25]
	ldr	x9, [x20]
	ldr	x3, [x9]
	add	w8, w21, w8
	sub	w8, w8, #1
	sxtw	x6, w8
Lloh13:
	adrp	x2, l_.str.1@PAGE
Lloh14:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x4, x22
	mov	x5, x21
	bl	_DP_VERBOSE
	ldr	x8, [x20]
	ldr	x22, [x8, #8]!
	str	x8, [x20]
	mov	w0, #0
	bl	_BIT
	ldr	x8, [x20]
	ldr	x26, [x8, #8]
	add	x9, x8, #24
	str	x9, [x20]
	tst	x0, x22
	b.eq	LBB0_12
; %bb.10:
	str	xzr, [sp, #24]
	add	x1, sp, #16
	add	x2, sp, #24
	mov	x0, x19
	bl	_qed_nvm_flash_image_access_crc
	cbz	w0, LBB0_16
; %bb.11:
	mov	x23, x0
	sxtw	x2, w23
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_DP_ERR
	b	LBB0_7
LBB0_12:
	cbz	x26, LBB0_22
; %bb.13:
	ldr	x9, [x8, #24]
	str	x9, [sp, #8]
	ldr	x28, [x8, #56]
	ldr	x9, [x8, #88]
	add	x8, x8, #120
	str	x8, [x20]
	add	x22, x9, x21
	add	x2, sp, #24
	mov	x0, x19
	mov	x1, x22
	mov	w3, #4
	bl	_qed_mcp_nvm_read
	cbz	w0, LBB0_18
LBB0_14:
	mov	x23, x0
Lloh17:
	adrp	x1, l_.str.4@PAGE
Lloh18:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_15:
	mov	x0, x19
	mov	x2, x22
	bl	_DP_ERR
	b	LBB0_7
LBB0_16:
Lloh19:
	adrp	x8, _QED_NVM_WRITE_NVRAM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _QED_NVM_WRITE_NVRAM@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	ldp	w8, w9, [sp, #16]
	add	w8, w8, w9
	sub	w8, w8, #4
	sxtw	x2, w8
	add	x3, sp, #24
	mov	x0, x19
	mov	w4, #4
	bl	_qed_mcp_nvm_write
	mov	x23, x0
	cbz	w0, LBB0_7
; %bb.17:
	ldp	w8, w9, [sp, #16]
	add	w8, w8, w9
	sub	w8, w8, #4
	sxtw	x2, w8
	str	x23, [sp]
Lloh22:
	adrp	x1, l_.str.3@PAGE
Lloh23:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_DP_ERR
                                        ; kill: def $w23 killed $w23 killed $x23 def $x23
	b	LBB0_7
LBB0_18:
Lloh24:
	adrp	x24, l_.str.5@PAGE
Lloh25:
	add	x24, x24, l_.str.5@PAGEOFF
Lloh26:
	adrp	x27, _QED_NVM_WRITE_NVRAM@GOTPAGE
Lloh27:
	ldr	x27, [x27, _QED_NVM_WRITE_NVRAM@GOTPAGEOFF]
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [sp, #24]
	bl	_le32_to_cpu
	mov	x4, x0
	ldr	w1, [x25]
	bic	x23, x0, x28
	ldr	x6, [sp, #8]
	and	x8, x6, x28
	orr	x5, x8, x23
	str	x28, [sp]
	mov	x0, x19
	mov	x2, x24
	mov	x3, x22
	bl	_DP_VERBOSE
	ldr	x8, [sp, #8]
	and	x8, x8, x28
	orr	x8, x8, x23
	str	x8, [sp, #8]
	ldr	w1, [x27]
	add	x3, sp, #8
	mov	x0, x19
	mov	x2, x22
	mov	w4, #4
	bl	_qed_mcp_nvm_write
	cbnz	w0, LBB0_23
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=1
	subs	x26, x26, #1
	b.eq	LBB0_22
; %bb.21:                               ;   in Loop: Header=BB0_19 Depth=1
	ldr	x8, [x20]
	ldr	x9, [x8]
	str	x9, [sp, #8]
	ldr	x28, [x8, #32]
	ldr	x9, [x8, #64]
	add	x8, x8, #96
	str	x8, [x20]
	add	x22, x9, x21
	add	x2, sp, #24
	mov	x0, x19
	mov	x1, x22
	mov	w3, #4
	bl	_qed_mcp_nvm_read
	cbz	w0, LBB0_19
	b	LBB0_14
LBB0_22:
	mov	w23, #0
	b	LBB0_7
LBB0_23:
	mov	x23, x0
Lloh28:
	adrp	x1, l_.str.6@PAGE
Lloh29:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_15
LBB0_24:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to find nvram image of type %08x\n"

	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_NETIF_MSG_DRV,4,2              ; @NETIF_MSG_DRV
l_.str.1:                               ; @.str.1
	.asciz	"Read image %02x; type = %08x; NVM [%08x,...,%08x]\n"

l_.str.2:                               ; @.str.2
	.asciz	"Failed calculating CRC, rc = %d\n"

	.comm	_QED_NVM_WRITE_NVRAM,4,2        ; @QED_NVM_WRITE_NVRAM
l_.str.3:                               ; @.str.3
	.asciz	"Failed writing to %08x, rc = %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"Failed reading from %08x\n"

l_.str.5:                               ; @.str.5
	.asciz	"NVM %08x: %08x -> %08x [Value %08x Mask %08x]\n"

l_.str.6:                               ; @.str.6
	.asciz	"Failed writing to %08x\n"

	.no_dead_strip	_qed_nvm_flash_image_access
.subsections_via_symbols
