	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function commit_rules
_commit_rules:                          ## @commit_rules
	.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	%rsi, %r13
	testl	%edx, %edx
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	jle	LBB0_20
## %bb.1:
	xorl	%ebx, %ebx
	movl	%edx, -56(%rbp)                 ## 4-byte Spill
	movl	%edx, %r12d
	xorl	%r14d, %r14d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	addq	$32, %rbx
	decl	%r12d
	je	LBB0_12
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%r13,%rbx)
	je	LBB0_11
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%rbx,%r13), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_rewrite_rule_uidx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	incl	%r14d
	jmp	LBB0_11
LBB0_12:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	-56(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_get_map
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_21
## %bb.13:
	testl	%r14d, %r14d
	jle	LBB0_19
## %bb.14:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_IPFW_UH_WLOCK
	testl	%ebx, %ebx
	jg	LBB0_15
LBB0_18:
	movq	%r14, %rdi
	callq	_IPFW_UH_WUNLOCK
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_15 Depth=1
	addq	$32, %r13
	decl	%ebx
	je	LBB0_18
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%r13)
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	movq	24(%r13), %rsi
	movq	%r14, %rdi
	callq	_unref_rule_objects
	jmp	LBB0_17
LBB0_20:
	movl	%edx, %esi
	xorl	%edx, %edx
	callq	_get_map
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_19
LBB0_21:
	movq	_V_autoinc_step@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ecx
	testl	%ecx, %ecx
	jle	LBB0_22
## %bb.23:
	movl	$1000, %eax                     ## imm = 0x3E8
	cmpl	$1001, %ecx                     ## imm = 0x3E9
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jae	LBB0_24
	jmp	LBB0_25
LBB0_19:
	movq	_ENOSPC@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_36
LBB0_4:
	movl	%eax, %r15d
	testl	%r14d, %r14d
	jle	LBB0_36
## %bb.5:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_IPFW_UH_WLOCK
	testq	%rbx, %rbx
	jne	LBB0_6
LBB0_9:
	movq	%r14, %rdi
	callq	_IPFW_UH_WUNLOCK
	jmp	LBB0_36
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	addq	$-32, %rbx
	je	LBB0_9
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, -32(%r13,%rbx)
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	-8(%r13,%rbx), %rsi
	movq	%r14, %rdi
	callq	_unref_rule_objects
	jmp	LBB0_8
LBB0_22:
	movl	$1, %eax
	movq	-48(%rbp), %r14                 ## 8-byte Reload
LBB0_24:
	movl	%eax, (%rdx)
LBB0_25:
	movq	24(%r13), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	(%rax), %ecx
	movq	_IPFW_DEFAULT_RULE@GOTPCREL(%rip), %rax
	testl	%ecx, %ecx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	jne	LBB0_26
## %bb.27:
	movl	(%rax), %esi
	jmp	LBB0_28
LBB0_26:
	leal	1(%rcx), %esi
LBB0_28:
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_ipfw_find_rule
	movl	%eax, %ebx
	testl	%eax, %eax
	jle	LBB0_30
## %bb.29:
	movl	16(%r14), %edi
	leal	(,%rbx,8), %edx
	movq	%r15, %rsi
	callq	_bcopy
LBB0_30:
	movslq	%ebx, %rax
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, (%r15,%rax,8)
	movl	16(%r14), %edi
	addl	%ebx, %edi
	leaq	(%r15,%rax,8), %rsi
	addq	$8, %rsi
	movl	(%r14), %edx
	subl	%ebx, %edx
	shll	$3, %edx
	callq	_bcopy
	cmpl	$0, -64(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_34
## %bb.31:
	xorl	%eax, %eax
	movl	$0, %ecx
	testl	%ebx, %ebx
	jle	LBB0_33
## %bb.32:
	decl	%ebx
	movq	(%r15,%rbx,8), %rcx
	movl	(%rcx), %ecx
LBB0_33:
	movq	_IPFW_DEFAULT_RULE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movq	_V_autoinc_step@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	subl	%esi, %edx
	cmpl	%edx, %ecx
	cmovll	%esi, %eax
	addl	%ecx, %eax
	movl	%eax, (%r12)
	movq	8(%r13), %rcx
	movq	16(%r13), %rdx
	movl	%eax, (%rcx,%rdx)
LBB0_34:
	movq	8(%r14), %rax
	incq	%rax
	movq	%rax, 8(%r12)
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_update_skipto_cache
	movl	(%r14), %edx
	incl	%edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_swap_map
	movq	%rax, %rbx
	movq	%r12, %rdi
	callq	_RULEUSIZE0
	addl	%eax, 4(%r14)
	movq	%r14, %rdi
	callq	_IPFW_UH_WUNLOCK
	xorl	%r15d, %r15d
	testq	%rbx, %rbx
	je	LBB0_36
## %bb.35:
	movq	_M_IPFW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_free
LBB0_36:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.comm	_V_autoinc_step,4,2             ## @V_autoinc_step
	.comm	_IPFW_DEFAULT_RULE,4,2          ## @IPFW_DEFAULT_RULE
	.comm	_M_IPFW,4,2                     ## @M_IPFW
	.no_dead_strip	_commit_rules
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function commit_rules
_commit_rules:                          ; @commit_rules
	.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
	mov	x22, x2
	mov	x20, x1
	mov	x19, x0
	cmp	w2, #1
	b.lt	LBB0_12
; %bb.1:
	mov	x23, #0
	mov	w24, #0
	mov	x25, x22
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w24, w24, #1
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x23, x23, #32
	subs	w25, w25, #1
	b.eq	LBB0_13
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, x20, x23
	ldr	x8, [x1]
	cbz	x8, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_rewrite_rule_uidx
	cbz	w0, LBB0_2
; %bb.6:
	mov	x21, x0
	cmp	w24, #1
	b.lt	LBB0_36
; %bb.7:
	mov	x0, x19
	bl	_IPFW_UH_WLOCK
	cbnz	x23, LBB0_10
LBB0_8:
	mov	x0, x19
	bl	_IPFW_UH_WUNLOCK
	b	LBB0_36
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	subs	x23, x23, #32
	b.eq	LBB0_8
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	add	x8, x20, x23
	ldur	x9, [x8, #-32]
	cbz	x9, LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldur	x1, [x8, #-8]
	mov	x0, x19
	bl	_unref_rule_objects
	b	LBB0_9
LBB0_12:
	mov	x0, x19
	mov	x1, x22
	mov	w2, #0
	bl	_get_map
	mov	x21, x0
	cbnz	x0, LBB0_14
	b	LBB0_27
LBB0_13:
	mov	x0, x19
	mov	x1, x22
	mov	w2, #0
	bl	_get_map
	mov	x21, x0
	cbz	x0, LBB0_24
LBB0_14:
Lloh0:
	adrp	x24, _V_autoinc_step@GOTPAGE
Lloh1:
	ldr	x24, [x24, _V_autoinc_step@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.15:
	cmp	w8, #1001
	b.lo	LBB0_19
; %bb.16:
	mov	w8, #1000
	b	LBB0_18
LBB0_17:
	mov	w8, #1
LBB0_18:
	str	w8, [x24]
LBB0_19:
	ldr	x22, [x20, #24]
	ldr	w26, [x22]
Lloh2:
	adrp	x25, _IPFW_DEFAULT_RULE@GOTPAGE
Lloh3:
	ldr	x25, [x25, _IPFW_DEFAULT_RULE@GOTPAGEOFF]
	ldr	w8, [x25]
	cmp	w26, #0
	csinc	w1, w8, w26, eq
	mov	x0, x19
	mov	w2, #0
	bl	_ipfw_find_rule
	mov	x23, x0
	cmp	w0, #1
	b.lt	LBB0_21
; %bb.20:
	ldr	w0, [x19, #16]
	lsl	w2, w23, #3
	mov	x1, x21
	bl	_bcopy
LBB0_21:
	add	x1, x21, w23, sxtw #3
	str	x22, [x1], #8
	ldr	w8, [x19, #16]
	add	w0, w8, w23
	ldr	w8, [x19]
	sub	w8, w8, w23
	lsl	w2, w8, #3
	bl	_bcopy
	cbnz	w26, LBB0_33
; %bb.22:
	subs	w8, w23, #1
	b.lt	LBB0_31
; %bb.23:
	ldr	x8, [x21, w8, uxtw #3]
	ldr	w8, [x8]
	b	LBB0_32
LBB0_24:
	cmp	w24, #1
	b.lt	LBB0_27
; %bb.25:
	mov	x0, x19
	bl	_IPFW_UH_WLOCK
	cmp	w22, #1
	b.ge	LBB0_29
LBB0_26:
	mov	x0, x19
	bl	_IPFW_UH_WUNLOCK
LBB0_27:
Lloh4:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
Lloh6:
	ldr	w21, [x8]
	b	LBB0_36
LBB0_28:                                ;   in Loop: Header=BB0_29 Depth=1
	add	x20, x20, #32
	subs	w22, w22, #1
	b.eq	LBB0_26
LBB0_29:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	cbz	x8, LBB0_28
; %bb.30:                               ;   in Loop: Header=BB0_29 Depth=1
	ldr	x1, [x20, #24]
	mov	x0, x19
	bl	_unref_rule_objects
	b	LBB0_28
LBB0_31:
	mov	w8, #0
LBB0_32:
	ldr	w9, [x25]
	ldr	w10, [x24]
	sub	w9, w9, w10
	cmp	w8, w9
	csel	w9, w10, wzr, lt
	add	w8, w9, w8
	str	w8, [x22]
	ldp	x10, x9, [x20, #8]
	str	w8, [x10, x9]
LBB0_33:
	ldr	x8, [x19, #8]
	add	x8, x8, #1
	str	x8, [x22, #8]
	mov	x0, x19
	mov	x1, x21
	bl	_update_skipto_cache
	ldr	w8, [x19]
	add	w2, w8, #1
	mov	x0, x19
	mov	x1, x21
	bl	_swap_map
	mov	x20, x0
	mov	x0, x22
	bl	_RULEUSIZE0
	ldr	w8, [x19, #4]
	add	w8, w8, w0
	str	w8, [x19, #4]
	mov	x0, x19
	bl	_IPFW_UH_WUNLOCK
	cbz	x20, LBB0_35
; %bb.34:
Lloh7:
	adrp	x8, _M_IPFW@GOTPAGE
Lloh8:
	ldr	x8, [x8, _M_IPFW@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_free
LBB0_35:
	mov	w21, #0
LBB0_36:
	mov	x0, x21
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.comm	_V_autoinc_step,4,2             ; @V_autoinc_step
	.comm	_IPFW_DEFAULT_RULE,4,2          ; @IPFW_DEFAULT_RULE
	.comm	_M_IPFW,4,2                     ; @M_IPFW
	.no_dead_strip	_commit_rules
.subsections_via_symbols
