	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_WaitForParallelWorkersToAttach ## -- Begin function WaitForParallelWorkersToAttach
	.p2align	4, 0x90
_WaitForParallelWorkersToAttach:        ## @WaitForParallelWorkersToAttach
	.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
	cmpl	$0, (%rdi)
	je	LBB0_18
## %bb.1:
	movq	%rdi, %rbx
	movq	_BGWH_STARTED@GOTPCREL(%rip), %r13
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	cmpl	%eax, 16(%rbx)
	jge	LBB0_17
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	xorl	%eax, %eax
	callq	_CHECK_FOR_INTERRUPTS
	movl	(%rbx), %eax
	testl	%eax, %eax
	jle	LBB0_2
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%r12d, %r12d
	xorl	%r15d, %r15d
	jmp	LBB0_9
LBB0_5:                                 ##   in Loop: Header=BB0_9 Depth=2
	movq	24(%rbx), %rax
	movq	(%rax,%r12,4), %rdi
	callq	_shm_mq_get_queue
	movq	%rax, %rdi
	callq	_shm_mq_get_sender
	testq	%rax, %rax
	je	LBB0_8
LBB0_6:                                 ##   in Loop: Header=BB0_9 Depth=2
	movq	8(%rbx), %rax
LBB0_7:                                 ##   in Loop: Header=BB0_9 Depth=2
	movl	$1, (%rax,%r12)
	incl	16(%rbx)
LBB0_8:                                 ##   in Loop: Header=BB0_9 Depth=2
	incq	%r15
	movslq	(%rbx), %rax
	addq	$4, %r12
	cmpq	%rax, %r15
	jge	LBB0_2
LBB0_9:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	8(%rbx), %rax
	cmpl	$0, (%rax,%r12)
	jne	LBB0_8
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=2
	movq	24(%rbx), %rcx
	cmpq	$0, (%rcx,%r12,4)
	je	LBB0_7
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=2
	movl	8(%rcx,%r12,4), %edi
	leaq	-44(%rbp), %rsi
	callq	_GetBackgroundWorkerPid
	cmpq	(%r13), %rax
	je	LBB0_5
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=2
	movq	_BGWH_STOPPED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_9 Depth=2
	movq	24(%rbx), %rax
	movq	(%rax,%r12,4), %rdi
	callq	_shm_mq_get_queue
	movq	%rax, %rdi
	callq	_shm_mq_get_sender
	testq	%rax, %rax
	jne	LBB0_6
## %bb.14:                              ##   in Loop: Header=BB0_9 Depth=2
	movq	%r13, %r14
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str(%rip), %rdi
	callq	_errmsg
	leaq	L_.str.1(%rip), %rdi
	callq	_errhint
	movl	%r13d, %edi
	movq	%r14, %r13
	movl	%eax, %esi
	callq	_ereport
	jmp	LBB0_6
LBB0_15:                                ##   in Loop: Header=BB0_9 Depth=2
	movq	_MyLatch@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_WL_EXIT_ON_PM_DEATH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_WL_LATCH_SET@GOTPCREL(%rip), %r14
	orl	(%r14), %esi
	movq	_WAIT_EVENT_BGWORKER_STARTUP@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$-1, %edx
	callq	_WaitLatch
	testl	%eax, (%r14)
	je	LBB0_8
## %bb.16:                              ##   in Loop: Header=BB0_9 Depth=2
	movq	_MyLatch@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ResetLatch
	jmp	LBB0_8
LBB0_17:
	sete	%al
	movzbl	%al, %edi
	callq	_Assert
LBB0_18:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BGWH_STARTED,8,3               ## @BGWH_STARTED
	.comm	_BGWH_STOPPED,8,3               ## @BGWH_STOPPED
	.comm	_ERROR,4,2                      ## @ERROR
	.comm	_ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE,4,2 ## @ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"parallel worker failed to initialize"

L_.str.1:                               ## @.str.1
	.asciz	"More details may be available in the server log."

	.comm	_MyLatch,4,2                    ## @MyLatch
	.comm	_WL_LATCH_SET,4,2               ## @WL_LATCH_SET
	.comm	_WL_EXIT_ON_PM_DEATH,4,2        ## @WL_EXIT_ON_PM_DEATH
	.comm	_WAIT_EVENT_BGWORKER_STARTUP,4,2 ## @WAIT_EVENT_BGWORKER_STARTUP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_WaitForParallelWorkersToAttach ; -- Begin function WaitForParallelWorkersToAttach
	.p2align	2
_WaitForParallelWorkersToAttach:        ; @WaitForParallelWorkersToAttach
	.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
	ldr	w8, [x0]
	cbz	w8, LBB0_18
; %bb.1:
	mov	x19, x0
	mov	w23, #1
Lloh0:
	adrp	x24, _BGWH_STARTED@GOTPAGE
Lloh1:
	ldr	x24, [x24, _BGWH_STARTED@GOTPAGEOFF]
Lloh2:
	adrp	x25, _BGWH_STOPPED@GOTPAGE
Lloh3:
	ldr	x25, [x25, _BGWH_STOPPED@GOTPAGEOFF]
Lloh4:
	adrp	x28, _MyLatch@GOTPAGE
Lloh5:
	ldr	x28, [x28, _MyLatch@GOTPAGEOFF]
Lloh6:
	adrp	x26, _WL_LATCH_SET@GOTPAGE
Lloh7:
	ldr	x26, [x26, _WL_LATCH_SET@GOTPAGEOFF]
Lloh8:
	adrp	x22, _WL_EXIT_ON_PM_DEATH@GOTPAGE
Lloh9:
	ldr	x22, [x22, _WL_EXIT_ON_PM_DEATH@GOTPAGEOFF]
Lloh10:
	adrp	x20, _WAIT_EVENT_BGWORKER_STARTUP@GOTPAGE
Lloh11:
	ldr	x20, [x20, _WAIT_EVENT_BGWORKER_STARTUP@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w9, [x19, #16]
	cmp	w9, w8
	b.ge	LBB0_17
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	bl	_CHECK_FOR_INTERRUPTS
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x21, #0
	mov	x27, #0
	b	LBB0_9
LBB0_5:                                 ;   in Loop: Header=BB0_9 Depth=2
	ldr	x8, [x19, #24]
	ldr	x0, [x8, x21]
	bl	_shm_mq_get_queue
	bl	_shm_mq_get_sender
	cbz	x0, LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_9 Depth=2
	ldr	x8, [x19, #8]
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=2
	str	w23, [x8, x27, lsl #2]
	ldr	w8, [x19, #16]
	add	w8, w8, #1
	str	w8, [x19, #16]
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=2
	add	x27, x27, #1
	ldrsw	x8, [x19]
	add	x21, x21, #16
	cmp	x27, x8
	b.ge	LBB0_2
LBB0_9:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x19, #8]
	ldr	w9, [x8, x27, lsl #2]
	cbnz	w9, LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	ldr	x9, [x19, #24]
	ldr	x10, [x9, x21]
	cbz	x10, LBB0_7
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=2
	add	x8, x9, x21
	ldr	w0, [x8, #8]
	add	x1, sp, #12
	bl	_GetBackgroundWorkerPid
	ldr	x8, [x24]
	cmp	x0, x8
	b.eq	LBB0_5
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=2
	ldr	x8, [x25]
	cmp	x0, x8
	b.ne	LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_9 Depth=2
	ldr	x8, [x19, #24]
	ldr	x0, [x8, x21]
	bl	_shm_mq_get_queue
	bl	_shm_mq_get_sender
	cbnz	x0, LBB0_6
; %bb.14:                               ;   in Loop: Header=BB0_9 Depth=2
Lloh12:
	adrp	x8, _ERROR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
	mov	x23, x24
	mov	x24, x26
	mov	x26, x25
	mov	x25, x28
	mov	x28, x20
	mov	x20, x22
Lloh14:
	ldr	w22, [x8]
Lloh15:
	adrp	x8, _ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_errcode
Lloh18:
	adrp	x0, l_.str@PAGE
Lloh19:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
Lloh20:
	adrp	x0, l_.str.1@PAGE
Lloh21:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_errhint
	mov	x1, x0
	mov	x0, x22
	mov	x22, x20
	mov	x20, x28
	mov	x28, x25
	mov	x25, x26
	mov	x26, x24
	mov	x24, x23
	mov	w23, #1
	bl	_ereport
	b	LBB0_6
LBB0_15:                                ;   in Loop: Header=BB0_9 Depth=2
	ldr	w0, [x28]
	ldr	w8, [x26]
	ldr	w9, [x22]
	orr	w1, w9, w8
	ldr	w3, [x20]
	mov	w2, #-1
	bl	_WaitLatch
	ldr	w8, [x26]
	tst	w8, w0
	b.eq	LBB0_8
; %bb.16:                               ;   in Loop: Header=BB0_9 Depth=2
	ldr	w0, [x28]
	bl	_ResetLatch
	b	LBB0_8
LBB0_17:
	cset	w0, eq
	bl	_Assert
LBB0_18:
	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
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_BGWH_STARTED,8,3               ; @BGWH_STARTED
	.comm	_BGWH_STOPPED,8,3               ; @BGWH_STOPPED
	.comm	_ERROR,4,2                      ; @ERROR
	.comm	_ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE,4,2 ; @ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"parallel worker failed to initialize"

l_.str.1:                               ; @.str.1
	.asciz	"More details may be available in the server log."

	.comm	_MyLatch,4,2                    ; @MyLatch
	.comm	_WL_LATCH_SET,4,2               ; @WL_LATCH_SET
	.comm	_WL_EXIT_ON_PM_DEATH,4,2        ; @WL_EXIT_ON_PM_DEATH
	.comm	_WAIT_EVENT_BGWORKER_STARTUP,4,2 ; @WAIT_EVENT_BGWORKER_STARTUP
.subsections_via_symbols
