	.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, -52(%rbp)                 ## 4-byte Spill
	movq	%r8, %r13
	movl	%ecx, %r12d
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movl	24(%rbp), %edx
	movq	16(%rbp), %rdi
	testl	%edx, %edx
	jle	LBB0_5
## %bb.1:
	movl	%edx, %ebx
	cmpl	$1, %edx
	jne	LBB0_11
## %bb.2:
	xorl	%ecx, %ecx
	jmp	LBB0_3
LBB0_11:
	movl	%ebx, %eax
	andl	$-2, %eax
	leaq	24(%rdi), %rsi
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	$0, -16(%rsi)
	movl	$0, -24(%rsi)
	movq	$0, (%rsi)
	movl	$0, -8(%rsi)
	addq	$2, %rcx
	addq	$32, %rsi
	cmpq	%rcx, %rax
	jne	LBB0_12
LBB0_3:
	testb	$1, %bl
	je	LBB0_5
## %bb.4:
	shlq	$4, %rcx
	movq	$0, 8(%rdi,%rcx)
	movl	$0, (%rdi,%rcx)
LBB0_5:
	xorl	%eax, %eax
	testq	%r13, %r13
	je	LBB0_15
## %bb.6:
	movq	32(%rbp), %rbx
	addq	$8, %rdi
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	xorl	%edi, %edi
	movl	%edx, %r14d
	testl	%edx, %edx
	setg	%dil
	callq	_assert
	movq	%rbx, (%rsp)
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movl	%r12d, %ecx
	movl	-52(%rbp), %r8d                 ## 4-byte Reload
	leaq	-44(%rbp), %r9
	callq	_vm_gla2gpa
	testl	%eax, %eax
	jne	LBB0_15
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	cmpl	$0, (%rbx)
	jne	LBB0_14
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	%r12d, %r15d
	movq	_PAGE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-44(%rbp), %eax
	cltq
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	subq	%rax, %rsi
	movq	%r13, %rdi
	callq	_min
	movl	%eax, %r12d
	movl	-44(%rbp), %esi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %edx
	callq	_vm_map_gpa
	testq	%rax, %rax
	je	LBB0_10
## %bb.13:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	%rax, (%rdi)
	movl	%r12d, -8(%rdi)
	movl	%r14d, %edx
	decl	%edx
	addl	%r12d, %r15d
	movslq	%r12d, %rax
	movl	%r15d, %r12d
	addq	$16, %rdi
	subq	%rax, %r13
	jne	LBB0_7
LBB0_14:
	xorl	%eax, %eax
	jmp	LBB0_15
LBB0_10:
	movq	_EFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_15:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_MASK,4,2                  ## @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, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x7
	mov	x20, x5
	mov	x21, x4
	mov	x22, x3
	mov	x23, x2
	mov	x24, x1
	mov	x25, x0
	cmp	w7, #1
	b.lt	LBB0_8
; %bb.1:
	mov	w8, w19
	cmp	w19, #4
	b.hs	LBB0_3
; %bb.2:
	mov	x9, #0
	b	LBB0_6
LBB0_3:
	and	x9, x8, #0xfffffffc
	add	x10, x6, #32
	mov	x11, x9
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	stur	xzr, [x10, #-24]
	stur	xzr, [x10, #-8]
	str	xzr, [x10, #8]
	str	xzr, [x10, #24]
	stur	wzr, [x10, #-32]
	stur	wzr, [x10, #-16]
	str	wzr, [x10]
	str	wzr, [x10, #16]
	add	x10, x10, #64
	subs	x11, x11, #4
	b.ne	LBB0_4
; %bb.5:
	cmp	x9, x8
	b.eq	LBB0_8
LBB0_6:
	add	x10, x6, x9, lsl #4
	add	x10, x10, #8
	sub	x8, x8, x9
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	str	xzr, [x10]
	stur	wzr, [x10, #-8]
	add	x10, x10, #16
	subs	x8, x8, #1
	b.ne	LBB0_7
LBB0_8:
	cbz	x21, LBB0_14
; %bb.9:
	ldr	x26, [x29, #16]
	add	x28, x6, #8
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	cmp	w19, #0
	cset	w0, gt
	bl	_assert
	add	x5, sp, #12
	mov	x0, x25
	mov	x1, x24
	mov	x2, x23
	mov	x3, x22
	mov	x4, x20
	mov	x6, x26
	bl	_vm_gla2gpa
	cbnz	w0, LBB0_15
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w8, [x26]
	cbnz	w8, LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w8, [sp, #12]
Lloh0:
	adrp	x9, _PAGE_MASK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PAGE_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh3:
	adrp	x9, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PAGE_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	sub	x1, x9, w8, sxtw
	mov	x0, x21
	bl	_min
	mov	x27, x0
	ldr	w1, [sp, #12]
	mov	x0, x25
	mov	x2, x27
	bl	_vm_map_gpa
	cbz	x0, LBB0_16
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=1
	str	x0, [x28]
	stur	w27, [x28, #-8]
	sub	w19, w19, #1
	add	w22, w27, w22
	add	x28, x28, #16
	subs	x21, x21, w27, sxtw
	b.ne	LBB0_10
LBB0_14:
	mov	w0, #0
LBB0_15:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_16:
Lloh6:
	adrp	x8, _EFAULT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_MASK,4,2                  ; @PAGE_MASK
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.comm	_EFAULT,4,2                     ; @EFAULT
.subsections_via_symbols
