	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_autoprewarm_main               ## -- Begin function autoprewarm_main
	.p2align	4, 0x90
_autoprewarm_main:                      ## @autoprewarm_main
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_SIGTERM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_apw_sigterm_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_pqsignal
	movq	_SIGHUP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_apw_sighup_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_pqsignal
	movq	_SIGUSR1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_procsignal_sigusr1_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_pqsignal
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_BackgroundWorkerUnblockSignals
	xorl	%eax, %eax
	callq	_apw_init_shmem
	movq	%rax, %r14
	movq	_apw_detach_shmem@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_on_shmem_exit
	movq	_apw_state@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	$8, %rdi
	movq	_LW_EXCLUSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LWLockAcquire
	movq	(%rbx), %rdi
	movq	(%rdi), %rax
	movq	_InvalidPid@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.1:
	movq	_MyProcPid@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rdi)
	addq	$8, %rdi
	callq	_LWLockRelease
	testq	%r14, %r14
	jne	LBB0_3
## %bb.2:
	xorl	%eax, %eax
	callq	_apw_load_buffers
	xorl	%eax, %eax
	callq	_GetCurrentTimestamp
	movl	%eax, %r12d
LBB0_3:
	movq	_got_sigterm@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	je	LBB0_4
LBB0_13:
	movl	$1, %edi
	movl	$1, %esi
	callq	_apw_dump_now
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	addq	$8, %rdi
	callq	_LWLockRelease
	movq	_LOG@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	(%rbx), %rax
	movq	(%rax), %rsi
	leaq	L_.str(%rip), %rdi
	callq	_errmsg
	movl	%r14d, %edi
	movl	%eax, %esi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ereport                        ## TAILCALL
LBB0_4:
	movq	_got_sighup@GOTPCREL(%rip), %r14
	movq	_MyProc@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$0, (%r14)
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	$0, (%r14)
	movq	_PGC_SIGHUP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ProcessConfigFile
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	_autoprewarm_interval@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	$0, -56(%rbp)
	movl	$0, -44(%rbp)
	imull	$1000, %eax, %esi               ## imm = 0x3E8
	movl	%r12d, %edi
	callq	_TimestampTzPlusMilliseconds
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_GetCurrentTimestamp
	movl	%eax, %edi
	movl	%ebx, %esi
	leaq	-56(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	callq	_TimestampDifference
	movslq	-44(%rbp), %rax
	imulq	$274877907, %rax, %rax          ## imm = 0x10624DD3
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$38, %rax
	addl	%ecx, %eax
	movslq	%eax, %rdx
	addq	-56(%rbp), %rdx
	jle	LBB0_15
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	_WL_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_WL_LATCH_SET@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	(%r15), %rdi
	movq	_WL_EXIT_ON_PM_DEATH@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_PG_WAIT_EXTENSION@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r15), %rdi
	movq	_WL_EXIT_ON_PM_DEATH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_WL_LATCH_SET@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_PG_WAIT_EXTENSION@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	$-1, %rdx
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	callq	_WaitLatch
	movq	(%r15), %rdi
	callq	_ResetLatch
	cmpl	$0, (%r13)
	je	LBB0_5
	jmp	LBB0_13
LBB0_15:                                ##   in Loop: Header=BB0_5 Depth=1
	xorl	%eax, %eax
	callq	_GetCurrentTimestamp
	movl	%eax, %r12d
	movl	$1, %edi
	xorl	%esi, %esi
	callq	_apw_dump_now
	cmpl	$0, (%r13)
	je	LBB0_5
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_SIGTERM,4,2                    ## @SIGTERM
	.comm	_apw_sigterm_handler,4,2        ## @apw_sigterm_handler
	.comm	_SIGHUP,4,2                     ## @SIGHUP
	.comm	_apw_sighup_handler,4,2         ## @apw_sighup_handler
	.comm	_SIGUSR1,4,2                    ## @SIGUSR1
	.comm	_procsignal_sigusr1_handler,4,2 ## @procsignal_sigusr1_handler
	.comm	_apw_detach_shmem,4,2           ## @apw_detach_shmem
	.comm	_apw_state,8,3                  ## @apw_state
	.comm	_LW_EXCLUSIVE,4,2               ## @LW_EXCLUSIVE
	.comm	_InvalidPid,8,3                 ## @InvalidPid
	.comm	_LOG,4,2                        ## @LOG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"autoprewarm worker is already running under PID %lu"

	.comm	_MyProcPid,8,3                  ## @MyProcPid
	.comm	_got_sigterm,4,2                ## @got_sigterm
	.comm	_got_sighup,4,2                 ## @got_sighup
	.comm	_PGC_SIGHUP,4,2                 ## @PGC_SIGHUP
	.comm	_autoprewarm_interval,4,2       ## @autoprewarm_interval
	.comm	_MyProc,8,3                     ## @MyProc
	.comm	_WL_LATCH_SET,4,2               ## @WL_LATCH_SET
	.comm	_WL_EXIT_ON_PM_DEATH,4,2        ## @WL_EXIT_ON_PM_DEATH
	.comm	_PG_WAIT_EXTENSION,4,2          ## @PG_WAIT_EXTENSION
	.comm	_WL_TIMEOUT,4,2                 ## @WL_TIMEOUT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_autoprewarm_main               ; -- Begin function autoprewarm_main
	.p2align	2
_autoprewarm_main:                      ; @autoprewarm_main
	.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
Lloh0:
	adrp	x8, _SIGTERM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SIGTERM@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _apw_sigterm_handler@GOTPAGE
Lloh4:
	ldr	x8, [x8, _apw_sigterm_handler@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_pqsignal
Lloh6:
	adrp	x8, _SIGHUP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SIGHUP@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x8, _apw_sighup_handler@GOTPAGE
Lloh10:
	ldr	x8, [x8, _apw_sighup_handler@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_pqsignal
Lloh12:
	adrp	x8, _SIGUSR1@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SIGUSR1@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
Lloh15:
	adrp	x8, _procsignal_sigusr1_handler@GOTPAGE
Lloh16:
	ldr	x8, [x8, _procsignal_sigusr1_handler@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	bl	_pqsignal
	bl	_BackgroundWorkerUnblockSignals
	bl	_apw_init_shmem
	mov	x19, x0
Lloh18:
	adrp	x8, _apw_detach_shmem@GOTPAGE
Lloh19:
	ldr	x8, [x8, _apw_detach_shmem@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_on_shmem_exit
Lloh21:
	adrp	x20, _apw_state@GOTPAGE
Lloh22:
	ldr	x20, [x20, _apw_state@GOTPAGEOFF]
	ldr	x8, [x20]
	add	x0, x8, #8
Lloh23:
	adrp	x8, _LW_EXCLUSIVE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _LW_EXCLUSIVE@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	bl	_LWLockAcquire
	ldr	x0, [x20]
	ldr	x8, [x0]
Lloh26:
	adrp	x9, _InvalidPid@GOTPAGE
Lloh27:
	ldr	x9, [x9, _InvalidPid@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
Lloh29:
	adrp	x8, _MyProcPid@GOTPAGE
Lloh30:
	ldr	x8, [x8, _MyProcPid@GOTPAGEOFF]
Lloh31:
	ldr	x8, [x8]
	str	x8, [x0], #8
	bl	_LWLockRelease
	cbz	x19, LBB0_4
; %bb.2:
	mov	w19, #0
	b	LBB0_5
LBB0_3:
	add	x0, x0, #8
	bl	_LWLockRelease
Lloh32:
	adrp	x8, _LOG@GOTPAGE
Lloh33:
	ldr	x8, [x8, _LOG@GOTPAGEOFF]
Lloh34:
	ldr	w19, [x8]
	ldr	x8, [x20]
	ldr	x1, [x8]
Lloh35:
	adrp	x0, l_.str@PAGE
Lloh36:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x19
	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
	b	_ereport
LBB0_4:
	bl	_apw_load_buffers
	bl	_GetCurrentTimestamp
	mov	x19, x0
LBB0_5:
Lloh37:
	adrp	x21, _got_sigterm@GOTPAGE
Lloh38:
	ldr	x21, [x21, _got_sigterm@GOTPAGEOFF]
	ldr	w8, [x21]
	cbz	w8, LBB0_7
LBB0_6:
	mov	w0, #1
	mov	w1, #1
	bl	_apw_dump_now
	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
LBB0_7:
Lloh39:
	adrp	x22, _got_sighup@GOTPAGE
Lloh40:
	ldr	x22, [x22, _got_sighup@GOTPAGEOFF]
Lloh41:
	adrp	x23, _autoprewarm_interval@GOTPAGE
Lloh42:
	ldr	x23, [x23, _autoprewarm_interval@GOTPAGEOFF]
Lloh43:
	adrp	x24, _MyProc@GOTPAGE
Lloh44:
	ldr	x24, [x24, _MyProc@GOTPAGEOFF]
Lloh45:
	adrp	x25, _WL_LATCH_SET@GOTPAGE
Lloh46:
	ldr	x25, [x25, _WL_LATCH_SET@GOTPAGEOFF]
Lloh47:
	adrp	x26, _WL_EXIT_ON_PM_DEATH@GOTPAGE
Lloh48:
	ldr	x26, [x26, _WL_EXIT_ON_PM_DEATH@GOTPAGEOFF]
Lloh49:
	adrp	x27, _PG_WAIT_EXTENSION@GOTPAGE
Lloh50:
	ldr	x27, [x27, _PG_WAIT_EXTENSION@GOTPAGEOFF]
Lloh51:
	adrp	x28, _PGC_SIGHUP@GOTPAGE
Lloh52:
	ldr	x28, [x28, _PGC_SIGHUP@GOTPAGEOFF]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x22]
	cbz	w8, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	str	wzr, [x22]
	ldr	w0, [x28]
	bl	_ProcessConfigFile
LBB0_10:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [x23]
	cmp	w8, #0
	b.le	LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	str	xzr, [sp, #8]
	str	wzr, [sp, #4]
	mov	w9, #1000
	mul	w1, w8, w9
	mov	x0, x19
	bl	_TimestampTzPlusMilliseconds
	mov	x20, x0
	bl	_GetCurrentTimestamp
	add	x2, sp, #8
	add	x3, sp, #4
	mov	x1, x20
	bl	_TimestampDifference
	ldr	x8, [sp, #8]
	ldrsw	x9, [sp, #4]
	mov	w10, #19923
	movk	w10, #4194, lsl #16
	mul	x9, x9, x10
	lsr	x10, x9, #63
	asr	x9, x9, #38
	add	w9, w9, w10
	add	x2, x8, w9, sxtw
	cmp	x2, #1
	b.lt	LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x0, [x24]
	ldr	w8, [x25]
Lloh53:
	adrp	x9, _WL_TIMEOUT@GOTPAGE
Lloh54:
	ldr	x9, [x9, _WL_TIMEOUT@GOTPAGEOFF]
Lloh55:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x26]
	orr	w1, w8, w9
	ldr	w3, [x27]
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x0, [x24]
	ldr	w8, [x25]
	ldr	w9, [x26]
	orr	w1, w9, w8
	ldr	w3, [x27]
	mov	x2, #-1
LBB0_14:                                ;   in Loop: Header=BB0_8 Depth=1
	bl	_WaitLatch
	ldr	x0, [x24]
	bl	_ResetLatch
	ldr	w8, [x21]
	cbz	w8, LBB0_8
	b	LBB0_6
LBB0_15:                                ;   in Loop: Header=BB0_8 Depth=1
	bl	_GetCurrentTimestamp
	mov	x19, x0
	mov	w0, #1
	mov	w1, #0
	bl	_apw_dump_now
	ldr	w8, [x21]
	cbz	w8, LBB0_8
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh51, Lloh52
	.loh AdrpLdrGot	Lloh49, Lloh50
	.loh AdrpLdrGot	Lloh47, Lloh48
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.cfi_endproc
                                        ; -- End function
	.comm	_SIGTERM,4,2                    ; @SIGTERM
	.comm	_apw_sigterm_handler,4,2        ; @apw_sigterm_handler
	.comm	_SIGHUP,4,2                     ; @SIGHUP
	.comm	_apw_sighup_handler,4,2         ; @apw_sighup_handler
	.comm	_SIGUSR1,4,2                    ; @SIGUSR1
	.comm	_procsignal_sigusr1_handler,4,2 ; @procsignal_sigusr1_handler
	.comm	_apw_detach_shmem,4,2           ; @apw_detach_shmem
	.comm	_apw_state,8,3                  ; @apw_state
	.comm	_LW_EXCLUSIVE,4,2               ; @LW_EXCLUSIVE
	.comm	_InvalidPid,8,3                 ; @InvalidPid
	.comm	_LOG,4,2                        ; @LOG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"autoprewarm worker is already running under PID %lu"

	.comm	_MyProcPid,8,3                  ; @MyProcPid
	.comm	_got_sigterm,4,2                ; @got_sigterm
	.comm	_got_sighup,4,2                 ; @got_sighup
	.comm	_PGC_SIGHUP,4,2                 ; @PGC_SIGHUP
	.comm	_autoprewarm_interval,4,2       ; @autoprewarm_interval
	.comm	_MyProc,8,3                     ; @MyProc
	.comm	_WL_LATCH_SET,4,2               ; @WL_LATCH_SET
	.comm	_WL_EXIT_ON_PM_DEATH,4,2        ; @WL_EXIT_ON_PM_DEATH
	.comm	_PG_WAIT_EXTENSION,4,2          ; @PG_WAIT_EXTENSION
	.comm	_WL_TIMEOUT,4,2                 ; @WL_TIMEOUT
.subsections_via_symbols
