	.file	"68360.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"c:nq"
.LC1:
	.string	"Queue pathname required"
	.align 8
.LC2:
	.string	"%d: priority %ld  len %d text %-32.32s\n"
	.align 8
.LC3:
	.string	"%d: priority %ld  len %d (nonascii)\n"
.LC4:
	.string	"mq_receive()"
.LC5:
	.string	"mq_getattr()"
.LC6:
	.string	"mq_open(O_WRONLY)"
	.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, 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	DWORD PTR -120[rbp], 0
	mov	DWORD PTR -116[rbp], 0
	mov	DWORD PTR -112[rbp], 1
	jmp	.L2
.L8:
	cmp	DWORD PTR -108[rbp], 113
	je	.L3
	cmp	DWORD PTR -108[rbp], 113
	jg	.L4
	cmp	DWORD PTR -108[rbp], 99
	je	.L5
	cmp	DWORD PTR -108[rbp], 110
	je	.L6
	jmp	.L4
.L5:
	mov	rax, QWORD PTR optarg[rip]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	strtoul@PLT
	mov	DWORD PTR -112[rbp], eax
	jmp	.L2
.L3:
	mov	DWORD PTR -116[rbp], 1
	jmp	.L2
.L6:
	or	DWORD PTR -120[rbp], 2048
	jmp	.L2
.L4:
	mov	eax, -1
	jmp	.L20
.L2:
	mov	rcx, QWORD PTR -144[rbp]
	mov	eax, DWORD PTR -132[rbp]
	lea	rdx, .LC0[rip]
	mov	rsi, rcx
	mov	edi, eax
	call	getopt@PLT
	mov	DWORD PTR -108[rbp], eax
	cmp	DWORD PTR -108[rbp], -1
	jne	.L8
	mov	eax, DWORD PTR optind[rip]
	cmp	DWORD PTR -132[rbp], eax
	jle	.L9
	mov	eax, DWORD PTR optind[rip]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -144[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -96[rbp], rax
	mov	edx, DWORD PTR -120[rbp]
	mov	rax, QWORD PTR -96[rbp]
	mov	esi, edx
	mov	rdi, rax
	mov	eax, 0
	call	mq_open@PLT
	mov	DWORD PTR -104[rbp], eax
	cmp	DWORD PTR -104[rbp], -1
	je	.L11
	jmp	.L22
.L9:
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	eax, -1
	jmp	.L20
.L22:
	lea	rdx, -80[rbp]
	mov	eax, DWORD PTR -104[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	mq_getattr@PLT
	test	eax, eax
	jne	.L12
	mov	rax, QWORD PTR -64[rbp]
	mov	rsi, rax
	mov	edi, 1
	call	calloc@PLT
	mov	QWORD PTR -88[rbp], rax
	mov	DWORD PTR -108[rbp], 1
	jmp	.L13
.L18:
	mov	rax, QWORD PTR -64[rbp]
	mov	rdi, rax
	lea	rdx, -124[rbp]
	mov	rsi, QWORD PTR -88[rbp]
	mov	eax, DWORD PTR -104[rbp]
	mov	rcx, rdx
	mov	rdx, rdi
	mov	edi, eax
	call	mq_receive@PLT
	mov	DWORD PTR -100[rbp], eax
	cmp	DWORD PTR -100[rbp], 0
	js	.L14
	cmp	DWORD PTR -116[rbp], 0
	jne	.L15
	mov	rax, QWORD PTR -88[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	and	eax, -128
	test	eax, eax
	jne	.L16
	mov	edx, DWORD PTR -124[rbp]
	mov	rsi, QWORD PTR -88[rbp]
	mov	ecx, DWORD PTR -100[rbp]
	mov	eax, DWORD PTR -108[rbp]
	mov	r8, rsi
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L15
.L16:
	mov	edx, DWORD PTR -124[rbp]
	mov	ecx, DWORD PTR -100[rbp]
	mov	eax, DWORD PTR -108[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L15
.L14:
	lea	rdi, .LC4[rip]
	call	perror@PLT
	jmp	.L19
.L15:
	add	DWORD PTR -108[rbp], 1
.L13:
	mov	eax, DWORD PTR -108[rbp]
	cmp	eax, DWORD PTR -112[rbp]
	jle	.L18
	jmp	.L19
.L12:
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L20
.L11:
	lea	rdi, .LC6[rip]
	call	perror@PLT
.L19:
	mov	eax, 0
.L20:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.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	"68360.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"c:nq\000"
	.align	2
.LC1:
	.ascii	"Queue pathname required\000"
	.align	2
.LC2:
	.ascii	"%d: priority %ld  len %d text %-32.32s\012\000"
	.align	2
.LC3:
	.ascii	"%d: priority %ld  len %d (nonascii)\012\000"
	.align	2
.LC4:
	.ascii	"mq_receive()\000"
	.align	2
.LC5:
	.ascii	"mq_getattr()\000"
	.align	2
.LC6:
	.ascii	"mq_open(O_WRONLY)\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 = 80
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #88
	str	r0, [fp, #-80]
	str	r1, [fp, #-84]
	ldr	r3, .L23
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-72]
	mov	r3, #0
	str	r3, [fp, #-68]
	mov	r3, #1
	str	r3, [fp, #-64]
	b	.L2
.L8:
	ldr	r3, [fp, #-60]
	cmp	r3, #113
	beq	.L3
	ldr	r3, [fp, #-60]
	cmp	r3, #113
	bgt	.L4
	ldr	r3, [fp, #-60]
	cmp	r3, #99
	beq	.L5
	ldr	r3, [fp, #-60]
	cmp	r3, #110
	beq	.L6
	b	.L4
.L5:
	ldr	r3, .L23+4
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #0
	mov	r0, r3
	bl	strtoul
	mov	r3, r0
	str	r3, [fp, #-64]
	b	.L2
.L3:
	mov	r3, #1
	str	r3, [fp, #-68]
	b	.L2
.L6:
	ldr	r3, [fp, #-72]
	orr	r3, r3, #2048
	str	r3, [fp, #-72]
	b	.L2
.L4:
	mvn	r3, #0
	b	.L20
.L2:
	ldr	r2, .L23+8
	ldr	r1, [fp, #-84]
	ldr	r0, [fp, #-80]
	bl	getopt
	str	r0, [fp, #-60]
	ldr	r3, [fp, #-60]
	cmn	r3, #1
	bne	.L8
	ldr	r3, .L23+12
	ldr	r3, [r3]
	ldr	r2, [fp, #-80]
	cmp	r2, r3
	ble	.L9
	ldr	r3, .L23+12
	ldr	r3, [r3]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-84]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-56]
	ldr	r1, [fp, #-72]
	ldr	r0, [fp, #-56]
	bl	mq_open
	str	r0, [fp, #-52]
	ldr	r3, [fp, #-52]
	cmn	r3, #1
	beq	.L11
	b	.L22
.L9:
	ldr	r0, .L23+16
	bl	puts
	mvn	r3, #0
	b	.L20
.L22:
	sub	r3, fp, #40
	mov	r1, r3
	ldr	r0, [fp, #-52]
	bl	mq_getattr
	mov	r3, r0
	cmp	r3, #0
	bne	.L12
	ldr	r3, [fp, #-32]
	mov	r1, r3
	mov	r0, #1
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-48]
	mov	r3, #1
	str	r3, [fp, #-60]
	b	.L13
.L18:
	ldr	r3, [fp, #-32]
	mov	r2, r3
	sub	r3, fp, #76
	ldr	r1, [fp, #-48]
	ldr	r0, [fp, #-52]
	bl	mq_receive
	str	r0, [fp, #-44]
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	blt	.L14
	ldr	r3, [fp, #-68]
	cmp	r3, #0
	bne	.L15
	ldr	r3, [fp, #-48]
	ldrb	r3, [r3]	@ zero_extendqisi2
	bic	r3, r3, #127
	cmp	r3, #0
	bne	.L16
	ldr	r2, [fp, #-76]
	ldr	r3, [fp, #-48]
	str	r3, [sp]
	ldr	r3, [fp, #-44]
	ldr	r1, [fp, #-60]
	ldr	r0, .L23+20
	bl	printf
	b	.L15
.L16:
	ldr	r2, [fp, #-76]
	ldr	r3, [fp, #-44]
	ldr	r1, [fp, #-60]
	ldr	r0, .L23+24
	bl	printf
	b	.L15
.L14:
	ldr	r0, .L23+28
	bl	perror
	b	.L19
.L15:
	ldr	r3, [fp, #-60]
	add	r3, r3, #1
	str	r3, [fp, #-60]
.L13:
	ldr	r2, [fp, #-60]
	ldr	r3, [fp, #-64]
	cmp	r2, r3
	ble	.L18
	b	.L19
.L12:
	ldr	r0, .L23+32
	bl	perror
	mvn	r3, #0
	b	.L20
.L11:
	ldr	r0, .L23+36
	bl	perror
.L19:
	mov	r3, #0
.L20:
	ldr	r2, .L23
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L21
	bl	__stack_chk_fail
.L21:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L24:
	.align	2
.L23:
	.word	.LC7
	.word	optarg
	.word	.LC0
	.word	optind
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
