	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcm_sysport_rule_set
_bcm_sysport_rule_set:                  ## @bcm_sysport_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
	movl	(%rsi), %eax
	movq	_RXCHK_BRCM_TAG_CID_MASK@GOTPCREL(%rip), %r12
	cmpl	(%r12), %eax
	jle	LBB0_3
## %bb.1:
	movq	_E2BIG@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_3:
	movq	%rsi, %rbx
	movq	8(%rsi), %rax
	movq	_RX_CLS_FLOW_WAKE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.5:
	movq	%rdi, %r14
	movl	8(%rdi), %edi
	movq	_RXCHK_BRCM_TAG_MAX@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	callq	_bitmap_weight
	movl	(%r13), %esi
	cmpl	%esi, %eax
	je	LBB0_6
## %bb.7:
	movl	8(%r14), %edi
	callq	_find_first_zero_bit
	cmpl	(%r13), %eax
	jbe	LBB0_8
LBB0_6:
	movq	_ENOSPC@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_4:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_RXCHK_BRCM_TAG
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_rxchk_readl
	movl	(%r12), %edx
	movq	_RXCHK_BRCM_TAG_CID_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edx
	notl	%edx
	andl	%eax, %edx
	movl	(%rbx), %r12d
	shll	%cl, %r12d
	orl	%edx, %r12d
	movl	%r15d, %edi
	callq	_RXCHK_BRCM_TAG
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	_rxchk_writel
	movl	%r15d, %edi
	callq	_RXCHK_BRCM_TAG_MASK
	movq	%r14, %rdi
	movl	$-16711681, %esi                ## imm = 0xFF00FFFF
	movl	%eax, %edx
	callq	_rxchk_writel
	movl	(%rbx), %eax
	movq	(%r14), %rcx
	movl	%r15d, %edx
	movl	%eax, (%rcx,%rdx,4)
	movl	8(%r14), %esi
	movl	%r15d, %edi
	callq	_set_bit
	xorl	%eax, %eax
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_RXCHK_BRCM_TAG_CID_MASK,4,2    ## @RXCHK_BRCM_TAG_CID_MASK
	.comm	_E2BIG,4,2                      ## @E2BIG
	.comm	_RX_CLS_FLOW_WAKE,8,3           ## @RX_CLS_FLOW_WAKE
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_RXCHK_BRCM_TAG_MAX,4,2         ## @RXCHK_BRCM_TAG_MAX
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.comm	_RXCHK_BRCM_TAG_CID_SHIFT,4,2   ## @RXCHK_BRCM_TAG_CID_SHIFT
	.no_dead_strip	_bcm_sysport_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_sysport_rule_set
_bcm_sysport_rule_set:                  ; @bcm_sysport_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
	ldr	w8, [x1]
Lloh0:
	adrp	x22, _RXCHK_BRCM_TAG_CID_MASK@GOTPAGE
Lloh1:
	ldr	x22, [x22, _RXCHK_BRCM_TAG_CID_MASK@GOTPAGEOFF]
	ldr	w9, [x22]
	cmp	w8, w9
	b.le	LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _E2BIG@GOTPAGE
Lloh3:
	ldr	x8, [x8, _E2BIG@GOTPAGEOFF]
	b	LBB0_7
LBB0_2:
	mov	x20, x1
	ldr	x8, [x1, #8]
Lloh4:
	adrp	x9, _RX_CLS_FLOW_WAKE@GOTPAGE
Lloh5:
	ldr	x9, [x9, _RX_CLS_FLOW_WAKE@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.3:
	mov	x19, x0
	ldr	w0, [x0, #8]
Lloh7:
	adrp	x23, _RXCHK_BRCM_TAG_MAX@GOTPAGE
Lloh8:
	ldr	x23, [x23, _RXCHK_BRCM_TAG_MAX@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_bitmap_weight
	ldr	w1, [x23]
	cmp	w0, w1
	b.eq	LBB0_5
; %bb.4:
	ldr	w0, [x19, #8]
	bl	_find_first_zero_bit
	ldr	w8, [x23]
	cmp	w0, w8
	b.ls	LBB0_9
LBB0_5:
Lloh9:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh11:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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_9:
	mov	x21, x0
	bl	_RXCHK_BRCM_TAG
	mov	x1, x0
	mov	x0, x19
	bl	_rxchk_readl
	ldr	w8, [x22]
Lloh13:
	adrp	x9, _RXCHK_BRCM_TAG_CID_SHIFT@GOTPAGE
Lloh14:
	ldr	x9, [x9, _RXCHK_BRCM_TAG_CID_SHIFT@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	lsl	w8, w8, w9
	bic	w8, w0, w8
	ldr	w10, [x20]
	lsl	w9, w10, w9
	orr	w22, w8, w9
	mov	x0, x21
	bl	_RXCHK_BRCM_TAG
	mov	x2, x0
	mov	x0, x19
	mov	x1, x22
	bl	_rxchk_writel
	mov	x0, x21
	bl	_RXCHK_BRCM_TAG_MASK
	mov	x2, x0
	mov	x0, x19
	mov	w1, #-16711681
	bl	_rxchk_writel
	ldr	w8, [x20]
	ldr	x9, [x19]
	str	w8, [x9, w21, uxtw #2]
	ldr	w1, [x19, #8]
	mov	x0, x21
	bl	_set_bit
	mov	w0, #0
	b	LBB0_8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_RXCHK_BRCM_TAG_CID_MASK,4,2    ; @RXCHK_BRCM_TAG_CID_MASK
	.comm	_E2BIG,4,2                      ; @E2BIG
	.comm	_RX_CLS_FLOW_WAKE,8,3           ; @RX_CLS_FLOW_WAKE
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_RXCHK_BRCM_TAG_MAX,4,2         ; @RXCHK_BRCM_TAG_MAX
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.comm	_RXCHK_BRCM_TAG_CID_SHIFT,4,2   ; @RXCHK_BRCM_TAG_CID_SHIFT
	.no_dead_strip	_bcm_sysport_rule_set
.subsections_via_symbols
