	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function count_wait_for
_count_wait_for:                        ## @count_wait_for
	.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, %ebx
	movl	%edi, %r14d
	movq	_count_lock@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_EVLOCK_LOCK
	movq	_count@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%ebx, %ebx
	jle	LBB0_5
## %bb.1:
	cmpl	%r14d, %eax
	je	LBB0_5
## %bb.2:
	movq	_count_cond@GOTPCREL(%rip), %r12
	leaq	-56(%rbp), %r15
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %r13d
	movq	$0, -48(%rbp)
	imull	$1000, %ebx, %eax               ## imm = 0x3E8
	movl	%eax, -56(%rbp)
	xorl	%eax, %eax
	callq	_GetTickCount
	movq	%rax, %rbx
	movl	(%r12), %edi
	movq	_count_lock@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdx
	callq	_EVTHREAD_COND_WAIT_TIMED
	xorl	%eax, %eax
	callq	_GetTickCount
	subl	%eax, %ebx
	addl	%r13d, %ebx
	movq	_count@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%ebx, %ebx
	jle	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	%r14d, %eax
	jne	LBB0_3
LBB0_5:
	xorl	%ebx, %ebx
	cmpl	%r14d, %eax
	setne	%bl
	negl	%ebx
	movq	_count_lock@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_EVLOCK_UNLOCK
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_count_lock,4,2                 ## @count_lock
	.comm	_count,4,2                      ## @count
	.comm	_count_cond,4,2                 ## @count_cond
	.no_dead_strip	_count_wait_for
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function count_wait_for
_count_wait_for:                        ; @count_wait_for
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x22, _count_lock@GOTPAGE
Lloh1:
	ldr	x22, [x22, _count_lock@GOTPAGEOFF]
	ldr	w0, [x22]
	mov	w1, #0
	bl	_EVLOCK_LOCK
Lloh2:
	adrp	x23, _count@GOTPAGE
Lloh3:
	ldr	x23, [x23, _count@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w20, #1
	b.lt	LBB0_5
; %bb.1:
	cmp	w8, w19
	b.eq	LBB0_5
; %bb.2:
	mov	w24, #1000
Lloh4:
	adrp	x25, _count_cond@GOTPAGE
Lloh5:
	ldr	x25, [x25, _count_cond@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	str	xzr, [sp, #8]
	mul	w8, w20, w24
	str	w8, [sp]
	bl	_GetTickCount
	mov	x21, x0
	ldr	w0, [x25]
	ldr	w1, [x22]
	mov	x2, sp
	bl	_EVTHREAD_COND_WAIT_TIMED
	bl	_GetTickCount
	sub	w8, w21, w0
	add	w20, w20, w8
	ldr	w8, [x23]
	cmp	w20, #1
	b.lt	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w8, w19
	b.ne	LBB0_3
LBB0_5:
	cmp	w8, w19
	csetm	w19, ne
	ldr	w0, [x22]
	mov	w1, #0
	bl	_EVLOCK_UNLOCK
	mov	x0, x19
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_count_lock,4,2                 ; @count_lock
	.comm	_count,4,2                      ; @count
	.comm	_count_cond,4,2                 ; @count_cond
	.no_dead_strip	_count_wait_for
.subsections_via_symbols
