	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function arm_spe_pmu_add
_arm_spe_pmu_add:                       ## @arm_spe_pmu_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, %r14d
	movq	%rdi, %r15
	movl	8(%rdi), %edi
	callq	_to_spe_pmu
	movq	%rax, %rbx
	movl	(%r15), %edi
	cmpl	$-1, %edi
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_smp_processor_id
	movl	%eax, %edi
LBB0_2:
	movq	%rbx, %rsi
	callq	_cpumask_test_cpu
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movq	_PERF_HES_UPTODATE@GOTPCREL(%rip), %rax
	movq	_PERF_HES_STOPPED@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	orl	(%rax), %ecx
	movl	%ecx, 4(%r15)
	movq	_PERF_EF_START@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	testl	%r14d, (%rax)
	je	LBB0_8
## %bb.5:
	movq	_PERF_EF_RELOAD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_arm_spe_pmu_start
	movl	(%r12), %eax
	testl	%eax, 4(%r15)
	je	LBB0_8
## %bb.6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_3:
	movq	_ENOENT@GOTPCREL(%rip), %rax
LBB0_7:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_PERF_HES_UPTODATE,4,2          ## @PERF_HES_UPTODATE
	.comm	_PERF_HES_STOPPED,4,2           ## @PERF_HES_STOPPED
	.comm	_PERF_EF_START,4,2              ## @PERF_EF_START
	.comm	_PERF_EF_RELOAD,4,2             ## @PERF_EF_RELOAD
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_arm_spe_pmu_add
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function arm_spe_pmu_add
_arm_spe_pmu_add:                       ; @arm_spe_pmu_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	x20, x1
	mov	x19, x0
	ldr	w0, [x0, #8]
	bl	_to_spe_pmu
	mov	x21, x0
	ldr	w0, [x19]
	cmn	w0, #1
	b.ne	LBB0_2
; %bb.1:
	bl	_smp_processor_id
LBB0_2:
	mov	x1, x21
	bl	_cpumask_test_cpu
	cbz	w0, LBB0_6
; %bb.3:
Lloh0:
	adrp	x8, _PERF_HES_UPTODATE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PERF_HES_UPTODATE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x21, _PERF_HES_STOPPED@GOTPAGE
Lloh4:
	ldr	x21, [x21, _PERF_HES_STOPPED@GOTPAGEOFF]
	ldr	w9, [x21]
	orr	w8, w9, w8
	str	w8, [x19, #4]
Lloh5:
	adrp	x8, _PERF_EF_START@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PERF_EF_START@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_8
; %bb.4:
Lloh8:
	adrp	x8, _PERF_EF_RELOAD@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PERF_EF_RELOAD@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_arm_spe_pmu_start
	ldr	w8, [x19, #4]
	ldr	w9, [x21]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.5:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh13:
	adrp	x8, _ENOENT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_8:
	mov	w0, #0
LBB0_9:
	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	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_PERF_HES_UPTODATE,4,2          ; @PERF_HES_UPTODATE
	.comm	_PERF_HES_STOPPED,4,2           ; @PERF_HES_STOPPED
	.comm	_PERF_EF_START,4,2              ; @PERF_EF_START
	.comm	_PERF_EF_RELOAD,4,2             ; @PERF_EF_RELOAD
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_arm_spe_pmu_add
.subsections_via_symbols
