	.file	"extr_fd.c_durable_rename.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"could not open file \"%s\": %m"
.LC1:
	.string	"could not fsync file \"%s\": %m"
.LC2:
	.string	"could not close file \"%s\": %m"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC3:
	.string	"could not rename file \"%s\" to \"%s\": %m"
	.text
	.p2align 4
	.globl	durable_rename
	.type	durable_rename, @function
durable_rename:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	ecx, edx
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12d, edx
	xor	edx, edx
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rsi
	xor	esi, esi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	fsync_fname_ext@PLT
	test	rax, rax
	jne	.L13
	mov	esi, DWORD PTR PG_BINARY[rip]
	mov	rdi, rbp
	or	esi, DWORD PTR O_RDWR[rip]
	call	OpenTransientFile@PLT
	mov	r14d, eax
	test	eax, eax
	jns	.L4
	mov	eax, DWORD PTR ENOENT[rip]
	cmp	DWORD PTR errno[rip], eax
	jne	.L16
.L5:
	mov	rsi, rbp
	mov	rdi, r13
	call	rename@PLT
	test	rax, rax
	js	.L17
	xor	edx, edx
	xor	esi, esi
	mov	ecx, r12d
	mov	rdi, rbp
	call	fsync_fname_ext@PLT
	test	rax, rax
	jne	.L13
	mov	esi, r12d
	mov	rdi, rbp
	call	fsync_parent_path@PLT
	test	rax, rax
	setne	al
	movzx	eax, al
	neg	eax
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	edi, eax
	call	pg_fsync@PLT
	test	rax, rax
	jne	.L18
	mov	edi, r14d
	call	CloseTransientFile@PLT
	test	rax, rax
	je	.L5
	xor	eax, eax
	call	errcode_for_file_access@PLT
	mov	rsi, rbp
	lea	rdi, .LC2[rip]
	.p2align 4,,10
	.p2align 3
.L14:
	xor	eax, eax
	call	errmsg@PLT
	mov	edi, r12d
	mov	esi, eax
	call	ereport@PLT
.L13:
	mov	eax, -1
	jmp	.L1
.L17:
	xor	eax, eax
	call	errcode_for_file_access@PLT
	mov	rdx, rbp
	mov	rsi, r13
	xor	eax, eax
	lea	rdi, .LC3[rip]
	call	errmsg@PLT
	mov	edi, r12d
	mov	esi, eax
	call	ereport@PLT
	mov	eax, -1
	jmp	.L1
.L16:
	xor	eax, eax
	call	errcode_for_file_access@PLT
	mov	rsi, rbp
	lea	rdi, .LC0[rip]
	jmp	.L14
.L18:
	mov	edi, r14d
	mov	r13d, DWORD PTR errno[rip]
	call	CloseTransientFile@PLT
	xor	eax, eax
	mov	DWORD PTR errno[rip], r13d
	call	errcode_for_file_access@PLT
	mov	rsi, rbp
	lea	rdi, .LC1[rip]
	jmp	.L14
	.cfi_endproc
.LFE0:
	.size	durable_rename, .-durable_rename
	.comm	errno,4,4
	.comm	PG_BINARY,4,4
	.comm	O_RDWR,4,4
	.comm	ENOENT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_fd.c_durable_rename.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"could not open file \"%s\": %m\000"
	.align	2
.LC1:
	.ascii	"could not fsync file \"%s\": %m\000"
	.align	2
.LC2:
	.ascii	"could not close file \"%s\": %m\000"
	.align	2
.LC3:
	.ascii	"could not rename file \"%s\" to \"%s\": %m\000"
	.text
	.align	2
	.global	durable_rename
	.syntax unified
	.arm
	.fpu softvfp
	.type	durable_rename, %function
durable_rename:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r7, r2
	mov	r2, #0
	mov	r4, r1
	mov	r3, r7
	mov	r1, r2
	mov	r6, r0
	bl	fsync_fname_ext
	cmp	r0, #0
	bne	.L13
	ldr	r2, .L19
	ldr	r3, .L19+4
	ldr	r1, [r2]
	ldr	r3, [r3]
	mov	r0, r4
	orr	r1, r1, r3
	bl	OpenTransientFile
	subs	r5, r0, #0
	bge	.L4
	ldr	r2, .L19+8
	ldr	r3, .L19+12
	ldr	r2, [r2]
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L16
.L5:
	mov	r1, r4
	mov	r0, r6
	bl	rename
	cmp	r0, #0
	blt	.L17
	mov	r2, #0
	mov	r3, r7
	mov	r1, r2
	mov	r0, r4
	bl	fsync_fname_ext
	cmp	r0, #0
	bne	.L13
	mov	r1, r7
	mov	r0, r4
	bl	fsync_parent_path
	subs	r0, r0, #0
	movne	r0, #1
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L4:
	bl	pg_fsync
	cmp	r0, #0
	bne	.L18
	mov	r0, r5
	bl	CloseTransientFile
	cmp	r0, #0
	beq	.L5
	bl	errcode_for_file_access
	mov	r1, r4
	ldr	r0, .L19+16
.L14:
	bl	errmsg
	mov	r1, r0
	mov	r0, r7
	bl	ereport
.L13:
	mvn	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L17:
	bl	errcode_for_file_access
	mov	r2, r4
	mov	r1, r6
	ldr	r0, .L19+20
	bl	errmsg
	mov	r1, r0
	mov	r0, r7
	bl	ereport
	mvn	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L16:
	bl	errcode_for_file_access
	mov	r1, r4
	ldr	r0, .L19+24
	b	.L14
.L18:
	ldr	r6, .L19+8
	mov	r0, r5
	ldr	r5, [r6]
	bl	CloseTransientFile
	str	r5, [r6]
	bl	errcode_for_file_access
	mov	r1, r4
	ldr	r0, .L19+28
	b	.L14
.L20:
	.align	2
.L19:
	.word	PG_BINARY
	.word	O_RDWR
	.word	errno
	.word	ENOENT
	.word	.LC2
	.word	.LC3
	.word	.LC0
	.word	.LC1
	.size	durable_rename, .-durable_rename
	.comm	errno,4,4
	.comm	PG_BINARY,4,4
	.comm	O_RDWR,4,4
	.comm	ENOENT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
