	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_InitConsoleMessageHeap         ## -- Begin function InitConsoleMessageHeap
	.p2align	4, 0x90
_InitConsoleMessageHeap:                ## @InitConsoleMessageHeap
	.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	_consolemessageheap@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	callq	_FreeMemory
LBB0_2:
	leaq	L_.str(%rip), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_LibVarValue
	movq	%rax, %r14
	movl	%r14d, %edi
	shll	$4, %edi
	callq	_GetClearedHunkMemory
	movq	%rax, (%rbx)
	movq	$0, 8(%rax)
	leaq	16(%rax), %rcx
	movq	%rcx, (%rax)
	leal	-1(%r14), %r8d
	cmpl	$3, %r14d
	jl	LBB0_8
## %bb.3:
	movl	%r8d, %r9d
	decq	%r9
	movl	$1, %ecx
	cmpl	$2, %r8d
	je	LBB0_6
## %bb.4:
	movq	%r9, %rsi
	andq	$-2, %rsi
	negq	%rsi
	movl	$1, %ecx
	movl	$48, %edi
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rax
	leaq	(%rax,%rdi), %rdx
	addq	$-48, %rdx
	movq	%rdx, -24(%rax,%rdi)
	movq	(%rbx), %rax
	leaq	-16(%rax,%rdi), %rdx
	movq	%rdx, -32(%rax,%rdi)
	movq	(%rbx), %rax
	leaq	-32(%rax,%rdi), %rdx
	movq	%rdx, -8(%rax,%rdi)
	movq	(%rbx), %rax
	leaq	(%rax,%rdi), %rdx
	movq	%rdx, -16(%rax,%rdi)
	addq	$32, %rdi
	leaq	(%rsi,%rcx), %rax
	addq	$2, %rax
	addq	$2, %rcx
	cmpq	$1, %rax
	jne	LBB0_5
LBB0_6:
	testb	$1, %r9b
	je	LBB0_8
## %bb.7:
	movq	(%rbx), %rax
	shlq	$4, %rcx
	leaq	(%rax,%rcx), %rdx
	addq	$-16, %rdx
	movq	%rdx, 8(%rax,%rcx)
	movq	(%rbx), %rax
	leaq	(%rax,%rcx), %rdx
	addq	$16, %rdx
	movq	%rdx, (%rax,%rcx)
LBB0_8:
	movq	(%rbx), %rax
	shlq	$32, %r14
	movabsq	$-8589934592, %rcx              ## imm = 0xFFFFFFFE00000000
	addq	%r14, %rcx
	sarq	$28, %rcx
	addq	%rax, %rcx
	movslq	%r8d, %rdx
	shlq	$4, %rdx
	movq	%rcx, 8(%rax,%rdx)
	movq	(%rbx), %rax
	movq	$0, (%rax,%rdx)
	movq	(%rbx), %rax
	movq	_freeconsolemessages@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_consolemessageheap,8,3         ## @consolemessageheap
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"max_messages"

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

	.comm	_freeconsolemessages,8,3        ## @freeconsolemessages
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_InitConsoleMessageHeap         ; -- Begin function InitConsoleMessageHeap
	.p2align	2
_InitConsoleMessageHeap:                ; @InitConsoleMessageHeap
	.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	x20, _consolemessageheap@GOTPAGE
Lloh1:
	ldr	x20, [x20, _consolemessageheap@GOTPAGEOFF]
	ldr	x0, [x20]
	cbz	x0, LBB0_2
; %bb.1:
	bl	_FreeMemory
LBB0_2:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_LibVarValue
	mov	x19, x0
	lsl	w0, w19, #4
	bl	_GetClearedHunkMemory
	str	x0, [x20]
	add	x8, x0, #16
	stp	x8, xzr, [x0]
	sub	w8, w19, #1
	cmp	w19, #3
	b.lt	LBB0_5
; %bb.3:
	mov	x9, #0
	sub	x10, x8, #1
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x20]
	add	x11, x11, x9
	str	x11, [x11, #24]
	ldr	x11, [x20]
	add	x11, x11, x9
	add	x12, x11, #32
	str	x12, [x11, #16]
	add	x9, x9, #16
	subs	x10, x10, #1
	b.ne	LBB0_4
LBB0_5:
	ldr	x9, [x20]
	mov	x10, #-8589934592
	add	x10, x10, x19, lsl #32
	add	x10, x9, x10, asr #28
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	sbfiz	x8, x8, #4, #32
	add	x9, x9, x8
	str	x10, [x9, #8]
	ldr	x9, [x20]
	str	xzr, [x9, x8]
	ldr	x8, [x20]
Lloh6:
	adrp	x9, _freeconsolemessages@GOTPAGE
Lloh7:
	ldr	x9, [x9, _freeconsolemessages@GOTPAGEOFF]
Lloh8:
	str	x8, [x9]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotStr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_consolemessageheap,8,3         ; @consolemessageheap
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"max_messages"

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

	.comm	_freeconsolemessages,8,3        ; @freeconsolemessages
.subsections_via_symbols
