	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function MtSync_GetNextBlock
_MtSync_GetNextBlock:                   ## @MtSync_GetNextBlock
	.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
	cmpq	$0, 56(%rdi)
	je	LBB0_2
## %bb.1:
	movl	$1, (%rbx)
	movq	_False@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 56(%rbx)
	movq	%rax, 48(%rbx)
	movq	%rax, 40(%rbx)
	leaq	28(%rbx), %r14
	movq	%r14, %rdi
	callq	_Event_Reset
	leaq	36(%rbx), %rdi
	callq	_Event_Reset
	leaq	32(%rbx), %rdi
	callq	_Event_Set
	movq	%r14, %rdi
	callq	_Event_Wait
	jmp	LBB0_3
LBB0_2:
	leaq	16(%rbx), %rdi
	callq	_CriticalSection_Leave
	movq	_False@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
	incl	(%rbx)
	leaq	24(%rbx), %rdi
	callq	_Semaphore_Release1
LBB0_3:
	leaq	20(%rbx), %rdi
	callq	_Semaphore_Wait
	leaq	16(%rbx), %rdi
	callq	_CriticalSection_Enter
	movq	_True@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_False,8,3                      ## @False
	.comm	_True,8,3                       ## @True
	.no_dead_strip	_MtSync_GetNextBlock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function MtSync_GetNextBlock
_MtSync_GetNextBlock:                   ; @MtSync_GetNextBlock
	.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
	ldr	x8, [x0, #56]
	cbz	x8, LBB0_2
; %bb.1:
	mov	w8, #1
Lloh0:
	adrp	x9, _False@GOTPAGE
Lloh1:
	ldr	x9, [x9, _False@GOTPAGEOFF]
	str	w8, [x19]
Lloh2:
	ldr	x8, [x9]
	stp	x8, x8, [x19, #48]
	str	x8, [x19, #40]
	add	x20, x19, #28
	mov	x0, x20
	bl	_Event_Reset
	add	x0, x19, #36
	bl	_Event_Reset
	add	x0, x19, #32
	bl	_Event_Set
	mov	x0, x20
	bl	_Event_Wait
	b	LBB0_3
LBB0_2:
	add	x0, x19, #16
	bl	_CriticalSection_Leave
Lloh3:
	adrp	x8, _False@GOTPAGE
Lloh4:
	ldr	x8, [x8, _False@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	str	x8, [x19, #8]
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	add	x0, x19, #24
	bl	_Semaphore_Release1
LBB0_3:
	add	x0, x19, #20
	bl	_Semaphore_Wait
	add	x0, x19, #16
	bl	_CriticalSection_Enter
Lloh6:
	adrp	x8, _True@GOTPAGE
Lloh7:
	ldr	x8, [x8, _True@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	str	x8, [x19, #8]
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_False,8,3                      ; @False
	.comm	_True,8,3                       ; @True
	.no_dead_strip	_MtSync_GetNextBlock
.subsections_via_symbols
