	.file	"extr_copy_fetch.c_rewind_copy_file_range.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s/%s"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"could not open source file \"%s\": %m"
	.align 8
.LC2:
	.string	"could not seek in source file: %m"
	.section	.rodata.str1.1
.LC3:
	.string	"could not read file \"%s\": %m"
	.section	.rodata.str1.8
	.align 8
.LC4:
	.string	"unexpected EOF while reading file \"%s\""
	.section	.rodata.str1.1
.LC5:
	.string	"could not close file \"%s\": %m"
	.text
	.p2align 4
	.type	rewind_copy_file_range, @function
rewind_copy_file_range:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	.cfi_offset 15, -24
	mov	r15, rdi
	push	r14
	push	r13
	push	r12
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	mov	r12d, edx
	push	rbx
	.cfi_offset 3, -56
	mov	ebx, esi
	sub	rsp, 40
	mov	DWORD PTR -68[rbp], ecx
	mov	rcx, rsp
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR MAXPGPATH[rip]
	mov	rsi, rax
	add	rax, 15
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L3
.L22:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L22
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L23
.L4:
	mov	rcx, QWORD PTR datadir_source[rip]
	mov	r8, r15
	mov	rdi, rsp
	mov	r14, rsp
	lea	rdx, .LC0[rip]
	call	snprintf@PLT
	mov	esi, DWORD PTR O_RDONLY[rip]
	xor	edx, edx
	mov	rdi, rsp
	or	esi, DWORD PTR PG_BINARY[rip]
	call	open@PLT
	mov	r13d, eax
	test	eax, eax
	jns	.L5
	mov	rsi, rsp
	lea	rdi, .LC1[rip]
	xor	eax, eax
	call	pg_fatal@PLT
.L5:
	mov	edx, DWORD PTR SEEK_SET[rip]
	mov	esi, ebx
	mov	edi, r13d
	call	lseek@PLT
	cmp	eax, -1
	je	.L24
.L6:
	mov	esi, DWORD PTR -68[rbp]
	mov	rdi, r15
	call	open_target_file@PLT
	mov	edx, r12d
	sub	edx, ebx
	test	edx, edx
	jg	.L10
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L8:
	je	.L25
.L9:
	mov	edx, r15d
	mov	esi, ebx
	xor	edi, edi
	add	ebx, r15d
	call	write_target_range@PLT
	mov	edx, r12d
	sub	edx, ebx
	test	edx, edx
	jle	.L7
.L10:
	cmp	edx, 4
	mov	eax, 4
	cmovg	edx, eax
	xor	edi, edi
	mov	esi, edi
	mov	edi, r13d
	call	read@PLT
	mov	r15d, eax
	test	eax, eax
	jns	.L8
	mov	rsi, r14
	lea	rdi, .LC3[rip]
	xor	eax, eax
	call	pg_fatal@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L25:
	mov	rsi, r14
	lea	rdi, .LC4[rip]
	xor	eax, eax
	call	pg_fatal@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L7:
	mov	edi, r13d
	call	close@PLT
	test	rax, rax
	jne	.L26
.L1:
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L27
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L26:
	.cfi_restore_state
	mov	rsi, r14
	lea	rdi, .LC5[rip]
	xor	eax, eax
	call	pg_fatal@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L24:
	lea	rdi, .LC2[rip]
	xor	eax, eax
	call	pg_fatal@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L23:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	rewind_copy_file_range, .-rewind_copy_file_range
	.comm	datadir_source,8,8
	.comm	SEEK_SET,4,4
	.comm	PG_BINARY,4,4
	.comm	O_RDONLY,4,4
	.comm	MAXPGPATH,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_copy_fetch.c_rewind_copy_file_range.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%s/%s\000"
	.align	2
.LC1:
	.ascii	"could not open source file \"%s\": %m\000"
	.align	2
.LC2:
	.ascii	"could not seek in source file: %m\000"
	.align	2
.LC3:
	.ascii	"could not read file \"%s\": %m\000"
	.align	2
.LC4:
	.ascii	"unexpected EOF while reading file \"%s\"\000"
	.align	2
.LC5:
	.ascii	"could not close file \"%s\": %m\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	rewind_copy_file_range, %function
rewind_copy_file_range:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #20
	ldr	ip, .L21
	mov	r8, r0
	ldr	r0, [ip]
	mov	r4, r1
	add	r1, r0, #7
	bic	r1, r1, #7
	sub	sp, sp, r1
	mov	r7, sp
	mov	r9, r3
	ldr	r3, .L21+4
	str	r8, [r7], #8
	ldr	ip, .L21+8
	mov	r1, r0
	ldr	r3, [r3]
	mov	r6, r2
	mov	r0, r7
	ldr	r2, .L21+12
	ldr	ip, [ip]
	str	ip, [fp, #-40]
	mov	ip,#0
	bl	snprintf
	ldr	r2, .L21+16
	ldr	r3, .L21+20
	ldr	r1, [r2]
	ldr	r3, [r3]
	mov	r0, r7
	mov	r2, #0
	orr	r1, r1, r3
	bl	open
	subs	r5, r0, #0
	blt	.L16
.L2:
	ldr	r3, .L21+24
	mov	r1, r4
	mov	r0, r5
	ldr	r2, [r3]
	bl	lseek
	cmn	r0, #1
	beq	.L17
.L3:
	mov	r1, r9
	mov	r0, r8
	bl	open_target_file
	sub	r2, r6, r4
	cmp	r2, #0
	ble	.L4
	ldr	r9, .L21+28
	ldr	r8, .L21+32
	b	.L7
.L5:
	beq	.L18
.L6:
	mov	r2, r10
	mov	r1, r4
	mov	r0, #0
	add	r4, r4, r10
	bl	write_target_range
	sub	r2, r6, r4
	cmp	r2, #0
	ble	.L4
.L7:
	cmp	r2, #4
	movge	r2, #4
	mov	r1, #0
	mov	r0, r5
	bl	read
	subs	r10, r0, #0
	bge	.L5
	mov	r1, r7
	mov	r0, r8
	bl	pg_fatal
	b	.L6
.L18:
	mov	r1, r7
	mov	r0, r9
	bl	pg_fatal
	b	.L6
.L4:
	mov	r0, r5
	bl	close
	cmp	r0, #0
	bne	.L19
.L1:
	ldr	r3, .L21+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L20
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L19:
	mov	r1, r7
	ldr	r0, .L21+36
	bl	pg_fatal
	b	.L1
.L16:
	mov	r1, r7
	ldr	r0, .L21+40
	bl	pg_fatal
	b	.L2
.L17:
	ldr	r0, .L21+44
	bl	pg_fatal
	b	.L3
.L20:
	bl	__stack_chk_fail
.L22:
	.align	2
.L21:
	.word	MAXPGPATH
	.word	datadir_source
	.word	.LC6
	.word	.LC0
	.word	O_RDONLY
	.word	PG_BINARY
	.word	SEEK_SET
	.word	.LC4
	.word	.LC3
	.word	.LC5
	.word	.LC1
	.word	.LC2
	.size	rewind_copy_file_range, .-rewind_copy_file_range
	.comm	datadir_source,4,4
	.comm	SEEK_SET,4,4
	.comm	PG_BINARY,4,4
	.comm	O_RDONLY,4,4
	.comm	MAXPGPATH,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
