	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_total_mem
_get_total_mem:                         ## @get_total_mem
	.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	%rdi, -48(%rbp)                 ## 8-byte Spill
	leaq	L_.str(%rip), %rsi
	xorl	%edi, %edi
	callq	_of_find_node_by_type
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_of_n_addr_cells
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_of_n_size_cells
	movl	%eax, %r15d
	leaq	L_.str.1(%rip), %rsi
	leaq	-60(%rbp), %rdx
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_of_get_property
	movq	%rax, %rbx
	movl	-60(%rbp), %eax
	leal	3(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$2, %ecx
	movslq	%ecx, %rax
	leaq	(%rbx,%rax,4), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	$0, (%rax)
	movl	%r14d, -56(%rbp)                ## 4-byte Spill
	movslq	%r14d, %r13
	movl	%r15d, -52(%rbp)                ## 4-byte Spill
	movslq	%r15d, %rax
	shlq	$2, %rax
	leaq	(%rax,%r13,4), %r12
	shlq	$2, %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movl	-56(%rbp), %esi                 ## 4-byte Reload
	callq	_of_read_number
	movq	%rax, %r14
	leaq	(%rbx,%r13), %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	_of_read_number
	movq	%rax, %r15
	movl	$1, %edi
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdx
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	_edac_dbg
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addq	%r15, (%rax)
	addq	%r12, %rbx
	cmpq	-80(%rbp), %rbx                 ## 8-byte Folded Reload
	jb	LBB0_2
## %bb.3:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_of_node_put
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdx
	leaq	L_.str.3(%rip), %rsi
	xorl	%edi, %edi
	xorl	%eax, %eax
	callq	_edac_dbg
LBB0_4:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"memory"

L_.str.1:                               ## @.str.1
	.asciz	"reg"

L_.str.2:                               ## @.str.2
	.asciz	"start 0x%lx, size 0x%lx\n"

L_.str.3:                               ## @.str.3
	.asciz	"total_mem 0x%lx\n"

	.no_dead_strip	_get_total_mem
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_total_mem
_get_total_mem:                         ; @get_total_mem
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, #0
	bl	_of_find_node_by_type
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
	bl	_of_n_addr_cells
	mov	x21, x0
	mov	x0, x20
	bl	_of_n_size_cells
	mov	x22, x0
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x2, sp, #28
	str	x20, [sp, #16]                  ; 8-byte Folded Spill
	mov	x0, x20
	bl	_of_get_property
	mov	x23, x0
	ldr	w8, [sp, #28]
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #2
	add	x27, x0, w8, sxtw #2
	str	xzr, [x19]
	sbfiz	x28, x21, #2, #32
	add	x20, x28, w22, sxtw #2
Lloh4:
	adrp	x24, l_.str.2@PAGE
Lloh5:
	add	x24, x24, l_.str.2@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	mov	x1, x21
	bl	_of_read_number
	mov	x25, x0
	add	x0, x23, x28
	mov	x1, x22
	bl	_of_read_number
	mov	x26, x0
	str	x0, [sp]
	mov	w0, #1
	mov	x1, x24
	mov	x2, x25
	bl	_edac_dbg
	ldr	x8, [x19]
	add	x8, x8, x26
	str	x8, [x19]
	add	x23, x23, x20
	cmp	x23, x27
	b.lo	LBB0_2
; %bb.3:
	ldr	x0, [sp, #16]                   ; 8-byte Folded Reload
	bl	_of_node_put
	ldr	x2, [x19]
Lloh6:
	adrp	x1, l_.str.3@PAGE
Lloh7:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #0
	bl	_edac_dbg
LBB0_4:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"memory"

l_.str.1:                               ; @.str.1
	.asciz	"reg"

l_.str.2:                               ; @.str.2
	.asciz	"start 0x%lx, size 0x%lx\n"

l_.str.3:                               ; @.str.3
	.asciz	"total_mem 0x%lx\n"

	.no_dead_strip	_get_total_mem
.subsections_via_symbols
