	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function signal_wait_race_threadfunc
_signal_wait_race_threadfunc:           ## @signal_wait_race_threadfunc
	.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
	leaq	L_str(%rip), %rdi
	callq	_puts
	movq	_static_mutex@GOTPCREL(%rip), %rdi
	callq	_pthread_mutex_lock
	movl	%eax, %edi
	callq	_PTHREAD_REQUIRE
	leaq	L_str.3(%rip), %rdi
	callq	_puts
	movq	_count@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	testq	%rax, %rax
	jle	LBB0_5
## %bb.1:
	movq	_total@GOTPCREL(%rip), %r12
	movq	_toggle@GOTPCREL(%rip), %r13
	movq	_static_cond@GOTPCREL(%rip), %rbx
	movq	_static_mutex@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	decq	%rax
	movq	%rax, (%r15)
	incl	(%r12)
	movl	$0, (%r13)
	movq	%rbx, %rdi
	callq	_pthread_cond_signal
	movl	%eax, %edi
	callq	_PTHREAD_REQUIRE
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_pthread_cond_wait
	movl	%eax, %edi
	callq	_PTHREAD_REQUIRE
	cmpl	$1, (%r13)
	jne	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r15), %rax
	testq	%rax, %rax
	jg	LBB0_3
LBB0_5:
	leaq	L_str.4(%rip), %rdi
	callq	_puts
	movq	_static_mutex@GOTPCREL(%rip), %rdi
	callq	_pthread_mutex_unlock
	movl	%eax, %edi
	callq	_PTHREAD_REQUIRE
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_static_mutex,4,2               ## @static_mutex
	.comm	_count,8,3                      ## @count
	.comm	_total,4,2                      ## @total
	.comm	_toggle,4,2                     ## @toggle
	.comm	_static_cond,4,2                ## @static_cond
	.section	__TEXT,__cstring,cstring_literals
L_str:                                  ## @str
	.asciz	"2: Second thread."

L_str.3:                                ## @str.3
	.asciz	"2: Before the loop."

L_str.4:                                ## @str.4
	.asciz	"2: After the loop."

	.no_dead_strip	_signal_wait_race_threadfunc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function signal_wait_race_threadfunc
_signal_wait_race_threadfunc:           ; @signal_wait_race_threadfunc
	.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
Lloh0:
	adrp	x0, l_str@PAGE
Lloh1:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
Lloh2:
	adrp	x0, _static_mutex@GOTPAGE
Lloh3:
	ldr	x0, [x0, _static_mutex@GOTPAGEOFF]
	bl	_pthread_mutex_lock
	bl	_PTHREAD_REQUIRE
Lloh4:
	adrp	x0, l_str.3@PAGE
Lloh5:
	add	x0, x0, l_str.3@PAGEOFF
	bl	_puts
Lloh6:
	adrp	x21, _count@GOTPAGE
Lloh7:
	ldr	x21, [x21, _count@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x8, #1
	b.lt	LBB0_5
; %bb.1:
Lloh8:
	adrp	x22, _total@GOTPAGE
Lloh9:
	ldr	x22, [x22, _total@GOTPAGEOFF]
Lloh10:
	adrp	x23, _toggle@GOTPAGE
Lloh11:
	ldr	x23, [x23, _toggle@GOTPAGEOFF]
Lloh12:
	adrp	x19, _static_cond@GOTPAGE
Lloh13:
	ldr	x19, [x19, _static_cond@GOTPAGEOFF]
Lloh14:
	adrp	x20, _static_mutex@GOTPAGE
Lloh15:
	ldr	x20, [x20, _static_mutex@GOTPAGEOFF]
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_3 Depth 2
	sub	x8, x8, #1
	str	x8, [x21]
	ldr	w8, [x22]
	add	w8, w8, #1
	str	w8, [x22]
	str	wzr, [x23]
	mov	x0, x19
	bl	_pthread_cond_signal
	bl	_PTHREAD_REQUIRE
LBB0_3:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x19
	mov	x1, x20
	bl	_pthread_cond_wait
	bl	_PTHREAD_REQUIRE
	ldr	w8, [x23]
	cmp	w8, #1
	b.ne	LBB0_3
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x21]
	cmp	x8, #1
	b.ge	LBB0_2
LBB0_5:
Lloh16:
	adrp	x0, l_str.4@PAGE
Lloh17:
	add	x0, x0, l_str.4@PAGEOFF
	bl	_puts
Lloh18:
	adrp	x0, _static_mutex@GOTPAGE
Lloh19:
	ldr	x0, [x0, _static_mutex@GOTPAGEOFF]
	bl	_pthread_mutex_unlock
	bl	_PTHREAD_REQUIRE
	mov	x0, #0
	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
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_static_mutex,4,2               ; @static_mutex
	.comm	_count,8,3                      ; @count
	.comm	_total,4,2                      ; @total
	.comm	_toggle,4,2                     ; @toggle
	.comm	_static_cond,4,2                ; @static_cond
	.section	__TEXT,__cstring,cstring_literals
l_str:                                  ; @str
	.asciz	"2: Second thread."

l_str.3:                                ; @str.3
	.asciz	"2: Before the loop."

l_str.4:                                ; @str.4
	.asciz	"2: After the loop."

	.no_dead_strip	_signal_wait_race_threadfunc
.subsections_via_symbols
