	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i5400_init_dimms
_i5400_init_dimms:                      ## @i5400_init_dimms
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	16(%rdi), %rax
	movl	4(%rax), %ecx
	imull	(%rax), %ecx
	testl	%ecx, %ecx
	jle	LBB0_1
## %bb.2:
	movq	%rdi, %r12
	movq	24(%rdi), %rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	incq	%r15
	movslq	(%rax), %rcx
	movslq	4(%rax), %rsi
	imulq	%rcx, %rsi
	cmpq	%rsi, %r15
	jge	LBB0_13
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	cmpl	$0, 8(%rax)
	jle	LBB0_12
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r15d, %eax
	shrl	%eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	%r15d, %eax
	andl	$1, %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	xorl	%r14d, %r14d
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=2
	movl	(%rcx), %eax
	movl	%eax, 8(%r12)
	incl	%ebx
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	-80(%rbp), %r15                 ## 8-byte Reload
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=2
	incq	%r14
	movq	16(%r12), %rax
	movslq	8(%rax), %rcx
	cmpq	%rcx, %r14
	jge	LBB0_12
LBB0_5:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	movl	%r15d, %edx
	callq	_determine_mtr
	movl	%eax, %r13d
	movl	%eax, %edi
	callq	_MTR_DIMMS_PRESENT
	testl	%eax, %eax
	je	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	movq	16(%r12), %rdi
	movq	(%r12), %rsi
	movl	8(%r12), %edx
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %ecx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	movl	%r14d, %r9d
	callq	_EDAC_DIMM_PTR
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, %r12
	movq	8(%rcx), %rax
	movq	(%rax,%r14,8), %rax
	movslq	(%rax,%r15,4), %r15
	imulq	$274877907, %r15, %r9           ## imm = 0x10624DD3
	movq	%r9, %rax
	shrq	$63, %rax
	sarq	$38, %r9
	addl	%eax, %r9d
	imull	$1000, %r9d, %eax               ## imm = 0x3E8
	movl	%r15d, %ecx
	subl	%eax, %ecx
	movl	%ecx, (%rsp)
	movl	$2, %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%r14d, %r8d
                                        ## kill: def $r9d killed $r9d killed $r9
	callq	_edac_dbg
	shll	$8, %r15d
	movl	%r15d, (%r12)
	movl	$8, 4(%r12)
	movl	%r13d, %edi
	callq	_MTR_DRAM_WIDTH
	movq	_DEV_X4@GOTPCREL(%rip), %rcx
	cmpl	$8, %eax
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=2
	movq	_DEV_X8@GOTPCREL(%rip), %rcx
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=2
	movl	(%rcx), %eax
	movl	%eax, 16(%r12)
	movq	_MEM_FB_DDR2@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r12)
	movl	%r13d, %edi
	callq	_MTR_DRAM_WIDTH
	movq	_EDAC_S4ECD4ED@GOTPCREL(%rip), %rcx
	cmpl	$8, %eax
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=2
	movq	_EDAC_S8ECD8ED@GOTPCREL(%rip), %rcx
	jmp	LBB0_10
LBB0_13:
	cmpl	$1, %ebx
	jne	LBB0_15
## %bb.14:
	movq	_EDAC_SECDED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%r12), %rcx
	movq	(%rcx), %rcx
	movl	%eax, (%rcx)
	movl	$1, %ebx
	jmp	LBB0_15
LBB0_1:
	xorl	%ebx, %ebx
LBB0_15:
	xorl	%eax, %eax
	testl	%ebx, %ebx
	sete	%al
	addq	$56, %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	"dimm (branch %d channel %d slot %d): %d.%03d GB\n"

	.comm	_DEV_X8,4,2                     ## @DEV_X8
	.comm	_DEV_X4,4,2                     ## @DEV_X4
	.comm	_MEM_FB_DDR2,4,2                ## @MEM_FB_DDR2
	.comm	_EDAC_S8ECD8ED,4,2              ## @EDAC_S8ECD8ED
	.comm	_EDAC_S4ECD4ED,4,2              ## @EDAC_S4ECD4ED
	.comm	_EDAC_SECDED,4,2                ## @EDAC_SECDED
	.no_dead_strip	_i5400_init_dimms
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i5400_init_dimms
_i5400_init_dimms:                      ; @i5400_init_dimms
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	x8, [x0, #16]
	ldp	w9, w10, [x8]
	mul	w9, w10, w9
	cmp	w9, #1
	b.lt	LBB0_10
; %bb.1:
	mov	x19, x0
	mov	x20, #0
	mov	w28, #0
	ldr	x21, [x0, #24]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x20, x20, #1
	ldpsw	x9, x10, [x8]
	mul	x9, x10, x9
	cmp	x20, x9
	b.ge	LBB0_8
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	ldr	w9, [x8, #8]
	cmp	w9, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x23, #0
	ubfx	x24, x20, #1, #31
	and	w25, w20, #0x1
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=2
	add	x23, x23, #1
	ldr	x8, [x19, #16]
	ldrsw	x9, [x8, #8]
	cmp	x23, x9
	b.ge	LBB0_2
LBB0_6:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x21
	mov	x1, x23
	mov	x2, x20
	bl	_determine_mtr
	mov	x26, x0
	bl	_MTR_DIMMS_PRESENT
	cbz	w0, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	x0, [x19, #16]
	ldr	x1, [x19]
	ldr	w2, [x19, #8]
	mov	x3, x24
	mov	x4, x25
	mov	x5, x23
	bl	_EDAC_DIMM_PTR
	mov	x27, x0
	ldr	x8, [x21, #8]
	ldr	x8, [x8, x23, lsl #3]
	ldr	w22, [x8, x20, lsl #2]
	mov	w8, #19923
	movk	w8, #4194, lsl #16
	smull	x8, w22, w8
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w5, w8, w9
	mov	w8, #1000
	msub	w6, w5, w8, w22
	mov	w0, #2
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x24
	mov	x3, x25
	mov	x4, x23
	bl	_edac_dbg
	lsl	w10, w22, #8
	mov	w8, #8
	stp	w10, w8, [x27]
	mov	x0, x26
	bl	_MTR_DRAM_WIDTH
	cmp	w0, #8
Lloh2:
	adrp	x8, _DEV_X8@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DEV_X8@GOTPAGEOFF]
Lloh4:
	adrp	x9, _DEV_X4@GOTPAGE
Lloh5:
	ldr	x9, [x9, _DEV_X4@GOTPAGEOFF]
	csel	x8, x8, x9, eq
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _MEM_FB_DDR2@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MEM_FB_DDR2@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	stp	w9, w8, [x27, #12]
	mov	x0, x26
	bl	_MTR_DRAM_WIDTH
	cmp	w0, #8
Lloh9:
	adrp	x8, _EDAC_S8ECD8ED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EDAC_S8ECD8ED@GOTPAGEOFF]
Lloh11:
	adrp	x9, _EDAC_S4ECD4ED@GOTPAGE
Lloh12:
	ldr	x9, [x9, _EDAC_S4ECD4ED@GOTPAGEOFF]
	csel	x8, x8, x9, eq
	ldr	w8, [x8]
	str	w8, [x27, #8]
	add	w28, w28, #1
	b	LBB0_5
LBB0_8:
	cmp	w28, #1
	b.ne	LBB0_11
; %bb.9:
Lloh13:
	adrp	x8, _EDAC_SECDED@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EDAC_SECDED@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	ldr	x9, [x19]
	ldr	x9, [x9]
	str	w8, [x9]
	b	LBB0_11
LBB0_10:
	mov	w28, #0
LBB0_11:
	cmp	w28, #0
	cset	w0, eq
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dimm (branch %d channel %d slot %d): %d.%03d GB\n"

	.comm	_DEV_X8,4,2                     ; @DEV_X8
	.comm	_DEV_X4,4,2                     ; @DEV_X4
	.comm	_MEM_FB_DDR2,4,2                ; @MEM_FB_DDR2
	.comm	_EDAC_S8ECD8ED,4,2              ; @EDAC_S8ECD8ED
	.comm	_EDAC_S4ECD4ED,4,2              ; @EDAC_S4ECD4ED
	.comm	_EDAC_SECDED,4,2                ; @EDAC_SECDED
	.no_dead_strip	_i5400_init_dimms
.subsections_via_symbols
