	.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, %ebx
	movq	_make_key@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_hnd_key_once@GOTPCREL(%rip), %rdi
	callq	_pthread_once
	movq	_thread_handle@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rax
	movl	%ebx, %r12d
	leaq	(%r12,%r12,4), %r13
	cmpl	$0, (%rax,%r13,8)
	je	LBB0_2
## %bb.1:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_9
LBB0_2:
	movq	%rcx, %rbx
	leaq	(%rax,%r13,8), %rdi
	addq	$16, %rdi
	xorl	%esi, %esi
	callq	_pthread_mutex_init
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_9
LBB0_4:
	movq	(%rbx), %rax
	leaq	(%rax,%r13,8), %rdi
	addq	$20, %rdi
	xorl	%esi, %esi
	callq	_pthread_cond_init
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movq	(%rbx), %rax
	leaq	(%rax,%r13,8), %rdi
	addq	$16, %rdi
	jmp	LBB0_8
LBB0_6:
	movq	(%rbx), %rax
	shlq	$3, %r12
	leaq	(%r12,%r12,4), %r12
	movq	%r15, 8(%rax,%r12)
	movq	(%rbx), %rax
	movq	%r14, 32(%rax,%r12)
	movq	%rbx, %r14
	movq	(%rbx), %rcx
	leaq	(%rcx,%r12), %rdi
	addq	$24, %rdi
	addq	%r12, %rcx
	movq	_wrapper@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_pthread_create
	testq	%rax, %rax
	je	LBB0_11
## %bb.7:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movq	(%r14), %rax
	leaq	(%rax,%r12), %rdi
	addq	$20, %rdi
	callq	_pthread_cond_destroy
	movq	(%r14), %rax
	leaq	(%rax,%r12), %rdi
	addq	$16, %rdi
LBB0_8:
	callq	_pthread_mutex_destroy
LBB0_9:
	movl	$-1, %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	(%r14), %rax
	movl	$1, (%rax,%r13,8)
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_hnd_key_once,4,2               ## @hnd_key_once
	.comm	_make_key,4,2                   ## @make_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"

L_.str.1:                               ## @.str.1
	.asciz	"YabThreadStart: Error creating mutex\n"

L_.str.2:                               ## @.str.2
	.asciz	"YabThreadStart: Error creating condvar\n"

	.comm	_wrapper,4,2                    ## @wrapper
L_.str.3:                               ## @.str.3
	.asciz	"YabThreadStart: Couldn't start thread\n"

.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:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x8, _make_key@GOTPAGE
Lloh1:
	ldr	x8, [x8, _make_key@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x0, _hnd_key_once@GOTPAGE
Lloh4:
	ldr	x0, [x0, _hnd_key_once@GOTPAGEOFF]
	bl	_pthread_once
Lloh5:
	adrp	x22, _thread_handle@GOTPAGE
Lloh6:
	ldr	x22, [x22, _thread_handle@GOTPAGEOFF]
	ldr	x8, [x22]
	mov	w9, #40
	umull	x9, w21, w9
	ldr	w9, [x8, x9]
	cbz	w9, LBB0_2
; %bb.1:
Lloh7:
	adrp	x8, _stderr@GOTPAGE
Lloh8:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	str	x21, [sp]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
	mov	w21, w21
	mov	w9, #40
	madd	x8, x21, x9, x8
	add	x0, x8, #16
	mov	x1, #0
	bl	_pthread_mutex_init
	cbz	x0, LBB0_7
; %bb.3:
Lloh12:
	adrp	x8, _stderr@GOTPAGE
Lloh13:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_4:
	bl	_fprintf
LBB0_5:
	mov	w0, #-1
LBB0_6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_7:
	ldr	x8, [x22]
	mov	w9, #40
	madd	x8, x21, x9, x8
	add	x0, x8, #20
	mov	x1, #0
	bl	_pthread_cond_init
	cbz	x0, LBB0_9
; %bb.8:
Lloh17:
	adrp	x8, _stderr@GOTPAGE
Lloh18:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
Lloh20:
	adrp	x1, l_.str.2@PAGE
Lloh21:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_fprintf
	ldr	x8, [x22]
	mov	w9, #40
	madd	x8, x21, x9, x8
	b	LBB0_11
LBB0_9:
	ldr	x8, [x22]
	add	x9, x21, x21, lsl #2
	lsl	x23, x9, #3
	add	x8, x8, x23
	str	x20, [x8, #8]
	ldr	x8, [x22]
	add	x8, x8, x23
	str	x19, [x8, #32]
	ldr	x8, [x22]
	add	x3, x8, x23
	add	x0, x3, #24
Lloh22:
	adrp	x8, _wrapper@GOTPAGE
Lloh23:
	ldr	x8, [x8, _wrapper@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
	mov	x1, #0
	bl	_pthread_create
	cbz	x0, LBB0_12
; %bb.10:
Lloh25:
	adrp	x8, _stderr@GOTPAGE
Lloh26:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
Lloh28:
	adrp	x1, l_.str.3@PAGE
Lloh29:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_fprintf
	ldr	x8, [x22]
	add	x8, x8, x23
	add	x0, x8, #20
	bl	_pthread_cond_destroy
	ldr	x8, [x22]
	add	x8, x8, x23
LBB0_11:
	add	x0, x8, #16
	bl	_pthread_mutex_destroy
	b	LBB0_5
LBB0_12:
	ldr	x8, [x22]
	mov	w9, #40
	mul	x9, x21, x9
	mov	w10, #1
	str	w10, [x8, x9]
	b	LBB0_6
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_hnd_key_once,4,2               ; @hnd_key_once
	.comm	_make_key,4,2                   ; @make_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"

l_.str.1:                               ; @.str.1
	.asciz	"YabThreadStart: Error creating mutex\n"

l_.str.2:                               ; @.str.2
	.asciz	"YabThreadStart: Error creating condvar\n"

	.comm	_wrapper,4,2                    ; @wrapper
l_.str.3:                               ; @.str.3
	.asciz	"YabThreadStart: Couldn't start thread\n"

.subsections_via_symbols
