	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_eswitch_add_vlan_action   ## -- Begin function mlx5_eswitch_add_vlan_action
	.p2align	4, 0x90
_mlx5_eswitch_add_vlan_action:          ## @mlx5_eswitch_add_vlan_action
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r12
	movl	4(%rdi), %edi
	movl	$1, %esi
	callq	_mlx5_eswitch_vlan_actions_supported
	xorl	%ebx, %ebx
	testq	%rax, %rax
	jne	LBB0_19
## %bb.1:
	movl	(%r14), %ecx
	movq	_MLX5_FLOW_CONTEXT_ACTION_VLAN_PUSH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r15d, %r15d
	testl	%ecx, %edx
	setne	%r15b
	movq	_MLX5_FLOW_CONTEXT_ACTION_VLAN_POP@GOTPCREL(%rip), %rax
	movq	%r14, %rsi
	movl	(%rax), %r14d
	xorl	%r13d, %r13d
	testl	%ecx, %r14d
	setne	%r13b
	movq	_MLX5_FLOW_CONTEXT_ACTION_FWD_DEST@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	movl	%edx, -56(%rbp)                 ## 4-byte Spill
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_2
## %bb.3:
	cmpl	$0, 24(%rsi)
	sete	%al
	jmp	LBB0_4
LBB0_2:
	xorl	%eax, %eax
LBB0_4:
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movzbl	%al, %ebx
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	movl	%r13d, %edx
	movl	%ebx, %ecx
	callq	_esw_add_vlan_action_check
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_5
LBB0_18:
	movq	%r12, %rdi
	callq	_mutex_unlock
LBB0_19:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	-56(%rbp), %ebx                 ## 4-byte Reload
	orl	%ebx, %r14d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	$0, 4(%rdi)
	movl	%r15d, %esi
	movl	%r13d, %edx
	callq	_esw_vlan_action_get_vport
	movq	%rax, %r15
	movl	-60(%rbp), %r13d                ## 4-byte Reload
	testl	%r13d, %r14d
	setne	%al
	sete	%cl
	andb	-52(%rbp), %cl                  ## 1-byte Folded Reload
	cmpb	$1, %cl
	jne	LBB0_7
## %bb.6:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	16(%rax), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	_MLX5_VPORT_UPLINK@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	jne	LBB0_18
LBB0_15:
	movq	(%r15), %rax
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_16
LBB0_7:
	movl	%ebx, %r14d
	xorl	%ebx, %ebx
	testb	%al, %al
	je	LBB0_18
## %bb.8:
	movl	8(%r12), %eax
	testl	%eax, %eax
	je	LBB0_9
LBB0_11:
	incl	%eax
	movl	%eax, 8(%r12)
	testl	%r13d, %r14d
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_17
## %bb.12:
	movq	(%r15), %rax
	testq	%rax, %rax
	je	LBB0_13
LBB0_16:
	incq	%rax
	movq	%rax, (%r15)
LBB0_17:
	movl	$1, 4(%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_18
LBB0_9:
	movq	_SET_VLAN_STRIP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_esw_set_global_vlan_pop
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_18
## %bb.10:
	movl	8(%r12), %eax
	jmp	LBB0_11
LBB0_13:
	movl	12(%r15), %esi
	movq	8(%r14), %rax
	movl	(%rax), %edx
	movq	_SET_VLAN_INSERT@GOTPCREL(%rip), %rax
	movq	_SET_VLAN_STRIP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	orl	(%rax), %r8d
	movq	%r12, %rdi
	xorl	%ecx, %ecx
	callq	___mlx5_eswitch_set_vport_vlan
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_18
## %bb.14:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX5_FLOW_CONTEXT_ACTION_VLAN_PUSH,4,2 ## @MLX5_FLOW_CONTEXT_ACTION_VLAN_PUSH
	.comm	_MLX5_FLOW_CONTEXT_ACTION_VLAN_POP,4,2 ## @MLX5_FLOW_CONTEXT_ACTION_VLAN_POP
	.comm	_MLX5_FLOW_CONTEXT_ACTION_FWD_DEST,4,2 ## @MLX5_FLOW_CONTEXT_ACTION_FWD_DEST
	.comm	_MLX5_VPORT_UPLINK,8,3          ## @MLX5_VPORT_UPLINK
	.comm	_SET_VLAN_STRIP,4,2             ## @SET_VLAN_STRIP
	.comm	_SET_VLAN_INSERT,4,2            ## @SET_VLAN_INSERT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_eswitch_add_vlan_action   ; -- Begin function mlx5_eswitch_add_vlan_action
	.p2align	2
_mlx5_eswitch_add_vlan_action:          ; @mlx5_eswitch_add_vlan_action
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	w0, [x0, #4]
	mov	w1, #1
	bl	_mlx5_eswitch_vlan_actions_supported
	cbz	x0, LBB0_2
; %bb.1:
	mov	w24, #0
	b	LBB0_17
LBB0_2:
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _MLX5_FLOW_CONTEXT_ACTION_VLAN_PUSH@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MLX5_FLOW_CONTEXT_ACTION_VLAN_PUSH@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	ands	w25, w9, w8
	cset	w21, ne
Lloh3:
	adrp	x9, _MLX5_FLOW_CONTEXT_ACTION_VLAN_POP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MLX5_FLOW_CONTEXT_ACTION_VLAN_POP@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	ands	w26, w9, w8
	cset	w22, ne
Lloh6:
	adrp	x9, _MLX5_FLOW_CONTEXT_ACTION_FWD_DEST@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MLX5_FLOW_CONTEXT_ACTION_FWD_DEST@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	ldr	w8, [x20, #24]
	cmp	w8, #0
	cset	w23, eq
	b	LBB0_5
LBB0_4:
	mov	w23, #0
LBB0_5:
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	mov	x3, x23
	bl	_esw_add_vlan_action_check
	mov	x24, x0
	cbnz	w0, LBB0_16
; %bb.6:
	orr	w24, w25, w26
	str	wzr, [x20, #4]
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	bl	_esw_vlan_action_get_vport
	mov	x21, x0
	cmp	w24, #0
	cset	w8, ne
	cset	w9, eq
	and	w9, w9, w23
	cmp	w9, #1
	b.ne	LBB0_9
; %bb.7:
	ldr	x8, [x20, #16]
	ldr	x8, [x8]
	ldr	x8, [x8]
Lloh9:
	adrp	x9, _MLX5_VPORT_UPLINK@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MLX5_VPORT_UPLINK@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_15
LBB0_8:
	ldr	x8, [x21]
	b	LBB0_13
LBB0_9:
	cbz	w8, LBB0_15
; %bb.10:
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_18
LBB0_11:
	add	w8, w8, #1
	str	w8, [x19, #8]
	cbz	w25, LBB0_14
; %bb.12:
	ldr	x8, [x21]
	cbz	x8, LBB0_20
LBB0_13:
	add	x8, x8, #1
	str	x8, [x21]
LBB0_14:
	mov	w24, #0
	mov	w8, #1
	str	w8, [x20, #4]
	b	LBB0_16
LBB0_15:
	mov	w24, #0
LBB0_16:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_17:
	mov	x0, x24
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_18:
Lloh12:
	adrp	x8, _SET_VLAN_STRIP@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SET_VLAN_STRIP@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_esw_set_global_vlan_pop
	mov	x24, x0
	cbnz	w0, LBB0_16
; %bb.19:
	ldr	w8, [x19, #8]
	b	LBB0_11
LBB0_20:
	ldr	w1, [x21, #12]
	ldr	x8, [x20, #8]
Lloh15:
	adrp	x9, _SET_VLAN_INSERT@GOTPAGE
Lloh16:
	ldr	x9, [x9, _SET_VLAN_INSERT@GOTPAGEOFF]
	ldr	w2, [x8]
Lloh17:
	ldr	w8, [x9]
Lloh18:
	adrp	x9, _SET_VLAN_STRIP@GOTPAGE
Lloh19:
	ldr	x9, [x9, _SET_VLAN_STRIP@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w4, w9, w8
	mov	x0, x19
	mov	w3, #0
	bl	___mlx5_eswitch_set_vport_vlan
	mov	x24, x0
	cbnz	w0, LBB0_16
; %bb.21:
	ldr	x8, [x20, #8]
	ldr	w8, [x8]
	str	w8, [x21, #8]
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX5_FLOW_CONTEXT_ACTION_VLAN_PUSH,4,2 ; @MLX5_FLOW_CONTEXT_ACTION_VLAN_PUSH
	.comm	_MLX5_FLOW_CONTEXT_ACTION_VLAN_POP,4,2 ; @MLX5_FLOW_CONTEXT_ACTION_VLAN_POP
	.comm	_MLX5_FLOW_CONTEXT_ACTION_FWD_DEST,4,2 ; @MLX5_FLOW_CONTEXT_ACTION_FWD_DEST
	.comm	_MLX5_VPORT_UPLINK,8,3          ; @MLX5_VPORT_UPLINK
	.comm	_SET_VLAN_STRIP,4,2             ; @SET_VLAN_STRIP
	.comm	_SET_VLAN_INSERT,4,2            ; @SET_VLAN_INSERT
.subsections_via_symbols
