	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i7300_get_mc_regs
_i7300_get_mc_regs:                     ## @i7300_get_mc_regs
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %r15
	movl	40(%r15), %edi
	movq	_AMBASE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	32(%r15), %rdx
	callq	_pci_read_config_dword
	movl	32(%r15), %esi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_debugf2
	movl	24(%r15), %edi
	movq	_TOLM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdx
	callq	_pci_read_config_word
	movl	(%r15), %edx
	sarl	$12, %edx
	movl	%edx, (%r15)
	leaq	L_.str.1(%rip), %rdi
	movl	%edx, %esi
	xorl	%eax, %eax
	callq	_debugf2
	movslq	(%r15), %rcx
	imulq	$1000, %rcx, %rax               ## imm = 0x3E8
	shrq	$2, %rax
	movslq	%eax, %rdx
	imulq	$274877907, %rdx, %rsi          ## imm = 0x10624DD3
	movq	%rsi, %rax
	shrq	$63, %rax
	sarq	$38, %rsi
	addl	%eax, %esi
	imull	$1000, %esi, %eax               ## imm = 0x3E8
	subl	%eax, %edx
	shll	$28, %ecx
	leaq	L_.str.2(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
                                        ## kill: def $edx killed $edx killed $rdx
                                        ## kill: def $ecx killed $ecx killed $rcx
	xorl	%eax, %eax
	callq	_debugf2
	movl	24(%r15), %edi
	movq	_MC_SETTINGS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	4(%r15), %rbx
	movq	%rbx, %rdx
	callq	_pci_read_config_dword
	movl	24(%r15), %edi
	movq	_MC_SETTINGS_A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	8(%r15), %rdx
	callq	_pci_read_config_dword
	movl	8(%r15), %edi
	callq	_IS_SINGLE_MODE
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_debugf0
	jmp	LBB0_3
LBB0_2:
	movl	(%rbx), %edi
	callq	_IS_MIRRORED
	testq	%rax, %rax
	leaq	L_.str.6(%rip), %rax
	leaq	L_.str.5(%rip), %rsi
	cmoveq	%rax, %rsi
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_debugf0
LBB0_3:
	movl	4(%r15), %edi
	callq	_IS_ECC_ENABLED
	testq	%rax, %rax
	leaq	L_.str.9(%rip), %r13
	leaq	L_.str.8(%rip), %r12
	movq	%r12, %rsi
	cmoveq	%r13, %rsi
	leaq	L_.str.7(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_debugf0
	movl	4(%r15), %edi
	callq	_IS_RETRY_ENABLED
	testq	%rax, %rax
	cmoveq	%r13, %r12
	leaq	L_.str.10(%rip), %rdi
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_debugf0
	movl	24(%r15), %edi
	movq	_MIR0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	16(%r15), %rdx
	callq	_pci_read_config_word
	movl	24(%r15), %edi
	movq	_MIR1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	16(%r15), %rdx
	addq	$4, %rdx
	callq	_pci_read_config_word
	movl	24(%r15), %edi
	movq	_MIR2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	16(%r15), %rdx
	addq	$8, %rdx
	callq	_pci_read_config_word
	movq	_MAX_MIR@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	jle	LBB0_5
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r15), %rsi
	movl	%ebx, %edi
	callq	_decode_mir
	incl	%ebx
	cmpl	(%r12), %ebx
	jl	LBB0_4
LBB0_5:
	movq	%r14, %rdi
	callq	_i7300_init_csrows
	testl	%eax, %eax
	js	LBB0_7
## %bb.6:
	movq	%r15, %rdi
	callq	_print_dimm_size
	xorl	%eax, %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AMBASE,4,2                     ## @AMBASE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"AMBASE= 0x%lx\n"

	.comm	_TOLM,4,2                       ## @TOLM
L_.str.1:                               ## @.str.1
	.asciz	"TOLM (number of 256M regions) =%u (0x%x)\n"

L_.str.2:                               ## @.str.2
	.asciz	"Actual TOLM byte addr=%u.%03u GB (0x%x)\n"

	.comm	_MC_SETTINGS,4,2                ## @MC_SETTINGS
	.comm	_MC_SETTINGS_A,4,2              ## @MC_SETTINGS_A
L_.str.3:                               ## @.str.3
	.asciz	"Memory controller operating on single mode\n"

L_.str.4:                               ## @.str.4
	.asciz	"Memory controller operating on %s mode\n"

L_.str.5:                               ## @.str.5
	.asciz	"mirrored"

L_.str.6:                               ## @.str.6
	.asciz	"non-mirrored"

L_.str.7:                               ## @.str.7
	.asciz	"Error detection is %s\n"

L_.str.8:                               ## @.str.8
	.asciz	"enabled"

L_.str.9:                               ## @.str.9
	.asciz	"disabled"

L_.str.10:                              ## @.str.10
	.asciz	"Retry is %s\n"

	.comm	_MIR0,4,2                       ## @MIR0
	.comm	_MIR1,4,2                       ## @MIR1
	.comm	_MIR2,4,2                       ## @MIR2
	.comm	_MAX_MIR,4,2                    ## @MAX_MIR
	.no_dead_strip	_i7300_get_mc_regs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i7300_get_mc_regs
_i7300_get_mc_regs:                     ; @i7300_get_mc_regs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x0
	ldr	x19, [x0]
	ldr	w0, [x19, #40]
Lloh0:
	adrp	x8, _AMBASE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AMBASE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, x19, #32
	bl	_pci_read_config_dword
	ldr	w1, [x19, #32]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_debugf2
	ldr	w0, [x19, #24]
Lloh5:
	adrp	x8, _TOLM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TOLM@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x2, x19
	bl	_pci_read_config_word
	ldr	w8, [x19]
	asr	w1, w8, #12
	str	w1, [x19]
	str	x1, [sp]
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_debugf2
	ldrsw	x8, [x19]
	mov	w9, #1000
	mul	x10, x8, x9
	lsr	x10, x10, #2
	mov	w11, #19923
	movk	w11, #4194, lsl #16
	smull	x11, w10, w11
	lsr	x12, x11, #32
	lsr	x11, x11, #63
	add	w1, w11, w12, asr #6
	msub	w9, w1, w9, w10
	lsl	w8, w8, #28
	stp	x9, x8, [sp]
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_debugf2
	ldr	w0, [x19, #24]
Lloh12:
	adrp	x8, _MC_SETTINGS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MC_SETTINGS@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	add	x21, x19, #4
	mov	x2, x21
	bl	_pci_read_config_dword
	ldr	w0, [x19, #24]
Lloh15:
	adrp	x8, _MC_SETTINGS_A@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MC_SETTINGS_A@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	add	x2, x19, #8
	bl	_pci_read_config_dword
	ldr	w0, [x19, #8]
	bl	_IS_SINGLE_MODE
	cbz	x0, LBB0_2
; %bb.1:
Lloh18:
	adrp	x0, l_.str.3@PAGE
Lloh19:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_3
LBB0_2:
	ldr	w0, [x21]
	bl	_IS_MIRRORED
Lloh20:
	adrp	x8, l_.str.5@PAGE
Lloh21:
	add	x8, x8, l_.str.5@PAGEOFF
Lloh22:
	adrp	x9, l_.str.6@PAGE
Lloh23:
	add	x9, x9, l_.str.6@PAGEOFF
	cmp	x0, #0
	csel	x8, x9, x8, eq
	str	x8, [sp]
Lloh24:
	adrp	x0, l_.str.4@PAGE
Lloh25:
	add	x0, x0, l_.str.4@PAGEOFF
LBB0_3:
	bl	_debugf0
	ldr	w0, [x19, #4]
	bl	_IS_ECC_ENABLED
Lloh26:
	adrp	x21, l_.str.8@PAGE
Lloh27:
	add	x21, x21, l_.str.8@PAGEOFF
Lloh28:
	adrp	x22, l_.str.9@PAGE
Lloh29:
	add	x22, x22, l_.str.9@PAGEOFF
	cmp	x0, #0
	csel	x8, x22, x21, eq
	str	x8, [sp]
Lloh30:
	adrp	x0, l_.str.7@PAGE
Lloh31:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_debugf0
	ldr	w0, [x19, #4]
	bl	_IS_RETRY_ENABLED
	cmp	x0, #0
	csel	x8, x22, x21, eq
	str	x8, [sp]
Lloh32:
	adrp	x0, l_.str.10@PAGE
Lloh33:
	add	x0, x0, l_.str.10@PAGEOFF
	bl	_debugf0
	ldr	w0, [x19, #24]
Lloh34:
	adrp	x8, _MIR0@GOTPAGE
Lloh35:
	ldr	x8, [x8, _MIR0@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
	ldr	x2, [x19, #16]
	bl	_pci_read_config_word
	ldr	w0, [x19, #24]
Lloh37:
	adrp	x8, _MIR1@GOTPAGE
Lloh38:
	ldr	x8, [x8, _MIR1@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
	ldr	x8, [x19, #16]
	add	x2, x8, #4
	bl	_pci_read_config_word
	ldr	w0, [x19, #24]
Lloh40:
	adrp	x8, _MIR2@GOTPAGE
Lloh41:
	ldr	x8, [x8, _MIR2@GOTPAGEOFF]
Lloh42:
	ldr	w1, [x8]
	ldr	x8, [x19, #16]
	add	x2, x8, #8
	bl	_pci_read_config_word
Lloh43:
	adrp	x22, _MAX_MIR@GOTPAGE
Lloh44:
	ldr	x22, [x22, _MAX_MIR@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.4:
	mov	w21, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x1, [x19, #16]
	mov	x0, x21
	bl	_decode_mir
	add	w21, w21, #1
	ldr	w8, [x22]
	cmp	w21, w8
	b.lt	LBB0_5
LBB0_6:
	mov	x0, x20
	bl	_i7300_init_csrows
	tbnz	w0, #31, LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_print_dimm_size
	mov	w0, #0
LBB0_8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_AMBASE,4,2                     ; @AMBASE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"AMBASE= 0x%lx\n"

	.comm	_TOLM,4,2                       ; @TOLM
l_.str.1:                               ; @.str.1
	.asciz	"TOLM (number of 256M regions) =%u (0x%x)\n"

l_.str.2:                               ; @.str.2
	.asciz	"Actual TOLM byte addr=%u.%03u GB (0x%x)\n"

	.comm	_MC_SETTINGS,4,2                ; @MC_SETTINGS
	.comm	_MC_SETTINGS_A,4,2              ; @MC_SETTINGS_A
l_.str.3:                               ; @.str.3
	.asciz	"Memory controller operating on single mode\n"

l_.str.4:                               ; @.str.4
	.asciz	"Memory controller operating on %s mode\n"

l_.str.5:                               ; @.str.5
	.asciz	"mirrored"

l_.str.6:                               ; @.str.6
	.asciz	"non-mirrored"

l_.str.7:                               ; @.str.7
	.asciz	"Error detection is %s\n"

l_.str.8:                               ; @.str.8
	.asciz	"enabled"

l_.str.9:                               ; @.str.9
	.asciz	"disabled"

l_.str.10:                              ; @.str.10
	.asciz	"Retry is %s\n"

	.comm	_MIR0,4,2                       ; @MIR0
	.comm	_MIR1,4,2                       ; @MIR1
	.comm	_MIR2,4,2                       ; @MIR2
	.comm	_MAX_MIR,4,2                    ; @MAX_MIR
	.no_dead_strip	_i7300_get_mc_regs
.subsections_via_symbols
