	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_calc_highpages                 ## -- Begin function calc_highpages
	.p2align	4, 0x90
_calc_highpages:                        ## @calc_highpages
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_sp_banks@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_max_low_pfn@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rsi
	addq	$16, %rax
	xorl	%r8d, %r8d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	(%rax), %rdi
	addq	$16, %rax
	testq	%rdi, %rdi
	je	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	-8(%rax), %rdx
	addq	%rdx, %rdi
	shrq	%cl, %rdi
	cmpq	%rsi, %rdi
	jbe	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	shrq	%cl, %rdx
	cmpq	%rsi, %rdx
	cmovbeq	%rsi, %rdx
	subl	%edx, %edi
	addl	%edi, %r8d
	jmp	LBB0_5
LBB0_1:
	xorl	%r8d, %r8d
LBB0_6:
	movslq	%r8d, %rax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_sp_banks,8,3                   ## @sp_banks
	.comm	_PAGE_SHIFT,8,3                 ## @PAGE_SHIFT
	.comm	_max_low_pfn,8,3                ## @max_low_pfn
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_calc_highpages                 ; -- Begin function calc_highpages
	.p2align	2
_calc_highpages:                        ; @calc_highpages
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _sp_banks@GOTPAGE
Lloh1:
	ldr	x8, [x8, _sp_banks@GOTPAGEOFF]
Lloh2:
	ldr	x11, [x8]
	ldr	x12, [x11]
	cbz	x12, LBB0_4
; %bb.1:
	mov	w8, #0
Lloh3:
	adrp	x9, _PAGE_SHIFT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PAGE_SHIFT@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
Lloh6:
	adrp	x10, _max_low_pfn@GOTPAGE
Lloh7:
	ldr	x10, [x10, _max_low_pfn@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	add	x11, x11, #16
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldur	x13, [x11, #-8]
	add	x12, x13, x12
	lsr	x12, x12, x9
	lsr	x13, x13, x9
	cmp	x13, x10
	csel	x13, x13, x10, hi
	sub	w13, w12, w13
	add	w13, w8, w13
	cmp	x12, x10
	csel	w8, w8, w13, ls
	ldr	x12, [x11], #16
	cbnz	x12, LBB0_2
; %bb.3:
	sxtw	x0, w8
	ret
LBB0_4:
	mov	w8, #0
	sxtw	x0, w8
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_sp_banks,8,3                   ; @sp_banks
	.comm	_PAGE_SHIFT,8,3                 ; @PAGE_SHIFT
	.comm	_max_low_pfn,8,3                ; @max_low_pfn
.subsections_via_symbols
