	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_FrLdrHeapRelease               ## -- Begin function FrLdrHeapRelease
	.p2align	4, 0x90
_FrLdrHeapRelease:                      ## @FrLdrHeapRelease
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	xorl	%r15d, %r15d
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_TRACE
	movl	8(%rbx), %eax
	testl	%eax, %eax
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_20
## %bb.1:
	leaq	8(%rbx), %r13
	xorl	%r15d, %r15d
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %r14
LBB0_19:                                ##   in Loop: Header=BB0_2 Depth=1
	cltq
	leaq	(%rax,%rax,2), %rax
	leaq	(%r14,%rax,8), %r13
	addq	$24, %r13
	movl	24(%r14,%rax,8), %eax
	testl	%eax, %eax
	je	LBB0_20
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	cmpq	$0, 8(%r13)
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	16(%r13), %edi
	movl	(%r12), %esi
	callq	_ALIGN_UP_POINTER_BY
	movq	%rax, %rbx
	cmpq	$0, 8(%r13)
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %r14
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movslq	(%r13), %rax
	leaq	(%rax,%rax,2), %rax
	leaq	24(,%rax,8), %r14
	addq	%r13, %r14
	cmpq	$0, 32(%r13,%rax,8)
	movq	%r14, %r13
	je	LBB0_6
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, (%r14)
	movl	16(%r14), %edi
	movl	(%r12), %esi
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	callq	_ALIGN_DOWN_POINTER_BY
	subq	%rbx, %rax
	jg	LBB0_11
	jmp	LBB0_18
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	callq	_ALIGN_UP_POINTER_BY
	subq	%rbx, %rax
	jle	LBB0_18
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_MM_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	cqto
	idivq	%rcx
	movq	%rax, %r8
	jmp	LBB0_14
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %r8d
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_PageLookupTableAddress@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rax
	cqto
	idivq	%rcx
	jmp	LBB0_17
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	addq	%r8, %r15
	movq	_LoaderFree@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%rax, %rsi
	movq	%r8, %rdx
	callq	_MmMarkPagesInLookupTable
LBB0_18:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r14), %eax
	testl	%eax, %eax
	jne	LBB0_19
LBB0_20:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	_MM_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_21
## %bb.22:
	cqto
	idivq	%rcx
	jmp	LBB0_23
LBB0_21:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_23:
	leaq	L_.str.1(%rip), %rdi
	movq	%r15, %rsi
	movq	%rax, %rdx
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_TRACE                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"HeapRelease(%p)\n"

	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_MM_PAGE_SIZE,8,3               ## @MM_PAGE_SIZE
	.comm	_PageLookupTableAddress,4,2     ## @PageLookupTableAddress
	.comm	_LoaderFree,4,2                 ## @LoaderFree
L_.str.1:                               ## @.str.1
	.asciz	"HeapRelease() done, freed %lu of %lu pages\n"

	.comm	_REDZONE_MARK,8,3               ## @REDZONE_MARK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_FrLdrHeapRelease               ; -- Begin function FrLdrHeapRelease
	.p2align	2
_FrLdrHeapRelease:                      ; @FrLdrHeapRelease
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_TRACE
	mov	x23, x19
	ldr	w8, [x23, #8]!
Lloh2:
	adrp	x22, _MM_PAGE_SIZE@GOTPAGE
Lloh3:
	ldr	x22, [x22, _MM_PAGE_SIZE@GOTPAGEOFF]
	mov	x20, #0
	cbz	w8, LBB0_11
; %bb.1:
Lloh4:
	adrp	x24, _PAGE_SIZE@GOTPAGE
Lloh5:
	ldr	x24, [x24, _PAGE_SIZE@GOTPAGEOFF]
	mov	w25, #24
Lloh6:
	adrp	x26, _PageLookupTableAddress@GOTPAGE
Lloh7:
	ldr	x26, [x26, _PageLookupTableAddress@GOTPAGEOFF]
Lloh8:
	adrp	x27, _LoaderFree@GOTPAGE
Lloh9:
	ldr	x27, [x27, _LoaderFree@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x23]
	cbz	w8, LBB0_11
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	smaddl	x23, w8, w25, x23
	ldr	w8, [x23, #24]!
	cbz	w8, LBB0_11
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	ldr	x9, [x23, #8]
	cbnz	x9, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x23, #16]
	ldr	w1, [x24]
	bl	_ALIGN_UP_POINTER_BY
	mov	x21, x0
	ldr	x8, [x23, #8]
	cbnz	x8, LBB0_7
LBB0_6:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrsw	x8, [x23]
	madd	x8, x8, x25, x23
	add	x23, x8, #24
	ldr	x8, [x8, #32]
	cbz	x8, LBB0_6
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x23]
	ldr	w0, [x23, #16]
	ldr	w1, [x24]
	cbz	w8, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	_ALIGN_DOWN_POINTER_BY
	subs	x8, x0, x21
	b.le	LBB0_2
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	bl	_ALIGN_UP_POINTER_BY
	subs	x8, x0, x21
	b.le	LBB0_2
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x22]
	sdiv	x2, x8, x9
	add	x20, x2, x20
	ldr	w0, [x26]
	ldr	w3, [x27]
	sdiv	x1, x21, x9
	bl	_MmMarkPagesInLookupTable
	b	LBB0_2
LBB0_11:
	ldr	x8, [x19]
	ldr	x9, [x22]
	sdiv	x8, x8, x9
	str	x8, [sp]
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_TRACE
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"HeapRelease(%p)\n"

	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_MM_PAGE_SIZE,8,3               ; @MM_PAGE_SIZE
	.comm	_PageLookupTableAddress,4,2     ; @PageLookupTableAddress
	.comm	_LoaderFree,4,2                 ; @LoaderFree
l_.str.1:                               ; @.str.1
	.asciz	"HeapRelease() done, freed %lu of %lu pages\n"

	.comm	_REDZONE_MARK,8,3               ; @REDZONE_MARK
.subsections_via_symbols
