	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function arm_spe_event_to_pmscr
_arm_spe_event_to_pmscr:                ## @arm_spe_event_to_pmscr
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_ts_enable@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ATTR_CFG_GET_FLD
	movl	%eax, %r15d
	movq	_SYS_PMSCR_EL1_TS_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r15d
	movq	_pa_enable@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_ATTR_CFG_GET_FLD
	movl	%eax, %ebx
	movq	_SYS_PMSCR_EL1_PA_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %ebx
	orl	%r15d, %ebx
	movq	_pct_enable@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_ATTR_CFG_GET_FLD
	movl	%eax, %r15d
	movq	_SYS_PMSCR_EL1_PCT_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r15d
	orl	%ebx, %r15d
	cmpl	$0, 4(%r14)
	je	LBB0_1
## %bb.2:
	cmpl	$0, (%r14)
	je	LBB0_3
LBB0_4:
	movq	_CONFIG_PID_IN_CONTEXTIDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_IS_ENABLED
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	_CAP_SYS_ADMIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_capable
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	_SYS_PMSCR_EL1_CX_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	orl	%eax, %r15d
LBB0_7:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	_SYS_PMSCR_EL1_E0SPE_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	orl	%eax, %r15d
	cmpl	$0, (%r14)
	jne	LBB0_4
LBB0_3:
	movq	_SYS_PMSCR_EL1_E1SPE_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	orl	%eax, %r15d
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_ts_enable,4,2                  ## @ts_enable
	.comm	_SYS_PMSCR_EL1_TS_SHIFT,4,2     ## @SYS_PMSCR_EL1_TS_SHIFT
	.comm	_pa_enable,4,2                  ## @pa_enable
	.comm	_SYS_PMSCR_EL1_PA_SHIFT,4,2     ## @SYS_PMSCR_EL1_PA_SHIFT
	.comm	_pct_enable,4,2                 ## @pct_enable
	.comm	_SYS_PMSCR_EL1_PCT_SHIFT,4,2    ## @SYS_PMSCR_EL1_PCT_SHIFT
	.comm	_SYS_PMSCR_EL1_E0SPE_SHIFT,4,2  ## @SYS_PMSCR_EL1_E0SPE_SHIFT
	.comm	_SYS_PMSCR_EL1_E1SPE_SHIFT,4,2  ## @SYS_PMSCR_EL1_E1SPE_SHIFT
	.comm	_CONFIG_PID_IN_CONTEXTIDR,4,2   ## @CONFIG_PID_IN_CONTEXTIDR
	.comm	_CAP_SYS_ADMIN,4,2              ## @CAP_SYS_ADMIN
	.comm	_SYS_PMSCR_EL1_CX_SHIFT,4,2     ## @SYS_PMSCR_EL1_CX_SHIFT
	.no_dead_strip	_arm_spe_event_to_pmscr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function arm_spe_event_to_pmscr
_arm_spe_event_to_pmscr:                ; @arm_spe_event_to_pmscr
	.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
	mov	x20, x0
Lloh0:
	adrp	x8, _ts_enable@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ts_enable@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_ATTR_CFG_GET_FLD
Lloh3:
	adrp	x8, _SYS_PMSCR_EL1_TS_SHIFT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SYS_PMSCR_EL1_TS_SHIFT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	w19, w0, w8
Lloh6:
	adrp	x8, _pa_enable@GOTPAGE
Lloh7:
	ldr	x8, [x8, _pa_enable@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ATTR_CFG_GET_FLD
Lloh9:
	adrp	x8, _SYS_PMSCR_EL1_PA_SHIFT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SYS_PMSCR_EL1_PA_SHIFT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	lsl	w8, w0, w8
	orr	w19, w8, w19
Lloh12:
	adrp	x8, _pct_enable@GOTPAGE
Lloh13:
	ldr	x8, [x8, _pct_enable@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ATTR_CFG_GET_FLD
Lloh15:
	adrp	x8, _SYS_PMSCR_EL1_PCT_SHIFT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SYS_PMSCR_EL1_PCT_SHIFT@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	lsl	w8, w0, w8
	orr	w19, w19, w8
	ldr	w8, [x20, #4]
	cbz	w8, LBB0_6
; %bb.1:
	ldr	w8, [x20]
	cbz	w8, LBB0_7
LBB0_2:
Lloh18:
	adrp	x8, _CONFIG_PID_IN_CONTEXTIDR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _CONFIG_PID_IN_CONTEXTIDR@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	_IS_ENABLED
	cbz	x0, LBB0_5
; %bb.3:
Lloh21:
	adrp	x8, _CAP_SYS_ADMIN@GOTPAGE
Lloh22:
	ldr	x8, [x8, _CAP_SYS_ADMIN@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	bl	_capable
	cbz	x0, LBB0_5
; %bb.4:
Lloh24:
	adrp	x8, _SYS_PMSCR_EL1_CX_SHIFT@GOTPAGE
Lloh25:
	ldr	x8, [x8, _SYS_PMSCR_EL1_CX_SHIFT@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	bl	_BIT
	orr	w19, w0, w19
LBB0_5:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
Lloh27:
	adrp	x8, _SYS_PMSCR_EL1_E0SPE_SHIFT@GOTPAGE
Lloh28:
	ldr	x8, [x8, _SYS_PMSCR_EL1_E0SPE_SHIFT@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
	bl	_BIT
	orr	w19, w0, w19
	ldr	w8, [x20]
	cbnz	w8, LBB0_2
LBB0_7:
Lloh30:
	adrp	x8, _SYS_PMSCR_EL1_E1SPE_SHIFT@GOTPAGE
Lloh31:
	ldr	x8, [x8, _SYS_PMSCR_EL1_E1SPE_SHIFT@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
	bl	_BIT
	orr	w19, w0, w19
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_ts_enable,4,2                  ; @ts_enable
	.comm	_SYS_PMSCR_EL1_TS_SHIFT,4,2     ; @SYS_PMSCR_EL1_TS_SHIFT
	.comm	_pa_enable,4,2                  ; @pa_enable
	.comm	_SYS_PMSCR_EL1_PA_SHIFT,4,2     ; @SYS_PMSCR_EL1_PA_SHIFT
	.comm	_pct_enable,4,2                 ; @pct_enable
	.comm	_SYS_PMSCR_EL1_PCT_SHIFT,4,2    ; @SYS_PMSCR_EL1_PCT_SHIFT
	.comm	_SYS_PMSCR_EL1_E0SPE_SHIFT,4,2  ; @SYS_PMSCR_EL1_E0SPE_SHIFT
	.comm	_SYS_PMSCR_EL1_E1SPE_SHIFT,4,2  ; @SYS_PMSCR_EL1_E1SPE_SHIFT
	.comm	_CONFIG_PID_IN_CONTEXTIDR,4,2   ; @CONFIG_PID_IN_CONTEXTIDR
	.comm	_CAP_SYS_ADMIN,4,2              ; @CAP_SYS_ADMIN
	.comm	_SYS_PMSCR_EL1_CX_SHIFT,4,2     ; @SYS_PMSCR_EL1_CX_SHIFT
	.no_dead_strip	_arm_spe_event_to_pmscr
.subsections_via_symbols
