	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pte_timed_eventwait
_pte_timed_eventwait:                   ## @pte_timed_eventwait
	.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
	movl	%edi, %ebx
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.2:
	movq	%rsi, %rdi
	callq	_pte_relmillisecs
	movl	%eax, -12(%rbp)
	leaq	-12(%rbp), %rsi
	movl	%ebx, %edi
	jmp	LBB0_3
LBB0_1:
	movl	%ebx, %edi
	xorl	%esi, %esi
LBB0_3:
	callq	_pte_osSemaphorePend
	movq	_PTE_OS_TIMEOUT@GOTPCREL(%rip), %rdx
	xorl	%ecx, %ecx
	cmpq	(%rdx), %rax
	jne	LBB0_5
## %bb.4:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_5:
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PTE_OS_TIMEOUT,8,3             ## @PTE_OS_TIMEOUT
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_pte_timed_eventwait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pte_timed_eventwait
_pte_timed_eventwait:                   ; @pte_timed_eventwait
	.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, x0
	cbz	x1, LBB0_2
; %bb.1:
	mov	x0, x1
	bl	_pte_relmillisecs
	str	w0, [sp, #12]
	add	x1, sp, #12
LBB0_2:
	mov	x0, x19
	bl	_pte_osSemaphorePend
Lloh0:
	adrp	x8, _PTE_OS_TIMEOUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PTE_OS_TIMEOUT@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _ETIMEDOUT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ETIMEDOUT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	x0, x8
	csel	w0, w9, wzr, eq
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PTE_OS_TIMEOUT,8,3             ; @PTE_OS_TIMEOUT
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_pte_timed_eventwait
.subsections_via_symbols
