	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmap_copy                      ## -- Begin function pmap_copy
	.p2align	4, 0x90
_pmap_copy:                             ## @pmap_copy
	.cfi_startproc
## %bb.0:
	cmpq	%r8, %rdx
	jne	LBB0_9
## %bb.1:
	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	%rcx, %r13
	movq	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	_tte_list_global_lock@GOTPCREL(%rip), %rdi
	callq	_rw_wlock
	cmpq	%r15, %r14
	movq	%r15, %rdi
	cmovlq	%r14, %rdi
	movq	%r15, %rbx
	cmovgq	%r14, %rbx
	callq	_PMAP_LOCK
	movq	%rbx, %rdi
	callq	_PMAP_LOCK
	movq	_PMAP_TSB_THRESH@GOTPCREL(%rip), %rax
	movq	%r12, %rdx
	addq	%r13, %r12
	cmpq	%r13, (%rax)
	jge	LBB0_2
## %bb.10:
	movq	_pmap_copy_tte@GOTPCREL(%rip), %r8
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%r12, %rcx
	callq	_tsb_foreach
	movq	%r14, %rdi
	callq	_tlb_context_demap
	jmp	LBB0_8
LBB0_9:
	retq
LBB0_2:
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	testq	%r13, %r13
	jle	LBB0_7
## %bb.3:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r13
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	addq	(%r13), %rbx
	cmpq	%r12, %rbx
	jge	LBB0_7
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_tsb_tte_lookup
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%rax, %rdx
	movq	%rbx, %rcx
	callq	_pmap_copy_tte
	jmp	LBB0_6
LBB0_7:
	decq	%r12
	movq	%r14, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%r12, %rdx
	callq	_tlb_range_demap
LBB0_8:
	movq	_tte_list_global_lock@GOTPCREL(%rip), %rdi
	callq	_rw_wunlock
	movq	%r15, %rdi
	callq	_PMAP_UNLOCK
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PMAP_UNLOCK                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_tte_list_global_lock,4,2       ## @tte_list_global_lock
	.comm	_PMAP_TSB_THRESH,8,3            ## @PMAP_TSB_THRESH
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmap_copy                      ; -- Begin function pmap_copy
	.p2align	2
_pmap_copy:                             ; @pmap_copy
	.cfi_startproc
; %bb.0:
	cmp	x2, x4
	b.ne	LBB0_3
; %bb.1:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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_remember_state
	mov	x23, x3
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x0, _tte_list_global_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _tte_list_global_lock@GOTPAGEOFF]
	bl	_rw_wlock
	cmp	x19, x20
	csel	x0, x19, x20, lt
	csel	x22, x19, x20, gt
	bl	_PMAP_LOCK
	mov	x0, x22
	bl	_PMAP_LOCK
Lloh2:
	adrp	x8, _PMAP_TSB_THRESH@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PMAP_TSB_THRESH@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	add	x22, x21, x23
	cmp	x8, x23
	b.ge	LBB0_4
; %bb.2:
Lloh5:
	adrp	x4, _pmap_copy_tte@GOTPAGE
Lloh6:
	ldr	x4, [x4, _pmap_copy_tte@GOTPAGEOFF]
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	mov	x3, x22
	bl	_tsb_foreach
	mov	x0, x19
	bl	_tlb_context_demap
	b	LBB0_10
LBB0_3:
	.cfi_def_cfa wsp, 0
	.cfi_same_value w30
	.cfi_same_value w29
	.cfi_same_value w19
	.cfi_same_value w20
	.cfi_same_value w21
	.cfi_same_value w22
	.cfi_same_value w23
	.cfi_same_value w24
	ret
LBB0_4:
	.cfi_restore_state
	cmp	x23, #1
	b.lt	LBB0_9
; %bb.5:
Lloh7:
	adrp	x24, _PAGE_SIZE@GOTPAGE
Lloh8:
	ldr	x24, [x24, _PAGE_SIZE@GOTPAGEOFF]
	mov	x23, x21
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x24]
	add	x23, x8, x23
	cmp	x23, x22
	b.ge	LBB0_9
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x23
	bl	_tsb_tte_lookup
	cbz	x0, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x2, x0
	mov	x0, x20
	mov	x1, x19
	mov	x3, x23
	bl	_pmap_copy_tte
	b	LBB0_6
LBB0_9:
	sub	x2, x22, #1
	mov	x0, x19
	mov	x1, x21
	bl	_tlb_range_demap
LBB0_10:
Lloh9:
	adrp	x0, _tte_list_global_lock@GOTPAGE
Lloh10:
	ldr	x0, [x0, _tte_list_global_lock@GOTPAGEOFF]
	bl	_rw_wunlock
	mov	x0, x20
	bl	_PMAP_UNLOCK
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_PMAP_UNLOCK
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_tte_list_global_lock,4,2       ; @tte_list_global_lock
	.comm	_PMAP_TSB_THRESH,8,3            ; @PMAP_TSB_THRESH
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
.subsections_via_symbols
