	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function be_clear
_be_clear:                              ## @be_clear
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %r14
	movl	$0, -40(%rbp)
	callq	_be_cancel_worker
	movq	_be_wq@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_flush_workqueue
	movq	%rbx, %rdi
	callq	_sriov_enabled
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_be_vf_clear
LBB0_2:
	movq	%rbx, %rdi
	callq	_skyhawk_chip
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movq	%rbx, %rdi
	callq	_be_physfn
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	%r14, %rdi
	callq	_pci_vfs_assigned
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	callq	_pci_sriov_get_totalvfs
	leaq	-40(%rbp), %r15
	movq	%rbx, %rdi
	movl	%eax, %esi
	movq	%r15, %rdx
	callq	_be_calculate_vf_res
	movl	4(%rbx), %r12d
	movq	%r14, %rdi
	callq	_pci_sriov_get_totalvfs
	movq	%rbx, %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	movq	%r15, %rcx
	callq	_be_cmd_set_sriov_config
LBB0_6:
	movq	%rbx, %rdi
	callq	_be_disable_vxlan_offloads
	movq	%rbx, %rdi
	callq	_be_if_destroy
	movq	%rbx, %rdi
	callq	_be_clear_queues
	movq	%rbx, %rdi
	callq	_be_msix_disable
	movq	_BE_FLAGS_SETUP_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, (%rbx)
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_be_wq,4,2                      ## @be_wq
	.comm	_BE_FLAGS_SETUP_DONE,4,2        ## @BE_FLAGS_SETUP_DONE
	.no_dead_strip	_be_clear
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function be_clear
_be_clear:                              ; @be_clear
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x0
	ldr	x20, [x0, #8]
	str	wzr, [sp, #8]
	bl	_be_cancel_worker
Lloh0:
	adrp	x8, _be_wq@GOTPAGE
Lloh1:
	ldr	x8, [x8, _be_wq@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_flush_workqueue
	mov	x0, x19
	bl	_sriov_enabled
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_be_vf_clear
LBB0_2:
	mov	x0, x19
	bl	_skyhawk_chip
	cbz	x0, LBB0_6
; %bb.3:
	mov	x0, x19
	bl	_be_physfn
	cbz	x0, LBB0_6
; %bb.4:
	mov	x0, x20
	bl	_pci_vfs_assigned
	cbnz	w0, LBB0_6
; %bb.5:
	mov	x0, x20
	bl	_pci_sriov_get_totalvfs
	mov	x1, x0
	add	x2, sp, #8
	mov	x0, x19
	bl	_be_calculate_vf_res
	ldr	w21, [x19, #4]
	mov	x0, x20
	bl	_pci_sriov_get_totalvfs
	mov	x2, x0
	add	x3, sp, #8
	mov	x0, x19
	mov	x1, x21
	bl	_be_cmd_set_sriov_config
LBB0_6:
	mov	x0, x19
	bl	_be_disable_vxlan_offloads
	mov	x0, x19
	bl	_be_if_destroy
	mov	x0, x19
	bl	_be_clear_queues
	mov	x0, x19
	bl	_be_msix_disable
Lloh3:
	adrp	x8, _BE_FLAGS_SETUP_DONE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BE_FLAGS_SETUP_DONE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [x19]
	bic	w8, w9, w8
	str	w8, [x19]
	mov	w0, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_be_wq,4,2                      ; @be_wq
	.comm	_BE_FLAGS_SETUP_DONE,4,2        ; @BE_FLAGS_SETUP_DONE
	.no_dead_strip	_be_clear
.subsections_via_symbols
