	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pgarch_MainLoop
_pgarch_MainLoop:                       ## @pgarch_MainLoop
	.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	_wakened@GOTPCREL(%rip), %r14
	movq	_last_sigterm_time@GOTPCREL(%rip), %r12
	xorl	%r13d, %r13d
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_2 Depth 2
	movl	$1, (%r14)
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=2
	movq	_WL_POSTMASTER_DEATH@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_15
LBB0_2:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	_MyLatch@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ResetLatch
	movq	_ready_to_stop@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_got_SIGHUP@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=2
	movl	$0, (%rax)
	movq	_PGC_SIGHUP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ProcessConfigFile
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=2
	movq	_got_SIGTERM@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=2
	xorl	%edi, %edi
	callq	_time
	movq	(%r12), %rcx
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=2
	subl	%ecx, %eax
	cmpl	$59, %eax
	jbe	LBB0_8
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=2
	movq	%r12, %rdx
	movq	%rax, (%r12)
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=2
	movl	(%r14), %eax
	orl	%r15d, %eax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=2
	movl	$0, (%r14)
	xorl	%eax, %eax
	callq	_pgarch_ArchiverCopyLoop
	xorl	%edi, %edi
	callq	_time
	movq	%rax, %r13
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=2
	testl	%r15d, %r15d
	jne	LBB0_15
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=2
	xorl	%edi, %edi
	callq	_time
	movl	%r13d, %ecx
	subl	%eax, %ecx
	movq	_PGARCH_AUTOWAKE_INTERVAL@GOTPCREL(%rip), %rax
	addl	(%rax), %ecx
	testl	%ecx, %ecx
	jle	LBB0_1
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=2
	movq	_MyLatch@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_WL_TIMEOUT@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_WL_LATCH_SET@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_WL_POSTMASTER_DEATH@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	imull	$1000, %ecx, %edx               ## imm = 0x3E8
	movq	_WAIT_EVENT_ARCHIVER_MAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_WaitLatch
	testl	%eax, (%rbx)
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=2
	movl	$1, (%r14)
	jmp	LBB0_14
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_wakened,4,2                    ## @wakened
	.comm	_MyLatch,4,2                    ## @MyLatch
	.comm	_ready_to_stop,4,2              ## @ready_to_stop
	.comm	_got_SIGHUP,4,2                 ## @got_SIGHUP
	.comm	_PGC_SIGHUP,4,2                 ## @PGC_SIGHUP
	.comm	_got_SIGTERM,8,3                ## @got_SIGTERM
	.comm	_last_sigterm_time,8,3          ## @last_sigterm_time
	.comm	_PGARCH_AUTOWAKE_INTERVAL,4,2   ## @PGARCH_AUTOWAKE_INTERVAL
	.comm	_WL_LATCH_SET,4,2               ## @WL_LATCH_SET
	.comm	_WL_TIMEOUT,4,2                 ## @WL_TIMEOUT
	.comm	_WL_POSTMASTER_DEATH,4,2        ## @WL_POSTMASTER_DEATH
	.comm	_WAIT_EVENT_ARCHIVER_MAIN,4,2   ## @WAIT_EVENT_ARCHIVER_MAIN
	.no_dead_strip	_pgarch_MainLoop
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pgarch_MainLoop
_pgarch_MainLoop:                       ; @pgarch_MainLoop
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	w19, #0
Lloh0:
	adrp	x20, _wakened@GOTPAGE
Lloh1:
	ldr	x20, [x20, _wakened@GOTPAGEOFF]
Lloh2:
	adrp	x21, _MyLatch@GOTPAGE
Lloh3:
	ldr	x21, [x21, _MyLatch@GOTPAGEOFF]
Lloh4:
	adrp	x22, _ready_to_stop@GOTPAGE
Lloh5:
	ldr	x22, [x22, _ready_to_stop@GOTPAGEOFF]
Lloh6:
	adrp	x23, _got_SIGHUP@GOTPAGE
Lloh7:
	ldr	x23, [x23, _got_SIGHUP@GOTPAGEOFF]
Lloh8:
	adrp	x24, _got_SIGTERM@GOTPAGE
Lloh9:
	ldr	x24, [x24, _got_SIGTERM@GOTPAGEOFF]
	mov	w8, #1
Lloh10:
	adrp	x28, _WL_TIMEOUT@GOTPAGE
Lloh11:
	ldr	x28, [x28, _WL_TIMEOUT@GOTPAGEOFF]
Lloh12:
	adrp	x27, _WL_POSTMASTER_DEATH@GOTPAGE
Lloh13:
	ldr	x27, [x27, _WL_POSTMASTER_DEATH@GOTPAGEOFF]
Lloh14:
	adrp	x26, _last_sigterm_time@GOTPAGE
Lloh15:
	ldr	x26, [x26, _last_sigterm_time@GOTPAGEOFF]
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_3 Depth 2
	str	w8, [x20]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=2
	ldr	w8, [x27]
	tst	w8, w0
	b.ne	LBB0_16
LBB0_3:                                 ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x21]
	bl	_ResetLatch
	ldr	w25, [x22]
	ldr	w8, [x23]
	cbz	w8, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=2
	str	wzr, [x23]
Lloh16:
	adrp	x8, _PGC_SIGHUP@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PGC_SIGHUP@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	bl	_ProcessConfigFile
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=2
	ldr	x8, [x24]
	cbz	x8, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=2
	mov	x0, #0
	bl	_time
	ldr	x8, [x26]
	cbz	x8, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=2
	sub	w8, w0, w8
	cmp	w8, #59
	b.ls	LBB0_9
	b	LBB0_16
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=2
	mov	x9, x26
	str	x0, [x26]
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=2
	ldr	w8, [x20]
	orr	w8, w8, w25
	cbz	w8, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=2
	str	wzr, [x20]
	bl	_pgarch_ArchiverCopyLoop
	mov	x0, #0
	bl	_time
	mov	x19, x0
LBB0_11:                                ;   in Loop: Header=BB0_3 Depth=2
	cbnz	w25, LBB0_16
; %bb.12:                               ;   in Loop: Header=BB0_3 Depth=2
	mov	x0, #0
	bl	_time
Lloh19:
	adrp	x8, _PGARCH_AUTOWAKE_INTERVAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _PGARCH_AUTOWAKE_INTERVAL@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	sub	w9, w19, w0
	add	w8, w9, w8
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_3 Depth=2
	ldr	w0, [x21]
Lloh22:
	adrp	x9, _WL_LATCH_SET@GOTPAGE
Lloh23:
	ldr	x9, [x9, _WL_LATCH_SET@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	ldr	w10, [x28]
	orr	w9, w10, w9
	ldr	w10, [x27]
	orr	w1, w9, w10
	mov	w9, #1000
	mul	w2, w8, w9
Lloh25:
	adrp	x8, _WAIT_EVENT_ARCHIVER_MAIN@GOTPAGE
Lloh26:
	ldr	x8, [x8, _WAIT_EVENT_ARCHIVER_MAIN@GOTPAGEOFF]
Lloh27:
	ldr	w3, [x8]
	bl	_WaitLatch
	ldr	w8, [x28]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.14:                               ;   in Loop: Header=BB0_3 Depth=2
	mov	w8, #1
	str	w8, [x20]
	b	LBB0_2
LBB0_15:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w8, #1
	b	LBB0_1
LBB0_16:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.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 AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_wakened,4,2                    ; @wakened
	.comm	_MyLatch,4,2                    ; @MyLatch
	.comm	_ready_to_stop,4,2              ; @ready_to_stop
	.comm	_got_SIGHUP,4,2                 ; @got_SIGHUP
	.comm	_PGC_SIGHUP,4,2                 ; @PGC_SIGHUP
	.comm	_got_SIGTERM,8,3                ; @got_SIGTERM
	.comm	_last_sigterm_time,8,3          ; @last_sigterm_time
	.comm	_PGARCH_AUTOWAKE_INTERVAL,4,2   ; @PGARCH_AUTOWAKE_INTERVAL
	.comm	_WL_LATCH_SET,4,2               ; @WL_LATCH_SET
	.comm	_WL_TIMEOUT,4,2                 ; @WL_TIMEOUT
	.comm	_WL_POSTMASTER_DEATH,4,2        ; @WL_POSTMASTER_DEATH
	.comm	_WAIT_EVENT_ARCHIVER_MAIN,4,2   ; @WAIT_EVENT_ARCHIVER_MAIN
	.no_dead_strip	_pgarch_MainLoop
.subsections_via_symbols
