	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function BackendStartup
_BackendStartup:                        ## @BackendStartup
	.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, %r14
	movl	$40, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %rbx
	movq	_MyCancelKey@GOTPCREL(%rip), %r15
	movq	%r15, %rdi
	callq	_RandomCancelKey
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movl	(%r15), %eax
	movl	%eax, 32(%rbx)
	movq	_BACKEND_TYPE_NORMAL@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_canAcceptConnections
	movq	%rax, (%r14)
	movq	_CAC_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	setne	%cl
	movq	_CAC_WAITBACKUP@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	setne	%al
	andb	%cl, %al
	movzbl	%al, %eax
	movl	%eax, (%rbx)
	testb	%al, %al
	je	LBB0_7
## %bb.6:
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_1:
	movq	_LOG@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_ERRCODE_OUT_OF_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_2
LBB0_4:
	movq	%rbx, %rdi
	callq	_free
	movq	_LOG@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_ERRCODE_INTERNAL_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str.1(%rip), %rdi
LBB0_2:
	callq	_errmsg
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_15:
	movq	_STATUS_ERROR@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_7:
	xorl	%eax, %eax
	callq	_AssignPostmasterChildSlot
	movq	_MyPMChildSlot@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
LBB0_8:
	movq	%rax, 24(%rbx)
	movl	$0, 4(%rbx)
	xorl	%eax, %eax
	callq	_fork_process
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_9
## %bb.11:
	jns	LBB0_10
## %bb.12:
	movq	_errno@GOTPCREL(%rip), %r12
	movl	(%r12), %r15d
	cmpl	$0, (%rbx)
	jne	LBB0_14
## %bb.13:
	movq	24(%rbx), %rdi
	callq	_ReleasePostmasterChildSlot
LBB0_14:
	movq	%rbx, %rdi
	callq	_free
	movl	%r15d, (%r12)
	movq	_LOG@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	L_.str.2(%rip), %rdi
	callq	_errmsg
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_report_fork_failure_to_client
	jmp	LBB0_15
LBB0_9:
	movq	%rbx, %rdi
	callq	_free
	xorl	%eax, %eax
	callq	_InitPostmasterChild
	xorl	%edi, %edi
	callq	_ClosePostmasterPorts
	movq	%r14, %rdi
	callq	_BackendInitialize
	movq	%r14, %rdi
	callq	_BackendRun
LBB0_10:
	movq	_DEBUG2@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	8(%r14), %edx
	leaq	L_.str.3(%rip), %rdi
	movl	%r15d, %esi
	callq	_errmsg_internal
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_ereport
	movq	%r15, 16(%rbx)
	movl	(%r13), %eax
	movl	%eax, 12(%rbx)
	addq	$8, %rbx
	movq	_BackendList@GOTPCREL(%rip), %rdi
	movq	%rbx, %rsi
	callq	_dlist_push_head
	movq	_STATUS_OK@GOTPCREL(%rip), %rax
LBB0_16:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LOG,4,2                        ## @LOG
	.comm	_ERRCODE_OUT_OF_MEMORY,4,2      ## @ERRCODE_OUT_OF_MEMORY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"out of memory"

	.comm	_STATUS_ERROR,4,2               ## @STATUS_ERROR
	.comm	_MyCancelKey,4,2                ## @MyCancelKey
	.comm	_ERRCODE_INTERNAL_ERROR,4,2     ## @ERRCODE_INTERNAL_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"could not generate random cancel key"

	.comm	_BACKEND_TYPE_NORMAL,4,2        ## @BACKEND_TYPE_NORMAL
	.comm	_CAC_OK,8,3                     ## @CAC_OK
	.comm	_CAC_WAITBACKUP,8,3             ## @CAC_WAITBACKUP
	.comm	_MyPMChildSlot,8,3              ## @MyPMChildSlot
	.comm	_errno,4,2                      ## @errno
L_.str.2:                               ## @.str.2
	.asciz	"could not fork new process for connection: %m"

	.comm	_DEBUG2,4,2                     ## @DEBUG2
L_.str.3:                               ## @.str.3
	.asciz	"forked new backend, pid=%d socket=%d"

	.comm	_BackendList,4,2                ## @BackendList
	.comm	_STATUS_OK,4,2                  ## @STATUS_OK
	.no_dead_strip	_BackendStartup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function BackendStartup
_BackendStartup:                        ; @BackendStartup
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	w0, #40
	bl	_malloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x21, _MyCancelKey@GOTPAGE
Lloh1:
	ldr	x21, [x21, _MyCancelKey@GOTPAGEOFF]
	mov	x0, x21
	bl	_RandomCancelKey
	cbz	w0, LBB0_5
; %bb.2:
	ldr	w8, [x21]
	str	w8, [x20, #32]
Lloh2:
	adrp	x23, _BACKEND_TYPE_NORMAL@GOTPAGE
Lloh3:
	ldr	x23, [x23, _BACKEND_TYPE_NORMAL@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_canAcceptConnections
	str	x0, [x19]
Lloh4:
	adrp	x8, _CAC_OK@GOTPAGE
Lloh5:
	ldr	x8, [x8, _CAC_OK@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	cmp	x0, x8
Lloh7:
	adrp	x8, _CAC_WAITBACKUP@GOTPAGE
Lloh8:
	ldr	x8, [x8, _CAC_WAITBACKUP@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	ccmp	x0, x8, #4, ne
	cset	w8, ne
	str	w8, [x20]
	b.eq	LBB0_8
; %bb.3:
	mov	x0, #0
	b	LBB0_9
LBB0_4:
Lloh10:
	adrp	x8, _LOG@GOTPAGE
Lloh11:
	ldr	x8, [x8, _LOG@GOTPAGEOFF]
Lloh12:
	ldr	w19, [x8]
Lloh13:
	adrp	x8, _ERRCODE_OUT_OF_MEMORY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ERRCODE_OUT_OF_MEMORY@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	bl	_errcode
Lloh16:
	adrp	x0, l_.str@PAGE
Lloh17:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_6
LBB0_5:
	mov	x0, x20
	bl	_free
Lloh18:
	adrp	x8, _LOG@GOTPAGE
Lloh19:
	ldr	x8, [x8, _LOG@GOTPAGEOFF]
Lloh20:
	ldr	w19, [x8]
Lloh21:
	adrp	x8, _ERRCODE_INTERNAL_ERROR@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ERRCODE_INTERNAL_ERROR@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	bl	_errcode
Lloh24:
	adrp	x0, l_.str.1@PAGE
Lloh25:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_6:
	bl	_errmsg
	mov	x1, x0
	mov	x0, x19
	bl	_ereport
LBB0_7:
Lloh26:
	adrp	x8, _STATUS_ERROR@GOTPAGE
Lloh27:
	ldr	x8, [x8, _STATUS_ERROR@GOTPAGEOFF]
	b	LBB0_16
LBB0_8:
	bl	_AssignPostmasterChildSlot
Lloh28:
	adrp	x8, _MyPMChildSlot@GOTPAGE
Lloh29:
	ldr	x8, [x8, _MyPMChildSlot@GOTPAGEOFF]
Lloh30:
	str	x0, [x8]
LBB0_9:
	str	x0, [x20, #24]
	str	wzr, [x20, #4]
	bl	_fork_process
	mov	x21, x0
	cbz	x0, LBB0_14
; %bb.10:
	tbz	x21, #63, LBB0_15
; %bb.11:
Lloh31:
	adrp	x22, _errno@GOTPAGE
Lloh32:
	ldr	x22, [x22, _errno@GOTPAGEOFF]
	ldr	w21, [x22]
	ldr	w8, [x20]
	cbnz	w8, LBB0_13
; %bb.12:
	ldr	x0, [x20, #24]
	bl	_ReleasePostmasterChildSlot
LBB0_13:
	mov	x0, x20
	bl	_free
	str	w21, [x22]
Lloh33:
	adrp	x8, _LOG@GOTPAGE
Lloh34:
	ldr	x8, [x8, _LOG@GOTPAGEOFF]
Lloh35:
	ldr	w20, [x8]
Lloh36:
	adrp	x0, l_.str.2@PAGE
Lloh37:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x20
	bl	_ereport
	mov	x0, x19
	mov	x1, x21
	bl	_report_fork_failure_to_client
	b	LBB0_7
LBB0_14:
	mov	x0, x20
	bl	_free
	bl	_InitPostmasterChild
	mov	w0, #0
	bl	_ClosePostmasterPorts
	mov	x0, x19
	bl	_BackendInitialize
	mov	x0, x19
	bl	_BackendRun
LBB0_15:
Lloh38:
	adrp	x8, _DEBUG2@GOTPAGE
Lloh39:
	ldr	x8, [x8, _DEBUG2@GOTPAGEOFF]
Lloh40:
	ldr	w22, [x8]
	ldr	w2, [x19, #8]
Lloh41:
	adrp	x0, l_.str.3@PAGE
Lloh42:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x21
	bl	_errmsg_internal
	mov	x1, x0
	mov	x0, x22
	bl	_ereport
	str	x21, [x20, #16]
	ldr	w8, [x23]
	str	w8, [x20, #12]
	add	x1, x20, #8
Lloh43:
	adrp	x0, _BackendList@GOTPAGE
Lloh44:
	ldr	x0, [x0, _BackendList@GOTPAGEOFF]
	bl	_dlist_push_head
Lloh45:
	adrp	x8, _STATUS_OK@GOTPAGE
Lloh46:
	ldr	x8, [x8, _STATUS_OK@GOTPAGEOFF]
LBB0_16:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotStr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_LOG,4,2                        ; @LOG
	.comm	_ERRCODE_OUT_OF_MEMORY,4,2      ; @ERRCODE_OUT_OF_MEMORY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"out of memory"

	.comm	_STATUS_ERROR,4,2               ; @STATUS_ERROR
	.comm	_MyCancelKey,4,2                ; @MyCancelKey
	.comm	_ERRCODE_INTERNAL_ERROR,4,2     ; @ERRCODE_INTERNAL_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"could not generate random cancel key"

	.comm	_BACKEND_TYPE_NORMAL,4,2        ; @BACKEND_TYPE_NORMAL
	.comm	_CAC_OK,8,3                     ; @CAC_OK
	.comm	_CAC_WAITBACKUP,8,3             ; @CAC_WAITBACKUP
	.comm	_MyPMChildSlot,8,3              ; @MyPMChildSlot
	.comm	_errno,4,2                      ; @errno
l_.str.2:                               ; @.str.2
	.asciz	"could not fork new process for connection: %m"

	.comm	_DEBUG2,4,2                     ; @DEBUG2
l_.str.3:                               ; @.str.3
	.asciz	"forked new backend, pid=%d socket=%d"

	.comm	_BackendList,4,2                ; @BackendList
	.comm	_STATUS_OK,4,2                  ; @STATUS_OK
	.no_dead_strip	_BackendStartup
.subsections_via_symbols
