	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mv64x60_mc_check
_mv64x60_mc_check:                      ## @mv64x60_mc_check
	.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	8(%rdi), %r13
	movq	_MV64X60_SDRAM_ERR_ADDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r13), %rdi
	callq	_readl
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	%eax, %r12d
	movl	%eax, %ebx
	andl	$-4, %ebx
	movq	_MV64X60_SDRAM_ERR_ECC_RCVD@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r13), %rdi
	callq	_readl
	movl	%eax, %r15d
	movq	_MV64X60_SDRAM_ERR_ECC_CALC@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r13), %rdi
	callq	_readl
	xorl	%eax, %r15d
	xorl	%eax, %eax
	testb	$1, %r12b
	movq	_HW_EVENT_ERR_UNCORRECTED@GOTPCREL(%rip), %rcx
	cmoveq	_HW_EVENT_ERR_CORRECTED@GOTPCREL(%rip), %rcx
	cmovnel	%eax, %r15d
	movl	(%rcx), %edi
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%ebx, %eax
	sarl	%cl, %eax
	movq	_PAGE_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %ebx
	movl	(%r14), %r10d
	subq	$8, %rsp
	leaq	L_.str(%rip), %r11
	movq	%r14, %rsi
	movl	$1, %edx
	movl	%eax, %ecx
	movl	%ebx, %r8d
	movl	%r15d, %r9d
	pushq	%r11
	pushq	%r10
	pushq	$-1
	pushq	$0
	pushq	$0
	callq	_edac_mc_handle_error
	addq	$48, %rsp
	movq	_MV64X60_SDRAM_ERR_ADDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r13), %rsi
	xorl	%edi, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writel                         ## TAILCALL
LBB0_1:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MV64X60_SDRAM_ERR_ADDR,8,3     ## @MV64X60_SDRAM_ERR_ADDR
	.comm	_MV64X60_SDRAM_ERR_ECC_RCVD,8,3 ## @MV64X60_SDRAM_ERR_ECC_RCVD
	.comm	_MV64X60_SDRAM_ERR_ECC_CALC,8,3 ## @MV64X60_SDRAM_ERR_ECC_CALC
	.comm	_HW_EVENT_ERR_CORRECTED,4,2     ## @HW_EVENT_ERR_CORRECTED
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_PAGE_MASK,4,2                  ## @PAGE_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.space	1

	.comm	_HW_EVENT_ERR_UNCORRECTED,4,2   ## @HW_EVENT_ERR_UNCORRECTED
	.no_dead_strip	_mv64x60_mc_check
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mv64x60_mc_check
_mv64x60_mc_check:                      ; @mv64x60_mc_check
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x22, [x0, #8]
	ldr	x8, [x22]
Lloh0:
	adrp	x23, _MV64X60_SDRAM_ERR_ADDR@GOTPAGE
Lloh1:
	ldr	x23, [x23, _MV64X60_SDRAM_ERR_ADDR@GOTPAGEOFF]
	ldr	x9, [x23]
	add	x0, x9, x8
	bl	_readl
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
	and	w24, w0, #0xfffffffc
	ldr	x8, [x22]
Lloh2:
	adrp	x9, _MV64X60_SDRAM_ERR_ECC_RCVD@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MV64X60_SDRAM_ERR_ECC_RCVD@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	mov	x21, x0
	ldr	x8, [x22]
Lloh5:
	adrp	x9, _MV64X60_SDRAM_ERR_ECC_CALC@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MV64X60_SDRAM_ERR_ECC_CALC@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	eor	w8, w0, w21
	tst	w20, #0x1
Lloh8:
	adrp	x9, _HW_EVENT_ERR_CORRECTED@GOTPAGE
Lloh9:
	ldr	x9, [x9, _HW_EVENT_ERR_CORRECTED@GOTPAGEOFF]
Lloh10:
	adrp	x10, _HW_EVENT_ERR_UNCORRECTED@GOTPAGE
Lloh11:
	ldr	x10, [x10, _HW_EVENT_ERR_UNCORRECTED@GOTPAGEOFF]
	csel	w5, w8, wzr, eq
	csel	x8, x9, x10, eq
	ldr	w0, [x8]
Lloh12:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	asr	w3, w24, w8
Lloh15:
	adrp	x8, _PAGE_MASK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PAGE_MASK@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	and	w4, w8, w24
	ldr	w8, [x19]
Lloh18:
	adrp	x9, l_.str@PAGE
Lloh19:
	add	x9, x9, l_.str@PAGEOFF
	str	x9, [sp, #8]
	mov	w9, #-1
	stp	w9, w8, [sp]
	mov	x1, x19
	mov	w2, #1
	mov	w6, #0
	mov	w7, #0
	bl	_edac_mc_handle_error
	ldr	x8, [x22]
	ldr	x9, [x23]
	add	x1, x9, x8
	mov	w0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_writel
LBB0_2:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_MV64X60_SDRAM_ERR_ADDR,8,3     ; @MV64X60_SDRAM_ERR_ADDR
	.comm	_MV64X60_SDRAM_ERR_ECC_RCVD,8,3 ; @MV64X60_SDRAM_ERR_ECC_RCVD
	.comm	_MV64X60_SDRAM_ERR_ECC_CALC,8,3 ; @MV64X60_SDRAM_ERR_ECC_CALC
	.comm	_HW_EVENT_ERR_CORRECTED,4,2     ; @HW_EVENT_ERR_CORRECTED
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_PAGE_MASK,4,2                  ; @PAGE_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.space	1

	.comm	_HW_EVENT_ERR_UNCORRECTED,4,2   ; @HW_EVENT_ERR_UNCORRECTED
	.no_dead_strip	_mv64x60_mc_check
.subsections_via_symbols
