	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cond_wait_kernel
_cond_wait_kernel:                      ## @cond_wait_kernel
	.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
	movl	%ecx, %r14d
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rbx
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	__get_curthread
	movq	%rax, %r15
	movq	%rax, %rdi
	movq	%rbx, %rsi
	callq	__mutex_enter_robust
	movl	%eax, %r13d
	leaq	-52(%rbp), %rsi
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	__mutex_cv_detach
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movl	%eax, %r12d
	testl	%r13d, %r13d
	je	LBB0_26
## %bb.2:
	movq	%r15, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	__mutex_leave_robust
	jmp	LBB0_26
LBB0_3:
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	testl	%r14d, %r14d
	je	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	__thr_cancel_enter2
LBB0_5:
	movq	_CVWAIT_ABSTIME@GOTPCREL(%rip), %rax
	movq	_CVWAIT_CLOCKID@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	%r12, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%rbx, %rdx
	callq	__thr_ucond_wait
	movl	%eax, %ebx
	testl	%r14d, %r14d
	je	LBB0_7
## %bb.6:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	__thr_cancel_leave
LBB0_7:
	testl	%ebx, %ebx
	je	LBB0_8
## %bb.9:
	movq	_EINTR@GOTPCREL(%rip), %rax
	movl	-52(%rbp), %esi
	cmpl	(%rax), %ebx
	je	LBB0_11
## %bb.10:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	je	LBB0_11
## %bb.20:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	__mutex_cv_attach
	testl	%r14d, %r14d
	je	LBB0_21
## %bb.22:
	testl	%r13d, %r13d
	je	LBB0_24
## %bb.23:
	movq	%r15, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	__mutex_leave_robust
LBB0_24:
	movq	%r15, %rdi
	callq	__thr_testcancel
	jmp	LBB0_25
LBB0_8:
	movl	-52(%rbp), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	$1, %edx
	callq	__mutex_cv_lock
	movl	%eax, %r12d
	xorl	%ebx, %ebx
	testl	%r13d, %r13d
	jne	LBB0_18
	jmp	LBB0_19
LBB0_11:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	$1, %edx
	callq	__mutex_cv_lock
	movl	%eax, %r12d
	testl	%r14d, %r14d
	je	LBB0_16
## %bb.12:
	testl	%r12d, %r12d
	jne	LBB0_16
## %bb.13:
	testl	%r13d, %r13d
	je	LBB0_15
## %bb.14:
	movq	%r15, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	__mutex_leave_robust
LBB0_15:
	movq	%r15, %rdi
	callq	__thr_testcancel
	xorl	%r13d, %r13d
LBB0_16:
	xorl	%eax, %eax
	movq	_EINTR@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %ebx
	cmovel	%eax, %ebx
	testl	%r13d, %r13d
	je	LBB0_19
LBB0_18:
	movq	%r15, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	__mutex_leave_robust
LBB0_19:
	testl	%r12d, %r12d
	jne	LBB0_26
LBB0_25:
	movl	%ebx, %r12d
LBB0_26:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	xorl	%r12d, %r12d
	testl	%r13d, %r13d
	jne	LBB0_18
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_CVWAIT_ABSTIME,4,2             ## @CVWAIT_ABSTIME
	.comm	_CVWAIT_CLOCKID,4,2             ## @CVWAIT_CLOCKID
	.comm	_EINTR,4,2                      ## @EINTR
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_cond_wait_kernel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cond_wait_kernel
_cond_wait_kernel:                      ; @cond_wait_kernel
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x23, x3
	mov	x22, x2
	mov	x19, x1
	mov	x25, x0
	bl	__get_curthread
	mov	x20, x0
	mov	x1, x19
	bl	__mutex_enter_robust
	mov	x21, x0
	add	x1, sp, #12
	mov	x0, x19
	bl	__mutex_cv_detach
	cbz	w0, LBB0_3
; %bb.1:
	mov	x24, x0
	cbz	w21, LBB0_23
; %bb.2:
	mov	x0, x20
	mov	x1, x19
	bl	__mutex_leave_robust
	b	LBB0_23
LBB0_3:
	cbz	w23, LBB0_5
; %bb.4:
	mov	x0, x20
	mov	w1, #0
	bl	__thr_cancel_enter2
LBB0_5:
Lloh0:
	adrp	x8, _CVWAIT_ABSTIME@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CVWAIT_ABSTIME@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _CVWAIT_CLOCKID@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CVWAIT_CLOCKID@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w3, w9, w8
	mov	x0, x25
	mov	x1, x19
	mov	x2, x22
	bl	__thr_ucond_wait
	mov	x22, x0
	cbz	w23, LBB0_7
; %bb.6:
	mov	x0, x20
	mov	w1, #0
	bl	__thr_cancel_leave
LBB0_7:
	cbz	w22, LBB0_15
; %bb.8:
Lloh6:
	adrp	x25, _EINTR@GOTPAGE
Lloh7:
	ldr	x25, [x25, _EINTR@GOTPAGEOFF]
	ldr	w8, [x25]
Lloh8:
	adrp	x9, _ETIMEDOUT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _ETIMEDOUT@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	ldr	w1, [sp, #12]
	cmp	w22, w8
	mov	x0, x19
	ccmp	w22, w9, #4, ne
	b.ne	LBB0_18
; %bb.9:
	mov	w2, #1
	bl	__mutex_cv_lock
	mov	x24, x0
	cbz	w23, LBB0_14
; %bb.10:
	cbnz	w24, LBB0_14
; %bb.11:
	cbz	w21, LBB0_13
; %bb.12:
	mov	x0, x20
	mov	x1, x19
	bl	__mutex_leave_robust
LBB0_13:
	mov	x0, x20
	bl	__thr_testcancel
	mov	w21, #0
LBB0_14:
	ldr	w8, [x25]
	cmp	w22, w8
	csel	w22, wzr, w22, eq
	cbnz	w21, LBB0_16
	b	LBB0_17
LBB0_15:
	ldr	w1, [sp, #12]
	mov	x0, x19
	mov	w2, #1
	bl	__mutex_cv_lock
	mov	x24, x0
	cbz	w21, LBB0_17
LBB0_16:
	mov	x0, x20
	mov	x1, x19
	bl	__mutex_leave_robust
LBB0_17:
	cbnz	w24, LBB0_23
	b	LBB0_22
LBB0_18:
	bl	__mutex_cv_attach
	cbz	w23, LBB0_24
; %bb.19:
	cbz	w21, LBB0_21
; %bb.20:
	mov	x0, x20
	mov	x1, x19
	bl	__mutex_leave_robust
LBB0_21:
	mov	x0, x20
	bl	__thr_testcancel
LBB0_22:
	mov	x24, x22
LBB0_23:
	mov	x0, x24
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_24:
	mov	w24, #0
	cbnz	w21, LBB0_16
	b	LBB0_17
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_CVWAIT_ABSTIME,4,2             ; @CVWAIT_ABSTIME
	.comm	_CVWAIT_CLOCKID,4,2             ; @CVWAIT_CLOCKID
	.comm	_EINTR,4,2                      ; @EINTR
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_cond_wait_kernel
.subsections_via_symbols
