	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RegisterDynamicBackgroundWorker ## -- Begin function RegisterDynamicBackgroundWorker
	.p2align	4, 0x90
_RegisterDynamicBackgroundWorker:       ## @RegisterDynamicBackgroundWorker
	.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	_IsUnderPostmaster@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	cmpl	$0, (%rax)
	je	LBB0_15
## %bb.1:
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_SanityCheckBackgroundWorker
	testl	%eax, %eax
	je	LBB0_15
## %bb.2:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	_BGWORKER_CLASS_PARALLEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	(%r12), %r14d
	movq	_BackgroundWorkerLock@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movq	_LW_EXCLUSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LWLockAcquire
	movq	_BackgroundWorkerData@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rcx
	andl	%ebx, %r14d
	je	LBB0_5
## %bb.3:
	movq	(%rcx), %rax
	subq	8(%rcx), %rax
	movq	_max_parallel_workers@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jge	LBB0_4
LBB0_5:
	movl	16(%rcx), %eax
	testl	%eax, %eax
	jle	LBB0_13
## %bb.6:
	movq	24(%rcx), %rbx
	addq	$20, %rbx
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$0, -20(%rbx)
	je	LBB0_8
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=1
	incq	%r13
	addq	$24, %rbx
	cmpq	%r13, %rax
	jne	LBB0_7
LBB0_13:
	movq	_BackgroundWorkerLock@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	jmp	LBB0_14
LBB0_4:
	movq	_MAX_PARALLEL_WORKER_LIMIT@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setle	%dil
	callq	_Assert
	movl	(%r13), %edi
LBB0_14:
	callq	_LWLockRelease
LBB0_15:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%rsi, %r15
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	callq	_memcpy
	movq	-12(%rbx), %r12
	movq	_InvalidPid@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbx)
	incq	%r12
	movq	%r12, -12(%rbx)
	movl	$0, -16(%rbx)
	testl	%r14d, %r14d
	je	LBB0_10
## %bb.9:
	movq	(%r15), %rax
	incq	(%rax)
LBB0_10:
	xorl	%eax, %eax
	callq	_pg_write_barrier
	movl	$1, -20(%rbx)
	movq	_BackgroundWorkerLock@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_LWLockRelease
	movq	_PMSIGNAL_BACKGROUND_WORKER_CHANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SendPostmasterSignal
	movl	$1, %r15d
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	testq	%rbx, %rbx
	je	LBB0_15
## %bb.11:
	movl	$16, %edi
	callq	_palloc
	movq	%rax, (%rbx)
	movl	%r13d, (%rax)
	movq	%r12, 8(%rax)
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_IsUnderPostmaster,4,2          ## @IsUnderPostmaster
	.comm	_ERROR,4,2                      ## @ERROR
	.comm	_BGWORKER_CLASS_PARALLEL,4,2    ## @BGWORKER_CLASS_PARALLEL
	.comm	_BackgroundWorkerLock,4,2       ## @BackgroundWorkerLock
	.comm	_LW_EXCLUSIVE,4,2               ## @LW_EXCLUSIVE
	.comm	_BackgroundWorkerData,8,3       ## @BackgroundWorkerData
	.comm	_max_parallel_workers,8,3       ## @max_parallel_workers
	.comm	_MAX_PARALLEL_WORKER_LIMIT,8,3  ## @MAX_PARALLEL_WORKER_LIMIT
	.comm	_InvalidPid,4,2                 ## @InvalidPid
	.comm	_PMSIGNAL_BACKGROUND_WORKER_CHANGE,4,2 ## @PMSIGNAL_BACKGROUND_WORKER_CHANGE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RegisterDynamicBackgroundWorker ; -- Begin function RegisterDynamicBackgroundWorker
	.p2align	2
_RegisterDynamicBackgroundWorker:       ; @RegisterDynamicBackgroundWorker
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
Lloh0:
	adrp	x8, _IsUnderPostmaster@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IsUnderPostmaster@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_10
; %bb.1:
	mov	x19, x1
	mov	x20, x0
Lloh3:
	adrp	x8, _ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_SanityCheckBackgroundWorker
	cbz	w0, LBB0_10
; %bb.2:
	ldr	w8, [x20]
Lloh6:
	adrp	x9, _BGWORKER_CLASS_PARALLEL@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BGWORKER_CLASS_PARALLEL@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	and	w24, w9, w8
Lloh9:
	adrp	x22, _BackgroundWorkerLock@GOTPAGE
Lloh10:
	ldr	x22, [x22, _BackgroundWorkerLock@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh11:
	adrp	x8, _LW_EXCLUSIVE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _LW_EXCLUSIVE@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	bl	_LWLockAcquire
Lloh14:
	adrp	x25, _BackgroundWorkerData@GOTPAGE
Lloh15:
	ldr	x25, [x25, _BackgroundWorkerData@GOTPAGEOFF]
	ldr	x9, [x25]
	cbz	w24, LBB0_4
; %bb.3:
	ldp	x8, x10, [x9]
Lloh16:
	adrp	x11, _max_parallel_workers@GOTPAGE
Lloh17:
	ldr	x11, [x11, _max_parallel_workers@GOTPAGEOFF]
Lloh18:
	ldr	x11, [x11]
	sub	x8, x8, x10
	cmp	x8, x11
	b.ge	LBB0_8
LBB0_4:
	ldr	w8, [x9, #16]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.5:
	mov	x23, #0
	ldr	x9, [x9, #24]
	add	x21, x9, #20
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w9, [x21, #-20]
	cbz	w9, LBB0_12
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x23, x23, #1
	add	x21, x21, #24
	cmp	x8, x23
	b.ne	LBB0_6
	b	LBB0_9
LBB0_8:
Lloh19:
	adrp	x9, _MAX_PARALLEL_WORKER_LIMIT@GOTPAGE
Lloh20:
	ldr	x9, [x9, _MAX_PARALLEL_WORKER_LIMIT@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, le
	bl	_Assert
LBB0_9:
	ldr	w0, [x22]
	bl	_LWLockRelease
LBB0_10:
	mov	w20, #0
LBB0_11:
	mov	x0, x20
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_12:
	mov	x0, x21
	mov	x1, x20
	mov	w2, #4
	bl	_memcpy
Lloh22:
	adrp	x8, _InvalidPid@GOTPAGE
Lloh23:
	ldr	x8, [x8, _InvalidPid@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	stur	w8, [x21, #-4]
	ldur	x8, [x21, #-12]
	add	x26, x8, #1
	stur	x26, [x21, #-12]
	stur	wzr, [x21, #-16]
	cbz	w24, LBB0_14
; %bb.13:
	ldr	x8, [x25]
	ldr	x9, [x8]
	add	x9, x9, #1
	str	x9, [x8]
LBB0_14:
	bl	_pg_write_barrier
	mov	w20, #1
	stur	w20, [x21, #-20]
	ldr	w0, [x22]
	bl	_LWLockRelease
Lloh25:
	adrp	x8, _PMSIGNAL_BACKGROUND_WORKER_CHANGE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _PMSIGNAL_BACKGROUND_WORKER_CHANGE@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	bl	_SendPostmasterSignal
	cbz	x19, LBB0_11
; %bb.15:
	mov	w0, #16
	bl	_palloc
	str	x0, [x19]
	str	w23, [x0]
	str	x26, [x0, #8]
	mov	w20, #1
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_IsUnderPostmaster,4,2          ; @IsUnderPostmaster
	.comm	_ERROR,4,2                      ; @ERROR
	.comm	_BGWORKER_CLASS_PARALLEL,4,2    ; @BGWORKER_CLASS_PARALLEL
	.comm	_BackgroundWorkerLock,4,2       ; @BackgroundWorkerLock
	.comm	_LW_EXCLUSIVE,4,2               ; @LW_EXCLUSIVE
	.comm	_BackgroundWorkerData,8,3       ; @BackgroundWorkerData
	.comm	_max_parallel_workers,8,3       ; @max_parallel_workers
	.comm	_MAX_PARALLEL_WORKER_LIMIT,8,3  ; @MAX_PARALLEL_WORKER_LIMIT
	.comm	_InvalidPid,4,2                 ; @InvalidPid
	.comm	_PMSIGNAL_BACKGROUND_WORKER_CHANGE,4,2 ; @PMSIGNAL_BACKGROUND_WORKER_CHANGE
.subsections_via_symbols
