	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function thread_prof_sample_event_handler
_thread_prof_sample_event_handler:      ## @thread_prof_sample_event_handler
	.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	_config_prof@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	setne	%al
	movq	_opt_prof@GOTPCREL(%rip), %rcx
	cmpq	$0, (%rcx)
	movq	%rdi, %r14
	setne	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	movq	%r14, %rdi
	callq	_prof_sample_event_wait_get
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_assert
	movq	%r14, %rdi
	callq	_thread_allocated_last_event_get
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_prof_sample_last_event_get
	movq	%rax, %r15
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_prof_sample_last_event_set
	movq	%r14, %rdi
	callq	_tsd_tsdn
	subq	%r15, %rbx
	movl	%eax, %edi
	movq	%rbx, %rsi
	callq	_prof_idump_accum
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_tsd_tsdn
	movl	%eax, %edi
	callq	_prof_idump
LBB0_2:
	xorl	%eax, %eax
	callq	_prof_active_get_unlocked
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_lg_prof_sample@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$1, %eax
	shll	%cl, %eax
	movslq	%eax, %rsi
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_thread_prof_sample_event_update ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_config_prof,8,3                ## @config_prof
	.comm	_opt_prof,8,3                   ## @opt_prof
	.comm	_lg_prof_sample,4,2             ## @lg_prof_sample
	.no_dead_strip	_thread_prof_sample_event_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function thread_prof_sample_event_handler
_thread_prof_sample_event_handler:      ; @thread_prof_sample_event_handler
	.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	x19, x0
Lloh0:
	adrp	x8, _config_prof@GOTPAGE
Lloh1:
	ldr	x8, [x8, _config_prof@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, #0
Lloh3:
	adrp	x8, _opt_prof@GOTPAGE
Lloh4:
	ldr	x8, [x8, _opt_prof@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ccmp	x8, #0, #4, ne
	cset	w0, ne
	bl	_assert
	mov	x0, x19
	bl	_prof_sample_event_wait_get
	cmp	w0, #0
	cset	w0, eq
	bl	_assert
	mov	x0, x19
	bl	_thread_allocated_last_event_get
	mov	x20, x0
	mov	x0, x19
	bl	_prof_sample_last_event_get
	mov	x21, x0
	mov	x0, x19
	mov	x1, x20
	bl	_prof_sample_last_event_set
	mov	x0, x19
	bl	_tsd_tsdn
	sub	x1, x20, x21
	bl	_prof_idump_accum
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_tsd_tsdn
	bl	_prof_idump
LBB0_2:
	bl	_prof_active_get_unlocked
	cbz	w0, LBB0_4
; %bb.3:
	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_4:
Lloh6:
	adrp	x8, _lg_prof_sample@GOTPAGE
Lloh7:
	ldr	x8, [x8, _lg_prof_sample@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	mov	w9, #1
	lsl	w8, w9, w8
	sxtw	x1, w8
	mov	x0, x19
	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
	b	_thread_prof_sample_event_update
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_config_prof,8,3                ; @config_prof
	.comm	_opt_prof,8,3                   ; @opt_prof
	.comm	_lg_prof_sample,4,2             ; @lg_prof_sample
	.no_dead_strip	_thread_prof_sample_event_handler
.subsections_via_symbols
