	.file	"extr_twophase.c_ReadTwoPhaseFile.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"could not open file \"%s\": %m"
.LC1:
	.string	"could not stat file \"%s\": %m"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC2:
	.string	"incorrect size of file \"%s\": %zu bytes"
	.align 8
.LC3:
	.string	"incorrect size of file \"%s\": %zu byte"
	.align 8
.LC4:
	.string	"incorrect alignment of CRC offset for file \"%s\""
	.section	.rodata.str1.1
.LC5:
	.string	"could not read file \"%s\": %m"
	.section	.rodata.str1.8
	.align 8
.LC6:
	.string	"could not read file \"%s\": read %d of %zu"
	.section	.rodata.str1.1
.LC7:
	.string	"could not close file \"%s\": %m"
	.section	.rodata.str1.8
	.align 8
.LC8:
	.string	"invalid magic number stored in file \"%s\""
	.align 8
.LC9:
	.string	"invalid size stored in file \"%s\""
	.align 8
.LC10:
	.string	"calculated CRC checksum does not match value stored in file \"%s\""
	.text
	.p2align 4
	.type	ReadTwoPhaseFile, @function
ReadTwoPhaseFile:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r14
	push	r13
	push	r12
	push	rbx
	.cfi_offset 14, -24
	.cfi_offset 13, -32
	.cfi_offset 12, -40
	.cfi_offset 3, -48
	mov	ebx, esi
	sub	rsp, 16
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR MAXPGPATH[rip]
	mov	rcx, rsp
	add	rax, 15
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L3
.L33:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L33
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L34
.L4:
	mov	esi, edi
	mov	rdi, rsp
	mov	r12, rsp
	call	TwoPhaseFilePath@PLT
	mov	esi, DWORD PTR O_RDONLY[rip]
	mov	rdi, rsp
	or	esi, DWORD PTR PG_BINARY[rip]
	call	OpenTransientFile@PLT
	mov	r13d, eax
	test	eax, eax
	jns	.L5
	test	ebx, ebx
	je	.L6
	mov	rax, QWORD PTR ENOENT[rip]
	cmp	QWORD PTR errno[rip], rax
	je	.L18
.L6:
	xor	eax, eax
	call	errcode_for_file_access@PLT
	mov	rsi, r12
	lea	rdi, .LC0[rip]
	xor	eax, eax
	call	errmsg@PLT
	mov	edi, DWORD PTR ERROR[rip]
	mov	esi, eax
	call	ereport@PLT
.L5:
	lea	rsi, -44[rbp]
	mov	edi, r13d
	call	fstat@PLT
	test	rax, rax
	jne	.L35
.L8:
	mov	edi, 16
	movsx	r14, DWORD PTR -44[rbp]
	call	MAXALIGN@PLT
	mov	edi, 4
	mov	ebx, eax
	call	MAXALIGN@PLT
	add	ebx, eax
	movsx	rbx, ebx
	add	rbx, 4
	cmp	r14, rbx
	jb	.L9
	mov	ebx, DWORD PTR -44[rbp]
	cmp	ebx, DWORD PTR MaxAllocSize[rip]
	jle	.L10
.L9:
	mov	edi, DWORD PTR ERRCODE_DATA_CORRUPTED[rip]
	call	errcode@PLT
	mov	edx, DWORD PTR -44[rbp]
	mov	rcx, r12
	lea	rsi, .LC2[rip]
	lea	rdi, .LC3[rip]
	mov	r8d, edx
	call	errmsg_plural@PLT
	mov	edi, DWORD PTR ERROR[rip]
	mov	esi, eax
	call	ereport@PLT
	mov	ebx, DWORD PTR -44[rbp]
.L10:
	sub	ebx, 4
	mov	edi, ebx
	call	MAXALIGN@PLT
	cmp	eax, ebx
	je	.L11
	mov	edi, DWORD PTR ERRCODE_DATA_CORRUPTED[rip]
	call	errcode@PLT
	mov	rsi, r12
	lea	rdi, .LC4[rip]
	xor	eax, eax
	call	errmsg@PLT
	mov	edi, DWORD PTR ERROR[rip]
	mov	esi, eax
	call	ereport@PLT
.L11:
	mov	edi, DWORD PTR -44[rbp]
	call	palloc@PLT
	mov	edi, DWORD PTR WAIT_EVENT_TWOPHASE_FILE_READ[rip]
	mov	r14, rax
	call	pgstat_report_wait_start@PLT
	mov	edx, DWORD PTR -44[rbp]
	mov	rsi, r14
	mov	edi, r13d
	call	read@PLT
	mov	ecx, DWORD PTR -44[rbp]
	cmp	ecx, eax
	je	.L12
	test	eax, eax
	js	.L36
	mov	edx, eax
	mov	rsi, r12
	lea	rdi, .LC6[rip]
	xor	eax, eax
	call	errmsg@PLT
	mov	edi, DWORD PTR ERROR[rip]
	mov	esi, eax
	call	ereport@PLT
.L12:
	xor	eax, eax
	call	pgstat_report_wait_end@PLT
	mov	edi, r13d
	call	CloseTransientFile@PLT
	test	rax, rax
	jne	.L37
.L14:
	mov	rax, QWORD PTR TWOPHASE_MAGIC[rip]
	cmp	QWORD PTR [r14], rax
	je	.L15
	mov	edi, DWORD PTR ERRCODE_DATA_CORRUPTED[rip]
	call	errcode@PLT
	mov	rsi, r12
	lea	rdi, .LC8[rip]
	xor	eax, eax
	call	errmsg@PLT
	mov	edi, DWORD PTR ERROR[rip]
	mov	esi, eax
	call	ereport@PLT
.L15:
	mov	eax, DWORD PTR -44[rbp]
	cmp	DWORD PTR 8[r14], eax
	je	.L16
	mov	edi, DWORD PTR ERRCODE_DATA_CORRUPTED[rip]
	call	errcode@PLT
	mov	rsi, r12
	lea	rdi, .LC9[rip]
	xor	eax, eax
	call	errmsg@PLT
	mov	edi, DWORD PTR ERROR[rip]
	mov	esi, eax
	call	ereport@PLT
.L16:
	xor	r13d, r13d
	mov	edi, r13d
	call	INIT_CRC32C@PLT
	mov	edx, ebx
	mov	rsi, r14
	mov	edi, r13d
	call	COMP_CRC32C@PLT
	movsx	rbx, ebx
	mov	edi, r13d
	call	FIN_CRC32C@PLT
	mov	esi, DWORD PTR [r14+rbx]
	mov	edi, r13d
	call	EQ_CRC32C@PLT
	test	eax, eax
	je	.L38
.L1:
	mov	rax, QWORD PTR -40[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L39
	lea	rsp, -32[rbp]
	mov	rax, r14
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L37:
	.cfi_restore_state
	xor	eax, eax
	call	errcode_for_file_access@PLT
	mov	rsi, r12
	lea	rdi, .LC7[rip]
	xor	eax, eax
	call	errmsg@PLT
	mov	edi, DWORD PTR ERROR[rip]
	mov	esi, eax
	call	ereport@PLT
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L38:
	mov	edi, DWORD PTR ERRCODE_DATA_CORRUPTED[rip]
	call	errcode@PLT
	mov	rsi, r12
	lea	rdi, .LC10[rip]
	xor	eax, eax
	call	errmsg@PLT
	mov	edi, DWORD PTR ERROR[rip]
	mov	esi, eax
	call	ereport@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L35:
	xor	eax, eax
	call	errcode_for_file_access@PLT
	mov	rsi, r12
	lea	rdi, .LC1[rip]
	xor	eax, eax
	call	errmsg@PLT
	mov	edi, DWORD PTR ERROR[rip]
	mov	esi, eax
	call	ereport@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L36:
	xor	eax, eax
	call	errcode_for_file_access@PLT
	mov	rsi, r12
	lea	rdi, .LC5[rip]
	xor	eax, eax
	call	errmsg@PLT
	mov	edi, DWORD PTR ERROR[rip]
	mov	esi, eax
	call	ereport@PLT
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L34:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L18:
	xor	r14d, r14d
	jmp	.L1
.L39:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ReadTwoPhaseFile, .-ReadTwoPhaseFile
	.comm	errno,8,8
	.comm	WAIT_EVENT_TWOPHASE_FILE_READ,4,4
	.comm	TWOPHASE_MAGIC,8,8
	.comm	PG_BINARY,4,4
	.comm	O_RDONLY,4,4
	.comm	MaxAllocSize,4,4
	.comm	MAXPGPATH,4,4
	.comm	ERROR,4,4
	.comm	ERRCODE_DATA_CORRUPTED,4,4
	.comm	ENOENT,8,8
	.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_twophase.c_ReadTwoPhaseFile.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 stat file \"%s\": %m\000"
	.align	2
.LC2:
	.ascii	"incorrect size of file \"%s\": %zu bytes\000"
	.align	2
.LC3:
	.ascii	"incorrect size of file \"%s\": %zu byte\000"
	.align	2
.LC4:
	.ascii	"incorrect alignment of CRC offset for file \"%s\"\000"
	.align	2
.LC5:
	.ascii	"could not read file \"%s\": %m\000"
	.align	2
.LC6:
	.ascii	"could not read file \"%s\": read %d of %zu\000"
	.align	2
.LC7:
	.ascii	"could not close file \"%s\": %m\000"
	.align	2
.LC8:
	.ascii	"invalid magic number stored in file \"%s\"\000"
	.align	2
.LC9:
	.ascii	"invalid size stored in file \"%s\"\000"
	.align	2
.LC10:
	.ascii	"calculated CRC checksum does not match value stored"
	.ascii	" in file \"%s\"\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC11:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ReadTwoPhaseFile, %function
ReadTwoPhaseFile:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, fp, lr}
	add	fp, sp, #24
	sub	sp, sp, #20
	ldr	r3, .L35
	mov	r4, r1
	ldr	r3, [r3]
	mov	r1, r0
	add	r3, r3, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	add	r6, sp, #8
	ldr	r3, .L35+4
	mov	r0, r6
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	mov	r3,#0
	bl	TwoPhaseFilePath
	ldr	r2, .L35+8
	ldr	r3, .L35+12
	ldr	r1, [r2]
	ldr	r3, [r3]
	mov	r0, r6
	orr	r1, r1, r3
	bl	OpenTransientFile
	subs	r7, r0, #0
	bge	.L2
	cmp	r4, #0
	beq	.L3
	ldr	r2, .L35+16
	ldr	r3, .L35+20
	ldr	r2, [r2]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L15
.L3:
	ldr	r3, .L35+24
	ldr	r4, [r3]
	bl	errcode_for_file_access
	mov	r1, r6
	ldr	r0, .L35+28
	bl	errmsg
	mov	r1, r0
	mov	r0, r4
	bl	ereport
.L2:
	mov	r0, r7
	sub	r1, fp, #36
	bl	fstat
	cmp	r0, #0
	bne	.L27
.L5:
	mov	r0, #8
	ldr	r5, [fp, #-36]
	bl	MAXALIGN
	mov	r4, r0
	mov	r0, #4
	bl	MAXALIGN
	add	r4, r4, r0
	add	r4, r4, #4
	cmp	r5, r4
	bcc	.L6
	ldr	r3, .L35+32
	ldr	r5, [fp, #-36]
	ldr	r3, [r3]
	cmp	r5, r3
	ble	.L7
.L6:
	ldr	r2, .L35+36
	ldr	r3, .L35+24
	ldr	r0, [r2]
	ldr	r4, [r3]
	bl	errcode
	ldr	r2, [fp, #-36]
	mov	r3, r6
	ldr	r1, .L35+40
	str	r2, [sp]
	ldr	r0, .L35+44
	bl	errmsg_plural
	mov	r1, r0
	mov	r0, r4
	bl	ereport
	ldr	r5, [fp, #-36]
.L7:
	sub	r5, r5, #4
	mov	r0, r5
	bl	MAXALIGN
	cmp	r0, r5
	bne	.L28
.L8:
	ldr	r0, [fp, #-36]
	bl	palloc
	mov	r4, r0
	ldr	r3, .L35+48
	ldr	r0, [r3]
	bl	pgstat_report_wait_start
	mov	r1, r4
	mov	r0, r7
	ldr	r2, [fp, #-36]
	bl	read
	ldr	r3, [fp, #-36]
	cmp	r3, r0
	beq	.L9
	ldr	r1, .L35+24
	cmp	r0, #0
	ldr	r8, [r1]
	blt	.L29
	mov	r2, r0
	mov	r1, r6
	ldr	r0, .L35+52
	bl	errmsg
	mov	r1, r0
	mov	r0, r8
	bl	ereport
.L9:
	bl	pgstat_report_wait_end
	mov	r0, r7
	bl	CloseTransientFile
	cmp	r0, #0
	bne	.L30
.L11:
	ldr	r3, .L35+56
	ldr	r2, [r4]
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L31
	ldr	r2, [r4, #4]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	bne	.L32
.L13:
	mov	r7, #0
	mov	r0, r7
	bl	INIT_CRC32C
	mov	r2, r5
	mov	r1, r4
	mov	r0, r7
	bl	COMP_CRC32C
	mov	r0, r7
	bl	FIN_CRC32C
	mov	r0, r7
	ldr	r1, [r4, r5]
	bl	EQ_CRC32C
	cmp	r0, r7
	beq	.L33
.L1:
	ldr	r3, .L35+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L34
	mov	r0, r4
	sub	sp, fp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, fp, pc}
.L32:
	ldr	r2, .L35+36
	ldr	r3, .L35+24
	ldr	r0, [r2]
	ldr	r7, [r3]
	bl	errcode
	mov	r1, r6
	ldr	r0, .L35+60
	bl	errmsg
	mov	r1, r0
	mov	r0, r7
	bl	ereport
	b	.L13
.L31:
	ldr	r2, .L35+36
	ldr	r3, .L35+24
	ldr	r0, [r2]
	ldr	r7, [r3]
	bl	errcode
	mov	r1, r6
	ldr	r0, .L35+64
	bl	errmsg
	mov	r1, r0
	mov	r0, r7
	bl	ereport
	ldr	r2, [r4, #4]
	ldr	r3, [fp, #-36]
	cmp	r2, r3
	beq	.L13
	b	.L32
.L28:
	ldr	r2, .L35+36
	ldr	r3, .L35+24
	ldr	r0, [r2]
	ldr	r4, [r3]
	bl	errcode
	mov	r1, r6
	ldr	r0, .L35+68
	bl	errmsg
	mov	r1, r0
	mov	r0, r4
	bl	ereport
	b	.L8
.L29:
	bl	errcode_for_file_access
	mov	r1, r6
	ldr	r0, .L35+72
	bl	errmsg
	mov	r1, r0
	mov	r0, r8
	bl	ereport
	b	.L9
.L30:
	ldr	r3, .L35+24
	ldr	r7, [r3]
	bl	errcode_for_file_access
	mov	r1, r6
	ldr	r0, .L35+76
	bl	errmsg
	mov	r1, r0
	mov	r0, r7
	bl	ereport
	b	.L11
.L27:
	ldr	r3, .L35+24
	ldr	r4, [r3]
	bl	errcode_for_file_access
	mov	r1, r6
	ldr	r0, .L35+80
	bl	errmsg
	mov	r1, r0
	mov	r0, r4
	bl	ereport
	b	.L5
.L33:
	ldr	r2, .L35+36
	ldr	r3, .L35+24
	ldr	r0, [r2]
	ldr	r5, [r3]
	bl	errcode
	mov	r1, r6
	ldr	r0, .L35+84
	bl	errmsg
	mov	r1, r0
	mov	r0, r5
	bl	ereport
	b	.L1
.L15:
	mov	r4, #0
	b	.L1
.L34:
	bl	__stack_chk_fail
.L36:
	.align	2
.L35:
	.word	MAXPGPATH
	.word	.LC11
	.word	O_RDONLY
	.word	PG_BINARY
	.word	errno
	.word	ENOENT
	.word	ERROR
	.word	.LC0
	.word	MaxAllocSize
	.word	ERRCODE_DATA_CORRUPTED
	.word	.LC2
	.word	.LC3
	.word	WAIT_EVENT_TWOPHASE_FILE_READ
	.word	.LC6
	.word	TWOPHASE_MAGIC
	.word	.LC9
	.word	.LC8
	.word	.LC4
	.word	.LC5
	.word	.LC7
	.word	.LC1
	.word	.LC10
	.size	ReadTwoPhaseFile, .-ReadTwoPhaseFile
	.comm	errno,4,4
	.comm	WAIT_EVENT_TWOPHASE_FILE_READ,4,4
	.comm	TWOPHASE_MAGIC,4,4
	.comm	PG_BINARY,4,4
	.comm	O_RDONLY,4,4
	.comm	MaxAllocSize,4,4
	.comm	MAXPGPATH,4,4
	.comm	ERROR,4,4
	.comm	ERRCODE_DATA_CORRUPTED,4,4
	.comm	ENOENT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
