	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function MtSync_StopWriting
_MtSync_StopWriting:                    ## @MtSync_StopWriting
	.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	(%rdi), %rbx
	addq	$56, %rdi
	callq	_Thread_WasCreated
	testl	%eax, %eax
	je	LBB0_8
## %bb.1:
	cmpq	$0, 8(%r12)
	jne	LBB0_8
## %bb.2:
	movq	_True@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movq	%rax, 48(%r12)
	cmpq	$0, 32(%r12)
	je	LBB0_4
## %bb.3:
	leaq	40(%r12), %rdi
	callq	_CriticalSection_Leave
	movq	_False@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 32(%r12)
LBB0_4:
	leaq	16(%r12), %r14
	movq	%r14, %rdi
	callq	_Semaphore_Release1
	leaq	24(%r12), %rdi
	callq	_Event_Wait
	cmpq	(%r12), %rbx
	je	LBB0_7
## %bb.5:
	leaq	20(%r12), %r15
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	incq	%rbx
	movq	%r15, %rdi
	callq	_Semaphore_Wait
	movq	%r14, %rdi
	callq	_Semaphore_Release1
	cmpq	(%r12), %rbx
	jne	LBB0_6
LBB0_7:
	movq	(%r13), %rax
	movq	%rax, 8(%r12)
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_True,8,3                       ## @True
	.comm	_False,8,3                      ## @False
	.no_dead_strip	_MtSync_StopWriting
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function MtSync_StopWriting
_MtSync_StopWriting:                    ; @MtSync_StopWriting
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	ldr	x22, [x0], #56
	bl	_Thread_WasCreated
	cbz	w0, LBB0_8
; %bb.1:
	ldr	x8, [x19, #8]
	cbnz	x8, LBB0_8
; %bb.2:
Lloh0:
	adrp	x23, _True@GOTPAGE
Lloh1:
	ldr	x23, [x23, _True@GOTPAGEOFF]
	ldr	x8, [x23]
	str	x8, [x19, #48]
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_4
; %bb.3:
	add	x0, x19, #40
	bl	_CriticalSection_Leave
Lloh2:
	adrp	x8, _False@GOTPAGE
Lloh3:
	ldr	x8, [x8, _False@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	str	x8, [x19, #32]
LBB0_4:
	add	x20, x19, #16
	mov	x0, x20
	bl	_Semaphore_Release1
	add	x0, x19, #24
	bl	_Event_Wait
	ldr	x8, [x19]
	cmp	x22, x8
	b.eq	LBB0_7
; %bb.5:
	add	x21, x19, #20
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	add	x22, x22, #1
	mov	x0, x21
	bl	_Semaphore_Wait
	mov	x0, x20
	bl	_Semaphore_Release1
	ldr	x8, [x19]
	cmp	x22, x8
	b.ne	LBB0_6
LBB0_7:
	ldr	x8, [x23]
	str	x8, [x19, #8]
LBB0_8:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_True,8,3                       ; @True
	.comm	_False,8,3                      ; @False
	.no_dead_strip	_MtSync_StopWriting
.subsections_via_symbols
