	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_YabThreadStart                 ## -- Begin function YabThreadStart
	.p2align	4, 0x90
_YabThreadStart:                        ## @YabThreadStart
	.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	%rdx, %r14
	movq	%rsi, %r15
	movl	%edi, %r13d
	movq	_hnd_key_once@GOTPCREL(%rip), %rbx
	cmpl	$0, (%rbx)
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_TlsAlloc
	movq	_hnd_key@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	$1, (%rbx)
LBB0_2:
	movq	_thread_handle@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movl	%r13d, %ecx
	leaq	(%rcx,%rcx,2), %rbx
	shlq	$4, %rbx
	cmpl	$0, (%rax,%rbx)
	je	LBB0_4
## %bb.3:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %edx
	callq	_fprintf
	movl	$-1, %r14d
	jmp	LBB0_10
LBB0_4:
	shlq	$4, %rcx
	leaq	(%rcx,%rcx,2), %r13
	leaq	(%rax,%r13), %rdi
	addq	$40, %rdi
	callq	_InitializeCriticalSection
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%edi, %edi
	movl	%edx, %esi
	xorl	%ecx, %ecx
	callq	_CreateEvent
	movq	(%r12), %rcx
	movq	%rax, 32(%rcx,%r13)
	testq	%rax, %rax
	je	LBB0_5
## %bb.7:
	movq	(%r12), %rax
	movq	%r15, 8(%rax,%r13)
	movq	(%r12), %rax
	movq	%r14, 24(%rax,%r13)
	movq	_wrapper@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	(%r12), %rcx
	addq	%r13, %rcx
	xorl	%r14d, %r14d
	xorl	%edi, %edi
	xorl	%esi, %esi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_CreateThread
	movq	(%r12), %rcx
	movq	%rax, 16(%rcx,%r13)
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	(%r12), %rax
	movl	$1, (%rax,%rbx)
LBB0_10:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_6
LBB0_8:
	leaq	L_.str.2(%rip), %rdi
LBB0_6:
	callq	_perror
	movl	$-1, %r14d
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_hnd_key_once,4,2               ## @hnd_key_once
	.comm	_hnd_key,4,2                    ## @hnd_key
	.comm	_thread_handle,8,3              ## @thread_handle
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"YabThreadStart: thread %u is already started!\n"

	.comm	_FALSE,4,2                      ## @FALSE
L_.str.1:                               ## @.str.1
	.asciz	"CreateEvent"

	.comm	_wrapper,8,3                    ## @wrapper
L_.str.2:                               ## @.str.2
	.asciz	"CreateThread"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_YabThreadStart                 ; -- Begin function YabThreadStart
	.p2align	2
_YabThreadStart:                        ; @YabThreadStart
	.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, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x22, _hnd_key_once@GOTPAGE
Lloh1:
	ldr	x22, [x22, _hnd_key_once@GOTPAGEOFF]
	ldr	w8, [x22]
	cbnz	w8, LBB0_2
; %bb.1:
	bl	_TlsAlloc
Lloh2:
	adrp	x8, _hnd_key@GOTPAGE
Lloh3:
	ldr	x8, [x8, _hnd_key@GOTPAGEOFF]
Lloh4:
	str	w0, [x8]
	mov	w8, #1
	str	w8, [x22]
LBB0_2:
Lloh5:
	adrp	x22, _thread_handle@GOTPAGE
Lloh6:
	ldr	x22, [x22, _thread_handle@GOTPAGEOFF]
	ldr	x8, [x22]
	mov	w9, #48
	umull	x9, w21, w9
	ldr	w9, [x8, x9]
	cbz	w9, LBB0_4
; %bb.3:
Lloh7:
	adrp	x8, _stderr@GOTPAGE
Lloh8:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_fprintf
	mov	w0, #-1
	b	LBB0_7
LBB0_4:
	mov	w21, w21
	add	x9, x21, x21, lsl #1
	lsl	x23, x9, #4
	add	x8, x8, x23
	add	x0, x8, #40
	bl	_InitializeCriticalSection
Lloh12:
	adrp	x8, _FALSE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, #0
	mov	x2, x1
	mov	x3, #0
	bl	_CreateEvent
	ldr	x8, [x22]
	add	x8, x8, x23
	str	x0, [x8, #32]
	cbz	x0, LBB0_8
; %bb.5:
	ldr	x8, [x22]
	add	x8, x8, x23
	str	x20, [x8, #8]
	ldr	x8, [x22]
	add	x8, x8, x23
	str	x19, [x8, #24]
Lloh15:
	adrp	x8, _wrapper@GOTPAGE
Lloh16:
	ldr	x8, [x8, _wrapper@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	ldr	x8, [x22]
	add	x3, x8, x23
	mov	x0, #0
	mov	w1, #0
	mov	w4, #0
	mov	x5, #0
	bl	_CreateThread
	ldr	x8, [x22]
	add	x8, x8, x23
	str	x0, [x8, #16]
	cbz	x0, LBB0_9
; %bb.6:
	mov	w0, #0
	ldr	x8, [x22]
	mov	w9, #48
	mul	x9, x21, x9
	mov	w10, #1
	str	w10, [x8, x9]
LBB0_7:
	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
LBB0_8:
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_10
LBB0_9:
Lloh20:
	adrp	x0, l_.str.2@PAGE
Lloh21:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_10:
	bl	_perror
	mov	w0, #-1
	b	LBB0_7
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotStr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_hnd_key_once,4,2               ; @hnd_key_once
	.comm	_hnd_key,4,2                    ; @hnd_key
	.comm	_thread_handle,8,3              ; @thread_handle
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"YabThreadStart: thread %u is already started!\n"

	.comm	_FALSE,4,2                      ; @FALSE
l_.str.1:                               ; @.str.1
	.asciz	"CreateEvent"

	.comm	_wrapper,8,3                    ; @wrapper
l_.str.2:                               ; @.str.2
	.asciz	"CreateThread"

.subsections_via_symbols
