	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mca_intr                       ## -- Begin function mca_intr
	.p2align	4, 0x90
_mca_intr:                              ## @mca_intr
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_cpu_feature@GOTPCREL(%rip), %rax
	movq	_CPUID_MCA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	jne	LBB0_2
## %bb.1:
	movq	_MSR_P5_MC_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_rdmsr
	movl	%eax, %ebx
	movq	_MSR_P5_MC_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_rdmsr
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_printf
	leaq	L_.str.1(%rip), %rdi
	callq	_panic
LBB0_2:
	movq	_MCE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-28(%rbp), %rsi
	callq	_mca_scan
	movl	%eax, %r14d
	movq	_MSR_MCG_STATUS@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_rdmsr
	movl	%eax, %ebx
	movq	_MCG_STATUS_RIPV@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_3
## %bb.4:
	cmpl	$0, -28(%rbp)
	jne	LBB0_8
## %bb.5:
	testl	%r14d, %r14d
	je	LBB0_6
LBB0_7:
	leaq	L_.str.2(%rip), %rdi
	callq	_panic
LBB0_8:
	movl	(%r15), %edi
	movq	_MCG_STATUS_MCIP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %ebx
	movl	%ebx, %esi
	callq	_wrmsr
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	$0, -28(%rbp)
	testl	%r14d, %r14d
	jne	LBB0_7
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_cpu_spinwait
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_cpu_feature,4,2                ## @cpu_feature
	.comm	_CPUID_MCA,4,2                  ## @CPUID_MCA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MC Type: 0x%jx  Address: 0x%jx\n"

	.comm	_MSR_P5_MC_TYPE,4,2             ## @MSR_P5_MC_TYPE
	.comm	_MSR_P5_MC_ADDR,4,2             ## @MSR_P5_MC_ADDR
L_.str.1:                               ## @.str.1
	.asciz	"Machine check"

	.comm	_MCE,4,2                        ## @MCE
	.comm	_MSR_MCG_STATUS,4,2             ## @MSR_MCG_STATUS
	.comm	_MCG_STATUS_RIPV,4,2            ## @MCG_STATUS_RIPV
L_.str.2:                               ## @.str.2
	.asciz	"Unrecoverable machine check exception"

	.comm	_MCG_STATUS_MCIP,4,2            ## @MCG_STATUS_MCIP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mca_intr                       ; -- Begin function mca_intr
	.p2align	2
_mca_intr:                              ; @mca_intr
	.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
Lloh0:
	adrp	x8, _cpu_feature@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cpu_feature@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _CPUID_MCA@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CPUID_MCA@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _MSR_P5_MC_TYPE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MSR_P5_MC_TYPE@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_rdmsr
	mov	x19, x0
Lloh9:
	adrp	x8, _MSR_P5_MC_ADDR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MSR_P5_MC_ADDR@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_rdmsr
	mov	x2, x0
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_printf
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_panic
LBB0_2:
Lloh16:
	adrp	x8, _MCE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MCE@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	add	x1, sp, #12
	bl	_mca_scan
	mov	x20, x0
Lloh19:
	adrp	x21, _MSR_MCG_STATUS@GOTPAGE
Lloh20:
	ldr	x21, [x21, _MSR_MCG_STATUS@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_rdmsr
	mov	x19, x0
Lloh21:
	adrp	x8, _MCG_STATUS_RIPV@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MCG_STATUS_RIPV@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_7
; %bb.3:
	ldr	w8, [sp, #12]
	cbnz	w8, LBB0_6
; %bb.4:
	cbz	w20, LBB0_8
LBB0_5:
Lloh24:
	adrp	x0, l_.str.2@PAGE
Lloh25:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_panic
LBB0_6:
	ldr	w0, [x21]
Lloh26:
	adrp	x8, _MCG_STATUS_MCIP@GOTPAGE
Lloh27:
	ldr	x8, [x8, _MCG_STATUS_MCIP@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	bic	w1, w19, w8
	bl	_wrmsr
	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
LBB0_7:
	str	wzr, [sp, #12]
	cbnz	w20, LBB0_5
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	bl	_cpu_spinwait
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_cpu_feature,4,2                ; @cpu_feature
	.comm	_CPUID_MCA,4,2                  ; @CPUID_MCA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MC Type: 0x%jx  Address: 0x%jx\n"

	.comm	_MSR_P5_MC_TYPE,4,2             ; @MSR_P5_MC_TYPE
	.comm	_MSR_P5_MC_ADDR,4,2             ; @MSR_P5_MC_ADDR
l_.str.1:                               ; @.str.1
	.asciz	"Machine check"

	.comm	_MCE,4,2                        ; @MCE
	.comm	_MSR_MCG_STATUS,4,2             ; @MSR_MCG_STATUS
	.comm	_MCG_STATUS_RIPV,4,2            ; @MCG_STATUS_RIPV
l_.str.2:                               ; @.str.2
	.asciz	"Unrecoverable machine check exception"

	.comm	_MCG_STATUS_MCIP,4,2            ; @MCG_STATUS_MCIP
.subsections_via_symbols
