	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_MmFindAvailablePages           ## -- Begin function MmFindAvailablePages
	.p2align	4, 0x90
_MmFindAvailablePages:                  ## @MmFindAvailablePages
	.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
	movl	%edx, %r14d
	movl	%esi, %edx
	movq	_LastFreePageHint@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	cmpl	%edx, %esi
	jle	LBB0_2
## %bb.1:
	movl	%edx, (%r15)
	movl	%edx, %esi
LBB0_2:
	movslq	%edi, %r12
	testq	%rcx, %rcx
	je	LBB0_9
## %bb.3:
	xorl	%eax, %eax
	cmpl	$2, %esi
	jl	LBB0_16
## %bb.4:
	movq	_LoaderFree@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movl	%esi, %eax
	xorl	%edx, %edx
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	leaq	1(%rsi), %rbx
	movq	%rsi, %rax
	movl	%edi, %edx
	cmpq	$2, %rbx
	jbe	LBB0_15
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	leaq	-1(%rax), %rsi
	movl	%esi, %ebx
	movl	$0, %edi
	cmpq	%rcx, (%r12,%rbx,8)
	jne	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	incl	%edx
	movl	%edx, %edi
	cmpl	%r14d, %edx
	jl	LBB0_8
## %bb.7:
	movq	_MmLowestPhysicalPage@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%ecx, %eax
	decl	%eax
	jmp	LBB0_16
LBB0_9:
	leaq	L_.str(%rip), %rdi
	callq	_TRACE
	movl	(%r15), %ecx
	xorl	%eax, %eax
	cmpl	$2, %ecx
	jl	LBB0_16
## %bb.10:
	movq	_LoaderFree@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	xorl	%esi, %esi
	movl	$1, %eax
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_11 Depth=1
	incq	%rax
	movl	%edi, %esi
	cmpq	%rax, %rcx
	je	LBB0_15
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	$0, %edi
	cmpq	%rdx, (%r12,%rax,8)
	jne	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	leal	1(%rsi), %edi
	cmpl	%r14d, %edi
	jl	LBB0_14
## %bb.13:
	movq	_MmLowestPhysicalPage@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	subl	%esi, %ecx
	addl	%ecx, %eax
	jmp	LBB0_16
LBB0_15:
	xorl	%eax, %eax
LBB0_16:
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LastFreePageHint,4,2           ## @LastFreePageHint
	.comm	_LoaderFree,8,3                 ## @LoaderFree
	.comm	_MmLowestPhysicalPage,4,2       ## @MmLowestPhysicalPage
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Alloc low memory, LastFreePageHint 0x%x, TPC 0x%x\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_MmFindAvailablePages           ; -- Begin function MmFindAvailablePages
	.p2align	2
_MmFindAvailablePages:                  ; @MmFindAvailablePages
	.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	x19, x2
	mov	x2, x1
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x20, w0
Lloh0:
	adrp	x21, _LastFreePageHint@GOTPAGE
Lloh1:
	ldr	x21, [x21, _LastFreePageHint@GOTPAGEOFF]
	ldr	w1, [x21]
	cmp	w1, w2
	b.le	LBB0_2
; %bb.1:
	str	w2, [x21]
	mov	x1, x2
LBB0_2:
	cbz	x3, LBB0_10
; %bb.3:
	cmp	w1, #2
	b.lt	LBB0_17
; %bb.4:
	mov	w9, #0
Lloh2:
	adrp	x8, _LoaderFree@GOTPAGE
Lloh3:
	ldr	x8, [x8, _LoaderFree@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	mov	w10, w1
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	w9, #0
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x12, x11, #1
	mov	x10, x11
	cmp	x12, #2
	b.ls	LBB0_17
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	sub	x11, x10, #1
	ldr	x12, [x20, w11, uxtw #3]
	cmp	x12, x8
	b.ne	LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	w9, w9, #1
	cmp	w9, w19
	b.lt	LBB0_6
; %bb.9:
Lloh5:
	adrp	x8, _MmLowestPhysicalPage@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MmLowestPhysicalPage@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	add	w8, w8, w10
	sub	w0, w8, #1
	b	LBB0_18
LBB0_10:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_TRACE
	ldr	w8, [x21]
	cmp	w8, #2
	b.lt	LBB0_17
; %bb.11:
	mov	w11, #0
Lloh10:
	adrp	x9, _LoaderFree@GOTPAGE
Lloh11:
	ldr	x9, [x9, _LoaderFree@GOTPAGEOFF]
Lloh12:
	ldr	x10, [x9]
	mov	w9, #1
	b	LBB0_14
LBB0_12:                                ;   in Loop: Header=BB0_14 Depth=1
	mov	w12, #0
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	add	x9, x9, #1
	mov	x11, x12
	cmp	x8, x9
	b.eq	LBB0_17
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x20, x9, lsl #3]
	cmp	x12, x10
	b.ne	LBB0_12
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	add	w12, w11, #1
	cmp	w12, w19
	b.lt	LBB0_13
; %bb.16:
Lloh13:
	adrp	x8, _MmLowestPhysicalPage@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MmLowestPhysicalPage@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	sub	w8, w8, w11
	add	w0, w8, w9
	b	LBB0_18
LBB0_17:
	mov	w0, #0
LBB0_18:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_LastFreePageHint,4,2           ; @LastFreePageHint
	.comm	_LoaderFree,8,3                 ; @LoaderFree
	.comm	_MmLowestPhysicalPage,4,2       ; @MmLowestPhysicalPage
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Alloc low memory, LastFreePageHint 0x%x, TPC 0x%x\n"

.subsections_via_symbols
