	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_arm_physmem_init_kernel_globals ## -- Begin function arm_physmem_init_kernel_globals
	.p2align	4, 0x90
_arm_physmem_init_kernel_globals:       ## @arm_physmem_init_kernel_globals
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_dump_avail@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	_EXFLAG_NODUMP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PHYS_AVAIL_ENTRIES@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_regions_to_avail
	movq	_phys_avail@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	movq	_EXFLAG_NOALLOC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %edx
	movq	_physmem@GOTPCREL(%rip), %rcx
	movq	_realmem@GOTPCREL(%rip), %r8
	callq	_regions_to_avail
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_panic
LBB0_2:
	movq	(%r14), %rax
	movl	-4(%rax,%rbx,4), %edi
	callq	_atop
	movq	_Maxmem@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_dump_avail,8,3                 ## @dump_avail
	.comm	_EXFLAG_NODUMP,4,2              ## @EXFLAG_NODUMP
	.comm	_PHYS_AVAIL_ENTRIES,4,2         ## @PHYS_AVAIL_ENTRIES
	.comm	_phys_avail,8,3                 ## @phys_avail
	.comm	_EXFLAG_NOALLOC,4,2             ## @EXFLAG_NOALLOC
	.comm	_physmem,4,2                    ## @physmem
	.comm	_realmem,4,2                    ## @realmem
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No memory entries in phys_avail"

	.comm	_Maxmem,4,2                     ## @Maxmem
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_arm_physmem_init_kernel_globals ; -- Begin function arm_physmem_init_kernel_globals
	.p2align	2
_arm_physmem_init_kernel_globals:       ; @arm_physmem_init_kernel_globals
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _dump_avail@GOTPAGE
Lloh1:
	ldr	x8, [x8, _dump_avail@GOTPAGEOFF]
Lloh2:
	ldr	x0, [x8]
Lloh3:
	adrp	x8, _EXFLAG_NODUMP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EXFLAG_NODUMP@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x19, _PHYS_AVAIL_ENTRIES@GOTPAGE
Lloh7:
	ldr	x19, [x19, _PHYS_AVAIL_ENTRIES@GOTPAGEOFF]
	ldr	w2, [x19]
	mov	x3, #0
	mov	x4, #0
	bl	_regions_to_avail
Lloh8:
	adrp	x20, _phys_avail@GOTPAGE
Lloh9:
	ldr	x20, [x20, _phys_avail@GOTPAGEOFF]
	ldr	x0, [x20]
Lloh10:
	adrp	x8, _EXFLAG_NOALLOC@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EXFLAG_NOALLOC@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	ldr	w2, [x19]
Lloh13:
	adrp	x3, _physmem@GOTPAGE
Lloh14:
	ldr	x3, [x3, _physmem@GOTPAGEOFF]
Lloh15:
	adrp	x4, _realmem@GOTPAGE
Lloh16:
	ldr	x4, [x4, _realmem@GOTPAGEOFF]
	bl	_regions_to_avail
	mov	x19, x0
	cbnz	x0, LBB0_2
; %bb.1:
Lloh17:
	adrp	x0, l_.str@PAGE
Lloh18:
	add	x0, x0, l_.str@PAGEOFF
	bl	_panic
LBB0_2:
	ldr	x8, [x20]
	add	x8, x8, x19, lsl #2
	ldur	w0, [x8, #-4]
	bl	_atop
Lloh19:
	adrp	x8, _Maxmem@GOTPAGE
Lloh20:
	ldr	x8, [x8, _Maxmem@GOTPAGEOFF]
Lloh21:
	str	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotStr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_dump_avail,8,3                 ; @dump_avail
	.comm	_EXFLAG_NODUMP,4,2              ; @EXFLAG_NODUMP
	.comm	_PHYS_AVAIL_ENTRIES,4,2         ; @PHYS_AVAIL_ENTRIES
	.comm	_phys_avail,8,3                 ; @phys_avail
	.comm	_EXFLAG_NOALLOC,4,2             ; @EXFLAG_NOALLOC
	.comm	_physmem,4,2                    ; @physmem
	.comm	_realmem,4,2                    ; @realmem
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No memory entries in phys_avail"

	.comm	_Maxmem,4,2                     ; @Maxmem
.subsections_via_symbols
