	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_prison_restrict_ip4            ## -- Begin function prison_restrict_ip4
	.p2align	4, 0x90
_prison_restrict_ip4:                   ## @prison_restrict_ip4
	.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	%rdi, %r12
	movq	16(%rdi), %r13
	movq	_PR_IP4_USER@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	4(%rdi), %eax
	testl	%ecx, (%rdi)
	je	LBB0_1
## %bb.10:
	xorl	%r14d, %r14d
	testl	%eax, %eax
	jle	LBB0_37
## %bb.11:
	movl	4(%r13), %ecx
	movq	8(%r12), %rdi
	testl	%ecx, %ecx
	jle	LBB0_16
## %bb.12:
	movq	(%rdi), %rdx
	movq	8(%r13), %rsi
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	cmpq	(%rsi,%rbx,8), %rdx
	je	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_14 Depth=1
	incq	%rbx
	cmpq	%rbx, %rcx
	jne	LBB0_14
LBB0_16:
	leaq	8(%rdi), %rsi
	leal	-1(%rax), %ecx
	movl	%ecx, 4(%r12)
	leal	-8(,%rax,8), %edx
	callq	_memmove
	movl	4(%r12), %eax
	xorl	%r15d, %r15d
	cmpl	%eax, %r15d
	jl	LBB0_18
	jmp	LBB0_34
LBB0_1:
	movl	4(%r13), %edx
	cmpl	%edx, %eax
	jge	LBB0_7
## %bb.2:
	movq	%rsi, %r15
	movl	$1, %r14d
	testq	%rsi, %rsi
	jne	LBB0_6
## %bb.3:
	shll	$3, %edx
	movq	_M_PRISON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_M_NOWAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%edx, %edi
	movl	%eax, %edx
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r15
	movl	4(%r13), %edx
	xorl	%r14d, %r14d
LBB0_6:
	movq	8(%r13), %rsi
	shll	$3, %edx
	movq	%r15, %rdi
	callq	_memmove
	movq	8(%r12), %rdi
	movq	_M_PRISON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_free
	movq	%r15, 8(%r12)
	movl	4(%r13), %eax
	movl	%eax, 4(%r12)
	jmp	LBB0_37
LBB0_7:
	movl	%edx, 4(%r12)
	testl	%edx, %edx
	jle	LBB0_9
## %bb.8:
	movq	8(%r13), %rsi
	movq	8(%r12), %rdi
	shll	$3, %edx
	callq	_memmove
	xorl	%r14d, %r14d
	jmp	LBB0_37
LBB0_15:
	movl	$1, %r15d
	cmpl	%eax, %r15d
	jge	LBB0_34
LBB0_18:
	movl	$1, %r10d
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
LBB0_19:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_20 Depth 2
	movq	8(%r12), %r9
	movq	8(%r13), %r8
	movq	(%r8), %rdi
	movslq	%r15d, %r14
	movslq	%eax, %rdx
	leaq	(%r9,%r14,8), %rcx
	movq	%r9, %rsi
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_20:                                ##   Parent Loop BB0_19 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpq	%rdi, (%rcx,%r13,8)
	jne	LBB0_23
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=2
	addq	$8, %rsi
	leaq	(%r14,%r13), %rbx
	incq	%rbx
	incq	%r13
	cmpq	%rdx, %rbx
	jl	LBB0_20
	jmp	LBB0_22
LBB0_23:                                ##   in Loop: Header=BB0_19 Depth=1
	movl	%r15d, %ebx
	addq	%r13, %rbx
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	cmpl	4(%rcx), %r10d
	jge	LBB0_30
## %bb.24:                              ##   in Loop: Header=BB0_19 Depth=1
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	leaq	(%rsi,%r14,8), %rdi
	movl	%r10d, %ebx
	movslq	%r10d, %rax
	leaq	(%r8,%rax,8), %rsi
	callq	_prison_qcmp_v4
	cmpl	$-1, %eax
	je	LBB0_29
## %bb.25:                              ##   in Loop: Header=BB0_19 Depth=1
	testl	%eax, %eax
	je	LBB0_31
## %bb.26:                              ##   in Loop: Header=BB0_19 Depth=1
	cmpl	$1, %eax
	movl	$0, %r14d
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movl	%ebx, %r10d
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	jne	LBB0_28
## %bb.27:                              ##   in Loop: Header=BB0_19 Depth=1
	incl	%r10d
LBB0_28:                                ##   in Loop: Header=BB0_19 Depth=1
                                        ## kill: def $r15d killed $r15d killed $r15 def $r15
	jmp	LBB0_33
LBB0_29:                                ##   in Loop: Header=BB0_19 Depth=1
	movq	8(%r12), %r9
	movl	4(%r12), %eax
	movl	%ebx, %r10d
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
LBB0_30:                                ##   in Loop: Header=BB0_19 Depth=1
	leal	-1(%rax), %ecx
	movl	%ecx, 4(%r12)
	notl	%r15d
	addl	%eax, %r15d
	subl	%r13d, %r15d
	shll	$3, %r15d
	leaq	(%r9,%r14,8), %rax
	leaq	(%rax,%r13,8), %rdi
	leaq	(%rax,%r13,8), %rsi
	addq	$8, %rsi
	movq	%r15, %rdx
	movl	%r10d, %r14d
	callq	_memmove
	movl	%r14d, %r10d
	movl	%ebx, %r15d
LBB0_32:                                ##   in Loop: Header=BB0_19 Depth=1
	xorl	%r14d, %r14d
	movq	-48(%rbp), %r13                 ## 8-byte Reload
LBB0_33:                                ##   in Loop: Header=BB0_19 Depth=1
	movl	4(%r12), %eax
	cmpl	%eax, %r15d
	jl	LBB0_19
	jmp	LBB0_34
LBB0_31:                                ##   in Loop: Header=BB0_19 Depth=1
	addl	%r13d, %r15d
	incl	%r15d
	movl	%ebx, %r10d
	incl	%r10d
	jmp	LBB0_32
LBB0_22:
	xorl	%r14d, %r14d
LBB0_34:
	testl	%eax, %eax
	jne	LBB0_37
## %bb.35:
	movq	8(%r12), %rdi
	jmp	LBB0_36
LBB0_9:
	movq	8(%r12), %rdi
	xorl	%r14d, %r14d
	testq	%rdi, %rdi
	je	LBB0_37
LBB0_36:
	movq	_M_PRISON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_free
	movq	$0, 8(%r12)
LBB0_37:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	$1, %r14d
	jmp	LBB0_37
	.cfi_endproc
                                        ## -- End function
	.comm	_PR_IP4_USER,4,2                ## @PR_IP4_USER
	.comm	_M_PRISON,4,2                   ## @M_PRISON
	.comm	_M_NOWAIT,4,2                   ## @M_NOWAIT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_prison_restrict_ip4            ; -- Begin function prison_restrict_ip4
	.p2align	2
_prison_restrict_ip4:                   ; @prison_restrict_ip4
	.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	x19, x0
	ldr	x22, [x0, #16]
Lloh0:
	adrp	x8, _PR_IP4_USER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PR_IP4_USER@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
	ldp	w10, w8, [x0]
	tst	w9, w10
	b.eq	LBB0_7
; %bb.1:
	subs	w9, w8, #1
	b.lt	LBB0_24
; %bb.2:
	ldr	w10, [x22, #4]
	ldr	x0, [x19, #8]
	cmp	w10, #1
	b.lt	LBB0_6
; %bb.3:
	ldr	x11, [x0]
	ldr	x12, [x22, #8]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x13, [x12]
	cmp	x11, x13
	b.eq	LBB0_12
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x12, x12, #8
	subs	x10, x10, #1
	b.ne	LBB0_4
LBB0_6:
	add	x1, x0, #8
	str	w9, [x19, #4]
	lsl	w2, w9, #3
	bl	_memmove
	mov	w25, #0
	ldr	w8, [x19, #4]
	cmp	w25, w8
	b.lt	LBB0_13
	b	LBB0_23
LBB0_7:
	ldr	w9, [x22, #4]
	cmp	w8, w9
	b.ge	LBB0_10
; %bb.8:
	mov	x21, x1
	cbz	x1, LBB0_26
; %bb.9:
	mov	w20, #1
	b	LBB0_28
LBB0_10:
	str	w9, [x19, #4]
	cmp	w9, #1
	b.lt	LBB0_29
; %bb.11:
	ldr	x1, [x22, #8]
	ldr	x0, [x19, #8]
	lsl	w2, w9, #3
	bl	_memmove
	mov	w20, #0
	b	LBB0_31
LBB0_12:
	mov	w25, #1
	cmp	w25, w8
	b.ge	LBB0_23
LBB0_13:
	mov	w20, #1
LBB0_14:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_15 Depth 2
	mov	x21, #0
	ldr	x9, [x19, #8]
	ldr	x10, [x22, #8]
	ldr	x11, [x10]
	sxtw	x23, w25
	sxtw	x12, w8
	sbfiz	x24, x25, #3, #32
	add	x13, x9, x24
LBB0_15:                                ;   Parent Loop BB0_14 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x14, [x13, x21, lsl #3]
	cmp	x14, x11
	b.ne	LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=2
	add	x21, x21, #1
	add	x24, x24, #8
	add	x14, x23, x21
	cmp	x14, x12
	b.lt	LBB0_15
	b	LBB0_23
LBB0_17:                                ;   in Loop: Header=BB0_14 Depth=1
	add	x25, x21, w23, uxtw
	ldr	w11, [x22, #4]
	cmp	w20, w11
	b.ge	LBB0_21
; %bb.18:                               ;   in Loop: Header=BB0_14 Depth=1
	add	x0, x9, x24
	add	x1, x10, w20, sxtw #3
	bl	_prison_qcmp_v4
	cmn	w0, #1
	b.eq	LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_14 Depth=1
	add	w8, w23, w21
	cmp	w0, #1
	cinc	w9, w20, eq
	cmp	w0, #0
	csinc	w25, w25, w8, ne
	csinc	w20, w9, w20, ne
	b	LBB0_22
LBB0_20:                                ;   in Loop: Header=BB0_14 Depth=1
	ldr	x9, [x19, #8]
	ldr	w8, [x19, #4]
LBB0_21:                                ;   in Loop: Header=BB0_14 Depth=1
	sub	w10, w8, #1
	str	w10, [x19, #4]
	mvn	w10, w23
	add	w8, w10, w8
	sub	w8, w8, w21
	lsl	w2, w8, #3
	add	x0, x9, x24
	add	x1, x0, #8
	bl	_memmove
                                        ; kill: def $w25 killed $w25 killed $x25 def $x25
LBB0_22:                                ;   in Loop: Header=BB0_14 Depth=1
	ldr	w8, [x19, #4]
	cmp	w25, w8
	b.lt	LBB0_14
LBB0_23:
	cbz	w8, LBB0_25
LBB0_24:
	mov	w20, #0
	b	LBB0_31
LBB0_25:
	ldr	x0, [x19, #8]
	b	LBB0_30
LBB0_26:
	lsl	w0, w9, #3
Lloh3:
	adrp	x8, _M_PRISON@GOTPAGE
Lloh4:
	ldr	x8, [x8, _M_PRISON@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _M_NOWAIT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _M_NOWAIT@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	bl	_malloc
	cbz	x0, LBB0_32
; %bb.27:
	mov	x21, x0
	mov	w20, #0
	ldr	w9, [x22, #4]
LBB0_28:
	ldr	x1, [x22, #8]
	lsl	w2, w9, #3
	mov	x0, x21
	bl	_memmove
	ldr	x0, [x19, #8]
Lloh9:
	adrp	x8, _M_PRISON@GOTPAGE
Lloh10:
	ldr	x8, [x8, _M_PRISON@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_free
	str	x21, [x19, #8]
	ldr	w8, [x22, #4]
	str	w8, [x19, #4]
	b	LBB0_31
LBB0_29:
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_24
LBB0_30:
Lloh12:
	adrp	x8, _M_PRISON@GOTPAGE
Lloh13:
	ldr	x8, [x8, _M_PRISON@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	bl	_free
	mov	w20, #0
	str	xzr, [x19, #8]
LBB0_31:
	mov	x0, x20
	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
LBB0_32:
	mov	w20, #1
	b	LBB0_31
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_PR_IP4_USER,4,2                ; @PR_IP4_USER
	.comm	_M_PRISON,4,2                   ; @M_PRISON
	.comm	_M_NOWAIT,4,2                   ; @M_NOWAIT
.subsections_via_symbols
