	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dsu_pmu_probe_pmu
_dsu_pmu_probe_pmu:                     ## @dsu_pmu_probe_pmu
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	callq	___dsu_pmu_read_pmcr
	movl	%eax, %ebx
	movq	_CLUSTERPMCR_N_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %ebx
	movq	_CLUSTERPMCR_N_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	xorl	%edi, %edi
	cmpl	$32, %ebx
	setge	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	movl	$31, %eax
	cmovel	%ebx, %eax
	movl	%eax, (%r14)
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	xorl	%edi, %edi
	callq	___dsu_pmu_read_pmceid
	movl	%eax, -32(%rbp)
	movl	$1, %edi
	callq	___dsu_pmu_read_pmceid
	movl	%eax, -28(%rbp)
	movl	4(%r14), %edi
	movq	_DSU_PMU_MAX_COMMON_EVENTS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-32(%rbp), %rsi
	callq	_bitmap_from_arr32
LBB0_2:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_4
## %bb.3:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_CLUSTERPMCR_N_SHIFT,4,2        ## @CLUSTERPMCR_N_SHIFT
	.comm	_CLUSTERPMCR_N_MASK,4,2         ## @CLUSTERPMCR_N_MASK
	.comm	_DSU_PMU_MAX_COMMON_EVENTS,4,2  ## @DSU_PMU_MAX_COMMON_EVENTS
	.no_dead_strip	_dsu_pmu_probe_pmu
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dsu_pmu_probe_pmu
_dsu_pmu_probe_pmu:                     ; @dsu_pmu_probe_pmu
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #8]
	bl	___dsu_pmu_read_pmcr
Lloh3:
	adrp	x8, _CLUSTERPMCR_N_SHIFT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CLUSTERPMCR_N_SHIFT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	asr	w8, w0, w8
Lloh6:
	adrp	x9, _CLUSTERPMCR_N_MASK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CLUSTERPMCR_N_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	and	w20, w8, w9
	cmp	w20, #31
	cset	w0, gt
	bl	_WARN_ON
	cmp	x0, #0
	mov	w8, #31
	csel	w8, w20, w8, eq
	str	w8, [x19]
	cbz	w8, LBB0_2
; %bb.1:
	mov	w0, #0
	bl	___dsu_pmu_read_pmceid
	str	w0, [sp]
	mov	w0, #1
	bl	___dsu_pmu_read_pmceid
	str	w0, [sp, #4]
	ldr	w0, [x19, #4]
Lloh9:
	adrp	x8, _DSU_PMU_MAX_COMMON_EVENTS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DSU_PMU_MAX_COMMON_EVENTS@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x1, sp
	bl	_bitmap_from_arr32
LBB0_2:
	ldr	x8, [sp, #8]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_4
; %bb.3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_4:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_CLUSTERPMCR_N_SHIFT,4,2        ; @CLUSTERPMCR_N_SHIFT
	.comm	_CLUSTERPMCR_N_MASK,4,2         ; @CLUSTERPMCR_N_MASK
	.comm	_DSU_PMU_MAX_COMMON_EVENTS,4,2  ; @DSU_PMU_MAX_COMMON_EVENTS
	.no_dead_strip	_dsu_pmu_probe_pmu
.subsections_via_symbols
