	.file	"144844.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"msg.c"
.LC1:
	.string	"key"
.LC2:
	.string	"msgget"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 560
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	esi, 122
	lea	rdi, .LC0[rip]
	call	ftok@PLT
	mov	DWORD PTR -552[rbp], eax
	cmp	DWORD PTR -552[rbp], 0
	jns	.L2
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	eax, 2
	jmp	.L12
.L2:
	mov	eax, DWORD PTR -552[rbp]
	mov	esi, 950
	mov	edi, eax
	call	msgget@PLT
	mov	DWORD PTR -548[rbp], eax
	cmp	DWORD PTR -548[rbp], 0
	jns	.L4
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	eax, 3
	jmp	.L12
.L4:
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -272[rbp]
	mov	esi, 255
	mov	rdi, rax
	call	fgets@PLT
	lea	rax, -272[rbp]
	lea	rdx, -544[rbp]
	add	rdx, 8
	mov	rsi, rax
	mov	rdi, rdx
	call	strcpy@PLT
	movzx	eax, BYTE PTR -272[rbp]
	movsx	eax, al
	cmp	eax, 98
	jg	.L5
	cmp	eax, 65
	jl	.L14
	sub	eax, 65
	cmp	eax, 33
	ja	.L14
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L8[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L8[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L8:
	.long	.L9-.L8
	.long	.L7-.L8
	.long	.L14-.L8
	.long	.L14-.L8
	.long	.L14-.L8
	.long	.L14-.L8
	.long	.L14-.L8
	.long	.L14-.L8
	.long	.L14-.L8
	.long	.L14-.L8
	.long	.L14-.L8
	.long	.L14-.L8
	.long	.L14-.L8
	.long	.L14-.L8
	.long	.L14-.L8
	.long	.L14-.L8
	.long	.L10-.L8
	.long	.L14-.L8
	.long	.L14-.L8
	.long	.L14-.L8
	.long	.L14-.L8
	.long	.L14-.L8
	.long	.L14-.L8
	.long	.L14-.L8
	.long	.L14-.L8
	.long	.L14-.L8
	.long	.L14-.L8
	.long	.L14-.L8
	.long	.L14-.L8
	.long	.L14-.L8
	.long	.L14-.L8
	.long	.L14-.L8
	.long	.L9-.L8
	.long	.L7-.L8
	.text
.L5:
	cmp	eax, 113
	je	.L10
	jmp	.L14
.L9:
	mov	QWORD PTR -544[rbp], 1
	lea	rax, -272[rbp]
	mov	rdi, rax
	call	strlen@PLT
	lea	rdx, 1[rax]
	lea	rsi, -544[rbp]
	mov	eax, DWORD PTR -548[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	msgsnd@PLT
	jmp	.L11
.L7:
	mov	QWORD PTR -544[rbp], 2
	lea	rax, -272[rbp]
	mov	rdi, rax
	call	strlen@PLT
	lea	rdx, 1[rax]
	lea	rsi, -544[rbp]
	mov	eax, DWORD PTR -548[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	msgsnd@PLT
	jmp	.L11
.L10:
	lea	rax, -544[rbp]
	add	rax, 8
	mov	WORD PTR [rax], 113
	mov	QWORD PTR -544[rbp], 1
	lea	rax, -272[rbp]
	mov	rdi, rax
	call	strlen@PLT
	lea	rdx, 1[rax]
	lea	rsi, -544[rbp]
	mov	eax, DWORD PTR -548[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	msgsnd@PLT
	mov	QWORD PTR -544[rbp], 2
	lea	rax, -272[rbp]
	mov	rdi, rax
	call	strlen@PLT
	lea	rdx, 1[rax]
	lea	rsi, -544[rbp]
	mov	eax, DWORD PTR -548[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	msgsnd@PLT
	mov	eax, DWORD PTR -548[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	msgctl@PLT
	mov	eax, 0
	jmp	.L12
.L14:
	nop
.L11:
	jmp	.L4
.L12:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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	"144844.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"msg.c\000"
	.align	2
.LC1:
	.ascii	"key\000"
	.align	2
.LC2:
	.ascii	"msgget\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 528
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #528
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r1, #122
	ldr	r0, .L15+4
	bl	ftok
	str	r0, [fp, #-532]
	ldr	r3, [fp, #-532]
	cmp	r3, #0
	bge	.L2
	ldr	r0, .L15+8
	bl	perror
	mov	r3, #2
	b	.L12
.L2:
	ldr	r1, .L15+12
	ldr	r0, [fp, #-532]
	bl	msgget
	str	r0, [fp, #-528]
	ldr	r3, [fp, #-528]
	cmp	r3, #0
	bge	.L4
	ldr	r0, .L15+16
	bl	perror
	mov	r3, #3
	b	.L12
.L4:
	ldr	r3, .L15+20
	ldr	r2, [r3]
	sub	r3, fp, #264
	mov	r1, #255
	mov	r0, r3
	bl	fgets
	sub	r2, fp, #264
	sub	r3, fp, #524
	add	r3, r3, #4
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	ldrb	r3, [fp, #-264]	@ zero_extendqisi2
	cmp	r3, #98
	bgt	.L5
	cmp	r3, #65
	blt	.L14
	sub	r3, r3, #65
	cmp	r3, #33
	ldrls	pc, [pc, r3, asl #2]
	b	.L14
.L8:
	.word	.L9
	.word	.L7
	.word	.L14
	.word	.L14
	.word	.L14
	.word	.L14
	.word	.L14
	.word	.L14
	.word	.L14
	.word	.L14
	.word	.L14
	.word	.L14
	.word	.L14
	.word	.L14
	.word	.L14
	.word	.L14
	.word	.L10
	.word	.L14
	.word	.L14
	.word	.L14
	.word	.L14
	.word	.L14
	.word	.L14
	.word	.L14
	.word	.L14
	.word	.L14
	.word	.L14
	.word	.L14
	.word	.L14
	.word	.L14
	.word	.L14
	.word	.L14
	.word	.L9
	.word	.L7
.L5:
	cmp	r3, #113
	beq	.L10
	b	.L14
.L9:
	mov	r3, #1
	str	r3, [fp, #-524]
	sub	r3, fp, #264
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	add	r2, r3, #1
	sub	r1, fp, #524
	mov	r3, #0
	ldr	r0, [fp, #-528]
	bl	msgsnd
	b	.L11
.L7:
	mov	r3, #2
	str	r3, [fp, #-524]
	sub	r3, fp, #264
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	add	r2, r3, #1
	sub	r1, fp, #524
	mov	r3, #0
	ldr	r0, [fp, #-528]
	bl	msgsnd
	b	.L11
.L10:
	sub	r3, fp, #524
	add	r3, r3, #4
	mov	r2, #113
	strh	r2, [r3]	@ movhi
	mov	r3, #1
	str	r3, [fp, #-524]
	sub	r3, fp, #264
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	add	r2, r3, #1
	sub	r1, fp, #524
	mov	r3, #0
	ldr	r0, [fp, #-528]
	bl	msgsnd
	mov	r3, #2
	str	r3, [fp, #-524]
	sub	r3, fp, #264
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	add	r2, r3, #1
	sub	r1, fp, #524
	mov	r3, #0
	ldr	r0, [fp, #-528]
	bl	msgsnd
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-528]
	bl	msgctl
	mov	r3, #0
	b	.L12
.L14:
	nop
.L11:
	b	.L4
.L12:
	ldr	r2, .L15
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L13
	bl	__stack_chk_fail
.L13:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC3
	.word	.LC0
	.word	.LC1
	.word	950
	.word	.LC2
	.word	stdin
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
