	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i5400_init_csrows
_i5400_init_csrows:                     ## @i5400_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, -64(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %rdx
	movl	4(%rdx), %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	testl	%eax, %eax
	jle	LBB0_1
## %bb.2:
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	xorl	%ebx, %ebx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	(%rcx), %eax
	movl	%eax, 24(%r14,%r15,8)
	movq	_EDAC_S8ECD8ED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%r14,%r15,8)
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movq	%r13, %rdx
LBB0_19:                                ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	cmpq	-56(%rbp), %rbx                 ## 8-byte Folded Reload
	je	LBB0_20
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_11 Depth 2
                                        ##     Child Loop BB0_15 Depth 2
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %r14
	leaq	(%rbx,%rbx,4), %r15
	movl	%ebx, (%r14,%r15,8)
	movq	%rdx, %r13
	movq	%rdx, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_determine_mtr
	movl	%eax, %r12d
	movl	%eax, %edi
	callq	_MTR_DIMMS_PRESENT
	movq	%r13, %rdx
	testl	%eax, %eax
	je	LBB0_19
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	leal	(,%rbx,4), %eax
	leal	(%rax,%rax,4), %ecx
	movq	%rcx, 32(%r14,%r15,8)
	leal	(%rax,%rax,4), %eax
	addl	$9, %eax
	movl	%eax, 4(%r14,%r15,8)
	movabsq	$34359742463, %rax              ## imm = 0x800000FFF
	movq	%rax, 8(%r14,%r15,8)
	movl	(%rdx), %eax
	testl	%eax, %eax
	jle	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%rdx), %rcx
	movq	(%rcx,%rbx,8), %rcx
	cmpl	$4, %eax
	jae	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%edx, %edx
	xorl	%esi, %esi
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	xorl	%esi, %esi
	jmp	LBB0_16
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %edx
	andl	$-4, %edx
	leaq	-4(%rdx), %rsi
	movq	%rsi, %r8
	shrq	$2, %r8
	incq	%r8
	testq	%rsi, %rsi
	je	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%r8, %rsi
	andq	$-2, %rsi
	pxor	%xmm0, %xmm0
	xorl	%edi, %edi
	pxor	%xmm1, %xmm1
	.p2align	4, 0x90
LBB0_11:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movdqu	(%rcx,%rdi,8), %xmm2
	movdqu	16(%rcx,%rdi,8), %xmm3
	movdqu	32(%rcx,%rdi,8), %xmm4
	movdqu	48(%rcx,%rdi,8), %xmm5
	pshufd	$232, %xmm2, %xmm2              ## xmm2 = xmm2[0,2,2,3]
	paddd	%xmm0, %xmm2
	pshufd	$232, %xmm3, %xmm3              ## xmm3 = xmm3[0,2,2,3]
	paddd	%xmm1, %xmm3
	pshufd	$232, %xmm4, %xmm0              ## xmm0 = xmm4[0,2,2,3]
	paddd	%xmm2, %xmm0
	pshufd	$232, %xmm5, %xmm1              ## xmm1 = xmm5[0,2,2,3]
	paddd	%xmm3, %xmm1
	addq	$8, %rdi
	addq	$-2, %rsi
	jne	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	testb	$1, %r8b
	je	LBB0_14
LBB0_13:                                ##   in Loop: Header=BB0_3 Depth=1
	movdqu	(%rcx,%rdi,8), %xmm2
	movdqu	16(%rcx,%rdi,8), %xmm3
	pshufd	$232, %xmm2, %xmm2              ## xmm2 = xmm2[0,2,2,3]
	paddd	%xmm2, %xmm0
	pshufd	$232, %xmm3, %xmm2              ## xmm2 = xmm3[0,2,2,3]
	paddd	%xmm2, %xmm1
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	paddd	%xmm1, %xmm0
	pshufd	$85, %xmm0, %xmm1               ## xmm1 = xmm0[1,1,1,1]
	paddd	%xmm0, %xmm1
	movd	%xmm1, %esi
	cmpq	%rax, %rdx
	je	LBB0_16
	.p2align	4, 0x90
LBB0_15:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	addl	(%rcx,%rdx,8), %esi
	incq	%rdx
	cmpq	%rdx, %rax
	jne	LBB0_15
LBB0_16:                                ##   in Loop: Header=BB0_3 Depth=1
	shll	$8, %esi
	movl	%esi, 16(%r14,%r15,8)
	movq	_MEM_FB_DDR2@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%r14,%r15,8)
	movl	%r12d, %edi
	callq	_MTR_DRAM_WIDTH
	movq	_DEV_X8@GOTPCREL(%rip), %rcx
	testq	%rax, %rax
	jne	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	_DEV_X4@GOTPCREL(%rip), %rcx
	jmp	LBB0_18
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	pxor	%xmm0, %xmm0
	xorl	%edi, %edi
	pxor	%xmm1, %xmm1
	testb	$1, %r8b
	jne	LBB0_13
	jmp	LBB0_14
LBB0_1:
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_20:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MEM_FB_DDR2,4,2                ## @MEM_FB_DDR2
	.comm	_DEV_X8,4,2                     ## @DEV_X8
	.comm	_DEV_X4,4,2                     ## @DEV_X4
	.comm	_EDAC_S8ECD8ED,4,2              ## @EDAC_S8ECD8ED
	.no_dead_strip	_i5400_init_csrows
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function i5400_init_csrows
lCPI0_0:
	.long	4095                            ; 0xfff
	.long	8                               ; 0x8
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_i5400_init_csrows:                     ; @i5400_init_csrows
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-112]!            ; 16-byte Folded Spill
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	ldr	x20, [x0, #8]
	ldr	w24, [x20, #4]
	cmp	w24, #1
	b.lt	LBB0_14
; %bb.1:
	mov	x19, x0
	mov	x21, #0
	mov	w23, #1
	mov	w25, #40
Lloh0:
	adrp	x8, lCPI0_0@PAGE
Lloh1:
	ldr	d8, [x8, lCPI0_0@PAGEOFF]
Lloh2:
	adrp	x28, _DEV_X8@GOTPAGE
Lloh3:
	ldr	x28, [x28, _DEV_X8@GOTPAGEOFF]
Lloh4:
	adrp	x26, _EDAC_S8ECD8ED@GOTPAGE
Lloh5:
	ldr	x26, [x26, _EDAC_S8ECD8ED@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	w11, #0
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	lsl	w8, w11, #8
	madd	x27, x21, x25, x27
	str	w8, [x27, #16]
Lloh6:
	adrp	x8, _MEM_FB_DDR2@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MEM_FB_DDR2@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x27, #28]
	mov	x0, x22
	bl	_MTR_DRAM_WIDTH
	mov	w23, #0
	cmp	x0, #0
Lloh9:
	adrp	x8, _DEV_X4@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DEV_X4@GOTPAGEOFF]
	csel	x8, x8, x28, eq
	ldr	w8, [x8]
	str	w8, [x27, #24]
	ldr	w8, [x26]
	str	w8, [x27, #20]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x21, x21, #1
	cmp	x21, x24
	b.eq	LBB0_15
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
                                        ;     Child Loop BB0_13 Depth 2
	ldr	x27, [x19]
	mul	x8, x21, x25
	str	w21, [x27, x8]
	mov	x0, x20
	mov	x1, x21
	mov	w2, #0
	bl	_determine_mtr
	mov	x22, x0
	bl	_MTR_DIMMS_PRESENT
	cbz	w0, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	w8, w21, w21, lsl #2
	lsl	w8, w8, #2
	madd	x9, x21, x25, x27
	str	x8, [x9, #32]
	add	w8, w8, #9
	str	w8, [x9, #4]
	str	d8, [x9, #8]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x20, #8]
	ldr	x9, [x9, x21, lsl #3]
	cmp	w8, #8
	b.hs	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x10, #0
	mov	w11, #0
	b	LBB0_12
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	and	x10, x8, #0xfffffff8
	movi.2d	v0, #0000000000000000
	add	x11, x9, #32
	mov	x12, x10
	movi.2d	v1, #0000000000000000
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
LBB0_10:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	q4, q5, [x11, #-32]
	ldp	q6, q7, [x11], #64
	xtn.2s	v4, v4
	xtn.2s	v5, v5
	xtn.2s	v6, v6
	xtn.2s	v7, v7
	add.2s	v0, v0, v4
	add.2s	v1, v1, v5
	add.2s	v2, v2, v6
	add.2s	v3, v3, v7
	subs	x12, x12, #8
	b.ne	LBB0_10
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	add.2s	v0, v1, v0
	add.2s	v0, v2, v0
	add.2s	v0, v3, v0
	addp.2s	v0, v0, v0
	fmov	w11, s0
	cmp	x10, x8
	b.eq	LBB0_3
LBB0_12:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x9, x9, x10, lsl #3
	sub	x8, x8, x10
LBB0_13:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w10, [x9], #8
	add	w11, w11, w10
	subs	x8, x8, #1
	b.ne	LBB0_13
	b	LBB0_3
LBB0_14:
	mov	w23, #1
LBB0_15:
	mov	x0, x23
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #112              ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdr	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MEM_FB_DDR2,4,2                ; @MEM_FB_DDR2
	.comm	_DEV_X8,4,2                     ; @DEV_X8
	.comm	_DEV_X4,4,2                     ; @DEV_X4
	.comm	_EDAC_S8ECD8ED,4,2              ; @EDAC_S8ECD8ED
	.no_dead_strip	_i5400_init_csrows
.subsections_via_symbols
