	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i40e_nvmupd_state_writing
_i40e_nvmupd_state_writing:             ## @i40e_nvmupd_state_writing
	.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	%rcx, %r14
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rcx, %rdx
	callq	_i40e_nvmupd_validate_command
	movl	%eax, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	addl	$-128, %eax
	cmpl	$3, %eax
	ja	LBB0_18
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	%r14, %rcx
	callq	_i40e_nvmupd_nvm_write
	testq	%rax, %rax
	jne	LBB0_8
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rdi
	callq	_i40e_update_nvm_checksum
	testq	%rax, %rax
	jne	LBB0_8
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rdi
	callq	_i40e_update_nvm_checksum
	testq	%rax, %rax
	je	LBB0_4
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%rax, %r15
	movq	8(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_21
## %bb.9:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r15, %rdi
	callq	_i40e_aq_rc_to_posix
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	movq	_EIO@GOTPCREL(%rip), %rcx
	subl	(%rcx), %eax
LBB0_10:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	%eax, (%r14)
	movq	_I40E_NVMUPD_STATE_INIT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 24(%rbx)
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	_I40E_DEBUG_NVM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_i40e_nvm_update_state_str@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rax,%rcx,8), %rcx
	movq	%rbx, %rdi
	leaq	L_.str(%rip), %rdx
	xorl	%eax, %eax
	callq	_i40e_debug
	movq	_I40E_NOT_SUPPORTED@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	xorl	%eax, %eax
	movq	_ESRCH@GOTPCREL(%rip), %rcx
	subl	(%rcx), %eax
	movl	%eax, (%r14)
	testq	%r15, %r15
	jne	LBB0_11
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	%r14, %rcx
	callq	_i40e_nvmupd_nvm_write
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_4
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	8(%rbx), %r13
	movq	_I40E_AQ_RC_EBUSY@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	setne	%al
	orb	%al, %r12b
	testb	$1, %r12b
	jne	LBB0_20
## %bb.12:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	_I40E_GLVFGEN_TIMER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_rd32
	movq	16(%rbx), %r8
	cmpq	%r8, %rax
	jl	LBB0_20
## %bb.13:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	_I40E_DEBUG_ALL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rbx, %rdi
	leaq	L_.str.1(%rip), %rdx
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	_i40e_debug
	movq	%rbx, %rdi
	callq	_i40e_release_nvm
	movq	_I40E_RESOURCE_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_i40e_acquire_nvm
	movb	$1, %r12b
	testq	%rax, %rax
	je	LBB0_1
## %bb.14:
	movq	_I40E_DEBUG_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%rbx), %rcx
	leaq	L_.str.2(%rip), %rdx
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_i40e_debug
	movq	%r13, 8(%rbx)
	jmp	LBB0_20
LBB0_17:
	movl	$1, (%rbx)
	movq	_i40e_aqc_opc_nvm_update@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 32(%rbx)
	movq	_I40E_NVMUPD_STATE_INIT_WAIT@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_4:
	movq	_i40e_aqc_opc_nvm_update@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 32(%rbx)
	movq	_I40E_NVMUPD_STATE_WRITE_WAIT@GOTPCREL(%rip), %rax
LBB0_5:
	movq	(%rax), %rax
	movq	%rax, 24(%rbx)
LBB0_19:
	xorl	%r15d, %r15d
LBB0_20:
	movq	%r15, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_16, LBB0_16-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
LJTI0_0:
	.long	L0_0_set_6
	.long	L0_0_set_3
	.long	L0_0_set_16
	.long	L0_0_set_15
	.end_data_region
                                        ## -- End function
	.comm	_i40e_aqc_opc_nvm_update,8,3    ## @i40e_aqc_opc_nvm_update
	.comm	_I40E_NVMUPD_STATE_WRITE_WAIT,8,3 ## @I40E_NVMUPD_STATE_WRITE_WAIT
	.comm	_EIO,4,2                        ## @EIO
	.comm	_I40E_NVMUPD_STATE_INIT,8,3     ## @I40E_NVMUPD_STATE_INIT
	.comm	_I40E_NVMUPD_STATE_INIT_WAIT,8,3 ## @I40E_NVMUPD_STATE_INIT_WAIT
	.comm	_I40E_DEBUG_NVM,4,2             ## @I40E_DEBUG_NVM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"NVMUPD: bad cmd %s in writing state.\n"

	.comm	_i40e_nvm_update_state_str,8,3  ## @i40e_nvm_update_state_str
	.comm	_I40E_NOT_SUPPORTED,8,3         ## @I40E_NOT_SUPPORTED
	.comm	_ESRCH,4,2                      ## @ESRCH
	.comm	_I40E_AQ_RC_EBUSY,8,3           ## @I40E_AQ_RC_EBUSY
	.comm	_I40E_GLVFGEN_TIMER,4,2         ## @I40E_GLVFGEN_TIMER
	.comm	_I40E_DEBUG_ALL,4,2             ## @I40E_DEBUG_ALL
L_.str.1:                               ## @.str.1
	.asciz	"NVMUPD: write semaphore expired (%d >= %lld), retrying\n"

	.comm	_I40E_RESOURCE_WRITE,4,2        ## @I40E_RESOURCE_WRITE
L_.str.2:                               ## @.str.2
	.asciz	"NVMUPD: write semaphore reacquire failed aq_err = %d\n"

	.no_dead_strip	_i40e_nvmupd_state_writing
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i40e_nvmupd_state_writing
_i40e_nvmupd_state_writing:             ; @i40e_nvmupd_state_writing
	.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	x20, x3
	str	x2, [sp, #8]                    ; 8-byte Folded Spill
	mov	x22, x1
	mov	x19, x0
	mov	x2, x3
	bl	_i40e_nvmupd_validate_command
	mov	w21, #0
	mov	w26, w0
Lloh0:
	adrp	x28, _I40E_AQ_RC_EBUSY@GOTPAGE
Lloh1:
	ldr	x28, [x28, _I40E_AQ_RC_EBUSY@GOTPAGEOFF]
Lloh2:
	adrp	x24, _I40E_GLVFGEN_TIMER@GOTPAGE
Lloh3:
	ldr	x24, [x24, _I40E_GLVFGEN_TIMER@GOTPAGEOFF]
Lloh4:
	adrp	x27, _I40E_DEBUG_ALL@GOTPAGE
Lloh5:
	ldr	x27, [x27, _I40E_DEBUG_ALL@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	sub	w8, w26, #128
	cmp	w8, #3
	b.hi	LBB0_10
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
Lloh6:
	adrp	x11, lJTI0_0@PAGE
Lloh7:
	add	x11, x11, lJTI0_0@PAGEOFF
	adr	x9, LBB0_3
	ldrb	w10, [x11, x8]
	add	x9, x9, x10, lsl #2
	br	x9
LBB0_3:                                 ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x19
	mov	x1, x22
	ldr	x2, [sp, #8]                    ; 8-byte Folded Reload
	mov	x3, x20
	bl	_i40e_nvmupd_nvm_write
	mov	x23, x0
	cbnz	x0, LBB0_6
	b	LBB0_16
LBB0_4:                                 ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x19
	bl	_i40e_update_nvm_checksum
	mov	x23, x0
	cbnz	x0, LBB0_6
	b	LBB0_16
LBB0_5:                                 ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x19
	bl	_i40e_update_nvm_checksum
	mov	x23, x0
	cbz	x0, LBB0_17
LBB0_6:                                 ;   in Loop: Header=BB0_1 Depth=1
	ldr	x1, [x19, #8]
	cbz	x1, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x23
	bl	_i40e_aq_rc_to_posix
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_1 Depth=1
Lloh8:
	adrp	x8, _EIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:                                 ;   in Loop: Header=BB0_1 Depth=1
	str	w0, [x20]
Lloh11:
	adrp	x8, _I40E_NVMUPD_STATE_INIT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _I40E_NVMUPD_STATE_INIT@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	str	x8, [x19, #24]
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_1 Depth=1
Lloh14:
	adrp	x8, _I40E_DEBUG_NVM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _I40E_DEBUG_NVM@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x8, _i40e_nvm_update_state_str@GOTPAGE
Lloh18:
	ldr	x8, [x8, _i40e_nvm_update_state_str@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	ldr	x3, [x8, x26, lsl #3]
	mov	x0, x19
Lloh20:
	adrp	x2, l_.str@PAGE
Lloh21:
	add	x2, x2, l_.str@PAGEOFF
	bl	_i40e_debug
Lloh22:
	adrp	x8, _I40E_NOT_SUPPORTED@GOTPAGE
Lloh23:
	ldr	x8, [x8, _I40E_NOT_SUPPORTED@GOTPAGEOFF]
Lloh24:
	ldr	x23, [x8]
Lloh25:
	adrp	x8, _ESRCH@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ESRCH@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	neg	w8, w8
	str	w8, [x20]
	cbnz	x23, LBB0_12
	b	LBB0_19
LBB0_11:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x19
	mov	x1, x22
	ldr	x2, [sp, #8]                    ; 8-byte Folded Reload
	mov	x3, x20
	bl	_i40e_nvmupd_nvm_write
	mov	x23, x0
	cbz	x0, LBB0_17
LBB0_12:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x25, [x19, #8]
	ldr	x8, [x28]
	cmp	x25, x8
	cset	w8, ne
	orr	w8, w21, w8
	tbnz	w8, #0, LBB0_19
; %bb.13:                               ;   in Loop: Header=BB0_1 Depth=1
	ldr	w1, [x24]
	mov	x0, x19
	bl	_rd32
	ldr	x8, [x19, #16]
	cmp	x0, x8
	b.lt	LBB0_19
; %bb.14:                               ;   in Loop: Header=BB0_1 Depth=1
	mov	x3, x0
	ldr	w1, [x27]
	str	x8, [sp]
	mov	x0, x19
Lloh28:
	adrp	x2, l_.str.1@PAGE
Lloh29:
	add	x2, x2, l_.str.1@PAGEOFF
	bl	_i40e_debug
	mov	x0, x19
	bl	_i40e_release_nvm
Lloh30:
	adrp	x8, _I40E_RESOURCE_WRITE@GOTPAGE
Lloh31:
	ldr	x8, [x8, _I40E_RESOURCE_WRITE@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_i40e_acquire_nvm
	mov	w21, #1
	cbz	x0, LBB0_1
; %bb.15:
	ldr	w1, [x27]
	ldr	x3, [x19, #8]
Lloh33:
	adrp	x2, l_.str.2@PAGE
Lloh34:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_i40e_debug
	str	x25, [x19, #8]
	b	LBB0_19
LBB0_16:
	mov	w8, #1
	str	w8, [x19]
Lloh35:
	adrp	x8, _i40e_aqc_opc_nvm_update@GOTPAGE
Lloh36:
	ldr	x8, [x8, _i40e_aqc_opc_nvm_update@GOTPAGEOFF]
Lloh37:
	ldr	x8, [x8]
Lloh38:
	adrp	x9, _I40E_NVMUPD_STATE_INIT_WAIT@GOTPAGE
Lloh39:
	ldr	x9, [x9, _I40E_NVMUPD_STATE_INIT_WAIT@GOTPAGEOFF]
	b	LBB0_18
LBB0_17:
Lloh40:
	adrp	x8, _i40e_aqc_opc_nvm_update@GOTPAGE
Lloh41:
	ldr	x8, [x8, _i40e_aqc_opc_nvm_update@GOTPAGEOFF]
Lloh42:
	ldr	x8, [x8]
Lloh43:
	adrp	x9, _I40E_NVMUPD_STATE_WRITE_WAIT@GOTPAGE
Lloh44:
	ldr	x9, [x9, _I40E_NVMUPD_STATE_WRITE_WAIT@GOTPAGEOFF]
LBB0_18:
	ldr	x9, [x9]
	stp	x9, x8, [x19, #24]
LBB0_19:
	mov	x0, x23
	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	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_11-LBB0_3)>>2
	.byte	(LBB0_4-LBB0_3)>>2
	.byte	(LBB0_5-LBB0_3)>>2
                                        ; -- End function
	.comm	_i40e_aqc_opc_nvm_update,8,3    ; @i40e_aqc_opc_nvm_update
	.comm	_I40E_NVMUPD_STATE_WRITE_WAIT,8,3 ; @I40E_NVMUPD_STATE_WRITE_WAIT
	.comm	_EIO,4,2                        ; @EIO
	.comm	_I40E_NVMUPD_STATE_INIT,8,3     ; @I40E_NVMUPD_STATE_INIT
	.comm	_I40E_NVMUPD_STATE_INIT_WAIT,8,3 ; @I40E_NVMUPD_STATE_INIT_WAIT
	.comm	_I40E_DEBUG_NVM,4,2             ; @I40E_DEBUG_NVM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"NVMUPD: bad cmd %s in writing state.\n"

	.comm	_i40e_nvm_update_state_str,8,3  ; @i40e_nvm_update_state_str
	.comm	_I40E_NOT_SUPPORTED,8,3         ; @I40E_NOT_SUPPORTED
	.comm	_ESRCH,4,2                      ; @ESRCH
	.comm	_I40E_AQ_RC_EBUSY,8,3           ; @I40E_AQ_RC_EBUSY
	.comm	_I40E_GLVFGEN_TIMER,4,2         ; @I40E_GLVFGEN_TIMER
	.comm	_I40E_DEBUG_ALL,4,2             ; @I40E_DEBUG_ALL
l_.str.1:                               ; @.str.1
	.asciz	"NVMUPD: write semaphore expired (%d >= %lld), retrying\n"

	.comm	_I40E_RESOURCE_WRITE,4,2        ; @I40E_RESOURCE_WRITE
l_.str.2:                               ; @.str.2
	.asciz	"NVMUPD: write semaphore reacquire failed aq_err = %d\n"

	.no_dead_strip	_i40e_nvmupd_state_writing
.subsections_via_symbols
