	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i40e_acquire_nvm               ## -- Begin function i40e_acquire_nvm
	.p2align	4, 0x90
_i40e_acquire_nvm:                      ## @i40e_acquire_nvm
	.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	$0, -48(%rbp)
	cmpq	$0, 16(%rdi)
	je	LBB0_2
## %bb.1:
	xorl	%r13d, %r13d
	jmp	LBB0_13
LBB0_2:
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_I40E_NVM_RESOURCE_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r13d, %r13d
	leaq	-48(%rbp), %r8
	movl	%r14d, %edx
	xorl	%ecx, %ecx
	xorl	%r9d, %r9d
	callq	_i40e_aq_request_resource
	movq	%rax, %rbx
	movq	_I40E_GLVFGEN_TIMER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_rd32
	movq	%rax, %r12
	movq	-48(%rbp), %rdi
	callq	_I40E_MS_TO_GTIME
	addq	%r12, %rax
	movq	%rax, 8(%r15)
	testq	%rbx, %rbx
	je	LBB0_13
## %bb.3:
	movq	_I40E_DEBUG_NVM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %ecx
	movq	-48(%rbp), %r8
	movl	(%r15), %eax
	movl	%eax, (%rsp)
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	movl	%ebx, %r9d
	xorl	%eax, %eax
	callq	_i40e_debug
	cmpq	$0, -48(%rbp)
	je	LBB0_12
## %bb.4:
	movq	_I40E_MAX_NVM_TIMEOUT@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_I40E_MS_TO_GTIME
	movq	-48(%rbp), %rcx
	testq	%rax, %rax
	jle	LBB0_11
## %bb.5:
	testq	%rcx, %rcx
	je	LBB0_11
## %bb.6:
	movq	%rax, %r13
	addq	%r12, %r13
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	$10000, %edi                    ## imm = 0x2710
	movl	$20000, %esi                    ## imm = 0x4E20
	callq	_usleep_range
	movq	_I40E_GLVFGEN_TIMER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_rd32
	movq	%rax, %r12
	movq	_I40E_NVM_RESOURCE_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%r14d, %edx
	xorl	%ecx, %ecx
	leaq	-48(%rbp), %r8
	xorl	%r9d, %r9d
	callq	_i40e_aq_request_resource
	testq	%rax, %rax
	je	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_9 Depth=1
	movq	%rax, %rbx
	movq	-48(%rbp), %rcx
	cmpq	%r13, %r12
	jge	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_9 Depth=1
	testq	%rcx, %rcx
	jne	LBB0_9
LBB0_11:
	movq	$0, 8(%r15)
	movq	_I40E_DEBUG_NVM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15), %r9d
	leaq	L_.str.1(%rip), %rdx
	movq	%r15, %rdi
	movq	%rbx, %r8
	xorl	%eax, %eax
	callq	_i40e_debug
LBB0_12:
	movq	%rbx, %r13
LBB0_13:
	movq	%r13, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	-48(%rbp), %rdi
	callq	_I40E_MS_TO_GTIME
	addq	%r12, %rax
	movq	%rax, 8(%r15)
	xorl	%r13d, %r13d
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_I40E_NVM_RESOURCE_ID,4,2       ## @I40E_NVM_RESOURCE_ID
	.comm	_I40E_GLVFGEN_TIMER,4,2         ## @I40E_GLVFGEN_TIMER
	.comm	_I40E_DEBUG_NVM,4,2             ## @I40E_DEBUG_NVM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"NVM acquire type %d failed time_left=%llu ret=%d aq_err=%d\n"

	.comm	_I40E_MAX_NVM_TIMEOUT,8,3       ## @I40E_MAX_NVM_TIMEOUT
L_.str.1:                               ## @.str.1
	.asciz	"NVM acquire timed out, wait %llu ms before trying again. status=%d aq_err=%d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i40e_acquire_nvm               ; -- Begin function i40e_acquire_nvm
	.p2align	2
_i40e_acquire_nvm:                      ; @i40e_acquire_nvm
	.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	x21, #0
	str	xzr, [sp, #8]
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_2
LBB0_1:
	mov	x0, x21
	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
LBB0_2:
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x23, _I40E_NVM_RESOURCE_ID@GOTPAGE
Lloh1:
	ldr	x23, [x23, _I40E_NVM_RESOURCE_ID@GOTPAGEOFF]
	ldr	w1, [x23]
	add	x4, sp, #8
	mov	x2, x20
	mov	w3, #0
	mov	x5, #0
	bl	_i40e_aq_request_resource
	mov	x21, x0
Lloh2:
	adrp	x24, _I40E_GLVFGEN_TIMER@GOTPAGE
Lloh3:
	ldr	x24, [x24, _I40E_GLVFGEN_TIMER@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	bl	_rd32
	mov	x22, x0
	ldr	x0, [sp, #8]
	bl	_I40E_MS_TO_GTIME
	add	x8, x0, x22
	str	x8, [x19, #8]
	cbz	x21, LBB0_1
; %bb.3:
Lloh4:
	adrp	x25, _I40E_DEBUG_NVM@GOTPAGE
Lloh5:
	ldr	x25, [x25, _I40E_DEBUG_NVM@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	w3, w20
	ldr	x4, [sp, #8]
	ldr	w8, [x19]
	str	x8, [sp]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	x5, x21
	bl	_i40e_debug
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_1
; %bb.4:
Lloh8:
	adrp	x8, _I40E_MAX_NVM_TIMEOUT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _I40E_MAX_NVM_TIMEOUT@GOTPAGEOFF]
Lloh10:
	ldr	x0, [x8]
	bl	_I40E_MS_TO_GTIME
	ldr	x3, [sp, #8]
	cmp	x0, #1
	ccmp	x3, #0, #4, ge
	b.eq	LBB0_8
; %bb.5:
	add	x26, x0, x22
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #10000
	mov	w1, #20000
	bl	_usleep_range
	ldr	w1, [x24]
	mov	x0, x19
	bl	_rd32
	mov	x22, x0
	ldr	w1, [x23]
	add	x4, sp, #8
	mov	x0, x19
	mov	x2, x20
	mov	w3, #0
	mov	x5, #0
	bl	_i40e_aq_request_resource
	mov	x21, x0
	cbz	x0, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x3, [sp, #8]
	cmp	x22, x26
	ccmp	x3, #0, #4, lt
	b.ne	LBB0_6
LBB0_8:
	str	xzr, [x19, #8]
	ldr	w1, [x25]
	ldr	w5, [x19]
Lloh11:
	adrp	x2, l_.str.1@PAGE
Lloh12:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x4, x21
	bl	_i40e_debug
	b	LBB0_1
LBB0_9:
	ldr	x0, [sp, #8]
	bl	_I40E_MS_TO_GTIME
	add	x8, x0, x22
	str	x8, [x19, #8]
	b	LBB0_1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_I40E_NVM_RESOURCE_ID,4,2       ; @I40E_NVM_RESOURCE_ID
	.comm	_I40E_GLVFGEN_TIMER,4,2         ; @I40E_GLVFGEN_TIMER
	.comm	_I40E_DEBUG_NVM,4,2             ; @I40E_DEBUG_NVM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"NVM acquire type %d failed time_left=%llu ret=%d aq_err=%d\n"

	.comm	_I40E_MAX_NVM_TIMEOUT,8,3       ; @I40E_MAX_NVM_TIMEOUT
l_.str.1:                               ; @.str.1
	.asciz	"NVM acquire timed out, wait %llu ms before trying again. status=%d aq_err=%d\n"

.subsections_via_symbols
