	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ensureCleanShutdown
_ensureCleanShutdown:                   ## @ensureCleanShutdown
	.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	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAXPGPATH@GOTPCREL(%rip), %r12
	movl	(%r12), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	leal	(%rbx,%rbx), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	_PG_BACKEND_VERSIONSTR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	movq	%r15, %rcx
	callq	_find_other_exec
	testl	%eax, %eax
	jns	LBB0_7
## %bb.1:
	movl	%eax, %ebx
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%rsp, -64(%rbp)                 ## 8-byte Spill
	movl	(%r12), %r14d
	movq	%r14, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_find_my_exec
	testq	%rax, %rax
	jns	LBB0_3
## %bb.2:
	movq	_progname@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%r14d, %edx
	callq	_strlcpy
LBB0_3:
	movq	_progname@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	cmpl	$-1, %ebx
	je	LBB0_4
## %bb.5:
	leaq	L_.str.2(%rip), %rdi
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_pg_fatal
	jmp	LBB0_6
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%ecx, %edx
	movq	%r12, %rcx
	xorl	%eax, %eax
	callq	_pg_fatal
LBB0_6:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	-64(%rbp), %rsp                 ## 8-byte Reload
	movq	_MAXPGPATH@GOTPCREL(%rip), %r12
LBB0_7:
	leaq	L_.str.3(%rip), %rdi
	movq	%r15, %rsi
	callq	_pg_log_info
	movq	_dry_run@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_10
## %bb.8:
	movl	(%r12), %esi
	addl	%esi, %esi
	movq	_datadir_target@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	movq	_DEVNULL@GOTPCREL(%rip), %rax
	movq	(%rax), %r9
	leaq	L_.str.4(%rip), %rdx
	movq	%r14, %rdi
	movq	%r15, %rcx
	callq	_snprintf
	movq	%r14, %rdi
	callq	_system
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	leaq	L_.str.5(%rip), %rdi
	callq	_pg_log_error
	leaq	L_.str.6(%rip), %rdi
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_pg_fatal
LBB0_10:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_12
## %bb.11:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAXPGPATH,4,2                  ## @MAXPGPATH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"postgres"

	.comm	_PG_BACKEND_VERSIONSTR,4,2      ## @PG_BACKEND_VERSIONSTR
	.comm	_progname,4,2                   ## @progname
L_.str.1:                               ## @.str.1
	.asciz	"The program \"%s\" is needed by %s but was\nnot found in the same directory as \"%s\".\nCheck your installation."

L_.str.2:                               ## @.str.2
	.asciz	"The program \"%s\" was found by \"%s\" but was\nnot the same version as %s.\nCheck your installation."

L_.str.3:                               ## @.str.3
	.asciz	"executing \"%s\" for target server to complete crash recovery"

	.comm	_dry_run,8,3                    ## @dry_run
L_.str.4:                               ## @.str.4
	.asciz	"\"%s\" --single -F -D \"%s\" template1 < \"%s\""

	.comm	_datadir_target,8,3             ## @datadir_target
	.comm	_DEVNULL,8,3                    ## @DEVNULL
L_.str.5:                               ## @.str.5
	.asciz	"postgres single-user mode of target instance failed"

L_.str.6:                               ## @.str.6
	.asciz	"Command was: %s"

	.comm	_MAXCMDLEN,4,2                  ## @MAXCMDLEN
	.no_dead_strip	_ensureCleanShutdown
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ensureCleanShutdown
_ensureCleanShutdown:                   ; @ensureCleanShutdown
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	sub	sp, sp, #16
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x25, _MAXPGPATH@GOTPAGE
Lloh4:
	ldr	x25, [x25, _MAXPGPATH@GOTPAGEOFF]
	ldr	w8, [x25]
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x8, #15
	and	x10, x10, #0x1fffffff0
	sub	x20, x9, x10
	mov	sp, x20
	lsl	w8, w8, #1
	mov	x9, x8
Lloh7:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh8:
	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
Lloh9:
	adrp	x8, _PG_BACKEND_VERSIONSTR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PG_BACKEND_VERSIONSTR@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x20
	bl	_find_other_exec
	tbz	w0, #31, LBB0_7
; %bb.1:
	mov	x22, x0
	mov	x26, sp
	ldr	w24, [x25]
	mov	x9, x24
Lloh14:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh15:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x24, #15
	and	x9, x9, #0x1fffffff0
	sub	x23, x8, x9
	mov	sp, x23
	mov	x0, x21
	mov	x1, x23
	bl	_find_my_exec
Lloh16:
	adrp	x21, _progname@GOTPAGE
Lloh17:
	ldr	x21, [x21, _progname@GOTPAGEOFF]
	tbz	x0, #63, LBB0_3
; %bb.2:
	ldr	w1, [x21]
	mov	x0, x23
	mov	x2, x24
	bl	_strlcpy
LBB0_3:
	ldr	w8, [x21]
	cmn	w22, #1
	b.eq	LBB0_5
; %bb.4:
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	stp	x23, x8, [sp, #-16]!
Lloh18:
	adrp	x0, l_.str.2@PAGE
Lloh19:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_6
LBB0_5:
	stp	x8, x23, [sp, #-16]!
Lloh20:
	adrp	x0, l_.str.1@PAGE
Lloh21:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_6:
Lloh22:
	adrp	x1, l_.str@PAGE
Lloh23:
	add	x1, x1, l_.str@PAGEOFF
	bl	_pg_fatal
	add	sp, sp, #16
	mov	sp, x26
LBB0_7:
Lloh24:
	adrp	x0, l_.str.3@PAGE
Lloh25:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x20
	bl	_pg_log_info
Lloh26:
	adrp	x8, _dry_run@GOTPAGE
Lloh27:
	ldr	x8, [x8, _dry_run@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
	cbnz	x8, LBB0_10
; %bb.8:
	ldr	w8, [x25]
	lsl	w1, w8, #1
Lloh29:
	adrp	x8, _datadir_target@GOTPAGE
Lloh30:
	ldr	x8, [x8, _datadir_target@GOTPAGEOFF]
Lloh31:
	ldr	x4, [x8]
Lloh32:
	adrp	x8, _DEVNULL@GOTPAGE
Lloh33:
	ldr	x8, [x8, _DEVNULL@GOTPAGEOFF]
Lloh34:
	ldr	x5, [x8]
Lloh35:
	adrp	x2, l_.str.4@PAGE
Lloh36:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x0, x19
	mov	x3, x20
	bl	_snprintf
	mov	x0, x19
	bl	_system
	cbz	x0, LBB0_10
; %bb.9:
Lloh37:
	adrp	x0, l_.str.5@PAGE
Lloh38:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_pg_log_error
Lloh39:
	adrp	x0, l_.str.6@PAGE
Lloh40:
	add	x0, x0, l_.str.6@PAGEOFF
	mov	x1, x19
	bl	_pg_fatal
LBB0_10:
	ldur	x8, [x29, #-72]
Lloh41:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh42:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh43:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	sub	sp, x29, #64
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_MAXPGPATH,4,2                  ; @MAXPGPATH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"postgres"

	.comm	_PG_BACKEND_VERSIONSTR,4,2      ; @PG_BACKEND_VERSIONSTR
	.comm	_progname,4,2                   ; @progname
l_.str.1:                               ; @.str.1
	.asciz	"The program \"%s\" is needed by %s but was\nnot found in the same directory as \"%s\".\nCheck your installation."

l_.str.2:                               ; @.str.2
	.asciz	"The program \"%s\" was found by \"%s\" but was\nnot the same version as %s.\nCheck your installation."

l_.str.3:                               ; @.str.3
	.asciz	"executing \"%s\" for target server to complete crash recovery"

	.comm	_dry_run,8,3                    ; @dry_run
l_.str.4:                               ; @.str.4
	.asciz	"\"%s\" --single -F -D \"%s\" template1 < \"%s\""

	.comm	_datadir_target,8,3             ; @datadir_target
	.comm	_DEVNULL,8,3                    ; @DEVNULL
l_.str.5:                               ; @.str.5
	.asciz	"postgres single-user mode of target instance failed"

l_.str.6:                               ; @.str.6
	.asciz	"Command was: %s"

	.comm	_MAXCMDLEN,4,2                  ; @MAXCMDLEN
	.no_dead_strip	_ensureCleanShutdown
.subsections_via_symbols
