	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Com_InitHunkMemory             ## -- Begin function Com_InitHunkMemory
	.p2align	4, 0x90
_Com_InitHunkMemory:                    ## @Com_InitHunkMemory
	.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
	xorl	%eax, %eax
	callq	_FS_LoadStack
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_ERR_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_Com_Error
LBB0_2:
	movq	_DEF_COMHUNKMEGS@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.1(%rip), %rdi
	callq	_Cvar_Get
	movq	_com_dedicated@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	testq	%rcx, %rcx
	je	LBB0_5
## %bb.3:
	cmpq	$0, (%rcx)
	je	LBB0_5
## %bb.4:
	leaq	L_.str.2(%rip), %rdi
	movq	_MIN_DEDICATED_COMHUNKMEGS@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
LBB0_5:
	leaq	L_.str.3(%rip), %rdi
	movq	_MIN_COMHUNKMEGS@GOTPCREL(%rip), %rcx
LBB0_6:
	movl	(%rcx), %edx
	movl	(%rax), %ebx
	cmpl	%edx, %ebx
	jge	LBB0_8
## %bb.7:
	movl	%edx, %eax
	shll	$20, %eax
	movq	_s_hunkTotal@GOTPCREL(%rip), %rbx
	movl	%eax, (%rbx)
	movl	%edx, %esi
	callq	_Com_Printf
	movl	(%rbx), %ebx
	jmp	LBB0_9
LBB0_8:
	shll	$20, %ebx
	movq	_s_hunkTotal@GOTPCREL(%rip), %rax
	movl	%ebx, (%rax)
LBB0_9:
	leal	31(%rbx), %edi
	movl	$1, %esi
	callq	_calloc
	movq	_s_hunkData@GOTPCREL(%rip), %r14
	movq	%rax, (%r14)
	testq	%rax, %rax
	jne	LBB0_11
## %bb.10:
	movq	_ERR_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leal	1048575(%rbx), %edx
	testl	%ebx, %ebx
	cmovnsl	%ebx, %edx
	sarl	$20, %edx
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_Com_Error
	movq	(%r14), %rax
LBB0_11:
	addl	$31, %eax
	cltq
	andq	$-32, %rax
	movq	%rax, (%r14)
	xorl	%eax, %eax
	callq	_Hunk_Clear
	movq	_Com_Meminfo_f@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.5(%rip), %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_Cmd_AddCommand                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ERR_FATAL,4,2                  ## @ERR_FATAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Hunk initialization failed. File system load stack not zero"

L_.str.1:                               ## @.str.1
	.asciz	"com_hunkMegs"

	.comm	_DEF_COMHUNKMEGS,4,2            ## @DEF_COMHUNKMEGS
	.comm	_CVAR_LATCH,4,2                 ## @CVAR_LATCH
	.comm	_CVAR_ARCHIVE,4,2               ## @CVAR_ARCHIVE
	.comm	_com_dedicated,8,3              ## @com_dedicated
	.comm	_MIN_DEDICATED_COMHUNKMEGS,4,2  ## @MIN_DEDICATED_COMHUNKMEGS
L_.str.2:                               ## @.str.2
	.asciz	"Minimum com_hunkMegs for a dedicated server is %i, allocating %i megs.\n"

	.comm	_MIN_COMHUNKMEGS,4,2            ## @MIN_COMHUNKMEGS
L_.str.3:                               ## @.str.3
	.asciz	"Minimum com_hunkMegs is %i, allocating %i megs.\n"

	.comm	_s_hunkTotal,4,2                ## @s_hunkTotal
	.comm	_s_hunkData,8,3                 ## @s_hunkData
L_.str.4:                               ## @.str.4
	.asciz	"Hunk data failed to allocate %i megs"

L_.str.5:                               ## @.str.5
	.asciz	"meminfo"

	.comm	_Com_Meminfo_f,4,2              ## @Com_Meminfo_f
	.comm	_Hunk_Log,4,2                   ## @Hunk_Log
	.comm	_Hunk_SmallLog,4,2              ## @Hunk_SmallLog
	.comm	_Z_LogHeap,4,2                  ## @Z_LogHeap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Com_InitHunkMemory             ; -- Begin function Com_InitHunkMemory
	.p2align	2
_Com_InitHunkMemory:                    ; @Com_InitHunkMemory
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	bl	_FS_LoadStack
Lloh0:
	adrp	x19, _ERR_FATAL@GOTPAGE
Lloh1:
	ldr	x19, [x19, _ERR_FATAL@GOTPAGEOFF]
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w0, [x19]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_Com_Error
LBB0_2:
Lloh4:
	adrp	x8, _DEF_COMHUNKMEGS@GOTPAGE
Lloh5:
	ldr	x8, [x8, _DEF_COMHUNKMEGS@GOTPAGEOFF]
Lloh6:
	adrp	x9, _CVAR_LATCH@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CVAR_LATCH@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	ldr	w8, [x9]
Lloh10:
	adrp	x9, _CVAR_ARCHIVE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _CVAR_ARCHIVE@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w2, w9, w8
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_Cvar_Get
Lloh15:
	adrp	x8, _com_dedicated@GOTPAGE
Lloh16:
	ldr	x8, [x8, _com_dedicated@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.3:
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.4:
Lloh18:
	adrp	x8, l_.str.2@PAGE
Lloh19:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh20:
	adrp	x9, _MIN_DEDICATED_COMHUNKMEGS@GOTPAGE
Lloh21:
	ldr	x9, [x9, _MIN_DEDICATED_COMHUNKMEGS@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh22:
	adrp	x8, l_.str.3@PAGE
Lloh23:
	add	x8, x8, l_.str.3@PAGEOFF
Lloh24:
	adrp	x9, _MIN_COMHUNKMEGS@GOTPAGE
Lloh25:
	ldr	x9, [x9, _MIN_COMHUNKMEGS@GOTPAGEOFF]
LBB0_6:
	ldr	w1, [x9]
	ldr	w9, [x0]
	cmp	w9, w1
	b.ge	LBB0_8
; %bb.7:
	lsl	w9, w1, #20
Lloh26:
	adrp	x20, _s_hunkTotal@GOTPAGE
Lloh27:
	ldr	x20, [x20, _s_hunkTotal@GOTPAGEOFF]
	str	w9, [x20]
	mov	x0, x8
	mov	x2, x1
	bl	_Com_Printf
	ldr	w21, [x20]
	b	LBB0_9
LBB0_8:
	lsl	w21, w9, #20
Lloh28:
	adrp	x8, _s_hunkTotal@GOTPAGE
Lloh29:
	ldr	x8, [x8, _s_hunkTotal@GOTPAGEOFF]
Lloh30:
	str	w21, [x8]
LBB0_9:
	add	w0, w21, #31
	mov	w1, #1
	bl	_calloc
Lloh31:
	adrp	x20, _s_hunkData@GOTPAGE
Lloh32:
	ldr	x20, [x20, _s_hunkData@GOTPAGEOFF]
	str	x0, [x20]
	cbnz	x0, LBB0_11
; %bb.10:
	ldr	w0, [x19]
	mov	w8, #1048575
	add	w8, w21, w8
	cmp	w21, #0
	csel	w8, w8, w21, lt
	asr	w8, w8, #20
	str	x8, [sp]
Lloh33:
	adrp	x1, l_.str.4@PAGE
Lloh34:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_Com_Error
	ldr	x0, [x20]
LBB0_11:
	add	w8, w0, #31
	sxtw	x8, w8
	and	x8, x8, #0xffffffffffffffe0
	str	x8, [x20]
	bl	_Hunk_Clear
Lloh35:
	adrp	x8, _Com_Meminfo_f@GOTPAGE
Lloh36:
	ldr	x8, [x8, _Com_Meminfo_f@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
Lloh38:
	adrp	x0, l_.str.5@PAGE
Lloh39:
	add	x0, x0, l_.str.5@PAGEOFF
	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
	add	sp, sp, #64
	b	_Cmd_AddCommand
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh8
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotStr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_ERR_FATAL,4,2                  ; @ERR_FATAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Hunk initialization failed. File system load stack not zero"

l_.str.1:                               ; @.str.1
	.asciz	"com_hunkMegs"

	.comm	_DEF_COMHUNKMEGS,4,2            ; @DEF_COMHUNKMEGS
	.comm	_CVAR_LATCH,4,2                 ; @CVAR_LATCH
	.comm	_CVAR_ARCHIVE,4,2               ; @CVAR_ARCHIVE
	.comm	_com_dedicated,8,3              ; @com_dedicated
	.comm	_MIN_DEDICATED_COMHUNKMEGS,4,2  ; @MIN_DEDICATED_COMHUNKMEGS
l_.str.2:                               ; @.str.2
	.asciz	"Minimum com_hunkMegs for a dedicated server is %i, allocating %i megs.\n"

	.comm	_MIN_COMHUNKMEGS,4,2            ; @MIN_COMHUNKMEGS
l_.str.3:                               ; @.str.3
	.asciz	"Minimum com_hunkMegs is %i, allocating %i megs.\n"

	.comm	_s_hunkTotal,4,2                ; @s_hunkTotal
	.comm	_s_hunkData,8,3                 ; @s_hunkData
l_.str.4:                               ; @.str.4
	.asciz	"Hunk data failed to allocate %i megs"

l_.str.5:                               ; @.str.5
	.asciz	"meminfo"

	.comm	_Com_Meminfo_f,4,2              ; @Com_Meminfo_f
	.comm	_Hunk_Log,4,2                   ; @Hunk_Log
	.comm	_Hunk_SmallLog,4,2              ; @Hunk_SmallLog
	.comm	_Z_LogHeap,4,2                  ; @Z_LogHeap
.subsections_via_symbols
