	.file	"extr_md.c_mdwrite.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"could not write block %u in file \"%s\": %m"
	.align 8
.LC1:
	.string	"could not write block %u in file \"%s\": wrote only %d of %d bytes"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"Check free disk space."
	.text
	.p2align 4
	.globl	mdwrite
	.type	mdwrite, @function
mdwrite:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14d, esi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rcx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, edx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	esi, r12d
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, r8d
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	r9d, DWORD PTR [rdi]
	mov	ecx, DWORD PTR 8[rdi]
	mov	edx, DWORD PTR 12[rdi]
	mov	r8d, DWORD PTR 4[rdi]
	mov	edi, r14d
	call	TRACE_POSTGRESQL_SMGR_MD_WRITE_START@PLT
	mov	ecx, ebx
	mov	edx, r12d
	mov	esi, r14d
	mov	r8d, DWORD PTR EXTENSION_FAIL[rip]
	mov	rdi, rbp
	or	r8d, DWORD PTR EXTENSION_CREATE_RECOVERY[rip]
	call	_mdfd_getseg@PLT
	mov	esi, DWORD PTR RELSEG_SIZE[rip]
	mov	edi, DWORD PTR BLCKSZ[rip]
	mov	r15, rax
	mov	eax, r12d
	cdq
	idiv	esi
	imul	esi, edi
	imul	edx, edi
	cmp	esi, edx
	mov	DWORD PTR 12[rsp], edx
	setg	dil
	movzx	edi, dil
	call	Assert@PLT
	mov	ecx, DWORD PTR 12[rsp]
	mov	edi, DWORD PTR [r15]
	mov	rsi, r13
	mov	r8d, DWORD PTR WAIT_EVENT_DATA_FILE_WRITE[rip]
	mov	edx, DWORD PTR BLCKSZ[rip]
	call	FileWrite@PLT
	mov	edx, DWORD PTR 12[rbp]
	mov	ecx, DWORD PTR 8[rbp]
	mov	esi, r12d
	mov	r13d, eax
	mov	eax, DWORD PTR BLCKSZ[rip]
	mov	r9d, DWORD PTR 0[rbp]
	mov	edi, r14d
	mov	r8d, DWORD PTR 4[rbp]
	push	rax
	.cfi_def_cfa_offset 88
	push	r13
	.cfi_def_cfa_offset 96
	call	TRACE_POSTGRESQL_SMGR_MD_WRITE_DONE@PLT
	cmp	DWORD PTR BLCKSZ[rip], r13d
	pop	rax
	.cfi_def_cfa_offset 88
	pop	rdx
	.cfi_def_cfa_offset 80
	je	.L2
	test	r13d, r13d
	js	.L9
.L3:
	mov	edi, DWORD PTR ERRCODE_DISK_FULL[rip]
	call	errcode@PLT
	mov	r8d, DWORD PTR BLCKSZ[rip]
	mov	edi, DWORD PTR [r15]
	mov	DWORD PTR 12[rsp], r8d
	call	FilePathName@PLT
	mov	r8d, DWORD PTR 12[rsp]
	mov	esi, r12d
	mov	ecx, r13d
	mov	edx, eax
	lea	rdi, .LC1[rip]
	xor	eax, eax
	call	errmsg@PLT
	lea	rdi, .LC2[rip]
	call	errhint@PLT
	mov	edi, DWORD PTR ERROR[rip]
	mov	esi, eax
	call	ereport@PLT
.L2:
	test	ebx, ebx
	je	.L10
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	rdi, rbp
	call	SmgrIsTemp@PLT
	test	eax, eax
	jne	.L1
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rdx, r15
	mov	esi, r14d
	mov	rdi, rbp
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	jmp	register_dirty_segment@PLT
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	xor	eax, eax
	call	errcode_for_file_access@PLT
	mov	edi, DWORD PTR [r15]
	call	FilePathName@PLT
	mov	esi, r12d
	lea	rdi, .LC0[rip]
	mov	edx, eax
	xor	eax, eax
	call	errmsg@PLT
	mov	edi, DWORD PTR ERROR[rip]
	mov	esi, eax
	call	ereport@PLT
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	mdwrite, .-mdwrite
	.comm	WAIT_EVENT_DATA_FILE_WRITE,4,4
	.comm	RELSEG_SIZE,4,4
	.comm	EXTENSION_FAIL,4,4
	.comm	EXTENSION_CREATE_RECOVERY,4,4
	.comm	ERROR,4,4
	.comm	ERRCODE_DISK_FULL,4,4
	.comm	BLCKSZ,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_md.c_mdwrite.c"
	.text
	.global	__aeabi_idivmod
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"could not write block %u in file \"%s\": %m\000"
	.align	2
.LC1:
	.ascii	"could not write block %u in file \"%s\": wrote only"
	.ascii	" %d of %d bytes\000"
	.align	2
.LC2:
	.ascii	"Check free disk space.\000"
	.text
	.align	2
	.global	mdwrite
	.syntax unified
	.arm
	.fpu softvfp
	.type	mdwrite, %function
mdwrite:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r2
	mov	r7, r1
	mov	r4, r0
	sub	sp, sp, #20
	mov	fp, r3
	ldm	r0, {r2, r3}
	str	r2, [sp, #4]
	str	r3, [sp]
	ldr	r3, [r0, #8]
	ldr	r2, [r0, #12]
	mov	r1, r5
	mov	r0, r7
	ldr	r10, [sp, #56]
	bl	TRACE_POSTGRESQL_SMGR_MD_WRITE_START
	ldr	r2, .L11
	ldr	r3, .L11+4
	ldr	r1, [r2]
	ldr	r3, [r3]
	mov	r2, r5
	orr	r3, r3, r1
	str	r3, [sp]
	mov	r1, r7
	mov	r3, r10
	mov	r0, r4
	bl	_mdfd_getseg
	ldr	r3, .L11+8
	mov	r9, r0
	ldr	r6, [r3]
	mov	r0, r5
	mov	r1, r6
	bl	__aeabi_idivmod
	ldr	r8, .L11+12
	ldr	r3, [r8]
	mul	r0, r3, r6
	mul	r6, r3, r1
	cmp	r0, r6
	movle	r0, #0
	movgt	r0, #1
	bl	Assert
	ldr	r3, .L11+16
	mov	r1, fp
	ldr	r2, [r3]
	ldr	r0, [r9]
	mov	r3, r6
	str	r2, [sp]
	ldr	r2, [r8]
	bl	FileWrite
	ldm	r4, {r2, r3}
	mov	r6, r0
	ldr	ip, [r8]
	str	r0, [sp, #8]
	str	r2, [sp, #4]
	str	r3, [sp]
	ldr	r3, [r4, #8]
	ldr	r2, [r4, #12]
	mov	r1, r5
	mov	r0, r7
	str	ip, [sp, #12]
	bl	TRACE_POSTGRESQL_SMGR_MD_WRITE_DONE
	ldr	r3, [r8]
	cmp	r3, r6
	beq	.L2
	ldr	r3, .L11+20
	cmp	r6, #0
	ldr	fp, [r3]
	blt	.L9
.L3:
	ldr	r3, .L11+24
	ldr	r0, [r3]
	bl	errcode
	ldr	r0, [r9]
	bl	FilePathName
	ldr	r3, [r8]
	mov	r2, r0
	mov	r1, r5
	str	r3, [sp]
	ldr	r0, .L11+28
	mov	r3, r6
	bl	errmsg
	ldr	r0, .L11+32
	bl	errhint
	mov	r1, r0
	mov	r0, fp
	bl	ereport
.L2:
	cmp	r10, #0
	beq	.L10
.L1:
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L10:
	mov	r0, r4
	bl	SmgrIsTemp
	cmp	r0, #0
	bne	.L1
	mov	r2, r9
	mov	r1, r7
	mov	r0, r4
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	register_dirty_segment
.L9:
	bl	errcode_for_file_access
	ldr	r0, [r9]
	bl	FilePathName
	mov	r1, r5
	mov	r2, r0
	ldr	r0, .L11+36
	bl	errmsg
	mov	r1, r0
	mov	r0, fp
	bl	ereport
	ldr	r3, .L11+20
	ldr	fp, [r3]
	b	.L3
.L12:
	.align	2
.L11:
	.word	EXTENSION_CREATE_RECOVERY
	.word	EXTENSION_FAIL
	.word	RELSEG_SIZE
	.word	BLCKSZ
	.word	WAIT_EVENT_DATA_FILE_WRITE
	.word	ERROR
	.word	ERRCODE_DISK_FULL
	.word	.LC1
	.word	.LC2
	.word	.LC0
	.size	mdwrite, .-mdwrite
	.comm	WAIT_EVENT_DATA_FILE_WRITE,4,4
	.comm	RELSEG_SIZE,4,4
	.comm	EXTENSION_FAIL,4,4
	.comm	EXTENSION_CREATE_RECOVERY,4,4
	.comm	ERROR,4,4
	.comm	ERRCODE_DISK_FULL,4,4
	.comm	BLCKSZ,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
