	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CheckThread                    ## -- Begin function CheckThread
	.p2align	4, 0x90
_CheckThread:                           ## @CheckThread
	.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
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_NewEvent
	movq	%rax, %r15
	leaq	-88(%rbp), %r14
	movq	%r14, %rdi
	movl	$24, %esi
	callq	_Zero
	xorl	%eax, %eax
	callq	_NewLock
	movl	%eax, -80(%rbp)
	movq	_CheckThread2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, %rsi
	callq	_NewThread
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, -72(%rbp)
	movl	$256, %edi                      ## imm = 0x100
	callq	_ZeroMalloc
	movq	%rax, %r13
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	movq	_CheckThread1@GOTPCREL(%rip), %r12
	leaq	L_.str(%rip), %r15
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	incq	%rbx
	cmpq	$32, %rbx
	je	LBB0_4
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	movq	%r14, %rsi
	callq	_NewThread
	movq	%rax, (%r13,%rbx,8)
	testq	%rax, %rax
	jne	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movq	%r15, %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_Print
	jmp	LBB0_3
LBB0_4:
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_Set
	xorl	%ebx, %ebx
	movq	_INFINITE@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13,%rbx,8), %rdi
	movl	(%r15), %esi
	callq	_WaitThread
	movq	(%r13,%rbx,8), %rdi
	callq	_ReleaseThread
	incq	%rbx
	cmpq	$32, %rbx
	jne	LBB0_5
## %bb.6:
	movq	%r13, %rdi
	callq	_Free
	movl	-88(%rbp), %esi
	movq	_CHECK_THREAD_INCREMENT_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	shll	$5, %edx
	cmpl	%edx, %esi
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	je	LBB0_8
## %bb.7:
	leaq	L_.str.1(%rip), %rdi
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_Print
LBB0_8:
	movl	-80(%rbp), %edi
	callq	_DeleteLock
	movl	(%r15), %esi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_WaitThread
	movq	%rbx, %rdi
	callq	_ReleaseThread
	movq	%r14, %rdi
	callq	_ReleaseEvent
	leaq	-112(%rbp), %r14
	movq	%r14, %rdi
	movl	$24, %esi
	callq	_Zero
	movl	$32, -112(%rbp)
	movq	_CheckThread3@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_NewThread
	movq	%rax, %r14
	movl	(%r15), %esi
	movq	%rax, %rdi
	callq	_WaitThread
	movq	%r14, %rdi
	callq	_ReleaseThread
	movl	-108(%rbp), %esi
	cmpl	$32, %esi
	je	LBB0_10
## %bb.9:
	leaq	L_.str.1(%rip), %rdi
	xorl	%r12d, %r12d
	movl	$32, %edx
	xorl	%eax, %eax
	callq	_Print
LBB0_10:
	movl	%r12d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CheckThread2,4,2               ## @CheckThread2
	.comm	_CheckThread1,4,2               ## @CheckThread1
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Thread %u Create Failed.\n"

	.comm	_INFINITE,4,2                   ## @INFINITE
	.comm	_CHECK_THREAD_INCREMENT_COUNT,4,2 ## @CHECK_THREAD_INCREMENT_COUNT
L_.str.1:                               ## @.str.1
	.asciz	"Threading: %u != %u\n"

	.comm	_CheckThread3,4,2               ## @CheckThread3
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CheckThread                    ; -- Begin function CheckThread
	.p2align	2
_CheckThread:                           ; @CheckThread
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	bl	_NewEvent
	mov	x19, x0
	add	x0, sp, #40
	mov	w1, #24
	bl	_Zero
	bl	_NewLock
	str	w0, [sp, #48]
Lloh0:
	adrp	x8, _CheckThread2@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CheckThread2@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_NewThread
	mov	x21, x0
	str	x0, [sp, #56]
	mov	w0, #256
	bl	_ZeroMalloc
	mov	x22, x0
	mov	x23, #0
	mov	w20, #1
Lloh3:
	adrp	x25, _CheckThread1@GOTPAGE
Lloh4:
	ldr	x25, [x25, _CheckThread1@GOTPAGEOFF]
Lloh5:
	adrp	x24, l_.str@PAGE
Lloh6:
	add	x24, x24, l_.str@PAGEOFF
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	add	x23, x23, #1
	cmp	x23, #32
	b.eq	LBB0_4
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x25]
	add	x1, sp, #40
	bl	_NewThread
	str	x0, [x22, x23, lsl #3]
	cbnz	x0, LBB0_1
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x24
	mov	x1, x23
	bl	_Print
	mov	w20, #0
	b	LBB0_1
LBB0_4:
	mov	x0, x19
	bl	_Set
	mov	x24, #0
Lloh7:
	adrp	x23, _INFINITE@GOTPAGE
Lloh8:
	ldr	x23, [x23, _INFINITE@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x22, x24]
	ldr	w1, [x23]
	bl	_WaitThread
	ldr	x0, [x22, x24]
	bl	_ReleaseThread
	add	x24, x24, #8
	cmp	x24, #256
	b.ne	LBB0_5
; %bb.6:
	mov	x0, x22
	bl	_Free
	ldr	w1, [sp, #40]
Lloh9:
	adrp	x8, _CHECK_THREAD_INCREMENT_COUNT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CHECK_THREAD_INCREMENT_COUNT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	lsl	w8, w8, #5
	cmp	w1, w8
	b.eq	LBB0_8
; %bb.7:
	str	x8, [sp]
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_Print
	mov	w20, #0
LBB0_8:
	ldr	w0, [sp, #48]
	bl	_DeleteLock
	ldr	w1, [x23]
	mov	x0, x21
	bl	_WaitThread
	mov	x0, x21
	bl	_ReleaseThread
	mov	x0, x19
	bl	_ReleaseEvent
	add	x0, sp, #16
	mov	w1, #24
	bl	_Zero
	mov	w8, #32
	str	w8, [sp, #16]
Lloh14:
	adrp	x8, _CheckThread3@GOTPAGE
Lloh15:
	ldr	x8, [x8, _CheckThread3@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	add	x1, sp, #16
	bl	_NewThread
	mov	x19, x0
	ldr	w1, [x23]
	bl	_WaitThread
	mov	x0, x19
	bl	_ReleaseThread
	ldr	w1, [sp, #20]
	cmp	w1, #32
	b.eq	LBB0_10
; %bb.9:
	mov	w8, #32
	str	x8, [sp]
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_Print
	mov	w20, #0
LBB0_10:
	mov	x0, x20
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_CheckThread2,4,2               ; @CheckThread2
	.comm	_CheckThread1,4,2               ; @CheckThread1
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Thread %u Create Failed.\n"

	.comm	_INFINITE,4,2                   ; @INFINITE
	.comm	_CHECK_THREAD_INCREMENT_COUNT,4,2 ; @CHECK_THREAD_INCREMENT_COUNT
l_.str.1:                               ; @.str.1
	.asciz	"Threading: %u != %u\n"

	.comm	_CheckThread3,4,2               ; @CheckThread3
.subsections_via_symbols
