	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function uncore_pmu_event_add
_uncore_pmu_event_add:                  ## @uncore_pmu_event_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r13d
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_uncore_event_to_box
	movq	%rax, %r15
	movq	_UNCORE_PMC_IDX_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	testq	%r15, %r15
	je	LBB0_1
## %bb.2:
	movq	%r15, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_uncore_collect_events
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movq	_PERF_HES_UPTODATE@GOTPCREL(%rip), %rcx
	movq	_PERF_HES_STOPPED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
	movl	%eax, (%r12)
	movq	_PERF_EF_START@GOTPCREL(%rip), %rcx
	testl	%r13d, (%rcx)
	jne	LBB0_6
## %bb.5:
	movq	_PERF_HES_ARCH@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%r12)
LBB0_6:
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	%ebx, %edx
	callq	_uncore_assign_events
	testl	%eax, %eax
	jne	LBB0_25
## %bb.7:
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	movl	(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_15
## %bb.8:
	xorl	%ebx, %ebx
	movq	_PERF_EF_UPDATE@GOTPCREL(%rip), %r12
	movq	_PERF_HES_ARCH@GOTPCREL(%rip), %r13
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	(%r12), %esi
	callq	_uncore_pmu_event_stop
	movl	(%r15), %eax
LBB0_14:                                ##   in Loop: Header=BB0_9 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_15
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r15), %rcx
	movq	(%rcx,%rbx,8), %rdi
	movslq	4(%rdi), %rcx
	cmpl	(%r14,%rbx,4), %ecx
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	8(%rdi), %rdx
	movq	8(%r15), %rsi
	cmpq	(%rsi,%rcx,8), %rdx
	je	LBB0_14
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	(%rdi), %eax
	movq	_PERF_HES_STOPPED@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=1
	orl	(%r13), %eax
	movl	%eax, (%rdi)
	jmp	LBB0_13
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_25
LBB0_3:
	movl	%ebx, %eax
	jmp	LBB0_25
LBB0_15:
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_24
## %bb.16:
	movl	-52(%rbp), %r12d                ## 4-byte Reload
	xorl	%ebx, %ebx
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_17 Depth=1
	incq	%rbx
	cmpq	%rbx, %r12
	je	LBB0_24
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r15), %rax
	movq	(%rax,%rbx,8), %r13
	movslq	4(%r13), %rax
	movl	(%r14,%rbx,4), %edx
	cmpl	%edx, %eax
	jne	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	8(%r13), %rcx
	movq	8(%r15), %rsi
	cmpq	(%rsi,%rax,8), %rcx
	jne	LBB0_19
## %bb.20:                              ##   in Loop: Header=BB0_17 Depth=1
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	jl	LBB0_23
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_17 Depth=1
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_uncore_assign_hw_event
LBB0_21:                                ##   in Loop: Header=BB0_17 Depth=1
	movq	_PERF_HES_ARCH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13)
	jne	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_uncore_pmu_event_start
	jmp	LBB0_23
LBB0_24:
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r15)
	xorl	%eax, %eax
LBB0_25:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_27
## %bb.26:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_27:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_UNCORE_PMC_IDX_MAX,4,2         ## @UNCORE_PMC_IDX_MAX
	.comm	_ENODEV,4,2                     ## @ENODEV
	.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_HES_ARCH,4,2              ## @PERF_HES_ARCH
	.comm	_PERF_EF_UPDATE,4,2             ## @PERF_EF_UPDATE
	.no_dead_strip	_uncore_pmu_event_add
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function uncore_pmu_event_add
_uncore_pmu_event_add:                  ; @uncore_pmu_event_add
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	sub	sp, sp, #16
	mov	x23, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	bl	_uncore_event_to_box
	mov	x19, x0
Lloh3:
	adrp	x8, _UNCORE_PMC_IDX_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _UNCORE_PMC_IDX_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x20, x9, x8
	mov	sp, x20
	cbz	x0, LBB0_13
; %bb.1:
	mov	x0, x19
	mov	x1, x22
	mov	w2, #0
	bl	_uncore_collect_events
	mov	x21, x0
	tbnz	w0, #31, LBB0_14
; %bb.2:
Lloh8:
	adrp	x8, _PERF_HES_UPTODATE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PERF_HES_UPTODATE@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x24, _PERF_HES_STOPPED@GOTPAGE
Lloh12:
	ldr	x24, [x24, _PERF_HES_STOPPED@GOTPAGEOFF]
	ldr	w9, [x24]
	orr	w8, w9, w8
	str	w8, [x22]
Lloh13:
	adrp	x9, _PERF_EF_START@GOTPAGE
Lloh14:
	ldr	x9, [x9, _PERF_EF_START@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	tst	w9, w23
	b.ne	LBB0_4
; %bb.3:
Lloh16:
	adrp	x9, _PERF_HES_ARCH@GOTPAGE
Lloh17:
	ldr	x9, [x9, _PERF_HES_ARCH@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x22]
LBB0_4:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_uncore_assign_events
	cbnz	w0, LBB0_25
; %bb.5:
	ldr	w8, [x19]
Lloh19:
	adrp	x23, _PERF_HES_ARCH@GOTPAGE
Lloh20:
	ldr	x23, [x23, _PERF_HES_ARCH@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.6:
	mov	x22, #0
Lloh21:
	adrp	x25, _PERF_EF_UPDATE@GOTPAGE
Lloh22:
	ldr	x25, [x25, _PERF_EF_UPDATE@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=1
	ldr	w1, [x25]
	bl	_uncore_pmu_event_stop
	ldr	w8, [x19]
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x22, x22, #1
	cmp	x22, w8, sxtw
	b.ge	LBB0_15
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #16]
	ldr	x0, [x9, x22, lsl #3]
	ldrsw	x9, [x0, #4]
	ldr	w10, [x20, x22, lsl #2]
	cmp	w9, w10
	b.ne	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x10, [x0, #8]
	ldr	x11, [x19, #8]
	ldr	x9, [x11, x9, lsl #3]
	cmp	x10, x9
	b.eq	LBB0_8
LBB0_11:                                ;   in Loop: Header=BB0_9 Depth=1
	ldr	w8, [x0]
	ldr	w9, [x24]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w9, [x23]
	orr	w8, w9, w8
	str	w8, [x0]
	b	LBB0_7
LBB0_13:
Lloh23:
	adrp	x8, _ENODEV@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_25
LBB0_14:
	mov	x0, x21
	b	LBB0_25
LBB0_15:
	cmp	w21, #1
	b.lt	LBB0_24
; %bb.16:
	mov	x24, #0
	mov	w25, w21
	b	LBB0_18
LBB0_17:                                ;   in Loop: Header=BB0_18 Depth=1
	add	x24, x24, #1
	cmp	x25, x24
	b.eq	LBB0_24
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	ldr	x22, [x8, x24, lsl #3]
	ldrsw	x8, [x22, #4]
	ldr	w2, [x20, x24, lsl #2]
	cmp	w8, w2
	b.ne	LBB0_21
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	ldr	x9, [x22, #8]
	ldr	x10, [x19, #8]
	ldr	x8, [x10, x8, lsl #3]
	cmp	x9, x8
	b.ne	LBB0_21
; %bb.20:                               ;   in Loop: Header=BB0_18 Depth=1
	ldrsw	x8, [x19]
	cmp	x24, x8
	b.lt	LBB0_17
	b	LBB0_22
LBB0_21:                                ;   in Loop: Header=BB0_18 Depth=1
	mov	x0, x19
	mov	x1, x22
	bl	_uncore_assign_hw_event
LBB0_22:                                ;   in Loop: Header=BB0_18 Depth=1
	ldr	w8, [x22]
	ldr	w9, [x23]
	tst	w9, w8
	b.ne	LBB0_17
; %bb.23:                               ;   in Loop: Header=BB0_18 Depth=1
	mov	x0, x22
	mov	w1, #0
	bl	_uncore_pmu_event_start
	b	LBB0_17
LBB0_24:
	mov	w0, #0
	str	w21, [x19]
LBB0_25:
	ldur	x8, [x29, #-72]
Lloh26:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh27:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_27
; %bb.26:
	sub	sp, x29, #64
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_27:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_UNCORE_PMC_IDX_MAX,4,2         ; @UNCORE_PMC_IDX_MAX
	.comm	_ENODEV,4,2                     ; @ENODEV
	.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_HES_ARCH,4,2              ; @PERF_HES_ARCH
	.comm	_PERF_EF_UPDATE,4,2             ; @PERF_EF_UPDATE
	.no_dead_strip	_uncore_pmu_event_add
.subsections_via_symbols
