	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cmci_monitor
_cmci_monitor:                          ## @cmci_monitor
	.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
	movl	%edi, %r14d
	movq	_mca_banks@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	cmpl	%edi, (%rax)
	setg	%bl
	movq	_cpuid@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_PCPU_GET
	movslq	%eax, %rsi
	movl	%ebx, %edi
	callq	_KASSERT
	movl	%r14d, %edi
	callq	_MSR_MC_CTL2
	movl	%eax, %edi
	callq	_rdmsr
	movq	_MC_CTL2_CMCI_EN@GOTPCREL(%rip), %r13
	movl	(%r13), %ebx
	testl	%eax, %ebx
	je	LBB0_1
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	_MC_CTL2_THRESHOLD@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	notl	%ecx
	andl	%ecx, %eax
	orl	%eax, %ebx
	orl	$1, %ebx
	movl	%r14d, %edi
	callq	_MSR_MC_CTL2
	movl	%eax, %edi
	movl	%ebx, %esi
	callq	_wrmsr
	movl	%r14d, %edi
	callq	_MSR_MC_CTL2
	movl	%eax, %edi
	callq	_rdmsr
	testl	%eax, (%r13)
	je	LBB0_2
## %bb.3:
	movl	%eax, %ebx
	movq	_cmc_state@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movl	(%r12), %edi
	callq	_PCPU_GET
	cltq
	movq	(%r13,%rax,8), %r12
	movslq	%r14d, %r13
	movl	(%r15), %eax
	notl	%eax
	andl	%eax, %ebx
	orl	$32767, %ebx                    ## imm = 0x7FFF
	movl	%r14d, %edi
	callq	_MSR_MC_CTL2
	movl	%eax, %edi
	movl	%ebx, %esi
	callq	_wrmsr
	movl	%r14d, %edi
	callq	_MSR_MC_CTL2
	movl	%eax, %edi
	callq	_rdmsr
	movl	(%r15), %ecx
	andl	%eax, %ecx
	movl	%ecx, (%r12,%r13,4)
	movl	(%r15), %ebx
	notl	%ebx
	andl	%eax, %ebx
	orl	$1, %ebx
	movl	%r14d, %edi
	callq	_MSR_MC_CTL2
	movl	%eax, %edi
	movl	%ebx, %esi
	callq	_wrmsr
	movq	_cmci_mask@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_PCPU_GET
	btsl	%r14d, %eax
	movl	%ebx, %edi
	movl	%eax, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PCPU_SET                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_mca_banks,4,2                  ## @mca_banks
	.comm	_cpuid,4,2                      ## @cpuid
	.comm	_MC_CTL2_CMCI_EN,4,2            ## @MC_CTL2_CMCI_EN
	.comm	_MC_CTL2_THRESHOLD,4,2          ## @MC_CTL2_THRESHOLD
	.comm	_cmc_state,8,3                  ## @cmc_state
	.comm	_cmci_mask,4,2                  ## @cmci_mask
	.no_dead_strip	_cmci_monitor
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cmci_monitor
_cmci_monitor:                          ; @cmci_monitor
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
Lloh0:
	adrp	x8, _mca_banks@GOTPAGE
Lloh1:
	ldr	x8, [x8, _mca_banks@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w0
	cset	w20, gt
Lloh3:
	adrp	x22, _cpuid@GOTPAGE
Lloh4:
	ldr	x22, [x22, _cpuid@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_PCPU_GET
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x1, w0
	mov	x0, x20
	bl	_KASSERT
	mov	x0, x19
	bl	_MSR_MC_CTL2
	bl	_rdmsr
Lloh5:
	adrp	x23, _MC_CTL2_CMCI_EN@GOTPAGE
Lloh6:
	ldr	x23, [x23, _MC_CTL2_CMCI_EN@GOTPAGEOFF]
	ldr	w8, [x23]
	tst	w8, w0
	b.eq	LBB0_2
LBB0_1:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_2:
Lloh7:
	adrp	x21, _MC_CTL2_THRESHOLD@GOTPAGE
Lloh8:
	ldr	x21, [x21, _MC_CTL2_THRESHOLD@GOTPAGEOFF]
	ldr	w9, [x21]
	bic	w9, w0, w9
	orr	w8, w8, w9
	orr	w20, w8, #0x1
	mov	x0, x19
	bl	_MSR_MC_CTL2
	mov	x1, x20
	bl	_wrmsr
	mov	x0, x19
	bl	_MSR_MC_CTL2
	bl	_rdmsr
	ldr	w8, [x23]
	tst	w8, w0
	b.eq	LBB0_1
; %bb.3:
	mov	x20, x0
Lloh9:
	adrp	x8, _cmc_state@GOTPAGE
Lloh10:
	ldr	x8, [x8, _cmc_state@GOTPAGEOFF]
Lloh11:
	ldr	x23, [x8]
	ldr	w0, [x22]
	bl	_PCPU_GET
	ldr	x22, [x23, w0, sxtw #3]
	ldr	w8, [x21]
	bic	w8, w20, w8
	orr	w20, w8, #0x7fff
	mov	x0, x19
	bl	_MSR_MC_CTL2
	mov	x1, x20
	bl	_wrmsr
	mov	x0, x19
	bl	_MSR_MC_CTL2
	bl	_rdmsr
	ldr	w8, [x21]
	and	w8, w8, w0
	str	w8, [x22, w19, sxtw #2]
	ldr	w8, [x21]
	bic	w8, w0, w8
	orr	w20, w8, #0x1
	mov	x0, x19
	bl	_MSR_MC_CTL2
	mov	x1, x20
	bl	_wrmsr
Lloh12:
	adrp	x8, _cmci_mask@GOTPAGE
Lloh13:
	ldr	x8, [x8, _cmci_mask@GOTPAGEOFF]
Lloh14:
	ldr	w20, [x8]
	mov	x0, x20
	bl	_PCPU_GET
	mov	w8, #1
	lsl	w8, w8, w19
	orr	w1, w0, w8
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_PCPU_SET
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_mca_banks,4,2                  ; @mca_banks
	.comm	_cpuid,4,2                      ; @cpuid
	.comm	_MC_CTL2_CMCI_EN,4,2            ; @MC_CTL2_CMCI_EN
	.comm	_MC_CTL2_THRESHOLD,4,2          ; @MC_CTL2_THRESHOLD
	.comm	_cmc_state,8,3                  ; @cmc_state
	.comm	_cmci_mask,4,2                  ; @cmci_mask
	.no_dead_strip	_cmci_monitor
.subsections_via_symbols
