	.file	"5689.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"the_stack_data/5689.c"
	.align 8
.LC1:
	.string	"%s:%d: PID=%5d: Error %d (%s)\n"
.LC2:
	.string	"CHILD PID %5d: j=%d\n"
.LC3:
	.string	"Il lettore sta terminando!"
	.align 8
.LC4:
	.string	"PID=%d. Sender (PID=%d) terminated with status 0x%04X\n"
	.align 8
.LC5:
	.string	"Messages left after sender termination %ld\n"
	.align 8
.LC6:
	.string	"PID=%d. Receiver (PID=%d) terminated with status 0x%04X\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	r12
	push	rbx
	sub	rsp, 320
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	esi, 1920
	mov	edi, 0
	call	msgget@PLT
	mov	DWORD PTR -312[rbp], eax
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L2
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rbx, rax
	call	__errno_location@PLT
	mov	r12d, DWORD PTR [rax]
	call	getpid@PLT
	sub	rsp, 8
	push	rbx
	mov	r9d, r12d
	mov	r8d, eax
	mov	ecx, 58
	lea	rdx, .LC0[rip]
	lea	rsi, .LC1[rip]
	mov	edi, 2
	mov	eax, 0
	call	dprintf@PLT
	add	rsp, 16
.L2:
	mov	esi, 4
	mov	edi, 5
	call	calloc@PLT
	mov	QWORD PTR -296[rbp], rax
	mov	DWORD PTR -320[rbp], 0
	jmp	.L3
.L11:
	call	fork@PLT
	mov	DWORD PTR -304[rbp], eax
	cmp	DWORD PTR -304[rbp], -1
	je	.L4
	cmp	DWORD PTR -304[rbp], 0
	je	.L5
	jmp	.L26
.L4:
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L29
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rbx, rax
	call	__errno_location@PLT
	mov	r12d, DWORD PTR [rax]
	call	getpid@PLT
	sub	rsp, 8
	push	rbx
	mov	r9d, r12d
	mov	r8d, eax
	mov	ecx, 70
	lea	rdx, .LC0[rip]
	lea	rsi, .LC1[rip]
	mov	edi, 2
	mov	eax, 0
	call	dprintf@PLT
	add	rsp, 16
	jmp	.L29
.L5:
	mov	rax, QWORD PTR -296[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	DWORD PTR -316[rbp], 1
	jmp	.L9
.L10:
	call	getpid@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -316[rbp]
	lea	rcx, -160[rbp]
	lea	rdi, 8[rcx]
	mov	ecx, eax
	lea	rsi, .LC2[rip]
	mov	eax, 0
	call	sprintf@PLT
	mov	DWORD PTR -300[rbp], eax
	add	DWORD PTR -300[rbp], 1
	mov	eax, DWORD PTR -316[rbp]
	cdqe
	mov	QWORD PTR -160[rbp], rax
	mov	eax, DWORD PTR -300[rbp]
	movsx	rdx, eax
	lea	rcx, -160[rbp]
	mov	eax, DWORD PTR -312[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	my_msg_send
	add	DWORD PTR -316[rbp], 1
.L9:
	cmp	DWORD PTR -316[rbp], 20
	jle	.L10
	mov	edi, 0
	call	exit@PLT
.L26:
	mov	eax, DWORD PTR -320[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -296[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -304[rbp]
	mov	DWORD PTR [rdx], eax
	jmp	.L8
.L29:
	nop
.L8:
	add	DWORD PTR -320[rbp], 1
.L3:
	cmp	DWORD PTR -320[rbp], 4
	jle	.L11
	mov	eax, DWORD PTR -312[rbp]
	mov	esi, eax
	mov	edi, 1
	call	msg_print_stats
	call	fork@PLT
	mov	DWORD PTR -308[rbp], eax
	cmp	DWORD PTR -308[rbp], 0
	jne	.L12
.L15:
	lea	rsi, -160[rbp]
	mov	eax, DWORD PTR -312[rbp]
	mov	r8d, 0
	mov	ecx, 0
	mov	edx, 128
	mov	edi, eax
	call	msgrcv@PLT
	mov	DWORD PTR -300[rbp], eax
	cmp	DWORD PTR -300[rbp], -1
	je	.L30
	mov	eax, DWORD PTR -300[rbp]
	cdqe
	lea	rdx, -160[rbp]
	lea	rcx, 8[rdx]
	mov	rdx, rax
	mov	rsi, rcx
	mov	edi, 1
	call	write@PLT
	jmp	.L15
.L30:
	nop
	lea	rdi, .LC3[rip]
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L12:
	mov	DWORD PTR -320[rbp], 0
	jmp	.L16
.L19:
	mov	eax, DWORD PTR -320[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -296[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	lea	rcx, -324[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	call	waitpid@PLT
	mov	DWORD PTR -304[rbp], eax
	cmp	DWORD PTR -304[rbp], -1
	je	.L31
	mov	ebx, DWORD PTR -324[rbp]
	call	getpid@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -304[rbp]
	mov	r8d, ebx
	mov	ecx, eax
	lea	rsi, .LC4[rip]
	mov	edi, 1
	mov	eax, 0
	call	dprintf@PLT
	add	DWORD PTR -320[rbp], 1
.L16:
	cmp	DWORD PTR -320[rbp], 4
	jle	.L19
	jmp	.L18
.L31:
	nop
.L18:
	mov	eax, DWORD PTR -312[rbp]
	mov	esi, eax
	mov	edi, 1
	call	msg_print_stats
.L22:
	lea	rdx, -288[rbp]
	mov	eax, DWORD PTR -312[rbp]
	mov	esi, 2
	mov	edi, eax
	call	msgctl@PLT
	mov	rax, QWORD PTR -208[rbp]
	mov	rdx, rax
	lea	rsi, .LC5[rip]
	mov	edi, 1
	mov	eax, 0
	call	dprintf@PLT
	mov	rax, QWORD PTR -208[rbp]
	test	rax, rax
	je	.L32
	mov	edi, 1
	call	sleep@PLT
	jmp	.L22
.L32:
	nop
	jmp	.L23
.L24:
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L23
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rbx, rax
	call	__errno_location@PLT
	mov	r12d, DWORD PTR [rax]
	call	getpid@PLT
	sub	rsp, 8
	push	rbx
	mov	r9d, r12d
	mov	r8d, eax
	mov	ecx, 184
	lea	rdx, .LC0[rip]
	lea	rsi, .LC1[rip]
	mov	edi, 2
	mov	eax, 0
	call	dprintf@PLT
	add	rsp, 16
.L23:
	mov	eax, DWORD PTR -312[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	msgctl@PLT
	test	eax, eax
	jne	.L24
	lea	rax, -324[rbp]
	mov	rdi, rax
	call	wait@PLT
	mov	DWORD PTR -304[rbp], eax
	mov	ebx, DWORD PTR -324[rbp]
	call	getpid@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -304[rbp]
	mov	r8d, ebx
	mov	ecx, eax
	lea	rsi, .LC6[rip]
	mov	edi, 1
	mov	eax, 0
	call	dprintf@PLT
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC7:
	.string	"Queue is full and IPC_NOWAIT was set to have a non-blocking msgsnd()\nFix it by:\n\t\t\t\t\t\t\t\t  (1) making sure that some process read messages, or\n\t\t\t  (2) changing the queue size by msgctl()\n"
	.align 8
.LC8:
	.string	"No write permission to the queue.\nFix it by adding permissions properly\n"
	.align 8
.LC9:
	.string	"The address of the message isn't accessible\n"
.LC10:
	.string	"The queue was removed\n"
	.align 8
.LC11:
	.string	"The process got unblocked by a signal, while waiting on a full queue\n"
	.text
	.globl	my_msg_send
	.type	my_msg_send, @function
my_msg_send:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r12
	push	rbx
	sub	rsp, 32
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -40[rbp], rdx
	mov	rdx, QWORD PTR -40[rbp]
	mov	rsi, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	msgsnd@PLT
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	sub	eax, 4
	cmp	eax, 39
	ja	.L34
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L36[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L36[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L36:
	.long	.L42-.L36
	.long	.L34-.L36
	.long	.L34-.L36
	.long	.L34-.L36
	.long	.L34-.L36
	.long	.L34-.L36
	.long	.L34-.L36
	.long	.L41-.L36
	.long	.L40-.L36
	.long	.L39-.L36
	.long	.L38-.L36
	.long	.L34-.L36
	.long	.L34-.L36
	.long	.L34-.L36
	.long	.L34-.L36
	.long	.L34-.L36
	.long	.L34-.L36
	.long	.L34-.L36
	.long	.L37-.L36
	.long	.L34-.L36
	.long	.L34-.L36
	.long	.L34-.L36
	.long	.L34-.L36
	.long	.L34-.L36
	.long	.L34-.L36
	.long	.L34-.L36
	.long	.L34-.L36
	.long	.L34-.L36
	.long	.L34-.L36
	.long	.L34-.L36
	.long	.L34-.L36
	.long	.L34-.L36
	.long	.L34-.L36
	.long	.L34-.L36
	.long	.L34-.L36
	.long	.L34-.L36
	.long	.L34-.L36
	.long	.L34-.L36
	.long	.L34-.L36
	.long	.L35-.L36
	.text
.L41:
	lea	rsi, .LC7[rip]
	mov	edi, 2
	mov	eax, 0
	call	dprintf@PLT
	mov	eax, -1
	jmp	.L43
.L39:
	lea	rsi, .LC8[rip]
	mov	edi, 2
	mov	eax, 0
	call	dprintf@PLT
	mov	eax, -1
	jmp	.L43
.L38:
	lea	rsi, .LC9[rip]
	mov	edi, 2
	mov	eax, 0
	call	dprintf@PLT
	mov	eax, -1
	jmp	.L43
.L35:
	lea	rsi, .LC10[rip]
	mov	edi, 2
	mov	eax, 0
	call	dprintf@PLT
	mov	eax, -1
	jmp	.L43
.L42:
	lea	rsi, .LC11[rip]
	mov	edi, 2
	mov	eax, 0
	call	dprintf@PLT
	mov	eax, -1
	jmp	.L43
.L37:
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L44
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rbx, rax
	call	__errno_location@PLT
	mov	r12d, DWORD PTR [rax]
	call	getpid@PLT
	sub	rsp, 8
	push	rbx
	mov	r9d, r12d
	mov	r8d, eax
	mov	ecx, 229
	lea	rdx, .LC0[rip]
	lea	rsi, .LC1[rip]
	mov	edi, 2
	mov	eax, 0
	call	dprintf@PLT
	add	rsp, 16
.L44:
	mov	eax, -1
	jmp	.L43
.L40:
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L45
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rbx, rax
	call	__errno_location@PLT
	mov	r12d, DWORD PTR [rax]
	call	getpid@PLT
	sub	rsp, 8
	push	rbx
	mov	r9d, r12d
	mov	r8d, eax
	mov	ecx, 232
	lea	rdx, .LC0[rip]
	lea	rsi, .LC1[rip]
	mov	edi, 2
	mov	eax, 0
	call	dprintf@PLT
	add	rsp, 16
.L45:
	mov	eax, -1
	jmp	.L43
.L34:
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L46
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rbx, rax
	call	__errno_location@PLT
	mov	r12d, DWORD PTR [rax]
	call	getpid@PLT
	sub	rsp, 8
	push	rbx
	mov	r9d, r12d
	mov	r8d, eax
	mov	ecx, 235
	lea	rdx, .LC0[rip]
	lea	rsi, .LC1[rip]
	mov	edi, 2
	mov	eax, 0
	call	dprintf@PLT
	add	rsp, 16
.L46:
	mov	eax, 0
.L43:
	lea	rsp, -16[rbp]
	pop	rbx
	pop	r12
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	my_msg_send, .-my_msg_send
	.section	.rodata
	.align 8
.LC12:
	.string	"\n\n--- IPC Message Queue ID: %8d, START ---\n"
	.align 8
.LC13:
	.string	"---------------------- Time of last msgsnd: %ld\n"
	.align 8
.LC14:
	.string	"---------------------- Time of last msgrcv: %ld\n"
	.align 8
.LC15:
	.string	"---------------------- Time of last change: %ld\n"
	.align 8
.LC16:
	.string	"---------- Number of messages in the queue: %ld\n"
	.align 8
.LC17:
	.string	"- Max number of bytes allowed in the queue: %ld\n"
	.align 8
.LC18:
	.string	"----------------------- PID of last msgsnd: %d\n"
	.align 8
.LC19:
	.string	"----------------------- PID of last msgrcv: %d\n"
	.align 8
.LC20:
	.string	"--- IPC Message Queue ID: %8d, END -----\n\n\n"
	.text
	.type	msg_print_stats, @function
msg_print_stats:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r12
	push	rbx
	sub	rsp, 160
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	mov	DWORD PTR -164[rbp], edi
	mov	DWORD PTR -168[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	jmp	.L48
.L49:
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L48
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rbx, rax
	call	__errno_location@PLT
	mov	r12d, DWORD PTR [rax]
	call	getpid@PLT
	sub	rsp, 8
	push	rbx
	mov	r9d, r12d
	mov	r8d, eax
	mov	ecx, 245
	lea	rdx, .LC0[rip]
	lea	rsi, .LC1[rip]
	mov	edi, 2
	mov	eax, 0
	call	dprintf@PLT
	add	rsp, 16
.L48:
	lea	rdx, -144[rbp]
	mov	eax, DWORD PTR -168[rbp]
	mov	esi, 2
	mov	edi, eax
	call	msgctl@PLT
	mov	DWORD PTR -148[rbp], eax
	cmp	DWORD PTR -148[rbp], 0
	jne	.L49
	mov	edx, DWORD PTR -168[rbp]
	mov	eax, DWORD PTR -164[rbp]
	lea	rsi, .LC12[rip]
	mov	edi, eax
	mov	eax, 0
	call	dprintf@PLT
	mov	rdx, QWORD PTR -96[rbp]
	mov	eax, DWORD PTR -164[rbp]
	lea	rsi, .LC13[rip]
	mov	edi, eax
	mov	eax, 0
	call	dprintf@PLT
	mov	rdx, QWORD PTR -88[rbp]
	mov	eax, DWORD PTR -164[rbp]
	lea	rsi, .LC14[rip]
	mov	edi, eax
	mov	eax, 0
	call	dprintf@PLT
	mov	rdx, QWORD PTR -80[rbp]
	mov	eax, DWORD PTR -164[rbp]
	lea	rsi, .LC15[rip]
	mov	edi, eax
	mov	eax, 0
	call	dprintf@PLT
	mov	rdx, QWORD PTR -64[rbp]
	mov	eax, DWORD PTR -164[rbp]
	lea	rsi, .LC16[rip]
	mov	edi, eax
	mov	eax, 0
	call	dprintf@PLT
	mov	rdx, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR -164[rbp]
	lea	rsi, .LC17[rip]
	mov	edi, eax
	mov	eax, 0
	call	dprintf@PLT
	mov	edx, DWORD PTR -48[rbp]
	mov	eax, DWORD PTR -164[rbp]
	lea	rsi, .LC18[rip]
	mov	edi, eax
	mov	eax, 0
	call	dprintf@PLT
	mov	edx, DWORD PTR -44[rbp]
	mov	eax, DWORD PTR -164[rbp]
	lea	rsi, .LC19[rip]
	mov	edi, eax
	mov	eax, 0
	call	dprintf@PLT
	mov	edx, DWORD PTR -168[rbp]
	mov	eax, DWORD PTR -164[rbp]
	lea	rsi, .LC20[rip]
	mov	edi, eax
	mov	eax, 0
	call	dprintf@PLT
	nop
	mov	rax, QWORD PTR -24[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L50
	call	__stack_chk_fail@PLT
.L50:
	lea	rsp, -16[rbp]
	pop	rbx
	pop	r12
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	msg_print_stats, .-msg_print_stats
	.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	"5689.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"the_stack_data/5689.c\000"
	.align	2
.LC1:
	.ascii	"%s:%d: PID=%5d: Error %d (%s)\012\000"
	.align	2
.LC2:
	.ascii	"CHILD PID %5d: j=%d\012\000"
	.align	2
.LC3:
	.ascii	"Il lettore sta terminando!\000"
	.align	2
.LC4:
	.ascii	"PID=%d. Sender (PID=%d) terminated with status 0x%0"
	.ascii	"4X\012\000"
	.align	2
.LC5:
	.ascii	"Messages left after sender termination %ld\012\000"
	.align	2
.LC6:
	.ascii	"PID=%d. Receiver (PID=%d) terminated with status 0x"
	.ascii	"%04X\012\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 256
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #272
	ldr	r3, .L33
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r1, #1920
	mov	r0, #0
	bl	msgget
	str	r0, [fp, #-256]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L2
	bl	getpid
	mov	r5, r0
	bl	__errno_location
	mov	r3, r0
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	str	r3, [sp, #8]
	str	r4, [sp, #4]
	str	r5, [sp]
	mov	r3, #58
	ldr	r2, .L33+4
	ldr	r1, .L33+8
	mov	r0, #2
	bl	dprintf
.L2:
	mov	r1, #4
	mov	r0, #5
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-252]
	mov	r3, #0
	str	r3, [fp, #-264]
	b	.L3
.L11:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-244]
	ldr	r3, [fp, #-244]
	cmn	r3, #1
	beq	.L4
	ldr	r3, [fp, #-244]
	cmp	r3, #0
	beq	.L5
	b	.L26
.L4:
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L29
	bl	getpid
	mov	r5, r0
	bl	__errno_location
	mov	r3, r0
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	str	r3, [sp, #8]
	str	r4, [sp, #4]
	str	r5, [sp]
	mov	r3, #70
	ldr	r2, .L33+4
	ldr	r1, .L33+8
	mov	r0, #2
	bl	dprintf
	b	.L29
.L5:
	ldr	r0, [fp, #-252]
	bl	free
	mov	r3, #1
	str	r3, [fp, #-260]
	b	.L9
.L10:
	bl	getpid
	mov	r2, r0
	sub	r3, fp, #148
	add	r0, r3, #4
	ldr	r3, [fp, #-260]
	ldr	r1, .L33+12
	bl	sprintf
	str	r0, [fp, #-240]
	ldr	r3, [fp, #-240]
	add	r3, r3, #1
	str	r3, [fp, #-240]
	ldr	r3, [fp, #-260]
	str	r3, [fp, #-148]
	ldr	r2, [fp, #-240]
	sub	r3, fp, #148
	mov	r1, r3
	ldr	r0, [fp, #-256]
	bl	my_msg_send
	ldr	r3, [fp, #-260]
	add	r3, r3, #1
	str	r3, [fp, #-260]
.L9:
	ldr	r3, [fp, #-260]
	cmp	r3, #20
	ble	.L10
	mov	r0, #0
	bl	exit
.L26:
	ldr	r3, [fp, #-264]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-252]
	add	r3, r2, r3
	ldr	r2, [fp, #-244]
	str	r2, [r3]
	b	.L8
.L29:
	nop
.L8:
	ldr	r3, [fp, #-264]
	add	r3, r3, #1
	str	r3, [fp, #-264]
.L3:
	ldr	r3, [fp, #-264]
	cmp	r3, #4
	ble	.L11
	ldr	r1, [fp, #-256]
	mov	r0, #1
	bl	msg_print_stats
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-248]
	ldr	r3, [fp, #-248]
	cmp	r3, #0
	bne	.L12
.L15:
	sub	r1, fp, #148
	mov	r3, #0
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #128
	ldr	r0, [fp, #-256]
	bl	msgrcv
	str	r0, [fp, #-240]
	ldr	r3, [fp, #-240]
	cmn	r3, #1
	beq	.L30
	ldr	r2, [fp, #-240]
	sub	r3, fp, #148
	add	r3, r3, #4
	mov	r1, r3
	mov	r0, #1
	bl	write
	b	.L15
.L30:
	nop
	ldr	r0, .L33+16
	bl	puts
	mov	r0, #0
	bl	exit
.L12:
	mov	r3, #0
	str	r3, [fp, #-264]
	b	.L16
.L19:
	ldr	r3, [fp, #-264]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-252]
	add	r3, r2, r3
	ldr	r3, [r3]
	sub	r1, fp, #268
	mov	r2, #0
	mov	r0, r3
	bl	waitpid
	str	r0, [fp, #-244]
	ldr	r3, [fp, #-244]
	cmn	r3, #1
	beq	.L31
	bl	getpid
	mov	r2, r0
	ldr	r3, [fp, #-268]
	str	r3, [sp]
	ldr	r3, [fp, #-244]
	ldr	r1, .L33+20
	mov	r0, #1
	bl	dprintf
	ldr	r3, [fp, #-264]
	add	r3, r3, #1
	str	r3, [fp, #-264]
.L16:
	ldr	r3, [fp, #-264]
	cmp	r3, #4
	ble	.L19
	b	.L18
.L31:
	nop
.L18:
	ldr	r1, [fp, #-256]
	mov	r0, #1
	bl	msg_print_stats
.L22:
	sub	r3, fp, #236
	mov	r2, r3
	mov	r1, #2
	ldr	r0, [fp, #-256]
	bl	msgctl
	ldr	r3, [fp, #-172]
	mov	r2, r3
	ldr	r1, .L33+24
	mov	r0, #1
	bl	dprintf
	ldr	r3, [fp, #-172]
	cmp	r3, #0
	beq	.L32
	mov	r0, #1
	bl	sleep
	b	.L22
.L32:
	nop
	b	.L23
.L24:
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L23
	bl	getpid
	mov	r5, r0
	bl	__errno_location
	mov	r3, r0
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	str	r3, [sp, #8]
	str	r4, [sp, #4]
	str	r5, [sp]
	mov	r3, #184
	ldr	r2, .L33+4
	ldr	r1, .L33+8
	mov	r0, #2
	bl	dprintf
.L23:
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-256]
	bl	msgctl
	mov	r3, r0
	cmp	r3, #0
	bne	.L24
	sub	r3, fp, #268
	mov	r0, r3
	bl	wait
	str	r0, [fp, #-244]
	bl	getpid
	mov	r2, r0
	ldr	r3, [fp, #-268]
	str	r3, [sp]
	ldr	r3, [fp, #-244]
	ldr	r1, .L33+28
	mov	r0, #1
	bl	dprintf
	mov	r0, #0
	bl	exit
.L34:
	.align	2
.L33:
	.word	.LC7
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	main, .-main
	.section	.rodata
	.align	2
.LC8:
	.ascii	"Queue is full and IPC_NOWAIT was set to have a non-"
	.ascii	"blocking msgsnd()\012Fix it by:\012\011\011\011\011"
	.ascii	"\011\011\011\011  (1) making sure that some process"
	.ascii	" read messages, or\012\011\011\011  (2) changing th"
	.ascii	"e queue size by msgctl()\012\000"
	.align	2
.LC9:
	.ascii	"No write permission to the queue.\012Fix it by addi"
	.ascii	"ng permissions properly\012\000"
	.align	2
.LC10:
	.ascii	"The address of the message isn't accessible\012\000"
	.align	2
.LC11:
	.ascii	"The queue was removed\012\000"
	.align	2
.LC12:
	.ascii	"The process got unblocked by a signal, while waitin"
	.ascii	"g on a full queue\012\000"
	.text
	.align	2
	.global	my_msg_send
	.syntax unified
	.arm
	.fpu softvfp
	.type	my_msg_send, %function
my_msg_send:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #32
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	mov	r3, #0
	ldr	r2, [fp, #-24]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	msgsnd
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	sub	r3, r3, #4
	cmp	r3, #39
	ldrls	pc, [pc, r3, asl #2]
	b	.L36
.L38:
	.word	.L44
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L43
	.word	.L42
	.word	.L41
	.word	.L40
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L39
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L36
	.word	.L37
.L43:
	ldr	r1, .L49
	mov	r0, #2
	bl	dprintf
	mvn	r3, #0
	b	.L45
.L41:
	ldr	r1, .L49+4
	mov	r0, #2
	bl	dprintf
	mvn	r3, #0
	b	.L45
.L40:
	ldr	r1, .L49+8
	mov	r0, #2
	bl	dprintf
	mvn	r3, #0
	b	.L45
.L37:
	ldr	r1, .L49+12
	mov	r0, #2
	bl	dprintf
	mvn	r3, #0
	b	.L45
.L44:
	ldr	r1, .L49+16
	mov	r0, #2
	bl	dprintf
	mvn	r3, #0
	b	.L45
.L39:
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L46
	bl	getpid
	mov	r5, r0
	bl	__errno_location
	mov	r3, r0
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	str	r3, [sp, #8]
	str	r4, [sp, #4]
	str	r5, [sp]
	mov	r3, #229
	ldr	r2, .L49+20
	ldr	r1, .L49+24
	mov	r0, #2
	bl	dprintf
.L46:
	mvn	r3, #0
	b	.L45
.L42:
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L47
	bl	getpid
	mov	r5, r0
	bl	__errno_location
	mov	r3, r0
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	str	r3, [sp, #8]
	str	r4, [sp, #4]
	str	r5, [sp]
	mov	r3, #232
	ldr	r2, .L49+20
	ldr	r1, .L49+24
	mov	r0, #2
	bl	dprintf
.L47:
	mvn	r3, #0
	b	.L45
.L36:
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L48
	bl	getpid
	mov	r5, r0
	bl	__errno_location
	mov	r3, r0
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	str	r3, [sp, #8]
	str	r4, [sp, #4]
	str	r5, [sp]
	mov	r3, #235
	ldr	r2, .L49+20
	ldr	r1, .L49+24
	mov	r0, #2
	bl	dprintf
.L48:
	mov	r3, #0
.L45:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L50:
	.align	2
.L49:
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC0
	.word	.LC1
	.size	my_msg_send, .-my_msg_send
	.section	.rodata
	.align	2
.LC13:
	.ascii	"\012\012--- IPC Message Queue ID: %8d, START ---\012"
	.ascii	"\000"
	.align	2
.LC14:
	.ascii	"---------------------- Time of last msgsnd: %ld\012"
	.ascii	"\000"
	.align	2
.LC15:
	.ascii	"---------------------- Time of last msgrcv: %ld\012"
	.ascii	"\000"
	.align	2
.LC16:
	.ascii	"---------------------- Time of last change: %ld\012"
	.ascii	"\000"
	.align	2
.LC17:
	.ascii	"---------- Number of messages in the queue: %ld\012"
	.ascii	"\000"
	.align	2
.LC18:
	.ascii	"- Max number of bytes allowed in the queue: %ld\012"
	.ascii	"\000"
	.align	2
.LC19:
	.ascii	"----------------------- PID of last msgsnd: %d\012\000"
	.align	2
.LC20:
	.ascii	"----------------------- PID of last msgrcv: %d\012\000"
	.align	2
.LC21:
	.ascii	"--- IPC Message Queue ID: %8d, END -----\012\012\012"
	.ascii	"\000"
	.align	2
.LC22:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	msg_print_stats, %function
msg_print_stats:
	@ args = 0, pretend = 0, frame = 104
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #120
	str	r0, [fp, #-112]
	str	r1, [fp, #-116]
	ldr	r3, .L55
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	b	.L52
.L53:
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L52
	bl	getpid
	mov	r5, r0
	bl	__errno_location
	mov	r3, r0
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	str	r3, [sp, #8]
	str	r4, [sp, #4]
	str	r5, [sp]
	mov	r3, #245
	ldr	r2, .L55+4
	ldr	r1, .L55+8
	mov	r0, #2
	bl	dprintf
.L52:
	sub	r3, fp, #104
	mov	r2, r3
	mov	r1, #2
	ldr	r0, [fp, #-116]
	bl	msgctl
	str	r0, [fp, #-108]
	ldr	r3, [fp, #-108]
	cmp	r3, #0
	bne	.L53
	ldr	r2, [fp, #-116]
	ldr	r1, .L55+12
	ldr	r0, [fp, #-112]
	bl	dprintf
	ldr	r3, [fp, #-68]
	mov	r2, r3
	ldr	r1, .L55+16
	ldr	r0, [fp, #-112]
	bl	dprintf
	ldr	r3, [fp, #-60]
	mov	r2, r3
	ldr	r1, .L55+20
	ldr	r0, [fp, #-112]
	bl	dprintf
	ldr	r3, [fp, #-52]
	mov	r2, r3
	ldr	r1, .L55+24
	ldr	r0, [fp, #-112]
	bl	dprintf
	ldr	r3, [fp, #-40]
	mov	r2, r3
	ldr	r1, .L55+28
	ldr	r0, [fp, #-112]
	bl	dprintf
	ldr	r3, [fp, #-36]
	mov	r2, r3
	ldr	r1, .L55+32
	ldr	r0, [fp, #-112]
	bl	dprintf
	ldr	r3, [fp, #-32]
	mov	r2, r3
	ldr	r1, .L55+36
	ldr	r0, [fp, #-112]
	bl	dprintf
	ldr	r3, [fp, #-28]
	mov	r2, r3
	ldr	r1, .L55+40
	ldr	r0, [fp, #-112]
	bl	dprintf
	ldr	r2, [fp, #-116]
	ldr	r1, .L55+44
	ldr	r0, [fp, #-112]
	bl	dprintf
	nop
	ldr	r3, .L55
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L54
	bl	__stack_chk_fail
.L54:
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L56:
	.align	2
.L55:
	.word	.LC22
	.word	.LC0
	.word	.LC1
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.word	.LC20
	.word	.LC21
	.size	msg_print_stats, .-msg_print_stats
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
