	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function worker_thread
_worker_thread:                         ## @worker_thread
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_worker_runphase1
	xorl	%eax, %eax
	callq	_pthread_self
	leaq	L_.str(%rip), %rsi
	movl	$2, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_debug
	leaq	12(%rbx), %rdi
	callq	_barrier_wait
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_pthread_self
	leaq	L_.str.1(%rip), %rsi
	movl	$2, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_debug
	movq	%rbx, %rdi
	callq	_finalize_phase_one
	movq	%rbx, %rdi
	callq	_init_phase_two
	xorl	%eax, %eax
	callq	_pthread_self
	movl	%eax, %r14d
	movl	4(%rbx), %edi
	movl	8(%rbx), %r15d
	callq	_fifo_len
	leaq	L_.str.2(%rip), %rsi
	movl	$2, %edi
	movl	%r14d, %edx
	movl	%r15d, %ecx
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_debug
LBB0_2:
	xorl	%eax, %eax
	callq	_pthread_self
	leaq	L_.str.3(%rip), %rsi
	movl	$2, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_debug
	movq	%rbx, %rdi
	callq	_barrier_wait
	xorl	%eax, %eax
	callq	_pthread_self
	leaq	L_.str.4(%rip), %rsi
	movl	$2, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_debug
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_worker_runphase2               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d: entering first barrier\n"

L_.str.1:                               ## @.str.1
	.asciz	"%d: doing work in first barrier\n"

L_.str.2:                               ## @.str.2
	.asciz	"%d: ninqueue is %d, %d on queue\n"

L_.str.3:                               ## @.str.3
	.asciz	"%d: entering second barrier\n"

L_.str.4:                               ## @.str.4
	.asciz	"%d: phase 1 complete\n"

	.no_dead_strip	_worker_thread
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function worker_thread
_worker_thread:                         ; @worker_thread
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	bl	_worker_runphase1
	bl	_pthread_self
	mov	x2, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #2
	bl	_debug
	add	x0, x19, #12
	bl	_barrier_wait
	cbz	x0, LBB0_2
; %bb.1:
	bl	_pthread_self
	mov	x2, x0
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #2
	bl	_debug
	mov	x0, x19
	bl	_finalize_phase_one
	mov	x0, x19
	bl	_init_phase_two
	bl	_pthread_self
	mov	x20, x0
	ldp	w0, w21, [x19, #4]
	bl	_fifo_len
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x21, x0, [sp]
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #2
	mov	x2, x20
	bl	_debug
LBB0_2:
	bl	_pthread_self
	mov	x2, x0
Lloh6:
	adrp	x1, l_.str.3@PAGE
Lloh7:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #2
	bl	_debug
	mov	x0, x19
	bl	_barrier_wait
	bl	_pthread_self
	mov	x2, x0
Lloh8:
	adrp	x1, l_.str.4@PAGE
Lloh9:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #2
	bl	_debug
	mov	x0, x19
	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
	add	sp, sp, #64
	b	_worker_runphase2
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d: entering first barrier\n"

l_.str.1:                               ; @.str.1
	.asciz	"%d: doing work in first barrier\n"

l_.str.2:                               ; @.str.2
	.asciz	"%d: ninqueue is %d, %d on queue\n"

l_.str.3:                               ; @.str.3
	.asciz	"%d: entering second barrier\n"

l_.str.4:                               ; @.str.4
	.asciz	"%d: phase 1 complete\n"

	.no_dead_strip	_worker_thread
.subsections_via_symbols
