	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_prison_restrict_ip6            ## -- Begin function prison_restrict_ip6
	.p2align	4, 0x90
_prison_restrict_ip6:                   ## @prison_restrict_ip6
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r8
	movq	16(%rdi), %r12
	movq	_PR_IP6_USER@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	4(%rdi), %eax
	testl	%ecx, (%rdi)
	je	LBB0_6
## %bb.1:
	testl	%eax, %eax
	jle	LBB0_11
## %bb.2:
	movl	4(%r12), %eax
	testl	%eax, %eax
	jle	LBB0_14
## %bb.3:
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r8, %r15
	movq	8(%r8), %rdi
	movq	8(%r12), %rsi
	addq	%rbx, %rsi
	callq	_IN6_ARE_ADDR_EQUAL
	testq	%rax, %rax
	jne	LBB0_15
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	incq	%r14
	movslq	4(%r12), %rax
	addq	$4, %rbx
	cmpq	%rax, %r14
	movq	%r15, %r8
	jl	LBB0_4
	jmp	LBB0_16
LBB0_6:
	movl	4(%r12), %edx
	cmpl	%edx, %eax
	jge	LBB0_12
## %bb.7:
	movq	%rsi, %r15
	movq	%r8, %rbx
	movl	$1, %r14d
	testq	%rsi, %rsi
	jne	LBB0_10
## %bb.8:
	shll	$2, %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_38
## %bb.9:
	movq	%rax, %r15
	movl	4(%r12), %edx
	xorl	%r14d, %r14d
LBB0_10:
	movq	8(%r12), %rsi
	shll	$2, %edx
	movq	%r15, %rdi
	callq	_memmove
	movq	8(%rbx), %rdi
	movq	_M_PRISON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_free
	movq	%r15, 8(%rbx)
	movl	4(%r12), %eax
	movl	%eax, 4(%rbx)
	jmp	LBB0_37
LBB0_11:
	xorl	%r14d, %r14d
	jmp	LBB0_37
LBB0_12:
	movl	%edx, 4(%r8)
	testl	%edx, %edx
	jle	LBB0_35
## %bb.13:
	movq	8(%r12), %rsi
	movq	8(%r8), %rdi
	shll	$2, %edx
	callq	_memmove
	xorl	%r14d, %r14d
	jmp	LBB0_37
LBB0_14:
	xorl	%r14d, %r14d
	jmp	LBB0_16
LBB0_15:
	movl	4(%r12), %eax
	movq	%r15, %r8
LBB0_16:
	movl	$1, %r15d
	cmpl	%eax, %r14d
	jl	LBB0_18
## %bb.17:
	movq	8(%r8), %rdi
	leaq	4(%rdi), %rsi
	movl	4(%r8), %eax
	leal	-1(%rax), %ecx
	movl	%ecx, 4(%r8)
	leal	-4(,%rax,4), %edx
	movq	%r8, %rbx
	callq	_memmove
	movq	%rbx, %r8
	xorl	%r15d, %r15d
LBB0_18:
	movl	4(%r8), %eax
	cmpl	%eax, %r15d
	jge	LBB0_33
## %bb.19:
	movl	$1, %r13d
LBB0_20:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_21 Depth 2
	movl	%r13d, -68(%rbp)                ## 4-byte Spill
	movq	%r12, %r13
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	movslq	%r15d, %r12
	leaq	(,%r12,4), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_21:                                ##   Parent Loop BB0_20 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	8(%r8), %rdi
	addq	-64(%rbp), %rdi                 ## 8-byte Folded Reload
	addq	%r14, %rdi
	movq	8(%r13), %rsi
	movq	%r8, %r15
	callq	_IN6_ARE_ADDR_EQUAL
	testq	%rax, %rax
	je	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=2
	movslq	4(%r15), %rax
	addq	$4, %r14
	leaq	(%r12,%rbx), %rcx
	incq	%rcx
	incq	%rbx
	cmpq	%rax, %rcx
	movq	%r15, %r8
	jl	LBB0_21
	jmp	LBB0_33
LBB0_23:                                ##   in Loop: Header=BB0_20 Depth=1
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	movl	%r15d, %eax
	addq	%rbx, %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, %r12
	movl	-68(%rbp), %r13d                ## 4-byte Reload
	cmpl	4(%r12), %r13d
	jge	LBB0_29
## %bb.24:                              ##   in Loop: Header=BB0_20 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rdi
	addq	-64(%rbp), %rdi                 ## 8-byte Folded Reload
	addq	%r14, %rdi
	movslq	%r13d, %rsi
	shlq	$2, %rsi
	addq	8(%r12), %rsi
	callq	_prison_qcmp_v6
	cmpl	$-1, %eax
	je	LBB0_29
## %bb.25:                              ##   in Loop: Header=BB0_20 Depth=1
	testl	%eax, %eax
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	je	LBB0_32
## %bb.26:                              ##   in Loop: Header=BB0_20 Depth=1
	cmpl	$1, %eax
	jne	LBB0_30
## %bb.27:                              ##   in Loop: Header=BB0_20 Depth=1
	incl	%r13d
	jmp	LBB0_30
LBB0_29:                                ##   in Loop: Header=BB0_20 Depth=1
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movl	4(%r14), %eax
	leal	-1(%rax), %ecx
	movl	%ecx, 4(%r14)
	notl	%r15d
	addl	%eax, %r15d
	subl	%ebx, %r15d
	shll	$2, %r15d
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	addq	8(%r14), %rax
	leaq	(%rax,%rbx,4), %rdi
	leaq	(%rax,%rbx,4), %rsi
	addq	$4, %rsi
	movq	%r15, %rdx
	callq	_memmove
	movq	%r14, %r8
LBB0_30:                                ##   in Loop: Header=BB0_20 Depth=1
	movq	-48(%rbp), %r15                 ## 8-byte Reload
                                        ## kill: def $r15d killed $r15d killed $r15 def $r15
LBB0_31:                                ##   in Loop: Header=BB0_20 Depth=1
	movl	4(%r8), %eax
	cmpl	%eax, %r15d
	jl	LBB0_20
	jmp	LBB0_33
LBB0_32:                                ##   in Loop: Header=BB0_20 Depth=1
	addl	%ebx, %r15d
	incl	%r15d
	incl	%r13d
	jmp	LBB0_31
LBB0_33:
	xorl	%r14d, %r14d
	testl	%eax, %eax
	jne	LBB0_37
## %bb.34:
	movq	8(%r8), %rdi
	jmp	LBB0_36
LBB0_35:
	movq	8(%r8), %rdi
	xorl	%r14d, %r14d
	testq	%rdi, %rdi
	je	LBB0_37
LBB0_36:
	movq	_M_PRISON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r8, %rbx
	callq	_free
	movq	$0, 8(%rbx)
LBB0_37:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_38:
	movl	$1, %r14d
	jmp	LBB0_37
	.cfi_endproc
                                        ## -- End function
	.comm	_PR_IP6_USER,4,2                ## @PR_IP6_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_ip6            ; -- Begin function prison_restrict_ip6
	.p2align	2
_prison_restrict_ip6:                   ; @prison_restrict_ip6
	.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_IP6_USER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PR_IP6_USER@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldp	w10, w9, [x0]
	tst	w8, w10
	b.eq	LBB0_8
; %bb.1:
	cmp	w9, #1
	b.lt	LBB0_26
; %bb.2:
	ldr	w8, [x22, #4]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.3:
	mov	x21, #0
	mov	x20, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19, #8]
	ldr	x8, [x22, #8]
	add	x1, x8, x21
	bl	_IN6_ARE_ADDR_EQUAL
	cbnz	x0, LBB0_28
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x20, x20, #1
	ldrsw	x8, [x22, #4]
	add	x21, x21, #4
	cmp	x20, x8
	b.lt	LBB0_4
; %bb.6:
	cmp	w20, w8
	b.ge	LBB0_14
LBB0_7:
	mov	w25, #1
	b	LBB0_15
LBB0_8:
	ldr	w8, [x22, #4]
	cmp	w9, w8
	b.ge	LBB0_11
; %bb.9:
	mov	x21, x1
	cbz	x1, LBB0_29
; %bb.10:
	mov	w20, #1
	b	LBB0_31
LBB0_11:
	str	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_32
; %bb.12:
	ldr	x1, [x22, #8]
	ldr	x0, [x19, #8]
	lsl	w2, w8, #2
	bl	_memmove
	mov	w20, #0
	b	LBB0_34
LBB0_13:
	mov	w20, #0
	cmp	w20, w8
	b.lt	LBB0_7
LBB0_14:
	ldr	x0, [x19, #8]
	add	x1, x0, #4
	ldr	w8, [x19, #4]
	sub	w8, w8, #1
	str	w8, [x19, #4]
	lsl	w2, w8, #2
	bl	_memmove
	mov	w25, #0
LBB0_15:
	ldr	w8, [x19, #4]
	cmp	w25, w8
	b.ge	LBB0_25
; %bb.16:
	mov	w20, #1
LBB0_17:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_18 Depth 2
	mov	x21, #0
	sxtw	x23, w25
	sbfiz	x24, x25, #2, #32
LBB0_18:                                ;   Parent Loop BB0_17 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x19, #8]
	add	x0, x8, x24
	ldr	x1, [x22, #8]
	bl	_IN6_ARE_ADDR_EQUAL
	cbz	x0, LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=2
	ldrsw	x8, [x19, #4]
	add	x21, x21, #1
	add	x24, x24, #4
	add	x9, x23, x21
	cmp	x9, x8
	b.lt	LBB0_18
	b	LBB0_25
LBB0_20:                                ;   in Loop: Header=BB0_17 Depth=1
	add	x25, x21, w23, uxtw
	ldr	w8, [x22, #4]
	cmp	w20, w8
	b.ge	LBB0_23
; %bb.21:                               ;   in Loop: Header=BB0_17 Depth=1
	ldr	x8, [x19, #8]
	add	x0, x8, x24
	ldr	x8, [x22, #8]
	add	x1, x8, w20, sxtw #2
	bl	_prison_qcmp_v6
	cmn	w0, #1
	b.eq	LBB0_23
; %bb.22:                               ;   in Loop: Header=BB0_17 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_24
LBB0_23:                                ;   in Loop: Header=BB0_17 Depth=1
	ldr	x8, [x19, #8]
	ldr	w9, [x19, #4]
	sub	w10, w9, #1
	str	w10, [x19, #4]
	mvn	w10, w23
	add	w9, w10, w9
	sub	w9, w9, w21
	lsl	w2, w9, #2
	add	x0, x8, x24
	add	x1, x0, #4
	bl	_memmove
                                        ; kill: def $w25 killed $w25 killed $x25 def $x25
LBB0_24:                                ;   in Loop: Header=BB0_17 Depth=1
	ldr	w8, [x19, #4]
	cmp	w25, w8
	b.lt	LBB0_17
LBB0_25:
	cbz	w8, LBB0_27
LBB0_26:
	mov	w20, #0
	b	LBB0_34
LBB0_27:
	ldr	x0, [x19, #8]
	b	LBB0_33
LBB0_28:
	ldr	w8, [x22, #4]
	cmp	w20, w8
	b.lt	LBB0_7
	b	LBB0_14
LBB0_29:
	lsl	w0, w8, #2
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_35
; %bb.30:
	mov	x21, x0
	mov	w20, #0
	ldr	w8, [x22, #4]
LBB0_31:
	ldr	x1, [x22, #8]
	lsl	w2, w8, #2
	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_34
LBB0_32:
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_26
LBB0_33:
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_34:
	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_35:
	mov	w20, #1
	b	LBB0_34
	.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_IP6_USER,4,2                ; @PR_IP6_USER
	.comm	_M_PRISON,4,2                   ; @M_PRISON
	.comm	_M_NOWAIT,4,2                   ; @M_NOWAIT
.subsections_via_symbols
