	.file	"50129.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"/posix-shared-mem-example"
.LC1:
	.string	"shm_open"
.LC2:
	.string	"Shared Memory accessed"
.LC3:
	.string	"/sem-mutex"
.LC4:
	.string	"sem_open"
.LC5:
	.string	"Mutex Sem Done !"
.LC6:
	.string	"mmap"
.LC7:
	.string	"Memory Mapped"
.LC8:
	.string	"/sem-spool-signal"
.LC9:
	.string	"Spool Done"
.LC10:
	.string	"sem_wait: mutex_sem"
.LC11:
	.string	"sem_post: mutex_sem"
.LC12:
	.string	"sem_post: (spool_signal_sem"
	.align 8
.LC13:
	.string	"\t Process %d incremented The Number\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 64
	mov	DWORD PTR -52[rbp], edi
	mov	QWORD PTR -64[rbp], rsi
	mov	DWORD PTR -36[rbp], 10
	mov	edx, 448
	mov	esi, 130
	lea	rdi, .LC0[rip]
	call	shm_open@PLT
	mov	DWORD PTR -32[rbp], eax
	cmp	DWORD PTR -32[rbp], -1
	jne	.L2
	lea	rdi, .LC1[rip]
	call	error
.L2:
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	ecx, 0
	mov	edx, 432
	mov	esi, 128
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	sem_open@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	jne	.L3
	lea	rdi, .LC4[rip]
	call	error
.L3:
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -32[rbp]
	mov	r9d, 0
	mov	r8d, eax
	mov	ecx, 1
	mov	edx, 3
	mov	esi, 12
	mov	edi, 0
	call	mmap@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], -1
	jne	.L4
	lea	rdi, .LC6[rip]
	call	error
.L4:
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	ecx, 0
	mov	edx, 432
	mov	esi, 128
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	sem_open@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L5
	lea	rdi, .LC4[rip]
	call	error
.L5:
	lea	rdi, .LC9[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 4[rax]
	add	eax, 1
	mov	DWORD PTR -28[rbp], eax
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 4[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	DWORD PTR 4[rax], edx
	jmp	.L6
.L10:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	sem_wait@PLT
	cmp	eax, -1
	jne	.L7
	lea	rdi, .LC10[rip]
	call	error
.L7:
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR [rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR -28[rbp]
	mov	DWORD PTR 8[rax], edx
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	sem_post@PLT
	cmp	eax, -1
	jne	.L8
	lea	rdi, .LC11[rip]
	call	error
.L8:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	sem_post@PLT
	cmp	eax, -1
	jne	.L9
	lea	rdi, .LC12[rip]
	call	error
.L9:
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	esi, eax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	sleep@PLT
.L6:
	mov	eax, DWORD PTR -36[rbp]
	lea	edx, -1[rax]
	mov	DWORD PTR -36[rbp], edx
	test	eax, eax
	jne	.L10
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	error
	.type	error, @function
error:
.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	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE7:
	.size	error, .-error
	.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	"50129.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"/posix-shared-mem-example\000"
	.align	2
.LC1:
	.ascii	"shm_open\000"
	.align	2
.LC2:
	.ascii	"Shared Memory accessed\000"
	.align	2
.LC3:
	.ascii	"/sem-mutex\000"
	.align	2
.LC4:
	.ascii	"sem_open\000"
	.align	2
.LC5:
	.ascii	"Mutex Sem Done !\000"
	.align	2
.LC6:
	.ascii	"mmap\000"
	.align	2
.LC7:
	.ascii	"Memory Mapped\000"
	.align	2
.LC8:
	.ascii	"/sem-spool-signal\000"
	.align	2
.LC9:
	.ascii	"Spool Done\000"
	.align	2
.LC10:
	.ascii	"sem_wait: mutex_sem\000"
	.align	2
.LC11:
	.ascii	"sem_post: mutex_sem\000"
	.align	2
.LC12:
	.ascii	"sem_post: (spool_signal_sem\000"
	.align	2
.LC13:
	.ascii	"\011 Process %d incremented The Number\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	mov	r3, #10
	str	r3, [fp, #-28]
	mov	r2, #448
	mov	r1, #130
	ldr	r0, .L12
	bl	shm_open
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmn	r3, #1
	bne	.L2
	ldr	r0, .L12+4
	bl	error
.L2:
	ldr	r0, .L12+8
	bl	puts
	mov	r3, #0
	mov	r2, #432
	mov	r1, #128
	ldr	r0, .L12+12
	bl	sem_open
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L3
	ldr	r0, .L12+16
	bl	error
.L3:
	ldr	r0, .L12+20
	bl	puts
	mov	r3, #0
	str	r3, [sp, #4]
	ldr	r3, [fp, #-24]
	str	r3, [sp]
	mov	r3, #1
	mov	r2, #3
	mov	r1, #12
	mov	r0, #0
	bl	mmap
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	bne	.L4
	ldr	r0, .L12+24
	bl	error
.L4:
	ldr	r0, .L12+28
	bl	puts
	mov	r3, #0
	mov	r2, #432
	mov	r1, #128
	ldr	r0, .L12+32
	bl	sem_open
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L5
	ldr	r0, .L12+16
	bl	error
.L5:
	ldr	r0, .L12+36
	bl	puts
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	add	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	add	r2, r3, #1
	ldr	r3, [fp, #-16]
	str	r2, [r3, #4]
	b	.L6
.L10:
	ldr	r0, [fp, #-20]
	bl	sem_wait
	mov	r3, r0
	cmn	r3, #1
	bne	.L7
	ldr	r0, .L12+40
	bl	error
.L7:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r3, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-8]
	str	r2, [r3, #8]
	ldr	r0, [fp, #-20]
	bl	sem_post
	mov	r3, r0
	cmn	r3, #1
	bne	.L8
	ldr	r0, .L12+44
	bl	error
.L8:
	ldr	r0, [fp, #-12]
	bl	sem_post
	mov	r3, r0
	cmn	r3, #1
	bne	.L9
	ldr	r0, .L12+48
	bl	error
.L9:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	mov	r1, r3
	ldr	r0, .L12+52
	bl	printf
	mov	r0, #1
	bl	sleep
.L6:
	ldr	r3, [fp, #-28]
	sub	r2, r3, #1
	str	r2, [fp, #-28]
	cmp	r3, #0
	bne	.L10
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.size	main, .-main
	.align	2
	.global	error
	.syntax unified
	.arm
	.fpu softvfp
	.type	error, %function
error:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r0, [fp, #-8]
	bl	perror
	mov	r0, #1
	bl	exit
	.size	error, .-error
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
