	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function be_setup
_be_setup:                              ## @be_setup
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	56(%rdi), %r14
	callq	_be_setup_init
	movq	%r15, %rdi
	callq	_lancer_chip
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	callq	_be_cmd_req_native_mode
LBB0_2:
	movq	%r15, %rdi
	callq	_be_get_config
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_26
## %bb.3:
	movq	%r15, %rdi
	callq	_be_msix_enable
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_26
## %bb.4:
	movq	_BE_IF_FLAGS_UNTAGGED@GOTPCREL(%rip), %rax
	movq	_BE_IF_FLAGS_BROADCAST@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rbx
	orq	(%rax), %rbx
	movq	_BE_IF_FLAGS_MULTICAST@GOTPCREL(%rip), %rax
	orq	(%rax), %rbx
	movq	_BE_IF_FLAGS_PASS_L3L4_ERRORS@GOTPCREL(%rip), %rax
	orq	(%rax), %rbx
	movq	_BE_FUNCTION_CAPS_RSS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%eax, %eax
	andl	(%r15), %ecx
	je	LBB0_6
## %bb.5:
	movq	_BE_IF_FLAGS_RSS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_6:
	orq	%rax, %rbx
	movq	%r15, %rdi
	callq	_be_if_cap_flags
	andq	%rax, %rbx
	movq	%r15, %rdi
	callq	_be_if_cap_flags
	leaq	52(%r15), %rcx
	movq	%r15, %rdi
	movq	%rax, %rsi
	movq	%rbx, %rdx
	xorl	%r8d, %r8d
	callq	_be_cmd_if_create
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_26
## %bb.7:
	xorl	%eax, %eax
	callq	_rtnl_lock
	movq	%r15, %rdi
	callq	_be_setup_queues
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_rtnl_unlock
	testl	%ebx, %ebx
	jne	LBB0_26
## %bb.8:
	leaq	48(%r15), %rbx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_be_cmd_get_fn_privileges
	movq	%r15, %rdi
	callq	_be_is_mc
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	_MAX_PRIVILEGES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
LBB0_10:
	movq	%r15, %rdi
	callq	_be_mac_setup
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_11
LBB0_26:
	movq	%r15, %rdi
	callq	_be_clear
LBB0_27:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movl	40(%r15), %edx
	movl	44(%r15), %esi
	movq	%r15, %rdi
	callq	_be_cmd_get_fw_ver
	cmpq	$0, 32(%r15)
	je	LBB0_13
## %bb.12:
	movq	%r15, %rdi
	callq	_be_vid_config
LBB0_13:
	movl	28(%r15), %edi
	callq	_be_set_rx_mode
	leaq	-40(%rbp), %rsi
	leaq	-32(%rbp), %rdx
	movq	%r15, %rdi
	callq	_be_cmd_get_flow_control
	movq	8(%r15), %rdx
	cmpq	%rdx, -32(%rbp)
	jne	LBB0_14
## %bb.15:
	movq	16(%r15), %rsi
	cmpq	%rsi, -40(%rbp)
	jne	LBB0_16
	jmp	LBB0_17
LBB0_14:
	movq	16(%r15), %rsi
LBB0_16:
	movq	%r15, %rdi
	callq	_be_cmd_set_flow_control
LBB0_17:
	movq	%r15, %rdi
	callq	_be_physfn
	testq	%rax, %rax
	je	LBB0_22
## %bb.18:
	movq	_num_vfs@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_22
## %bb.19:
	movq	%r15, %rdi
	callq	_be_max_vfs
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:
	movq	%r15, %rdi
	callq	_be_vf_setup
	jmp	LBB0_22
LBB0_21:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_warn
LBB0_22:
	movq	%r15, %rdi
	callq	_be_cmd_get_phy_info
	testl	%eax, %eax
	jne	LBB0_25
## %bb.23:
	movq	%r15, %rdi
	callq	_be_pause_supported
	testq	%rax, %rax
	je	LBB0_25
## %bb.24:
	movl	$1, 24(%r15)
LBB0_25:
	movq	%r15, %rdi
	callq	_be_schedule_worker
	xorl	%ebx, %ebx
	jmp	LBB0_27
	.cfi_endproc
                                        ## -- End function
	.comm	_BE_IF_FLAGS_UNTAGGED,8,3       ## @BE_IF_FLAGS_UNTAGGED
	.comm	_BE_IF_FLAGS_BROADCAST,8,3      ## @BE_IF_FLAGS_BROADCAST
	.comm	_BE_IF_FLAGS_MULTICAST,8,3      ## @BE_IF_FLAGS_MULTICAST
	.comm	_BE_IF_FLAGS_PASS_L3L4_ERRORS,8,3 ## @BE_IF_FLAGS_PASS_L3L4_ERRORS
	.comm	_BE_FUNCTION_CAPS_RSS,4,2       ## @BE_FUNCTION_CAPS_RSS
	.comm	_BE_IF_FLAGS_RSS,8,3            ## @BE_IF_FLAGS_RSS
	.comm	_MAX_PRIVILEGES,4,2             ## @MAX_PRIVILEGES
	.comm	_num_vfs,8,3                    ## @num_vfs
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"device doesn't support SRIOV\n"

	.no_dead_strip	_be_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function be_setup
_be_setup:                              ; @be_setup
	.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, #56]
	bl	_be_setup_init
	mov	x0, x19
	bl	_lancer_chip
	cbnz	w0, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_be_cmd_req_native_mode
LBB0_2:
	mov	x0, x19
	bl	_be_get_config
	mov	x21, x0
	cbnz	w0, LBB0_9
; %bb.3:
	mov	x0, x19
	bl	_be_msix_enable
	mov	x21, x0
	cbnz	w0, LBB0_9
; %bb.4:
Lloh0:
	adrp	x8, _BE_IF_FLAGS_UNTAGGED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BE_IF_FLAGS_UNTAGGED@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _BE_IF_FLAGS_BROADCAST@GOTPAGE
Lloh4:
	ldr	x9, [x9, _BE_IF_FLAGS_BROADCAST@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	orr	x8, x9, x8
Lloh6:
	adrp	x9, _BE_IF_FLAGS_MULTICAST@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BE_IF_FLAGS_MULTICAST@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	orr	x8, x8, x9
Lloh9:
	adrp	x9, _BE_IF_FLAGS_PASS_L3L4_ERRORS@GOTPAGE
Lloh10:
	ldr	x9, [x9, _BE_IF_FLAGS_PASS_L3L4_ERRORS@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	orr	x8, x8, x9
	mov	x21, x19
	ldr	w9, [x21], #52
Lloh12:
	adrp	x10, _BE_FUNCTION_CAPS_RSS@GOTPAGE
Lloh13:
	ldr	x10, [x10, _BE_FUNCTION_CAPS_RSS@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
Lloh15:
	adrp	x11, _BE_IF_FLAGS_RSS@GOTPAGE
Lloh16:
	ldr	x11, [x11, _BE_IF_FLAGS_RSS@GOTPAGEOFF]
Lloh17:
	ldr	x11, [x11]
	tst	w10, w9
	csel	x9, xzr, x11, eq
	orr	x22, x8, x9
	mov	x0, x19
	bl	_be_if_cap_flags
	and	x22, x22, x0
	mov	x0, x19
	bl	_be_if_cap_flags
	mov	x1, x0
	mov	x0, x19
	mov	x2, x22
	mov	x3, x21
	mov	w4, #0
	bl	_be_cmd_if_create
	mov	x21, x0
	cbnz	w0, LBB0_9
; %bb.5:
	bl	_rtnl_lock
	mov	x0, x19
	bl	_be_setup_queues
	mov	x21, x0
	bl	_rtnl_unlock
	cbnz	w21, LBB0_9
; %bb.6:
	add	x21, x19, #48
	mov	x0, x19
	mov	x1, x21
	mov	w2, #0
	bl	_be_cmd_get_fn_privileges
	mov	x0, x19
	bl	_be_is_mc
	cbz	x0, LBB0_8
; %bb.7:
Lloh18:
	adrp	x8, _MAX_PRIVILEGES@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MAX_PRIVILEGES@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	str	w8, [x21]
LBB0_8:
	mov	x0, x19
	bl	_be_mac_setup
	mov	x21, x0
	cbz	w0, LBB0_11
LBB0_9:
	mov	x0, x19
	bl	_be_clear
LBB0_10:
	mov	x0, x21
	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
LBB0_11:
	ldp	w2, w1, [x19, #40]
	mov	x0, x19
	bl	_be_cmd_get_fw_ver
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_13
; %bb.12:
	mov	x0, x19
	bl	_be_vid_config
LBB0_13:
	ldr	w0, [x19, #28]
	bl	_be_set_rx_mode
	add	x1, sp, #8
	mov	x2, sp
	mov	x0, x19
	bl	_be_cmd_get_flow_control
	ldr	x8, [sp]
	ldr	x2, [x19, #8]
	cmp	x8, x2
	b.ne	LBB0_15
; %bb.14:
	ldr	x8, [sp, #8]
	ldr	x1, [x19, #16]
	cmp	x8, x1
	b.ne	LBB0_16
	b	LBB0_17
LBB0_15:
	ldr	x1, [x19, #16]
LBB0_16:
	mov	x0, x19
	bl	_be_cmd_set_flow_control
LBB0_17:
	mov	x0, x19
	bl	_be_physfn
	cbz	x0, LBB0_22
; %bb.18:
Lloh21:
	adrp	x8, _num_vfs@GOTPAGE
Lloh22:
	ldr	x8, [x8, _num_vfs@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	cbz	x8, LBB0_22
; %bb.19:
	mov	x0, x19
	bl	_be_max_vfs
	cbz	x0, LBB0_21
; %bb.20:
	mov	x0, x19
	bl	_be_vf_setup
	b	LBB0_22
LBB0_21:
Lloh24:
	adrp	x1, l_.str@PAGE
Lloh25:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_warn
LBB0_22:
	mov	x0, x19
	bl	_be_cmd_get_phy_info
	cbnz	w0, LBB0_25
; %bb.23:
	mov	x0, x19
	bl	_be_pause_supported
	cbz	x0, LBB0_25
; %bb.24:
	mov	w8, #1
	str	w8, [x19, #24]
LBB0_25:
	mov	x0, x19
	bl	_be_schedule_worker
	mov	w21, #0
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_BE_IF_FLAGS_UNTAGGED,8,3       ; @BE_IF_FLAGS_UNTAGGED
	.comm	_BE_IF_FLAGS_BROADCAST,8,3      ; @BE_IF_FLAGS_BROADCAST
	.comm	_BE_IF_FLAGS_MULTICAST,8,3      ; @BE_IF_FLAGS_MULTICAST
	.comm	_BE_IF_FLAGS_PASS_L3L4_ERRORS,8,3 ; @BE_IF_FLAGS_PASS_L3L4_ERRORS
	.comm	_BE_FUNCTION_CAPS_RSS,4,2       ; @BE_FUNCTION_CAPS_RSS
	.comm	_BE_IF_FLAGS_RSS,8,3            ; @BE_IF_FLAGS_RSS
	.comm	_MAX_PRIVILEGES,4,2             ; @MAX_PRIVILEGES
	.comm	_num_vfs,8,3                    ; @num_vfs
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"device doesn't support SRIOV\n"

	.no_dead_strip	_be_setup
.subsections_via_symbols
