	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___lwp_heap_init                ## -- Begin function __lwp_heap_init
	.p2align	4, 0x90
___lwp_heap_init:                       ## @__lwp_heap_init
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	%rcx, %rdi
	callq	___lwp_heap_pgsize_valid
	movl	%eax, %ecx
	xorl	%eax, %eax
	testl	%ecx, %ecx
	je	LBB0_3
## %bb.1:
	movq	_HEAP_MIN_SIZE@GOTPCREL(%rip), %rcx
	cmpq	%r14, (%rcx)
	jg	LBB0_3
## %bb.2:
	callq	__CPU_ISR_Disable
	movq	%r12, 40(%r15)
	movq	_HEAP_OVERHEAD@GOTPCREL(%rip), %rax
	subq	(%rax), %r14
	movq	_HEAP_DUMMY_FLAG@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movq	%rax, 8(%rbx)
	movq	%r14, (%rbx)
	movq	%r15, %rdi
	callq	___lwp_heap_tail
	movl	%eax, 20(%rbx)
	movq	%r15, %rdi
	callq	___lwp_heap_head
	movl	%eax, 16(%rbx)
	movq	%rbx, 32(%r15)
	movq	%rbx, 24(%r15)
	movq	$0, 16(%r15)
	movq	%rbx, 8(%r15)
	movq	%rbx, %rdi
	callq	___lwp_heap_nextblock
	movq	%r14, 8(%rax)
	movq	(%r12), %rcx
	movq	%rcx, (%rax)
	movq	%rax, (%r15)
	callq	__CPU_ISR_Restore
	movq	_HEAP_BLOCK_USED_OVERHEAD@GOTPCREL(%rip), %rax
	subq	(%rax), %r14
	movq	%r14, %rax
LBB0_3:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HEAP_MIN_SIZE,8,3              ## @HEAP_MIN_SIZE
	.comm	_HEAP_OVERHEAD,8,3              ## @HEAP_OVERHEAD
	.comm	_HEAP_DUMMY_FLAG,8,3            ## @HEAP_DUMMY_FLAG
	.comm	_HEAP_BLOCK_USED_OVERHEAD,8,3   ## @HEAP_BLOCK_USED_OVERHEAD
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___lwp_heap_init                ; -- Begin function __lwp_heap_init
	.p2align	2
___lwp_heap_init:                       ; @__lwp_heap_init
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x22, x3
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	mov	x0, x3
	bl	___lwp_heap_pgsize_valid
	mov	x8, x0
	mov	x0, #0
	cbz	w8, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _HEAP_MIN_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HEAP_MIN_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x21
	b.gt	LBB0_3
; %bb.2:
	bl	__CPU_ISR_Disable
	str	x22, [x19, #40]
Lloh3:
	adrp	x8, _HEAP_OVERHEAD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HEAP_OVERHEAD@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	sub	x21, x21, x8
Lloh6:
	adrp	x22, _HEAP_DUMMY_FLAG@GOTPAGE
Lloh7:
	ldr	x22, [x22, _HEAP_DUMMY_FLAG@GOTPAGEOFF]
	ldr	x8, [x22]
	stp	x21, x8, [x20]
	mov	x0, x19
	bl	___lwp_heap_tail
	str	w0, [x20, #20]
	mov	x0, x19
	bl	___lwp_heap_head
	str	w0, [x20, #16]
	stp	x20, x20, [x19, #24]
	stp	x20, xzr, [x19, #8]
	mov	x0, x20
	bl	___lwp_heap_nextblock
	ldr	x8, [x22]
	stp	x8, x21, [x0]
	str	x0, [x19]
	bl	__CPU_ISR_Restore
Lloh8:
	adrp	x8, _HEAP_BLOCK_USED_OVERHEAD@GOTPAGE
Lloh9:
	ldr	x8, [x8, _HEAP_BLOCK_USED_OVERHEAD@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	sub	x0, x21, x8
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_HEAP_MIN_SIZE,8,3              ; @HEAP_MIN_SIZE
	.comm	_HEAP_OVERHEAD,8,3              ; @HEAP_OVERHEAD
	.comm	_HEAP_DUMMY_FLAG,8,3            ; @HEAP_DUMMY_FLAG
	.comm	_HEAP_BLOCK_USED_OVERHEAD,8,3   ; @HEAP_BLOCK_USED_OVERHEAD
.subsections_via_symbols
