	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcm_sf2_cfp_rule_set
_bcm_sf2_cfp_rule_set:                  ## @bcm_sf2_cfp_rule_set
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r13
	movl	%esi, %r15d
	movq	%rdi, %r12
	callq	_bcm_sf2_to_priv
	movq	%rax, %r14
	movq	_FLOW_EXT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13)
	je	LBB0_5
## %bb.1:
	cmpq	$0, 24(%r13)
	jne	LBB0_3
## %bb.2:
	movq	16(%r13), %rax
	cmpq	$0, 8(%rax)
	jne	LBB0_3
LBB0_5:
	movq	8(%r13), %rdi
	movq	_RX_CLS_LOC_ANY@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	cmpq	%rax, %rdi
	je	LBB0_7
## %bb.6:
	movq	_CFP_NUM_RULES@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rdi
	jl	LBB0_7
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_19:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	cmpq	%rax, %rdi
	jne	LBB0_8
LBB0_12:
	movq	%r14, %rdi
	movl	%r15d, %esi
	movq	%r13, %rdx
	callq	_bcm_sf2_cfp_rule_cmp
	testl	%eax, %eax
	je	LBB0_13
## %bb.14:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$12, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_15
## %bb.16:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	movl	%r15d, %esi
	movq	%r13, %rdx
	callq	_bcm_sf2_cfp_rule_insert
	testl	%eax, %eax
	je	LBB0_18
## %bb.17:
	movl	%eax, %ebx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_kfree
	jmp	LBB0_19
LBB0_8:
	movl	4(%r14), %esi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_13:
	movq	_EEXIST@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_10:
	movq	8(%r13), %rax
	cmpq	(%rbx), %rax
	je	LBB0_12
## %bb.11:
	movq	%r14, %rdi
	movq	%rax, %rbx
	callq	_bcm_sf2_cfp_rule_size
	cmpq	%rax, %rbx
	jg	LBB0_3
	jmp	LBB0_12
LBB0_15:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_18:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movl	%r15d, (%rbx)
	leaq	8(%rbx), %rdi
	movq	%r13, %rsi
	movl	$32, %edx
	callq	_memcpy
	addq	$4, %rbx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_list_add_tail
	xorl	%ebx, %ebx
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_FLOW_EXT,4,2                   ## @FLOW_EXT
	.comm	_RX_CLS_LOC_ANY,8,3             ## @RX_CLS_LOC_ANY
	.comm	_CFP_NUM_RULES,8,3              ## @CFP_NUM_RULES
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_EEXIST,4,2                     ## @EEXIST
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_bcm_sf2_cfp_rule_set
.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_set
_bcm_sf2_cfp_rule_set:                  ; @bcm_sf2_cfp_rule_set
	.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	x21, x1
	mov	x22, x0
	bl	_bcm_sf2_to_priv
	mov	x20, x0
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _FLOW_EXT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _FLOW_EXT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.1:
	ldr	x8, [x19, #24]
	cbnz	x8, LBB0_14
; %bb.2:
	ldr	x8, [x19, #16]
	ldr	x8, [x8, #8]
	cbnz	x8, LBB0_14
LBB0_3:
	ldr	x0, [x19, #8]
Lloh3:
	adrp	x23, _RX_CLS_LOC_ANY@GOTPAGE
Lloh4:
	ldr	x23, [x23, _RX_CLS_LOC_ANY@GOTPAGEOFF]
	ldr	x8, [x23]
Lloh5:
	adrp	x9, _CFP_NUM_RULES@GOTPAGE
Lloh6:
	ldr	x9, [x9, _CFP_NUM_RULES@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x0, x8
	ccmp	x0, x9, #8, ne
	b.ge	LBB0_14
; %bb.4:
	cmp	x0, x8
	b.ne	LBB0_9
LBB0_5:
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	bl	_bcm_sf2_cfp_rule_cmp
	cbz	w0, LBB0_11
; %bb.6:
Lloh8:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	w0, #12
	bl	_kzalloc
	cbz	x0, LBB0_17
; %bb.7:
	mov	x23, x0
	mov	x0, x22
	mov	x1, x21
	mov	x2, x19
	bl	_bcm_sf2_cfp_rule_insert
	cbz	w0, LBB0_18
; %bb.8:
	mov	x22, x0
	mov	x0, x23
	bl	_kfree
	b	LBB0_16
LBB0_9:
	ldr	w1, [x20, #4]
	bl	_test_bit
	cbz	x0, LBB0_12
; %bb.10:
Lloh11:
	adrp	x8, _EBUSY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_15
LBB0_11:
Lloh13:
	adrp	x8, _EEXIST@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EEXIST@GOTPAGEOFF]
	b	LBB0_15
LBB0_12:
	ldr	x24, [x19, #8]
	ldr	x8, [x23]
	cmp	x24, x8
	b.eq	LBB0_5
; %bb.13:
	mov	x0, x20
	bl	_bcm_sf2_cfp_rule_size
	cmp	x24, x0
	b.le	LBB0_5
LBB0_14:
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_15:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_16:
	mov	x0, x22
	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_17:
Lloh17:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_15
LBB0_18:
	mov	x22, x23
	str	w21, [x22], #4
	add	x0, x23, #8
	mov	x1, x19
	mov	w2, #32
	bl	_memcpy
	mov	x0, x22
	mov	x1, x20
	bl	_list_add_tail
	mov	w22, #0
	b	LBB0_16
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_FLOW_EXT,4,2                   ; @FLOW_EXT
	.comm	_RX_CLS_LOC_ANY,8,3             ; @RX_CLS_LOC_ANY
	.comm	_CFP_NUM_RULES,8,3              ; @CFP_NUM_RULES
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_EEXIST,4,2                     ; @EEXIST
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_bcm_sf2_cfp_rule_set
.subsections_via_symbols
