	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_autoprewarm_database_main      ## -- Begin function autoprewarm_database_main
	.p2align	4, 0x90
_autoprewarm_database_main:             ## @autoprewarm_database_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	_die@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_pqsignal
	xorl	%eax, %eax
	callq	_BackgroundWorkerUnblockSignals
	xorl	%eax, %eax
	callq	_apw_init_shmem
	movq	_apw_state@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movl	16(%rax), %edi
	callq	_dsm_attach
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str(%rip), %rdi
	callq	_errmsg
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_2:
	movq	(%rbx), %rax
	movl	12(%rax), %edi
	movq	_InvalidOid@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_BackgroundWorkerInitializeConnectionByOid
	movq	%r15, %rdi
	callq	_dsm_segment_address
	movq	(%rbx), %rcx
	movslq	(%rcx), %r14
	cmpl	4(%rcx), %r14d
	jge	LBB0_32
## %bb.3:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	leaq	(%r14,%r14,4), %rcx
	leaq	(%rax,%rcx,8), %rax
	xorl	%r12d, %r12d
	xorl	%ecx, %ecx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_30:                                ##   in Loop: Header=BB0_6 Depth=1
	xorl	%eax, %eax
	callq	_CommitTransactionCommand
LBB0_31:                                ##   in Loop: Header=BB0_6 Depth=1
	xorl	%r12d, %r12d
LBB0_4:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	_apw_state@GOTPCREL(%rip), %rbx
LBB0_5:                                 ##   in Loop: Header=BB0_6 Depth=1
	incq	%r14
	movq	(%rbx), %rax
	movslq	4(%rax), %rcx
	leaq	40(%r15), %rax
	cmpq	%rcx, %r14
	jge	LBB0_33
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %r13
	movq	%rax, %r15
	xorl	%eax, %eax
	callq	_have_free_buffer
	testq	%rax, %rax
	je	LBB0_33
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	xorl	%eax, %eax
	callq	_CHECK_FOR_INTERRUPTS
	testq	%r13, %r13
	je	LBB0_15
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	(%r13), %rax
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpq	(%r15), %rax
	jne	LBB0_33
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	8(%r13), %rax
	movq	8(%r15), %rcx
	cmpq	%rcx, %rax
	je	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=1
	testq	%r12, %r12
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	_AccessShareLock@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_relation_close
	xorl	%eax, %eax
	callq	_CommitTransactionCommand
	movq	8(%r13), %rax
	movl	$0, %r12d
	cmpq	8(%r15), %rax
	je	LBB0_31
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_6 Depth=1
	cmpq	%rcx, %rax
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_6 Depth=1
	testq	%r12, %r12
	jne	LBB0_20
	jmp	LBB0_31
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_6 Depth=1
	xorl	%edi, %edi
	testq	%r12, %r12
	sete	%dil
	callq	_Assert
	xorl	%eax, %eax
	callq	_StartTransactionCommand
	movl	32(%r15), %edi
	movq	8(%r15), %rsi
	callq	_RelidByRelfilenode
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_OidIsValid
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	_AccessShareLock@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_try_relation_open
	movq	%rax, %r12
LBB0_17:                                ##   in Loop: Header=BB0_6 Depth=1
	testq	%r12, %r12
	je	LBB0_30
## %bb.18:                              ##   in Loop: Header=BB0_6 Depth=1
	testq	%r13, %r13
	je	LBB0_21
## %bb.19:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	8(%r13), %rax
	cmpq	8(%r15), %rax
	jne	LBB0_21
LBB0_20:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	16(%r13), %rax
	cmpq	16(%r15), %rax
	je	LBB0_27
LBB0_21:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	%r12, %rdi
	callq	_RelationOpenSmgr
	movq	16(%r15), %rsi
	movq	_InvalidForkNumber@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jle	LBB0_25
## %bb.22:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	_MAX_FORKNUM@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jg	LBB0_25
## %bb.23:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	(%r12), %edi
	callq	_smgrexists
	testq	%rax, %rax
	je	LBB0_25
## %bb.24:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	16(%r15), %rsi
	movq	%r12, %rdi
	callq	_RelationGetNumberOfBlocksInFork
	jmp	LBB0_26
	.p2align	4, 0x90
LBB0_25:                                ##   in Loop: Header=BB0_6 Depth=1
	xorl	%eax, %eax
LBB0_26:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
LBB0_27:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	24(%r15), %rdx
	cmpq	-48(%rbp), %rdx                 ## 8-byte Folded Reload
	jge	LBB0_4
## %bb.28:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	16(%r15), %rsi
	movq	_RBM_NORMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	xorl	%r8d, %r8d
	callq	_ReadBufferExtended
	movl	%eax, %r13d
	movl	%eax, %edi
	callq	_BufferIsValid
	testq	%rax, %rax
	movq	_apw_state@GOTPCREL(%rip), %rbx
	je	LBB0_5
## %bb.29:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	(%rbx), %rax
	incl	8(%rax)
	movl	%r13d, %edi
	callq	_ReleaseBuffer
	jmp	LBB0_5
LBB0_32:
	movq	%r15, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dsm_detach                     ## TAILCALL
LBB0_33:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_dsm_detach
	testq	%r12, %r12
	je	LBB0_35
## %bb.34:
	movq	_AccessShareLock@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_relation_close
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_CommitTransactionCommand       ## TAILCALL
LBB0_35:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SIGTERM,4,2                    ## @SIGTERM
	.comm	_die,4,2                        ## @die
	.comm	_apw_state,8,3                  ## @apw_state
	.comm	_ERROR,4,2                      ## @ERROR
	.comm	_ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE,4,2 ## @ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not map dynamic shared memory segment"

	.comm	_InvalidOid,4,2                 ## @InvalidOid
	.comm	_AccessShareLock,4,2            ## @AccessShareLock
	.comm	_InvalidForkNumber,8,3          ## @InvalidForkNumber
	.comm	_MAX_FORKNUM,8,3                ## @MAX_FORKNUM
	.comm	_RBM_NORMAL,4,2                 ## @RBM_NORMAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_autoprewarm_database_main      ; -- Begin function autoprewarm_database_main
	.p2align	2
_autoprewarm_database_main:             ; @autoprewarm_database_main
	.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
Lloh0:
	adrp	x8, _SIGTERM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SIGTERM@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _die@GOTPAGE
Lloh4:
	ldr	x8, [x8, _die@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_pqsignal
	bl	_BackgroundWorkerUnblockSignals
	bl	_apw_init_shmem
Lloh6:
	adrp	x23, _apw_state@GOTPAGE
Lloh7:
	ldr	x23, [x23, _apw_state@GOTPAGEOFF]
	ldr	x8, [x23]
	ldr	w0, [x8, #16]
	bl	_dsm_attach
	mov	x19, x0
	cbnz	x0, LBB0_2
; %bb.1:
Lloh8:
	adrp	x8, _ERROR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh10:
	ldr	w20, [x8]
Lloh11:
	adrp	x8, _ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_errcode
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x20
	bl	_ereport
LBB0_2:
	ldr	x8, [x23]
	ldr	w0, [x8, #12]
Lloh16:
	adrp	x8, _InvalidOid@GOTPAGE
Lloh17:
	ldr	x8, [x8, _InvalidOid@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_BackgroundWorkerInitializeConnectionByOid
	mov	x0, x19
	bl	_dsm_segment_address
	ldr	x8, [x23]
	ldp	w25, w8, [x8]
                                        ; kill: def $w25 killed $w25 def $x25
	sxtw	x25, w25
	cmp	w25, w8
	b.ge	LBB0_29
; %bb.3:
	mov	x20, #0
	mov	x21, #0
	mov	x28, #0
	mov	w8, #40
	madd	x8, x25, x8, x0
Lloh19:
	adrp	x24, _AccessShareLock@GOTPAGE
Lloh20:
	ldr	x24, [x24, _AccessShareLock@GOTPAGEOFF]
Lloh21:
	adrp	x27, _InvalidForkNumber@GOTPAGE
Lloh22:
	ldr	x27, [x27, _InvalidForkNumber@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	bl	_CommitTransactionCommand
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x25, x25, #1
	ldr	x8, [x23]
	ldrsw	x9, [x8, #4]
	add	x8, x28, #40
	cmp	x25, x9
	b.ge	LBB0_30
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x26, x28
	mov	x28, x8
	bl	_have_free_buffer
	cbz	x0, LBB0_30
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	bl	_CHECK_FOR_INTERRUPTS
	cbz	x26, LBB0_15
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x26]
	cbz	x8, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x9, [x28]
	cmp	x8, x9
	b.ne	LBB0_30
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x26, #8]
	ldr	x9, [x28, #8]
	cmp	x8, x9
	b.eq	LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	cbz	x20, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w1, [x24]
	mov	x0, x20
	bl	_relation_close
	bl	_CommitTransactionCommand
	mov	x20, #0
	ldr	x8, [x26, #8]
	ldr	x9, [x28, #8]
	cmp	x8, x9
	b.eq	LBB0_5
	b	LBB0_15
LBB0_13:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_6 Depth=1
	cbnz	x20, LBB0_20
	b	LBB0_5
LBB0_15:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	x20, #0
	cset	w0, eq
	bl	_Assert
	bl	_StartTransactionCommand
	ldr	w0, [x28, #32]
	ldr	x1, [x28, #8]
	bl	_RelidByRelfilenode
	mov	x22, x0
	bl	_OidIsValid
	cbz	x0, LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w1, [x24]
	mov	x0, x22
	bl	_try_relation_open
	mov	x20, x0
LBB0_17:                                ;   in Loop: Header=BB0_6 Depth=1
	cbz	x20, LBB0_4
; %bb.18:                               ;   in Loop: Header=BB0_6 Depth=1
	cbz	x26, LBB0_21
; %bb.19:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x26, #8]
	ldr	x9, [x28, #8]
	cmp	x8, x9
	b.ne	LBB0_21
LBB0_20:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x26, #16]
	ldr	x9, [x28, #16]
	cmp	x8, x9
	b.eq	LBB0_26
LBB0_21:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x20
	bl	_RelationOpenSmgr
	mov	x21, #0
	ldr	x1, [x28, #16]
	ldr	x8, [x27]
	cmp	x1, x8
	b.le	LBB0_26
; %bb.22:                               ;   in Loop: Header=BB0_6 Depth=1
Lloh23:
	adrp	x8, _MAX_FORKNUM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MAX_FORKNUM@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
	cmp	x1, x8
	b.gt	LBB0_26
; %bb.23:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [x20]
	bl	_smgrexists
	cbz	x0, LBB0_25
; %bb.24:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x1, [x28, #16]
	mov	x0, x20
	bl	_RelationGetNumberOfBlocksInFork
	mov	x21, x0
	b	LBB0_26
LBB0_25:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x21, #0
LBB0_26:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x2, [x28, #24]
	cmp	x2, x21
	b.ge	LBB0_5
; %bb.27:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x1, [x28, #16]
Lloh26:
	adrp	x8, _RBM_NORMAL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _RBM_NORMAL@GOTPAGEOFF]
Lloh28:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x4, #0
	bl	_ReadBufferExtended
	mov	x22, x0
	bl	_BufferIsValid
	cbz	x0, LBB0_5
; %bb.28:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x23]
	ldr	w9, [x8, #8]
	add	w9, w9, #1
	str	w9, [x8, #8]
	mov	x0, x22
	bl	_ReleaseBuffer
	b	LBB0_5
LBB0_29:
	mov	x0, x19
	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
	b	_dsm_detach
LBB0_30:
	mov	x0, x19
	bl	_dsm_detach
	cbz	x20, LBB0_32
; %bb.31:
	ldr	w1, [x24]
	mov	x0, x20
	bl	_relation_close
	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
	b	_CommitTransactionCommand
LBB0_32:
	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	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_SIGTERM,4,2                    ; @SIGTERM
	.comm	_die,4,2                        ; @die
	.comm	_apw_state,8,3                  ; @apw_state
	.comm	_ERROR,4,2                      ; @ERROR
	.comm	_ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE,4,2 ; @ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not map dynamic shared memory segment"

	.comm	_InvalidOid,4,2                 ; @InvalidOid
	.comm	_AccessShareLock,4,2            ; @AccessShareLock
	.comm	_InvalidForkNumber,8,3          ; @InvalidForkNumber
	.comm	_MAX_FORKNUM,8,3                ; @MAX_FORKNUM
	.comm	_RBM_NORMAL,4,2                 ; @RBM_NORMAL
.subsections_via_symbols
