	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_durable_rename                 ## -- Begin function durable_rename
	.p2align	4, 0x90
_durable_rename:                        ## @durable_rename
	.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
	movl	%edx, %r12d
	movq	%rsi, %r15
	movq	%rdi, %r13
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	%r12d, %ecx
	callq	_fsync_fname_ext
	movl	$-1, %r14d
	testq	%rax, %rax
	jne	LBB0_14
## %bb.1:
	movq	_PG_BINARY@GOTPCREL(%rip), %rax
	movq	_O_RDWR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	%r15, %rdi
	callq	_OpenTransientFile
	testl	%eax, %eax
	js	LBB0_2
## %bb.6:
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_pg_fsync
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	%ebx, %edi
	callq	_CloseTransientFile
	movq	_errno@GOTPCREL(%rip), %rax
	movl	%r13d, (%rax)
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_4
LBB0_2:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_10
## %bb.3:
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_4
LBB0_8:
	movl	%ebx, %edi
	callq	_CloseTransientFile
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	leaq	L_.str.2(%rip), %rdi
LBB0_4:
	movq	%r15, %rsi
	xorl	%eax, %eax
	callq	_errmsg
LBB0_5:
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_ereport
LBB0_14:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_rename
	testq	%rax, %rax
	js	LBB0_11
## %bb.12:
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	%r12d, %ecx
	callq	_fsync_fname_ext
	testq	%rax, %rax
	jne	LBB0_14
## %bb.13:
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_fsync_parent_path
	negq	%rax
	sbbl	%ebx, %ebx
	movl	%ebx, %r14d
	jmp	LBB0_14
LBB0_11:
	xorl	%eax, %eax
	callq	_errcode_for_file_access
	leaq	L_.str.3(%rip), %rdi
	movq	%r13, %rsi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_errmsg
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_PG_BINARY,4,2                  ## @PG_BINARY
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_errno,4,2                      ## @errno
	.comm	_ENOENT,4,2                     ## @ENOENT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not open file \"%s\": %m"

L_.str.1:                               ## @.str.1
	.asciz	"could not fsync file \"%s\": %m"

L_.str.2:                               ## @.str.2
	.asciz	"could not close file \"%s\": %m"

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

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_durable_rename                 ; -- Begin function durable_rename
	.p2align	2
_durable_rename:                        ; @durable_rename
	.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	x19, x2
	mov	x20, x1
	mov	x21, x0
	mov	w1, #0
	mov	w2, #0
	mov	x3, x19
	bl	_fsync_fname_ext
	cbnz	x0, LBB0_10
; %bb.1:
Lloh0:
	adrp	x8, _PG_BINARY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PG_BINARY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _O_RDWR@GOTPAGE
Lloh4:
	ldr	x9, [x9, _O_RDWR@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	x0, x20
	bl	_OpenTransientFile
	tbnz	w0, #31, LBB0_4
; %bb.2:
	mov	x22, x0
	bl	_pg_fsync
	cbz	x0, LBB0_6
; %bb.3:
Lloh6:
	adrp	x21, _errno@GOTPAGE
Lloh7:
	ldr	x21, [x21, _errno@GOTPAGEOFF]
	ldr	w23, [x21]
	mov	x0, x22
	bl	_CloseTransientFile
	str	w23, [x21]
	bl	_errcode_for_file_access
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_4:
Lloh10:
	adrp	x8, _errno@GOTPAGE
Lloh11:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _ENOENT@GOTPAGE
Lloh14:
	ldr	x9, [x9, _ENOENT@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_12
; %bb.5:
	bl	_errcode_for_file_access
Lloh16:
	adrp	x0, l_.str@PAGE
Lloh17:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_8
LBB0_6:
	mov	x0, x22
	bl	_CloseTransientFile
	cbz	x0, LBB0_12
; %bb.7:
	bl	_errcode_for_file_access
Lloh18:
	adrp	x0, l_.str.2@PAGE
Lloh19:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_8:
	mov	x1, x20
LBB0_9:
	bl	_errmsg
	mov	x1, x0
	mov	x0, x19
	bl	_ereport
LBB0_10:
	mov	w0, #-1
LBB0_11:
	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
LBB0_12:
	mov	x0, x21
	mov	x1, x20
	bl	_rename
	tbnz	x0, #63, LBB0_15
; %bb.13:
	mov	x0, x20
	mov	w1, #0
	mov	w2, #0
	mov	x3, x19
	bl	_fsync_fname_ext
	cbnz	x0, LBB0_10
; %bb.14:
	mov	x0, x20
	mov	x1, x19
	bl	_fsync_parent_path
	cmp	x0, #0
	csetm	w0, ne
	b	LBB0_11
LBB0_15:
	bl	_errcode_for_file_access
	str	x20, [sp]
Lloh20:
	adrp	x0, l_.str.3@PAGE
Lloh21:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x21
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_PG_BINARY,4,2                  ; @PG_BINARY
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_errno,4,2                      ; @errno
	.comm	_ENOENT,4,2                     ; @ENOENT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not open file \"%s\": %m"

l_.str.1:                               ; @.str.1
	.asciz	"could not fsync file \"%s\": %m"

l_.str.2:                               ; @.str.2
	.asciz	"could not close file \"%s\": %m"

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

.subsections_via_symbols
