	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -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_S@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	%rax, %rbx
	leaq	L_.str.2(%rip), %rsi
	movq	%rax, %rdi
	callq	_Cvar_SetDescription
	movq	_com_dedicated@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.4:
	leaq	L_.str.3(%rip), %rdi
	movq	_MIN_DEDICATED_COMHUNKMEGS@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_5:
	leaq	L_.str.4(%rip), %rdi
	movq	_MIN_COMHUNKMEGS@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %edx
	movl	(%rbx), %eax
	cmpl	%edx, %eax
	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), %eax
	jmp	LBB0_9
LBB0_8:
	shll	$20, %eax
	movq	_s_hunkTotal@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_9:
	addl	$31, %eax
	movl	%eax, %edi
	movl	$1, %esi
	callq	_calloc
	movq	_s_hunkDataRaw@GOTPCREL(%rip), %rbx
	movq	%rax, (%rbx)
	testq	%rax, %rax
	jne	LBB0_11
## %bb.10:
	movq	_ERR_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_s_hunkTotal@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	1048575(%rax), %edx
	testl	%eax, %eax
	cmovnsl	%eax, %edx
	sarl	$20, %edx
	leaq	L_.str.5(%rip), %rsi
	xorl	%eax, %eax
	callq	_Com_Error
	movq	(%rbx), %rax
LBB0_11:
	addq	$31, %rax
	andq	$-32, %rax
	movq	_s_hunkData@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	xorl	%eax, %eax
	callq	_Hunk_Clear
	movq	_Com_Meminfo_f@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.6(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	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_S,4,2          ## @DEF_COMHUNKMEGS_S
	.comm	_CVAR_LATCH,4,2                 ## @CVAR_LATCH
	.comm	_CVAR_ARCHIVE,4,2               ## @CVAR_ARCHIVE
L_.str.2:                               ## @.str.2
	.asciz	"The size of the hunk memory segment"

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

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

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

	.comm	_s_hunkData,8,3                 ## @s_hunkData
L_.str.6:                               ## @.str.6
	.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, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	bl	_FS_LoadStack
Lloh0:
	adrp	x20, _ERR_FATAL@GOTPAGE
Lloh1:
	ldr	x20, [x20, _ERR_FATAL@GOTPAGEOFF]
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w0, [x20]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_Com_Error
LBB0_2:
Lloh4:
	adrp	x8, _DEF_COMHUNKMEGS_S@GOTPAGE
Lloh5:
	ldr	x8, [x8, _DEF_COMHUNKMEGS_S@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
	mov	x19, x0
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_Cvar_SetDescription
Lloh17:
	adrp	x8, _com_dedicated@GOTPAGE
Lloh18:
	ldr	x8, [x8, _com_dedicated@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.3:
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.4:
Lloh20:
	adrp	x0, l_.str.3@PAGE
Lloh21:
	add	x0, x0, l_.str.3@PAGEOFF
Lloh22:
	adrp	x8, _MIN_DEDICATED_COMHUNKMEGS@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MIN_DEDICATED_COMHUNKMEGS@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh24:
	adrp	x0, l_.str.4@PAGE
Lloh25:
	add	x0, x0, l_.str.4@PAGEOFF
Lloh26:
	adrp	x8, _MIN_COMHUNKMEGS@GOTPAGE
Lloh27:
	ldr	x8, [x8, _MIN_COMHUNKMEGS@GOTPAGEOFF]
LBB0_6:
	ldr	w1, [x8]
	ldr	w8, [x19]
	cmp	w8, w1
	b.ge	LBB0_8
; %bb.7:
	lsl	w8, w1, #20
Lloh28:
	adrp	x19, _s_hunkTotal@GOTPAGE
Lloh29:
	ldr	x19, [x19, _s_hunkTotal@GOTPAGEOFF]
	str	w8, [x19]
	mov	x2, x1
	bl	_Com_Printf
	ldr	w8, [x19]
	b	LBB0_9
LBB0_8:
	lsl	w8, w8, #20
Lloh30:
	adrp	x9, _s_hunkTotal@GOTPAGE
Lloh31:
	ldr	x9, [x9, _s_hunkTotal@GOTPAGEOFF]
Lloh32:
	str	w8, [x9]
LBB0_9:
	add	w0, w8, #31
	mov	w1, #1
	bl	_calloc
Lloh33:
	adrp	x19, _s_hunkDataRaw@GOTPAGE
Lloh34:
	ldr	x19, [x19, _s_hunkDataRaw@GOTPAGEOFF]
	str	x0, [x19]
	cbnz	x0, LBB0_11
; %bb.10:
	ldr	w0, [x20]
Lloh35:
	adrp	x8, _s_hunkTotal@GOTPAGE
Lloh36:
	ldr	x8, [x8, _s_hunkTotal@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	mov	w9, #1048575
	add	w9, w8, w9
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #20
	str	x8, [sp]
Lloh38:
	adrp	x1, l_.str.5@PAGE
Lloh39:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_Com_Error
	ldr	x0, [x19]
LBB0_11:
	add	x8, x0, #31
	and	x8, x8, #0xffffffffffffffe0
Lloh40:
	adrp	x9, _s_hunkData@GOTPAGE
Lloh41:
	ldr	x9, [x9, _s_hunkData@GOTPAGEOFF]
Lloh42:
	str	x8, [x9]
	bl	_Hunk_Clear
Lloh43:
	adrp	x8, _Com_Meminfo_f@GOTPAGE
Lloh44:
	ldr	x8, [x8, _Com_Meminfo_f@GOTPAGEOFF]
Lloh45:
	ldr	w1, [x8]
Lloh46:
	adrp	x0, l_.str.6@PAGE
Lloh47:
	add	x0, x0, l_.str.6@PAGEOFF
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_Cmd_AddCommand
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh8
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotStr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotStr	Lloh40, Lloh41, Lloh42
	.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_S,4,2          ; @DEF_COMHUNKMEGS_S
	.comm	_CVAR_LATCH,4,2                 ; @CVAR_LATCH
	.comm	_CVAR_ARCHIVE,4,2               ; @CVAR_ARCHIVE
l_.str.2:                               ; @.str.2
	.asciz	"The size of the hunk memory segment"

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

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

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

	.comm	_s_hunkData,8,3                 ; @s_hunkData
l_.str.6:                               ; @.str.6
	.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
