	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$0, (%rdi)
	jne	LBB0_10
## %bb.1:
	movl	%edx, %r15d
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	_ticks@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	$1, (%rdi)
	xorl	%r12d, %r12d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, %edi
	callq	_delay
	movq	%rbx, %rdi
	callq	_mtx_lock
	cmpl	$0, (%r14)
	je	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	testl	%r15d, %r15d
	js	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_ticks@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	subl	%r13d, %eax
	cmpl	%r15d, %eax
	jge	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%eax, %eax
	js	LBB0_9
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_mtx_unlock
	xorl	%eax, %eax
	callq	_usb_idle
	incl	%r12d
	movl	$1000000, %eax                  ## imm = 0xF4240
	xorl	%edx, %edx
	movq	_hz@GOTPCREL(%rip), %rcx
	idivl	(%rcx)
	cmpl	%eax, %r12d
	jl	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, %edi
	callq	_callout_process
	xorl	%r12d, %r12d
	jmp	LBB0_7
LBB0_8:
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_9:
	movl	$0, (%r14)
LBB0_10:
	movq	_EWOULDBLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ticks,4,2                      ## @ticks
	.comm	_EWOULDBLOCK,4,2                ## @EWOULDBLOCK
	.comm	_hz,4,2                         ## @hz
.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:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	w8, [x0]
	cbnz	w8, LBB0_10
; %bb.1:
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	mov	w25, #0
Lloh0:
	adrp	x22, _ticks@GOTPAGE
Lloh1:
	ldr	x22, [x22, _ticks@GOTPAGEOFF]
	ldr	w23, [x22]
	mov	w8, #1
	str	w8, [x0]
Lloh2:
	adrp	x24, _hz@GOTPAGE
Lloh3:
	ldr	x24, [x24, _hz@GOTPAGEOFF]
	mov	w26, #16960
	movk	w26, #15, lsl #16
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #1
	bl	_delay
	mov	x0, x21
	bl	_mtx_lock
	ldr	w8, [x19]
	cbz	w8, LBB0_8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	tbnz	w20, #31, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x22]
	sub	w8, w8, w23
	cmp	w8, w20
	b.ge	LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	tbnz	w8, #31, LBB0_9
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	bl	_mtx_unlock
	bl	_usb_idle
	add	w25, w25, #1
	ldr	w8, [x24]
	sdiv	w8, w26, w8
	cmp	w25, w8
	b.lt	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #1
	bl	_callout_process
	mov	w25, #0
	b	LBB0_2
LBB0_8:
	mov	w0, #0
	b	LBB0_11
LBB0_9:
	str	wzr, [x19]
LBB0_10:
Lloh4:
	adrp	x8, _EWOULDBLOCK@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EWOULDBLOCK@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
LBB0_11:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_ticks,4,2                      ; @ticks
	.comm	_EWOULDBLOCK,4,2                ; @EWOULDBLOCK
	.comm	_hz,4,2                         ; @hz
.subsections_via_symbols
