	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function arm_ccn_pmu_event_add
_arm_ccn_pmu_event_add:                 ## @arm_ccn_pmu_event_add
	.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
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	callq	_pmu_to_arm_ccn
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_arm_ccn_pmu_event_alloc
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_6
## %bb.1:
	cmpl	$0, 4(%r12)
	jne	LBB0_4
## %bb.2:
	movq	%r12, %rdi
	callq	_arm_ccn_pmu_active_counters
	cmpl	$1, %eax
	jne	LBB0_4
## %bb.3:
	xorl	%eax, %eax
	callq	_arm_ccn_pmu_timer_period
	movq	_HRTIMER_MODE_REL_PINNED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_hrtimer_start
LBB0_4:
	movq	%rbx, %rdi
	callq	_arm_ccn_pmu_event_config
	movq	_PERF_HES_STOPPED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	movq	_PERF_EF_START@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_6
## %bb.5:
	movq	_PERF_EF_UPDATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_arm_ccn_pmu_event_start
LBB0_6:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HRTIMER_MODE_REL_PINNED,4,2    ## @HRTIMER_MODE_REL_PINNED
	.comm	_PERF_HES_STOPPED,4,2           ## @PERF_HES_STOPPED
	.comm	_PERF_EF_START,4,2              ## @PERF_EF_START
	.comm	_PERF_EF_UPDATE,4,2             ## @PERF_EF_UPDATE
	.no_dead_strip	_arm_ccn_pmu_event_add
.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_event_add
_arm_ccn_pmu_event_add:                 ; @arm_ccn_pmu_event_add
	.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
	mov	x21, x1
	mov	x19, x0
	ldr	w0, [x0]
	bl	_pmu_to_arm_ccn
	mov	x22, x0
	mov	x0, x19
	bl	_arm_ccn_pmu_event_alloc
	mov	x20, x0
	cbnz	w0, LBB0_6
; %bb.1:
	ldr	w8, [x22, #4]
	cbnz	w8, LBB0_4
; %bb.2:
	mov	x0, x22
	bl	_arm_ccn_pmu_active_counters
	cmp	w0, #1
	b.ne	LBB0_4
; %bb.3:
	bl	_arm_ccn_pmu_timer_period
	mov	x1, x0
Lloh0:
	adrp	x8, _HRTIMER_MODE_REL_PINNED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HRTIMER_MODE_REL_PINNED@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x22
	bl	_hrtimer_start
LBB0_4:
	mov	x0, x19
	bl	_arm_ccn_pmu_event_config
Lloh3:
	adrp	x8, _PERF_HES_STOPPED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PERF_HES_STOPPED@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19, #4]
Lloh6:
	adrp	x8, _PERF_EF_START@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PERF_EF_START@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_6
; %bb.5:
Lloh9:
	adrp	x8, _PERF_EF_UPDATE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PERF_EF_UPDATE@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_arm_ccn_pmu_event_start
LBB0_6:
	mov	x0, x20
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_HRTIMER_MODE_REL_PINNED,4,2    ; @HRTIMER_MODE_REL_PINNED
	.comm	_PERF_HES_STOPPED,4,2           ; @PERF_HES_STOPPED
	.comm	_PERF_EF_START,4,2              ; @PERF_EF_START
	.comm	_PERF_EF_UPDATE,4,2             ; @PERF_EF_UPDATE
	.no_dead_strip	_arm_ccn_pmu_event_add
.subsections_via_symbols
