	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vm_copy_setup                  ## -- Begin function vm_copy_setup
	.p2align	4, 0x90
_vm_copy_setup:                         ## @vm_copy_setup
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -48(%rbp)                 ## 4-byte Spill
	movq	%r8, %r14
	movq	%rcx, %r12
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movl	24(%rbp), %esi
	movq	16(%rbp), %rdi
	shll	$5, %esi
	callq	_bzero
	testq	%r14, %r14
	je	LBB0_12
## %bb.1:
	movslq	24(%rbp), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	16(%rbp), %rax
	leaq	8(%rax), %r15
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%edi, %edi
	cmpq	-72(%rbp), %r13                 ## 8-byte Folded Reload
	setl	%dil
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	movq	32(%rbp), %rbx
	movq	%rbx, (%rsp)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	%r12, %rcx
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	leaq	-64(%rbp), %r9
	callq	_vm_gla2gpa
	testl	%eax, %eax
	jne	LBB0_14
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, (%rbx)
	jne	LBB0_13
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_PAGE_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	andq	-64(%rbp), %rax
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	subq	%rax, %rsi
	movq	%r14, %rdi
	callq	_min
	movq	-64(%rbp), %rcx
	movq	%rcx, -8(%r15)
	movq	%rax, (%r15)
	addq	%rax, %r12
	incq	%r13
	addq	$32, %r15
	subq	%rax, %r14
	jne	LBB0_2
## %bb.5:
	testl	%r13d, %r13d
	je	LBB0_6
## %bb.9:
	movq	16(%rbp), %rax
	leaq	24(%rax), %rbx
	movl	%r13d, %r12d
	xorl	%r15d, %r15d
	leaq	-88(%rbp), %r14
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	-24(%rbx), %rdx
	movq	-16(%rbx), %rcx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	movq	%r14, %r9
	callq	_vm_gpa_hold
	testq	%rax, %rax
	je	LBB0_7
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%rax, (%rbx)
	movq	-88(%rbp), %rax
	movq	%rax, -8(%rbx)
	incq	%r15
	addq	$32, %rbx
	cmpq	%r15, %r12
	jne	LBB0_10
	jmp	LBB0_12
LBB0_6:
	xorl	%r13d, %r13d
	xorl	%r15d, %r15d
LBB0_7:
	cmpl	%r13d, %r15d
	jne	LBB0_8
LBB0_12:
	movq	32(%rbp), %rax
	movl	$0, (%rax)
LBB0_13:
	xorl	%eax, %eax
LBB0_14:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movq	16(%rbp), %rdx
	movl	24(%rbp), %ecx
	callq	_vm_copy_teardown
	movq	_EFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"insufficient vm_copyinfo"

	.comm	_PAGE_MASK,8,3                  ## @PAGE_MASK
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.comm	_EFAULT,4,2                     ## @EFAULT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vm_copy_setup                  ; -- Begin function vm_copy_setup
	.p2align	2
_vm_copy_setup:                         ; @vm_copy_setup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x7
	mov	x28, x6
	mov	x24, x5
	mov	x25, x4
	mov	x26, x3
	mov	x27, x2
	mov	x21, x1
	mov	x22, x0
	ldr	x23, [x29, #16]
	lsl	w1, w7, #5
	mov	x0, x6
	bl	_bzero
	cbz	x25, LBB0_12
; %bb.1:
	mov	x19, #0
	stp	x28, x20, [sp]                  ; 16-byte Folded Spill
	sxtw	x20, w20
	add	x28, x28, #8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x19, x20
	cset	w0, lt
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
	add	x5, sp, #16
	mov	x0, x22
	mov	x1, x21
	mov	x2, x27
	mov	x3, x26
	mov	x4, x24
	mov	x6, x23
	bl	_vm_gla2gpa
	cbnz	w0, LBB0_13
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x23]
	cbnz	w8, LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [sp, #16]
Lloh2:
	adrp	x9, _PAGE_MASK@GOTPAGE
Lloh3:
	ldr	x9, [x9, _PAGE_MASK@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	and	x8, x9, x8
Lloh5:
	adrp	x9, _PAGE_SIZE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _PAGE_SIZE@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	sub	x1, x9, x8
	mov	x0, x25
	bl	_min
	ldr	x8, [sp, #16]
	stp	x8, x0, [x28, #-8]
	add	x26, x0, x26
	add	x19, x19, #1
	add	x28, x28, #32
	subs	x25, x25, x0
	b.ne	LBB0_2
; %bb.5:
	cbz	w19, LBB0_10
; %bb.6:
	mov	x20, #0
	ldp	x28, x27, [sp]                  ; 16-byte Folded Reload
	add	x25, x28, #16
	and	x26, x19, #0xffffffff
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x2, x3, [x25, #-16]
	add	x5, sp, #24
	mov	x0, x22
	mov	x1, x21
	mov	x4, x24
	bl	_vm_gpa_hold
	cbz	x0, LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [sp, #24]
	stp	x8, x0, [x25], #32
	add	x20, x20, #1
	cmp	x26, x20
	b.ne	LBB0_7
	b	LBB0_12
LBB0_9:
	mov	w0, #0
	b	LBB0_13
LBB0_10:
	mov	w20, #0
	ldp	x28, x27, [sp]                  ; 16-byte Folded Reload
LBB0_11:
	cmp	w20, w19
	b.ne	LBB0_14
LBB0_12:
	mov	w0, #0
	str	wzr, [x23]
LBB0_13:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_14:
	mov	x0, x22
	mov	x1, x21
	mov	x2, x28
	mov	x3, x27
	bl	_vm_copy_teardown
Lloh8:
	adrp	x8, _EFAULT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	b	LBB0_13
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"insufficient vm_copyinfo"

	.comm	_PAGE_MASK,8,3                  ; @PAGE_MASK
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.comm	_EFAULT,4,2                     ; @EFAULT
.subsections_via_symbols
