	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function add_rules
_add_rules:                             ## @add_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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r13
	movq	%rdi, %r14
	movl	(%rdx), %esi
	movq	%rdx, %rdi
	callq	_ipfw_get_sopt_space
	movq	%rax, %r15
	leaq	-112(%rbp), %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movl	(%r13), %ecx
	cmpl	$27, %ecx
	jbe	LBB0_21
## %bb.1:
	leaq	4(%r15), %rdi
	movq	12(%r15), %rax
	movq	_IPFW_TLV_TBLNAME_LIST@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_15
## %bb.2:
	movl	20(%r15), %ebx
	cmpl	%ecx, %ebx
	jg	LBB0_21
## %bb.3:
	cmpl	$23, %ebx
	jbe	LBB0_21
## %bb.4:
	movslq	%ebx, %rsi
	testb	$3, %sil
	jne	LBB0_21
## %bb.5:
	leaq	-24(%rsi), %rax
	movabsq	$-6148914691236517205, %rdx     ## imm = 0xAAAAAAAAAAAAAAAB
	mulq	%rdx
	movq	%rdx, %r12
	shrq	$3, %r12
	cmpl	%r12d, (%rdi)
	jne	LBB0_21
## %bb.6:
	cmpl	$12, 8(%r15)
	jne	LBB0_21
## %bb.7:
	testl	%r12d, %r12d
	jle	LBB0_14
## %bb.8:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	incl	%r12d
	movq	%r15, %r14
	addq	$36, %r14
	movl	$-1, %eax
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$12, (%r14)
	jne	LBB0_21
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	movl	-4(%r14), %edi
	callq	_ipfw_check_object_name_generic
	testl	%eax, %eax
	jne	LBB0_36
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	-8(%r14), %eax
	cmpl	-72(%rbp), %eax                 ## 4-byte Folded Reload
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	jle	LBB0_21
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=1
	decl	%r12d
	addq	$12, %r14
	cmpl	$1, %r12d
	jg	LBB0_9
## %bb.13:
	movl	20(%r15), %ebx
	movl	(%r13), %ecx
	movslq	%ebx, %rsi
	movq	-56(%rbp), %r14                 ## 8-byte Reload
LBB0_14:
	addl	$4, %ebx
	addq	%rdi, %rsi
	jmp	LBB0_16
LBB0_15:
	movl	$4, %ebx
	movq	%rdi, %rsi
	xorl	%edi, %edi
LBB0_16:
	movslq	%ebx, %rax
	addq	$24, %rax
	movslq	%ecx, %rdx
	cmpq	%rdx, %rax
	ja	LBB0_21
## %bb.17:
	movq	8(%rsi), %rax
	movq	_IPFW_TLV_RULE_LIST@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_21
## %bb.18:
	movl	16(%rsi), %r15d
	cmpl	$24, %r15d
	jb	LBB0_21
## %bb.19:
	leal	(%r15,%rbx), %eax
	cmpl	%ecx, %eax
	jg	LBB0_21
## %bb.20:
	testb	$3, %r15b
	je	LBB0_24
LBB0_21:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_22:
	movl	(%rax), %ebx
LBB0_23:
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	cmpl	$1, (%rsi)
	jne	LBB0_35
## %bb.25:
	addl	$-24, %r15d
	cmpl	$3, %r15d
	jbe	LBB0_21
## %bb.26:
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	leaq	-112(%rbp), %rdi
	xorl	%r12d, %r12d
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	$0, %eax
	testl	%r15d, %r15d
	jle	LBB0_41
## %bb.27:
	leaq	24(%rcx), %rdi
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	leaq	-112(%rbp), %r12
	movl	$0, -60(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_29
LBB0_28:                                ##   in Loop: Header=BB0_29 Depth=1
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	%r12, 8(%rax)
	movq	%rax, %r12
	movl	-64(%rbp), %edi                 ## 4-byte Reload
	movl	%esi, -64(%rbp)                 ## 4-byte Spill
	movl	$4, %esi
	callq	_roundup2
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	cltq
	addq	%rax, %rdi
	incl	-44(%rbp)                       ## 4-byte Folded Spill
	addq	$24, %r12
	movl	-64(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	subl	%eax, %r15d
	jle	LBB0_38
LBB0_29:                                ## =>This Inner Loop Header: Depth=1
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	callq	_RULESIZE
	movl	%eax, %edi
	movl	$4, %esi
	callq	_roundup2
	cmpl	%r15d, %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	jg	LBB0_37
## %bb.30:                              ##   in Loop: Header=BB0_29 Depth=1
	movl	%eax, %esi
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	cmpl	%eax, (%rcx)
	jle	LBB0_37
## %bb.31:                              ##   in Loop: Header=BB0_29 Depth=1
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 16(%r12)
	movq	%r12, %rdx
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	movl	%esi, -64(%rbp)                 ## 4-byte Spill
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	callq	_check_ipfw_rule1
	testl	%eax, %eax
	jne	LBB0_21
## %bb.32:                              ##   in Loop: Header=BB0_29 Depth=1
	movl	(%r12), %esi
	testl	%esi, %esi
	je	LBB0_28
## %bb.33:                              ##   in Loop: Header=BB0_29 Depth=1
	cmpl	-60(%rbp), %esi                 ## 4-byte Folded Reload
	jge	LBB0_28
## %bb.34:
	leaq	L_.str(%rip), %rdi
	movl	-60(%rbp), %edx                 ## 4-byte Reload
	callq	_printf
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_39
LBB0_35:
	movq	_ENOTSUP@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_36:
	movl	%eax, %ebx
	jmp	LBB0_23
LBB0_37:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_40
LBB0_38:
	xorl	%eax, %eax
LBB0_39:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
LBB0_40:
	movl	-44(%rbp), %r12d                ## 4-byte Reload
LBB0_41:
	cmpl	%r12d, (%rcx)
	jne	LBB0_21
## %bb.42:
	testl	%eax, %eax
	jne	LBB0_21
## %bb.43:
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	addl	16(%r15), %ebx
	cmpl	(%r13), %ebx
	jne	LBB0_21
## %bb.44:
	movl	%r12d, %edx
	testl	%r12d, %r12d
	je	LBB0_21
## %bb.45:
	leaq	-112(%rbp), %rbx
	jle	LBB0_48
## %bb.46:
	xorl	%r12d, %r12d
LBB0_47:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rdi
	callq	_RULEKSIZE1
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_ipfw_alloc_rule
	movl	%eax, (%rbx)
	movq	%rbx, %rdi
	callq	_import_rule1
	incl	%r12d
	addq	$24, %rbx
	movl	(%r15), %edx
	cmpl	%edx, %r12d
	jl	LBB0_47
LBB0_48:
	leaq	-112(%rbp), %r15
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_commit_rules
	testl	%eax, %eax
	je	LBB0_52
## %bb.49:
	movl	%eax, %ebx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpl	$0, (%rax)
	jle	LBB0_23
## %bb.50:
	xorl	%r14d, %r14d
LBB0_51:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	callq	_ipfw_free_rule
	incl	%r14d
	addq	$24, %r15
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpl	(%rax), %r14d
	jl	LBB0_51
	jmp	LBB0_23
LBB0_52:
	xorl	%ebx, %ebx
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IPFW_TLV_TBLNAME_LIST,8,3      ## @IPFW_TLV_TBLNAME_LIST
	.comm	_IPFW_TLV_RULE_LIST,8,3         ## @IPFW_TLV_RULE_LIST
	.comm	_ENOTSUP,4,2                    ## @ENOTSUP
	.comm	_M_TEMP,4,2                     ## @M_TEMP
	.comm	_M_WAITOK,4,2                   ## @M_WAITOK
	.comm	_M_ZERO,4,2                     ## @M_ZERO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rulenum %d idx %d\n"

	.no_dead_strip	_add_rules
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function add_rules
_add_rules:                             ; @add_rules
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x2
	mov	x19, x0
	ldr	w1, [x2]
	mov	x0, x2
	bl	_ipfw_get_sopt_space
	mov	x21, x0
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	ldr	w8, [x20]
	cmp	w8, #27
	b.ls	LBB0_19
; %bb.1:
	add	x28, x21, #4
	ldur	x9, [x21, #12]
Lloh0:
	adrp	x10, _IPFW_TLV_TBLNAME_LIST@GOTPAGE
Lloh1:
	ldr	x10, [x10, _IPFW_TLV_TBLNAME_LIST@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_14
; %bb.2:
	ldr	w9, [x21, #20]
	cmp	w9, w8
	ccmp	w9, #23, #0, le
	b.ls	LBB0_19
; %bb.3:
	sxtw	x10, w9
	tst	x10, #0x3
	b.ne	LBB0_19
; %bb.4:
	sub	x11, x10, #24
	mov	x12, #-6148914691236517206
	movk	x12, #43691
	umulh	x11, x11, x12
	lsr	x11, x11, #3
	ldr	w12, [x28]
	cmp	w12, w11
	b.ne	LBB0_19
; %bb.5:
	ldr	w12, [x21, #8]
	cmp	w12, #12
	b.ne	LBB0_19
; %bb.6:
	cmp	w11, #1
	b.lt	LBB0_13
; %bb.7:
	add	w23, w11, #1
	add	x24, x21, #36
	mov	w25, #-1
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x24]
	cmp	w8, #12
	b.ne	LBB0_19
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldur	w0, [x24, #-4]
	bl	_ipfw_check_object_name_generic
	cbnz	w0, LBB0_35
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	ldur	w8, [x24, #-8]
	cmp	w8, w25
	b.le	LBB0_19
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	sub	w23, w23, #1
	add	x24, x24, #12
	mov	x25, x8
	cmp	w23, #1
	b.gt	LBB0_8
; %bb.12:
	ldr	w9, [x21, #20]
	ldr	w8, [x20]
	sxtw	x10, w9
                                        ; kill: def $w9 killed $w9 killed $x9 def $x9
LBB0_13:
	add	w24, w9, #4
	add	x27, x10, x28
	b	LBB0_15
LBB0_14:
	mov	w24, #4
	mov	x27, x28
	mov	x28, #0
LBB0_15:
	sxtw	x9, w24
	add	x9, x9, #24
	cmp	x9, w8, sxtw
	b.hi	LBB0_19
; %bb.16:
	ldr	x9, [x27, #8]
Lloh3:
	adrp	x10, _IPFW_TLV_RULE_LIST@GOTPAGE
Lloh4:
	ldr	x10, [x10, _IPFW_TLV_RULE_LIST@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_19
; %bb.17:
	ldr	w9, [x27, #16]
	add	w10, w9, w24
	subs	w26, w9, #24
	ccmp	w10, w8, #0, hs
	b.gt	LBB0_19
; %bb.18:
	tst	w9, #0x3
	b.eq	LBB0_22
LBB0_19:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_20:
	ldr	w22, [x8]
LBB0_21:
	mov	x0, x22
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_22:
	ldr	w8, [x27]
	cmp	w8, #1
	b.ne	LBB0_34
; %bb.23:
	cmp	w26, #3
	b.ls	LBB0_19
; %bb.24:
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	cmp	w26, #1
	b.lt	LBB0_36
; %bb.25:
	mov	w21, #0
	str	wzr, [sp, #4]                   ; 4-byte Folded Spill
	add	x22, x27, #24
	add	x23, sp, #8
	b	LBB0_27
LBB0_26:                                ;   in Loop: Header=BB0_27 Depth=1
	str	x22, [x23, #8]
	mov	x0, x25
	mov	x25, x1
	mov	w1, #4
	bl	_roundup2
	sub	w26, w26, w0
	add	x22, x22, w0, sxtw
	add	w21, w21, #1
	add	x23, x23, #24
	str	w25, [sp, #4]                   ; 4-byte Folded Spill
	cmp	w26, #0
	b.le	LBB0_37
LBB0_27:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	bl	_RULESIZE
	mov	w1, #4
	bl	_roundup2
	cmp	w0, w26
	b.gt	LBB0_33
; %bb.28:                               ;   in Loop: Header=BB0_27 Depth=1
	ldr	w8, [x27]
	cmp	w8, w21
	b.le	LBB0_33
; %bb.29:                               ;   in Loop: Header=BB0_27 Depth=1
	mov	x25, x0
	str	x28, [x23, #16]
	mov	x0, x22
	mov	x1, x25
	mov	x2, x23
	bl	_check_ipfw_rule1
	cbnz	w0, LBB0_19
; %bb.30:                               ;   in Loop: Header=BB0_27 Depth=1
	ldr	w1, [x22]
	cbz	w1, LBB0_26
; %bb.31:                               ;   in Loop: Header=BB0_27 Depth=1
	ldr	w8, [sp, #4]                    ; 4-byte Folded Reload
	cmp	w1, w8
	b.ge	LBB0_26
; %bb.32:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	ldr	w2, [sp, #4]                    ; 4-byte Folded Reload
	bl	_printf
LBB0_33:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	b	LBB0_38
LBB0_34:
Lloh13:
	adrp	x8, _ENOTSUP@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOTSUP@GOTPAGEOFF]
	b	LBB0_20
LBB0_35:
	mov	x22, x0
	b	LBB0_21
LBB0_36:
	mov	w21, #0
LBB0_37:
	mov	w8, #0
LBB0_38:
	ldr	w9, [x27]
	cmp	w9, w21
	ccmp	w8, #0, #0, eq
	b.ne	LBB0_19
; %bb.39:
	ldr	w8, [x27, #16]
	ldr	w9, [x20]
	add	w8, w8, w24
	cmp	w8, w9
	ccmp	w21, #0, #4, eq
	b.eq	LBB0_19
; %bb.40:
	cmp	w21, #1
	b.lt	LBB0_43
; %bb.41:
	mov	w22, #0
	add	x20, sp, #8
LBB0_42:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x20, #8]
	bl	_RULEKSIZE1
	mov	x1, x0
	mov	x0, x19
	bl	_ipfw_alloc_rule
	str	w0, [x20]
	mov	x0, x20
	bl	_import_rule1
	add	w22, w22, #1
	add	x20, x20, #24
	ldr	w21, [x27]
	cmp	w22, w21
	b.lt	LBB0_42
LBB0_43:
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, x21
	bl	_commit_rules
	mov	x22, x0
	cbz	w0, LBB0_21
; %bb.44:
	ldr	w8, [x27]
	cmp	w8, #1
	b.lt	LBB0_21
; %bb.45:
	mov	w19, #0
	add	x20, sp, #8
LBB0_46:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20], #24
	bl	_ipfw_free_rule
	add	w19, w19, #1
	ldr	w8, [x27]
	cmp	w19, w8
	b.lt	LBB0_46
	b	LBB0_21
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IPFW_TLV_TBLNAME_LIST,8,3      ; @IPFW_TLV_TBLNAME_LIST
	.comm	_IPFW_TLV_RULE_LIST,8,3         ; @IPFW_TLV_RULE_LIST
	.comm	_ENOTSUP,4,2                    ; @ENOTSUP
	.comm	_M_TEMP,4,2                     ; @M_TEMP
	.comm	_M_WAITOK,4,2                   ; @M_WAITOK
	.comm	_M_ZERO,4,2                     ; @M_ZERO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rulenum %d idx %d\n"

	.no_dead_strip	_add_rules
.subsections_via_symbols
