	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function create_tablespace_directories
_create_tablespace_directories:         ## @create_tablespace_directories
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movslq	%esi, %rsi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_psprintf
	movq	%rax, %r14
	movq	_TABLESPACE_VERSION_DIRECTORY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.1(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_psprintf
	movq	%rax, %r15
	movq	_pg_dir_create_mode@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_chmod
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	movq	_ERROR@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r12d
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.2:
	movq	_ERRCODE_UNDEFINED_FILE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str.2(%rip), %rdi
	movq	%rbx, %rsi
	callq	_errmsg
	movq	_InRecovery@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_3
## %bb.4:
	leaq	L_.str.3(%rip), %rdi
	callq	_errhint
	jmp	LBB0_6
LBB0_5:
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	leaq	L_.str.4(%rip), %rdi
	movq	%rbx, %rsi
	callq	_errmsg
LBB0_6:
	movl	%eax, %esi
LBB0_7:
	movl	%r12d, %edi
	callq	_ereport
LBB0_8:
	movq	_InRecovery@GOTPCREL(%rip), %r13
	cmpq	$0, (%r13)
	je	LBB0_13
## %bb.9:
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	callq	_stat
	testq	%rax, %rax
	je	LBB0_10
LBB0_13:
	movq	%r15, %rdi
	callq	_MakePGDirectory
	testq	%rax, %rax
	jns	LBB0_18
## %bb.14:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EEXIST@GOTPCREL(%rip), %rcx
	movq	_ERROR@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r12d
	cmpq	(%rcx), %rax
	jne	LBB0_16
## %bb.15:
	movq	_ERRCODE_OBJECT_IN_USE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_errcode
	leaq	L_.str.6(%rip), %rdi
	jmp	LBB0_17
LBB0_10:
	movl	-48(%rbp), %edi
	callq	_S_ISDIR
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_rmtree
	testl	%eax, %eax
	jne	LBB0_13
## %bb.12:
	movq	_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	leaq	L_.str.5(%rip), %rdi
	movq	%r15, %rsi
	callq	_errmsg
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_ereport
	jmp	LBB0_13
LBB0_16:
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	leaq	L_.str.7(%rip), %rdi
LBB0_17:
	movq	%r15, %rsi
	callq	_errmsg
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_18:
	cmpq	$0, (%r13)
	je	LBB0_20
## %bb.19:
	movq	%r14, %rdi
	callq	_remove_tablespace_symlink
LBB0_20:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_symlink
	testq	%rax, %rax
	jns	LBB0_22
## %bb.21:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	leaq	L_.str.8(%rip), %rdi
	movq	%r14, %rsi
	callq	_errmsg
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_22:
	movq	%r14, %rdi
	callq	_pfree
	movq	%r15, %rdi
	callq	_pfree
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	xorl	%esi, %esi
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pg_tblspc/%u"

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

	.comm	_TABLESPACE_VERSION_DIRECTORY,4,2 ## @TABLESPACE_VERSION_DIRECTORY
	.comm	_pg_dir_create_mode,4,2         ## @pg_dir_create_mode
	.comm	_errno,8,3                      ## @errno
	.comm	_ENOENT,8,3                     ## @ENOENT
	.comm	_ERROR,4,2                      ## @ERROR
	.comm	_ERRCODE_UNDEFINED_FILE,4,2     ## @ERRCODE_UNDEFINED_FILE
L_.str.2:                               ## @.str.2
	.asciz	"directory \"%s\" does not exist"

	.comm	_InRecovery,8,3                 ## @InRecovery
L_.str.3:                               ## @.str.3
	.asciz	"Create this directory for the tablespace before restarting the server."

L_.str.4:                               ## @.str.4
	.asciz	"could not set permissions on directory \"%s\": %m"

	.comm	_WARNING,4,2                    ## @WARNING
L_.str.5:                               ## @.str.5
	.asciz	"some useless files may be left behind in old database directory \"%s\""

	.comm	_EEXIST,8,3                     ## @EEXIST
	.comm	_ERRCODE_OBJECT_IN_USE,4,2      ## @ERRCODE_OBJECT_IN_USE
L_.str.6:                               ## @.str.6
	.asciz	"directory \"%s\" already in use as a tablespace"

L_.str.7:                               ## @.str.7
	.asciz	"could not create directory \"%s\": %m"

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

	.no_dead_strip	_create_tablespace_directories
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function create_tablespace_directories
_create_tablespace_directories:         ; @create_tablespace_directories
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
                                        ; kill: def $w1 killed $w1 def $x1
	mov	x21, x0
	sxtw	x1, w1
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_psprintf
	mov	x19, x0
Lloh2:
	adrp	x8, _TABLESPACE_VERSION_DIRECTORY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TABLESPACE_VERSION_DIRECTORY@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	x8, [sp]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
	bl	_psprintf
	mov	x20, x0
Lloh7:
	adrp	x8, _pg_dir_create_mode@GOTPAGE
Lloh8:
	ldr	x8, [x8, _pg_dir_create_mode@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_chmod
Lloh10:
	adrp	x24, _InRecovery@GOTPAGE
Lloh11:
	ldr	x24, [x24, _InRecovery@GOTPAGEOFF]
Lloh12:
	adrp	x23, _ERROR@GOTPAGE
Lloh13:
	ldr	x23, [x23, _ERROR@GOTPAGEOFF]
Lloh14:
	adrp	x25, _errno@GOTPAGE
Lloh15:
	ldr	x25, [x25, _errno@GOTPAGEOFF]
	cbz	x0, LBB0_7
; %bb.1:
	ldr	x8, [x25]
Lloh16:
	adrp	x9, _ENOENT@GOTPAGE
Lloh17:
	ldr	x9, [x9, _ENOENT@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	ldr	w22, [x23]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.2:
Lloh19:
	adrp	x8, _ERRCODE_UNDEFINED_FILE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ERRCODE_UNDEFINED_FILE@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	bl	_errcode
Lloh22:
	adrp	x0, l_.str.2@PAGE
Lloh23:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x21
	bl	_errmsg
	ldr	x8, [x24]
	cbz	x8, LBB0_22
; %bb.3:
Lloh24:
	adrp	x0, l_.str.3@PAGE
Lloh25:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_errhint
	b	LBB0_5
LBB0_4:
	bl	_errcode_for_file_access
Lloh26:
	adrp	x0, l_.str.4@PAGE
Lloh27:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x21
	bl	_errmsg
LBB0_5:
	mov	x1, x0
LBB0_6:
	mov	x0, x22
	bl	_ereport
LBB0_7:
	ldr	x8, [x24]
	cbz	x8, LBB0_9
; %bb.8:
	add	x1, sp, #8
	mov	x0, x20
	bl	_stat
	cbz	x0, LBB0_12
LBB0_9:
	mov	x0, x20
	bl	_MakePGDirectory
	tbz	x0, #63, LBB0_17
; %bb.10:
	ldr	x8, [x25]
Lloh28:
	adrp	x9, _EEXIST@GOTPAGE
Lloh29:
	ldr	x9, [x9, _EEXIST@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
	ldr	w22, [x23]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.11:
Lloh31:
	adrp	x8, _ERRCODE_OBJECT_IN_USE@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ERRCODE_OBJECT_IN_USE@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
	bl	_errcode
Lloh34:
	adrp	x0, l_.str.6@PAGE
Lloh35:
	add	x0, x0, l_.str.6@PAGEOFF
	b	LBB0_16
LBB0_12:
	ldr	w0, [sp, #8]
	bl	_S_ISDIR
	cbz	x0, LBB0_9
; %bb.13:
	mov	x0, x20
	mov	w1, #1
	bl	_rmtree
	cbnz	w0, LBB0_9
; %bb.14:
Lloh36:
	adrp	x8, _WARNING@GOTPAGE
Lloh37:
	ldr	x8, [x8, _WARNING@GOTPAGEOFF]
Lloh38:
	ldr	w22, [x8]
Lloh39:
	adrp	x0, l_.str.5@PAGE
Lloh40:
	add	x0, x0, l_.str.5@PAGEOFF
	mov	x1, x20
	bl	_errmsg
	mov	x1, x0
	mov	x0, x22
	bl	_ereport
	b	LBB0_9
LBB0_15:
	bl	_errcode_for_file_access
Lloh41:
	adrp	x0, l_.str.7@PAGE
Lloh42:
	add	x0, x0, l_.str.7@PAGEOFF
LBB0_16:
	mov	x1, x20
	bl	_errmsg
	mov	x1, x0
	mov	x0, x22
	bl	_ereport
LBB0_17:
	ldr	x8, [x24]
	cbz	x8, LBB0_19
; %bb.18:
	mov	x0, x19
	bl	_remove_tablespace_symlink
LBB0_19:
	mov	x0, x21
	mov	x1, x19
	bl	_symlink
	tbz	x0, #63, LBB0_21
; %bb.20:
	ldr	w21, [x23]
	bl	_errcode_for_file_access
Lloh43:
	adrp	x0, l_.str.8@PAGE
Lloh44:
	add	x0, x0, l_.str.8@PAGEOFF
	mov	x1, x19
	bl	_errmsg
	mov	x1, x0
	mov	x0, x21
	bl	_ereport
LBB0_21:
	mov	x0, x19
	bl	_pfree
	mov	x0, x20
	bl	_pfree
	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
	add	sp, sp, #96
	ret
LBB0_22:
	mov	w1, #0
	b	LBB0_6
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpAdd	Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pg_tblspc/%u"

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

	.comm	_TABLESPACE_VERSION_DIRECTORY,4,2 ; @TABLESPACE_VERSION_DIRECTORY
	.comm	_pg_dir_create_mode,4,2         ; @pg_dir_create_mode
	.comm	_errno,8,3                      ; @errno
	.comm	_ENOENT,8,3                     ; @ENOENT
	.comm	_ERROR,4,2                      ; @ERROR
	.comm	_ERRCODE_UNDEFINED_FILE,4,2     ; @ERRCODE_UNDEFINED_FILE
l_.str.2:                               ; @.str.2
	.asciz	"directory \"%s\" does not exist"

	.comm	_InRecovery,8,3                 ; @InRecovery
l_.str.3:                               ; @.str.3
	.asciz	"Create this directory for the tablespace before restarting the server."

l_.str.4:                               ; @.str.4
	.asciz	"could not set permissions on directory \"%s\": %m"

	.comm	_WARNING,4,2                    ; @WARNING
l_.str.5:                               ; @.str.5
	.asciz	"some useless files may be left behind in old database directory \"%s\""

	.comm	_EEXIST,8,3                     ; @EEXIST
	.comm	_ERRCODE_OBJECT_IN_USE,4,2      ; @ERRCODE_OBJECT_IN_USE
l_.str.6:                               ; @.str.6
	.asciz	"directory \"%s\" already in use as a tablespace"

l_.str.7:                               ; @.str.7
	.asciz	"could not create directory \"%s\": %m"

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

	.no_dead_strip	_create_tablespace_directories
.subsections_via_symbols
