	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function WaitForTerminatingWorkers
_WaitForTerminatingWorkers:             ## @WaitForTerminatingWorkers
	.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
	movq	%rdi, %r13
	callq	_HasEveryWorkerTerminated
	testl	%eax, %eax
	je	LBB0_1
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	leaq	-44(%rbp), %r14
	movq	_WRKR_TERMINATED@GOTPCREL(%rip), %r15
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	xorl	%ebx, %ebx
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movzbl	%al, %edi
	callq	_Assert
	movq	(%r15), %rax
	movq	%rax, 8(%rbx)
	movq	8(%r13), %rax
	movl	%r12d, %ecx
	movq	$0, (%rax,%rcx,8)
	movq	%r13, %rdi
	callq	_HasEveryWorkerTerminated
	testl	%eax, %eax
	jne	LBB0_13
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
	movq	%r14, %rdi
	callq	_wait
	movl	(%r13), %edx
	testl	%edx, %edx
	jle	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%r13), %rcx
	cmpq	%rax, (%rcx)
	jne	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movb	$1, %al
	xorl	%r12d, %r12d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	leal	-1(%rdx), %esi
	leaq	1(%rsi), %r12
	leaq	(%rsi,%rsi,2), %rsi
	leaq	(%rcx,%rsi,8), %rbx
	movl	$1, %esi
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpq	%rsi, %rdx
	je	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_10 Depth=2
	leaq	24(%rcx), %rdi
	incq	%rsi
	cmpq	%rax, 24(%rcx)
	movq	%rdi, %rcx
	jne	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	decq	%rsi
	cmpq	%rdx, %rsi
	setb	%al
	movq	%rsi, %r12
	movq	%rdi, %rcx
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	$0, (%rcx)
	movq	%rcx, %rbx
	jmp	LBB0_12
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	seta	%al
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_WRKR_TERMINATED,8,3            ## @WRKR_TERMINATED
	.comm	_INFINITE,4,2                   ## @INFINITE
	.comm	_INVALID_HANDLE_VALUE,8,3       ## @INVALID_HANDLE_VALUE
	.comm	_WAIT_FAILED,8,3                ## @WAIT_FAILED
	.comm	_WAIT_OBJECT_0,8,3              ## @WAIT_OBJECT_0
	.no_dead_strip	_WaitForTerminatingWorkers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function WaitForTerminatingWorkers
_WaitForTerminatingWorkers:             ; @WaitForTerminatingWorkers
	.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	x19, x0
	bl	_HasEveryWorkerTerminated
	cbz	w0, LBB0_2
LBB0_1:
	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_2:
	mov	w20, #24
Lloh0:
	adrp	x21, _WRKR_TERMINATED@GOTPAGE
Lloh1:
	ldr	x21, [x21, _WRKR_TERMINATED@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x22, #0
	mov	w0, #0
	mov	x23, #0
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	bl	_Assert
	ldr	x8, [x21]
	str	x8, [x23, #8]
	ldr	x8, [x19, #8]
	str	xzr, [x8, w22, uxtw #3]
	mov	x0, x19
	bl	_HasEveryWorkerTerminated
	cbnz	w0, LBB0_1
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	add	x0, sp, #12
	bl	_wait
	ldr	w9, [x19]
	cmp	w9, #1
	b.lt	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19, #16]
	ldr	x10, [x8]
	cmp	x10, x0
	b.ne	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x22, #0
	mov	w0, #1
	b	LBB0_12
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	sub	w10, w9, #1
	add	x22, x10, #1
	umaddl	x23, w10, w20, x8
	mov	w10, #1
LBB0_9:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	x9, x10
	b.eq	LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	ldr	x11, [x8, #24]!
	add	x10, x10, #1
	cmp	x11, x0
	b.ne	LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	sub	x22, x10, #1
	cmp	x22, x9
	cset	w0, lo
LBB0_12:                                ;   in Loop: Header=BB0_5 Depth=1
	str	xzr, [x8]
	mov	x23, x8
	b	LBB0_4
LBB0_13:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	x10, x9
	cset	w0, lo
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_WRKR_TERMINATED,8,3            ; @WRKR_TERMINATED
	.comm	_INFINITE,4,2                   ; @INFINITE
	.comm	_INVALID_HANDLE_VALUE,8,3       ; @INVALID_HANDLE_VALUE
	.comm	_WAIT_FAILED,8,3                ; @WAIT_FAILED
	.comm	_WAIT_OBJECT_0,8,3              ; @WAIT_OBJECT_0
	.no_dead_strip	_WaitForTerminatingWorkers
.subsections_via_symbols
