	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pg_file_rename_internal
_pg_file_rename_internal:               ## @pg_file_rename_internal
	.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	%rdx, %rbx
	movq	%rsi, %r14
	xorl	%r13d, %r13d
	xorl	%esi, %esi
	callq	_convert_and_check_filename
	movq	%rax, %r15
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_convert_and_check_filename
	movq	%rax, %r14
	testq	%rbx, %rbx
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_convert_and_check_filename
	movq	%rax, %r13
LBB0_2:
	movq	_W_OK@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_access
	testl	%eax, %eax
	js	LBB0_3
## %bb.5:
	movq	%r14, %rbx
	testq	%r13, %r13
	je	LBB0_8
## %bb.6:
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_access
	movq	%r13, %rbx
	testl	%eax, %eax
	js	LBB0_7
LBB0_8:
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_access
	testl	%eax, %eax
	jns	LBB0_10
## %bb.9:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_11
LBB0_10:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	leaq	L_.str.1(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_errmsg
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_11:
	testq	%r13, %r13
	je	LBB0_19
## %bb.12:
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_rename
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	leaq	L_.str.2(%rip), %rdi
	movq	%r14, %rsi
	movq	%r13, %rdx
	xorl	%eax, %eax
	callq	_errmsg
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_14:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_rename
	movl	$1, %r12d
	testq	%rax, %rax
	je	LBB0_23
## %bb.15:
	movq	_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	leaq	L_.str.2(%rip), %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_errmsg
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ereport
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_rename
	movq	_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	leaq	L_.str.3(%rip), %rdi
	movq	%r13, %rsi
	movq	%r14, %rdx
	jmp	LBB0_18
LBB0_3:
	movq	_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	jmp	LBB0_4
LBB0_19:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_rename
	movl	$1, %r12d
	testq	%rax, %rax
	je	LBB0_23
## %bb.20:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	leaq	L_.str.2(%rip), %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_errmsg
	jmp	LBB0_21
LBB0_7:
	movq	_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
LBB0_4:
	xorl	%eax, %eax
	callq	_errmsg
LBB0_21:
	movl	%ebx, %edi
	jmp	LBB0_22
LBB0_17:
	leaq	L_.str.4(%rip), %rdi
	movq	%r14, %rsi
	movq	%r13, %rdx
LBB0_18:
	xorl	%eax, %eax
	callq	_errmsg
	movl	%r15d, %edi
LBB0_22:
	movl	%eax, %esi
	callq	_ereport
LBB0_23:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_W_OK,4,2                       ## @W_OK
	.comm	_WARNING,4,2                    ## @WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"file \"%s\" is not accessible: %m"

	.comm	_errno,8,3                      ## @errno
	.comm	_ENOENT,8,3                     ## @ENOENT
	.comm	_ERROR,4,2                      ## @ERROR
	.comm	_ERRCODE_DUPLICATE_FILE,4,2     ## @ERRCODE_DUPLICATE_FILE
L_.str.1:                               ## @.str.1
	.asciz	"cannot rename to target file \"%s\""

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

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

	.comm	_ERRCODE_UNDEFINED_FILE,4,2     ## @ERRCODE_UNDEFINED_FILE
L_.str.4:                               ## @.str.4
	.asciz	"renaming \"%s\" to \"%s\" was reverted"

	.no_dead_strip	_pg_file_rename_internal
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pg_file_rename_internal
_pg_file_rename_internal:               ; @pg_file_rename_internal
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x21, x2
	mov	x19, x1
	mov	w1, #0
	bl	_convert_and_check_filename
	mov	x20, x0
	mov	x0, x19
	mov	w1, #0
	bl	_convert_and_check_filename
	mov	x19, x0
	cbz	x21, LBB0_2
; %bb.1:
	mov	x0, x21
	mov	w1, #0
	bl	_convert_and_check_filename
	mov	x21, x0
LBB0_2:
Lloh0:
	adrp	x23, _W_OK@GOTPAGE
Lloh1:
	ldr	x23, [x23, _W_OK@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x20
	bl	_access
	tbnz	w0, #31, LBB0_14
; %bb.3:
	mov	x22, x19
	cbz	x21, LBB0_5
; %bb.4:
	ldr	w1, [x23]
	mov	x0, x19
	bl	_access
	mov	x22, x21
	tbnz	w0, #31, LBB0_17
LBB0_5:
	ldr	w1, [x23]
	mov	x0, x22
	bl	_access
Lloh2:
	adrp	x24, _ERROR@GOTPAGE
Lloh3:
	ldr	x24, [x24, _ERROR@GOTPAGEOFF]
	tbz	w0, #31, LBB0_7
; %bb.6:
Lloh4:
	adrp	x8, _errno@GOTPAGE
Lloh5:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
Lloh7:
	adrp	x9, _ENOENT@GOTPAGE
Lloh8:
	ldr	x9, [x9, _ENOENT@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_8
LBB0_7:
	ldr	w23, [x24]
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x22
	bl	_errmsg
	mov	x1, x0
	mov	x0, x23
	bl	_ereport
LBB0_8:
	cbz	x21, LBB0_15
; %bb.9:
	mov	x0, x19
	mov	x1, x21
	bl	_rename
	cbz	x0, LBB0_11
; %bb.10:
	ldr	w22, [x24]
	bl	_errcode_for_file_access
	str	x21, [sp]
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x19
	bl	_errmsg
	mov	x1, x0
	mov	x0, x22
	bl	_ereport
LBB0_11:
	mov	x0, x20
	mov	x1, x19
	bl	_rename
	cbz	x0, LBB0_22
; %bb.12:
Lloh14:
	adrp	x8, _WARNING@GOTPAGE
Lloh15:
	ldr	x8, [x8, _WARNING@GOTPAGEOFF]
Lloh16:
	ldr	w22, [x8]
	bl	_errcode_for_file_access
	str	x19, [sp]
Lloh17:
	adrp	x0, l_.str.2@PAGE
Lloh18:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x20
	bl	_errmsg
	mov	x1, x0
	mov	x0, x22
	bl	_ereport
	mov	x0, x21
	mov	x1, x19
	bl	_rename
	ldr	w20, [x24]
	cbz	x0, LBB0_19
; %bb.13:
	bl	_errcode_for_file_access
	str	x19, [sp]
Lloh19:
	adrp	x0, l_.str.3@PAGE
Lloh20:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x21
	b	LBB0_20
LBB0_14:
Lloh21:
	adrp	x8, _WARNING@GOTPAGE
Lloh22:
	ldr	x8, [x8, _WARNING@GOTPAGEOFF]
Lloh23:
	ldr	w19, [x8]
	bl	_errcode_for_file_access
Lloh24:
	adrp	x0, l_.str@PAGE
Lloh25:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_errmsg
	mov	x1, x0
	mov	x0, x19
	b	LBB0_18
LBB0_15:
	mov	x0, x20
	mov	x1, x19
	bl	_rename
	cbz	x0, LBB0_22
; %bb.16:
	ldr	w21, [x24]
	bl	_errcode_for_file_access
	str	x19, [sp]
Lloh26:
	adrp	x0, l_.str.2@PAGE
Lloh27:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x20
	bl	_errmsg
	mov	x1, x0
	mov	x0, x21
	b	LBB0_21
LBB0_17:
Lloh28:
	adrp	x8, _WARNING@GOTPAGE
Lloh29:
	ldr	x8, [x8, _WARNING@GOTPAGEOFF]
Lloh30:
	ldr	w20, [x8]
	bl	_errcode_for_file_access
Lloh31:
	adrp	x0, l_.str@PAGE
Lloh32:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_errmsg
	mov	x1, x0
	mov	x0, x20
LBB0_18:
	bl	_ereport
	mov	w0, #0
	b	LBB0_23
LBB0_19:
	str	x21, [sp]
Lloh33:
	adrp	x0, l_.str.4@PAGE
Lloh34:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x19
LBB0_20:
	bl	_errmsg
	mov	x1, x0
	mov	x0, x20
LBB0_21:
	bl	_ereport
LBB0_22:
	mov	w0, #1
LBB0_23:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_W_OK,4,2                       ; @W_OK
	.comm	_WARNING,4,2                    ; @WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"file \"%s\" is not accessible: %m"

	.comm	_errno,8,3                      ; @errno
	.comm	_ENOENT,8,3                     ; @ENOENT
	.comm	_ERROR,4,2                      ; @ERROR
	.comm	_ERRCODE_DUPLICATE_FILE,4,2     ; @ERRCODE_DUPLICATE_FILE
l_.str.1:                               ; @.str.1
	.asciz	"cannot rename to target file \"%s\""

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

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

	.comm	_ERRCODE_UNDEFINED_FILE,4,2     ; @ERRCODE_UNDEFINED_FILE
l_.str.4:                               ; @.str.4
	.asciz	"renaming \"%s\" to \"%s\" was reverted"

	.no_dead_strip	_pg_file_rename_internal
.subsections_via_symbols
