	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ListenToWorkers
_ListenToWorkers:                       ## @ListenToWorkers
	.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, %ebx
	movq	%rsi, %r14
	movq	%rdi, %r15
	leaq	-44(%rbp), %rdx
	movq	%rsi, %rdi
	movl	%ebx, %esi
	callq	_getMessageFromWorker
	testq	%rax, %rax
	je	LBB0_1
## %bb.4:
	movq	%rax, %r12
	leaq	L_.str.1(%rip), %rsi
	movq	%rax, %rdi
	callq	_messageStartsWith
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	(%r14), %rax
	movq	8(%r14), %rbx
	movq	%r15, %rdi
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movslq	-44(%rbp), %r15
	movq	(%rax,%r15,8), %r13
	movq	%r13, %rsi
	movq	%r12, %rdx
	callq	_parseWorkerResponse
	shlq	$4, %r15
	movl	4(%rbx,%r15), %ecx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	movl	%eax, %edx
	callq	*8(%rbx,%r15)
	movq	_WRKR_IDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx,%r15)
	movq	(%r14), %rax
	movslq	-44(%rbp), %rcx
	movq	$0, (%rax,%rcx,8)
	jmp	LBB0_7
LBB0_1:
	testl	%ebx, %ebx
	je	LBB0_2
## %bb.3:
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_fatal
	jmp	LBB0_8
LBB0_6:
	leaq	L_.str.2(%rip), %rdi
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_fatal
LBB0_7:
	movq	%r12, %rdi
	callq	_free
	movl	$1, %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	xorl	%ebx, %ebx
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"a worker process died unexpectedly"

L_.str.1:                               ## @.str.1
	.asciz	"OK "

	.comm	_WRKR_IDLE,4,2                  ## @WRKR_IDLE
L_.str.2:                               ## @.str.2
	.asciz	"invalid message received from worker: \"%s\""

	.no_dead_strip	_ListenToWorkers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ListenToWorkers
_ListenToWorkers:                       ; @ListenToWorkers
	.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	x22, x2
	mov	x20, x1
	mov	x21, x0
	add	x2, sp, #12
	mov	x0, x1
	mov	x1, x22
	bl	_getMessageFromWorker
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_messageStartsWith
	cbz	x0, LBB0_5
; %bb.2:
	ldrsw	x23, [sp, #12]
	ldp	x8, x24, [x20]
	ldr	x22, [x8, x23, lsl #3]
	mov	x0, x21
	mov	x1, x22
	mov	x2, x19
	bl	_parseWorkerResponse
	mov	x2, x0
	add	x23, x24, x23, lsl #4
	ldr	x8, [x23, #8]
	ldr	w3, [x23, #4]
	mov	x0, x21
	mov	x1, x22
	blr	x8
Lloh2:
	adrp	x8, _WRKR_IDLE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _WRKR_IDLE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x23]
	ldr	x8, [x20]
	ldrsw	x9, [sp, #12]
	str	xzr, [x8, x9, lsl #3]
	b	LBB0_6
LBB0_3:
	cbz	w22, LBB0_8
; %bb.4:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_fatal
	mov	w0, #0
	b	LBB0_7
LBB0_5:
	str	x19, [sp]
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_fatal
LBB0_6:
	mov	x0, x19
	bl	_free
	mov	w0, #1
LBB0_7:
	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_8:
	mov	w0, #0
	b	LBB0_7
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"a worker process died unexpectedly"

l_.str.1:                               ; @.str.1
	.asciz	"OK "

	.comm	_WRKR_IDLE,4,2                  ; @WRKR_IDLE
l_.str.2:                               ; @.str.2
	.asciz	"invalid message received from worker: \"%s\""

	.no_dead_strip	_ListenToWorkers
.subsections_via_symbols
