	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __x86_pmu_event_init
___x86_pmu_event_init:                  ## @__x86_pmu_event_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_x86_pmu_initialized
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_active_events@GOTPCREL(%rip), %rdi
	callq	_atomic_inc_not_zero
	testl	%eax, %eax
	jne	LBB0_8
## %bb.3:
	movq	_pmc_reserve_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	_active_events@GOTPCREL(%rip), %rdi
	callq	_atomic_read
	testq	%rax, %rax
	jne	LBB0_7
## %bb.4:
	xorl	%eax, %eax
	callq	_reserve_pmc_hardware
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	xorl	%eax, %eax
	callq	_reserve_ds_buffers
LBB0_7:
	movq	_active_events@GOTPCREL(%rip), %rdi
	callq	_atomic_inc
	movq	_pmc_reserve_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
LBB0_8:
	movq	_hw_perf_event_destroy@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r14)
	pcmpeqd	%xmm0, %xmm0
	movdqu	%xmm0, (%r14)
	movq	_EXTRA_REG_NONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 24(%r14)
	movq	%rax, 16(%r14)
	movq	_x86_pmu@GOTPCREL(%rip), %rax
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmpq	*(%rax)                         ## TAILCALL
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_6:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	je	LBB0_7
## %bb.9:
	negl	%ebx
	movq	_pmc_reserve_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_active_events,4,2              ## @active_events
	.comm	_pmc_reserve_mutex,4,2          ## @pmc_reserve_mutex
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_hw_perf_event_destroy,4,2      ## @hw_perf_event_destroy
	.comm	_EXTRA_REG_NONE,8,3             ## @EXTRA_REG_NONE
	.comm	_x86_pmu,8,3                    ## @x86_pmu
	.no_dead_strip	___x86_pmu_event_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __x86_pmu_event_init
___x86_pmu_event_init:                  ; @__x86_pmu_event_init
	.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	x19, x0
	bl	_x86_pmu_initialized
	cbz	w0, LBB0_7
; %bb.1:
Lloh0:
	adrp	x0, _active_events@GOTPAGE
Lloh1:
	ldr	x0, [x0, _active_events@GOTPAGEOFF]
	bl	_atomic_inc_not_zero
	cbnz	w0, LBB0_6
; %bb.2:
Lloh2:
	adrp	x0, _pmc_reserve_mutex@GOTPAGE
Lloh3:
	ldr	x0, [x0, _pmc_reserve_mutex@GOTPAGEOFF]
	bl	_mutex_lock
Lloh4:
	adrp	x0, _active_events@GOTPAGE
Lloh5:
	ldr	x0, [x0, _active_events@GOTPAGEOFF]
	bl	_atomic_read
	cbnz	x0, LBB0_5
; %bb.3:
	bl	_reserve_pmc_hardware
	cbz	w0, LBB0_9
; %bb.4:
	bl	_reserve_ds_buffers
LBB0_5:
Lloh6:
	adrp	x0, _active_events@GOTPAGE
Lloh7:
	ldr	x0, [x0, _active_events@GOTPAGEOFF]
	bl	_atomic_inc
Lloh8:
	adrp	x0, _pmc_reserve_mutex@GOTPAGE
Lloh9:
	ldr	x0, [x0, _pmc_reserve_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
LBB0_6:
Lloh10:
	adrp	x8, _hw_perf_event_destroy@GOTPAGE
Lloh11:
	ldr	x8, [x8, _hw_perf_event_destroy@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	str	w8, [x19, #32]
	mov	x8, #-1
	stp	x8, x8, [x19]
Lloh13:
	adrp	x8, _EXTRA_REG_NONE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EXTRA_REG_NONE@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	stp	x8, x8, [x19, #16]
Lloh16:
	adrp	x8, _x86_pmu@GOTPAGE
Lloh17:
	ldr	x8, [x8, _x86_pmu@GOTPAGEOFF]
Lloh18:
	ldr	x1, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	br	x1
LBB0_7:
Lloh19:
	adrp	x8, _ENODEV@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_9:
Lloh22:
	adrp	x8, _EBUSY@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	cbz	w8, LBB0_5
; %bb.10:
	neg	w19, w8
Lloh25:
	adrp	x0, _pmc_reserve_mutex@GOTPAGE
Lloh26:
	ldr	x0, [x0, _pmc_reserve_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
	b	LBB0_8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_active_events,4,2              ; @active_events
	.comm	_pmc_reserve_mutex,4,2          ; @pmc_reserve_mutex
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_hw_perf_event_destroy,4,2      ; @hw_perf_event_destroy
	.comm	_EXTRA_REG_NONE,8,3             ; @EXTRA_REG_NONE
	.comm	_x86_pmu,8,3                    ; @x86_pmu
	.no_dead_strip	___x86_pmu_event_init
.subsections_via_symbols
