	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i40e_calc_nvm_checksum
_i40e_calc_nvm_checksum:                ## @i40e_calc_nvm_checksum
	.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, %r14
	movq	%rdi, %r12
	movl	$0, -52(%rbp)
	movl	$0, -48(%rbp)
	movq	_I40E_SR_SECTOR_SIZE_IN_WORDS@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	shll	$2, %edx
	leaq	-64(%rbp), %rsi
	callq	_i40e_allocate_virt_mem
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_17
## %bb.1:
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movq	-64(%rbp), %r15
	movq	_I40E_SR_VPD_PTR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movq	%r12, %rdi
	callq	___i40e_read_nvm_word
	testq	%rax, %rax
	jne	LBB0_2
## %bb.3:
	movq	_I40E_SR_PCIE_ALT_AUTO_LOAD_PTR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-52(%rbp), %rdx
	movq	%r12, %rdi
	callq	___i40e_read_nvm_word
	testq	%rax, %rax
	je	LBB0_4
LBB0_2:
	movq	_I40E_ERR_NVM_CHECKSUM@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
LBB0_17:
	leaq	-64(%rbp), %rsi
	movq	%r12, %rdi
	callq	_i40e_free_virt_mem
	movq	%rbx, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	cmpl	$0, (%r12)
	jle	LBB0_5
## %bb.6:
	xorl	%ebx, %ebx
	movq	_I40E_SR_SW_CHECKSUM_WORD@GOTPCREL(%rip), %r14
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	%ebx, %eax
	cltd
	idivl	(%r13)
                                        ## kill: def $edx killed $edx def $rdx
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addl	(%r15,%rdx,4), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
LBB0_15:                                ##   in Loop: Header=BB0_7 Depth=1
	incl	%ebx
	cmpl	(%r12), %ebx
	jge	LBB0_16
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %ecx
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	%ecx, -56(%rbp)
	movq	%r12, %rdi
	movl	%ebx, %esi
	leaq	-56(%rbp), %rdx
	movq	%r15, %rcx
	callq	___i40e_read_nvm_buffer
	testq	%rax, %rax
	jne	LBB0_2
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	cmpl	(%r14), %ebx
	je	LBB0_15
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	-48(%rbp), %eax
	cmpl	%eax, %ebx
	jl	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_I40E_SR_VPD_MODULE_MAX_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, %edx
	shrl	$31, %edx
	addl	%ecx, %edx
	sarl	%edx
	addl	%eax, %edx
	cmpl	%edx, %ebx
	jl	LBB0_15
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	-52(%rbp), %eax
	cmpl	%eax, %ebx
	jl	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_I40E_SR_PCIE_ALT_MODULE_MAX_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, %edx
	shrl	$31, %edx
	addl	%ecx, %edx
	sarl	%edx
	addl	%eax, %edx
	cmpl	%edx, %ebx
	jge	LBB0_14
	jmp	LBB0_15
LBB0_5:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_16:
	movq	_I40E_SR_SW_CHECKSUM_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	subl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	xorl	%ebx, %ebx
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_I40E_SR_SECTOR_SIZE_IN_WORDS,4,2 ## @I40E_SR_SECTOR_SIZE_IN_WORDS
	.comm	_I40E_SR_VPD_PTR,4,2            ## @I40E_SR_VPD_PTR
	.comm	_I40E_ERR_NVM_CHECKSUM,8,3      ## @I40E_ERR_NVM_CHECKSUM
	.comm	_I40E_SR_PCIE_ALT_AUTO_LOAD_PTR,4,2 ## @I40E_SR_PCIE_ALT_AUTO_LOAD_PTR
	.comm	_I40E_SR_SW_CHECKSUM_WORD,4,2   ## @I40E_SR_SW_CHECKSUM_WORD
	.comm	_I40E_SR_VPD_MODULE_MAX_SIZE,4,2 ## @I40E_SR_VPD_MODULE_MAX_SIZE
	.comm	_I40E_SR_PCIE_ALT_MODULE_MAX_SIZE,4,2 ## @I40E_SR_PCIE_ALT_MODULE_MAX_SIZE
	.comm	_I40E_SR_SW_CHECKSUM_BASE,8,3   ## @I40E_SR_SW_CHECKSUM_BASE
	.no_dead_strip	_i40e_calc_nvm_checksum
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i40e_calc_nvm_checksum
_i40e_calc_nvm_checksum:                ; @i40e_calc_nvm_checksum
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	str	xzr, [sp, #16]
Lloh0:
	adrp	x23, _I40E_SR_SECTOR_SIZE_IN_WORDS@GOTPAGE
Lloh1:
	ldr	x23, [x23, _I40E_SR_SECTOR_SIZE_IN_WORDS@GOTPAGEOFF]
	ldr	w8, [x23]
	lsl	w2, w8, #2
	add	x1, sp, #24
	bl	_i40e_allocate_virt_mem
	mov	x21, x0
	cbnz	x0, LBB0_4
; %bb.1:
	ldr	x21, [sp, #24]
Lloh2:
	adrp	x8, _I40E_SR_VPD_PTR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _I40E_SR_VPD_PTR@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	add	x2, sp, #16
	mov	x0, x19
	bl	___i40e_read_nvm_word
	cbnz	x0, LBB0_3
; %bb.2:
Lloh5:
	adrp	x8, _I40E_SR_PCIE_ALT_AUTO_LOAD_PTR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _I40E_SR_PCIE_ALT_AUTO_LOAD_PTR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	add	x2, sp, #20
	mov	x0, x19
	bl	___i40e_read_nvm_word
	cbz	x0, LBB0_5
LBB0_3:
Lloh8:
	adrp	x8, _I40E_ERR_NVM_CHECKSUM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _I40E_ERR_NVM_CHECKSUM@GOTPAGEOFF]
Lloh10:
	ldr	x21, [x8]
LBB0_4:
	add	x1, sp, #24
	mov	x0, x19
	bl	_i40e_free_virt_mem
	mov	x0, x21
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_5:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_16
; %bb.6:
	mov	w22, #0
	mov	w24, #0
Lloh11:
	adrp	x25, _I40E_ERR_NVM_CHECKSUM@GOTPAGE
Lloh12:
	ldr	x25, [x25, _I40E_ERR_NVM_CHECKSUM@GOTPAGEOFF]
Lloh13:
	adrp	x26, _I40E_SR_SW_CHECKSUM_WORD@GOTPAGE
Lloh14:
	ldr	x26, [x26, _I40E_SR_SW_CHECKSUM_WORD@GOTPAGEOFF]
Lloh15:
	adrp	x27, _I40E_SR_PCIE_ALT_MODULE_MAX_SIZE@GOTPAGE
Lloh16:
	ldr	x27, [x27, _I40E_SR_PCIE_ALT_MODULE_MAX_SIZE@GOTPAGEOFF]
Lloh17:
	adrp	x28, _I40E_SR_VPD_MODULE_MAX_SIZE@GOTPAGE
Lloh18:
	ldr	x28, [x28, _I40E_SR_VPD_MODULE_MAX_SIZE@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=1
	ldr	w8, [x23]
	sdiv	w9, w22, w8
	msub	w8, w9, w8, w22
	ldr	w8, [x21, w8, uxtw #2]
	add	w24, w8, w24
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	w22, w22, #1
	ldr	w8, [x19]
	cmp	w22, w8
	b.ge	LBB0_17
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x23]
	sdiv	w9, w22, w8
	msub	w9, w9, w8, w22
	cbnz	w9, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	str	w8, [sp, #12]
	add	x2, sp, #12
	mov	x0, x19
	mov	x1, x22
	mov	x3, x21
	bl	___i40e_read_nvm_buffer
	cbnz	x0, LBB0_18
LBB0_11:                                ;   in Loop: Header=BB0_9 Depth=1
	ldr	w8, [x26]
	cmp	w22, w8
	b.eq	LBB0_8
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w8, [sp, #16]
	cmp	w22, w8
	b.lt	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w9, [x28]
	cmp	w9, #0
	cinc	w9, w9, lt
	add	w8, w8, w9, asr #1
	cmp	w22, w8
	b.lt	LBB0_8
LBB0_14:                                ;   in Loop: Header=BB0_9 Depth=1
	ldr	w8, [sp, #20]
	cmp	w22, w8
	b.lt	LBB0_7
; %bb.15:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w9, [x27]
	cmp	w9, #0
	cinc	w9, w9, lt
	add	w8, w8, w9, asr #1
	cmp	w22, w8
	b.ge	LBB0_7
	b	LBB0_8
LBB0_16:
	mov	w24, #0
LBB0_17:
	mov	x21, #0
Lloh19:
	adrp	x8, _I40E_SR_SW_CHECKSUM_BASE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _I40E_SR_SW_CHECKSUM_BASE@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	sub	w8, w8, w24
	str	w8, [x20]
	b	LBB0_4
LBB0_18:
	ldr	x21, [x25]
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_I40E_SR_SECTOR_SIZE_IN_WORDS,4,2 ; @I40E_SR_SECTOR_SIZE_IN_WORDS
	.comm	_I40E_SR_VPD_PTR,4,2            ; @I40E_SR_VPD_PTR
	.comm	_I40E_ERR_NVM_CHECKSUM,8,3      ; @I40E_ERR_NVM_CHECKSUM
	.comm	_I40E_SR_PCIE_ALT_AUTO_LOAD_PTR,4,2 ; @I40E_SR_PCIE_ALT_AUTO_LOAD_PTR
	.comm	_I40E_SR_SW_CHECKSUM_WORD,4,2   ; @I40E_SR_SW_CHECKSUM_WORD
	.comm	_I40E_SR_VPD_MODULE_MAX_SIZE,4,2 ; @I40E_SR_VPD_MODULE_MAX_SIZE
	.comm	_I40E_SR_PCIE_ALT_MODULE_MAX_SIZE,4,2 ; @I40E_SR_PCIE_ALT_MODULE_MAX_SIZE
	.comm	_I40E_SR_SW_CHECKSUM_BASE,8,3   ; @I40E_SR_SW_CHECKSUM_BASE
	.no_dead_strip	_i40e_calc_nvm_checksum
.subsections_via_symbols
