	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_thrd_sleep                     ## -- Begin function thrd_sleep
	.p2align	4, 0x90
_thrd_sleep:                            ## @thrd_sleep
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_CLOCK_REALTIME@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-24(%rbp), %rsi
	callq	_clock_gettime
	movq	%rax, %rcx
	movl	$-2, %eax
	testq	%rcx, %rcx
	jne	LBB0_8
## %bb.1:
	movslq	(%rbx), %rax
	movslq	-24(%rbp), %rcx
	subq	%rcx, %rax
	imulq	$1000000, %rax, %rcx            ## imm = 0xF4240
	movslq	4(%rbx), %rax
	movslq	-20(%rbp), %rdx
	subq	%rdx, %rax
	addq	$500, %rax                      ## imm = 0x1F4
	movabsq	$2361183241434822607, %rdx      ## imm = 0x20C49BA5E353F7CF
	imulq	%rdx
	movq	%rdx, %rax
	shrq	$63, %rax
	sarq	$7, %rdx
	addq	%rax, %rdx
	addq	%rcx, %rdx
	cmpq	$1000000, %rdx                  ## imm = 0xF4240
	jl	LBB0_4
## %bb.2:
	movq	%rdx, %rbx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	$999999, %edi                   ## imm = 0xF423F
	callq	_usleep
	leaq	-999999(%rbx), %rdx
	cmpq	$1999998, %rbx                  ## imm = 0x1E847E
	movq	%rdx, %rbx
	ja	LBB0_3
	jmp	LBB0_5
LBB0_4:
	testq	%rdx, %rdx
	jle	LBB0_6
LBB0_5:
	movl	%edx, %edi
	callq	_usleep
LBB0_6:
	xorl	%eax, %eax
	testq	%r14, %r14
	je	LBB0_8
## %bb.7:
	movq	$0, (%r14)
LBB0_8:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CLOCK_REALTIME,4,2             ## @CLOCK_REALTIME
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_thrd_sleep                     ; -- Begin function thrd_sleep
	.p2align	2
_thrd_sleep:                            ; @thrd_sleep
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _CLOCK_REALTIME@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CLOCK_REALTIME@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, sp, #8
	bl	_clock_gettime
	cbz	x0, LBB0_2
; %bb.1:
	mov	w0, #-2
	b	LBB0_9
LBB0_2:
	ldpsw	x8, x9, [x20]
	ldpsw	x10, x11, [sp, #8]
	sub	x8, x8, x10
	mov	w21, #16959
	movk	w21, #15, lsl #16
	madd	x8, x8, x21, x8
	sub	x9, x9, x11
	add	x9, x9, #500
	mov	x10, #63439
	movk	x10, #58195, lsl #16
	movk	x10, #39845, lsl #32
	movk	x10, #8388, lsl #48
	smulh	x9, x9, x10
	asr	x10, x9, #7
	add	x9, x10, x9, lsr #63
	add	x20, x9, x8
	cmp	x20, x21
	b.le	LBB0_5
; %bb.3:
	mov	x22, #-16959
	movk	x22, #65520, lsl #16
	mov	w23, #33918
	movk	w23, #30, lsl #16
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #16959
	movk	w0, #15, lsl #16
	bl	_usleep
	add	x20, x20, x22
	add	x8, x20, x21
	cmp	x8, x23
	b.hi	LBB0_4
	b	LBB0_6
LBB0_5:
	cmp	x20, #1
	b.lt	LBB0_7
LBB0_6:
	mov	x0, x20
	bl	_usleep
LBB0_7:
	mov	w0, #0
	cbz	x19, LBB0_9
; %bb.8:
	str	xzr, [x19]
LBB0_9:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_CLOCK_REALTIME,4,2             ; @CLOCK_REALTIME
.subsections_via_symbols
