	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pgstat_start                   ## -- Begin function pgstat_start
	.p2align	4, 0x90
_pgstat_start:                          ## @pgstat_start
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_pgStatSock@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_PGINVALID_SOCKET@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	je	LBB0_7
## %bb.1:
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	callq	_time
	movq	_last_pgstat_start_time@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %esi
	subl	%edx, %esi
	movq	_PGSTAT_RESTART_INTERVAL@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %esi
	jb	LBB0_7
## %bb.2:
	movq	%rax, (%rcx)
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_fork_process
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	cmpq	$-1, %rax
	jne	LBB0_6
## %bb.4:
	movq	_LOG@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	L_.str(%rip), %rdi
	callq	_errmsg
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_5:
	xorl	%eax, %eax
	callq	_InitPostmasterChild
	xorl	%edi, %edi
	callq	_ClosePostmasterPorts
	xorl	%eax, %eax
	callq	_dsm_detach_all
	xorl	%eax, %eax
	callq	_PGSharedMemoryDetach
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_PgstatCollectorMain
	jmp	LBB0_7
LBB0_6:
	movl	%eax, %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_pgStatSock,8,3                 ## @pgStatSock
	.comm	_PGINVALID_SOCKET,8,3           ## @PGINVALID_SOCKET
	.comm	_last_pgstat_start_time,8,3     ## @last_pgstat_start_time
	.comm	_PGSTAT_RESTART_INTERVAL,8,3    ## @PGSTAT_RESTART_INTERVAL
	.comm	_LOG,4,2                        ## @LOG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not fork statistics collector: %m"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pgstat_start                   ; -- Begin function pgstat_start
	.p2align	2
_pgstat_start:                          ; @pgstat_start
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _pgStatSock@GOTPAGE
Lloh1:
	ldr	x8, [x8, _pgStatSock@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _PGINVALID_SOCKET@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PGINVALID_SOCKET@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_6
; %bb.1:
	mov	x0, #0
	bl	_time
Lloh6:
	adrp	x8, _last_pgstat_start_time@GOTPAGE
Lloh7:
	ldr	x8, [x8, _last_pgstat_start_time@GOTPAGEOFF]
	ldr	w9, [x8]
Lloh8:
	adrp	x10, _PGSTAT_RESTART_INTERVAL@GOTPAGE
Lloh9:
	ldr	x10, [x10, _PGSTAT_RESTART_INTERVAL@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	sub	w9, w0, w9
	cmp	w9, w10
	b.lo	LBB0_6
; %bb.2:
	str	x0, [x8]
	bl	_fork_process
	cbz	x0, LBB0_5
; %bb.3:
	cmn	x0, #1
	b.ne	LBB0_7
; %bb.4:
Lloh11:
	adrp	x8, _LOG@GOTPAGE
Lloh12:
	ldr	x8, [x8, _LOG@GOTPAGEOFF]
Lloh13:
	ldr	w19, [x8]
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x19
	bl	_ereport
	b	LBB0_6
LBB0_5:
	bl	_InitPostmasterChild
	mov	w0, #0
	bl	_ClosePostmasterPorts
	bl	_dsm_detach_all
	bl	_PGSharedMemoryDetach
	mov	w0, #0
	mov	x1, #0
	bl	_PgstatCollectorMain
LBB0_6:
	mov	w0, #0
LBB0_7:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_pgStatSock,8,3                 ; @pgStatSock
	.comm	_PGINVALID_SOCKET,8,3           ; @PGINVALID_SOCKET
	.comm	_last_pgstat_start_time,8,3     ; @last_pgstat_start_time
	.comm	_PGSTAT_RESTART_INTERVAL,8,3    ; @PGSTAT_RESTART_INTERVAL
	.comm	_LOG,4,2                        ; @LOG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not fork statistics collector: %m"

.subsections_via_symbols
