	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pmc_pmu_intel_pmcallocate
_pmc_pmu_intel_pmcallocate:             ## @pmc_pmu_intel_pmcallocate
	.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	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rsi
	callq	_strcasestr
	cmpq	%rbx, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strcasestr
	testq	%rax, %rax
	je	LBB0_3
LBB0_2:
	movq	_PMC_CLASS_UCP@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %eax
	movl	%eax, 4(%r15)
	movq	_PMC_CAP_QUALIFIER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r15)
LBB0_9:
	movl	4(%r14), %edi
	callq	_IAP_EVSEL
	orl	%eax, 8(%r15)
	movl	(%r14), %edi
	testl	%edi, %edi
	jle	LBB0_11
## %bb.10:
	callq	_IAP_UMASK
	orl	%eax, 8(%r15)
LBB0_11:
	movl	36(%r14), %edi
	callq	_IAP_CMASK
	orl	8(%r15), %eax
	movl	%eax, 8(%r15)
	movl	32(%r14), %ecx
	movl	%ecx, 12(%r15)
	movl	(%r15), %ecx
	movq	_PMC_CAP_USER@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	movq	_PMC_CAP_SYSTEM@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, %edi
	orl	%esi, %edi
	movl	%edi, %ebx
	andl	%ecx, %ebx
	je	LBB0_13
## %bb.12:
	cmpl	%edi, %ebx
	je	LBB0_13
## %bb.14:
	testl	%ecx, %esi
	je	LBB0_16
## %bb.15:
	movq	_IAP_USR@GOTPCREL(%rip), %rdx
	jmp	LBB0_18
LBB0_13:
	movq	_IAP_USR@GOTPCREL(%rip), %rdx
	movq	_IAP_OS@GOTPCREL(%rip), %rsi
	orl	(%rdx), %eax
	orl	(%rsi), %eax
	jmp	LBB0_19
LBB0_3:
	movl	(%r14), %eax
	cmpl	$-1, %eax
	je	LBB0_6
## %bb.4:
	cmpl	$0, 4(%r14)
	jne	LBB0_7
## %bb.5:
	cmpl	$3, %eax
	jne	LBB0_7
LBB0_6:
	movq	_PMC_CLASS_IAF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r15)
	jmp	LBB0_9
LBB0_16:
	testl	%ecx, %edx
	je	LBB0_20
## %bb.17:
	movq	_IAP_OS@GOTPCREL(%rip), %rdx
LBB0_18:
	orl	(%rdx), %eax
LBB0_19:
	movl	%eax, 8(%r15)
LBB0_20:
	cmpq	$0, 24(%r14)
	je	LBB0_22
## %bb.21:
	movq	_IAP_EDGE@GOTPCREL(%rip), %rdx
	orl	(%rdx), %eax
	movl	%eax, 8(%r15)
LBB0_22:
	cmpq	$0, 16(%r14)
	je	LBB0_24
## %bb.23:
	movq	_IAP_ANY@GOTPCREL(%rip), %rdx
	orl	(%rdx), %eax
	movl	%eax, 8(%r15)
LBB0_24:
	cmpq	$0, 8(%r14)
	je	LBB0_26
## %bb.25:
	movq	_IAP_EDGE@GOTPCREL(%rip), %rdx
	orl	(%rdx), %eax
	movl	%eax, 8(%r15)
LBB0_26:
	movq	_PMC_CAP_INTERRUPT@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_28
## %bb.27:
	movq	_IAP_INT@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, 8(%r15)
LBB0_28:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_PMC_CLASS_IAP@GOTPCREL(%rip), %rax
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"UNC_"

L_.str.1:                               ## @.str.1
	.asciz	"uncore"

	.comm	_PMC_CLASS_UCP,4,2              ## @PMC_CLASS_UCP
	.comm	_PMC_CAP_QUALIFIER,4,2          ## @PMC_CAP_QUALIFIER
	.comm	_PMC_CLASS_IAF,4,2              ## @PMC_CLASS_IAF
	.comm	_PMC_CLASS_IAP,4,2              ## @PMC_CLASS_IAP
	.comm	_PMC_CAP_USER,4,2               ## @PMC_CAP_USER
	.comm	_PMC_CAP_SYSTEM,4,2             ## @PMC_CAP_SYSTEM
	.comm	_IAP_USR,4,2                    ## @IAP_USR
	.comm	_IAP_OS,4,2                     ## @IAP_OS
	.comm	_IAP_EDGE,4,2                   ## @IAP_EDGE
	.comm	_IAP_ANY,4,2                    ## @IAP_ANY
	.comm	_PMC_CAP_INTERRUPT,4,2          ## @PMC_CAP_INTERRUPT
	.comm	_IAP_INT,4,2                    ## @IAP_INT
	.no_dead_strip	_pmc_pmu_intel_pmcallocate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pmc_pmu_intel_pmcallocate
_pmc_pmu_intel_pmcallocate:             ; @pmc_pmu_intel_pmcallocate
	.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, x2
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcasestr
	cmp	x0, x21
	b.eq	LBB0_2
; %bb.1:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_strcasestr
	cbz	x0, LBB0_10
LBB0_2:
Lloh4:
	adrp	x8, _PMC_CLASS_UCP@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PMC_CLASS_UCP@GOTPAGEOFF]
LBB0_3:
Lloh6:
	adrp	x9, _PMC_CAP_QUALIFIER@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PMC_CAP_QUALIFIER@GOTPAGEOFF]
	ldr	w8, [x8]
Lloh8:
	ldr	w9, [x9]
	ldr	w10, [x19]
	orr	w9, w10, w9
	stp	w9, w8, [x19]
LBB0_4:
	ldr	w0, [x20, #4]
	bl	_IAP_EVSEL
	ldr	w8, [x19, #8]
	orr	w8, w8, w0
	str	w8, [x19, #8]
	ldr	w0, [x20]
	cmp	w0, #1
	b.lt	LBB0_6
; %bb.5:
	bl	_IAP_UMASK
	ldr	w8, [x19, #8]
	orr	w8, w8, w0
	str	w8, [x19, #8]
LBB0_6:
	ldr	w0, [x20, #36]
	bl	_IAP_CMASK
	ldr	w8, [x19, #8]
	orr	w8, w8, w0
	ldr	w9, [x20, #32]
	stp	w8, w9, [x19, #8]
	ldr	w9, [x19]
Lloh9:
	adrp	x10, _PMC_CAP_USER@GOTPAGE
Lloh10:
	ldr	x10, [x10, _PMC_CAP_USER@GOTPAGEOFF]
Lloh11:
	adrp	x12, _PMC_CAP_SYSTEM@GOTPAGE
Lloh12:
	ldr	x12, [x12, _PMC_CAP_SYSTEM@GOTPAGEOFF]
Lloh13:
	ldr	w11, [x10]
Lloh14:
	ldr	w10, [x12]
	orr	w12, w10, w11
	and	w13, w12, w9
	cmp	w13, #0
	ccmp	w13, w12, #4, ne
	b.ne	LBB0_8
; %bb.7:
Lloh15:
	adrp	x10, _IAP_USR@GOTPAGE
Lloh16:
	ldr	x10, [x10, _IAP_USR@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
Lloh18:
	adrp	x11, _IAP_OS@GOTPAGE
Lloh19:
	ldr	x11, [x11, _IAP_OS@GOTPAGEOFF]
Lloh20:
	ldr	w11, [x11]
	orr	w8, w10, w8
	orr	w8, w8, w11
	b	LBB0_17
LBB0_8:
	tst	w11, w9
	b.eq	LBB0_14
; %bb.9:
Lloh21:
	adrp	x10, _IAP_USR@GOTPAGE
Lloh22:
	ldr	x10, [x10, _IAP_USR@GOTPAGEOFF]
	b	LBB0_16
LBB0_10:
	ldr	w8, [x20]
	cmn	w8, #1
	b.eq	LBB0_13
; %bb.11:
	ldr	w9, [x20, #4]
	cbnz	w9, LBB0_27
; %bb.12:
	cmp	w8, #3
	b.ne	LBB0_27
LBB0_13:
Lloh23:
	adrp	x8, _PMC_CLASS_IAF@GOTPAGE
Lloh24:
	ldr	x8, [x8, _PMC_CLASS_IAF@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	str	w8, [x19, #4]
	b	LBB0_4
LBB0_14:
	tst	w10, w9
	b.eq	LBB0_18
; %bb.15:
Lloh26:
	adrp	x10, _IAP_OS@GOTPAGE
Lloh27:
	ldr	x10, [x10, _IAP_OS@GOTPAGEOFF]
LBB0_16:
	ldr	w10, [x10]
	orr	w8, w10, w8
LBB0_17:
	str	w8, [x19, #8]
LBB0_18:
	ldr	x11, [x20, #24]
Lloh28:
	adrp	x10, _IAP_EDGE@GOTPAGE
Lloh29:
	ldr	x10, [x10, _IAP_EDGE@GOTPAGEOFF]
	cbz	x11, LBB0_20
; %bb.19:
	ldr	w11, [x10]
	orr	w8, w8, w11
	str	w8, [x19, #8]
LBB0_20:
	ldr	x11, [x20, #16]
	cbz	x11, LBB0_22
; %bb.21:
Lloh30:
	adrp	x11, _IAP_ANY@GOTPAGE
Lloh31:
	ldr	x11, [x11, _IAP_ANY@GOTPAGEOFF]
Lloh32:
	ldr	w11, [x11]
	orr	w8, w8, w11
	str	w8, [x19, #8]
LBB0_22:
	ldr	x11, [x20, #8]
	cbz	x11, LBB0_24
; %bb.23:
	ldr	w10, [x10]
	orr	w8, w8, w10
	str	w8, [x19, #8]
LBB0_24:
Lloh33:
	adrp	x10, _PMC_CAP_INTERRUPT@GOTPAGE
Lloh34:
	ldr	x10, [x10, _PMC_CAP_INTERRUPT@GOTPAGEOFF]
Lloh35:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_26
; %bb.25:
Lloh36:
	adrp	x9, _IAP_INT@GOTPAGE
Lloh37:
	ldr	x9, [x9, _IAP_INT@GOTPAGEOFF]
Lloh38:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x19, #8]
LBB0_26:
	mov	w0, #0
	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_27:
Lloh39:
	adrp	x8, _PMC_CLASS_IAP@GOTPAGE
Lloh40:
	ldr	x8, [x8, _PMC_CLASS_IAP@GOTPAGEOFF]
	b	LBB0_3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"UNC_"

l_.str.1:                               ; @.str.1
	.asciz	"uncore"

	.comm	_PMC_CLASS_UCP,4,2              ; @PMC_CLASS_UCP
	.comm	_PMC_CAP_QUALIFIER,4,2          ; @PMC_CAP_QUALIFIER
	.comm	_PMC_CLASS_IAF,4,2              ; @PMC_CLASS_IAF
	.comm	_PMC_CLASS_IAP,4,2              ; @PMC_CLASS_IAP
	.comm	_PMC_CAP_USER,4,2               ; @PMC_CAP_USER
	.comm	_PMC_CAP_SYSTEM,4,2             ; @PMC_CAP_SYSTEM
	.comm	_IAP_USR,4,2                    ; @IAP_USR
	.comm	_IAP_OS,4,2                     ; @IAP_OS
	.comm	_IAP_EDGE,4,2                   ; @IAP_EDGE
	.comm	_IAP_ANY,4,2                    ; @IAP_ANY
	.comm	_PMC_CAP_INTERRUPT,4,2          ; @PMC_CAP_INTERRUPT
	.comm	_IAP_INT,4,2                    ; @IAP_INT
	.no_dead_strip	_pmc_pmu_intel_pmcallocate
.subsections_via_symbols
