	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Com_InitZoneMemory             ## -- Begin function Com_InitZoneMemory
	.p2align	4, 0x90
_Com_InitZoneMemory:                    ## @Com_InitZoneMemory
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_DEF_COMZONEMEGS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CVAR_LATCH@GOTPCREL(%rip), %rax
	movq	_CVAR_ARCHIVE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	leaq	L_.str(%rip), %rdi
	callq	_Cvar_Get
	movl	(%rax), %eax
	movl	%eax, %ecx
	shll	$20, %ecx
	cmpl	$20, %eax
	movl	$16777216, %edi                 ## imm = 0x1000000
	cmovgel	%ecx, %edi
	movq	_s_zoneTotal@GOTPCREL(%rip), %rbx
	movl	%edi, (%rbx)
	movl	$1, %esi
	callq	_calloc
	movq	_mainzone@GOTPCREL(%rip), %r14
	movl	%eax, (%r14)
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	_ERR_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %eax
	leal	1048575(%rax), %edx
	testl	%eax, %eax
	cmovnsl	%eax, %edx
	sarl	$20, %edx
	leaq	L_.str.1(%rip), %rsi
	callq	_Com_Error
	movl	(%r14), %eax
LBB0_2:
	movl	(%rbx), %esi
	movl	%eax, %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_Z_ClearZone                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"com_zoneMegs"

	.comm	_DEF_COMZONEMEGS,4,2            ## @DEF_COMZONEMEGS
	.comm	_CVAR_LATCH,4,2                 ## @CVAR_LATCH
	.comm	_CVAR_ARCHIVE,4,2               ## @CVAR_ARCHIVE
	.comm	_s_zoneTotal,4,2                ## @s_zoneTotal
	.comm	_mainzone,4,2                   ## @mainzone
	.comm	_ERR_FATAL,4,2                  ## @ERR_FATAL
L_.str.1:                               ## @.str.1
	.asciz	"Zone data failed to allocate %i megs"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Com_InitZoneMemory             ; -- Begin function Com_InitZoneMemory
	.p2align	2
_Com_InitZoneMemory:                    ; @Com_InitZoneMemory
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _DEF_COMZONEMEGS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DEF_COMZONEMEGS@GOTPAGEOFF]
Lloh2:
	adrp	x9, _CVAR_LATCH@GOTPAGE
Lloh3:
	ldr	x9, [x9, _CVAR_LATCH@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	ldr	w8, [x9]
Lloh6:
	adrp	x9, _CVAR_ARCHIVE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CVAR_ARCHIVE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w2, w9, w8
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Cvar_Get
	ldr	w8, [x0]
	lsl	w9, w8, #20
	mov	w10, #16777216
	cmp	w8, #20
	csel	w0, w10, w9, lt
Lloh11:
	adrp	x19, _s_zoneTotal@GOTPAGE
Lloh12:
	ldr	x19, [x19, _s_zoneTotal@GOTPAGEOFF]
	str	w0, [x19]
	mov	w1, #1
	bl	_calloc
Lloh13:
	adrp	x20, _mainzone@GOTPAGE
Lloh14:
	ldr	x20, [x20, _mainzone@GOTPAGEOFF]
	str	w0, [x20]
	cbnz	w0, LBB0_2
; %bb.1:
Lloh15:
	adrp	x8, _ERR_FATAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ERR_FATAL@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	ldr	w8, [x19]
	mov	w9, #1048575
	add	w9, w8, w9
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w2, w8, #20
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_Com_Error
	ldr	w0, [x20]
LBB0_2:
	ldr	w1, [x19]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_Z_ClearZone
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"com_zoneMegs"

	.comm	_DEF_COMZONEMEGS,4,2            ; @DEF_COMZONEMEGS
	.comm	_CVAR_LATCH,4,2                 ; @CVAR_LATCH
	.comm	_CVAR_ARCHIVE,4,2               ; @CVAR_ARCHIVE
	.comm	_s_zoneTotal,4,2                ; @s_zoneTotal
	.comm	_mainzone,4,2                   ; @mainzone
	.comm	_ERR_FATAL,4,2                  ; @ERR_FATAL
l_.str.1:                               ; @.str.1
	.asciz	"Zone data failed to allocate %i megs"

.subsections_via_symbols
