	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cpc925_get_sdram_scrub_rate
_cpc925_get_sdram_scrub_rate:           ## @cpc925_get_sdram_scrub_rate
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	_REG_MSCR_OFFSET@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	addq	(%rax), %rdi
	callq	___raw_readl
	movl	%eax, %ebx
	movq	_MSCR_SI_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	andl	%ebx, %r12d
	movq	_MSCR_SI_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %r12d
	leaq	L_.str(%rip), %rsi
	xorl	%r15d, %r15d
	xorl	%edi, %edi
	movl	%ebx, %edx
	callq	_edac_dbg
	movq	_MSCR_SCRUB_MOD_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movq	_MSCR_BACKGR_SCRUB@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_2
## %bb.1:
	testl	%r12d, %r12d
	je	LBB0_2
## %bb.3:
	movq	_CPC925_SCRUB_BLOCK_SIZE@GOTPCREL(%rip), %rax
	imull	$64103, (%rax), %eax            ## imm = 0xFA67
	cltd
	idivl	%r12d
	movl	%eax, %r15d
	jmp	LBB0_4
LBB0_2:
	movq	_KERN_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	callq	_cpc925_mc_printk
LBB0_4:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_MSCR_OFFSET,8,3            ## @REG_MSCR_OFFSET
	.comm	_MSCR_SI_MASK,4,2               ## @MSCR_SI_MASK
	.comm	_MSCR_SI_SHIFT,4,2              ## @MSCR_SI_SHIFT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Mem Scrub Ctrl Register 0x%x\n"

	.comm	_MSCR_SCRUB_MOD_MASK,4,2        ## @MSCR_SCRUB_MOD_MASK
	.comm	_MSCR_BACKGR_SCRUB,4,2          ## @MSCR_BACKGR_SCRUB
	.comm	_KERN_INFO,4,2                  ## @KERN_INFO
L_.str.1:                               ## @.str.1
	.asciz	"Scrub mode not enabled\n"

	.comm	_CPC925_SCRUB_BLOCK_SIZE,4,2    ## @CPC925_SCRUB_BLOCK_SIZE
	.no_dead_strip	_cpc925_get_sdram_scrub_rate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cpc925_get_sdram_scrub_rate
_cpc925_get_sdram_scrub_rate:           ; @cpc925_get_sdram_scrub_rate
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x0
	ldr	x8, [x0]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _REG_MSCR_OFFSET@GOTPAGE
Lloh1:
	ldr	x9, [x9, _REG_MSCR_OFFSET@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	___raw_readl
	mov	x20, x0
Lloh3:
	adrp	x8, _MSCR_SI_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MSCR_SI_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh6:
	adrp	x9, _MSCR_SI_SHIFT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MSCR_SI_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	asr	w21, w8, w9
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #0
	mov	x2, x20
	bl	_edac_dbg
Lloh11:
	adrp	x8, _MSCR_SCRUB_MOD_MASK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MSCR_SCRUB_MOD_MASK@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	and	w8, w8, w20
Lloh14:
	adrp	x9, _MSCR_BACKGR_SCRUB@GOTPAGE
Lloh15:
	ldr	x9, [x9, _MSCR_BACKGR_SCRUB@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	cmp	w8, w9
	ccmp	w21, #0, #4, eq
	b.ne	LBB0_2
; %bb.1:
Lloh17:
	adrp	x8, _KERN_INFO@GOTPAGE
Lloh18:
	ldr	x8, [x8, _KERN_INFO@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
Lloh20:
	adrp	x2, l_.str.1@PAGE
Lloh21:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_cpc925_mc_printk
	mov	w0, #0
	b	LBB0_3
LBB0_2:
Lloh22:
	adrp	x8, _CPC925_SCRUB_BLOCK_SIZE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _CPC925_SCRUB_BLOCK_SIZE@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	mov	w9, #64103
	mul	w8, w8, w9
	sdiv	w0, w8, w21
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_MSCR_OFFSET,8,3            ; @REG_MSCR_OFFSET
	.comm	_MSCR_SI_MASK,4,2               ; @MSCR_SI_MASK
	.comm	_MSCR_SI_SHIFT,4,2              ; @MSCR_SI_SHIFT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Mem Scrub Ctrl Register 0x%x\n"

	.comm	_MSCR_SCRUB_MOD_MASK,4,2        ; @MSCR_SCRUB_MOD_MASK
	.comm	_MSCR_BACKGR_SCRUB,4,2          ; @MSCR_BACKGR_SCRUB
	.comm	_KERN_INFO,4,2                  ; @KERN_INFO
l_.str.1:                               ; @.str.1
	.asciz	"Scrub mode not enabled\n"

	.comm	_CPC925_SCRUB_BLOCK_SIZE,4,2    ; @CPC925_SCRUB_BLOCK_SIZE
	.no_dead_strip	_cpc925_get_sdram_scrub_rate
.subsections_via_symbols
