	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cv_timedwait                   ## -- Begin function cv_timedwait
	.p2align	4, 0x90
_cv_timedwait:                          ## @cv_timedwait
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %r12
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	_ddi_get_lbolt
	movl	%eax, %r14d
	addl	%r15d, %r14d
	leaq	8(%r12), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	$-1, %r13d
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%r12, %rdi
	callq	_mutex_owner
	xorl	%edi, %edi
	movq	_curthread@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rax
	sete	%dil
	callq	_ASSERT
	movq	$0, (%r12)
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	leaq	-56(%rbp), %rdx
	callq	_pthread_cond_timedwait
	movq	(%rbx), %rcx
	movq	%rcx, (%r12)
	movq	_EINTR@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_7
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_ddi_get_lbolt
	movl	%r14d, %r15d
	subl	%eax, %r15d
	testl	%r15d, %r15d
	jle	LBB0_9
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	leaq	-88(%rbp), %rdi
	xorl	%esi, %esi
	callq	_gettimeofday
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%edi, %edi
	callq	_assert
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_hz@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r15d, %eax
	cltd
	idivl	%ecx
	movl	%edx, %edi
	cltq
	addq	-80(%rbp), %rax
	movq	%rax, -48(%rbp)
	imull	$1000, -88(%rbp), %esi          ## imm = 0x3E8
	movq	_NANOSEC@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	cltd
	idivl	%ecx
	imull	%eax, %edi
	addl	%esi, %edi
	movl	%edi, -56(%rbp)
	notl	%edi
	shrl	$31, %edi
	callq	_ASSERT
	movl	-56(%rbp), %eax
	subl	(%rbx), %eax
	jl	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	incq	-48(%rbp)
	movl	%eax, -56(%rbp)
	jmp	LBB0_6
LBB0_7:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_9
## %bb.8:
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_ASSERT
	movl	$1, %r13d
LBB0_9:
	movl	%r13d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_hz,4,2                         ## @hz
	.comm	_NANOSEC,4,2                    ## @NANOSEC
	.comm	_curthread,8,3                  ## @curthread
	.comm	_EINTR,4,2                      ## @EINTR
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cv_timedwait                   ; -- Begin function cv_timedwait
	.p2align	2
_cv_timedwait:                          ; @cv_timedwait
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
	bl	_ddi_get_lbolt
	add	w22, w0, w21
	add	x21, x19, #8
Lloh0:
	adrp	x23, _hz@GOTPAGE
Lloh1:
	ldr	x23, [x23, _hz@GOTPAGEOFF]
	mov	w24, #1000
Lloh2:
	adrp	x25, _NANOSEC@GOTPAGE
Lloh3:
	ldr	x25, [x25, _NANOSEC@GOTPAGEOFF]
Lloh4:
	adrp	x26, _curthread@GOTPAGE
Lloh5:
	ldr	x26, [x26, _curthread@GOTPAGEOFF]
Lloh6:
	adrp	x27, _EINTR@GOTPAGE
Lloh7:
	ldr	x27, [x27, _EINTR@GOTPAGEOFF]
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x19
	bl	_mutex_owner
	ldr	x8, [x26]
	cmp	x0, x8
	cset	w0, eq
	bl	_ASSERT
	str	xzr, [x19]
	add	x2, sp, #16
	mov	x0, x20
	mov	x1, x21
	bl	_pthread_cond_timedwait
	ldr	x8, [x26]
	str	x8, [x19]
	ldr	w8, [x27]
	cmp	w0, w8
	b.ne	LBB0_7
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	bl	_ddi_get_lbolt
	sub	w28, w22, w0
	cmp	w28, #1
	b.lt	LBB0_8
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, sp
	mov	x1, #0
	bl	_gettimeofday
	cbz	x0, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #0
	bl	_assert
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [sp, #8]
	ldr	w9, [x23]
	sdiv	w10, w28, w9
	add	x8, x8, w10, sxtw
	str	x8, [sp, #24]
	ldr	w8, [sp]
	mul	w8, w8, w24
	msub	w10, w10, w9, w28
	ldr	w11, [x25]
	sdiv	w9, w11, w9
	madd	w8, w9, w10, w8
	str	w8, [sp, #16]
	mvn	w8, w8
	lsr	w0, w8, #31
	bl	_ASSERT
	ldr	w8, [sp, #16]
	ldr	w9, [x25]
	subs	w8, w8, w9
	b.lt	LBB0_1
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x9, [sp, #24]
	add	x9, x9, #1
	str	x9, [sp, #24]
	str	w8, [sp, #16]
	b	LBB0_1
LBB0_7:
Lloh8:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_9
LBB0_8:
	mov	w0, #-1
	b	LBB0_10
LBB0_9:
	cmp	w0, #0
	cset	w0, eq
	bl	_ASSERT
	mov	w0, #1
LBB0_10:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_hz,4,2                         ; @hz
	.comm	_NANOSEC,4,2                    ; @NANOSEC
	.comm	_curthread,8,3                  ; @curthread
	.comm	_EINTR,4,2                      ; @EINTR
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
.subsections_via_symbols
