	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function CreateSlotOnDisk
_CreateSlotOnDisk:                      ## @CreateSlotOnDisk
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	_MAXPGPATH@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movl	4(%r15), %edi
	callq	_NameStr
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movq	%rax, %rdx
	callq	_sprintf
	movl	4(%r15), %edi
	callq	_NameStr
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	movq	%rax, %rdx
	callq	_sprintf
	leaq	-48(%rbp), %rsi
	movq	%r12, %rdi
	callq	_stat
	testq	%rax, %rax
	jne	LBB0_3
## %bb.1:
	movl	-48(%rbp), %edi
	callq	_S_ISDIR
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_rmtree
LBB0_3:
	movq	%r12, %rdi
	callq	_MakePGDirectory
	testq	%rax, %rax
	jns	LBB0_5
## %bb.4:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	leaq	L_.str.2(%rip), %rdi
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_errmsg
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_5:
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_fsync_fname
	movl	$1, (%r15)
	movq	_ERROR@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_SaveSlotToPath
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_rename
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movl	(%rbx), %ebx
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	leaq	L_.str.3(%rip), %rdi
	movq	%r12, %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_errmsg
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_7:
	xorl	%eax, %eax
	callq	_START_CRIT_SECTION
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_fsync_fname
	leaq	L_.str.4(%rip), %rdi
	movl	$1, %esi
	callq	_fsync_fname
	xorl	%eax, %eax
	callq	_END_CRIT_SECTION
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_9
## %bb.8:
	leaq	-32(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAXPGPATH,4,2                  ## @MAXPGPATH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pg_replslot/%s"

L_.str.1:                               ## @.str.1
	.asciz	"pg_replslot/%s.tmp"

	.comm	_ERROR,4,2                      ## @ERROR
L_.str.2:                               ## @.str.2
	.asciz	"could not create directory \"%s\": %m"

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

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

	.no_dead_strip	_CreateSlotOnDisk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CreateSlotOnDisk
_CreateSlotOnDisk:                      ; @CreateSlotOnDisk
	.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	x21, x0
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, _MAXPGPATH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAXPGPATH@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	x10, x8, #15
	and	x12, x10, #0x1fffffff0
	sub	x20, x9, x12
	mov	sp, x20
	mov	x9, x8
Lloh8:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh9:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	sub	x19, x8, x12
	mov	sp, x19
	ldr	w0, [x0, #4]
	bl	_NameStr
	mov	x2, x0
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_sprintf
	ldr	w0, [x21, #4]
	bl	_NameStr
	mov	x2, x0
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_sprintf
	sub	x1, x29, #64
	mov	x0, x20
	bl	_stat
	cbnz	x0, LBB0_3
; %bb.1:
	ldur	w0, [x29, #-64]
	bl	_S_ISDIR
	cbz	x0, LBB0_3
; %bb.2:
	mov	x0, x20
	mov	w1, #1
	bl	_rmtree
LBB0_3:
	mov	x0, x20
	bl	_MakePGDirectory
Lloh14:
	adrp	x23, _ERROR@GOTPAGE
Lloh15:
	ldr	x23, [x23, _ERROR@GOTPAGEOFF]
	tbz	x0, #63, LBB0_5
; %bb.4:
	ldr	w22, [x23]
	bl	_errcode_for_file_access
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x20
	bl	_errmsg
	mov	x1, x0
	mov	x0, x22
	bl	_ereport
LBB0_5:
	mov	w22, #1
	mov	x0, x20
	mov	w1, #1
	bl	_fsync_fname
	str	w22, [x21]
	ldr	w2, [x23]
	mov	x0, x21
	mov	x1, x20
	bl	_SaveSlotToPath
	mov	x0, x20
	mov	x1, x19
	bl	_rename
	cbz	x0, LBB0_7
; %bb.6:
	ldr	w21, [x23]
	bl	_errcode_for_file_access
	str	x19, [sp, #-16]!
Lloh18:
	adrp	x0, l_.str.3@PAGE
Lloh19:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x20
	bl	_errmsg
	add	sp, sp, #16
	mov	x1, x0
	mov	x0, x21
	bl	_ereport
LBB0_7:
	bl	_START_CRIT_SECTION
	mov	x0, x19
	mov	w1, #1
	bl	_fsync_fname
Lloh20:
	adrp	x0, l_.str.4@PAGE
Lloh21:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	w1, #1
	bl	_fsync_fname
	bl	_END_CRIT_SECTION
	ldur	x8, [x29, #-56]
Lloh22:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh23:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.8:
	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_9:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_MAXPGPATH,4,2                  ; @MAXPGPATH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pg_replslot/%s"

l_.str.1:                               ; @.str.1
	.asciz	"pg_replslot/%s.tmp"

	.comm	_ERROR,4,2                      ; @ERROR
l_.str.2:                               ; @.str.2
	.asciz	"could not create directory \"%s\": %m"

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

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

	.no_dead_strip	_CreateSlotOnDisk
.subsections_via_symbols
