	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function arm_ccn_pmu_read_counter
_arm_ccn_pmu_read_counter:              ## @arm_ccn_pmu_read_counter
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_CCN_IDX_PMU_CYCLE_COUNTER@GOTPCREL(%rip), %rax
	movq	(%rdi), %r14
	cmpl	%esi, (%rax)
	jne	LBB0_4
## %bb.1:
	movq	%rdi, %rbx
	movq	_CCN_DT_PMSR_REQ@GOTPCREL(%rip), %rax
	addq	(%rax), %r14
	movl	$1, %edi
	movq	%r14, %rsi
	callq	_writel
	movq	_CCN_DT_PMSR@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rdi
	addq	(%rbx), %rdi
	callq	_readl
	testb	$1, %al
	je	LBB0_2
## %bb.3:
	movq	_CCN_DT_PMSR_CLR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	movl	$1, %edi
	callq	_writel
	movq	(%rbx), %rax
	movq	_CCN_DT_PMCCNTRSR@GOTPCREL(%rip), %r14
	movq	(%r14), %rcx
	leaq	(%rax,%rcx), %rdi
	addq	$4, %rdi
	callq	_readl
	movq	(%r14), %rdi
	addq	(%rbx), %rdi
	jmp	LBB0_5
LBB0_4:
	movl	%esi, %edi
	callq	_CCN_DT_PMEVCNT
	addq	%rax, %r14
	movq	%r14, %rdi
LBB0_5:
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_readl                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CCN_IDX_PMU_CYCLE_COUNTER,4,2  ## @CCN_IDX_PMU_CYCLE_COUNTER
	.comm	_CCN_DT_PMSR_REQ,8,3            ## @CCN_DT_PMSR_REQ
	.comm	_CCN_DT_PMSR,8,3                ## @CCN_DT_PMSR
	.comm	_CCN_DT_PMSR_CLR,8,3            ## @CCN_DT_PMSR_CLR
	.comm	_CCN_DT_PMCCNTRSR,8,3           ## @CCN_DT_PMCCNTRSR
	.comm	_CCN_DT_PMCCNTR,8,3             ## @CCN_DT_PMCCNTR
	.no_dead_strip	_arm_ccn_pmu_read_counter
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function arm_ccn_pmu_read_counter
_arm_ccn_pmu_read_counter:              ; @arm_ccn_pmu_read_counter
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _CCN_IDX_PMU_CYCLE_COUNTER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CCN_IDX_PMU_CYCLE_COUNTER@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	x20, [x0]
	cmp	w8, w1
	b.ne	LBB0_4
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x8, _CCN_DT_PMSR_REQ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CCN_DT_PMSR_REQ@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	add	x1, x8, x20
	mov	w0, #1
	bl	_writel
Lloh6:
	adrp	x20, _CCN_DT_PMSR@GOTPAGE
Lloh7:
	ldr	x20, [x20, _CCN_DT_PMSR@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_readl
	tbz	w0, #0, LBB0_2
; %bb.3:
	ldr	x8, [x19]
Lloh8:
	adrp	x9, _CCN_DT_PMSR_CLR@GOTPAGE
Lloh9:
	ldr	x9, [x9, _CCN_DT_PMSR_CLR@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #1
	bl	_writel
	ldr	x8, [x19]
Lloh11:
	adrp	x20, _CCN_DT_PMCCNTRSR@GOTPAGE
Lloh12:
	ldr	x20, [x20, _CCN_DT_PMCCNTRSR@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x8, x8, x9
	add	x0, x8, #4
	bl	_readl
	ldr	x8, [x19]
	ldr	x9, [x20]
	add	x0, x9, x8
	b	LBB0_5
LBB0_4:
	mov	x0, x1
	bl	_CCN_DT_PMEVCNT
	add	x0, x0, x20
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_readl
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_CCN_IDX_PMU_CYCLE_COUNTER,4,2  ; @CCN_IDX_PMU_CYCLE_COUNTER
	.comm	_CCN_DT_PMSR_REQ,8,3            ; @CCN_DT_PMSR_REQ
	.comm	_CCN_DT_PMSR,8,3                ; @CCN_DT_PMSR
	.comm	_CCN_DT_PMSR_CLR,8,3            ; @CCN_DT_PMSR_CLR
	.comm	_CCN_DT_PMCCNTRSR,8,3           ; @CCN_DT_PMCCNTRSR
	.comm	_CCN_DT_PMCCNTR,8,3             ; @CCN_DT_PMCCNTR
	.no_dead_strip	_arm_ccn_pmu_read_counter
.subsections_via_symbols
