	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function basic_thread
_basic_thread:                          ## @basic_thread
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_EVTHREAD_ALLOC_LOCK
	callq	_EVTHREAD_ALLOC_COND
	callq	_assert
	callq	_assert
	movq	_wake_all_timeout@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-56(%rbp), %rdi
	leaq	-48(%rbp), %rcx
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, %rsi
	callq	_evtimer_assign
	movq	_NUM_ITERATIONS@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_3
## %bb.1:
	leaq	-80(%rbp), %r12
	leaq	-56(%rbp), %r15
	movq	_count_lock@GOTPCREL(%rip), %r14
	movq	_count@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_evutil_timerclear
	movq	$0, -72(%rbp)
	movl	$3000, -80(%rbp)                ## imm = 0xBB8
	movl	-48(%rbp), %edi
	xorl	%esi, %esi
	callq	_EVLOCK_LOCK
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_evtimer_add
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_assert
	movl	-48(%rbp), %esi
	movl	-44(%rbp), %edi
	callq	_EVTHREAD_COND_WAIT
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_assert
	movl	-48(%rbp), %edi
	xorl	%esi, %esi
	callq	_EVLOCK_UNLOCK
	movl	(%r14), %edi
	xorl	%esi, %esi
	callq	_EVLOCK_LOCK
	incl	(%r13)
	movl	(%r14), %edi
	xorl	%esi, %esi
	callq	_EVLOCK_UNLOCK
	incl	%ebx
	movq	_NUM_ITERATIONS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jl	LBB0_2
LBB0_3:
	movq	_count_lock@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	xorl	%esi, %esi
	callq	_EVLOCK_LOCK
	movq	_count@GOTPCREL(%rip), %rax
	movq	_NUM_THREADS@GOTPCREL(%rip), %rcx
	movq	_NUM_ITERATIONS@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	imull	(%rcx), %edx
	cmpl	%edx, (%rax)
	jl	LBB0_5
## %bb.4:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	callq	_event_base_loopexit
LBB0_5:
	movl	(%rbx), %edi
	xorl	%esi, %esi
	callq	_EVLOCK_UNLOCK
	movl	-48(%rbp), %edi
	xorl	%esi, %esi
	callq	_EVTHREAD_FREE_LOCK
	movl	-44(%rbp), %edi
	callq	_EVTHREAD_FREE_COND
	xorl	%eax, %eax
	callq	_THREAD_RETURN
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_wake_all_timeout,4,2           ## @wake_all_timeout
	.comm	_NUM_ITERATIONS,4,2             ## @NUM_ITERATIONS
	.comm	_count_lock,4,2                 ## @count_lock
	.comm	_count,4,2                      ## @count
	.comm	_NUM_THREADS,4,2                ## @NUM_THREADS
	.no_dead_strip	_basic_thread
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function basic_thread
_basic_thread:                          ; @basic_thread
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x0
	mov	w1, #0
	bl	_EVTHREAD_ALLOC_LOCK
	bl	_EVTHREAD_ALLOC_COND
	bl	_assert
	bl	_assert
Lloh0:
	adrp	x8, _wake_all_timeout@GOTPAGE
Lloh1:
	ldr	x8, [x8, _wake_all_timeout@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	add	x0, sp, #16
	add	x3, sp, #24
	mov	x1, x19
	bl	_evtimer_assign
Lloh3:
	adrp	x21, _NUM_ITERATIONS@GOTPAGE
Lloh4:
	ldr	x21, [x21, _NUM_ITERATIONS@GOTPAGEOFF]
	ldr	w8, [x21]
Lloh5:
	adrp	x20, _count_lock@GOTPAGE
Lloh6:
	ldr	x20, [x20, _count_lock@GOTPAGEOFF]
Lloh7:
	adrp	x22, _count@GOTPAGE
Lloh8:
	ldr	x22, [x22, _count@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	w23, #0
	mov	w24, #3000
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, sp
	bl	_evutil_timerclear
	str	xzr, [sp, #8]
	str	w24, [sp]
	ldr	w0, [sp, #24]
	mov	w1, #0
	bl	_EVLOCK_LOCK
	add	x0, sp, #16
	mov	x1, sp
	bl	_evtimer_add
	cmp	x0, #0
	cset	w0, eq
	bl	_assert
	ldp	w1, w0, [sp, #24]
	bl	_EVTHREAD_COND_WAIT
	cmp	x0, #0
	cset	w0, eq
	bl	_assert
	ldr	w0, [sp, #24]
	mov	w1, #0
	bl	_EVLOCK_UNLOCK
	ldr	w0, [x20]
	mov	w1, #0
	bl	_EVLOCK_LOCK
	ldr	w8, [x22]
	add	w8, w8, #1
	str	w8, [x22]
	ldr	w0, [x20]
	mov	w1, #0
	bl	_EVLOCK_UNLOCK
	add	w23, w23, #1
	ldr	w8, [x21]
	cmp	w23, w8
	b.lt	LBB0_2
LBB0_3:
	ldr	w0, [x20]
	mov	w1, #0
	bl	_EVLOCK_LOCK
	ldr	w8, [x22]
Lloh9:
	adrp	x9, _NUM_THREADS@GOTPAGE
Lloh10:
	ldr	x9, [x9, _NUM_THREADS@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	ldr	w10, [x21]
	mul	w9, w10, w9
	cmp	w8, w9
	b.lt	LBB0_5
; %bb.4:
	mov	x0, x19
	mov	x1, #0
	bl	_event_base_loopexit
LBB0_5:
	ldr	w0, [x20]
	mov	w1, #0
	bl	_EVLOCK_UNLOCK
	ldr	w0, [sp, #24]
	mov	w1, #0
	bl	_EVTHREAD_FREE_LOCK
	ldr	w0, [sp, #28]
	bl	_EVTHREAD_FREE_COND
	bl	_THREAD_RETURN
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_wake_all_timeout,4,2           ; @wake_all_timeout
	.comm	_NUM_ITERATIONS,4,2             ; @NUM_ITERATIONS
	.comm	_count_lock,4,2                 ; @count_lock
	.comm	_count,4,2                      ; @count
	.comm	_NUM_THREADS,4,2                ; @NUM_THREADS
	.no_dead_strip	_basic_thread
.subsections_via_symbols
