	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wait
_wait:                                  ## @wait
	.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	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	$0, -40(%rbp)
	xorl	%eax, %eax
	callq	_isc_thread_self
	leaq	-40(%rbp), %rdx
	movl	%eax, %edi
	movq	%rbx, %rsi
	callq	_find_thread_condition
	movq	_ISC_R_SUCCESS@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	jne	LBB0_6
## %bb.1:
	incl	(%rbx)
	movq	%r14, %rdi
	callq	_LeaveCriticalSection
	movq	-40(%rbp), %rax
	movl	(%rax), %esi
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$2, %edi
	movq	%r15, %rcx
	callq	_WaitForMultipleObjects
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_EnterCriticalSection
	decl	(%rbx)
	movq	_WAIT_FAILED@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	jne	LBB0_3
## %bb.2:
	movq	_ISC_R_UNEXPECTED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_6
LBB0_3:
	movq	_WAIT_TIMEOUT@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	jne	LBB0_5
## %bb.4:
	movq	_ISC_R_TIMEDOUT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_6
LBB0_5:
	movq	(%r12), %rax
LBB0_6:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ISC_R_SUCCESS,8,3              ## @ISC_R_SUCCESS
	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_WAIT_FAILED,8,3                ## @WAIT_FAILED
	.comm	_ISC_R_UNEXPECTED,8,3           ## @ISC_R_UNEXPECTED
	.comm	_WAIT_TIMEOUT,8,3               ## @WAIT_TIMEOUT
	.comm	_ISC_R_TIMEDOUT,8,3             ## @ISC_R_TIMEDOUT
	.no_dead_strip	_wait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wait
_wait:                                  ; @wait
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	str	xzr, [sp, #8]
	bl	_isc_thread_self
	add	x2, sp, #8
	mov	x1, x19
	bl	_find_thread_condition
Lloh0:
	adrp	x22, _ISC_R_SUCCESS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _ISC_R_SUCCESS@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.1:
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	mov	x0, x20
	bl	_LeaveCriticalSection
	ldr	x8, [sp, #8]
	ldr	w1, [x8]
Lloh2:
	adrp	x8, _FALSE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	w0, #2
	mov	x3, x21
	bl	_WaitForMultipleObjects
	mov	x21, x0
	mov	x0, x20
	bl	_EnterCriticalSection
	ldr	w8, [x19]
	sub	w8, w8, #1
	str	w8, [x19]
Lloh5:
	adrp	x8, _WAIT_FAILED@GOTPAGE
Lloh6:
	ldr	x8, [x8, _WAIT_FAILED@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x21, x8
	b.ne	LBB0_3
; %bb.2:
Lloh8:
	adrp	x8, _ISC_R_UNEXPECTED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ISC_R_UNEXPECTED@GOTPAGEOFF]
Lloh10:
	ldr	x0, [x8]
	b	LBB0_6
LBB0_3:
Lloh11:
	adrp	x8, _WAIT_TIMEOUT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _WAIT_TIMEOUT@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	cmp	x21, x8
	b.ne	LBB0_5
; %bb.4:
Lloh14:
	adrp	x8, _ISC_R_TIMEDOUT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ISC_R_TIMEDOUT@GOTPAGEOFF]
Lloh16:
	ldr	x0, [x8]
	b	LBB0_6
LBB0_5:
	ldr	x0, [x22]
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_ISC_R_SUCCESS,8,3              ; @ISC_R_SUCCESS
	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_WAIT_FAILED,8,3                ; @WAIT_FAILED
	.comm	_ISC_R_UNEXPECTED,8,3           ; @ISC_R_UNEXPECTED
	.comm	_WAIT_TIMEOUT,8,3               ; @WAIT_TIMEOUT
	.comm	_ISC_R_TIMEDOUT,8,3             ; @ISC_R_TIMEDOUT
	.no_dead_strip	_wait
.subsections_via_symbols
