	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_MtSync_Destruct                ## -- Begin function MtSync_Destruct
	.p2align	4, 0x90
_MtSync_Destruct:                       ## @MtSync_Destruct
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	leaq	44(%rdi), %r14
	movq	%r14, %rdi
	callq	_Thread_WasCreated
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%rbx, %rdi
	callq	_MtSync_StopWriting
	movq	_True@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 56(%rbx)
	cmpq	$0, 48(%rbx)
	je	LBB0_3
## %bb.2:
	leaq	24(%rbx), %rdi
	callq	_Event_Set
LBB0_3:
	movq	%r14, %rdi
	callq	_Thread_Wait
	movq	%r14, %rdi
	callq	_Thread_Close
LBB0_4:
	cmpq	$0, 32(%rbx)
	je	LBB0_6
## %bb.5:
	leaq	40(%rbx), %rdi
	callq	_CriticalSection_Delete
	movq	_False@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 32(%rbx)
LBB0_6:
	leaq	24(%rbx), %rdi
	callq	_Event_Close
	leaq	20(%rbx), %rdi
	callq	_Event_Close
	leaq	16(%rbx), %rdi
	callq	_Event_Close
	leaq	12(%rbx), %rdi
	callq	_Semaphore_Close
	leaq	8(%rbx), %rdi
	callq	_Semaphore_Close
	movq	_False@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_True,4,2                       ## @True
	.comm	_False,8,3                      ## @False
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_MtSync_Destruct                ; -- Begin function MtSync_Destruct
	.p2align	2
_MtSync_Destruct:                       ; @MtSync_Destruct
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	add	x20, x0, #44
	mov	x0, x20
	bl	_Thread_WasCreated
	cbz	x0, LBB0_4
; %bb.1:
	mov	x0, x19
	bl	_MtSync_StopWriting
Lloh0:
	adrp	x8, _True@GOTPAGE
Lloh1:
	ldr	x8, [x8, _True@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x19, #56]
	ldr	x8, [x19, #48]
	cbz	x8, LBB0_3
; %bb.2:
	add	x0, x19, #24
	bl	_Event_Set
LBB0_3:
	mov	x0, x20
	bl	_Thread_Wait
	mov	x0, x20
	bl	_Thread_Close
LBB0_4:
	ldr	x8, [x19, #32]
Lloh3:
	adrp	x20, _False@GOTPAGE
Lloh4:
	ldr	x20, [x20, _False@GOTPAGEOFF]
	cbz	x8, LBB0_6
; %bb.5:
	add	x0, x19, #40
	bl	_CriticalSection_Delete
	ldr	x8, [x20]
	str	x8, [x19, #32]
LBB0_6:
	add	x0, x19, #24
	bl	_Event_Close
	add	x0, x19, #20
	bl	_Event_Close
	add	x0, x19, #16
	bl	_Event_Close
	add	x0, x19, #12
	bl	_Semaphore_Close
	add	x0, x19, #8
	bl	_Semaphore_Close
	ldr	x8, [x20]
	str	x8, [x19]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_True,4,2                       ; @True
	.comm	_False,8,3                      ; @False
.subsections_via_symbols
