	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_set_vf_vlan               ## -- Begin function mlx4_set_vf_vlan
	.p2align	4, 0x90
_mlx4_set_vf_vlan:                      ## @mlx4_set_vf_vlan
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r15
	movl	%r8d, %r13d
	movl	%ecx, %r14d
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movl	%esi, %r12d
	movq	%rdi, %rbx
	callq	_mlx4_priv
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_mlx4_is_master
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	_MLX4_DEV_CAP_FLAG2_VLAN_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_2
## %bb.4:
	cmpl	$4095, %r14d                    ## imm = 0xFFF
	jg	LBB0_6
## %bb.5:
	cmpl	$8, %r13d
	jge	LBB0_6
## %bb.7:
	movq	_ETH_P_8021AD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_htons
	cmpq	%r15, %rax
	jne	LBB0_9
## %bb.8:
	movq	_MLX4_DEV_CAP_FLAG2_SVLAN_BY_QP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_2
LBB0_9:
	movq	_ETH_P_8021Q@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_htons
	cmpq	%r15, %rax
	je	LBB0_11
## %bb.10:
	movq	_ETH_P_8021AD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_htons
	cmpq	%r15, %rax
	jne	LBB0_6
LBB0_11:
	movq	_ETH_P_8021AD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_htons
	cmpq	%r15, %rax
	jne	LBB0_14
## %bb.12:
	testl	%r14d, %r14d
	je	LBB0_6
## %bb.13:
	movq	_MLX4_VGT@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	je	LBB0_6
LBB0_14:
	movq	%rbx, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_mlx4_get_slave_indx
	testl	%eax, %eax
	js	LBB0_6
## %bb.15:
	movl	%eax, %ecx
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	16(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	_ETH_P_8021AD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_htons
	cmpq	%r15, %rax
	jne	LBB0_19
## %bb.16:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	shlq	$4, %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	cmpq	$0, 8(%rcx,%rax)
	je	LBB0_19
## %bb.17:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	cmpl	$0, (%rcx,%rax)
	je	LBB0_18
LBB0_19:
	movq	%rbx, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%r12d, %edx
	callq	_mlx4_slaves_closest_port
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %r8
	movq	8(%rcx), %rcx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	(%rcx,%rdi,8), %rcx
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movslq	%eax, %rsi
	movq	%rsi, %r12
	shlq	$5, %r12
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	leaq	(%rcx,%r12), %rdx
	movq	(%r8,%rdi,8), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movq	%rsi, -88(%rbp)                 ## 8-byte Spill
                                        ## kill: def $esi killed $esi killed $rsi
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movl	%r14d, %ecx
	movl	%r13d, %r8d
	callq	_mlx4_valid_vf_state_change
	testl	%eax, %eax
	je	LBB0_20
## %bb.21:
	movl	%r13d, %eax
	orl	%r14d, %eax
	jne	LBB0_23
## %bb.22:
	movq	_MLX4_VGT@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_23:
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movl	%r14d, (%rdx)
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movl	%r13d, 4(%rax,%r12)
	movq	%rax, %r13
	movq	%r15, 24(%rax,%r12)
	movq	%rbx, %rdi
	movl	-56(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %esi
	callq	_mlx4_is_vf_vst_and_prio_qos
	testq	%rax, %rax
	je	LBB0_26
## %bb.24:
	cmpq	$0, 16(%r13,%r12)
	je	LBB0_26
## %bb.25:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 8(%r13,%r12)
LBB0_26:
	movq	_ETH_P_8021AD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_htons
	cmpq	%r15, %rax
	jne	LBB0_28
## %bb.27:
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	cmpq	%r15, (%rcx,%rax,8)
	jne	LBB0_29
LBB0_28:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%r14d, %edx
	callq	_mlx4_master_immediate_activate_vlan_qos
	testq	%rax, %rax
	je	LBB0_30
LBB0_29:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	%r14d, %ecx
	callq	_mlx4_info
LBB0_30:
	xorl	%eax, %eax
	jmp	LBB0_31
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_20:
	movq	_EPERM@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_18:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	callq	_mlx4_err
LBB0_2:
	movq	_EPROTONOSUPPORT@GOTPCREL(%rip), %rcx
LBB0_3:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_31:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX4_DEV_CAP_FLAG2_VLAN_CONTROL,4,2 ## @MLX4_DEV_CAP_FLAG2_VLAN_CONTROL
	.comm	_EPROTONOSUPPORT,4,2            ## @EPROTONOSUPPORT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ETH_P_8021AD,4,2               ## @ETH_P_8021AD
	.comm	_MLX4_DEV_CAP_FLAG2_SVLAN_BY_QP,4,2 ## @MLX4_DEV_CAP_FLAG2_SVLAN_BY_QP
	.comm	_ETH_P_8021Q,4,2                ## @ETH_P_8021Q
	.comm	_MLX4_VGT,4,2                   ## @MLX4_VGT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vf %d does not support VST QinQ mode\n"

	.comm	_EPERM,4,2                      ## @EPERM
L_.str.1:                               ## @.str.1
	.asciz	"updating vf %d port %d config will take effect on next VF restart\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_set_vf_vlan               ; -- Begin function mlx4_set_vf_vlan
	.p2align	2
_mlx4_set_vf_vlan:                      ; @mlx4_set_vf_vlan
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x5
	mov	x23, x4
	mov	x24, x3
	mov	x19, x2
	mov	x25, x1
	mov	x20, x0
	bl	_mlx4_priv
	mov	x22, x0
	mov	x0, x20
	bl	_mlx4_is_master
	cbz	w0, LBB0_26
; %bb.1:
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _MLX4_DEV_CAP_FLAG2_VLAN_CONTROL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MLX4_DEV_CAP_FLAG2_VLAN_CONTROL@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_26
; %bb.2:
	cmp	w24, #4095
	b.gt	LBB0_23
; %bb.3:
	cmp	w23, #8
	b.ge	LBB0_23
; %bb.4:
Lloh3:
	adrp	x27, _ETH_P_8021AD@GOTPAGE
Lloh4:
	ldr	x27, [x27, _ETH_P_8021AD@GOTPAGEOFF]
	ldr	w0, [x27]
	bl	_htons
	cmp	x0, x21
	b.ne	LBB0_6
; %bb.5:
	ldr	w8, [x20]
Lloh5:
	adrp	x9, _MLX4_DEV_CAP_FLAG2_SVLAN_BY_QP@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MLX4_DEV_CAP_FLAG2_SVLAN_BY_QP@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_26
LBB0_6:
Lloh8:
	adrp	x8, _ETH_P_8021Q@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ETH_P_8021Q@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_htons
	cmp	x0, x21
	b.eq	LBB0_8
; %bb.7:
	ldr	w0, [x27]
	bl	_htons
	cmp	x0, x21
	b.ne	LBB0_23
LBB0_8:
	ldr	w0, [x27]
	bl	_htons
	cmp	x0, x21
	b.ne	LBB0_11
; %bb.9:
	cbz	w24, LBB0_23
; %bb.10:
Lloh11:
	adrp	x8, _MLX4_VGT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MLX4_VGT@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmp	w8, w24
	b.eq	LBB0_23
LBB0_11:
	mov	x0, x20
	mov	x1, x19
	bl	_mlx4_get_slave_indx
	tbnz	w0, #31, LBB0_23
; %bb.12:
	mov	x26, x0
	ldr	x28, [x22, #16]
	mov	x8, x27
	mov	w27, w0
	ldr	w0, [x8]
	bl	_htons
	cmp	x0, x21
	b.ne	LBB0_15
; %bb.13:
	add	x8, x28, x27, lsl #4
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_15
; %bb.14:
	lsl	x8, x27, #4
	ldr	w8, [x28, x8]
	cbz	w8, LBB0_25
LBB0_15:
	mov	x0, x20
	mov	x1, x26
	mov	x2, x25
	bl	_mlx4_slaves_closest_port
	mov	x1, x0
	lsl	x8, x27, #3
	ldp	x10, x9, [x22]
	ldr	x28, [x9, x8]
	sxtw	x25, w1
	add	x27, x28, x25, lsl #5
	ldr	x8, [x10, x8]
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	mov	x0, x20
                                        ; kill: def $w1 killed $w1 killed $x1
	mov	x2, x27
	mov	x3, x24
	mov	x4, x23
	bl	_mlx4_valid_vf_state_change
	cbz	w0, LBB0_24
; %bb.16:
	orr	w8, w23, w24
Lloh14:
	adrp	x9, _MLX4_VGT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _MLX4_VGT@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	cmp	w8, #0
	csel	w8, w9, w24, eq
	stp	w8, w23, [x27]
	str	x21, [x27, #24]
	mov	x0, x20
	mov	x1, x25
	mov	x2, x27
	bl	_mlx4_is_vf_vst_and_prio_qos
	cbz	x0, LBB0_19
; %bb.17:
	add	x8, x28, x25, lsl #5
	ldr	x9, [x8, #16]
	cbz	x9, LBB0_19
; %bb.18:
	str	w26, [x8, #8]
LBB0_19:
Lloh17:
	adrp	x8, _ETH_P_8021AD@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ETH_P_8021AD@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	bl	_htons
	cmp	x0, x21
	b.ne	LBB0_21
; %bb.20:
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	ldr	x8, [x8, x25, lsl #3]
	cmp	x8, x21
	b.ne	LBB0_22
LBB0_21:
	mov	x0, x22
	mov	x1, x26
	mov	x2, x25
	bl	_mlx4_master_immediate_activate_vlan_qos
	cbz	x0, LBB0_28
LBB0_22:
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	mov	x3, x25
	bl	_mlx4_info
	mov	w0, #0
	b	LBB0_28
LBB0_23:
Lloh22:
	adrp	x8, _EINVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_27
LBB0_24:
Lloh24:
	adrp	x8, _EPERM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
	b	LBB0_27
LBB0_25:
Lloh26:
	adrp	x1, l_.str@PAGE
Lloh27:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	bl	_mlx4_err
LBB0_26:
Lloh28:
	adrp	x8, _EPROTONOSUPPORT@GOTPAGE
Lloh29:
	ldr	x8, [x8, _EPROTONOSUPPORT@GOTPAGEOFF]
LBB0_27:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_28:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX4_DEV_CAP_FLAG2_VLAN_CONTROL,4,2 ; @MLX4_DEV_CAP_FLAG2_VLAN_CONTROL
	.comm	_EPROTONOSUPPORT,4,2            ; @EPROTONOSUPPORT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ETH_P_8021AD,4,2               ; @ETH_P_8021AD
	.comm	_MLX4_DEV_CAP_FLAG2_SVLAN_BY_QP,4,2 ; @MLX4_DEV_CAP_FLAG2_SVLAN_BY_QP
	.comm	_ETH_P_8021Q,4,2                ; @ETH_P_8021Q
	.comm	_MLX4_VGT,4,2                   ; @MLX4_VGT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vf %d does not support VST QinQ mode\n"

	.comm	_EPERM,4,2                      ; @EPERM
l_.str.1:                               ; @.str.1
	.asciz	"updating vf %d port %d config will take effect on next VF restart\n"

.subsections_via_symbols
