	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function arm_ccn_pmu_event_config
_arm_ccn_pmu_event_config:              ## @arm_ccn_pmu_event_config
	.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
	movq	%rdi, %r12
	movl	8(%rdi), %edi
	callq	_pmu_to_arm_ccn
	movq	%rax, %r14
	movl	4(%r12), %eax
	movq	_CCN_IDX_PMU_CYCLE_COUNTER@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_1
## %bb.10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	(%r12), %edi
	callq	_CCN_CONFIG_TYPE
	movq	_CCN_TYPE_XP@GOTPCREL(%rip), %rcx
	movl	(%r12), %edi
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	callq	_CCN_CONFIG_XP
	jmp	LBB0_4
LBB0_3:
	callq	_CCN_CONFIG_NODE
	movl	%eax, %edi
	callq	_arm_ccn_node_to_xp
LBB0_4:
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_spin_lock
	movl	4(%r12), %eax
	leal	3(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	andl	$-4, %ecx
	movq	_CCN_DT_ACTIVE_DSM@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%r14), %rdi
	movslq	%ecx, %rbx
	addq	%rbx, %rdi
	callq	_readl
	movl	%eax, %r13d
	movq	_CCN_DT_ACTIVE_DSM__DSM_ID__MASK@GOTPCREL(%rip), %rax
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movl	(%rax), %r14d
	movl	4(%r12), %edi
	leal	3(%rdi), %eax
	testl	%edi, %edi
	cmovnsl	%edi, %eax
	andl	$-4, %eax
	subl	%eax, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_CCN_DT_ACTIVE_DSM__DSM_ID__SHIFT
	movl	%eax, %ecx
	shll	%cl, %r14d
	notl	%r14d
	andl	%r13d, %r14d
	movl	4(%r12), %edi
	leal	3(%rdi), %eax
	testl	%edi, %edi
	cmovnsl	%edi, %eax
	andl	$-4, %eax
	subl	%eax, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_CCN_DT_ACTIVE_DSM__DSM_ID__SHIFT
	movl	%eax, %ecx
	shll	%cl, %r15d
	orl	%r14d, %r15d
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	addq	8(%r14), %rbx
	movq	_CCN_DT_ACTIVE_DSM@GOTPCREL(%rip), %rax
	addq	(%rax), %rbx
	movl	%r15d, %edi
	movq	%rbx, %rsi
	callq	_writel
	movl	(%r12), %edi
	callq	_CCN_CONFIG_TYPE
	movq	_CCN_TYPE_XP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.5:
	movl	(%r12), %edi
	callq	_CCN_CONFIG_EVENT
	movq	_CCN_EVENT_WATCHPOINT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.6:
	movq	%r12, %rdi
	callq	_arm_ccn_pmu_xp_watchpoint_config
	jmp	LBB0_9
LBB0_8:
	movq	%r12, %rdi
	callq	_arm_ccn_pmu_node_event_config
	jmp	LBB0_9
LBB0_7:
	movq	%r12, %rdi
	callq	_arm_ccn_pmu_xp_event_config
LBB0_9:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CCN_IDX_PMU_CYCLE_COUNTER,4,2  ## @CCN_IDX_PMU_CYCLE_COUNTER
	.comm	_CCN_TYPE_XP,8,3                ## @CCN_TYPE_XP
	.comm	_CCN_DT_ACTIVE_DSM,8,3          ## @CCN_DT_ACTIVE_DSM
	.comm	_CCN_DT_ACTIVE_DSM__DSM_ID__MASK,4,2 ## @CCN_DT_ACTIVE_DSM__DSM_ID__MASK
	.comm	_CCN_EVENT_WATCHPOINT,8,3       ## @CCN_EVENT_WATCHPOINT
	.no_dead_strip	_arm_ccn_pmu_event_config
.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_config
_arm_ccn_pmu_event_config:              ; @arm_ccn_pmu_event_config
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x0
	ldr	w0, [x0, #8]
	bl	_pmu_to_arm_ccn
	ldr	w8, [x20, #4]
Lloh0:
	adrp	x9, _CCN_IDX_PMU_CYCLE_COUNTER@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CCN_IDX_PMU_CYCLE_COUNTER@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	x19, x0
	ldr	w0, [x20]
	bl	_CCN_CONFIG_TYPE
	mov	x8, x0
Lloh3:
	adrp	x23, _CCN_TYPE_XP@GOTPAGE
Lloh4:
	ldr	x23, [x23, _CCN_TYPE_XP@GOTPAGEOFF]
	ldr	x9, [x23]
	ldr	w0, [x20]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	bl	_CCN_CONFIG_XP
	b	LBB0_5
LBB0_4:
	bl	_CCN_CONFIG_NODE
	bl	_arm_ccn_node_to_xp
LBB0_5:
	mov	x21, x0
	mov	x0, x19
	bl	_spin_lock
	ldr	w8, [x20, #4]
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	and	w8, w8, #0xfffffffc
	ldr	x9, [x19, #8]
Lloh5:
	adrp	x24, _CCN_DT_ACTIVE_DSM@GOTPAGE
Lloh6:
	ldr	x24, [x24, _CCN_DT_ACTIVE_DSM@GOTPAGEOFF]
	ldr	x10, [x24]
	sxtw	x25, w8
	add	x8, x10, x9
	add	x0, x8, x25
	bl	_readl
	mov	x22, x0
Lloh7:
	adrp	x8, _CCN_DT_ACTIVE_DSM__DSM_ID__MASK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _CCN_DT_ACTIVE_DSM__DSM_ID__MASK@GOTPAGEOFF]
Lloh9:
	ldr	w26, [x8]
	ldr	w8, [x20, #4]
	negs	w9, w8
	and	w9, w9, #0x3
	and	w8, w8, #0x3
	csneg	w0, w8, w9, mi
	bl	_CCN_DT_ACTIVE_DSM__DSM_ID__SHIFT
	lsl	w8, w26, w0
	bic	w22, w22, w8
	ldr	w8, [x20, #4]
	negs	w9, w8
	and	w9, w9, #0x3
	and	w8, w8, #0x3
	csneg	w0, w8, w9, mi
	bl	_CCN_DT_ACTIVE_DSM__DSM_ID__SHIFT
	lsl	w8, w21, w0
	orr	w0, w8, w22
	ldr	x8, [x19, #8]
	ldr	x9, [x24]
	add	x8, x8, x25
	add	x1, x8, x9
	bl	_writel
	ldr	w0, [x20]
	bl	_CCN_CONFIG_TYPE
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_8
; %bb.6:
	ldr	w0, [x20]
	bl	_CCN_CONFIG_EVENT
Lloh10:
	adrp	x8, _CCN_EVENT_WATCHPOINT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _CCN_EVENT_WATCHPOINT@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.7:
	mov	x0, x20
	bl	_arm_ccn_pmu_xp_watchpoint_config
	b	LBB0_10
LBB0_8:
	mov	x0, x20
	bl	_arm_ccn_pmu_node_event_config
	b	LBB0_10
LBB0_9:
	mov	x0, x20
	bl	_arm_ccn_pmu_xp_event_config
LBB0_10:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_spin_unlock
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_CCN_IDX_PMU_CYCLE_COUNTER,4,2  ; @CCN_IDX_PMU_CYCLE_COUNTER
	.comm	_CCN_TYPE_XP,8,3                ; @CCN_TYPE_XP
	.comm	_CCN_DT_ACTIVE_DSM,8,3          ; @CCN_DT_ACTIVE_DSM
	.comm	_CCN_DT_ACTIVE_DSM__DSM_ID__MASK,4,2 ; @CCN_DT_ACTIVE_DSM__DSM_ID__MASK
	.comm	_CCN_EVENT_WATCHPOINT,8,3       ; @CCN_EVENT_WATCHPOINT
	.no_dead_strip	_arm_ccn_pmu_event_config
.subsections_via_symbols
