	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_WaitForBackgroundWorkerShutdown ## -- Begin function WaitForBackgroundWorkerShutdown
	.p2align	4, 0x90
_WaitForBackgroundWorkerShutdown:       ## @WaitForBackgroundWorkerShutdown
	.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, %r12
	xorl	%eax, %eax
	callq	_CHECK_FOR_INTERRUPTS
	leaq	-44(%rbp), %rsi
	movq	%r12, %rdi
	callq	_GetBackgroundWorkerPid
	movq	_BGWH_STOPPED@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_5
## %bb.1:
	movq	_MyLatch@GOTPCREL(%rip), %rbx
	movq	_WL_POSTMASTER_DEATH@GOTPCREL(%rip), %r13
	movq	_WAIT_EVENT_BGWORKER_SHUTDOWN@GOTPCREL(%rip), %r15
	leaq	-44(%rbp), %r14
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edi
	movl	(%r13), %esi
	movq	_WL_LATCH_SET@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movl	(%r15), %ecx
	xorl	%edx, %edx
	callq	_WaitLatch
	testl	%eax, (%r13)
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rbx), %edi
	callq	_ResetLatch
	xorl	%eax, %eax
	callq	_CHECK_FOR_INTERRUPTS
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_GetBackgroundWorkerPid
	movq	_BGWH_STOPPED@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_2
	jmp	LBB0_5
LBB0_3:
	movq	_BGWH_POSTMASTER_DIED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BGWH_STOPPED,4,2               ## @BGWH_STOPPED
	.comm	_MyLatch,4,2                    ## @MyLatch
	.comm	_WL_LATCH_SET,4,2               ## @WL_LATCH_SET
	.comm	_WL_POSTMASTER_DEATH,4,2        ## @WL_POSTMASTER_DEATH
	.comm	_WAIT_EVENT_BGWORKER_SHUTDOWN,4,2 ## @WAIT_EVENT_BGWORKER_SHUTDOWN
	.comm	_BGWH_POSTMASTER_DIED,4,2       ## @BGWH_POSTMASTER_DIED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_WaitForBackgroundWorkerShutdown ; -- Begin function WaitForBackgroundWorkerShutdown
	.p2align	2
_WaitForBackgroundWorkerShutdown:       ; @WaitForBackgroundWorkerShutdown
	.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	_CHECK_FOR_INTERRUPTS
	add	x1, sp, #12
	mov	x0, x19
	bl	_GetBackgroundWorkerPid
Lloh0:
	adrp	x20, _BGWH_STOPPED@GOTPAGE
Lloh1:
	ldr	x20, [x20, _BGWH_STOPPED@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w0, w8
	b.eq	LBB0_5
; %bb.1:
Lloh2:
	adrp	x21, _MyLatch@GOTPAGE
Lloh3:
	ldr	x21, [x21, _MyLatch@GOTPAGEOFF]
Lloh4:
	adrp	x22, _WL_LATCH_SET@GOTPAGE
Lloh5:
	ldr	x22, [x22, _WL_LATCH_SET@GOTPAGEOFF]
Lloh6:
	adrp	x23, _WL_POSTMASTER_DEATH@GOTPAGE
Lloh7:
	ldr	x23, [x23, _WL_POSTMASTER_DEATH@GOTPAGEOFF]
Lloh8:
	adrp	x24, _WAIT_EVENT_BGWORKER_SHUTDOWN@GOTPAGE
Lloh9:
	ldr	x24, [x24, _WAIT_EVENT_BGWORKER_SHUTDOWN@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21]
	ldr	w8, [x22]
	ldr	w9, [x23]
	orr	w1, w9, w8
	ldr	w3, [x24]
	mov	w2, #0
	bl	_WaitLatch
	ldr	w8, [x23]
	tst	w8, w0
	b.ne	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x21]
	bl	_ResetLatch
	bl	_CHECK_FOR_INTERRUPTS
	add	x1, sp, #12
	mov	x0, x19
	bl	_GetBackgroundWorkerPid
	ldr	w8, [x20]
	cmp	w0, w8
	b.ne	LBB0_2
	b	LBB0_5
LBB0_4:
Lloh10:
	adrp	x8, _BGWH_POSTMASTER_DIED@GOTPAGE
Lloh11:
	ldr	x8, [x8, _BGWH_POSTMASTER_DIED@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
LBB0_5:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_BGWH_STOPPED,4,2               ; @BGWH_STOPPED
	.comm	_MyLatch,4,2                    ; @MyLatch
	.comm	_WL_LATCH_SET,4,2               ; @WL_LATCH_SET
	.comm	_WL_POSTMASTER_DEATH,4,2        ; @WL_POSTMASTER_DEATH
	.comm	_WAIT_EVENT_BGWORKER_SHUTDOWN,4,2 ; @WAIT_EVENT_BGWORKER_SHUTDOWN
	.comm	_BGWH_POSTMASTER_DIED,4,2       ; @BGWH_POSTMASTER_DIED
.subsections_via_symbols
