	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function init_csrows
_init_csrows:                           ## @init_csrows
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	8(%rdi), %rax
	movq	(%rax), %r14
	leaq	L_.str(%rip), %rdi
	callq	_of_find_node_by_path
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	leaq	-48(%rbp), %rdx
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_of_address_to_resource
	movl	%eax, %r13d
	movq	%rbx, %rdi
	callq	_of_node_put
	movl	(%r12), %r15d
	testl	%r13d, %r13d
	je	LBB0_4
## %bb.3:
	leaq	L_.str.2(%rip), %rsi
	movl	%r15d, %edi
	callq	_dev_err
	movl	%r13d, %r14d
	jmp	LBB0_8
LBB0_1:
	movl	(%r12), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_8
LBB0_4:
	movl	-48(%rbp), %ebx
	leaq	-48(%rbp), %rdi
	callq	_resource_size
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %r13
	movl	(%r13), %r8d
	leaq	L_.str.3(%rip), %rsi
	movl	%r15d, %edi
	movl	%ebx, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	-48(%rbp), %eax
	movb	(%r13), %cl
	sarl	%cl, %eax
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	%eax, (%rbx)
	leaq	-48(%rbp), %rdi
	callq	_resource_size
	movl	%eax, %r15d
	movb	(%r13), %cl
	sarl	%cl, %r15d
	movl	(%rbx), %eax
	addl	%r15d, %eax
	decl	%eax
	movl	%eax, 4(%rbx)
	movq	_aspeed_regmap@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ASPEED_MCR_CONF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-52(%rbp), %rdx
	callq	_regmap_read
	movq	_ASPEED_MCR_CONF_DRAM_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-52(%rbp), %eax
	jne	LBB0_5
## %bb.6:
	movq	_MEM_DDR3@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	movq	_MEM_DDR4@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
	movq	16(%rbx), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %rcx
	movl	%eax, (%rcx)
	movq	_EDAC_SECDED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rcx)
	movl	%r15d, %eax
	cltd
	idivl	8(%rbx)
	movl	%eax, 4(%rcx)
	movl	(%r12), %edi
	movl	(%rbx), %edx
	leaq	L_.str.4(%rip), %rsi
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_8:
	movl	%r14d, %eax
	addq	$24, %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	"dt: missing /memory node\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.2:                               ## @.str.2
	.asciz	"dt: failed requesting resource for /memory node\n"

L_.str.3:                               ## @.str.3
	.asciz	"dt: /memory node resources: first page r.start=0x%x, resource_size=0x%x, PAGE_SHIFT macro=0x%x\n"

	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_aspeed_regmap,4,2              ## @aspeed_regmap
	.comm	_ASPEED_MCR_CONF,4,2            ## @ASPEED_MCR_CONF
	.comm	_ASPEED_MCR_CONF_DRAM_TYPE,4,2  ## @ASPEED_MCR_CONF_DRAM_TYPE
	.comm	_MEM_DDR4,4,2                   ## @MEM_DDR4
	.comm	_MEM_DDR3,4,2                   ## @MEM_DDR3
	.comm	_EDAC_SECDED,4,2                ## @EDAC_SECDED
L_.str.4:                               ## @.str.4
	.asciz	"initialized dimm with first_page=0x%lx and nr_pages=0x%x\n"

	.no_dead_strip	_init_csrows
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function init_csrows
_init_csrows:                           ; @init_csrows
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldr	x22, [x8]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_of_find_node_by_path
	cbz	x0, LBB0_3
; %bb.1:
	mov	x21, x0
	add	x2, sp, #24
	mov	w1, #0
	bl	_of_address_to_resource
	mov	x20, x0
	mov	x0, x21
	bl	_of_node_put
	ldr	w21, [x19]
	cbz	w20, LBB0_4
; %bb.2:
Lloh2:
	adrp	x1, l_.str.2@PAGE
Lloh3:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_dev_err
	b	LBB0_5
LBB0_3:
	ldr	w0, [x19]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh6:
	adrp	x8, _ENODEV@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_5
LBB0_4:
	ldr	w20, [sp, #24]
	add	x0, sp, #24
	bl	_resource_size
	mov	x3, x0
Lloh9:
	adrp	x23, _PAGE_SHIFT@GOTPAGE
Lloh10:
	ldr	x23, [x23, _PAGE_SHIFT@GOTPAGEOFF]
	ldr	w8, [x23]
	str	x8, [sp]
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x21
	mov	x2, x20
	bl	_dev_dbg
	ldr	w8, [sp, #24]
	ldr	w9, [x23]
	asr	w8, w8, w9
	str	w8, [x22]
	add	x0, sp, #24
	bl	_resource_size
	ldr	w8, [x23]
	asr	w20, w0, w8
	ldr	w8, [x22]
	add	w8, w20, w8
	sub	w8, w8, #1
	str	w8, [x22, #4]
Lloh13:
	adrp	x8, _aspeed_regmap@GOTPAGE
Lloh14:
	ldr	x8, [x8, _aspeed_regmap@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
Lloh16:
	adrp	x8, _ASPEED_MCR_CONF@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ASPEED_MCR_CONF@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	add	x2, sp, #20
	bl	_regmap_read
	ldr	w8, [sp, #20]
Lloh19:
	adrp	x9, _ASPEED_MCR_CONF_DRAM_TYPE@GOTPAGE
Lloh20:
	ldr	x9, [x9, _ASPEED_MCR_CONF_DRAM_TYPE@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
Lloh22:
	adrp	x10, _MEM_DDR4@GOTPAGE
Lloh23:
	ldr	x10, [x10, _MEM_DDR4@GOTPAGEOFF]
Lloh24:
	adrp	x11, _MEM_DDR3@GOTPAGE
Lloh25:
	ldr	x11, [x11, _MEM_DDR3@GOTPAGEOFF]
	tst	w9, w8
	csel	x8, x11, x10, eq
	ldr	w8, [x8]
	ldr	x9, [x22, #16]
	ldr	x9, [x9]
	ldr	x9, [x9]
Lloh26:
	adrp	x10, _EDAC_SECDED@GOTPAGE
Lloh27:
	ldr	x10, [x10, _EDAC_SECDED@GOTPAGEOFF]
	ldr	w11, [x22, #8]
	sdiv	w11, w20, w11
	stp	w8, w11, [x9]
Lloh28:
	ldr	w8, [x10]
	str	w8, [x9, #8]
	ldr	w0, [x19]
	ldr	w2, [x22]
Lloh29:
	adrp	x1, l_.str.4@PAGE
Lloh30:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x3, x20
	bl	_dev_dbg
	mov	w20, #0
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/memory"

l_.str.1:                               ; @.str.1
	.asciz	"dt: missing /memory node\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.2:                               ; @.str.2
	.asciz	"dt: failed requesting resource for /memory node\n"

l_.str.3:                               ; @.str.3
	.asciz	"dt: /memory node resources: first page r.start=0x%x, resource_size=0x%x, PAGE_SHIFT macro=0x%x\n"

	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_aspeed_regmap,4,2              ; @aspeed_regmap
	.comm	_ASPEED_MCR_CONF,4,2            ; @ASPEED_MCR_CONF
	.comm	_ASPEED_MCR_CONF_DRAM_TYPE,4,2  ; @ASPEED_MCR_CONF_DRAM_TYPE
	.comm	_MEM_DDR4,4,2                   ; @MEM_DDR4
	.comm	_MEM_DDR3,4,2                   ; @MEM_DDR3
	.comm	_EDAC_SECDED,4,2                ; @EDAC_SECDED
l_.str.4:                               ; @.str.4
	.asciz	"initialized dimm with first_page=0x%lx and nr_pages=0x%x\n"

	.no_dead_strip	_init_csrows
.subsections_via_symbols
