	.file	"50137042.c"
	.intel_syntax noprefix
	.text
	.globl	msg_count
	.bss
	.align 4
	.type	msg_count, @object
	.size	msg_count, 4
msg_count:
	.zero	4
	.globl	mutex
	.align 32
	.type	mutex, @object
	.size	mutex, 40
mutex:
	.zero	40
	.section	.rodata
.LC0:
	.string	"mq_getattr\n"
.LC1:
	.string	"malloc"
.LC2:
	.string	"mq_receive\n"
.LC3:
	.string	"Received message \"%s\"\n"
	.text
	.type	new_msg, @function
new_msg:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	add	rsp, -128
	mov	QWORD PTR -120[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -120[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -100[rbp], eax
	lea	rdx, -80[rbp]
	mov	eax, DWORD PTR -100[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	mq_getattr@PLT
	test	eax, eax
	je	.L2
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L2:
	mov	rax, QWORD PTR -64[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -96[rbp], rax
	cmp	QWORD PTR -96[rbp], 0
	jne	.L3
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L3:
	mov	rax, QWORD PTR -64[rbp]
	mov	rdx, rax
	mov	rsi, QWORD PTR -96[rbp]
	mov	eax, DWORD PTR -100[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	mq_receive@PLT
	mov	QWORD PTR -88[rbp], rax
	cmp	QWORD PTR -88[rbp], -1
	jne	.L4
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L4:
	lea	rdi, mutex[rip]
	call	pthread_mutex_lock@PLT
	mov	rax, QWORD PTR -96[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdi, rax
	call	fflush@PLT
	mov	rax, QWORD PTR -96[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, DWORD PTR msg_count[rip]
	add	eax, 1
	mov	DWORD PTR msg_count[rip], eax
	lea	rdi, mutex[rip]
	call	pthread_mutex_unlock@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	new_msg, .-new_msg
	.section	.rodata
.LC4:
	.string	"/CprE308-Queue"
.LC5:
	.string	"mq_open\n"
.LC6:
	.string	"mq_send\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 144
	mov	DWORD PTR -132[rbp], edi
	mov	QWORD PTR -144[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	ecx, 0
	mov	edx, 416
	mov	esi, 66
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	mq_open@PLT
	mov	DWORD PTR -116[rbp], eax
	cmp	DWORD PTR -116[rbp], -1
	jne	.L7
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L15
.L7:
	lea	rdx, -96[rbp]
	mov	eax, DWORD PTR -116[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	mq_getattr@PLT
	test	eax, eax
	je	.L9
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L9:
	mov	rax, QWORD PTR -80[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -112[rbp], rax
	cmp	QWORD PTR -112[rbp], 0
	jne	.L10
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L10:
	mov	edi, 10
	mov	eax, 0
	call	sleep@PLT
	mov	rax, QWORD PTR -80[rbp]
	mov	rdx, rax
	mov	rsi, QWORD PTR -112[rbp]
	mov	eax, DWORD PTR -116[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	mq_receive@PLT
	mov	QWORD PTR -104[rbp], rax
	cmp	QWORD PTR -104[rbp], -1
	jne	.L11
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L11:
	mov	rax, QWORD PTR -112[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -80[rbp]
	mov	rdx, rax
	mov	rsi, QWORD PTR -112[rbp]
	mov	eax, DWORD PTR -116[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	mq_receive@PLT
	mov	QWORD PTR -104[rbp], rax
	cmp	QWORD PTR -104[rbp], -1
	jne	.L12
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L12:
	mov	rax, QWORD PTR -112[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -112[rbp]
	mov	rdi, rax
	call	free@PLT
	movabs	rax, 7020059725716856905
	mov	QWORD PTR -19[rbp], rax
	mov	WORD PTR -11[rbp], 24946
	mov	BYTE PTR -9[rbp], 0
	lea	rax, -19[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rsi, -19[rbp]
	mov	eax, DWORD PTR -116[rbp]
	mov	ecx, 12
	mov	edi, eax
	call	mq_send@PLT
	test	eax, eax
	je	.L13
	lea	rdi, .LC6[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L15
.L13:
	movabs	rax, 7957667166791213129
	mov	QWORD PTR -29[rbp], rax
	mov	WORD PTR -21[rbp], 100
	lea	rax, -19[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rsi, -29[rbp]
	mov	eax, DWORD PTR -116[rbp]
	mov	ecx, 12
	mov	edi, eax
	call	mq_send@PLT
	test	eax, eax
	je	.L14
	lea	rdi, .LC6[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L15
.L14:
	mov	eax, 0
.L15:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	"50137042.c"
	.text
	.global	msg_count
	.bss
	.align	2
	.type	msg_count, %object
	.size	msg_count, 4
msg_count:
	.space	4
	.comm	mutex,24,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"mq_getattr\012\000"
	.align	2
.LC1:
	.ascii	"malloc\000"
	.align	2
.LC2:
	.ascii	"mq_receive\012\000"
	.align	2
.LC3:
	.ascii	"Received message \"%s\"\012\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	new_msg, %function
new_msg:
	@ 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, #-56]
	ldr	r3, .L6
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-56]
	ldr	r3, [r3]
	str	r3, [fp, #-52]
	sub	r3, fp, #40
	mov	r1, r3
	ldr	r0, [fp, #-52]
	bl	mq_getattr
	mov	r3, r0
	cmp	r3, #0
	beq	.L2
	ldr	r0, .L6+4
	bl	perror
	mvn	r0, #0
	bl	exit
.L2:
	ldr	r3, [fp, #-32]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-48]
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	bne	.L3
	ldr	r0, .L6+8
	bl	perror
	mvn	r0, #0
	bl	exit
.L3:
	ldr	r3, [fp, #-32]
	mov	r2, r3
	mov	r3, #0
	ldr	r1, [fp, #-48]
	ldr	r0, [fp, #-52]
	bl	mq_receive
	str	r0, [fp, #-44]
	ldr	r3, [fp, #-44]
	cmn	r3, #1
	bne	.L4
	ldr	r0, .L6+12
	bl	perror
	mvn	r0, #0
	bl	exit
.L4:
	ldr	r0, .L6+16
	bl	pthread_mutex_lock
	ldr	r1, [fp, #-48]
	ldr	r0, .L6+20
	bl	printf
	ldr	r3, .L6+24
	ldr	r3, [r3]
	mov	r0, r3
	bl	fflush
	ldr	r0, [fp, #-48]
	bl	free
	ldr	r3, .L6+28
	ldr	r3, [r3]
	add	r3, r3, #1
	ldr	r2, .L6+28
	str	r3, [r2]
	ldr	r0, .L6+16
	bl	pthread_mutex_unlock
	nop
	ldr	r3, .L6
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L5
	bl	__stack_chk_fail
.L5:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	.LC4
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	mutex
	.word	.LC3
	.word	stdout
	.word	msg_count
	.size	new_msg, .-new_msg
	.section	.rodata
	.align	2
.LC5:
	.ascii	"/CprE308-Queue\000"
	.align	2
.LC6:
	.ascii	"mq_open\012\000"
	.align	2
.LC8:
	.ascii	"mq_send\012\000"
	.align	2
.LC7:
	.ascii	"I am Clara\000"
	.align	2
.LC9:
	.ascii	"I am Pond\000"
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 80
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #80
	str	r0, [fp, #-80]
	str	r1, [fp, #-84]
	ldr	r3, .L19
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	mov	r2, #416
	mov	r1, #66
	ldr	r0, .L19+4
	bl	mq_open
	str	r0, [fp, #-76]
	ldr	r3, [fp, #-76]
	cmn	r3, #1
	bne	.L9
	ldr	r0, .L19+8
	bl	perror
	mvn	r3, #0
	b	.L17
.L9:
	sub	r3, fp, #64
	mov	r1, r3
	ldr	r0, [fp, #-76]
	bl	mq_getattr
	mov	r3, r0
	cmp	r3, #0
	beq	.L11
	ldr	r0, .L19+12
	bl	perror
	mvn	r0, #0
	bl	exit
.L11:
	ldr	r3, [fp, #-56]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-72]
	ldr	r3, [fp, #-72]
	cmp	r3, #0
	bne	.L12
	ldr	r0, .L19+16
	bl	perror
	mvn	r0, #0
	bl	exit
.L12:
	mov	r0, #10
	bl	sleep
	ldr	r3, [fp, #-56]
	mov	r2, r3
	mov	r3, #0
	ldr	r1, [fp, #-72]
	ldr	r0, [fp, #-76]
	bl	mq_receive
	str	r0, [fp, #-68]
	ldr	r3, [fp, #-68]
	cmn	r3, #1
	bne	.L13
	ldr	r0, .L19+20
	bl	perror
	mvn	r0, #0
	bl	exit
.L13:
	ldr	r1, [fp, #-72]
	ldr	r0, .L19+24
	bl	printf
	ldr	r3, [fp, #-56]
	mov	r2, r3
	mov	r3, #0
	ldr	r1, [fp, #-72]
	ldr	r0, [fp, #-76]
	bl	mq_receive
	str	r0, [fp, #-68]
	ldr	r3, [fp, #-68]
	cmn	r3, #1
	bne	.L14
	ldr	r0, .L19+20
	bl	perror
	mvn	r0, #0
	bl	exit
.L14:
	ldr	r1, [fp, #-72]
	ldr	r0, .L19+24
	bl	printf
	ldr	r0, [fp, #-72]
	bl	free
	ldr	r2, .L19+28
	sub	r3, fp, #20
	ldm	r2, {r0, r1, r2}
	stmia	r3!, {r0, r1}
	strh	r2, [r3]	@ movhi
	add	r3, r3, #2
	lsr	r2, r2, #16
	strb	r2, [r3]
	sub	r3, fp, #20
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r1, fp, #20
	mov	r3, #12
	ldr	r0, [fp, #-76]
	bl	mq_send
	mov	r3, r0
	cmp	r3, #0
	beq	.L15
	ldr	r0, .L19+32
	bl	perror
	mvn	r3, #0
	b	.L17
.L15:
	ldr	r2, .L19+36
	sub	r3, fp, #32
	ldm	r2, {r0, r1, r2}
	stmia	r3!, {r0, r1}
	strh	r2, [r3]	@ movhi
	sub	r3, fp, #20
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r1, fp, #32
	mov	r3, #12
	ldr	r0, [fp, #-76]
	bl	mq_send
	mov	r3, r0
	cmp	r3, #0
	beq	.L16
	ldr	r0, .L19+32
	bl	perror
	mvn	r3, #0
	b	.L17
.L16:
	mov	r3, #0
.L17:
	ldr	r2, .L19
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L18
	bl	__stack_chk_fail
.L18:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	.LC10
	.word	.LC5
	.word	.LC6
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
