	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function process_juggle
_process_juggle:                        ## @process_juggle
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, %r15d
	movl	%edi, %r12d
	xorl	%eax, %eax
	callq	_getpid
	movq	%rax, %r13
	xorl	%eax, %eax
	callq	_fork
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	js	LBB0_1
## %bb.24:
	jne	LBB0_2
## %bb.25:
	movl	%r15d, %edi
	callq	_message_send
	testq	%rax, %rax
	jns	LBB0_27
## %bb.26:
	movq	_errno@GOTPCREL(%rip), %r14
	movl	(%r14), %ebx
	movq	_SIGTERM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_kill
	movl	%ebx, (%r14)
	leaq	L_.str.1(%rip), %rsi
	movl	$-1, %edi
	callq	_err
LBB0_27:
	movq	_NUMCYCLES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_38
## %bb.28:
	xorl	%ebx, %ebx
	leaq	L_.str.2(%rip), %r12
	leaq	L_.str.3(%rip), %r13
	jmp	LBB0_29
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movl	$-1, %edi
	callq	_err
LBB0_2:
	movl	%r12d, %edi
	callq	_message_recv
	testq	%rax, %rax
	jns	LBB0_4
## %bb.3:
	movq	_errno@GOTPCREL(%rip), %r14
	movl	(%r14), %ebx
	movq	_SIGTERM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_kill
	movl	%ebx, (%r14)
	leaq	L_.str.4(%rip), %rsi
	movl	$-1, %edi
	callq	_err
LBB0_4:
	movq	_CLOCK_REALTIME@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-64(%rbp), %rsi
	callq	_clock_gettime
	testq	%rax, %rax
	jns	LBB0_6
## %bb.5:
	leaq	L_.str.5(%rip), %rsi
	movl	$-1, %edi
	callq	_err
LBB0_6:
	movq	_NUMCYCLES@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_17
## %bb.7:
	xorl	%r14d, %r14d
	movq	_errno@GOTPCREL(%rip), %r13
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_8 Depth=1
	incl	%r14d
	movq	_NUMCYCLES@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jge	LBB0_17
LBB0_8:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
                                        ##     Child Loop BB0_13 Depth 2
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, %r15d
	testl	%eax, %eax
	jg	LBB0_9
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=2
	decl	%r15d
	je	LBB0_12
LBB0_9:                                 ##   Parent Loop BB0_8 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r12d, %edi
	callq	_message_send
	testq	%rax, %rax
	jns	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=2
	movl	(%r13), %ebx
	movq	_SIGTERM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_kill
	movl	%ebx, (%r13)
	movl	$-1, %edi
	leaq	L_.str.6(%rip), %rsi
	callq	_err
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, %ebx
	testl	%eax, %eax
	jg	LBB0_13
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_13 Depth=2
	decl	%ebx
	je	LBB0_16
LBB0_13:                                ##   Parent Loop BB0_8 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r12d, %edi
	callq	_message_recv
	testq	%rax, %rax
	jns	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=2
	movl	(%r13), %r15d
	movq	_SIGTERM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_kill
	movl	%r15d, (%r13)
	movl	$-1, %edi
	leaq	L_.str.7(%rip), %rsi
	callq	_err
	jmp	LBB0_15
LBB0_17:
	movq	_CLOCK_REALTIME@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-48(%rbp), %rsi
	callq	_clock_gettime
	testq	%rax, %rax
	jns	LBB0_19
## %bb.18:
	leaq	L_.str.5(%rip), %rsi
	movl	$-1, %edi
	callq	_err
LBB0_19:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_waitpid
	movq	%rax, %rbx
	testq	%rax, %rax
	js	LBB0_20
## %bb.21:
	cmpq	%r14, %rbx
	je	LBB0_23
LBB0_22:
	leaq	L_.str.9(%rip), %rsi
	movl	$-1, %edi
	callq	_errx
LBB0_23:
	leaq	-64(%rbp), %rsi
	leaq	-48(%rbp), %rdi
	movq	%rdi, %rdx
	callq	_timespecsub
	movl	-48(%rbp), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	leaq	L_.str.8(%rip), %rsi
	movl	$-1, %edi
	callq	_err
	cmpq	%r14, %rbx
	jne	LBB0_22
	jmp	LBB0_23
LBB0_36:                                ##   in Loop: Header=BB0_29 Depth=1
	movq	_NUMCYCLES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_37:                                ##   in Loop: Header=BB0_29 Depth=1
	incl	%ebx
	cmpl	%eax, %ebx
	jge	LBB0_38
LBB0_29:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_31 Depth 2
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_37
## %bb.30:                              ##   in Loop: Header=BB0_29 Depth=1
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	jmp	LBB0_31
	.p2align	4, 0x90
LBB0_35:                                ##   in Loop: Header=BB0_31 Depth=2
	decl	%r14d
	je	LBB0_36
LBB0_31:                                ##   Parent Loop BB0_29 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r15d, %edi
	callq	_message_send
	testq	%rax, %rax
	jns	LBB0_33
## %bb.32:                              ##   in Loop: Header=BB0_31 Depth=2
	movl	$-1, %edi
	movq	%r12, %rsi
	callq	_err
LBB0_33:                                ##   in Loop: Header=BB0_31 Depth=2
	movl	%r15d, %edi
	callq	_message_recv
	testq	%rax, %rax
	jns	LBB0_35
## %bb.34:                              ##   in Loop: Header=BB0_31 Depth=2
	movl	$-1, %edi
	movq	%r13, %rsi
	callq	_err
	jmp	LBB0_35
LBB0_38:
	xorl	%edi, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"process_juggle: fork"

	.comm	_errno,4,2                      ## @errno
	.comm	_SIGTERM,4,2                    ## @SIGTERM
L_.str.1:                               ## @.str.1
	.asciz	"process_juggle: child: message_send"

	.comm	_NUMCYCLES,4,2                  ## @NUMCYCLES
L_.str.2:                               ## @.str.2
	.asciz	"message_send fd2"

L_.str.3:                               ## @.str.3
	.asciz	"message_recv fd2"

L_.str.4:                               ## @.str.4
	.asciz	"process_juggle: parent: message_recv"

	.comm	_CLOCK_REALTIME,4,2             ## @CLOCK_REALTIME
L_.str.5:                               ## @.str.5
	.asciz	"process_juggle: clock_gettime"

L_.str.6:                               ## @.str.6
	.asciz	"message_send fd1"

L_.str.7:                               ## @.str.7
	.asciz	"message_recv fd1"

L_.str.8:                               ## @.str.8
	.asciz	"process_juggle: waitpid"

L_.str.9:                               ## @.str.9
	.asciz	"process_juggle: waitpid: pid != wpid"

	.no_dead_strip	_process_juggle
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function process_juggle
_process_juggle:                        ; @process_juggle
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x24, x2
	mov	x22, x1
	mov	x21, x0
	bl	_getpid
	mov	x23, x0
	bl	_fork
	mov	x20, x0
	tbnz	x0, #63, LBB0_6
; %bb.1:
	cbnz	x20, LBB0_7
; %bb.2:
	mov	x0, x22
	bl	_message_send
	tbz	x0, #63, LBB0_4
; %bb.3:
Lloh0:
	adrp	x19, _errno@GOTPAGE
Lloh1:
	ldr	x19, [x19, _errno@GOTPAGEOFF]
	ldr	w20, [x19]
Lloh2:
	adrp	x8, _SIGTERM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SIGTERM@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_kill
	str	w20, [x19]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #-1
	bl	_err
LBB0_4:
Lloh7:
	adrp	x23, _NUMCYCLES@GOTPAGE
Lloh8:
	ldr	x23, [x23, _NUMCYCLES@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_38
; %bb.5:
	mov	w19, #0
Lloh9:
	adrp	x20, l_.str.2@PAGE
Lloh10:
	add	x20, x20, l_.str.2@PAGEOFF
Lloh11:
	adrp	x21, l_.str.3@PAGE
Lloh12:
	add	x21, x21, l_.str.3@PAGEOFF
	b	LBB0_31
LBB0_6:
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #-1
	bl	_err
LBB0_7:
	mov	x0, x21
	bl	_message_recv
	tbz	x0, #63, LBB0_9
; %bb.8:
Lloh15:
	adrp	x19, _errno@GOTPAGE
Lloh16:
	ldr	x19, [x19, _errno@GOTPAGEOFF]
	ldr	w22, [x19]
Lloh17:
	adrp	x8, _SIGTERM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SIGTERM@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_kill
	str	w22, [x19]
Lloh20:
	adrp	x1, l_.str.4@PAGE
Lloh21:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #-1
	bl	_err
LBB0_9:
Lloh22:
	adrp	x8, _CLOCK_REALTIME@GOTPAGE
Lloh23:
	ldr	x8, [x8, _CLOCK_REALTIME@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	mov	x1, sp
	bl	_clock_gettime
	tbz	x0, #63, LBB0_11
; %bb.10:
Lloh25:
	adrp	x1, l_.str.5@PAGE
Lloh26:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	w0, #-1
	bl	_err
LBB0_11:
Lloh27:
	adrp	x8, _NUMCYCLES@GOTPAGE
Lloh28:
	ldr	x8, [x8, _NUMCYCLES@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_22
; %bb.12:
	mov	w26, #0
Lloh30:
	adrp	x27, _errno@GOTPAGE
Lloh31:
	ldr	x27, [x27, _errno@GOTPAGEOFF]
Lloh32:
	adrp	x28, _SIGTERM@GOTPAGE
Lloh33:
	ldr	x28, [x28, _SIGTERM@GOTPAGEOFF]
Lloh34:
	adrp	x22, l_.str.6@PAGE
Lloh35:
	add	x22, x22, l_.str.6@PAGEOFF
Lloh36:
	adrp	x23, l_.str.7@PAGE
Lloh37:
	add	x23, x23, l_.str.7@PAGEOFF
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	add	w26, w26, #1
Lloh38:
	adrp	x8, _NUMCYCLES@GOTPAGE
Lloh39:
	ldr	x8, [x8, _NUMCYCLES@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	cmp	w26, w8
	b.ge	LBB0_22
LBB0_14:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_16 Depth 2
                                        ;     Child Loop BB0_20 Depth 2
	mov	x19, x24
	cmp	w24, #1
	b.ge	LBB0_16
	b	LBB0_13
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=2
	subs	w19, w19, #1
	b.eq	LBB0_18
LBB0_16:                                ;   Parent Loop BB0_14 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x21
	bl	_message_send
	tbz	x0, #63, LBB0_15
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=2
	ldr	w25, [x27]
	ldr	w1, [x28]
	mov	x0, x20
	bl	_kill
	str	w25, [x27]
	mov	w0, #-1
	mov	x1, x22
	bl	_err
	b	LBB0_15
LBB0_18:                                ;   in Loop: Header=BB0_14 Depth=1
	mov	x19, x24
	cmp	w24, #1
	b.ge	LBB0_20
	b	LBB0_13
LBB0_19:                                ;   in Loop: Header=BB0_20 Depth=2
	subs	w19, w19, #1
	b.eq	LBB0_13
LBB0_20:                                ;   Parent Loop BB0_14 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x21
	bl	_message_recv
	tbz	x0, #63, LBB0_19
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=2
	ldr	w25, [x27]
	ldr	w1, [x28]
	mov	x0, x20
	bl	_kill
	str	w25, [x27]
	mov	w0, #-1
	mov	x1, x23
	bl	_err
	b	LBB0_19
LBB0_22:
Lloh41:
	adrp	x8, _CLOCK_REALTIME@GOTPAGE
Lloh42:
	ldr	x8, [x8, _CLOCK_REALTIME@GOTPAGEOFF]
Lloh43:
	ldr	w0, [x8]
	add	x1, sp, #8
	bl	_clock_gettime
	tbz	x0, #63, LBB0_24
; %bb.23:
Lloh44:
	adrp	x1, l_.str.5@PAGE
Lloh45:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	w0, #-1
	bl	_err
LBB0_24:
	mov	x0, x20
	mov	x1, #0
	mov	w2, #0
	bl	_waitpid
	mov	x19, x0
	tbnz	x0, #63, LBB0_28
; %bb.25:
	cmp	x19, x20
	b.eq	LBB0_27
LBB0_26:
Lloh46:
	adrp	x1, l_.str.9@PAGE
Lloh47:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	w0, #-1
	bl	_errx
LBB0_27:
	add	x0, sp, #8
	mov	x1, sp
	add	x2, sp, #8
	bl	_timespecsub
	ldr	w0, [sp, #8]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_28:
Lloh48:
	adrp	x1, l_.str.8@PAGE
Lloh49:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	w0, #-1
	bl	_err
	cmp	x19, x20
	b.ne	LBB0_26
	b	LBB0_27
LBB0_29:                                ;   in Loop: Header=BB0_31 Depth=1
	ldr	w8, [x23]
LBB0_30:                                ;   in Loop: Header=BB0_31 Depth=1
	add	w19, w19, #1
	cmp	w19, w8
	b.ge	LBB0_38
LBB0_31:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_34 Depth 2
	cmp	w24, #1
	b.lt	LBB0_30
; %bb.32:                               ;   in Loop: Header=BB0_31 Depth=1
	mov	x25, x24
	b	LBB0_34
LBB0_33:                                ;   in Loop: Header=BB0_34 Depth=2
	subs	w25, w25, #1
	b.eq	LBB0_29
LBB0_34:                                ;   Parent Loop BB0_31 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x22
	bl	_message_send
	tbz	x0, #63, LBB0_36
; %bb.35:                               ;   in Loop: Header=BB0_34 Depth=2
	mov	w0, #-1
	mov	x1, x20
	bl	_err
LBB0_36:                                ;   in Loop: Header=BB0_34 Depth=2
	mov	x0, x22
	bl	_message_recv
	tbz	x0, #63, LBB0_33
; %bb.37:                               ;   in Loop: Header=BB0_34 Depth=2
	mov	w0, #-1
	mov	x1, x21
	bl	_err
	b	LBB0_33
LBB0_38:
	mov	w0, #0
	bl	_exit
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpAdd	Lloh48, Lloh49
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"process_juggle: fork"

	.comm	_errno,4,2                      ; @errno
	.comm	_SIGTERM,4,2                    ; @SIGTERM
l_.str.1:                               ; @.str.1
	.asciz	"process_juggle: child: message_send"

	.comm	_NUMCYCLES,4,2                  ; @NUMCYCLES
l_.str.2:                               ; @.str.2
	.asciz	"message_send fd2"

l_.str.3:                               ; @.str.3
	.asciz	"message_recv fd2"

l_.str.4:                               ; @.str.4
	.asciz	"process_juggle: parent: message_recv"

	.comm	_CLOCK_REALTIME,4,2             ; @CLOCK_REALTIME
l_.str.5:                               ; @.str.5
	.asciz	"process_juggle: clock_gettime"

l_.str.6:                               ; @.str.6
	.asciz	"message_send fd1"

l_.str.7:                               ; @.str.7
	.asciz	"message_recv fd1"

l_.str.8:                               ; @.str.8
	.asciz	"process_juggle: waitpid"

l_.str.9:                               ; @.str.9
	.asciz	"process_juggle: waitpid: pid != wpid"

	.no_dead_strip	_process_juggle
.subsections_via_symbols
