	.file	"107854.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Usage: msgsend key message\n"
.LC1:
	.string	"Invalid key: %s\n"
.LC2:
	.string	"msgget"
.LC3:
	.string	"%d, %ld, %s, %d\n"
.LC4:
	.string	"msgsnd"
	.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, 176
	mov	DWORD PTR -164[rbp], edi
	mov	QWORD PTR -176[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -164[rbp], 3
	je	.L2
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 27
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	rax, QWORD PTR -176[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -160[rbp], eax
	cmp	DWORD PTR -160[rbp], 0
	jg	.L3
	mov	rax, QWORD PTR -176[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	mov	eax, DWORD PTR -160[rbp]
	mov	esi, 932
	mov	edi, eax
	call	msgget@PLT
	mov	DWORD PTR -156[rbp], eax
	cmp	DWORD PTR -156[rbp], 0
	jns	.L4
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	mov	QWORD PTR -144[rbp], 1
	mov	rax, QWORD PTR -176[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	lea	rdx, -144[rbp]
	lea	rcx, 8[rdx]
	mov	edx, 128
	mov	rsi, rax
	mov	rdi, rcx
	call	strncpy@PLT
	lea	rax, -144[rbp]
	add	rax, 8
	mov	rdi, rax
	call	strlen@PLT
	add	rax, 1
	mov	QWORD PTR -152[rbp], rax
	mov	rdx, QWORD PTR -152[rbp]
	lea	rsi, -144[rbp]
	mov	eax, DWORD PTR -156[rbp]
	mov	ecx, 2048
	mov	edi, eax
	call	msgsnd@PLT
	test	eax, eax
	jns	.L5
	mov	rax, QWORD PTR -152[rbp]
	mov	edi, eax
	mov	rcx, QWORD PTR -144[rbp]
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, -144[rbp]
	lea	rsi, 8[rdx]
	mov	edx, DWORD PTR -156[rbp]
	mov	r9d, edi
	mov	r8, rsi
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	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	"107854.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage: msgsend key message\012\000"
	.align	2
.LC1:
	.ascii	"Invalid key: %s\012\000"
	.align	2
.LC2:
	.ascii	"msgget\000"
	.align	2
.LC3:
	.ascii	"%d, %ld, %s, %d\012\000"
	.align	2
.LC4:
	.ascii	"msgsnd\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 160
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #168
	str	r0, [fp, #-160]
	str	r1, [fp, #-164]
	ldr	r3, .L7
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-160]
	cmp	r3, #3
	beq	.L2
	ldr	r3, .L7+4
	ldr	r3, [r3]
	mov	r2, #27
	mov	r1, #1
	ldr	r0, .L7+8
	bl	fwrite
	mov	r0, #1
	bl	exit
.L2:
	ldr	r3, [fp, #-164]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-152]
	ldr	r3, [fp, #-152]
	cmp	r3, #0
	bgt	.L3
	ldr	r3, .L7+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-164]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L7+12
	bl	fprintf
	mov	r0, #1
	bl	exit
.L3:
	mov	r1, #932
	ldr	r0, [fp, #-152]
	bl	msgget
	str	r0, [fp, #-148]
	ldr	r3, [fp, #-148]
	cmp	r3, #0
	bge	.L4
	ldr	r0, .L7+16
	bl	perror
	mov	r0, #1
	bl	exit
.L4:
	mov	r3, #1
	str	r3, [fp, #-140]
	ldr	r3, [fp, #-164]
	add	r3, r3, #8
	ldr	r1, [r3]
	sub	r3, fp, #140
	add	r3, r3, #4
	mov	r2, #128
	mov	r0, r3
	bl	strncpy
	sub	r3, fp, #140
	add	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	add	r3, r3, #1
	str	r3, [fp, #-144]
	sub	r1, fp, #140
	mov	r3, #2048
	ldr	r2, [fp, #-144]
	ldr	r0, [fp, #-148]
	bl	msgsnd
	mov	r3, r0
	cmp	r3, #0
	bge	.L5
	ldr	r3, .L7+4
	ldr	r0, [r3]
	ldr	r2, [fp, #-140]
	ldr	r3, [fp, #-144]
	str	r3, [sp, #4]
	sub	r3, fp, #140
	add	r3, r3, #4
	str	r3, [sp]
	mov	r3, r2
	ldr	r2, [fp, #-148]
	ldr	r1, .L7+20
	bl	fprintf
	ldr	r0, .L7+24
	bl	perror
	mov	r0, #1
	bl	exit
.L5:
	mov	r0, #0
	bl	exit
.L8:
	.align	2
.L7:
	.word	.LC5
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
