	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcm_sf2_cfp_rule_insert
_bcm_sf2_cfp_rule_insert:               ## @bcm_sf2_cfp_rule_insert
	.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	%rdx, %rbx
	movl	%esi, %r12d
	movq	%rdi, %r15
	callq	_bcm_sf2_to_priv
	movq	%rax, %rsi
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %r14d
	movq	_RX_CLS_FLOW_WAKE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	jne	LBB0_1
## %bb.2:
	movq	(%r15), %rax
	movslq	%r12d, %rcx
	movq	(%rax,%rcx,8), %rax
	movq	_SF2_NUM_EGRESS_QUEUES@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	(%rax), %r14d
	imull	%ecx, %r14d
	jmp	LBB0_3
LBB0_1:
	movq	_SF2_NUM_EGRESS_QUEUES@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_3:
	xorl	%ebx, %ebx
	movl	%r14d, %eax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %r13d
	movq	_RX_CLS_FLOW_DISC@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	je	LBB0_11
## %bb.4:
	movq	%rsi, %r12
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_dsa_is_user_port
	movq	%r12, %rdi
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_dsa_is_cpu_port
	movq	%r12, %rdi
	testq	%rax, %rax
	je	LBB0_11
LBB0_6:
	cmpl	(%rdi), %r13d
	jae	LBB0_11
## %bb.7:
	movq	_SF2_NUM_EGRESS_QUEUES@GOTPCREL(%rip), %rcx
	movl	%r14d, %eax
	xorl	%edx, %edx
	divl	(%rcx)
	xorl	%ebx, %ebx
	cmpl	$7, %r13d
	adcl	$-1, %r13d
	movq	_FLOW_EXT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	andl	4(%r8), %eax
	addl	$-128, %eax
	cmpl	$3, %eax
	ja	LBB0_11
## %bb.8:
	movl	%edx, %ecx
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rax,4), %rax
	addq	%rdx, %rax
	jmpq	*%rax
LBB0_10:
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%r13d, %edx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bcm_sf2_cfp_ipv6_rule_set      ## TAILCALL
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%r13d, %edx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bcm_sf2_cfp_ipv4_rule_set      ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
LJTI0_0:
	.long	L0_0_set_10
	.long	L0_0_set_9
	.long	L0_0_set_10
	.long	L0_0_set_9
	.end_data_region
                                        ## -- End function
	.comm	_RX_CLS_FLOW_WAKE,4,2           ## @RX_CLS_FLOW_WAKE
	.comm	_SF2_NUM_EGRESS_QUEUES,4,2      ## @SF2_NUM_EGRESS_QUEUES
	.comm	_RX_CLS_FLOW_DISC,4,2           ## @RX_CLS_FLOW_DISC
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_FLOW_EXT,4,2                   ## @FLOW_EXT
	.no_dead_strip	_bcm_sf2_cfp_rule_insert
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcm_sf2_cfp_rule_insert
_bcm_sf2_cfp_rule_insert:               ; @bcm_sf2_cfp_rule_insert
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x22, x0
	bl	_bcm_sf2_to_priv
	mov	x21, x0
	ldr	w24, [x19]
Lloh0:
	adrp	x8, _RX_CLS_FLOW_WAKE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RX_CLS_FLOW_WAKE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w24, w8
	b.ne	LBB0_2
; %bb.1:
	ldr	x8, [x22]
	ldr	x8, [x8, w20, sxtw #3]
	ldr	w9, [x8]
Lloh3:
	adrp	x8, _SF2_NUM_EGRESS_QUEUES@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SF2_NUM_EGRESS_QUEUES@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mul	w24, w8, w9
	b	LBB0_3
LBB0_2:
Lloh6:
	adrp	x8, _SF2_NUM_EGRESS_QUEUES@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SF2_NUM_EGRESS_QUEUES@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
LBB0_3:
Lloh9:
	adrp	x9, _RX_CLS_FLOW_DISC@GOTPAGE
Lloh10:
	ldr	x9, [x9, _RX_CLS_FLOW_DISC@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w24, w9
	b.eq	LBB0_10
; %bb.4:
	udiv	w23, w24, w8
	mov	x0, x22
	mov	x1, x23
	bl	_dsa_is_user_port
	cbnz	x0, LBB0_6
; %bb.5:
	mov	x0, x22
	mov	x1, x23
	bl	_dsa_is_cpu_port
	cbz	x0, LBB0_10
LBB0_6:
	ldr	w8, [x21]
	cmp	w23, w8
	b.hs	LBB0_10
; %bb.7:
	cmp	w23, #6
	cset	w8, hi
	ldr	w9, [x19, #4]
Lloh12:
	adrp	x10, _FLOW_EXT@GOTPAGE
Lloh13:
	ldr	x10, [x10, _FLOW_EXT@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	bic	w9, w9, w10
	sub	w9, w9, #128
	cmp	w9, #3
	b.hi	LBB0_10
; %bb.8:
Lloh15:
	adrp	x10, _SF2_NUM_EGRESS_QUEUES@GOTPAGE
Lloh16:
	ldr	x10, [x10, _SF2_NUM_EGRESS_QUEUES@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	udiv	w11, w24, w10
	msub	w3, w11, w10, w24
	sub	w2, w23, w8
Lloh18:
	adrp	x8, lJTI0_0@PAGE
Lloh19:
	add	x8, x8, lJTI0_0@PAGEOFF
	adr	x10, LBB0_9
	ldrb	w11, [x8, x9]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_9:
	mov	x0, x21
	mov	x1, x20
	mov	x4, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_bcm_sf2_cfp_ipv6_rule_set
LBB0_10:
Lloh20:
	adrp	x8, _EINVAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_11:
	mov	x0, x21
	mov	x1, x20
	mov	x4, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_bcm_sf2_cfp_ipv4_rule_set
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_9-LBB0_9)>>2
	.byte	(LBB0_11-LBB0_9)>>2
	.byte	(LBB0_9-LBB0_9)>>2
	.byte	(LBB0_11-LBB0_9)>>2
                                        ; -- End function
	.comm	_RX_CLS_FLOW_WAKE,4,2           ; @RX_CLS_FLOW_WAKE
	.comm	_SF2_NUM_EGRESS_QUEUES,4,2      ; @SF2_NUM_EGRESS_QUEUES
	.comm	_RX_CLS_FLOW_DISC,4,2           ; @RX_CLS_FLOW_DISC
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_FLOW_EXT,4,2                   ; @FLOW_EXT
	.no_dead_strip	_bcm_sf2_cfp_rule_insert
.subsections_via_symbols
