	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qlcnic_check_eswitch_mode
_qlcnic_check_eswitch_mode:             ## @qlcnic_check_eswitch_mode
	.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, %rbx
	callq	_qlcnic_initialize_nic
	testl	%eax, %eax
	jne	LBB0_14
## %bb.1:
	movq	_QLCNIC_ADAPTER_INITIALIZED@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	xorl	%eax, %eax
	testl	%ecx, (%rbx)
	jne	LBB0_14
## %bb.2:
	movq	_QLCNIC_DRV_OP_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_QLC_SHARED_REG_RD32
	movq	%rax, %r14
	movq	8(%rbx), %rax
	movl	16(%rax), %esi
	movq	%r14, %rdi
	callq	_QLC_DEV_GET_DRV
	movq	_QLC_DEV_DRV_DEFAULT@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	jne	LBB0_4
## %bb.3:
	movq	_QLCNIC_MGMT_FUNC@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_5
LBB0_4:
	movq	8(%rbx), %rax
	movl	16(%rax), %esi
	movq	%r14, %rdi
	callq	_QLC_DEV_GET_DRV
LBB0_5:
	movq	_QLCNIC_ESWITCH_ENABLED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rbx)
	je	LBB0_9
## %bb.6:
	movq	_QLCNIC_MGMT_FUNC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.7:
	movq	8(%rbx), %rcx
	movq	%rax, 8(%rcx)
	movq	%rbx, %rdi
	callq	_qlcnic_init_pci_info
	testl	%eax, %eax
	jne	LBB0_14
## %bb.8:
	movq	%rbx, %rdi
	callq	_qlcnic_set_function_modes
	movq	8(%rbx), %rax
	movq	16(%rbx), %rdi
	movl	4(%rax), %edx
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_12
LBB0_9:
	movq	_QLCNIC_DEFAULT_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%rbx), %rcx
	movl	%eax, (%rcx)
	jmp	LBB0_13
LBB0_10:
	movq	_QLCNIC_PRIV_FUNC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.11:
	movq	8(%rbx), %rcx
	movq	%rax, 8(%rcx)
	movq	16(%rbx), %rdi
	movl	4(%rcx), %edx
	leaq	L_.str.1(%rip), %rsi
LBB0_12:
	callq	_dev_info
LBB0_13:
	movl	(%r15), %eax
	orl	%eax, (%rbx)
	xorl	%eax, %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_QLCNIC_ADAPTER_INITIALIZED,4,2 ## @QLCNIC_ADAPTER_INITIALIZED
	.comm	_QLCNIC_DRV_OP_MODE,4,2         ## @QLCNIC_DRV_OP_MODE
	.comm	_QLC_DEV_DRV_DEFAULT,8,3        ## @QLC_DEV_DRV_DEFAULT
	.comm	_QLCNIC_MGMT_FUNC,8,3           ## @QLCNIC_MGMT_FUNC
	.comm	_QLCNIC_ESWITCH_ENABLED,4,2     ## @QLCNIC_ESWITCH_ENABLED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"HAL Version: %d, Management function\n"

	.comm	_QLCNIC_PRIV_FUNC,8,3           ## @QLCNIC_PRIV_FUNC
L_.str.1:                               ## @.str.1
	.asciz	"HAL Version: %d, Privileged function\n"

	.comm	_QLCNIC_DEFAULT_MODE,4,2        ## @QLCNIC_DEFAULT_MODE
	.no_dead_strip	_qlcnic_check_eswitch_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qlcnic_check_eswitch_mode
_qlcnic_check_eswitch_mode:             ; @qlcnic_check_eswitch_mode
	.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	x19, x0
	bl	_qlcnic_initialize_nic
	cbnz	w0, LBB0_15
; %bb.1:
	ldr	w8, [x19]
Lloh0:
	adrp	x21, _QLCNIC_ADAPTER_INITIALIZED@GOTPAGE
Lloh1:
	ldr	x21, [x21, _QLCNIC_ADAPTER_INITIALIZED@GOTPAGEOFF]
	ldr	w9, [x21]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
	mov	w0, #0
	b	LBB0_15
LBB0_3:
Lloh2:
	adrp	x8, _QLCNIC_DRV_OP_MODE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _QLCNIC_DRV_OP_MODE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_QLC_SHARED_REG_RD32
	mov	x20, x0
	ldr	x8, [x19, #8]
	ldr	w1, [x8, #16]
	bl	_QLC_DEV_GET_DRV
Lloh5:
	adrp	x8, _QLC_DEV_DRV_DEFAULT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _QLC_DEV_DRV_DEFAULT@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
Lloh8:
	adrp	x22, _QLCNIC_MGMT_FUNC@GOTPAGE
Lloh9:
	ldr	x22, [x22, _QLCNIC_MGMT_FUNC@GOTPAGEOFF]
	cmp	x20, x8
	b.ne	LBB0_5
; %bb.4:
	ldr	x0, [x22]
	b	LBB0_6
LBB0_5:
	ldr	x8, [x19, #8]
	ldr	w1, [x8, #16]
	mov	x0, x20
	bl	_QLC_DEV_GET_DRV
LBB0_6:
	ldr	w8, [x19]
Lloh10:
	adrp	x9, _QLCNIC_ESWITCH_ENABLED@GOTPAGE
Lloh11:
	ldr	x9, [x9, _QLCNIC_ESWITCH_ENABLED@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.7:
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_11
; %bb.8:
	ldr	x8, [x19, #8]
	str	x0, [x8, #8]
	mov	x0, x19
	bl	_qlcnic_init_pci_info
	cbnz	w0, LBB0_15
; %bb.9:
	mov	x0, x19
	bl	_qlcnic_set_function_modes
	ldp	x8, x0, [x19, #8]
	ldr	w2, [x8, #4]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_13
LBB0_10:
Lloh15:
	adrp	x8, _QLCNIC_DEFAULT_MODE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _QLCNIC_DEFAULT_MODE@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	ldr	x9, [x19, #8]
	str	w8, [x9]
	b	LBB0_14
LBB0_11:
Lloh18:
	adrp	x8, _QLCNIC_PRIV_FUNC@GOTPAGE
Lloh19:
	ldr	x8, [x8, _QLCNIC_PRIV_FUNC@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_14
; %bb.12:
	ldp	x9, x8, [x19, #8]
	str	x0, [x9, #8]
	ldr	w2, [x9, #4]
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x8
LBB0_13:
	bl	_dev_info
LBB0_14:
	mov	w0, #0
	ldr	w8, [x21]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_15:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_QLCNIC_ADAPTER_INITIALIZED,4,2 ; @QLCNIC_ADAPTER_INITIALIZED
	.comm	_QLCNIC_DRV_OP_MODE,4,2         ; @QLCNIC_DRV_OP_MODE
	.comm	_QLC_DEV_DRV_DEFAULT,8,3        ; @QLC_DEV_DRV_DEFAULT
	.comm	_QLCNIC_MGMT_FUNC,8,3           ; @QLCNIC_MGMT_FUNC
	.comm	_QLCNIC_ESWITCH_ENABLED,4,2     ; @QLCNIC_ESWITCH_ENABLED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"HAL Version: %d, Management function\n"

	.comm	_QLCNIC_PRIV_FUNC,8,3           ; @QLCNIC_PRIV_FUNC
l_.str.1:                               ; @.str.1
	.asciz	"HAL Version: %d, Privileged function\n"

	.comm	_QLCNIC_DEFAULT_MODE,4,2        ; @QLCNIC_DEFAULT_MODE
	.no_dead_strip	_qlcnic_check_eswitch_mode
.subsections_via_symbols
