	.file	"690028.c"
	.intel_syntax noprefix
	.text
	.globl	pseudoSharedMem
	.bss
	.align 4
	.type	pseudoSharedMem, @object
	.size	pseudoSharedMem, 4
pseudoSharedMem:
	.zero	4
	.section	.rodata
.LC0:
	.string	"/dev/shm/ipc.demo"
	.align 8
.LC1:
	.string	"process 1: Unable to open file %s\n"
	.align 8
.LC2:
	.string	"process 1: Unable to memory map"
	.text
	.globl	process1
	.type	process1, @function
process1:
.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, 16
	mov	edx, 432
	mov	esi, 66
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -12[rbp]
	mov	edx, 4
	lea	rsi, pseudoSharedMem[rip]
	mov	edi, eax
	call	write@PLT
	cmp	DWORD PTR -12[rbp], -1
	jne	.L2
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L1
.L2:
	mov	eax, DWORD PTR -12[rbp]
	mov	r9d, 0
	mov	r8d, eax
	mov	ecx, 1
	mov	edx, 3
	mov	esi, 4
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	close@PLT
	cmp	QWORD PTR -8[rbp], -1
	jne	.L4
	lea	rdi, .LC2[rip]
	call	puts@PLT
	jmp	.L1
.L4:
	mov	DWORD PTR pseudoSharedMem[rip], 3333
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR [rax], 5555
	mov	edi, 10
	call	sleep@PLT
.L1:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	process1, .-process1
	.section	.rodata
	.align 8
.LC3:
	.string	"process 2: Unable to open file %s\n"
	.align 8
.LC4:
	.string	"process 2: Unable to memory map"
.LC5:
	.string	"*sharedMem = %d\n"
.LC6:
	.string	"pseudoSharedMem = %d\n"
	.text
	.globl	process2
	.type	process2, @function
process2:
.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, 16
	mov	edi, 10
	call	sleep@PLT
	mov	edx, 432
	mov	esi, 66
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], -1
	jne	.L6
	lea	rsi, .LC0[rip]
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L5
.L6:
	mov	eax, DWORD PTR -12[rbp]
	mov	r9d, 0
	mov	r8d, eax
	mov	ecx, 1
	mov	edx, 3
	mov	esi, 4
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR -12[rbp]
	mov	edi, eax
	call	close@PLT
	cmp	QWORD PTR -8[rbp], -1
	jne	.L8
	lea	rdi, .LC4[rip]
	call	puts@PLT
	jmp	.L5
.L8:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR pseudoSharedMem[rip]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	process2, .-process2
	.section	.rodata
.LC7:
	.string	"Fork Failed"
	.text
	.globl	main
	.type	main, @function
main:
.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, 16
	call	fork@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jns	.L10
	lea	rdi, .LC7[rip]
	call	puts@PLT
	jmp	.L11
.L10:
	cmp	DWORD PTR -4[rbp], 0
	jne	.L12
	call	process1
	jmp	.L11
.L12:
	call	process2
.L11:
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	"690028.c"
	.text
	.global	pseudoSharedMem
	.bss
	.align	2
	.type	pseudoSharedMem, %object
	.size	pseudoSharedMem, 4
pseudoSharedMem:
	.space	4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"/dev/shm/ipc.demo\000"
	.align	2
.LC1:
	.ascii	"process 1: Unable to open file %s\012\000"
	.align	2
.LC2:
	.ascii	"process 1: Unable to memory map\000"
	.text
	.align	2
	.global	process1
	.syntax unified
	.arm
	.fpu softvfp
	.type	process1, %function
process1:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	mov	r2, #432
	mov	r1, #66
	ldr	r0, .L5
	bl	open
	str	r0, [fp, #-12]
	mov	r2, #4
	ldr	r1, .L5+4
	ldr	r0, [fp, #-12]
	bl	write
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	bne	.L2
	ldr	r1, .L5
	ldr	r0, .L5+8
	bl	printf
	b	.L1
.L2:
	mov	r3, #0
	str	r3, [sp, #4]
	ldr	r3, [fp, #-12]
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #3
	mov	r1, #4
	mov	r0, #0
	bl	mmap
	str	r0, [fp, #-8]
	ldr	r0, [fp, #-12]
	bl	close
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L4
	ldr	r0, .L5+12
	bl	puts
	b	.L1
.L4:
	ldr	r3, .L5+4
	ldr	r2, .L5+16
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r2, .L5+20
	str	r2, [r3]
	mov	r0, #10
	bl	sleep
.L1:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	.LC0
	.word	pseudoSharedMem
	.word	.LC1
	.word	.LC2
	.word	3333
	.word	5555
	.size	process1, .-process1
	.section	.rodata
	.align	2
.LC3:
	.ascii	"process 2: Unable to open file %s\012\000"
	.align	2
.LC4:
	.ascii	"process 2: Unable to memory map\000"
	.align	2
.LC5:
	.ascii	"*sharedMem = %d\012\000"
	.align	2
.LC6:
	.ascii	"pseudoSharedMem = %d\012\000"
	.text
	.align	2
	.global	process2
	.syntax unified
	.arm
	.fpu softvfp
	.type	process2, %function
process2:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	mov	r0, #10
	bl	sleep
	mov	r2, #432
	mov	r1, #66
	ldr	r0, .L11
	bl	open
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	bne	.L8
	ldr	r1, .L11
	ldr	r0, .L11+4
	bl	printf
	b	.L7
.L8:
	mov	r3, #0
	str	r3, [sp, #4]
	ldr	r3, [fp, #-12]
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #3
	mov	r1, #4
	mov	r0, #0
	bl	mmap
	str	r0, [fp, #-8]
	ldr	r0, [fp, #-12]
	bl	close
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L10
	ldr	r0, .L11+8
	bl	puts
	b	.L7
.L10:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L11+12
	bl	printf
	ldr	r3, .L11+16
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L11+20
	bl	printf
.L7:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC0
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	pseudoSharedMem
	.word	.LC6
	.size	process2, .-process2
	.section	.rodata
	.align	2
.LC7:
	.ascii	"Fork Failed\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L14
	ldr	r0, .L18
	bl	puts
	b	.L15
.L14:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L16
	bl	process1
	b	.L15
.L16:
	bl	process2
.L15:
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC7
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
