	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function exitArchiveRecovery
_exitArchiveRecovery:                   ## @exitArchiveRecovery
	.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
	movl	%esi, %r15d
	movl	%edi, %ebx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAXFNAMELEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	_ThisTimeLineID@GOTPCREL(%rip), %r12
	xorl	%edi, %edi
	cmpl	%ebx, (%r12)
	setne	%dil
	callq	_Assert
	movq	_InArchiveRecovery@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	movq	_InvalidXLogRecPtr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$1, %esi
	callq	_UpdateMinRecoveryPoint
	movq	_readFile@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	testl	%edi, %edi
	js	LBB0_2
## %bb.1:
	callq	_close
	movl	$-1, (%rbx)
LBB0_2:
	movq	_wal_segment_size@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movl	%r15d, %edi
	callq	_XLByteToPrevSeg
	movl	(%r13), %edx
	movl	%r15d, %edi
	callq	_XLByteToSeg
	movl	$1, -52(%rbp)
	leaq	-52(%rbp), %rsi
	movl	$1, %edx
	callq	_XLogFileInit
	movl	%eax, %edi
	callq	_close
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	movl	(%r12), %edi
	callq	_XLogFileNameP
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_errmsg
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_4:
	movl	(%r12), %esi
	movl	(%r13), %ecx
	movq	%r14, %rdi
	callq	_XLogFileName
	movq	%r14, %rdi
	callq	_XLogArchiveCleanup
	movq	_standby_signal_file_found@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.5:
	movq	_STANDBY_SIGNAL_FILE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_durable_unlink
LBB0_6:
	movq	_recovery_signal_file_found@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_8
## %bb.7:
	movq	_RECOVERY_SIGNAL_FILE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_durable_unlink
LBB0_8:
	movq	_LOG@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_errmsg
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_10
## %bb.9:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAXFNAMELEN,4,2                ## @MAXFNAMELEN
	.comm	_ThisTimeLineID,4,2             ## @ThisTimeLineID
	.comm	_InArchiveRecovery,4,2          ## @InArchiveRecovery
	.comm	_InvalidXLogRecPtr,4,2          ## @InvalidXLogRecPtr
	.comm	_readFile,4,2                   ## @readFile
	.comm	_wal_segment_size,4,2           ## @wal_segment_size
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not close file \"%s\": %m"

	.comm	_standby_signal_file_found,8,3  ## @standby_signal_file_found
	.comm	_STANDBY_SIGNAL_FILE,4,2        ## @STANDBY_SIGNAL_FILE
	.comm	_FATAL,4,2                      ## @FATAL
	.comm	_recovery_signal_file_found,8,3 ## @recovery_signal_file_found
	.comm	_RECOVERY_SIGNAL_FILE,4,2       ## @RECOVERY_SIGNAL_FILE
	.comm	_LOG,4,2                        ## @LOG
L_.str.1:                               ## @.str.1
	.asciz	"archive recovery complete"

	.no_dead_strip	_exitArchiveRecovery
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function exitArchiveRecovery
_exitArchiveRecovery:                   ; @exitArchiveRecovery
	.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
	sub	sp, sp, #16
	mov	x20, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x8, _MAXFNAMELEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAXFNAMELEN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x19, x9, x8
	mov	sp, x19
Lloh8:
	adrp	x21, _ThisTimeLineID@GOTPAGE
Lloh9:
	ldr	x21, [x21, _ThisTimeLineID@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, w0
	cset	w0, ne
	bl	_Assert
Lloh10:
	adrp	x8, _InArchiveRecovery@GOTPAGE
Lloh11:
	ldr	x8, [x8, _InArchiveRecovery@GOTPAGEOFF]
Lloh12:
	str	wzr, [x8]
Lloh13:
	adrp	x8, _InvalidXLogRecPtr@GOTPAGE
Lloh14:
	ldr	x8, [x8, _InvalidXLogRecPtr@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	mov	w23, #1
	mov	w1, #1
	bl	_UpdateMinRecoveryPoint
Lloh16:
	adrp	x22, _readFile@GOTPAGE
Lloh17:
	ldr	x22, [x22, _readFile@GOTPAGEOFF]
	ldr	w0, [x22]
	tbnz	w0, #31, LBB0_2
; %bb.1:
	bl	_close
	mov	w8, #-1
	str	w8, [x22]
LBB0_2:
Lloh18:
	adrp	x22, _wal_segment_size@GOTPAGE
Lloh19:
	ldr	x22, [x22, _wal_segment_size@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x0, x20
	bl	_XLByteToPrevSeg
	ldr	w2, [x22]
	mov	x0, x20
	bl	_XLByteToSeg
	stur	w23, [x29, #-60]
	sub	x1, x29, #60
	mov	w2, #1
	bl	_XLogFileInit
	bl	_close
	cbz	x0, LBB0_4
; %bb.3:
Lloh20:
	adrp	x8, _ERROR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh22:
	ldr	w20, [x8]
	bl	_errcode_for_file_access
	ldr	w0, [x21]
	bl	_XLogFileNameP
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp, #-16]!
Lloh23:
	adrp	x0, l_.str@PAGE
Lloh24:
	add	x0, x0, l_.str@PAGEOFF
	bl	_errmsg
	add	sp, sp, #16
	mov	x1, x0
	mov	x0, x20
	bl	_ereport
LBB0_4:
	ldr	w1, [x21]
	ldr	w3, [x22]
	mov	x0, x19
	bl	_XLogFileName
	mov	x0, x19
	bl	_XLogArchiveCleanup
Lloh25:
	adrp	x8, _standby_signal_file_found@GOTPAGE
Lloh26:
	ldr	x8, [x8, _standby_signal_file_found@GOTPAGEOFF]
Lloh27:
	ldr	x8, [x8]
Lloh28:
	adrp	x19, _FATAL@GOTPAGE
Lloh29:
	ldr	x19, [x19, _FATAL@GOTPAGEOFF]
	cbz	x8, LBB0_6
; %bb.5:
Lloh30:
	adrp	x8, _STANDBY_SIGNAL_FILE@GOTPAGE
Lloh31:
	ldr	x8, [x8, _STANDBY_SIGNAL_FILE@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	_durable_unlink
LBB0_6:
Lloh33:
	adrp	x8, _recovery_signal_file_found@GOTPAGE
Lloh34:
	ldr	x8, [x8, _recovery_signal_file_found@GOTPAGEOFF]
Lloh35:
	ldr	x8, [x8]
	cbz	x8, LBB0_8
; %bb.7:
Lloh36:
	adrp	x8, _RECOVERY_SIGNAL_FILE@GOTPAGE
Lloh37:
	ldr	x8, [x8, _RECOVERY_SIGNAL_FILE@GOTPAGEOFF]
Lloh38:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	_durable_unlink
LBB0_8:
Lloh39:
	adrp	x8, _LOG@GOTPAGE
Lloh40:
	ldr	x8, [x8, _LOG@GOTPAGEOFF]
Lloh41:
	ldr	w19, [x8]
Lloh42:
	adrp	x0, l_.str.1@PAGE
Lloh43:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_errmsg
	mov	x1, x0
	mov	x0, x19
	bl	_ereport
	ldur	x8, [x29, #-56]
Lloh44:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh45:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh46:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	sub	sp, x29, #48
	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
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotStr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_MAXFNAMELEN,4,2                ; @MAXFNAMELEN
	.comm	_ThisTimeLineID,4,2             ; @ThisTimeLineID
	.comm	_InArchiveRecovery,4,2          ; @InArchiveRecovery
	.comm	_InvalidXLogRecPtr,4,2          ; @InvalidXLogRecPtr
	.comm	_readFile,4,2                   ; @readFile
	.comm	_wal_segment_size,4,2           ; @wal_segment_size
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not close file \"%s\": %m"

	.comm	_standby_signal_file_found,8,3  ; @standby_signal_file_found
	.comm	_STANDBY_SIGNAL_FILE,4,2        ; @STANDBY_SIGNAL_FILE
	.comm	_FATAL,4,2                      ; @FATAL
	.comm	_recovery_signal_file_found,8,3 ; @recovery_signal_file_found
	.comm	_RECOVERY_SIGNAL_FILE,4,2       ; @RECOVERY_SIGNAL_FILE
	.comm	_LOG,4,2                        ; @LOG
l_.str.1:                               ; @.str.1
	.asciz	"archive recovery complete"

	.no_dead_strip	_exitArchiveRecovery
.subsections_via_symbols
