	.file	"119553.c"
	.intel_syntax noprefix
	.text
	.globl	pagesize
	.bss
	.align 4
	.type	pagesize, @object
	.size	pagesize, 4
pagesize:
	.zero	4
	.globl	wbuffer
	.align 32
	.type	wbuffer, @object
	.size	wbuffer, 32768
wbuffer:
	.zero	32768
	.section	.rodata
.LC0:
	.string	"Creating file"
.LC1:
	.string	"Write failed"
.LC2:
	.string	"fsync failed"
.LC3:
	.string	"Mmap failed"
.LC4:
	.string	"Msync failed"
	.text
	.globl	prepareFile
	.type	prepareFile, @function
prepareFile:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, 448
	mov	esi, 578
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], -1
	jne	.L2
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	eax, DWORD PTR -20[rbp]
	jmp	.L3
.L2:
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, 32768
	lea	rsi, wbuffer[rip]
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -16[rbp], eax
	cmp	DWORD PTR -16[rbp], 0
	jns	.L4
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L3
.L4:
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	fsync@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	je	.L5
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L3
.L5:
	mov	eax, DWORD PTR -20[rbp]
	mov	r9d, 0
	mov	r8d, eax
	mov	ecx, 1
	mov	edx, 3
	mov	esi, 32768
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], -1
	jne	.L6
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L3
.L6:
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, 6
	mov	esi, 32768
	mov	rdi, rax
	call	msync@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	je	.L7
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L3
.L7:
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, 32768
	mov	rdi, rax
	call	munmap@PLT
	mov	rax, QWORD PTR -48[rbp]
	mov	edx, DWORD PTR -20[rbp]
	mov	DWORD PTR [rax], edx
	mov	eax, 0
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	prepareFile, .-prepareFile
	.section	.rodata
.LC5:
	.string	"Mmap2 failed"
	.text
	.globl	mapBuffer
	.type	mapBuffer, @function
mapBuffer:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	DWORD PTR -32[rbp], edx
	mov	eax, DWORD PTR pagesize[rip]
	add	eax, eax
	cdqe
	mov	edx, DWORD PTR -28[rbp]
	mov	r9d, 0
	mov	r8d, edx
	mov	ecx, 1
	mov	edx, 3
	mov	rsi, rax
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], -1
	jne	.L9
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L10
.L9:
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR pagesize[rip]
	cdqe
	mov	edx, DWORD PTR pagesize[rip]
	movsx	rcx, edx
	mov	rdx, QWORD PTR -8[rbp]
	lea	rdi, [rcx+rdx]
	mov	edx, DWORD PTR -32[rbp]
	mov	r9d, 0
	mov	r8d, edx
	mov	ecx, 17
	mov	edx, 3
	mov	rsi, rax
	call	mmap@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], -1
	jne	.L11
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L10
.L11:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
	mov	eax, 0
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	mapBuffer, .-mapBuffer
	.section	.rodata
.LC6:
	.string	"write failed"
	.text
	.globl	startIO
	.type	startIO, @function
startIO:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	eax, DWORD PTR pagesize[rip]
	add	eax, eax
	movsx	rdx, eax
	mov	rcx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], -1
	jne	.L13
	lea	rdi, .LC6[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L14
.L13:
	mov	eax, 0
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	startIO, .-startIO
	.section	.rodata
.LC7:
	.string	"A"
.LC8:
	.string	"B"
.LC9:
	.string	"DelayA"
.LC10:
	.string	"DelayB"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 80
	mov	DWORD PTR -52[rbp], edi
	mov	QWORD PTR -64[rbp], rsi
	mov	QWORD PTR -72[rbp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	call	getpagesize@PLT
	mov	DWORD PTR pagesize[rip], eax
	lea	rax, -48[rbp]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	call	prepareFile
	test	eax, eax
	jne	.L16
	lea	rax, -44[rbp]
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	call	prepareFile
	test	eax, eax
	jne	.L16
	lea	rax, -40[rbp]
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	call	prepareFile
	test	eax, eax
	jne	.L16
	lea	rax, -36[rbp]
	mov	rsi, rax
	lea	rdi, .LC10[rip]
	call	prepareFile
	test	eax, eax
	jne	.L16
	mov	edx, DWORD PTR -44[rbp]
	mov	ecx, DWORD PTR -40[rbp]
	lea	rax, -24[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	mapBuffer
	test	eax, eax
	jne	.L16
	mov	edx, DWORD PTR -48[rbp]
	mov	ecx, DWORD PTR -36[rbp]
	lea	rax, -16[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	mapBuffer
	test	eax, eax
	je	.L17
.L16:
	mov	edi, 1
	call	exit@PLT
.L17:
	call	fork@PLT
	mov	DWORD PTR -32[rbp], eax
	cmp	DWORD PTR -32[rbp], 0
	jne	.L18
	mov	rdx, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR -48[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	startIO
	mov	DWORD PTR -28[rbp], eax
	mov	eax, DWORD PTR -28[rbp]
	mov	edi, eax
	call	exit@PLT
.L18:
	cmp	DWORD PTR -32[rbp], -1
	jne	.L19
	mov	edi, 1
	call	exit@PLT
.L19:
	mov	rdx, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR -44[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	startIO
	mov	DWORD PTR -28[rbp], eax
	mov	eax, DWORD PTR -28[rbp]
	mov	edi, eax
	call	exit@PLT
	.cfi_endproc
.LFE9:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"119553.c"
	.text
	.comm	pagesize,4,4
	.comm	wbuffer,32768,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Creating file\000"
	.align	2
.LC1:
	.ascii	"Write failed\000"
	.align	2
.LC2:
	.ascii	"fsync failed\000"
	.align	2
.LC3:
	.ascii	"Mmap failed\000"
	.align	2
.LC4:
	.ascii	"Msync failed\000"
	.text
	.align	2
	.global	prepareFile
	.syntax unified
	.arm
	.fpu softvfp
	.type	prepareFile, %function
prepareFile:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	mov	r2, #448
	ldr	r1, .L8
	ldr	r0, [fp, #-24]
	bl	open
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmn	r3, #1
	bne	.L2
	ldr	r0, .L8+4
	bl	perror
	ldr	r3, [fp, #-20]
	b	.L3
.L2:
	mov	r2, #32768
	ldr	r1, .L8+8
	ldr	r0, [fp, #-20]
	bl	write
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bge	.L4
	ldr	r0, .L8+12
	bl	perror
	mov	r3, #1
	b	.L3
.L4:
	ldr	r0, [fp, #-20]
	bl	fsync
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L5
	ldr	r0, .L8+16
	bl	perror
	mov	r3, #1
	b	.L3
.L5:
	mov	r3, #0
	str	r3, [sp, #4]
	ldr	r3, [fp, #-20]
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #3
	mov	r1, #32768
	mov	r0, #0
	bl	mmap
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L6
	ldr	r0, .L8+20
	bl	perror
	mov	r3, #1
	b	.L3
.L6:
	mov	r2, #6
	mov	r1, #32768
	ldr	r0, [fp, #-8]
	bl	msync
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L7
	ldr	r0, .L8+24
	bl	perror
	mov	r3, #1
	b	.L3
.L7:
	mov	r1, #32768
	ldr	r0, [fp, #-8]
	bl	munmap
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-20]
	str	r2, [r3]
	mov	r3, #0
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	578
	.word	.LC0
	.word	wbuffer
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	prepareFile, .-prepareFile
	.section	.rodata
	.align	2
.LC5:
	.ascii	"Mmap2 failed\000"
	.text
	.align	2
	.global	mapBuffer
	.syntax unified
	.arm
	.fpu softvfp
	.type	mapBuffer, %function
mapBuffer:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	ldr	r3, .L14
	ldr	r3, [r3]
	lsl	r3, r3, #1
	mov	r1, r3
	mov	r3, #0
	str	r3, [sp, #4]
	ldr	r3, [fp, #-20]
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #3
	mov	r0, #0
	bl	mmap
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	bne	.L11
	ldr	r0, .L14+4
	bl	perror
	mov	r3, #1
	b	.L12
.L11:
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-8]
	ldr	r3, .L14
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-8]
	add	r0, r3, r2
	ldr	r3, .L14
	ldr	r3, [r3]
	mov	r1, r3
	mov	r3, #0
	str	r3, [sp, #4]
	ldr	r3, [fp, #-24]
	str	r3, [sp]
	mov	r3, #17
	mov	r2, #3
	bl	mmap
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	bne	.L13
	ldr	r0, .L14+8
	bl	perror
	mov	r3, #1
	b	.L12
.L13:
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	mov	r3, #0
.L12:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	pagesize
	.word	.LC3
	.word	.LC5
	.size	mapBuffer, .-mapBuffer
	.section	.rodata
	.align	2
.LC6:
	.ascii	"write failed\000"
	.text
	.align	2
	.global	startIO
	.syntax unified
	.arm
	.fpu softvfp
	.type	startIO, %function
startIO:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r3, .L19
	ldr	r3, [r3]
	lsl	r3, r3, #1
	mov	r2, r3
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	write
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L17
	ldr	r0, .L19+4
	bl	perror
	mov	r3, #1
	b	.L18
.L17:
	mov	r3, #0
.L18:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	pagesize
	.word	.LC6
	.size	startIO, .-startIO
	.section	.rodata
	.align	2
.LC7:
	.ascii	"A\000"
	.align	2
.LC8:
	.ascii	"B\000"
	.align	2
.LC9:
	.ascii	"DelayA\000"
	.align	2
.LC10:
	.ascii	"DelayB\000"
	.align	2
.LC11:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #56
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	str	r2, [fp, #-56]
	ldr	r3, .L27
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	bl	getpagesize
	mov	r3, r0
	ldr	r2, .L27+4
	str	r3, [r2]
	sub	r3, fp, #40
	mov	r1, r3
	ldr	r0, .L27+8
	bl	prepareFile
	mov	r3, r0
	cmp	r3, #0
	bne	.L22
	sub	r3, fp, #36
	mov	r1, r3
	ldr	r0, .L27+12
	bl	prepareFile
	mov	r3, r0
	cmp	r3, #0
	bne	.L22
	sub	r3, fp, #32
	mov	r1, r3
	ldr	r0, .L27+16
	bl	prepareFile
	mov	r3, r0
	cmp	r3, #0
	bne	.L22
	sub	r3, fp, #28
	mov	r1, r3
	ldr	r0, .L27+20
	bl	prepareFile
	mov	r3, r0
	cmp	r3, #0
	bne	.L22
	ldr	r1, [fp, #-32]
	ldr	r2, [fp, #-36]
	sub	r3, fp, #24
	mov	r0, r3
	bl	mapBuffer
	mov	r3, r0
	cmp	r3, #0
	bne	.L22
	ldr	r1, [fp, #-28]
	ldr	r2, [fp, #-40]
	sub	r3, fp, #20
	mov	r0, r3
	bl	mapBuffer
	mov	r3, r0
	cmp	r3, #0
	beq	.L23
.L22:
	mov	r0, #1
	bl	exit
.L23:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L24
	ldr	r3, [fp, #-40]
	ldr	r2, [fp, #-24]
	mov	r1, r2
	mov	r0, r3
	bl	startIO
	str	r0, [fp, #-12]
	ldr	r0, [fp, #-12]
	bl	exit
.L24:
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	bne	.L25
	mov	r0, #1
	bl	exit
.L25:
	ldr	r3, [fp, #-36]
	ldr	r2, [fp, #-20]
	mov	r1, r2
	mov	r0, r3
	bl	startIO
	str	r0, [fp, #-12]
	ldr	r0, [fp, #-12]
	bl	exit
.L28:
	.align	2
.L27:
	.word	.LC11
	.word	pagesize
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
