	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mvpp2_port_c2_tcam_rule_add
_mvpp2_port_c2_tcam_rule_add:           ## @mvpp2_port_c2_tcam_rule_add
	.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	%r12
	pushq	%rbx
	subq	$48, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	leaq	-72(%rbp), %rdi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	movl	12(%r15), %esi
	movq	%r14, %rdi
	callq	_mvpp2_cls_c2_port_flow_index
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	%eax, -72(%rbp)
	movq	16(%r15), %rcx
	movq	(%rcx), %r12
	movl	%eax, (%r15)
	movzwl	4(%r15), %eax
	movl	8(%r15), %ecx
	shll	$16, %ecx
	orl	%eax, %ecx
	movq	-64(%rbp), %rax
	movl	%ecx, 12(%rax)
	movzwl	6(%r15), %ecx
	movzwl	10(%r15), %edx
	shll	$16, %edx
	orl	%ecx, %edx
	movl	%edx, 8(%rax)
	movl	8(%r14), %edi
	callq	_BIT
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_MVPP22_CLS_C2_PORT_ID
	movq	-64(%rbp), %rcx
	movl	%eax, 16(%rcx)
	movl	%ebx, %edi
	callq	_MVPP22_CLS_C2_PORT_ID
	movl	%eax, %edi
	callq	_MVPP22_CLS_C2_TCAM_EN
	movq	-64(%rbp), %rcx
	orl	%eax, 16(%rcx)
	movq	_MVPP2_CLS_LU_TYPE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_MVPP22_CLS_C2_LU_TYPE
	movl	%eax, %edi
	callq	_MVPP22_CLS_C2_TCAM_EN
	movq	-64(%rbp), %rcx
	orl	%eax, 16(%rcx)
	movl	12(%r15), %edi
	callq	_MVPP22_CLS_C2_LU_TYPE
	movq	-64(%rbp), %rcx
	orl	%eax, 16(%rcx)
	movq	(%r12), %rax
	movq	_FLOW_ACTION_DROP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	movq	_MVPP22_C2_COL_RED_LOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_MVPP22_CLS_C2_ACT_COLOR
	movl	%eax, -56(%rbp)
	jmp	LBB0_12
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_4:
	movq	_MVPP22_C2_COL_NO_UPD_LOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_MVPP22_CLS_C2_ACT_COLOR
	movl	%eax, -56(%rbp)
	cmpq	$0, 16(%r12)
	je	LBB0_6
## %bb.5:
	movq	_MVPP22_CLS_C2_ATTR2_RSS_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-48(%rbp), %rcx
	orl	%eax, 8(%rcx)
LBB0_6:
	movq	_MVPP22_C2_UPD_LOCK@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_MVPP22_CLS_C2_ACT_RSS_EN
	movl	%eax, -56(%rbp)
	movq	_MVPP22_C2_FWD_SW_LOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_MVPP22_CLS_C2_ACT_FWD
	orl	%eax, -56(%rbp)
	movl	(%r15), %edi
	callq	_MVPP22_CLS_C2_ACT_QHIGH
	movl	%eax, %ebx
	movl	(%r15), %edi
	callq	_MVPP22_CLS_C2_ACT_QLOW
	orl	%ebx, %eax
	orl	%eax, -56(%rbp)
	movq	16(%r12), %rsi
	testq	%rsi, %rsi
	je	LBB0_10
## %bb.7:
	movq	%r14, %rdi
	callq	_mvpp22_rss_ctx
	testl	%eax, %eax
	js	LBB0_8
## %bb.9:
	movl	%eax, %ebx
	movl	%eax, %edi
	shrl	$3, %edi
	movq	_MVPP22_CLS_C2_ATTR0_QHIGH_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_11
LBB0_10:
	movl	(%r14), %ebx
	addl	8(%r12), %ebx
	movl	%ebx, %eax
	sarl	$3, %eax
	movq	_MVPP22_CLS_C2_ATTR0_QHIGH_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
LBB0_11:
	andl	%eax, %edi
	movq	_MVPP22_CLS_C2_ATTR0_QLOW_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	callq	_MVPP22_CLS_C2_ATTR0_QHIGH
	movl	%eax, %r15d
	movl	%ebx, %edi
	callq	_MVPP22_CLS_C2_ATTR0_QLOW
	orl	%r15d, %eax
	movq	-48(%rbp), %rcx
	movl	%eax, (%rcx)
LBB0_12:
	movl	$1, -40(%rbp)
	movl	4(%r14), %edi
	leaq	-72(%rbp), %rsi
	callq	_mvpp2_cls_c2_write
	xorl	%ebx, %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$48, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MVPP2_CLS_LU_TYPE_MASK,4,2     ## @MVPP2_CLS_LU_TYPE_MASK
	.comm	_FLOW_ACTION_DROP,8,3           ## @FLOW_ACTION_DROP
	.comm	_MVPP22_C2_COL_RED_LOCK,4,2     ## @MVPP22_C2_COL_RED_LOCK
	.comm	_MVPP22_C2_COL_NO_UPD_LOCK,4,2  ## @MVPP22_C2_COL_NO_UPD_LOCK
	.comm	_MVPP22_CLS_C2_ATTR2_RSS_EN,4,2 ## @MVPP22_CLS_C2_ATTR2_RSS_EN
	.comm	_MVPP22_C2_UPD_LOCK,4,2         ## @MVPP22_C2_UPD_LOCK
	.comm	_MVPP22_C2_FWD_SW_LOCK,4,2      ## @MVPP22_C2_FWD_SW_LOCK
	.comm	_MVPP22_CLS_C2_ATTR0_QHIGH_MASK,4,2 ## @MVPP22_CLS_C2_ATTR0_QHIGH_MASK
	.comm	_MVPP22_CLS_C2_ATTR0_QLOW_MASK,4,2 ## @MVPP22_CLS_C2_ATTR0_QLOW_MASK
	.no_dead_strip	_mvpp2_port_c2_tcam_rule_add
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mvpp2_port_c2_tcam_rule_add
_mvpp2_port_c2_tcam_rule_add:           ; @mvpp2_port_c2_tcam_rule_add
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x20, x1
	mov	x19, x0
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #40
	bl	_memset
	ldr	w1, [x20, #12]
	mov	x0, x19
	bl	_mvpp2_cls_c2_port_flow_index
	tbnz	w0, #31, LBB0_8
; %bb.1:
	str	w0, [sp, #8]
	ldr	x8, [x20, #16]
	ldr	x22, [x8]
	str	w0, [x20]
	ldrh	w8, [x20, #4]
	ldr	w9, [x20, #8]
	bfi	w8, w9, #16, #16
	ldr	x9, [sp, #16]
	str	w8, [x9, #12]
	ldrh	w8, [x20, #6]
	ldrh	w10, [x20, #10]
	bfi	w8, w10, #16, #16
	str	w8, [x9, #8]
	ldr	w0, [x19, #8]
	bl	_BIT
	mov	x21, x0
	bl	_MVPP22_CLS_C2_PORT_ID
	ldr	x8, [sp, #16]
	str	w0, [x8, #16]
	mov	x0, x21
	bl	_MVPP22_CLS_C2_PORT_ID
	bl	_MVPP22_CLS_C2_TCAM_EN
	ldr	x8, [sp, #16]
	ldr	w9, [x8, #16]
	orr	w9, w9, w0
	str	w9, [x8, #16]
Lloh0:
	adrp	x8, _MVPP2_CLS_LU_TYPE_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MVPP2_CLS_LU_TYPE_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_MVPP22_CLS_C2_LU_TYPE
	bl	_MVPP22_CLS_C2_TCAM_EN
	ldr	x8, [sp, #16]
	ldr	w9, [x8, #16]
	orr	w9, w9, w0
	str	w9, [x8, #16]
	ldr	w0, [x20, #12]
	bl	_MVPP22_CLS_C2_LU_TYPE
	ldr	x8, [sp, #16]
	ldr	w9, [x8, #16]
	orr	w9, w9, w0
	str	w9, [x8, #16]
	ldr	x8, [x22]
Lloh3:
	adrp	x9, _FLOW_ACTION_DROP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _FLOW_ACTION_DROP@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
Lloh6:
	adrp	x8, _MVPP22_C2_COL_RED_LOCK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MVPP22_C2_COL_RED_LOCK@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_MVPP22_CLS_C2_ACT_COLOR
	str	w0, [sp, #24]
	b	LBB0_11
LBB0_3:
Lloh9:
	adrp	x8, _MVPP22_C2_COL_NO_UPD_LOCK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MVPP22_C2_COL_NO_UPD_LOCK@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_MVPP22_CLS_C2_ACT_COLOR
	str	w0, [sp, #24]
	ldr	x8, [x22, #16]
	cbz	x8, LBB0_5
; %bb.4:
Lloh12:
	adrp	x8, _MVPP22_CLS_C2_ATTR2_RSS_EN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MVPP22_CLS_C2_ATTR2_RSS_EN@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	ldr	x9, [sp, #32]
	ldr	w10, [x9, #8]
	orr	w8, w10, w8
	str	w8, [x9, #8]
LBB0_5:
Lloh15:
	adrp	x21, _MVPP22_C2_UPD_LOCK@GOTPAGE
Lloh16:
	ldr	x21, [x21, _MVPP22_C2_UPD_LOCK@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_MVPP22_CLS_C2_ACT_RSS_EN
	str	w0, [sp, #24]
Lloh17:
	adrp	x8, _MVPP22_C2_FWD_SW_LOCK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MVPP22_C2_FWD_SW_LOCK@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	bl	_MVPP22_CLS_C2_ACT_FWD
	ldr	w8, [sp, #24]
	orr	w8, w8, w0
	str	w8, [sp, #24]
	ldr	w0, [x21]
	bl	_MVPP22_CLS_C2_ACT_QHIGH
	mov	x20, x0
	ldr	w0, [x21]
	bl	_MVPP22_CLS_C2_ACT_QLOW
	orr	w8, w0, w20
	ldr	w9, [sp, #24]
	orr	w8, w8, w9
	str	w8, [sp, #24]
	ldr	x1, [x22, #16]
	cbz	x1, LBB0_9
; %bb.6:
	mov	x0, x19
	bl	_mvpp22_rss_ctx
	tbnz	w0, #31, LBB0_8
; %bb.7:
	lsr	w8, w0, #3
Lloh20:
	adrp	x9, _MVPP22_CLS_C2_ATTR0_QHIGH_MASK@GOTPAGE
Lloh21:
	ldr	x9, [x9, _MVPP22_CLS_C2_ATTR0_QHIGH_MASK@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	b	LBB0_10
LBB0_8:
Lloh23:
	adrp	x8, _EINVAL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_9:
	ldr	w8, [x22, #8]
	ldr	w9, [x19]
	add	w0, w9, w8
	asr	w9, w0, #3
Lloh26:
	adrp	x8, _MVPP22_CLS_C2_ATTR0_QHIGH_MASK@GOTPAGE
Lloh27:
	ldr	x8, [x8, _MVPP22_CLS_C2_ATTR0_QHIGH_MASK@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
LBB0_10:
	and	w8, w9, w8
Lloh29:
	adrp	x9, _MVPP22_CLS_C2_ATTR0_QLOW_MASK@GOTPAGE
Lloh30:
	ldr	x9, [x9, _MVPP22_CLS_C2_ATTR0_QLOW_MASK@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	and	w20, w9, w0
	mov	x0, x8
	bl	_MVPP22_CLS_C2_ATTR0_QHIGH
	mov	x21, x0
	mov	x0, x20
	bl	_MVPP22_CLS_C2_ATTR0_QLOW
	orr	w8, w0, w21
	ldr	x9, [sp, #32]
	str	w8, [x9]
LBB0_11:
	mov	w8, #1
	str	w8, [sp, #40]
	ldr	w0, [x19, #4]
	add	x1, sp, #8
	bl	_mvpp2_cls_c2_write
	mov	w0, #0
LBB0_12:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MVPP2_CLS_LU_TYPE_MASK,4,2     ; @MVPP2_CLS_LU_TYPE_MASK
	.comm	_FLOW_ACTION_DROP,8,3           ; @FLOW_ACTION_DROP
	.comm	_MVPP22_C2_COL_RED_LOCK,4,2     ; @MVPP22_C2_COL_RED_LOCK
	.comm	_MVPP22_C2_COL_NO_UPD_LOCK,4,2  ; @MVPP22_C2_COL_NO_UPD_LOCK
	.comm	_MVPP22_CLS_C2_ATTR2_RSS_EN,4,2 ; @MVPP22_CLS_C2_ATTR2_RSS_EN
	.comm	_MVPP22_C2_UPD_LOCK,4,2         ; @MVPP22_C2_UPD_LOCK
	.comm	_MVPP22_C2_FWD_SW_LOCK,4,2      ; @MVPP22_C2_FWD_SW_LOCK
	.comm	_MVPP22_CLS_C2_ATTR0_QHIGH_MASK,4,2 ; @MVPP22_CLS_C2_ATTR0_QHIGH_MASK
	.comm	_MVPP22_CLS_C2_ATTR0_QLOW_MASK,4,2 ; @MVPP22_CLS_C2_ATTR0_QLOW_MASK
	.no_dead_strip	_mvpp2_port_c2_tcam_rule_add
.subsections_via_symbols
