	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cci_pmu_probe
_cci_pmu_probe:                         ## @cci_pmu_probe
	.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, %r14
	callq	_cci_pmu_alloc
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_1
## %bb.15:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r12d, %r12d
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_platform_get_resource
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_devm_ioremap_resource
	movq	%rax, 40(%r15)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_14
LBB0_3:
	movq	$0, 32(%r15)
	movq	8(%r15), %rdi
	callq	_CCI_PMU_MAX_HW_CNTRS
	testl	%eax, %eax
	jle	LBB0_9
## %bb.4:
	xorl	%r12d, %r12d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	incl	%r12d
	movq	8(%r15), %rdi
	callq	_CCI_PMU_MAX_HW_CNTRS
	cmpl	%eax, %r12d
	jge	LBB0_9
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_platform_get_irq
	testl	%eax, %eax
	js	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	%eax, %ebx
	movq	(%r15), %rsi
	movq	32(%r15), %rdx
	movl	%eax, %edi
	callq	_is_duplicate_irq
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r15), %rax
	movq	32(%r15), %rcx
	leaq	1(%rcx), %rdx
	movq	%rdx, 32(%r15)
	movl	%ebx, (%rax,%rcx,4)
	jmp	LBB0_8
LBB0_9:
	movq	8(%r15), %rdi
	callq	_CCI_PMU_MAX_HW_CNTRS
	cmpl	%eax, %r12d
	jge	LBB0_11
## %bb.10:
	movq	8(%r15), %rdi
	callq	_CCI_PMU_MAX_HW_CNTRS
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%r12d, %edx
	movl	%eax, %ecx
	callq	_dev_warn
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_14
LBB0_11:
	leaq	28(%r15), %rdi
	callq	_raw_spin_lock_init
	leaq	24(%r15), %rdi
	callq	_mutex_init
	movq	%r15, %rdi
	addq	$20, %rdi
	xorl	%r12d, %r12d
	xorl	%esi, %esi
	callq	_atomic_set
	xorl	%eax, %eax
	callq	_raw_smp_processor_id
	movl	%eax, 16(%r15)
	movq	_g_cci_pmu@GOTPCREL(%rip), %rax
	movq	%r15, (%rax)
	movq	_CPUHP_AP_PERF_ARM_CCI_ONLINE@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movq	_cci_pmu_offline_cpu@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str.1(%rip), %rsi
	xorl	%edx, %edx
	callq	_cpuhp_setup_state_nocalls
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_cci_pmu_init
	testl	%eax, %eax
	je	LBB0_12
## %bb.13:
	movl	%eax, %ebx
	movl	(%r13), %edi
	callq	_cpuhp_remove_state
	movq	_g_cci_pmu@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movl	%ebx, %r12d
	jmp	LBB0_14
LBB0_12:
	movq	8(%r15), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdi
	callq	_pr_info
LBB0_14:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"In-correct number of interrupts: %d, should be %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_g_cci_pmu,8,3                  ## @g_cci_pmu
	.comm	_CPUHP_AP_PERF_ARM_CCI_ONLINE,4,2 ## @CPUHP_AP_PERF_ARM_CCI_ONLINE
L_.str.1:                               ## @.str.1
	.asciz	"perf/arm/cci:online"

	.comm	_cci_pmu_offline_cpu,4,2        ## @cci_pmu_offline_cpu
L_.str.2:                               ## @.str.2
	.asciz	"ARM %s PMU driver probed"

	.no_dead_strip	_cci_pmu_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cci_pmu_probe
_cci_pmu_probe:                         ; @cci_pmu_probe
	.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	x19, x0
	bl	_cci_pmu_alloc
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	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
	b	_PTR_ERR
LBB0_2:
Lloh0:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_platform_get_resource
	mov	x1, x0
	mov	x0, x19
	bl	_devm_ioremap_resource
	str	x0, [x20, #40]
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.3:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_13
LBB0_4:
	str	xzr, [x20, #32]
	ldr	x0, [x20, #8]
	bl	_CCI_PMU_MAX_HW_CNTRS
	cmp	w0, #1
	b.lt	LBB0_10
; %bb.5:
	mov	w21, #0
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	w21, w21, #1
	ldr	x0, [x20, #8]
	bl	_CCI_PMU_MAX_HW_CNTRS
	cmp	w21, w0
	b.ge	LBB0_11
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_platform_get_irq
	tbnz	w0, #31, LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x22, x0
	ldr	x1, [x20]
	ldr	x2, [x20, #32]
	bl	_is_duplicate_irq
	cbnz	x0, LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x20]
	ldr	x9, [x20, #32]
	add	x10, x9, #1
	str	x10, [x20, #32]
	str	w22, [x8, x9, lsl #2]
	b	LBB0_6
LBB0_10:
	mov	w21, #0
LBB0_11:
	ldr	x0, [x20, #8]
	bl	_CCI_PMU_MAX_HW_CNTRS
	cmp	w21, w0
	b.ge	LBB0_15
; %bb.12:
	ldr	x0, [x20, #8]
	bl	_CCI_PMU_MAX_HW_CNTRS
	mov	x3, x0
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_dev_warn
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_14:
	mov	x0, x19
	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
LBB0_15:
	add	x0, x20, #28
	bl	_raw_spin_lock_init
	add	x0, x20, #24
	bl	_mutex_init
	add	x0, x20, #20
	mov	w1, #0
	bl	_atomic_set
	bl	_raw_smp_processor_id
	str	w0, [x20, #16]
Lloh9:
	adrp	x21, _g_cci_pmu@GOTPAGE
Lloh10:
	ldr	x21, [x21, _g_cci_pmu@GOTPAGEOFF]
	str	x20, [x21]
Lloh11:
	adrp	x22, _CPUHP_AP_PERF_ARM_CCI_ONLINE@GOTPAGE
Lloh12:
	ldr	x22, [x22, _CPUHP_AP_PERF_ARM_CCI_ONLINE@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh13:
	adrp	x8, _cci_pmu_offline_cpu@GOTPAGE
Lloh14:
	ldr	x8, [x8, _cci_pmu_offline_cpu@GOTPAGEOFF]
Lloh15:
	ldr	w3, [x8]
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, #0
	bl	_cpuhp_setup_state_nocalls
	mov	x0, x20
	mov	x1, x19
	bl	_cci_pmu_init
	mov	x19, x0
	cbz	w0, LBB0_17
; %bb.16:
	ldr	w0, [x22]
	bl	_cpuhp_remove_state
	str	xzr, [x21]
	b	LBB0_14
LBB0_17:
	ldr	x8, [x20, #8]
	ldr	w1, [x8]
Lloh18:
	adrp	x0, l_.str.2@PAGE
Lloh19:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_info
	b	LBB0_14
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"In-correct number of interrupts: %d, should be %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_g_cci_pmu,8,3                  ; @g_cci_pmu
	.comm	_CPUHP_AP_PERF_ARM_CCI_ONLINE,4,2 ; @CPUHP_AP_PERF_ARM_CCI_ONLINE
l_.str.1:                               ; @.str.1
	.asciz	"perf/arm/cci:online"

	.comm	_cci_pmu_offline_cpu,4,2        ; @cci_pmu_offline_cpu
l_.str.2:                               ; @.str.2
	.asciz	"ARM %s PMU driver probed"

	.no_dead_strip	_cci_pmu_probe
.subsections_via_symbols
