	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_VM_Restart                     ## -- Begin function VM_Restart
	.p2align	4, 0x90
_VM_Restart:                            ## @VM_Restart
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	%rsp, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAX_QPATH@GOTPCREL(%rip), %r12
	movl	(%r12), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	cmpq	$0, 24(%r15)
	je	LBB0_2
## %bb.1:
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movq	%rsp, %r13
	movl	(%r12), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	(%r15), %r12
	movl	16(%r15), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_Q_strncpyz
	movq	%r15, %rdi
	callq	_VM_Free
	movq	_VMI_NATIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_VM_Create
	movq	%rax, %r15
	movq	%r13, %rsp
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_16
LBB0_2:
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	callq	_Com_Printf
	movl	16(%r15), %ecx
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_Com_sprintf
	leaq	L_.str.2(%rip), %rdi
	movq	%r14, %rsi
	callq	_Com_Printf
	leaq	-56(%rbp), %rsi
	movq	%r14, %rdi
	callq	_FS_ReadFile
	movq	-56(%rbp), %rax
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movq	_ERR_DROP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_Com_Error
	movq	-56(%rbp), %rax
LBB0_4:
	movl	(%rax), %edi
	callq	_LittleLong
	movq	-56(%rbp), %rcx
	movl	%eax, (%rcx)
	movl	4(%rcx), %edi
	callq	_LittleLong
	movq	-56(%rbp), %rcx
	movl	%eax, 4(%rcx)
	movl	8(%rcx), %edi
	callq	_LittleLong
	movq	-56(%rbp), %rcx
	movl	%eax, 8(%rcx)
	movl	12(%rcx), %edi
	callq	_LittleLong
	movq	-56(%rbp), %rcx
	movl	%eax, 12(%rcx)
	movl	16(%rcx), %edi
	callq	_LittleLong
	movq	-56(%rbp), %rcx
	movl	%eax, 16(%rcx)
	movl	20(%rcx), %edi
	callq	_LittleLong
	movq	-56(%rbp), %rcx
	movl	%eax, 20(%rcx)
	movl	24(%rcx), %edi
	callq	_LittleLong
	movq	-56(%rbp), %rcx
	movl	%eax, 24(%rcx)
	movl	28(%rcx), %edi
	callq	_LittleLong
	movq	-56(%rbp), %rcx
	movl	%eax, 28(%rcx)
	movl	32(%rcx), %edi
	callq	_LittleLong
	movq	-56(%rbp), %rcx
	movl	%eax, 32(%rcx)
	movl	36(%rcx), %edi
	callq	_LittleLong
	movq	-56(%rbp), %rsi
	movl	%eax, 36(%rsi)
	movq	(%rsi), %rax
	movq	_VM_MAGIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.5:
	movl	8(%rsi), %ecx
	testl	%ecx, %ecx
	js	LBB0_9
## %bb.6:
	movl	12(%rsi), %edx
	testl	%edx, %edx
	js	LBB0_9
## %bb.7:
	movl	16(%rsi), %eax
	testl	%eax, %eax
	js	LBB0_9
## %bb.8:
	cmpq	$0, 24(%rsi)
	jg	LBB0_10
LBB0_9:
	movq	%r15, %rdi
	callq	_VM_Free
	movq	_ERR_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_Com_Error
	movq	-56(%rbp), %rax
	movl	8(%rax), %ecx
	movl	12(%rax), %edx
	movl	16(%rax), %eax
LBB0_10:
	addl	%edx, %eax
	addl	%ecx, %eax
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	$1, %edx
	shll	%cl, %edx
	incl	%ecx
	cmpl	%edx, %eax
	jg	LBB0_11
## %bb.12:
	movq	8(%r15), %rdi
	xorl	%esi, %esi
	callq	_Com_Memset
	movq	8(%r15), %rdi
	movq	-56(%rbp), %rax
	movslq	32(%rax), %rcx
	leaq	(%rax,%rcx,4), %rsi
	movl	16(%rax), %edx
	addl	12(%rax), %edx
	callq	_Com_Memcpy
	movq	-56(%rbp), %rdi
	cmpl	$0, 12(%rdi)
	jle	LBB0_15
## %bb.13:
	movq	8(%r15), %rcx
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rcx,%rbx), %edi
	callq	_LittleLong
	movq	8(%r15), %rcx
	movl	%eax, (%rbx,%rcx)
	addq	$4, %rbx
	movq	-56(%rbp), %rdi
	cmpl	%ebx, 12(%rdi)
	jg	LBB0_14
LBB0_15:
	callq	_FS_FreeFile
LBB0_16:
	movq	%r13, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_18
## %bb.17:
	movq	%r15, %rax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_QPATH,4,2                  ## @MAX_QPATH
	.comm	_VMI_NATIVE,4,2                 ## @VMI_NATIVE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"VM_Restart()\n"

L_.str.1:                               ## @.str.1
	.asciz	"vm/%s.qvm"

L_.str.2:                               ## @.str.2
	.asciz	"Loading vm file %s.\n"

	.comm	_ERR_DROP,4,2                   ## @ERR_DROP
L_.str.3:                               ## @.str.3
	.asciz	"VM_Restart failed.\n"

	.comm	_VM_MAGIC,8,3                   ## @VM_MAGIC
	.comm	_ERR_FATAL,4,2                  ## @ERR_FATAL
L_.str.4:                               ## @.str.4
	.asciz	"%s has bad header"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_VM_Restart                     ; -- Begin function VM_Restart
	.p2align	2
_VM_Restart:                            ; @VM_Restart
	.cfi_startproc
; %bb.0:
	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
	sub	sp, sp, #16
	mov	x19, x0
	mov	x22, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x8, _MAX_QPATH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_QPATH@GOTPAGEOFF]
	ldr	w21, [x8]
	mov	x9, x21
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x21, #15
	and	x10, x10, #0x1fffffff0
	sub	x20, x9, x10
	mov	sp, x20
	ldr	x9, [x0, #24]
	cbz	x9, LBB0_2
; %bb.1:
	mov	x23, sp
	ldr	w2, [x8]
	mov	x9, x2
Lloh7:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh8:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x2, #15
	and	x9, x9, #0x1fffffff0
	sub	x20, x8, x9
	mov	sp, x20
	ldr	x21, [x19]
	ldr	w1, [x19, #16]
	mov	x0, x20
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_Q_strncpyz
	mov	x0, x19
	bl	_VM_Free
Lloh9:
	adrp	x8, _VMI_NATIVE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _VMI_NATIVE@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x21
	bl	_VM_Create
	mov	x19, x0
	mov	sp, x23
	b	LBB0_16
LBB0_2:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_Com_Printf
	ldr	w3, [x19, #16]
Lloh14:
	adrp	x2, l_.str.1@PAGE
Lloh15:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x1, x21
	bl	_Com_sprintf
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x20
	bl	_Com_Printf
	sub	x1, x29, #64
	mov	x0, x20
	bl	_FS_ReadFile
	ldur	x8, [x29, #-64]
	cbnz	x8, LBB0_4
; %bb.3:
Lloh18:
	adrp	x8, _ERR_DROP@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ERR_DROP@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
Lloh21:
	adrp	x1, l_.str.3@PAGE
Lloh22:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_Com_Error
	ldur	x8, [x29, #-64]
LBB0_4:
	ldr	w0, [x8]
	bl	_LittleLong
	ldur	x8, [x29, #-64]
	str	w0, [x8]
	ldr	w0, [x8, #4]
	bl	_LittleLong
	ldur	x8, [x29, #-64]
	str	w0, [x8, #4]
	ldr	w0, [x8, #8]
	bl	_LittleLong
	ldur	x8, [x29, #-64]
	str	w0, [x8, #8]
	ldr	w0, [x8, #12]
	bl	_LittleLong
	ldur	x8, [x29, #-64]
	str	w0, [x8, #12]
	ldr	w0, [x8, #16]
	bl	_LittleLong
	ldur	x8, [x29, #-64]
	str	w0, [x8, #16]
	ldr	w0, [x8, #20]
	bl	_LittleLong
	ldur	x8, [x29, #-64]
	str	w0, [x8, #20]
	ldr	w0, [x8, #24]
	bl	_LittleLong
	ldur	x8, [x29, #-64]
	str	w0, [x8, #24]
	ldr	w0, [x8, #28]
	bl	_LittleLong
	ldur	x8, [x29, #-64]
	str	w0, [x8, #28]
	ldr	w0, [x8, #32]
	bl	_LittleLong
	ldur	x8, [x29, #-64]
	str	w0, [x8, #32]
	ldr	w0, [x8, #36]
	bl	_LittleLong
	ldur	x11, [x29, #-64]
	str	w0, [x11, #36]
	ldr	x8, [x11]
Lloh23:
	adrp	x9, _VM_MAGIC@GOTPAGE
Lloh24:
	ldr	x9, [x9, _VM_MAGIC@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.5:
	ldr	w8, [x11, #8]
	tbnz	w8, #31, LBB0_9
; %bb.6:
	ldr	w9, [x11, #12]
	tbnz	w9, #31, LBB0_9
; %bb.7:
	ldr	w10, [x11, #16]
	tbnz	w10, #31, LBB0_9
; %bb.8:
	ldr	x11, [x11, #24]
	cmp	x11, #0
	b.gt	LBB0_10
LBB0_9:
	mov	x0, x19
	bl	_VM_Free
Lloh26:
	adrp	x8, _ERR_FATAL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ERR_FATAL@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	str	x20, [sp, #-16]!
Lloh29:
	adrp	x1, l_.str.4@PAGE
Lloh30:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_Com_Error
	add	sp, sp, #16
	ldur	x8, [x29, #-64]
	ldp	w9, w10, [x8, #12]
	ldr	w8, [x8, #8]
LBB0_10:
	mov	w11, #0
	add	w9, w10, w9
	add	w8, w9, w8
	mov	w9, #1
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	lsl	w2, w9, w11
	add	w11, w11, #1
	cmp	w8, w2
	b.gt	LBB0_11
; %bb.12:
	ldr	x0, [x19, #8]
	mov	w1, #0
	bl	_Com_Memset
	ldr	x0, [x19, #8]
	ldur	x8, [x29, #-64]
	ldrsw	x9, [x8, #32]
	add	x1, x8, x9, lsl #2
	ldp	w9, w8, [x8, #12]
	add	w2, w8, w9
	bl	_Com_Memcpy
	ldur	x0, [x29, #-64]
	ldr	w8, [x0, #12]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.13:
	mov	x20, #0
	ldr	x8, [x19, #8]
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x8, x20]
	bl	_LittleLong
	ldr	x8, [x19, #8]
	str	w0, [x20, x8]
	add	x20, x20, #4
	ldur	x0, [x29, #-64]
	ldr	w9, [x0, #12]
	cmp	w9, w20
	b.gt	LBB0_14
LBB0_15:
	bl	_FS_FreeFile
LBB0_16:
	mov	sp, x22
	ldur	x8, [x29, #-56]
Lloh31:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh32:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh33:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.17:
	mov	x0, x19
	sub	sp, x29, #48
	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
	ret
LBB0_18:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_QPATH,4,2                  ; @MAX_QPATH
	.comm	_VMI_NATIVE,4,2                 ; @VMI_NATIVE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"VM_Restart()\n"

l_.str.1:                               ; @.str.1
	.asciz	"vm/%s.qvm"

l_.str.2:                               ; @.str.2
	.asciz	"Loading vm file %s.\n"

	.comm	_ERR_DROP,4,2                   ; @ERR_DROP
l_.str.3:                               ; @.str.3
	.asciz	"VM_Restart failed.\n"

	.comm	_VM_MAGIC,8,3                   ; @VM_MAGIC
	.comm	_ERR_FATAL,4,2                  ; @ERR_FATAL
l_.str.4:                               ; @.str.4
	.asciz	"%s has bad header"

.subsections_via_symbols
