	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_WriteRecoveryConfig            ## -- Begin function WriteRecoveryConfig
	.p2align	4, 0x90
_WriteRecoveryConfig:                   ## @WriteRecoveryConfig
	.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	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAXPGPATH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	xorl	%edi, %edi
	testq	%rbx, %rbx
	setne	%dil
	callq	_Assert
	movq	%rbx, %rdi
	callq	_PQserverVersion
	movq	%rax, %r13
	movq	_MINIMUM_VERSION_FOR_RECOVERY_GUC@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	_MAXPGPATH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	cmpq	%r14, %r13
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str.2(%rip), %r8
	cmovlq	%rax, %r8
	leaq	L_.str(%rip), %rdx
	leaq	L_.str.3(%rip), %rax
	leaq	L_.str.4(%rip), %rbx
	cmovlq	%rax, %rbx
	movq	%r15, %rdi
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, %rcx
	callq	_snprintf
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %rbx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	movl	4(%rax), %edi
	movl	$1, %edx
	movq	%rbx, %rcx
	callq	_fwrite
	cmpl	$1, %eax
	jne	LBB0_4
## %bb.5:
	movq	%rbx, %rdi
	callq	_fclose
	cmpq	%r14, %r13
	jl	LBB0_9
## %bb.6:
	movq	_MAXPGPATH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	leaq	L_.str.7(%rip), %r8
	movq	%r15, %rdi
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	callq	_snprintf
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %rdi
	callq	_fclose
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_11
## %bb.10:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	leaq	L_.str.5(%rip), %rdi
	jmp	LBB0_2
LBB0_4:
	leaq	L_.str.6(%rip), %rdi
	jmp	LBB0_2
LBB0_11:
	callq	___stack_chk_fail
LBB0_7:
	leaq	L_.str.8(%rip), %rdi
LBB0_2:
	movq	%r15, %rsi
	callq	_pg_log_error
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_MAXPGPATH,4,2                  ## @MAXPGPATH
	.comm	_MINIMUM_VERSION_FOR_RECOVERY_GUC,8,3 ## @MINIMUM_VERSION_FOR_RECOVERY_GUC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s/%s"

L_.str.1:                               ## @.str.1
	.asciz	"recovery.conf"

L_.str.2:                               ## @.str.2
	.asciz	"postgresql.auto.conf"

L_.str.3:                               ## @.str.3
	.asciz	"a"

L_.str.4:                               ## @.str.4
	.asciz	"w"

L_.str.5:                               ## @.str.5
	.asciz	"could not open file \"%s\": %m"

L_.str.6:                               ## @.str.6
	.asciz	"could not write to file \"%s\": %m"

L_.str.7:                               ## @.str.7
	.asciz	"standby.signal"

L_.str.8:                               ## @.str.8
	.asciz	"could not create file \"%s\": %m"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_WriteRecoveryConfig            ; -- Begin function WriteRecoveryConfig
	.p2align	2
_WriteRecoveryConfig:                   ; @WriteRecoveryConfig
	.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, x2
	mov	x20, x1
	mov	x22, 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	x24, _MAXPGPATH@GOTPAGE
Lloh4:
	ldr	x24, [x24, _MAXPGPATH@GOTPAGEOFF]
	ldr	w8, [x24]
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	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
	cmp	x0, #0
	cset	w0, ne
	bl	_Assert
	mov	x0, x22
	bl	_PQserverVersion
	mov	x22, x0
Lloh7:
	adrp	x8, _MINIMUM_VERSION_FOR_RECOVERY_GUC@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MINIMUM_VERSION_FOR_RECOVERY_GUC@GOTPAGEOFF]
Lloh9:
	ldr	x25, [x8]
	ldr	w1, [x24]
Lloh10:
	adrp	x8, l_.str.2@PAGE
Lloh11:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh12:
	adrp	x9, l_.str.1@PAGE
Lloh13:
	add	x9, x9, l_.str.1@PAGEOFF
	cmp	x0, x25
	csel	x4, x9, x8, lt
Lloh14:
	adrp	x2, l_.str@PAGE
Lloh15:
	add	x2, x2, l_.str@PAGEOFF
Lloh16:
	adrp	x8, l_.str.4@PAGE
Lloh17:
	add	x8, x8, l_.str.4@PAGEOFF
Lloh18:
	adrp	x9, l_.str.3@PAGE
Lloh19:
	add	x9, x9, l_.str.3@PAGEOFF
	csel	x23, x9, x8, lt
	mov	x0, x19
	mov	x3, x20
	bl	_snprintf
	mov	x0, x19
	mov	x1, x23
	bl	_fopen
	cbz	x0, LBB0_7
; %bb.1:
	mov	x23, x0
	ldp	w1, w0, [x21]
	mov	w2, #1
	mov	x3, x23
	bl	_fwrite
	cmp	w0, #1
	b.ne	LBB0_8
; %bb.2:
	mov	x0, x23
	bl	_fclose
	cmp	x22, x25
	b.lt	LBB0_5
; %bb.3:
	ldr	w1, [x24]
Lloh20:
	adrp	x2, l_.str@PAGE
Lloh21:
	add	x2, x2, l_.str@PAGEOFF
Lloh22:
	adrp	x4, l_.str.7@PAGE
Lloh23:
	add	x4, x4, l_.str.7@PAGEOFF
	mov	x0, x19
	mov	x3, x20
	bl	_snprintf
Lloh24:
	adrp	x1, l_.str.4@PAGE
Lloh25:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_fopen
	cbz	x0, LBB0_10
; %bb.4:
	bl	_fclose
LBB0_5:
	ldur	x8, [x29, #-72]
Lloh26:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh27:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.6:
	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_7:
Lloh29:
	adrp	x0, l_.str.5@PAGE
Lloh30:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_11
LBB0_8:
Lloh31:
	adrp	x0, l_.str.6@PAGE
Lloh32:
	add	x0, x0, l_.str.6@PAGEOFF
	b	LBB0_11
LBB0_9:
	bl	___stack_chk_fail
LBB0_10:
Lloh33:
	adrp	x0, l_.str.8@PAGE
Lloh34:
	add	x0, x0, l_.str.8@PAGEOFF
LBB0_11:
	mov	x1, x19
	bl	_pg_log_error
	mov	w0, #1
	bl	_exit
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_MAXPGPATH,4,2                  ; @MAXPGPATH
	.comm	_MINIMUM_VERSION_FOR_RECOVERY_GUC,8,3 ; @MINIMUM_VERSION_FOR_RECOVERY_GUC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s/%s"

l_.str.1:                               ; @.str.1
	.asciz	"recovery.conf"

l_.str.2:                               ; @.str.2
	.asciz	"postgresql.auto.conf"

l_.str.3:                               ; @.str.3
	.asciz	"a"

l_.str.4:                               ; @.str.4
	.asciz	"w"

l_.str.5:                               ; @.str.5
	.asciz	"could not open file \"%s\": %m"

l_.str.6:                               ; @.str.6
	.asciz	"could not write to file \"%s\": %m"

l_.str.7:                               ; @.str.7
	.asciz	"standby.signal"

l_.str.8:                               ; @.str.8
	.asciz	"could not create file \"%s\": %m"

.subsections_via_symbols
