	.file	"758180.c"
	.intel_syntax noprefix
	.text
	.globl	count
	.bss
	.align 4
	.type	count, @object
	.size	count, 4
count:
	.zero	4
	.globl	limit
	.data
	.align 4
	.type	limit, @object
	.size	limit, 4
limit:
	.long	5
	.section	.rodata
.LC0:
	.string	"mysharedmem"
.LC1:
	.string	"Reader Process: %dth Loop\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
	push	rbx
	sub	rsp, 40
	.cfi_offset 3, -24
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	call	getpagesize@PLT
	movsx	rbx, eax
	mov	esi, 4
	lea	rdi, .LC0[rip]
	call	ftok@PLT
	mov	edx, 896
	mov	rsi, rbx
	mov	edi, eax
	call	shmget@PLT
	mov	DWORD PTR -28[rbp], eax
	mov	eax, DWORD PTR -28[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	shmat@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, 0
	mov	esi, 1
	mov	rdi, rax
	call	sem_init@PLT
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 32
	mov	edx, 0
	mov	esi, 1
	mov	rdi, rax
	call	sem_init@PLT
	mov	edx, DWORD PTR count[rip]
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 64[rax], edx
	jmp	.L2
.L3:
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 32
	mov	rdi, rax
	call	sem_wait@PLT
	mov	eax, DWORD PTR count[rip]
	add	eax, 1
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edx, DWORD PTR count[rip]
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 64[rax], edx
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	sem_post@PLT
	mov	eax, DWORD PTR count[rip]
	add	eax, 1
	mov	DWORD PTR count[rip], eax
.L2:
	mov	edx, DWORD PTR count[rip]
	mov	eax, DWORD PTR limit[rip]
	cmp	edx, eax
	jl	.L3
	mov	rax, QWORD PTR -24[rbp]
	add	rax, 32
	mov	rdi, rax
	call	sem_destroy@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	sem_destroy@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	shmdt@PLT
	mov	eax, DWORD PTR -28[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	shmctl@PLT
	mov	edi, 0
	call	_exit@PLT
	.cfi_endproc
.LFE6:
	.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	"758180.c"
	.text
	.global	count
	.bss
	.align	2
	.type	count, %object
	.size	count, 4
count:
	.space	4
	.global	limit
	.data
	.align	2
	.type	limit, %object
	.size	limit, 4
limit:
	.word	5
	.section	.rodata
	.align	2
.LC0:
	.ascii	"mysharedmem\000"
	.align	2
.LC1:
	.ascii	"Reader Process: %dth Loop\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	mov	r1, #4
	ldr	r0, .L4
	bl	ftok
	mov	r4, r0
	bl	getpagesize
	mov	r3, r0
	mov	r2, #896
	mov	r1, r3
	mov	r0, r4
	bl	shmget
	str	r0, [fp, #-20]
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-20]
	bl	shmat
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	mov	r2, #0
	mov	r1, #1
	mov	r0, r3
	bl	sem_init
	ldr	r3, [fp, #-16]
	add	r3, r3, #16
	mov	r2, #0
	mov	r1, #1
	mov	r0, r3
	bl	sem_init
	ldr	r3, .L4+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	str	r2, [r3, #32]
	b	.L2
.L3:
	ldr	r3, [fp, #-16]
	add	r3, r3, #16
	mov	r0, r3
	bl	sem_wait
	ldr	r3, .L4+4
	ldr	r3, [r3]
	add	r3, r3, #1
	mov	r1, r3
	ldr	r0, .L4+8
	bl	printf
	ldr	r3, .L4+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	str	r2, [r3, #32]
	ldr	r3, [fp, #-16]
	mov	r0, r3
	bl	sem_post
	ldr	r3, .L4+4
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L4+4
	str	r3, [r2]
.L2:
	ldr	r3, .L4+4
	ldr	r2, [r3]
	ldr	r3, .L4+12
	ldr	r3, [r3]
	cmp	r2, r3
	blt	.L3
	ldr	r3, [fp, #-16]
	add	r3, r3, #16
	mov	r0, r3
	bl	sem_destroy
	ldr	r3, [fp, #-16]
	mov	r0, r3
	bl	sem_destroy
	ldr	r0, [fp, #-16]
	bl	shmdt
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-20]
	bl	shmctl
	mov	r0, #0
	bl	_exit
.L5:
	.align	2
.L4:
	.word	.LC0
	.word	count
	.word	.LC1
	.word	limit
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
