	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sigtimedwait
_sigtimedwait:                          ## @sigtimedwait
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rdi, %r14
	xorl	%edi, %edi
	testq	%rsi, %rsi
	sete	%dil
	callq	_PJDLOG_ASSERT
	leaq	-48(%rbp), %r12
	movq	%r12, %rdi
	callq	_sigemptyset
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_PJDLOG_VERIFY
	movq	_SIGALRM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rax, %r13
	movq	%r12, %rdi
	callq	_sigaddset
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_PJDLOG_VERIFY
	movq	_SIG_BLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_sigprocmask
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_PJDLOG_VERIFY
	leaq	-64(%rbp), %rdi
	callq	_timerclear
	movq	(%rbx), %rax
	movq	%rax, -80(%rbp)
	movslq	8(%rbx), %rcx
	imulq	$274877907, %rcx, %rdx          ## imm = 0x10624DD3
	movq	%rdx, %rsi
	shrq	$63, %rsi
	sarq	$38, %rdx
	addl	%esi, %edx
	addl	$999, %ecx                      ## imm = 0x3E7
	cmpl	$1999, %ecx                     ## imm = 0x7CF
	movl	$1, %ecx
	cmovael	%edx, %ecx
	testq	%rax, %rax
	cmovnel	%edx, %ecx
	movl	%ecx, -72(%rbp)
	movq	_ITIMER_REAL@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	leaq	-80(%rbp), %rbx
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_setitimer
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_PJDLOG_VERIFY
	movl	(%r14), %eax
	movl	%eax, -48(%rbp)
	movl	(%r13), %esi
	movq	%r13, %r14
	movq	%r12, %rdi
	callq	_sigaddset
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_PJDLOG_VERIFY
	leaq	-44(%rbp), %rsi
	movq	%r12, %rdi
	callq	_sigwait
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_PJDLOG_VERIFY
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	leaq	-64(%rbp), %rdi
	callq	_timerclear
	movq	%rbx, %rdi
	callq	_timerclear
	movl	(%r15), %edi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_setitimer
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_PJDLOG_VERIFY
	movq	%r12, %rdi
	callq	_sigemptyset
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_PJDLOG_VERIFY
	movl	(%r14), %esi
	movq	%r12, %rdi
	callq	_sigaddset
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_PJDLOG_VERIFY
	movq	_SIG_UNBLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_sigprocmask
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_PJDLOG_VERIFY
	movl	-44(%rbp), %ecx
	cmpl	(%r14), %ecx
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	cmovel	(%rax), %r13d
	movl	$-1, %eax
	cmovnel	%ecx, %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%r13d, (%rcx)
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SIGALRM,4,2                    ## @SIGALRM
	.comm	_SIG_BLOCK,4,2                  ## @SIG_BLOCK
	.comm	_ITIMER_REAL,4,2                ## @ITIMER_REAL
	.comm	_errno,4,2                      ## @errno
	.comm	_SIG_UNBLOCK,4,2                ## @SIG_UNBLOCK
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.no_dead_strip	_sigtimedwait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sigtimedwait
_sigtimedwait:                          ; @sigtimedwait
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x21, x2
	mov	x19, x0
	cmp	x1, #0
	cset	w0, eq
	bl	_PJDLOG_ASSERT
	add	x0, sp, #12
	bl	_sigemptyset
	cmp	x0, #0
	cset	w0, eq
	bl	_PJDLOG_VERIFY
Lloh0:
	adrp	x22, _SIGALRM@GOTPAGE
Lloh1:
	ldr	x22, [x22, _SIGALRM@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x0, sp, #12
	bl	_sigaddset
	cmp	x0, #0
	cset	w0, eq
	bl	_PJDLOG_VERIFY
Lloh2:
	adrp	x8, _SIG_BLOCK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SIG_BLOCK@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	add	x1, sp, #12
	mov	x2, #0
	bl	_sigprocmask
	cmp	x0, #0
	cset	w0, eq
	bl	_PJDLOG_VERIFY
	add	x8, sp, #16
	add	x20, x8, #16
	mov	x0, x20
	bl	_timerclear
	ldr	x8, [x21]
	str	x8, [sp, #16]
	ldrsw	x9, [x21, #8]
	mov	w10, #19923
	movk	w10, #4194, lsl #16
	mul	x10, x9, x10
	lsr	x11, x10, #63
	asr	x10, x10, #38
	add	w10, w10, w11
	add	w9, w9, #999
	cmp	w9, #1999
	ccmp	x8, #0, #0, lo
	csinc	w8, w10, wzr, ne
	str	w8, [sp, #24]
Lloh5:
	adrp	x23, _ITIMER_REAL@GOTPAGE
Lloh6:
	ldr	x23, [x23, _ITIMER_REAL@GOTPAGEOFF]
	ldr	w0, [x23]
	add	x1, sp, #16
	mov	x2, #0
	bl	_setitimer
	cmp	x0, #0
	cset	w0, eq
	bl	_PJDLOG_VERIFY
	ldr	w8, [x19]
	str	w8, [sp, #12]
	ldr	w1, [x22]
	add	x0, sp, #12
	bl	_sigaddset
	cmp	x0, #0
	cset	w0, eq
	bl	_PJDLOG_VERIFY
	add	x0, sp, #12
	add	x1, sp, #8
	bl	_sigwait
	cmp	x0, #0
	cset	w0, eq
	bl	_PJDLOG_VERIFY
Lloh7:
	adrp	x19, _errno@GOTPAGE
Lloh8:
	ldr	x19, [x19, _errno@GOTPAGEOFF]
	ldr	w21, [x19]
	mov	x0, x20
	bl	_timerclear
	add	x0, sp, #16
	bl	_timerclear
	ldr	w0, [x23]
	add	x1, sp, #16
	mov	x2, #0
	bl	_setitimer
	cmp	x0, #0
	cset	w0, eq
	bl	_PJDLOG_VERIFY
	add	x0, sp, #12
	bl	_sigemptyset
	cmp	x0, #0
	cset	w0, eq
	bl	_PJDLOG_VERIFY
	ldr	w1, [x22]
	add	x0, sp, #12
	bl	_sigaddset
	cmp	x0, #0
	cset	w0, eq
	bl	_PJDLOG_VERIFY
Lloh9:
	adrp	x8, _SIG_UNBLOCK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SIG_UNBLOCK@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	add	x1, sp, #12
	mov	x2, #0
	bl	_sigprocmask
	cmp	x0, #0
	cset	w0, eq
	bl	_PJDLOG_VERIFY
	ldr	w8, [sp, #8]
	ldr	w9, [x22]
Lloh12:
	adrp	x10, _EAGAIN@GOTPAGE
Lloh13:
	ldr	x10, [x10, _EAGAIN@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	cmp	w8, w9
	csel	w9, w10, w21, eq
	csinv	w0, w8, wzr, ne
	str	w9, [x19]
	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
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_SIGALRM,4,2                    ; @SIGALRM
	.comm	_SIG_BLOCK,4,2                  ; @SIG_BLOCK
	.comm	_ITIMER_REAL,4,2                ; @ITIMER_REAL
	.comm	_errno,4,2                      ; @errno
	.comm	_SIG_UNBLOCK,4,2                ; @SIG_UNBLOCK
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.no_dead_strip	_sigtimedwait
.subsections_via_symbols
