	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pte_cond_timedwait
_pte_cond_timedwait:                    ## @pte_cond_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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	$0, -36(%rbp)
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.1:
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	_PTHREAD_COND_INITIALIZER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_9
LBB0_3:
	movq	(%rbx), %r12
	leaq	4(%r12), %rbx
	movq	%rbx, %rdi
	callq	_sem_wait
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	incl	8(%r12)
	movq	%rbx, %rdi
	callq	_sem_post
	testq	%rax, %rax
	je	LBB0_11
LBB0_5:
	movq	_errno@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
LBB0_8:
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%rbx, %rdi
	callq	_pte_cond_check_need_init
	movl	%eax, -36(%rbp)
	testl	%eax, %eax
	je	LBB0_3
## %bb.10:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_8
	jmp	LBB0_3
LBB0_11:
	movq	%r15, -48(%rbp)
	movq	%r12, -56(%rbp)
	leaq	-36(%rbp), %rax
	movq	%rax, -64(%rbp)
	movq	_pte_cond_wait_cleanup@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-64(%rbp), %rsi
	callq	_pthread_cleanup_push
	movq	%r15, %rdi
	callq	_pthread_mutex_unlock
	movl	%eax, -36(%rbp)
	testl	%eax, %eax
	jne	LBB0_14
## %bb.12:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_sem_timedwait
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -36(%rbp)
LBB0_14:
	movl	$1, %edi
	callq	_pthread_cleanup_pop
	movl	-36(%rbp), %eax
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PTHREAD_COND_INITIALIZER,8,3   ## @PTHREAD_COND_INITIALIZER
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_errno,4,2                      ## @errno
	.comm	_pte_cond_wait_cleanup,4,2      ## @pte_cond_wait_cleanup
	.no_dead_strip	_pte_cond_timedwait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pte_cond_timedwait
_pte_cond_timedwait:                    ; @pte_cond_timedwait
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	str	wzr, [sp, #28]
	cbz	x0, LBB0_6
; %bb.1:
	mov	x21, x0
	ldr	x8, [x0]
	cbz	x8, LBB0_6
; %bb.2:
	mov	x19, x2
	mov	x20, x1
Lloh0:
	adrp	x9, _PTHREAD_COND_INITIALIZER@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PTHREAD_COND_INITIALIZER@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_9
LBB0_3:
	ldr	x21, [x21]
	add	x22, x21, #4
	mov	x0, x22
	bl	_sem_wait
	cbnz	x0, LBB0_5
; %bb.4:
	ldr	w8, [x21, #8]
	add	w8, w8, #1
	str	w8, [x21, #8]
	mov	x0, x22
	bl	_sem_post
	cbz	x0, LBB0_11
LBB0_5:
Lloh3:
	adrp	x8, _errno@GOTPAGE
Lloh4:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	w0, [x8]
LBB0_8:
	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
	add	sp, sp, #80
	ret
LBB0_9:
	mov	x0, x21
	bl	_pte_cond_check_need_init
	str	w0, [sp, #28]
	cbz	w0, LBB0_3
; %bb.10:
Lloh7:
	adrp	x8, _EBUSY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_8
	b	LBB0_3
LBB0_11:
	stp	x21, x20, [sp, #8]
	add	x8, sp, #28
	str	x8, [sp]
Lloh10:
	adrp	x8, _pte_cond_wait_cleanup@GOTPAGE
Lloh11:
	ldr	x8, [x8, _pte_cond_wait_cleanup@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	mov	x1, sp
	bl	_pthread_cleanup_push
	mov	x0, x20
	bl	_pthread_mutex_unlock
	str	w0, [sp, #28]
	cbnz	w0, LBB0_14
; %bb.12:
	mov	x0, x21
	mov	x1, x19
	bl	_sem_timedwait
	cbz	x0, LBB0_14
; %bb.13:
Lloh13:
	adrp	x8, _errno@GOTPAGE
Lloh14:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	str	w8, [sp, #28]
LBB0_14:
	mov	w0, #1
	bl	_pthread_cleanup_pop
	ldr	w0, [sp, #28]
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PTHREAD_COND_INITIALIZER,8,3   ; @PTHREAD_COND_INITIALIZER
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_errno,4,2                      ; @errno
	.comm	_pte_cond_wait_cleanup,4,2      ; @pte_cond_wait_cleanup
	.no_dead_strip	_pte_cond_timedwait
.subsections_via_symbols
