	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function soft_allocate_pmc
_soft_allocate_pmc:                     ## @soft_allocate_pmc
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_PMC_EV_SOFT_FIRST@GOTPCREL(%rip), %rcx
	movl	$-1, %eax
	cmpl	%edi, (%rcx)
	jg	LBB0_3
## %bb.1:
	movq	_PMC_EV_SOFT_LAST@GOTPCREL(%rip), %rcx
	cmpl	%edi, (%rcx)
	jl	LBB0_3
## %bb.2:
	movq	_PMC_CAP_READ@GOTPCREL(%rip), %rax
	movq	_PMC_CAP_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	orl	%ecx, (%rdx)
	xorl	%eax, %eax
LBB0_3:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PMC_EV_SOFT_FIRST,4,2          ## @PMC_EV_SOFT_FIRST
	.comm	_PMC_EV_SOFT_LAST,4,2           ## @PMC_EV_SOFT_LAST
	.comm	_PMC_CAP_READ,4,2               ## @PMC_CAP_READ
	.comm	_PMC_CAP_WRITE,4,2              ## @PMC_CAP_WRITE
	.no_dead_strip	_soft_allocate_pmc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function soft_allocate_pmc
_soft_allocate_pmc:                     ; @soft_allocate_pmc
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _PMC_EV_SOFT_FIRST@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PMC_EV_SOFT_FIRST@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _PMC_EV_SOFT_LAST@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PMC_EV_SOFT_LAST@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w0
	ccmp	w9, w0, #8, le
	b.ge	LBB0_2
; %bb.1:
	mov	w0, #-1
	ret
LBB0_2:
	mov	w0, #0
Lloh6:
	adrp	x8, _PMC_CAP_READ@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PMC_CAP_READ@GOTPAGEOFF]
Lloh8:
	adrp	x9, _PMC_CAP_WRITE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _PMC_CAP_WRITE@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x2]
	orr	w8, w8, w9
	str	w8, [x2]
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_PMC_EV_SOFT_FIRST,4,2          ; @PMC_EV_SOFT_FIRST
	.comm	_PMC_EV_SOFT_LAST,4,2           ; @PMC_EV_SOFT_LAST
	.comm	_PMC_CAP_READ,4,2               ; @PMC_CAP_READ
	.comm	_PMC_CAP_WRITE,4,2              ; @PMC_CAP_WRITE
	.no_dead_strip	_soft_allocate_pmc
.subsections_via_symbols
