	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function calc_max_low_pfn
_calc_max_low_pfn:                      ## @calc_max_low_pfn
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_SRMMU_MAXMEM@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	shrq	%cl, %rax
	movq	_pfn_base@GOTPCREL(%rip), %rdx
	addq	(%rdx), %rax
	movq	_sp_banks@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rsi
	movq	24(%rsi), %r10
	testq	%r10, %r10
	je	LBB0_8
## %bb.1:
	movq	16(%rsi), %rdi
	movq	%rdi, %r8
	shrq	%cl, %r8
	cmpq	%rax, %r8
	jae	LBB0_2
## %bb.6:
	addq	$40, %rsi
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r10, %r9
	movq	(%rsi), %r10
	testq	%r10, %r10
	je	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%rdi, %r8
	movq	-8(%rsi), %rdi
	movq	%rdi, %rdx
	shrq	%cl, %rdx
	addq	$16, %rsi
	cmpq	%rax, %rdx
	jb	LBB0_7
## %bb.4:
	addq	%r9, %r8
	jmp	LBB0_5
LBB0_8:
	popq	%rbp
	retq
LBB0_2:
	movq	8(%rsi), %r8
	addq	(%rsi), %r8
LBB0_5:
                                        ## kill: def $cl killed $cl killed $rcx
	shrq	%cl, %r8
	cmpq	%rax, %r8
	cmovaeq	%rax, %r8
	movq	%r8, %rax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_pfn_base,8,3                   ## @pfn_base
	.comm	_SRMMU_MAXMEM,8,3               ## @SRMMU_MAXMEM
	.comm	_PAGE_SHIFT,8,3                 ## @PAGE_SHIFT
	.comm	_sp_banks,8,3                   ## @sp_banks
	.no_dead_strip	_calc_max_low_pfn
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function calc_max_low_pfn
_calc_max_low_pfn:                      ; @calc_max_low_pfn
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _pfn_base@GOTPAGE
Lloh1:
	ldr	x8, [x8, _pfn_base@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x8]
Lloh3:
	adrp	x8, _SRMMU_MAXMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SRMMU_MAXMEM@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x8]
Lloh6:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	lsr	x10, x10, x8
	add	x0, x10, x9
Lloh9:
	adrp	x9, _sp_banks@GOTPAGE
Lloh10:
	ldr	x9, [x9, _sp_banks@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x9]
	ldr	x9, [x10, #24]
	cbz	x9, LBB0_6
; %bb.1:
	ldr	x11, [x10, #16]
	lsr	x12, x11, x8
	cmp	x12, x0
	b.hs	LBB0_7
; %bb.2:
	add	x10, x10, #40
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x12, x9
	ldr	x9, [x10]
	cbz	x9, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x13, x11
	ldur	x11, [x10, #-8]
	lsr	x14, x11, x8
	add	x10, x10, #16
	cmp	x14, x0
	b.lo	LBB0_3
; %bb.5:
	add	x9, x13, x12
	b	LBB0_8
LBB0_6:
	ret
LBB0_7:
	ldp	x10, x9, [x10]
	add	x9, x9, x10
LBB0_8:
	lsr	x8, x9, x8
	cmp	x8, x0
	csel	x0, x8, x0, lo
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_pfn_base,8,3                   ; @pfn_base
	.comm	_SRMMU_MAXMEM,8,3               ; @SRMMU_MAXMEM
	.comm	_PAGE_SHIFT,8,3                 ; @PAGE_SHIFT
	.comm	_sp_banks,8,3                   ; @sp_banks
	.no_dead_strip	_calc_max_low_pfn
.subsections_via_symbols
