	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pf_remove_if_empty_ruleset     ## -- Begin function pf_remove_if_empty_ruleset
	.p2align	4, 0x90
_pf_remove_if_empty_ruleset:            ## @pf_remove_if_empty_ruleset
	.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
	testq	%rdi, %rdi
	je	LBB0_17
## %bb.1:
	movq	%rdi, %rbx
	cmpq	_pf_main_ruleset@GOTPCREL(%rip), %rdi
	je	LBB0_17
## %bb.2:
	movq	_PF_RULESET_MAX@GOTPCREL(%rip), %r15
	movq	_V_pf_anchors@GOTPCREL(%rip), %r14
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_11 Depth 2
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_17
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	addq	$16, %rdi
	callq	_RB_EMPTY
	testl	%eax, %eax
	je	LBB0_17
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%rbx), %rdx
	cmpq	$0, (%rdx)
	jg	LBB0_17
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$0, (%rbx)
	jg	LBB0_17
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$0, 24(%rbx)
	jne	LBB0_17
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$0, (%r15)
	jle	LBB0_15
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	16(%rbx), %rax
	xorl	%r12d, %r12d
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_11:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	16(%rax,%r12), %edi
	callq	_TAILQ_EMPTY
	testl	%eax, %eax
	je	LBB0_17
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=2
	movq	16(%rbx), %rax
	movl	8(%rax,%r12), %edi
	callq	_TAILQ_EMPTY
	testl	%eax, %eax
	je	LBB0_17
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=2
	movq	16(%rbx), %rax
	cmpq	$0, (%rax,%r12)
	jne	LBB0_17
## %bb.10:                              ##   in Loop: Header=BB0_11 Depth=2
	incq	%r13
	movslq	(%r15), %rcx
	addq	$24, %r12
	cmpq	%rcx, %r13
	jl	LBB0_11
## %bb.14:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%rbx), %rdx
LBB0_15:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	_pf_anchor_global@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_RB_REMOVE
	movq	8(%rbx), %rdx
	movq	8(%rdx), %r12
	testq	%r12, %r12
	je	LBB0_18
## %bb.16:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	_pf_anchor_node@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	32(%r12), %rsi
	callq	_RB_REMOVE
	movq	8(%rbx), %rdi
	callq	_rs_free
	movq	%r12, %rbx
	cmpq	_pf_main_ruleset@GOTPCREL(%rip), %r12
	jne	LBB0_3
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	movq	%rdx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_rs_free                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_pf_main_ruleset,32,3           ## @pf_main_ruleset
	.comm	_PF_RULESET_MAX,4,2             ## @PF_RULESET_MAX
	.comm	_pf_anchor_global,4,2           ## @pf_anchor_global
	.comm	_V_pf_anchors,4,2               ## @V_pf_anchors
	.comm	_pf_anchor_node,4,2             ## @pf_anchor_node
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pf_remove_if_empty_ruleset     ; -- Begin function pf_remove_if_empty_ruleset
	.p2align	2
_pf_remove_if_empty_ruleset:            ; @pf_remove_if_empty_ruleset
	.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
	cbz	x0, LBB0_17
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x21, _pf_main_ruleset@GOTPAGE
Lloh1:
	ldr	x21, [x21, _pf_main_ruleset@GOTPAGEOFF]
	cmp	x0, x21
	b.eq	LBB0_17
; %bb.2:
Lloh2:
	adrp	x22, _PF_RULESET_MAX@GOTPAGE
Lloh3:
	ldr	x22, [x22, _PF_RULESET_MAX@GOTPAGEOFF]
Lloh4:
	adrp	x23, _pf_anchor_global@GOTPAGE
Lloh5:
	ldr	x23, [x23, _pf_anchor_global@GOTPAGEOFF]
Lloh6:
	adrp	x20, _V_pf_anchors@GOTPAGE
Lloh7:
	ldr	x20, [x20, _V_pf_anchors@GOTPAGEOFF]
Lloh8:
	adrp	x24, _pf_anchor_node@GOTPAGE
Lloh9:
	ldr	x24, [x24, _pf_anchor_node@GOTPAGEOFF]
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_17
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x0, x8, #16
	bl	_RB_EMPTY
	cbz	w0, LBB0_17
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x2, [x19, #8]
	ldr	x8, [x2]
	cmp	x8, #0
	b.gt	LBB0_17
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19]
	cmp	x8, #0
	b.gt	LBB0_17
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #24]
	cbnz	x8, LBB0_17
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x25, #0
	mov	x26, #0
	ldr	x8, [x19, #16]
LBB0_10:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x8, x8, x25
	ldr	w0, [x8, #16]
	bl	_TAILQ_EMPTY
	cbz	w0, LBB0_17
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	x8, [x19, #16]
	add	x8, x8, x25
	ldr	w0, [x8, #8]
	bl	_TAILQ_EMPTY
	cbz	w0, LBB0_17
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	x8, [x19, #16]
	ldr	x9, [x8, x25]
	cbnz	x9, LBB0_17
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=2
	add	x26, x26, #1
	ldrsw	x9, [x22]
	add	x25, x25, #24
	cmp	x26, x9
	b.lt	LBB0_10
; %bb.14:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	x2, [x19, #8]
LBB0_15:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x23]
	mov	x1, x20
	bl	_RB_REMOVE
	ldr	x2, [x19, #8]
	ldr	x25, [x2, #8]
	cbz	x25, LBB0_18
; %bb.16:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x24]
	add	x1, x25, #32
	bl	_RB_REMOVE
	ldr	x0, [x19, #8]
	bl	_rs_free
	mov	x19, x25
	cmp	x25, x21
	b.ne	LBB0_3
LBB0_17:
	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:
	mov	x0, x2
	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
	b	_rs_free
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_pf_main_ruleset,32,3           ; @pf_main_ruleset
	.comm	_PF_RULESET_MAX,4,2             ; @PF_RULESET_MAX
	.comm	_pf_anchor_global,4,2           ; @pf_anchor_global
	.comm	_V_pf_anchors,4,2               ; @V_pf_anchors
	.comm	_pf_anchor_node,4,2             ; @pf_anchor_node
.subsections_via_symbols
