	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hw_perf_event_destroy
_hw_perf_event_destroy:                 ## @hw_perf_event_destroy
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_active_events@GOTPCREL(%rip), %rdi
	movq	_pmc_reserve_mutex@GOTPCREL(%rip), %rsi
	callq	_atomic_dec_and_mutex_lock
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	xorl	%eax, %eax
	callq	_release_pmc_hardware
	xorl	%eax, %eax
	callq	_release_ds_buffers
	movq	_pmc_reserve_mutex@GOTPCREL(%rip), %rdi
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
LBB0_1:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_active_events,4,2              ## @active_events
	.comm	_pmc_reserve_mutex,4,2          ## @pmc_reserve_mutex
	.no_dead_strip	_hw_perf_event_destroy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hw_perf_event_destroy
_hw_perf_event_destroy:                 ; @hw_perf_event_destroy
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh0:
	adrp	x0, _active_events@GOTPAGE
Lloh1:
	ldr	x0, [x0, _active_events@GOTPAGEOFF]
Lloh2:
	adrp	x1, _pmc_reserve_mutex@GOTPAGE
Lloh3:
	ldr	x1, [x1, _pmc_reserve_mutex@GOTPAGEOFF]
	bl	_atomic_dec_and_mutex_lock
	cbz	x0, LBB0_2
; %bb.1:
	bl	_release_pmc_hardware
	bl	_release_ds_buffers
Lloh4:
	adrp	x0, _pmc_reserve_mutex@GOTPAGE
Lloh5:
	ldr	x0, [x0, _pmc_reserve_mutex@GOTPAGEOFF]
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	b	_mutex_unlock
LBB0_2:
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_active_events,4,2              ; @active_events
	.comm	_pmc_reserve_mutex,4,2          ; @pmc_reserve_mutex
	.no_dead_strip	_hw_perf_event_destroy
.subsections_via_symbols
