	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pfctl_add_rule                 ## -- Begin function pfctl_add_rule
	.p2align	4, 0x90
_pfctl_add_rule:                        ## @pfctl_add_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	%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
	movq	%rdx, %r15
	movq	%rsi, %r13
	movq	%rdi, %rbx
	movl	16(%rsi), %edi
	callq	_pf_get_ruleset_number
	movq	%rax, %r14
	movq	_PF_RULESET_MAX@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	jne	LBB0_2
## %bb.1:
	movl	16(%r13), %edx
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_2:
	movq	(%rbx), %r12
	cmpb	$0, (%r15)
	je	LBB0_14
## %bb.3:
	cmpq	$0, 8(%r13)
	jne	LBB0_14
## %bb.4:
	movl	$1, %edi
	movl	$16, %esi
	callq	_calloc
	movq	%rax, 8(%r13)
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_err
	movq	8(%r13), %rax
LBB0_6:
	movq	%r12, %rbx
	addq	$8, %rax
	movq	%rax, %rdi
	callq	_pf_init_ruleset
	movq	8(%r13), %rax
	movq	%rax, 8(%rax)
	movl	4(%rax), %edi
	movq	%r15, %rsi
	movl	$4, %edx
	callq	_strlcpy
	cmpl	$4, %eax
	jb	LBB0_8
## %bb.7:
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_8:
	movq	%r15, %rdi
	movl	$47, %esi
	callq	_strrchr
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_strlen
	testl	%eax, %eax
	jne	LBB0_12
## %bb.11:
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_err
	jmp	LBB0_12
LBB0_9:
	movq	%r15, %r12
LBB0_12:
	movq	8(%r13), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	movl	$4, %edx
	callq	_strlcpy
	cmpl	$4, %eax
	movq	%rbx, %r12
	jb	LBB0_14
## %bb.13:
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_14:
	movl	$1, %edi
	movl	$24, %esi
	callq	_calloc
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_16
## %bb.15:
	leaq	L_.str.4(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_err
LBB0_16:
	movq	16(%r13), %rax
	movq	%rax, 16(%rbx)
	movups	(%r13), %xmm0
	movups	%xmm0, (%rbx)
	movq	%rbx, %rdi
	callq	_TAILQ_INIT
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_pfctl_move_pool
	movq	(%r12), %rax
	movl	(%rax,%r14,4), %edi
	movq	_entries@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rsi
	callq	_TAILQ_INSERT_TAIL
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PF_RULESET_MAX,8,3             ## @PF_RULESET_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid rule type %d"

L_.str.1:                               ## @.str.1
	.asciz	"pfctl_add_rule: calloc"

L_.str.2:                               ## @.str.2
	.asciz	"pfctl_add_rule: strlcpy"

L_.str.3:                               ## @.str.3
	.asciz	"pfctl_add_rule: bad anchor name %s"

L_.str.4:                               ## @.str.4
	.asciz	"calloc"

	.comm	_entries,4,2                    ## @entries
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pfctl_add_rule                 ; -- Begin function pfctl_add_rule
	.p2align	2
_pfctl_add_rule:                        ; @pfctl_add_rule
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x21, x2
	mov	x19, x1
	mov	x22, x0
	ldr	w0, [x1, #16]
	bl	_pf_get_ruleset_number
	mov	x20, x0
Lloh0:
	adrp	x8, _PF_RULESET_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PF_RULESET_MAX@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.1:
	ldr	w8, [x19, #16]
	str	x8, [sp]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_2:
	ldr	x23, [x22]
	ldrb	w8, [x21]
	cbz	w8, LBB0_14
; %bb.3:
	ldr	x8, [x19, #8]
	cbnz	x8, LBB0_14
; %bb.4:
	mov	w0, #1
	mov	w1, #16
	bl	_calloc
	str	x0, [x19, #8]
	cbnz	x0, LBB0_6
; %bb.5:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_err
	ldr	x0, [x19, #8]
LBB0_6:
	add	x0, x0, #8
	bl	_pf_init_ruleset
	ldr	x8, [x19, #8]
	str	x8, [x8, #8]
	ldr	w0, [x8, #4]
	mov	x1, x21
	mov	w2, #4
	bl	_strlcpy
	cmp	w0, #4
	b.lo	LBB0_8
; %bb.7:
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_8:
	mov	x0, x21
	mov	w1, #47
	bl	_strrchr
	cbz	x0, LBB0_11
; %bb.9:
	mov	x22, x0
	bl	_strlen
	cbnz	w0, LBB0_12
; %bb.10:
	str	x21, [sp]
Lloh9:
	adrp	x1, l_.str.3@PAGE
Lloh10:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_err
	b	LBB0_12
LBB0_11:
	mov	x22, x21
LBB0_12:
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	mov	x1, x22
	mov	w2, #4
	bl	_strlcpy
	cmp	w0, #4
	b.lo	LBB0_14
; %bb.13:
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_14:
	mov	w0, #1
	mov	w1, #24
	bl	_calloc
	mov	x21, x0
	cbnz	x0, LBB0_16
; %bb.15:
Lloh13:
	adrp	x1, l_.str.4@PAGE
Lloh14:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_16:
	ldr	q0, [x19]
	str	q0, [x21]
	ldr	x8, [x19, #16]
	str	x8, [x21, #16]
	mov	x0, x21
	bl	_TAILQ_INIT
	mov	x0, x19
	mov	x1, x21
	bl	_pfctl_move_pool
	ldr	x8, [x23]
	ldr	w0, [x8, x20, lsl #2]
Lloh15:
	adrp	x8, _entries@GOTPAGE
Lloh16:
	ldr	x8, [x8, _entries@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x1, x21
	bl	_TAILQ_INSERT_TAIL
	mov	w0, #0
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_PF_RULESET_MAX,8,3             ; @PF_RULESET_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid rule type %d"

l_.str.1:                               ; @.str.1
	.asciz	"pfctl_add_rule: calloc"

l_.str.2:                               ; @.str.2
	.asciz	"pfctl_add_rule: strlcpy"

l_.str.3:                               ; @.str.3
	.asciz	"pfctl_add_rule: bad anchor name %s"

l_.str.4:                               ; @.str.4
	.asciz	"calloc"

	.comm	_entries,4,2                    ; @entries
.subsections_via_symbols
