	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_suspend
_check_suspend:                         ## @check_suspend
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	_THR_FLAGS_NEED_SUSPEND@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	movq	_THR_FLAGS_SUSPENDED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%eax, %ecx
	andl	(%rdi), %ecx
	xorl	%edi, %edi
	cmpl	%eax, %ecx
	setne	%dil
	callq	___predict_true
	testq	%rax, %rax
	jne	LBB0_8
## %bb.1:
	movq	__single_thread@GOTPCREL(%rip), %rax
	cmpq	%r12, (%rax)
	je	LBB0_8
## %bb.2:
	cmpq	$0, 32(%r12)
	je	LBB0_3
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%r12, %rdi
	callq	__thr_signal_block
	incl	16(%r12)
	leaq	20(%r12), %r14
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_THR_UMUTEX_LOCK
	movl	(%r13), %eax
	testl	%eax, (%r12)
	je	LBB0_7
## %bb.4:
	leaq	24(%r12), %r15
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r12), %rbx
	incq	%rbx
	movq	%rbx, 24(%r12)
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	__thr_umtx_wake
	movq	8(%r12), %rax
	movq	_PS_DEAD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_THR_FLAGS_SUSPENDED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r12)
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_THR_UMUTEX_UNLOCK
	movq	%r15, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	__thr_umtx_wait_uint
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_THR_UMUTEX_LOCK
	movl	(%r13), %eax
	testl	%eax, (%r12)
	jne	LBB0_5
LBB0_7:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_THR_UMUTEX_UNLOCK
	decl	16(%r12)
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	__thr_signal_unblock            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_THR_FLAGS_NEED_SUSPEND,4,2     ## @THR_FLAGS_NEED_SUSPEND
	.comm	_THR_FLAGS_SUSPENDED,4,2        ## @THR_FLAGS_SUSPENDED
	.comm	__single_thread,8,3             ## @_single_thread
	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.comm	_PS_DEAD,8,3                    ## @PS_DEAD
	.no_dead_strip	_check_suspend
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_suspend
_check_suspend:                         ; @check_suspend
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x23, _THR_FLAGS_NEED_SUSPEND@GOTPAGE
Lloh1:
	ldr	x23, [x23, _THR_FLAGS_NEED_SUSPEND@GOTPAGEOFF]
Lloh2:
	adrp	x24, _THR_FLAGS_SUSPENDED@GOTPAGE
Lloh3:
	ldr	x24, [x24, _THR_FLAGS_SUSPENDED@GOTPAGEOFF]
	ldr	w9, [x23]
	ldr	w10, [x24]
	orr	w10, w10, w9
	and	w8, w10, w8
	cmp	w8, w9
	cset	w0, ne
	bl	___predict_true
Lloh4:
	adrp	x8, __single_thread@GOTPAGE
Lloh5:
	ldr	x8, [x8, __single_thread@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	cmp	x0, #0
	ccmp	x8, x19, #4, eq
	b.eq	LBB0_2
; %bb.1:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_3
LBB0_2:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_3:
	mov	x0, x19
	bl	__thr_signal_block
	ldr	w8, [x19, #16]
	add	w8, w8, #1
	str	w8, [x19, #16]
	add	x20, x19, #20
	mov	x0, x19
	mov	x1, x20
	bl	_THR_UMUTEX_LOCK
	ldr	w8, [x19]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.4:
	add	x21, x19, #24
Lloh7:
	adrp	x25, _INT_MAX@GOTPAGE
Lloh8:
	ldr	x25, [x25, _INT_MAX@GOTPAGEOFF]
Lloh9:
	adrp	x26, _PS_DEAD@GOTPAGE
Lloh10:
	ldr	x26, [x26, _PS_DEAD@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #24]
	add	x22, x8, #1
	str	x22, [x19, #24]
	ldr	w1, [x25]
	mov	x0, x21
	mov	w2, #0
	bl	__thr_umtx_wake
	ldr	x8, [x19, #8]
	ldr	x9, [x26]
	cmp	x8, x9
	b.eq	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x24]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	mov	x0, x19
	mov	x1, x20
	bl	_THR_UMUTEX_UNLOCK
	mov	x0, x21
	mov	x1, x22
	mov	x2, #0
	mov	w3, #0
	bl	__thr_umtx_wait_uint
	mov	x0, x19
	mov	x1, x20
	bl	_THR_UMUTEX_LOCK
	ldr	w8, [x19]
	ldr	w9, [x23]
	tst	w9, w8
	b.ne	LBB0_5
LBB0_7:
	mov	x0, x19
	mov	x1, x20
	bl	_THR_UMUTEX_UNLOCK
	ldr	w8, [x19, #16]
	sub	w8, w8, #1
	str	w8, [x19, #16]
	mov	x0, x19
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	__thr_signal_unblock
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_THR_FLAGS_NEED_SUSPEND,4,2     ; @THR_FLAGS_NEED_SUSPEND
	.comm	_THR_FLAGS_SUSPENDED,4,2        ; @THR_FLAGS_SUSPENDED
	.comm	__single_thread,8,3             ; @_single_thread
	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.comm	_PS_DEAD,8,3                    ; @PS_DEAD
	.no_dead_strip	_check_suspend
.subsections_via_symbols
