	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xgene_edac_l3_check
_xgene_edac_l3_check:                   ## @xgene_edac_l3_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
	subq	$40, %rsp
	.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), %rbx
	movq	_L3C_ESR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%rbx), %rdi
	callq	_readl
	movl	%eax, %r12d
	movq	_L3C_ESR_UCERR_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_L3C_ESR_CERR_MASK@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	movl	%eax, %edx
	orl	%ecx, %edx
	testl	%r12d, %edx
	je	LBB0_19
## %bb.1:
	testl	%r12d, %ecx
	je	LBB0_3
## %bb.2:
	movl	4(%r14), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	movl	(%r15), %eax
LBB0_3:
	testl	%r12d, %eax
	je	LBB0_5
## %bb.4:
	movl	4(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_warn
LBB0_5:
	movq	_L3C_ELR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%rbx), %rdi
	callq	_readl
	movl	%eax, %r13d
	movq	_L3C_AELR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%rbx), %rdi
	callq	_readl
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movq	_L3C_BELR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%rbx), %rdi
	callq	_readl
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	_L3C_ESR_MULTIHIT_MASK@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_7
## %bb.6:
	movl	4(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_7:
	movq	_L3C_ESR_UCEVICT_MASK@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_9
## %bb.8:
	movl	4(%r14), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_9:
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	_L3C_ESR_MULTIUCERR_MASK@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_11
## %bb.10:
	movl	4(%r14), %edi
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_11:
	movq	_L3C_ESR_DATATAG_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	andl	%r12d, %ebx
	movl	4(%r14), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%r13d, %edi
	callq	_L3C_ELR_ERRSYN
	movl	%eax, %r15d
	movl	%r13d, %edi
	testl	%ebx, %ebx
	je	LBB0_13
## %bb.12:
	callq	_L3C_ELR_ERRGRP
	leaq	L_.str.5(%rip), %rsi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%r15d, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_14
LBB0_13:
	callq	_L3C_ELR_ERRWAY
	movl	%eax, %ebx
	movl	%r13d, %edi
	callq	_L3C_ELR_AGENTID
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	%r13d, %edi
	callq	_L3C_ELR_OPTYPE
	leaq	L_.str.6(%rip), %rsi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%r15d, %edx
	movl	%ebx, %ecx
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	movl	%eax, %r9d
	xorl	%eax, %eax
	callq	_dev_err
LBB0_14:
	movl	%r13d, -52(%rbp)                ## 4-byte Spill
	movl	4(%r14), %r15d
	movl	%r13d, %edi
	callq	_L3C_ELR_PADDRHIGH
	shll	$6, %eax
	movl	-60(%rbp), %r13d                ## 4-byte Reload
	movl	%r13d, %ebx
	sarl	$26, %ebx
	orl	%eax, %ebx
	shll	$6, %r13d
	movl	-56(%rbp), %edi                 ## 4-byte Reload
	callq	_L3C_BELR_BANK
	leaq	L_.str.7(%rip), %rsi
	movl	%r15d, %edi
	movl	%ebx, %edx
	movl	%r13d, %ecx
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_dev_err
	movl	4(%r14), %edi
	leaq	L_.str.8(%rip), %rsi
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_L3C_ESR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	addq	8(%rbx), %rsi
	xorl	%edi, %edi
	callq	_writel
	cmpl	$1, (%rbx)
	movq	_L3C_ESR_UCERR_MASK@GOTPCREL(%rip), %r15
	movq	_L3C_ESR_CERR_MASK@GOTPCREL(%rip), %rbx
	jg	LBB0_16
## %bb.15:
	movl	%r12d, %edi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	_xgene_edac_l3_promote_to_uc_err
	testq	%rax, %rax
	jne	LBB0_20
LBB0_16:
	testl	%r12d, (%rbx)
	je	LBB0_18
## %bb.17:
	movl	(%r14), %ecx
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_edac_device_handle_ce
LBB0_18:
	testl	%r12d, (%r15)
	je	LBB0_19
LBB0_20:
	movl	(%r14), %ecx
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_edac_device_handle_ue          ## TAILCALL
LBB0_19:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_L3C_ESR,8,3                    ## @L3C_ESR
	.comm	_L3C_ESR_UCERR_MASK,4,2         ## @L3C_ESR_UCERR_MASK
	.comm	_L3C_ESR_CERR_MASK,4,2          ## @L3C_ESR_CERR_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"L3C uncorrectable error\n"

L_.str.1:                               ## @.str.1
	.asciz	"L3C correctable error\n"

	.comm	_L3C_ELR,8,3                    ## @L3C_ELR
	.comm	_L3C_AELR,8,3                   ## @L3C_AELR
	.comm	_L3C_BELR,8,3                   ## @L3C_BELR
	.comm	_L3C_ESR_MULTIHIT_MASK,4,2      ## @L3C_ESR_MULTIHIT_MASK
L_.str.2:                               ## @.str.2
	.asciz	"L3C multiple hit error\n"

	.comm	_L3C_ESR_UCEVICT_MASK,4,2       ## @L3C_ESR_UCEVICT_MASK
L_.str.3:                               ## @.str.3
	.asciz	"L3C dropped eviction of line with error\n"

	.comm	_L3C_ESR_MULTIUCERR_MASK,4,2    ## @L3C_ESR_MULTIUCERR_MASK
L_.str.4:                               ## @.str.4
	.asciz	"L3C multiple uncorrectable error\n"

	.comm	_L3C_ESR_DATATAG_MASK,4,2       ## @L3C_ESR_DATATAG_MASK
L_.str.5:                               ## @.str.5
	.asciz	"L3C data error syndrome 0x%X group 0x%X\n"

L_.str.6:                               ## @.str.6
	.asciz	"L3C tag error syndrome 0x%X Way of Tag 0x%X Agent ID 0x%X Operation type 0x%X\n"

L_.str.7:                               ## @.str.7
	.asciz	"L3C error address 0x%08X.%08X bank %d\n"

L_.str.8:                               ## @.str.8
	.asciz	"L3C error status register value 0x%X\n"

	.no_dead_strip	_xgene_edac_l3_check
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xgene_edac_l3_check
_xgene_edac_l3_check:                   ; @xgene_edac_l3_check
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x19, x0
	ldr	x28, [x0, #8]
	ldr	x8, [x28, #8]
Lloh0:
	adrp	x9, _L3C_ESR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _L3C_ESR@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
Lloh3:
	adrp	x27, _L3C_ESR_UCERR_MASK@GOTPAGE
Lloh4:
	ldr	x27, [x27, _L3C_ESR_UCERR_MASK@GOTPAGEOFF]
	ldr	w9, [x27]
Lloh5:
	adrp	x21, _L3C_ESR_CERR_MASK@GOTPAGE
Lloh6:
	ldr	x21, [x21, _L3C_ESR_CERR_MASK@GOTPAGEOFF]
	ldr	w8, [x21]
	orr	w10, w8, w9
	tst	w10, w0
	b.eq	LBB0_20
; %bb.1:
	mov	x20, x0
	tst	w9, w0
	b.eq	LBB0_3
; %bb.2:
	ldr	w0, [x19, #4]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	ldr	w8, [x21]
LBB0_3:
	tst	w8, w20
	b.eq	LBB0_5
; %bb.4:
	ldr	w0, [x19, #4]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_warn
LBB0_5:
	ldr	x8, [x28, #8]
Lloh11:
	adrp	x9, _L3C_ELR@GOTPAGE
Lloh12:
	ldr	x9, [x9, _L3C_ELR@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	mov	x21, x0
	ldr	x8, [x28, #8]
Lloh14:
	adrp	x9, _L3C_AELR@GOTPAGE
Lloh15:
	ldr	x9, [x9, _L3C_AELR@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	mov	x22, x0
	ldr	x8, [x28, #8]
Lloh17:
	adrp	x9, _L3C_BELR@GOTPAGE
Lloh18:
	ldr	x9, [x9, _L3C_BELR@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	mov	x23, x0
Lloh20:
	adrp	x8, _L3C_ESR_MULTIHIT_MASK@GOTPAGE
Lloh21:
	ldr	x8, [x8, _L3C_ESR_MULTIHIT_MASK@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_7
; %bb.6:
	ldr	w0, [x19, #4]
Lloh23:
	adrp	x1, l_.str.2@PAGE
Lloh24:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
LBB0_7:
Lloh25:
	adrp	x8, _L3C_ESR_UCEVICT_MASK@GOTPAGE
Lloh26:
	ldr	x8, [x8, _L3C_ESR_UCEVICT_MASK@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_9
; %bb.8:
	ldr	w0, [x19, #4]
Lloh28:
	adrp	x1, l_.str.3@PAGE
Lloh29:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
LBB0_9:
Lloh30:
	adrp	x8, _L3C_ESR_MULTIUCERR_MASK@GOTPAGE
Lloh31:
	ldr	x8, [x8, _L3C_ESR_MULTIUCERR_MASK@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_11
; %bb.10:
	ldr	w0, [x19, #4]
Lloh33:
	adrp	x1, l_.str.4@PAGE
Lloh34:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_err
LBB0_11:
Lloh35:
	adrp	x8, _L3C_ESR_DATATAG_MASK@GOTPAGE
Lloh36:
	ldr	x8, [x8, _L3C_ESR_DATATAG_MASK@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	and	w26, w8, w20
	ldr	w24, [x19, #4]
	mov	x0, x21
	bl	_L3C_ELR_ERRSYN
	mov	x25, x0
	mov	x0, x21
	cbz	w26, LBB0_13
; %bb.12:
	bl	_L3C_ELR_ERRGRP
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x25, x0, [sp]
Lloh38:
	adrp	x1, l_.str.5@PAGE
Lloh39:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_14
LBB0_13:
	bl	_L3C_ELR_ERRWAY
	mov	x26, x0
	mov	x0, x21
	bl	_L3C_ELR_AGENTID
	mov	x27, x0
	mov	x0, x21
	bl	_L3C_ELR_OPTYPE
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x27, x0, [sp, #16]
Lloh40:
	adrp	x27, _L3C_ESR_UCERR_MASK@GOTPAGE
Lloh41:
	ldr	x27, [x27, _L3C_ESR_UCERR_MASK@GOTPAGEOFF]
                                        ; kill: def $w25 killed $w25 killed $x25 def $x25
	stp	x25, x26, [sp]
Lloh42:
	adrp	x1, l_.str.6@PAGE
Lloh43:
	add	x1, x1, l_.str.6@PAGEOFF
LBB0_14:
	mov	x0, x24
	bl	_dev_err
	ldr	w24, [x19, #4]
	mov	x0, x21
	bl	_L3C_ELR_PADDRHIGH
	lsl	w8, w0, #6
	orr	w25, w8, w22, asr #26
	lsl	w22, w22, #6
	mov	x0, x23
	bl	_L3C_BELR_BANK
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x22, x0, [sp, #8]
	str	x25, [sp]
Lloh44:
	adrp	x1, l_.str.7@PAGE
Lloh45:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x24
	bl	_dev_err
	ldr	w0, [x19, #4]
	str	x20, [sp]
Lloh46:
	adrp	x1, l_.str.8@PAGE
Lloh47:
	add	x1, x1, l_.str.8@PAGEOFF
	bl	_dev_err
	ldr	x8, [x28, #8]
Lloh48:
	adrp	x9, _L3C_ESR@GOTPAGE
Lloh49:
	ldr	x9, [x9, _L3C_ESR@GOTPAGEOFF]
Lloh50:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #0
	bl	_writel
	ldr	w8, [x28]
	cmp	w8, #1
Lloh51:
	adrp	x22, _L3C_ESR_CERR_MASK@GOTPAGE
Lloh52:
	ldr	x22, [x22, _L3C_ESR_CERR_MASK@GOTPAGEOFF]
	b.gt	LBB0_16
; %bb.15:
	mov	x0, x20
	mov	x1, x21
	bl	_xgene_edac_l3_promote_to_uc_err
	cbnz	x0, LBB0_19
LBB0_16:
	ldr	w8, [x22]
	tst	w8, w20
	b.eq	LBB0_18
; %bb.17:
	ldr	w3, [x19]
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	bl	_edac_device_handle_ce
LBB0_18:
	ldr	w8, [x27]
	tst	w8, w20
	b.eq	LBB0_20
LBB0_19:
	ldr	w3, [x19]
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_edac_device_handle_ue
LBB0_20:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpAdd	Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.comm	_L3C_ESR,8,3                    ; @L3C_ESR
	.comm	_L3C_ESR_UCERR_MASK,4,2         ; @L3C_ESR_UCERR_MASK
	.comm	_L3C_ESR_CERR_MASK,4,2          ; @L3C_ESR_CERR_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"L3C uncorrectable error\n"

l_.str.1:                               ; @.str.1
	.asciz	"L3C correctable error\n"

	.comm	_L3C_ELR,8,3                    ; @L3C_ELR
	.comm	_L3C_AELR,8,3                   ; @L3C_AELR
	.comm	_L3C_BELR,8,3                   ; @L3C_BELR
	.comm	_L3C_ESR_MULTIHIT_MASK,4,2      ; @L3C_ESR_MULTIHIT_MASK
l_.str.2:                               ; @.str.2
	.asciz	"L3C multiple hit error\n"

	.comm	_L3C_ESR_UCEVICT_MASK,4,2       ; @L3C_ESR_UCEVICT_MASK
l_.str.3:                               ; @.str.3
	.asciz	"L3C dropped eviction of line with error\n"

	.comm	_L3C_ESR_MULTIUCERR_MASK,4,2    ; @L3C_ESR_MULTIUCERR_MASK
l_.str.4:                               ; @.str.4
	.asciz	"L3C multiple uncorrectable error\n"

	.comm	_L3C_ESR_DATATAG_MASK,4,2       ; @L3C_ESR_DATATAG_MASK
l_.str.5:                               ; @.str.5
	.asciz	"L3C data error syndrome 0x%X group 0x%X\n"

l_.str.6:                               ; @.str.6
	.asciz	"L3C tag error syndrome 0x%X Way of Tag 0x%X Agent ID 0x%X Operation type 0x%X\n"

l_.str.7:                               ; @.str.7
	.asciz	"L3C error address 0x%08X.%08X bank %d\n"

l_.str.8:                               ; @.str.8
	.asciz	"L3C error status register value 0x%X\n"

	.no_dead_strip	_xgene_edac_l3_check
.subsections_via_symbols
