	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function parse_ofw_memory
_parse_ofw_memory:                      ## @parse_ofw_memory
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movl	%edi, %ebx
	movq	%rsp, -72(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_PHYS_AVAIL_SZ@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	leal	(,%r13,4), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	leaq	L_.str(%rip), %rdi
	callq	_OF_finddevice
	movl	%eax, %r15d
	leaq	L_.str.1(%rip), %rsi
	leaq	-56(%rbp), %rdx
	movl	%eax, %edi
	movl	$4, %ecx
	callq	_OF_getencprop
	cmpl	$3, %eax
	jg	LBB0_2
## %bb.1:
	movl	$1, -56(%rbp)
LBB0_2:
	leaq	L_.str.2(%rip), %rsi
	leaq	-52(%rbp), %rdx
	movl	%r15d, %edi
	movl	$4, %ecx
	callq	_OF_getencprop
	cmpl	$3, %eax
	jg	LBB0_4
## %bb.3:
	movl	$1, -52(%rbp)
LBB0_4:
	cmpl	$-1, %ebx
	je	LBB0_5
## %bb.6:
	shll	$4, %r13d
	movl	%ebx, %edi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	%r12, %rdx
	movl	%r13d, %ecx
	callq	_OF_getencprop
	movl	%eax, %r15d
	testl	%eax, %eax
	jg	LBB0_8
	jmp	LBB0_7
LBB0_5:
	xorl	%r15d, %r15d
LBB0_7:
	leaq	L_.str.3(%rip), %rdi
	callq	_panic
LBB0_8:
	movslq	%r15d, %r9
	shrq	$2, %r9
	xorl	%eax, %eax
	cmpl	$2, -56(%rbp)
	sete	%al
	leal	1(%rax), %r10d
	xorl	%ecx, %ecx
	cmpl	$2, -52(%rbp)
	sete	%cl
	leal	(%rcx,%rax), %r11d
	addl	$2, %r11d
	xorl	%eax, %eax
	movq	_BUS_SPACE_MAXADDR@GOTPCREL(%rip), %r8
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movslq	%edi, %rdi
	cmpq	%rdi, %r9
	jbe	LBB0_14
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	(%r12,%rdi,4), %ebx
	movl	%ebx, (%r14,%rax,8)
	leal	(%r10,%rdi), %ecx
	movslq	%ecx, %rcx
	movl	(%r12,%rcx,4), %edx
	movl	%edx, 4(%r14,%rax,8)
	movl	(%r8), %esi
	addl	%r11d, %edi
	movl	%esi, %ecx
	subl	%ebx, %ecx
	jl	LBB0_9
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	addl	%ebx, %edx
	decl	%edx
	cmpl	%esi, %edx
	jle	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=1
	incl	%ecx
	movl	%ecx, 4(%r14,%rax,8)
LBB0_13:                                ##   in Loop: Header=BB0_9 Depth=1
	incq	%rax
	jmp	LBB0_9
LBB0_14:
	movq	-72(%rbp), %rsp                 ## 8-byte Reload
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_16
## %bb.15:
                                        ## kill: def $eax killed $eax killed $rax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PHYS_AVAIL_SZ,4,2              ## @PHYS_AVAIL_SZ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/"

L_.str.1:                               ## @.str.1
	.asciz	"#address-cells"

L_.str.2:                               ## @.str.2
	.asciz	"#size-cells"

L_.str.3:                               ## @.str.3
	.asciz	"Physical memory map not found"

	.comm	_BUS_SPACE_MAXADDR,4,2          ## @BUS_SPACE_MAXADDR
	.no_dead_strip	_parse_ofw_memory
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function parse_ofw_memory
_parse_ofw_memory:                      ; @parse_ofw_memory
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	sub	sp, sp, #16
	mov	x19, x2
	mov	x21, x1
	mov	x22, x0
	mov	x24, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x8, _PHYS_AVAIL_SZ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PHYS_AVAIL_SZ@GOTPAGEOFF]
Lloh5:
	ldr	w25, [x8]
	lsl	w8, w25, #2
	lsl	x8, x8, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	sub	x20, x9, x8
	mov	sp, x20
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_OF_finddevice
	mov	x23, x0
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	sub	x2, x29, #76
	mov	w3, #4
	bl	_OF_getencprop
	cmp	w0, #3
	b.gt	LBB0_2
; %bb.1:
	mov	w8, #1
	stur	w8, [x29, #-76]
LBB0_2:
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	sub	x2, x29, #80
	mov	x0, x23
	mov	w3, #4
	bl	_OF_getencprop
	cmp	w0, #3
	b.gt	LBB0_4
; %bb.3:
	mov	w8, #1
	stur	w8, [x29, #-80]
LBB0_4:
	cmn	w22, #1
	b.eq	LBB0_6
; %bb.5:
	lsl	w3, w25, #4
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	bl	_OF_getencprop
	mov	x21, x0
	cmp	w0, #0
	b.gt	LBB0_8
	b	LBB0_7
LBB0_6:
	mov	w21, #0
LBB0_7:
Lloh14:
	adrp	x0, l_.str.3@PAGE
Lloh15:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_panic
LBB0_8:
	mov	x0, #0
	mov	w11, #0
	sxtw	x8, w21
	lsr	x8, x8, #2
	ldp	w12, w9, [x29, #-80]
	cmp	w9, #2
	mov	w10, #1
	cinc	w9, w10, eq
	cmp	w12, #2
	cinc	w10, w10, eq
	add	w10, w9, w10
Lloh16:
	adrp	x12, _BUS_SPACE_MAXADDR@GOTPAGE
Lloh17:
	ldr	x12, [x12, _BUS_SPACE_MAXADDR@GOTPAGEOFF]
LBB0_9:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	add	x14, x19, x0, lsl #3
	add	x13, x14, #4
LBB0_10:                                ;   Parent Loop BB0_9 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	sxtw	x11, w11
	cmp	x8, x11
	b.ls	LBB0_15
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	w15, [x20, x11, lsl #2]
	str	w15, [x14]
	add	w16, w9, w11
	ldr	w17, [x20, w16, sxtw #2]
	str	w17, [x13]
	ldr	w1, [x12]
	add	w11, w11, w10
	subs	w16, w1, w15
	b.lt	LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=1
	add	w14, w15, w17
	sub	w14, w14, #1
	cmp	w14, w1
	b.le	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_9 Depth=1
	add	w14, w16, #1
	str	w14, [x13]
LBB0_14:                                ;   in Loop: Header=BB0_9 Depth=1
	add	x0, x0, #1
	b	LBB0_9
LBB0_15:
	mov	sp, x24
	ldur	x8, [x29, #-72]
Lloh18:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh19:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.16:
                                        ; kill: def $w0 killed $w0 killed $x0
	sub	sp, x29, #64
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_17:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_PHYS_AVAIL_SZ,4,2              ; @PHYS_AVAIL_SZ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/"

l_.str.1:                               ; @.str.1
	.asciz	"#address-cells"

l_.str.2:                               ; @.str.2
	.asciz	"#size-cells"

l_.str.3:                               ; @.str.3
	.asciz	"Physical memory map not found"

	.comm	_BUS_SPACE_MAXADDR,4,2          ; @BUS_SPACE_MAXADDR
	.no_dead_strip	_parse_ofw_memory
.subsections_via_symbols
