	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i40e_prep_for_reset
_i40e_prep_for_reset:                   ## @i40e_prep_for_reset
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	___I40E_RESET_INTR_RECEIVED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	32(%rbx), %esi
	callq	_clear_bit
	movq	___I40E_RESET_RECOVERY_PENDING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	32(%rbx), %esi
	callq	_test_and_set_bit
	testq	%rax, %rax
	je	LBB0_1
## %bb.28:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	leaq	16(%rbx), %r14
	movq	%r14, %rdi
	callq	_i40e_check_asq_alive
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_i40e_vc_notify_reset
LBB0_3:
	movq	8(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	testl	%r15d, %r15d
	je	LBB0_4
## %bb.5:
	movq	%rbx, %rdi
	callq	_i40e_pf_quiesce_all_vsi
	jmp	LBB0_6
LBB0_4:
	xorl	%eax, %eax
	callq	_rtnl_lock
	movq	%rbx, %rdi
	callq	_i40e_pf_quiesce_all_vsi
	xorl	%eax, %eax
	callq	_rtnl_unlock
LBB0_6:
	movq	(%rbx), %rdx
	testq	%rdx, %rdx
	je	LBB0_24
## %bb.7:
	movq	24(%rbx), %rcx
	leaq	-1(%rdx), %rsi
	movl	%edx, %eax
	andl	$3, %eax
	cmpq	$3, %rsi
	jae	LBB0_9
## %bb.8:
	xorl	%esi, %esi
LBB0_19:
	testq	%rax, %rax
	je	LBB0_24
## %bb.20:
	leaq	(%rcx,%rsi,8), %rcx
	xorl	%edx, %edx
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_21 Depth=1
	incq	%rdx
	cmpq	%rdx, %rax
	je	LBB0_24
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rdx,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=1
	movq	$0, (%rsi)
	jmp	LBB0_23
LBB0_24:
	movq	%r14, %rdi
	callq	_i40e_shutdown_adminq
	cmpq	$0, (%r14)
	je	LBB0_27
## %bb.25:
	movq	%r14, %rdi
	callq	_i40e_shutdown_lan_hmc
	testq	%rax, %rax
	je	LBB0_27
## %bb.26:
	movq	8(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	movq	%rax, %rdx
	callq	_dev_warn
LBB0_27:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_i40e_ptp_save_hw_time          ## TAILCALL
LBB0_9:
	andq	$-4, %rdx
	xorl	%esi, %esi
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_10 Depth=1
	addq	$4, %rsi
	cmpq	%rsi, %rdx
	je	LBB0_19
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rsi,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	$0, (%rdi)
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	8(%rcx,%rsi,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	$0, (%rdi)
LBB0_14:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	16(%rcx,%rsi,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	$0, (%rdi)
LBB0_16:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	24(%rcx,%rsi,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	$0, (%rdi)
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	___I40E_RESET_INTR_RECEIVED,4,2 ## @__I40E_RESET_INTR_RECEIVED
	.comm	___I40E_RESET_RECOVERY_PENDING,4,2 ## @__I40E_RESET_RECOVERY_PENDING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Tearing down internal switch for reset\n"

L_.str.1:                               ## @.str.1
	.asciz	"shutdown_lan_hmc failed: %d\n"

	.no_dead_strip	_i40e_prep_for_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i40e_prep_for_reset
_i40e_prep_for_reset:                   ; @i40e_prep_for_reset
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___I40E_RESET_INTR_RECEIVED@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___I40E_RESET_INTR_RECEIVED@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	w1, [x19, #32]
	bl	_clear_bit
Lloh3:
	adrp	x8, ___I40E_RESET_RECOVERY_PENDING@GOTPAGE
Lloh4:
	ldr	x8, [x8, ___I40E_RESET_RECOVERY_PENDING@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ldr	w1, [x19, #32]
	bl	_test_and_set_bit
	cbz	x0, LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_2:
	add	x20, x19, #16
	mov	x0, x20
	bl	_i40e_check_asq_alive
	cbz	x0, LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_i40e_vc_notify_reset
LBB0_4:
	ldr	x0, [x19, #8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	cbz	w21, LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_i40e_pf_quiesce_all_vsi
	ldr	x8, [x19]
	cbnz	x8, LBB0_7
	b	LBB0_11
LBB0_6:
	bl	_rtnl_lock
	mov	x0, x19
	bl	_i40e_pf_quiesce_all_vsi
	bl	_rtnl_unlock
	ldr	x8, [x19]
	cbz	x8, LBB0_11
LBB0_7:
	ldr	x9, [x19, #24]
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x9, x9, #8
	subs	x8, x8, #1
	b.eq	LBB0_11
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9]
	cbz	x10, LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	str	xzr, [x10]
	b	LBB0_8
LBB0_11:
	mov	x0, x20
	bl	_i40e_shutdown_adminq
	ldr	x8, [x20]
	cbz	x8, LBB0_14
; %bb.12:
	mov	x0, x20
	bl	_i40e_shutdown_lan_hmc
	cbz	x0, LBB0_14
; %bb.13:
	mov	x2, x0
	ldr	x0, [x19, #8]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_warn
LBB0_14:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_i40e_ptp_save_hw_time
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	___I40E_RESET_INTR_RECEIVED,4,2 ; @__I40E_RESET_INTR_RECEIVED
	.comm	___I40E_RESET_RECOVERY_PENDING,4,2 ; @__I40E_RESET_RECOVERY_PENDING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Tearing down internal switch for reset\n"

l_.str.1:                               ; @.str.1
	.asciz	"shutdown_lan_hmc failed: %d\n"

	.no_dead_strip	_i40e_prep_for_reset
.subsections_via_symbols
