	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qlcnic_config_switch_port      ## -- Begin function qlcnic_config_switch_port
	.p2align	4, 0x90
_qlcnic_config_switch_port:             ## @qlcnic_config_switch_port
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	16(%rdi), %r15
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movl	$0, -48(%rbp)
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movq	_QLCNIC_MGMT_FUNC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_26
## %bb.1:
	movq	%rsi, %r12
	movq	%rdi, %r13
	movl	(%rsi), %r14d
	movl	%r14d, %esi
	callq	_qlcnic_is_valid_nic_func
	testl	%eax, %eax
	js	LBB0_26
## %bb.2:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	8(%r13), %rcx
	movl	%eax, %eax
	movq	_BIT_0@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	(%rcx,%rax,4), %edx
	movl	%r14d, %r15d
	shll	$8, %r15d
	orl	%r15d, %edx
	movl	%edx, -44(%rbp)
	leaq	-44(%rbp), %rsi
	leaq	-48(%rbp), %rdx
	movq	%r13, %rdi
	callq	___qlcnic_get_eswitch_port_config
	testq	%rax, %rax
	je	LBB0_3
LBB0_26:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_BIT_0@GOTPCREL(%rip), %r8
	movl	$-65281, %edi                   ## imm = 0xFFFF00FF
	andl	-44(%rbp), %edi
	orl	%r15d, %edi
	movq	_BIT_2@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_BIT_3@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movl	%r9d, %esi
	orl	%ecx, %esi
	movl	%esi, %edx
	notl	%edx
	andl	%edi, %edx
	movl	4(%r12), %edi
	cmpl	$130, %edi
	je	LBB0_21
## %bb.4:
	cmpl	$129, %edi
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_22
## %bb.5:
	cmpl	$128, %edi
	jne	LBB0_26
## %bb.6:
	movq	_BIT_4@GOTPCREL(%rip), %rdi
	movl	(%rdi), %r15d
	movq	_BIT_6@GOTPCREL(%rip), %rdi
	movl	(%rdi), %ebx
	movq	_BIT_7@GOTPCREL(%rip), %rdi
	movl	(%rdi), %eax
	orl	%r15d, %edx
	movl	%ebx, -60(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edi
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	orl	%eax, %edi
	orl	%edx, %edi
	movl	%edi, -44(%rbp)
	movl	(%r8), %eax
	movq	_BIT_1@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, %r10d
	movl	%eax, %r11d
	orl	%eax, %edx
	orl	-48(%rbp), %edx
	movl	%edx, -48(%rbp)
	movq	(%r13), %rbx
	movq	_QLCNIC_FW_CAPABILITY_TSO@GOTPCREL(%rip), %r8
	movl	(%r8), %eax
	testl	%eax, 8(%rbx)
	je	LBB0_8
## %bb.7:
	orl	%esi, %edx
	movl	%edx, -48(%rbp)
LBB0_8:
	cmpl	$0, 28(%r12)
	jne	LBB0_10
## %bb.9:
	notl	%r15d
	andl	%r15d, %edi
	movl	%edi, -44(%rbp)
LBB0_10:
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	cmpl	$0, 24(%r12)
	je	LBB0_11
## %bb.12:
	cmpl	$0, 20(%r12)
	je	LBB0_13
LBB0_14:
	cmpl	$0, 16(%r12)
	je	LBB0_15
LBB0_16:
	movl	8(%r12), %edi
	testl	%r11d, %edi
	jne	LBB0_18
## %bb.17:
	orl	%r10d, %esi
	notl	%esi
	andl	%esi, %edx
	movl	%edx, -48(%rbp)
LBB0_18:
	movl	%edi, %esi
	andl	%ecx, %esi
	testl	%r10d, %edi
	je	LBB0_20
## %bb.19:
	testl	%esi, %esi
	jne	LBB0_23
LBB0_20:
	andl	%r10d, %edi
	notl	%ecx
	xorl	%eax, %eax
	negl	%edi
	movl	$0, %edi
	sbbl	%edi, %edi
	orl	%ecx, %edi
	andl	%edi, %edx
	negl	%esi
	sbbl	%eax, %eax
	notl	%r9d
	orl	%r9d, %eax
	andl	%edx, %eax
	movl	%eax, -48(%rbp)
	jmp	LBB0_23
LBB0_21:
	movq	_BIT_5@GOTPCREL(%rip), %rax
	orl	%ecx, %edx
	orl	(%rax), %edx
	movl	12(%r12), %eax
	shll	$16, %eax
	orl	%edx, %eax
	movl	%eax, -44(%rbp)
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_23
LBB0_22:
	movq	_BIT_5@GOTPCREL(%rip), %rax
	orl	%r9d, %edx
	orl	(%rax), %edx
	movzwl	%dx, %eax
	movl	%eax, -44(%rbp)
LBB0_23:
	movq	_QLCNIC_CMD_CONFIGURE_ESWITCH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-72(%rbp), %r12
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_qlcnic_alloc_mbx_args
	movl	-44(%rbp), %eax
	movq	-72(%rbp), %rcx
	movl	%eax, 4(%rcx)
	movl	-48(%rbp), %eax
	movl	%eax, 8(%rcx)
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_qlcnic_issue_cmd
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_qlcnic_free_mbx_args
	movq	_QLCNIC_RCODE_SUCCESS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_24
## %bb.25:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_dev_info
	jmp	LBB0_26
LBB0_24:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_dev_err
	jmp	LBB0_26
LBB0_11:
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	notl	%eax
	andl	%eax, %edi
	movl	%edi, -44(%rbp)
	cmpl	$0, 20(%r12)
	jne	LBB0_14
LBB0_13:
	movl	-64(%rbp), %eax                 ## 4-byte Reload
	notl	%eax
	andl	%eax, %edi
	movl	%edi, -44(%rbp)
	cmpl	$0, 16(%r12)
	jne	LBB0_16
LBB0_15:
	movl	%r11d, %eax
	notl	%eax
	andl	%eax, %edx
	movl	%edx, -48(%rbp)
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_QLCNIC_MGMT_FUNC,8,3           ## @QLCNIC_MGMT_FUNC
	.comm	_BIT_0,4,2                      ## @BIT_0
	.comm	_BIT_2,4,2                      ## @BIT_2
	.comm	_BIT_3,4,2                      ## @BIT_3
	.comm	_BIT_4,4,2                      ## @BIT_4
	.comm	_BIT_6,4,2                      ## @BIT_6
	.comm	_BIT_7,4,2                      ## @BIT_7
	.comm	_BIT_1,4,2                      ## @BIT_1
	.comm	_QLCNIC_FW_CAPABILITY_TSO,4,2   ## @QLCNIC_FW_CAPABILITY_TSO
	.comm	_BIT_5,4,2                      ## @BIT_5
	.comm	_QLCNIC_CMD_CONFIGURE_ESWITCH,4,2 ## @QLCNIC_CMD_CONFIGURE_ESWITCH
	.comm	_QLCNIC_RCODE_SUCCESS,4,2       ## @QLCNIC_RCODE_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to configure eswitch for vNIC function %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Configured eSwitch for vNIC function %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qlcnic_config_switch_port      ; -- Begin function qlcnic_config_switch_port
	.p2align	2
_qlcnic_config_switch_port:             ; @qlcnic_config_switch_port
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	ldr	x19, [x0, #16]
Lloh0:
	adrp	x8, _EIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w23, w8
	str	wzr, [sp]
	ldr	x8, [x0]
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _QLCNIC_MGMT_FUNC@GOTPAGE
Lloh4:
	ldr	x9, [x9, _QLCNIC_MGMT_FUNC@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	mov	x22, x1
	mov	x21, x0
	ldr	w20, [x1]
	mov	x1, x20
	bl	_qlcnic_is_valid_nic_func
	tbnz	w0, #31, LBB0_3
; %bb.2:
	ldr	x8, [x21, #8]
	ldr	w8, [x8, w0, uxtw #2]
Lloh6:
	adrp	x24, _BIT_0@GOTPAGE
Lloh7:
	ldr	x24, [x24, _BIT_0@GOTPAGEOFF]
	ldr	w9, [x24]
	and	w8, w9, w8
	lsl	w25, w20, #8
	orr	w8, w8, w25
	str	w8, [sp, #4]
	add	x1, sp, #4
	mov	x2, sp
	mov	x0, x21
	bl	___qlcnic_get_eswitch_port_config
	cbz	x0, LBB0_4
LBB0_3:
	mov	x0, x23
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_4:
	ldr	w8, [sp, #4]
	and	w8, w8, #0xffff00ff
	orr	w11, w8, w25
Lloh8:
	adrp	x8, _BIT_2@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BIT_2@GOTPAGEOFF]
Lloh10:
	adrp	x10, _BIT_3@GOTPAGE
Lloh11:
	ldr	x10, [x10, _BIT_3@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x8]
Lloh13:
	ldr	w8, [x10]
	orr	w10, w8, w9
	bic	w11, w11, w10
	ldr	w12, [x22, #4]
	cmp	w12, #130
	b.eq	LBB0_18
; %bb.5:
	cmp	w12, #129
	b.eq	LBB0_19
; %bb.6:
	cmp	w12, #128
	b.ne	LBB0_3
; %bb.7:
Lloh14:
	adrp	x12, _BIT_4@GOTPAGE
Lloh15:
	ldr	x12, [x12, _BIT_4@GOTPAGEOFF]
Lloh16:
	ldr	w17, [x12]
Lloh17:
	adrp	x12, _BIT_6@GOTPAGE
Lloh18:
	ldr	x12, [x12, _BIT_6@GOTPAGEOFF]
Lloh19:
	ldr	w16, [x12]
Lloh20:
	adrp	x12, _BIT_7@GOTPAGE
Lloh21:
	ldr	x12, [x12, _BIT_7@GOTPAGEOFF]
Lloh22:
	ldr	w14, [x12]
	orr	w11, w17, w11
	orr	w11, w11, w16
	orr	w15, w11, w14
	str	w15, [sp, #4]
Lloh23:
	adrp	x11, _BIT_1@GOTPAGE
Lloh24:
	ldr	x11, [x11, _BIT_1@GOTPAGEOFF]
	ldr	w13, [x24]
Lloh25:
	ldr	w12, [x11]
	orr	w11, w12, w13
	ldr	w0, [sp]
	orr	w11, w11, w0
	str	w11, [sp]
	ldr	x0, [x21]
	ldr	w0, [x0, #8]
Lloh26:
	adrp	x1, _QLCNIC_FW_CAPABILITY_TSO@GOTPAGE
Lloh27:
	ldr	x1, [x1, _QLCNIC_FW_CAPABILITY_TSO@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x1]
	tst	w1, w0
	b.eq	LBB0_9
; %bb.8:
	orr	w11, w11, w10
	str	w11, [sp]
LBB0_9:
	ldr	w0, [x22, #28]
	cbz	w0, LBB0_24
; %bb.10:
	ldr	w17, [x22, #24]
	cbz	w17, LBB0_25
LBB0_11:
	ldr	w16, [x22, #20]
	cbz	w16, LBB0_26
LBB0_12:
	ldr	w14, [x22, #16]
	cbz	w14, LBB0_27
LBB0_13:
	ldr	w14, [x22, #8]
	tst	w14, w13
	b.ne	LBB0_15
; %bb.14:
	orr	w10, w10, w12
	bic	w11, w11, w10
	str	w11, [sp]
LBB0_15:
	and	w10, w14, w9
	ands	w12, w14, w12
	b.eq	LBB0_17
; %bb.16:
	cbnz	w10, LBB0_21
LBB0_17:
	cmp	w12, #0
	mov	w12, #-1
	csinv	w9, w12, w9, ne
	and	w9, w11, w9
	cmp	w10, #0
	csinv	w8, w12, w8, ne
	and	w8, w9, w8
	str	w8, [sp]
	b	LBB0_21
LBB0_18:
Lloh29:
	adrp	x8, _BIT_5@GOTPAGE
Lloh30:
	ldr	x8, [x8, _BIT_5@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	orr	w9, w11, w9
	orr	w8, w9, w8
	ldr	w9, [x22, #12]
	orr	w8, w8, w9, lsl #16
	b	LBB0_20
LBB0_19:
Lloh32:
	adrp	x9, _BIT_5@GOTPAGE
Lloh33:
	ldr	x9, [x9, _BIT_5@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
	orr	w8, w11, w8
	orr	w8, w8, w9
	and	w8, w8, #0xffff
LBB0_20:
	str	w8, [sp, #4]
LBB0_21:
Lloh35:
	adrp	x8, _QLCNIC_CMD_CONFIGURE_ESWITCH@GOTPAGE
Lloh36:
	ldr	x8, [x8, _QLCNIC_CMD_CONFIGURE_ESWITCH@GOTPAGEOFF]
Lloh37:
	ldr	w2, [x8]
	add	x0, sp, #8
	mov	x1, x21
	bl	_qlcnic_alloc_mbx_args
	ldp	w10, w8, [sp]
	ldr	x9, [sp, #8]
	stp	w8, w10, [x9, #4]
	add	x1, sp, #8
	mov	x0, x21
	bl	_qlcnic_issue_cmd
	mov	x23, x0
	add	x0, sp, #8
	bl	_qlcnic_free_mbx_args
Lloh38:
	adrp	x8, _QLCNIC_RCODE_SUCCESS@GOTPAGE
Lloh39:
	ldr	x8, [x8, _QLCNIC_RCODE_SUCCESS@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	cmp	w23, w8
	b.ne	LBB0_23
; %bb.22:
Lloh41:
	adrp	x1, l_.str.1@PAGE
Lloh42:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_dev_info
	b	LBB0_3
LBB0_23:
Lloh43:
	adrp	x1, l_.str@PAGE
Lloh44:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_dev_err
	b	LBB0_3
LBB0_24:
	bic	w15, w15, w17
	str	w15, [sp, #4]
	ldr	w17, [x22, #24]
	cbnz	w17, LBB0_11
LBB0_25:
	bic	w15, w15, w16
	str	w15, [sp, #4]
	ldr	w16, [x22, #20]
	cbnz	w16, LBB0_12
LBB0_26:
	bic	w14, w15, w14
	str	w14, [sp, #4]
	ldr	w14, [x22, #16]
	cbnz	w14, LBB0_13
LBB0_27:
	bic	w11, w11, w13
	str	w11, [sp]
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh12
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpAdd	Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_QLCNIC_MGMT_FUNC,8,3           ; @QLCNIC_MGMT_FUNC
	.comm	_BIT_0,4,2                      ; @BIT_0
	.comm	_BIT_2,4,2                      ; @BIT_2
	.comm	_BIT_3,4,2                      ; @BIT_3
	.comm	_BIT_4,4,2                      ; @BIT_4
	.comm	_BIT_6,4,2                      ; @BIT_6
	.comm	_BIT_7,4,2                      ; @BIT_7
	.comm	_BIT_1,4,2                      ; @BIT_1
	.comm	_QLCNIC_FW_CAPABILITY_TSO,4,2   ; @QLCNIC_FW_CAPABILITY_TSO
	.comm	_BIT_5,4,2                      ; @BIT_5
	.comm	_QLCNIC_CMD_CONFIGURE_ESWITCH,4,2 ; @QLCNIC_CMD_CONFIGURE_ESWITCH
	.comm	_QLCNIC_RCODE_SUCCESS,4,2       ; @QLCNIC_RCODE_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to configure eswitch for vNIC function %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Configured eSwitch for vNIC function %d\n"

.subsections_via_symbols
