	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qed_nvm_flash
_qed_nvm_flash:                         ## @qed_nvm_flash
	.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	%rsi, %rbx
	movq	%rdi, %r12
	movq	(%rdi), %rdx
	leaq	-72(%rbp), %rdi
	callq	_request_firmware
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_DP_ERR
	jmp	LBB0_23
LBB0_2:
	movq	_NETIF_MSG_DRV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-72(%rbp), %rax
	movq	8(%rax), %r8
	movl	(%rax), %r9d
	leaq	L_.str.1(%rip), %rdx
	movq	%r12, %rdi
	movq	%rbx, %rcx
	callq	_DP_VERBOSE
	movq	-72(%rbp), %rsi
	movq	8(%rsi), %rbx
	movq	%rbx, -56(%rbp)
	movslq	(%rsi), %r14
	leaq	-56(%rbp), %rdx
	movq	%r12, %rdi
	callq	_qed_nvm_flash_image_validate
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_3
LBB0_22:
	movq	-72(%rbp), %rdi
	callq	_release_firmware
LBB0_23:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	leaq	(%rbx,%r14,4), %rbx
	movq	-56(%rbp), %rax
	xorl	%r15d, %r15d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	-56(%rbp), %rax
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rbx, %rax
	jae	LBB0_22
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	$0, -44(%rbp)
	movl	(%rax), %r13d
	leal	-128(%r13), %eax
	cmpl	$3, %eax
	ja	LBB0_20
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %rdi
	leaq	-56(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	callq	_qed_nvm_flash_image_access
	jmp	LBB0_11
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %rdi
	leaq	-56(%rbp), %rsi
	callq	_qed_nvm_flash_cfg_write
	jmp	LBB0_11
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %rdi
	leaq	-56(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	callq	_qed_nvm_flash_image_file_start
	jmp	LBB0_11
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %rdi
	leaq	-56(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	callq	_qed_nvm_flash_image_file_data
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$0, -44(%rbp)
	je	LBB0_19
## %bb.14:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	$0, -60(%rbp)
	movq	%r12, %rdi
	leaq	-60(%rbp), %rsi
	callq	_qed_mcp_nvm_resp
	testq	%rax, %rax
	jne	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	-60(%rbp), %edx
	movq	_FW_MSG_CODE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%edx, %eax
	andl	$-4, %eax
	cmpl	$132, %eax
	je	LBB0_19
## %bb.17:
	leaq	L_.str.5(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_DP_ERR
	jmp	LBB0_18
LBB0_12:
	leaq	L_.str.3(%rip), %rsi
	movq	%r12, %rdi
	movl	%r13d, %edx
	xorl	%eax, %eax
	callq	_DP_ERR
	movl	%r14d, %r15d
	jmp	LBB0_22
LBB0_15:
	leaq	L_.str.4(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_DP_ERR
LBB0_18:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
LBB0_21:
	subl	(%rax), %r15d
	jmp	LBB0_22
LBB0_20:
	leaq	L_.str.2(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r12, %rdi
	movl	%r13d, %edx
	xorl	%eax, %eax
	callq	_DP_ERR
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_21
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
LJTI0_0:
	.long	L0_0_set_8
	.long	L0_0_set_9
	.long	L0_0_set_7
	.long	L0_0_set_10
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to find '%s'\n"

	.comm	_NETIF_MSG_DRV,4,2              ## @NETIF_MSG_DRV
L_.str.1:                               ## @.str.1
	.asciz	"Flashing '%s' - firmware's data at %p, size is %08x\n"

L_.str.2:                               ## @.str.2
	.asciz	"Unknown command %08x\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.3:                               ## @.str.3
	.asciz	"Command %08x failed\n"

L_.str.4:                               ## @.str.4
	.asciz	"Failed getting MCP response\n"

	.comm	_FW_MSG_CODE_MASK,4,2           ## @FW_MSG_CODE_MASK
L_.str.5:                               ## @.str.5
	.asciz	"MFW returns error: %08x\n"

	.no_dead_strip	_qed_nvm_flash
.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
_qed_nvm_flash:                         ; @qed_nvm_flash
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x21, x1
	mov	x19, x0
	ldr	x2, [x0]
	add	x0, sp, #24
	bl	_request_firmware
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
	str	x21, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_DP_ERR
	b	LBB0_23
LBB0_2:
Lloh2:
	adrp	x8, _NETIF_MSG_DRV@GOTPAGE
Lloh3:
	ldr	x8, [x8, _NETIF_MSG_DRV@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	ldr	x8, [sp, #24]
	ldr	x4, [x8, #8]
	ldr	w5, [x8]
Lloh5:
	adrp	x2, l_.str.1@PAGE
Lloh6:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x3, x21
	bl	_DP_VERBOSE
	ldr	x1, [sp, #24]
	ldr	x21, [x1, #8]
	str	x21, [sp, #16]
	ldrsw	x22, [x1]
	add	x2, sp, #16
	mov	x0, x19
	bl	_qed_nvm_flash_image_validate
	mov	x20, x0
	cbnz	w0, LBB0_22
; %bb.3:
	add	x21, x21, x22, lsl #2
	ldr	x8, [sp, #16]
	cmp	x8, x21
	b.hs	LBB0_17
; %bb.4:
Lloh7:
	adrp	x22, lJTI0_0@PAGE
Lloh8:
	add	x22, x22, lJTI0_0@PAGEOFF
Lloh9:
	adrp	x23, _FW_MSG_CODE_MASK@GOTPAGE
Lloh10:
	ldr	x23, [x23, _FW_MSG_CODE_MASK@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [sp, #16]
	cmp	x8, x21
	b.hs	LBB0_17
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	str	wzr, [sp, #12]
	ldr	w24, [x8]
	sub	w8, w24, #128
	cmp	w8, #3
	b.hi	LBB0_20
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	adr	x9, LBB0_8
	ldrb	w10, [x22, x8]
	add	x9, x9, x10, lsl #2
	br	x9
LBB0_8:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x1, sp, #16
	add	x2, sp, #12
	mov	x0, x19
	bl	_qed_nvm_flash_image_access
	b	LBB0_12
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x1, sp, #16
	mov	x0, x19
	bl	_qed_nvm_flash_cfg_write
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x1, sp, #16
	add	x2, sp, #12
	mov	x0, x19
	bl	_qed_nvm_flash_image_file_start
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x1, sp, #16
	add	x2, sp, #12
	mov	x0, x19
	bl	_qed_nvm_flash_image_file_data
LBB0_12:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x20, x0
	cbnz	w0, LBB0_18
; %bb.13:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_5
; %bb.14:                               ;   in Loop: Header=BB0_6 Depth=1
	str	wzr, [sp, #8]
	add	x1, sp, #8
	mov	x0, x19
	bl	_qed_mcp_nvm_resp
	cbnz	x0, LBB0_19
; %bb.15:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [sp, #8]
	ldr	w9, [x23]
	and	w9, w8, w9
	and	w9, w9, #0xfffffffc
	cmp	w9, #132
	b.eq	LBB0_5
; %bb.16:
	str	x8, [sp]
Lloh11:
	adrp	x1, l_.str.5@PAGE
Lloh12:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_21
LBB0_17:
	mov	w20, #0
	b	LBB0_22
LBB0_18:
                                        ; kill: def $w24 killed $w24 killed $x24 def $x24
	str	x24, [sp]
Lloh13:
	adrp	x1, l_.str.3@PAGE
Lloh14:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_DP_ERR
	b	LBB0_22
LBB0_19:
Lloh15:
	adrp	x1, l_.str.4@PAGE
Lloh16:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_21
LBB0_20:
	str	x24, [sp]
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_21:
	mov	x0, x19
	bl	_DP_ERR
Lloh19:
	adrp	x8, _EINVAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_22:
	ldr	x0, [sp, #24]
	bl	_release_firmware
LBB0_23:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_8-LBB0_8)>>2
	.byte	(LBB0_9-LBB0_8)>>2
	.byte	(LBB0_10-LBB0_8)>>2
	.byte	(LBB0_11-LBB0_8)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to find '%s'\n"

	.comm	_NETIF_MSG_DRV,4,2              ; @NETIF_MSG_DRV
l_.str.1:                               ; @.str.1
	.asciz	"Flashing '%s' - firmware's data at %p, size is %08x\n"

l_.str.2:                               ; @.str.2
	.asciz	"Unknown command %08x\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.3:                               ; @.str.3
	.asciz	"Command %08x failed\n"

l_.str.4:                               ; @.str.4
	.asciz	"Failed getting MCP response\n"

	.comm	_FW_MSG_CODE_MASK,4,2           ; @FW_MSG_CODE_MASK
l_.str.5:                               ; @.str.5
	.asciz	"MFW returns error: %08x\n"

	.no_dead_strip	_qed_nvm_flash
.subsections_via_symbols
