	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	32(%rdi), %r14
	callq	_be_func_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_33
## %bb.1:
	movq	%r15, %rdi
	callq	_be_setup_init
	movq	%r15, %rdi
	callq	_lancer_chip
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movq	%r15, %rdi
	callq	_be_cmd_req_native_mode
LBB0_3:
	movq	%r15, %rdi
	callq	_BEx_chip
	testl	%eax, %eax
	je	LBB0_4
LBB0_5:
	movq	%r15, %rdi
	callq	_be_get_config
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_32
## %bb.6:
	movq	%r15, %rdi
	callq	_BE2_chip
	testq	%rax, %rax
	jne	LBB0_9
## %bb.7:
	movq	%r15, %rdi
	callq	_be_physfn
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	%r15, %rdi
	callq	_be_alloc_sriov_res
LBB0_9:
	movq	%r15, %rdi
	callq	_be_get_resources
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_32
## %bb.10:
	movq	%r15, %rdi
	callq	_be_msix_enable
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_32
## %bb.11:
	movq	%r15, %rdi
	callq	_be_if_create
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_32
## %bb.12:
	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_32
## %bb.13:
	leaq	44(%r15), %rsi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_be_cmd_get_fn_privileges
	movq	%r15, %rdi
	callq	_be_mac_setup
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_14
LBB0_32:
	movq	%r15, %rdi
	callq	_be_clear
	jmp	LBB0_33
LBB0_4:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_be_cmd_get_func_config
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_5
LBB0_33:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	%r15, %rdi
	callq	_be_cmd_get_fw_ver
	movl	40(%r15), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_info
	movq	%r15, %rdi
	callq	_BE2_chip
	testq	%rax, %rax
	je	LBB0_17
## %bb.15:
	movl	40(%r15), %edi
	callq	_fw_major_num
	cmpl	$3, %eax
	jg	LBB0_17
## %bb.16:
	movl	40(%r15), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_17:
	movl	20(%r15), %edx
	movl	24(%r15), %esi
	movq	%r15, %rdi
	callq	_be_cmd_set_flow_control
	testl	%eax, %eax
	je	LBB0_19
## %bb.18:
	leaq	24(%r15), %rsi
	leaq	20(%r15), %rdx
	movq	%r15, %rdi
	callq	_be_cmd_get_flow_control
LBB0_19:
	movq	32(%r15), %rdi
	movl	20(%r15), %ecx
	movl	24(%r15), %edx
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_info
	movq	%r15, %rdi
	callq	_be_physfn
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:
	movq	_IFLA_VF_LINK_STATE_AUTO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_be_cmd_set_logical_link_config
LBB0_21:
	movq	%r15, %rdi
	callq	_BE3_chip
	testq	%rax, %rax
	je	LBB0_23
## %bb.22:
	movl	16(%r15), %ecx
	movq	_PORT_FWD_TYPE_PASSTHRU@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r15, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%r9d, %r9d
	callq	_be_cmd_set_hsw_config
LBB0_23:
	cmpq	$0, 8(%r15)
	je	LBB0_25
## %bb.24:
	movq	%r15, %rdi
	callq	_be_vf_setup
LBB0_25:
	movq	%r15, %rdi
	callq	_be_cmd_get_phy_info
	testl	%eax, %eax
	jne	LBB0_28
## %bb.26:
	movq	%r15, %rdi
	callq	_be_pause_supported
	testq	%rax, %rax
	je	LBB0_28
## %bb.27:
	movl	$1, 4(%r15)
LBB0_28:
	movq	%r15, %rdi
	callq	_be_physfn
	testq	%rax, %rax
	je	LBB0_31
## %bb.29:
	movq	%r15, %rdi
	callq	_lancer_chip
	testl	%eax, %eax
	jne	LBB0_31
## %bb.30:
	movq	%r15, %rdi
	callq	_be_cmd_set_features
LBB0_31:
	movq	%r15, %rdi
	callq	_be_schedule_worker
	movq	_BE_FLAGS_SETUP_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r15)
	xorl	%ebx, %ebx
	jmp	LBB0_33
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FW version is %s\n"

L_.str.1:                               ## @.str.1
	.asciz	"Firmware on card is old(%s), IRQs may not work"

L_.str.2:                               ## @.str.2
	.asciz	"Please upgrade firmware to version >= 4.0\n"

L_.str.3:                               ## @.str.3
	.asciz	"HW Flow control - TX:%d RX:%d\n"

	.comm	_IFLA_VF_LINK_STATE_AUTO,4,2    ## @IFLA_VF_LINK_STATE_AUTO
	.comm	_PORT_FWD_TYPE_PASSTHRU,4,2     ## @PORT_FWD_TYPE_PASSTHRU
	.comm	_BE_FLAGS_SETUP_DONE,4,2        ## @BE_FLAGS_SETUP_DONE
	.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, #32]
	bl	_be_func_init
	mov	x21, x0
	cbnz	w0, LBB0_15
; %bb.1:
	mov	x0, x19
	bl	_be_setup_init
	mov	x0, x19
	bl	_lancer_chip
	cbnz	w0, LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_be_cmd_req_native_mode
LBB0_3:
	mov	x0, x19
	bl	_BEx_chip
	cbz	w0, LBB0_14
LBB0_4:
	mov	x0, x19
	bl	_be_get_config
	mov	x21, x0
	cbnz	w0, LBB0_13
; %bb.5:
	mov	x0, x19
	bl	_BE2_chip
	cbnz	x0, LBB0_8
; %bb.6:
	mov	x0, x19
	bl	_be_physfn
	cbz	x0, LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_be_alloc_sriov_res
LBB0_8:
	mov	x0, x19
	bl	_be_get_resources
	mov	x21, x0
	cbnz	w0, LBB0_13
; %bb.9:
	mov	x0, x19
	bl	_be_msix_enable
	mov	x21, x0
	cbnz	w0, LBB0_13
; %bb.10:
	mov	x0, x19
	bl	_be_if_create
	mov	x21, x0
	cbnz	w0, LBB0_13
; %bb.11:
	bl	_rtnl_lock
	mov	x0, x19
	bl	_be_setup_queues
	mov	x21, x0
	bl	_rtnl_unlock
	cbnz	w21, LBB0_13
; %bb.12:
	add	x1, x19, #44
	mov	x0, x19
	mov	w2, #0
	bl	_be_cmd_get_fn_privileges
	mov	x0, x19
	bl	_be_mac_setup
	mov	x21, x0
	cbz	w0, LBB0_16
LBB0_13:
	mov	x0, x19
	bl	_be_clear
	b	LBB0_15
LBB0_14:
	mov	x0, x19
	mov	x1, #0
	bl	_be_cmd_get_func_config
	mov	x21, x0
	cbz	w0, LBB0_4
LBB0_15:
	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_16:
	mov	x0, x19
	bl	_be_cmd_get_fw_ver
	ldr	w2, [x19, #40]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_info
	mov	x0, x19
	bl	_BE2_chip
	cbz	x0, LBB0_19
; %bb.17:
	ldr	w0, [x19, #40]
	bl	_fw_major_num
	cmp	w0, #3
	b.gt	LBB0_19
; %bb.18:
	ldr	w8, [x19, #40]
	str	x8, [sp]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_err
LBB0_19:
	mov	x20, x19
	ldr	w1, [x20, #24]!
	mov	x21, x19
	ldr	w2, [x21, #20]!
	mov	x0, x19
	bl	_be_cmd_set_flow_control
	cbz	w0, LBB0_21
; %bb.20:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_be_cmd_get_flow_control
LBB0_21:
	ldr	x0, [x19, #32]
	ldp	w8, w2, [x19, #20]
	str	x8, [sp]
Lloh6:
	adrp	x1, l_.str.3@PAGE
Lloh7:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_info
	mov	x0, x19
	bl	_be_physfn
	cbz	x0, LBB0_23
; %bb.22:
Lloh8:
	adrp	x8, _IFLA_VF_LINK_STATE_AUTO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IFLA_VF_LINK_STATE_AUTO@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_be_cmd_set_logical_link_config
LBB0_23:
	mov	x0, x19
	bl	_BE3_chip
	cbz	x0, LBB0_25
; %bb.24:
	ldr	w3, [x19, #16]
Lloh11:
	adrp	x8, _PORT_FWD_TYPE_PASSTHRU@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PORT_FWD_TYPE_PASSTHRU@GOTPAGEOFF]
Lloh13:
	ldr	w4, [x8]
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	mov	w5, #0
	bl	_be_cmd_set_hsw_config
LBB0_25:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_27
; %bb.26:
	mov	x0, x19
	bl	_be_vf_setup
LBB0_27:
	mov	x0, x19
	bl	_be_cmd_get_phy_info
	cbnz	w0, LBB0_30
; %bb.28:
	mov	x0, x19
	bl	_be_pause_supported
	cbz	x0, LBB0_30
; %bb.29:
	mov	w8, #1
	str	w8, [x19, #4]
LBB0_30:
	mov	x0, x19
	bl	_be_physfn
	cbz	x0, LBB0_33
; %bb.31:
	mov	x0, x19
	bl	_lancer_chip
	cbnz	w0, LBB0_33
; %bb.32:
	mov	x0, x19
	bl	_be_cmd_set_features
LBB0_33:
	mov	x0, x19
	bl	_be_schedule_worker
	mov	w21, #0
Lloh14:
	adrp	x8, _BE_FLAGS_SETUP_DONE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _BE_FLAGS_SETUP_DONE@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	b	LBB0_15
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FW version is %s\n"

l_.str.1:                               ; @.str.1
	.asciz	"Firmware on card is old(%s), IRQs may not work"

l_.str.2:                               ; @.str.2
	.asciz	"Please upgrade firmware to version >= 4.0\n"

l_.str.3:                               ; @.str.3
	.asciz	"HW Flow control - TX:%d RX:%d\n"

	.comm	_IFLA_VF_LINK_STATE_AUTO,4,2    ; @IFLA_VF_LINK_STATE_AUTO
	.comm	_PORT_FWD_TYPE_PASSTHRU,4,2     ; @PORT_FWD_TYPE_PASSTHRU
	.comm	_BE_FLAGS_SETUP_DONE,4,2        ; @BE_FLAGS_SETUP_DONE
	.no_dead_strip	_be_setup
.subsections_via_symbols
