	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipfw_add_protected_rule        ## -- Begin function ipfw_add_protected_rule
	.p2align	4, 0x90
_ipfw_add_protected_rule:               ## @ipfw_add_protected_rule
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	$1, %esi
	callq	_get_map
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movl	(%rbx), %edx
	testl	%edx, %edx
	jle	LBB0_4
## %bb.3:
	movl	16(%rbx), %edi
	shll	$3, %edx
	movq	%r15, %rsi
	callq	_bcopy
	movl	(%rbx), %edx
LBB0_4:
	movslq	%edx, %rdx
	movq	%r14, (%r15,%rdx,8)
	movq	_IPFW_DEFAULT_RULE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r14)
	movq	_RESVD_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r14)
	movq	8(%rbx), %rax
	incq	%rax
	movq	%rax, (%r14)
	incl	%edx
	movq	%rbx, %rdi
	movq	%r15, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_swap_map
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_RULEUSIZE0
	addl	%eax, 4(%rbx)
	movq	%rbx, %rdi
	callq	_IPFW_UH_WUNLOCK
	movq	_M_IPFW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_free
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_IPFW_DEFAULT_RULE,4,2          ## @IPFW_DEFAULT_RULE
	.comm	_RESVD_SET,4,2                  ## @RESVD_SET
	.comm	_M_IPFW,4,2                     ## @M_IPFW
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipfw_add_protected_rule        ; -- Begin function ipfw_add_protected_rule
	.p2align	2
_ipfw_add_protected_rule:               ; @ipfw_add_protected_rule
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	mov	x19, x0
	mov	w1, #1
	bl	_get_map
	cbz	x0, LBB0_4
; %bb.1:
	mov	x21, x0
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.2:
	ldr	w0, [x19, #16]
	lsl	w2, w8, #3
	mov	x1, x21
	bl	_bcopy
	ldr	w8, [x19]
LBB0_3:
	str	x20, [x21, w8, sxtw #3]
Lloh0:
	adrp	x9, _IPFW_DEFAULT_RULE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IPFW_DEFAULT_RULE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _RESVD_SET@GOTPAGE
Lloh4:
	ldr	x10, [x10, _RESVD_SET@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	stp	w10, w9, [x20, #8]
	ldr	x9, [x19, #8]
	add	x9, x9, #1
	str	x9, [x20]
	add	w2, w8, #1
	mov	x0, x19
	mov	x1, x21
	bl	_swap_map
	mov	x21, x0
	mov	x0, x20
	bl	_RULEUSIZE0
	ldr	w8, [x19, #4]
	add	w8, w8, w0
	str	w8, [x19, #4]
	mov	x0, x19
	bl	_IPFW_UH_WUNLOCK
Lloh6:
	adrp	x8, _M_IPFW@GOTPAGE
Lloh7:
	ldr	x8, [x8, _M_IPFW@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_free
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_IPFW_DEFAULT_RULE,4,2          ; @IPFW_DEFAULT_RULE
	.comm	_RESVD_SET,4,2                  ; @RESVD_SET
	.comm	_M_IPFW,4,2                     ; @M_IPFW
.subsections_via_symbols
