	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ConditionVariableTimedSleep    ## -- Begin function ConditionVariableTimedSleep
	.p2align	4, 0x90
_ConditionVariableTimedSleep:           ## @ConditionVariableTimedSleep
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_cv_sleep_target@GOTPCREL(%rip), %rax
	cmpq	%rdi, (%rax)
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_ConditionVariablePrepareToSleep
	jmp	LBB0_11
LBB0_2:
	movl	%edx, %r14d
	movq	%rsi, %r13
	testq	%rsi, %rsi
	js	LBB0_4
## %bb.3:
	callq	_INSTR_TIME_SET_CURRENT
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpq	%r13, (%rax)
	setge	%dil
	callq	_Assert
	movq	%r13, %r15
	jmp	LBB0_5
LBB0_4:
	movq	$-1, %r15
LBB0_5:
	leaq	4(%rbx), %r12
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	_cv_wait_event_set@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	leaq	-44(%rbp), %rdx
	movl	$1, %ecx
	movl	%r14d, %r8d
	callq	_WaitEventSetWait
	movq	_MyLatch@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ResetLatch
	xorl	%eax, %eax
	callq	_CHECK_FOR_INTERRUPTS
	movq	%rbx, %rdi
	callq	_SpinLockAcquire
	movq	_MyProc@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %esi
	movq	_cvWaitLink@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_proclist_contains
	testl	%eax, %eax
	je	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%rbx, %rdi
	callq	_SpinLockRelease
	testq	%r13, %r13
	js	LBB0_6
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	callq	_INSTR_TIME_SET_CURRENT
	callq	_INSTR_TIME_SUBTRACT
	callq	_INSTR_TIME_GET_MILLISEC
	movq	%r13, %r15
	subq	%rax, %r15
	jg	LBB0_6
## %bb.9:
	movl	$1, %eax
	jmp	LBB0_12
LBB0_10:
	movq	_MyProc@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %esi
	movq	_cvWaitLink@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_proclist_push_tail
	movq	%rbx, %rdi
	callq	_SpinLockRelease
LBB0_11:
	xorl	%eax, %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cv_sleep_target,8,3            ## @cv_sleep_target
	.comm	_INT_MAX,8,3                    ## @INT_MAX
	.comm	_cv_wait_event_set,4,2          ## @cv_wait_event_set
	.comm	_MyLatch,4,2                    ## @MyLatch
	.comm	_MyProc,8,3                     ## @MyProc
	.comm	_cvWaitLink,4,2                 ## @cvWaitLink
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ConditionVariableTimedSleep    ; -- Begin function ConditionVariableTimedSleep
	.p2align	2
_ConditionVariableTimedSleep:           ; @ConditionVariableTimedSleep
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x8, _cv_sleep_target@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cv_sleep_target@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x0
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_ConditionVariablePrepareToSleep
	b	LBB0_11
LBB0_2:
	mov	x20, x2
	mov	x21, x1
	tbnz	x1, #63, LBB0_4
; %bb.3:
	bl	_INSTR_TIME_SET_CURRENT
Lloh3:
	adrp	x8, _INT_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _INT_MAX@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x8, x21
	cset	w0, ge
	bl	_Assert
	mov	x23, x21
	b	LBB0_5
LBB0_4:
	mov	x23, #-1
LBB0_5:
	add	x22, x19, #4
Lloh6:
	adrp	x24, _cv_wait_event_set@GOTPAGE
Lloh7:
	ldr	x24, [x24, _cv_wait_event_set@GOTPAGEOFF]
Lloh8:
	adrp	x27, _MyLatch@GOTPAGE
Lloh9:
	ldr	x27, [x27, _MyLatch@GOTPAGEOFF]
Lloh10:
	adrp	x26, _MyProc@GOTPAGE
Lloh11:
	ldr	x26, [x26, _MyProc@GOTPAGEOFF]
Lloh12:
	adrp	x25, _cvWaitLink@GOTPAGE
Lloh13:
	ldr	x25, [x25, _cvWaitLink@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x24]
	add	x2, sp, #12
	mov	x1, x23
	mov	w3, #1
	mov	x4, x20
	bl	_WaitEventSetWait
	ldr	w0, [x27]
	bl	_ResetLatch
	bl	_CHECK_FOR_INTERRUPTS
	mov	x0, x19
	bl	_SpinLockAcquire
	ldr	x8, [x26]
	ldr	w1, [x8]
	ldr	w2, [x25]
	mov	x0, x22
	bl	_proclist_contains
	cbz	w0, LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x19
	bl	_SpinLockRelease
	tbnz	x21, #63, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	bl	_INSTR_TIME_SET_CURRENT
	bl	_INSTR_TIME_SUBTRACT
	bl	_INSTR_TIME_GET_MILLISEC
	sub	x23, x21, x0
	cmp	x23, #0
	b.gt	LBB0_6
; %bb.9:
	mov	w0, #1
	b	LBB0_12
LBB0_10:
	ldr	x8, [x26]
	ldr	w1, [x8]
	ldr	w2, [x25]
	mov	x0, x22
	bl	_proclist_push_tail
	mov	x0, x19
	bl	_SpinLockRelease
LBB0_11:
	mov	w0, #0
LBB0_12:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_cv_sleep_target,8,3            ; @cv_sleep_target
	.comm	_INT_MAX,8,3                    ; @INT_MAX
	.comm	_cv_wait_event_set,4,2          ; @cv_wait_event_set
	.comm	_MyLatch,4,2                    ; @MyLatch
	.comm	_MyProc,8,3                     ; @MyProc
	.comm	_cvWaitLink,4,2                 ; @cvWaitLink
.subsections_via_symbols
