	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function juggling_thread
_juggling_thread:                       ## @juggling_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	%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
	movl	(%rdi), %ebx
	movq	_threaded_mtx@GOTPCREL(%rip), %rdi
	callq	_pthread_mutex_lock
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	$-1, %edi
	callq	_err
LBB0_2:
	movq	_threaded_child_ready@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	movq	_threaded_cond@GOTPCREL(%rip), %rdi
	callq	_pthread_cond_signal
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movl	$-1, %edi
	callq	_err
LBB0_4:
	movq	_threaded_mtx@GOTPCREL(%rip), %rdi
	callq	_pthread_mutex_unlock
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rsi
	movl	$-1, %edi
	callq	_err
LBB0_6:
	movq	_NUMCYCLES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_17
## %bb.7:
	movq	_threaded_pipeline@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	xorl	%r12d, %r12d
	leaq	L_.str.4(%rip), %r15
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	_NUMCYCLES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_16:                                ##   in Loop: Header=BB0_8 Depth=1
	incl	%r12d
	cmpl	%eax, %r12d
	jge	LBB0_17
LBB0_8:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
	testl	%ecx, %ecx
	jle	LBB0_16
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	xorl	%r14d, %r14d
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_10 Depth=2
	incl	%r14d
	movl	(%r13), %ecx
	cmpl	%ecx, %r14d
	jge	LBB0_15
LBB0_10:                                ##   Parent Loop BB0_8 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%ebx, %edi
	callq	_message_recv
	testq	%rax, %rax
	jns	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=2
	movl	$-1, %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_err
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=2
	movl	%ebx, %edi
	callq	_message_send
	testq	%rax, %rax
	jns	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=2
	movl	$-1, %edi
	movq	%r15, %rsi
	callq	_err
	jmp	LBB0_14
LBB0_17:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_threaded_mtx,4,2               ## @threaded_mtx
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"juggling_thread: pthread_mutex_lock"

	.comm	_threaded_child_ready,4,2       ## @threaded_child_ready
	.comm	_threaded_cond,4,2              ## @threaded_cond
L_.str.1:                               ## @.str.1
	.asciz	"juggling_thread: pthread_cond_signal"

L_.str.2:                               ## @.str.2
	.asciz	"juggling_thread: pthread_mutex_unlock"

	.comm	_NUMCYCLES,4,2                  ## @NUMCYCLES
	.comm	_threaded_pipeline,4,2          ## @threaded_pipeline
L_.str.3:                               ## @.str.3
	.asciz	"message_recv fd2"

L_.str.4:                               ## @.str.4
	.asciz	"message_send fd2"

	.no_dead_strip	_juggling_thread
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function juggling_thread
_juggling_thread:                       ; @juggling_thread
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	ldr	w19, [x0]
Lloh0:
	adrp	x0, _threaded_mtx@GOTPAGE
Lloh1:
	ldr	x0, [x0, _threaded_mtx@GOTPAGEOFF]
	bl	_pthread_mutex_lock
	cbz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #-1
	bl	_err
LBB0_2:
Lloh4:
	adrp	x8, _threaded_child_ready@GOTPAGE
Lloh5:
	ldr	x8, [x8, _threaded_child_ready@GOTPAGEOFF]
	mov	w9, #1
Lloh6:
	str	w9, [x8]
Lloh7:
	adrp	x0, _threaded_cond@GOTPAGE
Lloh8:
	ldr	x0, [x0, _threaded_cond@GOTPAGEOFF]
	bl	_pthread_cond_signal
	cbz	x0, LBB0_4
; %bb.3:
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #-1
	bl	_err
LBB0_4:
Lloh11:
	adrp	x0, _threaded_mtx@GOTPAGE
Lloh12:
	ldr	x0, [x0, _threaded_mtx@GOTPAGEOFF]
	bl	_pthread_mutex_unlock
	cbz	x0, LBB0_6
; %bb.5:
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #-1
	bl	_err
LBB0_6:
Lloh15:
	adrp	x22, _NUMCYCLES@GOTPAGE
Lloh16:
	ldr	x22, [x22, _NUMCYCLES@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.7:
	mov	w23, #0
Lloh17:
	adrp	x24, _threaded_pipeline@GOTPAGE
Lloh18:
	ldr	x24, [x24, _threaded_pipeline@GOTPAGEOFF]
	ldr	w9, [x24]
Lloh19:
	adrp	x20, l_.str.3@PAGE
Lloh20:
	add	x20, x20, l_.str.3@PAGEOFF
Lloh21:
	adrp	x21, l_.str.4@PAGE
Lloh22:
	add	x21, x21, l_.str.4@PAGEOFF
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=1
	ldr	w8, [x22]
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	w23, w23, #1
	cmp	w23, w8
	b.ge	LBB0_17
LBB0_10:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_13 Depth 2
	cmp	w9, #1
	b.lt	LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	w25, #0
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=2
	add	w25, w25, #1
	ldr	w9, [x24]
	cmp	w25, w9
	b.ge	LBB0_8
LBB0_13:                                ;   Parent Loop BB0_10 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x19
	bl	_message_recv
	tbz	x0, #63, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=2
	mov	w0, #-1
	mov	x1, x20
	bl	_err
LBB0_15:                                ;   in Loop: Header=BB0_13 Depth=2
	mov	x0, x19
	bl	_message_send
	tbz	x0, #63, LBB0_12
; %bb.16:                               ;   in Loop: Header=BB0_13 Depth=2
	mov	w0, #-1
	mov	x1, x21
	bl	_err
	b	LBB0_12
LBB0_17:
	mov	x0, #0
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotStr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_threaded_mtx,4,2               ; @threaded_mtx
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"juggling_thread: pthread_mutex_lock"

	.comm	_threaded_child_ready,4,2       ; @threaded_child_ready
	.comm	_threaded_cond,4,2              ; @threaded_cond
l_.str.1:                               ; @.str.1
	.asciz	"juggling_thread: pthread_cond_signal"

l_.str.2:                               ; @.str.2
	.asciz	"juggling_thread: pthread_mutex_unlock"

	.comm	_NUMCYCLES,4,2                  ; @NUMCYCLES
	.comm	_threaded_pipeline,4,2          ; @threaded_pipeline
l_.str.3:                               ; @.str.3
	.asciz	"message_recv fd2"

l_.str.4:                               ; @.str.4
	.asciz	"message_send fd2"

	.no_dead_strip	_juggling_thread
.subsections_via_symbols
