	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nanosleep                      ## -- Begin function nanosleep
	.p2align	4, 0x90
_nanosleep:                             ## @nanosleep
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rsi, %rbx
	imull	$1000000, (%rdi), %eax          ## imm = 0xF4240
	movslq	4(%rdi), %rcx
	imulq	$274877907, %rcx, %rcx          ## imm = 0x10624DD3
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$38, %rcx
	addl	%edx, %ecx
	addl	%eax, %ecx
	movl	$1, %eax
	cmovnel	%ecx, %eax
	movl	%eax, -16(%rbp)
	movq	_SYS_sleep_thread@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-16(%rbp), %rsi
	leaq	-12(%rbp), %rdx
                                        ## kill: def $esi killed $esi killed $rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_syscall2
	movl	%eax, %ecx
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jns	LBB0_3
## %bb.1:
	negl	%ecx
	movq	_errno@GOTPCREL(%rip), %rax
	movl	%ecx, (%rax)
	movl	$-1, %eax
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.2:
	movslq	-12(%rbp), %rcx
	imulq	$1125899907, %rcx, %rdx         ## imm = 0x431BDE83
	movq	%rdx, %rsi
	shrq	$63, %rsi
	sarq	$50, %rdx
	addl	%esi, %edx
	movl	%edx, (%rbx)
	imull	$1000000, %edx, %edx            ## imm = 0xF4240
	subl	%edx, %ecx
	imull	$1000, %ecx, %ecx               ## imm = 0x3E8
	movl	%ecx, 4(%rbx)
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SYS_sleep_thread,4,2           ## @SYS_sleep_thread
	.comm	_errno,4,2                      ## @errno
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nanosleep                      ; -- Begin function nanosleep
	.p2align	2
_nanosleep:                             ; @nanosleep
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	mov	w20, #16960
	movk	w20, #15, lsl #16
	ldp	w8, w9, [x0]
                                        ; kill: def $w9 killed $w9 def $x9
	sxtw	x9, w9
	mov	w10, #19923
	movk	w10, #4194, lsl #16
	mul	x9, x9, x10
	lsr	x10, x9, #63
	asr	x9, x9, #38
	add	w9, w9, w10
	madd	w8, w8, w20, w9
	cmp	w8, #0
	csinc	w8, w8, wzr, ne
	str	w8, [sp, #12]
Lloh0:
	adrp	x8, _SYS_sleep_thread@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SYS_sleep_thread@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, sp, #12
	add	x2, sp, #8
	bl	_syscall2
	tbnz	w0, #31, LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_5
LBB0_2:
	neg	w8, w0
Lloh3:
	adrp	x9, _errno@GOTPAGE
Lloh4:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh5:
	str	w8, [x9]
	cbz	x19, LBB0_4
; %bb.3:
	ldr	w8, [sp, #8]
	sdiv	w9, w8, w20
	msub	w8, w9, w20, w8
	mov	w10, #1000
	mul	w8, w8, w10
	stp	w9, w8, [x19]
LBB0_4:
	mov	w0, #-1
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotStr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_SYS_sleep_thread,4,2           ; @SYS_sleep_thread
	.comm	_errno,4,2                      ; @errno
.subsections_via_symbols
