	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pfctl_load_rule                ## -- Begin function pfctl_load_rule
	.p2align	4, 0x90
_pfctl_load_rule:                       ## @pfctl_load_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, %r13
	movq	%rsi, %r14
	movq	%rdi, %r15
	movl	20(%rdx), %edi
	callq	_pf_get_ruleset_number
	movl	%eax, %r12d
	movq	%r14, %rdi
	callq	_strlen
	movl	%eax, %ebx
	leaq	-64(%rbp), %rdi
	movl	$20, %esi
	callq	_bzero
	movq	_PF_OPT_NOACTION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	jne	LBB0_2
## %bb.1:
	movl	12(%r15), %edi
	movl	%r12d, %esi
	movq	%r14, %rdx
	callq	_pfctl_get_ticket
	movl	%eax, -48(%rbp)
LBB0_2:
	movl	-52(%rbp), %edi
	movq	%r14, %rsi
	movl	$4, %edx
	callq	_strlcpy
	cmpl	$4, %eax
	jb	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_errx
LBB0_4:
	movq	8(%r13), %rax
	movslq	%ebx, %r12
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	cmpq	$0, 16(%rax)
	je	LBB0_8
## %bb.7:
	leaq	(%r14,%r12), %rdi
	movq	_MAXPATHLEN@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	subq	%r12, %rsi
	cmpb	$0, (%r14)
	movq	(%rax), %rcx
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rdx
	cmoveq	%rax, %rdx
	callq	_snprintf
	movq	8(%r13), %rax
	jmp	LBB0_9
LBB0_5:
	leaq	L_.str.3(%rip), %rbx
	jmp	LBB0_10
LBB0_8:
	addq	$8, %rax
LBB0_9:
	movq	(%rax), %rbx
LBB0_10:
	movq	_PF_OPT_NOACTION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_11
LBB0_17:
	movl	(%r15), %eax
	movq	_PF_OPT_VERBOSE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_22
## %bb.18:
	movq	_PF_OPT_VERBOSE2@GOTPCREL(%rip), %rbx
	xorl	%esi, %esi
	andl	(%rbx), %eax
	sete	%sil
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_INDENT
	movq	8(%r13), %rax
	testq	%rax, %rax
	je	LBB0_19
## %bb.20:
	movq	(%rax), %rsi
	jmp	LBB0_21
LBB0_11:
	movl	16(%r13), %edx
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_pfctl_add_pool
	movq	%rax, %rcx
	movl	$1, %eax
	testq	%rcx, %rcx
	jne	LBB0_23
## %bb.12:
	movl	8(%r15), %eax
	movl	%eax, -56(%rbp)
	leaq	-60(%rbp), %rdi
	movq	%r13, %rsi
	movl	$4, %edx
	callq	_memcpy
	cmpq	$0, 8(%r13)
	je	LBB0_15
## %bb.13:
	movl	-64(%rbp), %edi
	movq	%rbx, %rsi
	movl	$4, %edx
	callq	_strlcpy
	cmpl	$4, %eax
	jb	LBB0_15
## %bb.14:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_errx
LBB0_15:
	movl	4(%r15), %edi
	movq	_DIOCADDRULE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rdx
	callq	_ioctl
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	leaq	L_.str.4(%rip), %rsi
	movl	$1, %edi
	callq	_err
	jmp	LBB0_17
LBB0_19:
	leaq	L_.str.3(%rip), %rsi
LBB0_21:
	movl	(%r15), %ecx
	movl	(%rbx), %edx
	andl	%ecx, %edx
	movq	_PF_OPT_NUMERIC@GOTPCREL(%rip), %rax
	andl	(%rax), %ecx
	movq	%r13, %rdi
	callq	_print_rule
LBB0_22:
	movb	$0, (%r14,%r12)
	movq	%r13, %rdi
	callq	_pfctl_clear_pool
	xorl	%eax, %eax
LBB0_23:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PF_OPT_NOACTION,4,2            ## @PF_OPT_NOACTION
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pfctl_load_rule: strlcpy"

	.comm	_MAXPATHLEN,8,3                 ## @MAXPATHLEN
L_.str.1:                               ## @.str.1
	.asciz	"/%s"

L_.str.2:                               ## @.str.2
	.asciz	"%s"

L_.str.3:                               ## @.str.3
	.space	1

	.comm	_DIOCADDRULE,4,2                ## @DIOCADDRULE
L_.str.4:                               ## @.str.4
	.asciz	"DIOCADDRULE"

	.comm	_PF_OPT_VERBOSE,4,2             ## @PF_OPT_VERBOSE
	.comm	_PF_OPT_VERBOSE2,4,2            ## @PF_OPT_VERBOSE2
	.comm	_PF_OPT_NUMERIC,4,2             ## @PF_OPT_NUMERIC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pfctl_load_rule                ; -- Begin function pfctl_load_rule
	.p2align	2
_pfctl_load_rule:                       ; @pfctl_load_rule
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x23, x3
	mov	x19, x2
	mov	x20, x1
	mov	x22, x0
	ldr	w0, [x2, #20]
	bl	_pf_get_ruleset_number
	mov	x24, x0
	mov	x0, x20
	bl	_strlen
	mov	x21, x0
	add	x0, sp, #8
	mov	w1, #20
	bl	_bzero
	ldr	w8, [x22]
Lloh0:
	adrp	x25, _PF_OPT_NOACTION@GOTPAGE
Lloh1:
	ldr	x25, [x25, _PF_OPT_NOACTION@GOTPAGEOFF]
	ldr	w9, [x25]
	tst	w9, w8
	b.ne	LBB0_2
; %bb.1:
	ldr	w0, [x22, #12]
	mov	x1, x24
	mov	x2, x20
	bl	_pfctl_get_ticket
	str	w0, [sp, #24]
LBB0_2:
	ldr	w0, [sp, #20]
	mov	x1, x20
	mov	w2, #4
	bl	_strlcpy
	cmp	w0, #4
	b.lo	LBB0_4
; %bb.3:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_4:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_7
; %bb.5:
	ldr	x9, [x8, #16]
	cbz	x9, LBB0_8
; %bb.6:
	ldrb	w9, [x20]
	sxtw	x10, w21
	add	x0, x20, x10
Lloh4:
	adrp	x11, _MAXPATHLEN@GOTPAGE
Lloh5:
	ldr	x11, [x11, _MAXPATHLEN@GOTPAGEOFF]
Lloh6:
	ldr	x11, [x11]
	sub	x1, x11, x10
	ldr	x3, [x8]
Lloh7:
	adrp	x8, l_.str.1@PAGE
Lloh8:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh9:
	adrp	x10, l_.str.2@PAGE
Lloh10:
	add	x10, x10, l_.str.2@PAGEOFF
	cmp	w9, #0
	csel	x2, x10, x8, eq
	bl	_snprintf
	ldr	x8, [x19, #8]
	b	LBB0_9
LBB0_7:
Lloh11:
	adrp	x24, l_.str.3@PAGE
Lloh12:
	add	x24, x24, l_.str.3@PAGEOFF
	b	LBB0_10
LBB0_8:
	add	x8, x8, #8
LBB0_9:
	ldr	x24, [x8]
LBB0_10:
	ldr	w8, [x22]
	ldr	w9, [x25]
	tst	w9, w8
	b.eq	LBB0_14
LBB0_11:
	ldr	w8, [x22]
Lloh13:
	adrp	x9, _PF_OPT_VERBOSE@GOTPAGE
Lloh14:
	ldr	x9, [x9, _PF_OPT_VERBOSE@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_18
; %bb.12:
Lloh16:
	adrp	x24, _PF_OPT_VERBOSE2@GOTPAGE
Lloh17:
	ldr	x24, [x24, _PF_OPT_VERBOSE2@GOTPAGEOFF]
	ldr	w9, [x24]
	tst	w9, w8
	cset	w1, eq
	mov	x0, x23
	bl	_INDENT
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_16
; %bb.13:
	ldr	x1, [x8]
	b	LBB0_17
LBB0_14:
	ldr	w2, [x19, #16]
	mov	x0, x22
	mov	x1, x19
	bl	_pfctl_add_pool
	cbz	x0, LBB0_20
; %bb.15:
	mov	w0, #1
	b	LBB0_19
LBB0_16:
Lloh18:
	adrp	x1, l_.str.3@PAGE
Lloh19:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_17:
	ldr	w8, [x22]
	ldr	w9, [x24]
	and	w2, w9, w8
Lloh20:
	adrp	x9, _PF_OPT_NUMERIC@GOTPAGE
Lloh21:
	ldr	x9, [x9, _PF_OPT_NUMERIC@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	and	w3, w9, w8
	mov	x0, x19
	bl	_print_rule
LBB0_18:
	strb	wzr, [x20, w21, sxtw]
	mov	x0, x19
	bl	_pfctl_clear_pool
	mov	w0, #0
LBB0_19:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_20:
	ldr	w8, [x22, #8]
	str	w8, [sp, #16]
	add	x8, sp, #8
	orr	x0, x8, #0x4
	mov	x1, x19
	mov	w2, #4
	bl	_memcpy
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_23
; %bb.21:
	ldr	w0, [sp, #8]
	mov	x1, x24
	mov	w2, #4
	bl	_strlcpy
	cmp	w0, #4
	b.lo	LBB0_23
; %bb.22:
Lloh23:
	adrp	x1, l_.str@PAGE
Lloh24:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_23:
	ldr	w0, [x22, #4]
Lloh25:
	adrp	x8, _DIOCADDRULE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _DIOCADDRULE@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_ioctl
	cbz	x0, LBB0_11
; %bb.24:
Lloh28:
	adrp	x1, l_.str.4@PAGE
Lloh29:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #1
	bl	_err
	b	LBB0_11
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_PF_OPT_NOACTION,4,2            ; @PF_OPT_NOACTION
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pfctl_load_rule: strlcpy"

	.comm	_MAXPATHLEN,8,3                 ; @MAXPATHLEN
l_.str.1:                               ; @.str.1
	.asciz	"/%s"

l_.str.2:                               ; @.str.2
	.asciz	"%s"

l_.str.3:                               ; @.str.3
	.space	1

	.comm	_DIOCADDRULE,4,2                ; @DIOCADDRULE
l_.str.4:                               ; @.str.4
	.asciz	"DIOCADDRULE"

	.comm	_PF_OPT_VERBOSE,4,2             ; @PF_OPT_VERBOSE
	.comm	_PF_OPT_VERBOSE2,4,2            ; @PF_OPT_VERBOSE2
	.comm	_PF_OPT_NUMERIC,4,2             ; @PF_OPT_NUMERIC
.subsections_via_symbols
