	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_pmu_reset
_intel_pmu_reset:                       ## @intel_pmu_reset
	.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	_cpu_hw_events@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_percpu_read
	movq	_x86_pmu@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	je	LBB0_8
## %bb.1:
	movq	%rax, %r14
	callq	_local_irq_save
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_smp_processor_id
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_printk
	cmpl	$0, (%r15)
	jle	LBB0_2
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_x86_pmu_config_addr
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_checking_wrmsrl
	movl	%ebx, %edi
	callq	_x86_pmu_event_addr
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_checking_wrmsrl
	incl	%ebx
	cmpl	(%r15), %ebx
	jl	LBB0_9
LBB0_2:
	cmpl	$0, 4(%r15)
	jle	LBB0_5
## %bb.3:
	xorl	%ebx, %ebx
	movq	_MSR_ARCH_PERFMON_FIXED_CTR0@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	addq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_checking_wrmsrl
	incq	%rbx
	movslq	4(%r15), %rax
	cmpq	%rax, %rbx
	jl	LBB0_4
LBB0_5:
	testq	%r14, %r14
	je	LBB0_7
## %bb.6:
	movl	(%r14), %eax
	movl	%eax, 4(%r14)
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_local_irq_restore              ## TAILCALL
LBB0_8:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cpu_hw_events,4,2              ## @cpu_hw_events
	.comm	_x86_pmu,8,2                    ## @x86_pmu
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"clearing PMU state on CPU#%d\n"

	.comm	_MSR_ARCH_PERFMON_FIXED_CTR0,8,3 ## @MSR_ARCH_PERFMON_FIXED_CTR0
	.no_dead_strip	_intel_pmu_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_pmu_reset
_intel_pmu_reset:                       ; @intel_pmu_reset
	.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
Lloh0:
	adrp	x8, _cpu_hw_events@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cpu_hw_events@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_percpu_read
Lloh3:
	adrp	x21, _x86_pmu@GOTPAGE
Lloh4:
	ldr	x21, [x21, _x86_pmu@GOTPAGEOFF]
	ldr	w8, [x21]
	cbz	w8, LBB0_10
; %bb.1:
	mov	x19, x0
	bl	_local_irq_save
	bl	_smp_processor_id
	mov	x1, x0
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printk
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.2:
	mov	w20, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_x86_pmu_config_addr
	mov	x1, #0
	bl	_checking_wrmsrl
	mov	x0, x20
	bl	_x86_pmu_event_addr
	mov	x1, #0
	bl	_checking_wrmsrl
	add	w20, w20, #1
	ldr	w8, [x21]
	cmp	w20, w8
	b.lt	LBB0_3
LBB0_4:
	ldr	w8, [x21, #4]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.5:
	mov	x20, #0
Lloh7:
	adrp	x22, _MSR_ARCH_PERFMON_FIXED_CTR0@GOTPAGE
Lloh8:
	ldr	x22, [x22, _MSR_ARCH_PERFMON_FIXED_CTR0@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22]
	add	x0, x20, x8
	mov	x1, #0
	bl	_checking_wrmsrl
	add	x20, x20, #1
	ldrsw	x8, [x21, #4]
	cmp	x20, x8
	b.lt	LBB0_6
LBB0_7:
	cbz	x19, LBB0_9
; %bb.8:
	ldr	w8, [x19]
	str	w8, [x19, #4]
LBB0_9:
	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
	b	_local_irq_restore
LBB0_10:
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_cpu_hw_events,4,2              ; @cpu_hw_events
	.comm	_x86_pmu,8,2                    ; @x86_pmu
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"clearing PMU state on CPU#%d\n"

	.comm	_MSR_ARCH_PERFMON_FIXED_CTR0,8,3 ; @MSR_ARCH_PERFMON_FIXED_CTR0
	.no_dead_strip	_intel_pmu_reset
.subsections_via_symbols
