	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i40e_write_nvm_aq
_i40e_write_nvm_aq:                     ## @i40e_write_nvm_aq
	.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
	movl	%r9d, -48(%rbp)                 ## 4-byte Spill
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r12
	movq	%rdx, %r13
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	_I40E_ERR_NVM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	leaq	-64(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	%r14, %rdi
	leaq	8(%r14), %rax
	movq	%rax, -64(%rbp)
	leaq	(%r12,%r13), %rcx
	movq	(%r14), %r8
	cmpq	%r8, %rcx
	jle	LBB0_3
## %bb.1:
	movq	_I40E_DEBUG_NVM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	jmp	LBB0_2
LBB0_3:
	movq	%r13, %r11
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movl	-48(%rbp), %r13d                ## 4-byte Reload
	movq	_I40E_SR_SECTOR_SIZE_IN_WORDS@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	cmpq	%r12, %r8
	jge	LBB0_5
## %bb.4:
	movq	_I40E_DEBUG_NVM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r12, %rcx
	jmp	LBB0_2
LBB0_5:
	decq	%rcx
	movq	%rcx, %rax
	orq	%r8, %rax
	shrq	$32, %rax
	je	LBB0_6
## %bb.7:
	movq	%rcx, %rax
	cqto
	idivq	%r8
	movq	%rax, %rcx
	jmp	LBB0_8
LBB0_6:
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	%r8d
	movl	%eax, %ecx
LBB0_8:
	movl	%r13d, %r9d
	movq	%r11, %rax
	orq	%r8, %rax
	shrq	$32, %rax
	je	LBB0_9
## %bb.10:
	movq	%r11, %rax
	cqto
	idivq	%r8
	cmpq	%rax, %rcx
	jne	LBB0_12
LBB0_13:
	movq	%r14, %r8
	addl	%r11d, %r11d
	addl	%r12d, %r12d
	movl	%r15d, %esi
	movl	%r11d, %edx
	movl	%r12d, %ecx
	pushq	%rbx
	pushq	$0
	callq	_i40e_aq_update_nvm
	addq	$16, %rsp
	jmp	LBB0_14
LBB0_9:
	movl	%r11d, %eax
	xorl	%edx, %edx
	divl	%r8d
                                        ## kill: def $eax killed $eax def $rax
	cmpq	%rax, %rcx
	je	LBB0_13
LBB0_12:
	movq	_I40E_DEBUG_NVM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r11, %rcx
	movq	%r12, %r8
LBB0_2:
	callq	_i40e_debug
	movl	-44(%rbp), %eax                 ## 4-byte Reload
LBB0_14:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I40E_ERR_NVM,4,2               ## @I40E_ERR_NVM
	.comm	_I40E_DEBUG_NVM,4,2             ## @I40E_DEBUG_NVM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"NVM write error: offset %d beyond Shadow RAM limit %d\n"

	.comm	_I40E_SR_SECTOR_SIZE_IN_WORDS,8,3 ## @I40E_SR_SECTOR_SIZE_IN_WORDS
L_.str.1:                               ## @.str.1
	.asciz	"NVM write fail error: tried to write %d words, limit is %d.\n"

L_.str.2:                               ## @.str.2
	.asciz	"NVM write error: cannot spread over two sectors in a single write offset=%d words=%d\n"

	.no_dead_strip	_i40e_write_nvm_aq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i40e_write_nvm_aq
_i40e_write_nvm_aq:                     ; @i40e_write_nvm_aq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x22, x5
	mov	x23, x4
	mov	x21, x3
	mov	x25, x2
	mov	x24, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _I40E_ERR_NVM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I40E_ERR_NVM@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	mov	x8, x20
	ldr	x4, [x8], #8
	str	x8, [sp, #8]
	add	x3, x21, x25
	cmp	x3, x4
	b.le	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _I40E_DEBUG_NVM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _I40E_DEBUG_NVM@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	b	LBB0_7
LBB0_2:
Lloh8:
	adrp	x8, _I40E_SR_SECTOR_SIZE_IN_WORDS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _I40E_SR_SECTOR_SIZE_IN_WORDS@GOTPAGEOFF]
Lloh10:
	ldr	x4, [x8]
	cmp	x4, x21
	b.ge	LBB0_4
; %bb.3:
Lloh11:
	adrp	x8, _I40E_DEBUG_NVM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _I40E_DEBUG_NVM@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x2, l_.str.1@PAGE
Lloh15:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x3, x21
	b	LBB0_7
LBB0_4:
	sub	x8, x3, #1
	sdiv	x8, x8, x4
	sdiv	x9, x25, x4
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
	lsl	w2, w25, #1
	lsl	w3, w21, #1
	add	x7, sp, #8
	mov	x0, x20
	mov	x1, x24
	mov	x4, x23
	mov	x5, x22
	mov	w6, #0
	bl	_i40e_aq_update_nvm
	mov	x19, x0
	b	LBB0_8
LBB0_6:
Lloh16:
	adrp	x8, _I40E_DEBUG_NVM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _I40E_DEBUG_NVM@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
Lloh19:
	adrp	x2, l_.str.2@PAGE
Lloh20:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	x3, x25
	mov	x4, x21
LBB0_7:
	bl	_i40e_debug
LBB0_8:
	mov	x0, x19
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_I40E_ERR_NVM,4,2               ; @I40E_ERR_NVM
	.comm	_I40E_DEBUG_NVM,4,2             ; @I40E_DEBUG_NVM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"NVM write error: offset %d beyond Shadow RAM limit %d\n"

	.comm	_I40E_SR_SECTOR_SIZE_IN_WORDS,8,3 ; @I40E_SR_SECTOR_SIZE_IN_WORDS
l_.str.1:                               ; @.str.1
	.asciz	"NVM write fail error: tried to write %d words, limit is %d.\n"

l_.str.2:                               ; @.str.2
	.asciz	"NVM write error: cannot spread over two sectors in a single write offset=%d words=%d\n"

	.no_dead_strip	_i40e_write_nvm_aq
.subsections_via_symbols
