	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pt_copy_on_write               ## -- Begin function pt_copy_on_write
	.p2align	4, 0x90
_pt_copy_on_write:                      ## @pt_copy_on_write
	.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	%rsi, %r15
	movq	%rdi, %r13
	movq	%rdx, -48(%rbp)
	testq	%rcx, %rcx
	jle	LBB0_8
## %bb.1:
	movq	%rcx, %r14
	addq	%rdx, %r14
	leaq	-48(%rbp), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_P_COMPILED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	movl	%ecx, (%rbx)
	movq	8(%rbx), %rax
	incl	(%rax)
	movq	-48(%rbp), %rsi
	movq	%r15, %rdi
	callq	_mem_pt_new
	movq	8(%rbx), %rcx
	movq	%rcx, 8(%rax)
	movl	4(%rbx), %ecx
	movl	%ecx, 4(%rax)
	movl	(%rbx), %ecx
	movl	%ecx, (%rax)
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_mem_next_page
	movq	-48(%rbp), %rdx
	cmpq	%r14, %rdx
	jge	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movq	%rdx, %rsi
	callq	_mem_pt
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %rbx
	movq	-48(%rbp), %rsi
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_pt_unmap_always
	testq	%rax, %rax
	js	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rbx), %eax
	movq	_P_SHARED@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_P_COW@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%rbx)
	jmp	LBB0_6
LBB0_8:
	movq	%r13, %rdi
	callq	_mem_changed
	movq	%r15, %rdi
	callq	_mem_changed
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_10:
	movl	$-1, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_P_SHARED,4,2                   ## @P_SHARED
	.comm	_P_COW,4,2                      ## @P_COW
	.comm	_P_COMPILED,4,2                 ## @P_COMPILED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pt_copy_on_write               ; -- Begin function pt_copy_on_write
	.p2align	2
_pt_copy_on_write:                      ; @pt_copy_on_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x1
	mov	x20, x0
	str	x2, [sp, #8]
	cmp	x3, #1
	b.lt	LBB0_8
; %bb.1:
	add	x22, x3, x2
Lloh0:
	adrp	x23, _P_SHARED@GOTPAGE
Lloh1:
	ldr	x23, [x23, _P_SHARED@GOTPAGEOFF]
Lloh2:
	adrp	x24, _P_COW@GOTPAGE
Lloh3:
	ldr	x24, [x24, _P_COW@GOTPAGEOFF]
Lloh4:
	adrp	x25, _P_COMPILED@GOTPAGE
Lloh5:
	ldr	x25, [x25, _P_COMPILED@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x25]
	bic	w8, w8, w9
	str	w8, [x21]
	ldr	x8, [x21, #8]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	ldr	x1, [sp, #8]
	mov	x0, x19
	bl	_mem_pt_new
	ldr	x8, [x21, #8]
	str	x8, [x0, #8]
	ldr	d0, [x21]
	str	d0, [x0]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x1, sp, #8
	mov	x0, x20
	bl	_mem_next_page
	ldr	x2, [sp, #8]
	cmp	x2, x22
	b.ge	LBB0_8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x2
	bl	_mem_pt
	cbz	x0, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x21, x0
	ldr	x1, [sp, #8]
	mov	x0, x19
	mov	w2, #1
	bl	_pt_unmap_always
	tbnz	x0, #63, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x21]
	ldr	w9, [x23]
	tst	w9, w8
	b.ne	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x24]
	orr	w8, w9, w8
	str	w8, [x21]
	b	LBB0_2
LBB0_8:
	mov	x0, x20
	bl	_mem_changed
	mov	x0, x19
	bl	_mem_changed
	mov	w0, #0
	b	LBB0_10
LBB0_9:
	mov	w0, #-1
LBB0_10:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_P_SHARED,4,2                   ; @P_SHARED
	.comm	_P_COW,4,2                      ; @P_COW
	.comm	_P_COMPILED,4,2                 ; @P_COMPILED
.subsections_via_symbols
