	.file	"104827552.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"Give a command line argument dummy"
.LC1:
	.string	"-c"
.LC2:
	.string	"-r"
.LC3:
	.string	"-v"
.LC4:
	.string	"tele.c"
	.align 8
.LC5:
	.string	"Give a valid command line argument dummy"
.LC6:
	.string	"Error: %s\n"
.LC7:
	.string	"story"
.LC8:
	.string	"Your story:\n%s\n"
	.align 8
.LC9:
	.string	"This is the story thus far:\n%s\n"
.LC10:
	.string	"Idiotic key failure"
	.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, 224
	mov	DWORD PTR -212[rbp], edi
	mov	QWORD PTR -224[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -212[rbp], 1
	jg	.L2
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	eax, -1
	jmp	.L19
.L2:
	mov	rax, QWORD PTR -224[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	edx, 2
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	je	.L4
	mov	rax, QWORD PTR -224[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	edx, 2
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	je	.L4
	mov	rax, QWORD PTR -224[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	edx, 2
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	jne	.L5
.L4:
	mov	rax, QWORD PTR -224[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR 1[rax]
	mov	BYTE PTR -201[rbp], al
	mov	esi, 82
	lea	rdi, .LC4[rip]
	call	ftok@PLT
	mov	DWORD PTR -200[rbp], eax
	cmp	DWORD PTR -200[rbp], 0
	jne	.L6
	jmp	.L21
.L5:
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	eax, -1
	jmp	.L19
.L6:
	movsx	eax, BYTE PTR -201[rbp]
	cmp	eax, 118
	je	.L8
	cmp	eax, 118
	jg	.L18
	cmp	eax, 99
	je	.L10
	cmp	eax, 114
	je	.L11
	jmp	.L18
.L10:
	mov	eax, DWORD PTR -200[rbp]
	mov	edx, 932
	mov	esi, 2048
	mov	edi, eax
	call	shmget@PLT
	mov	DWORD PTR -188[rbp], eax
	mov	eax, DWORD PTR -200[rbp]
	mov	edx, 1956
	mov	esi, 1
	mov	edi, eax
	call	semget@PLT
	mov	DWORD PTR -184[rbp], eax
	cmp	DWORD PTR -188[rbp], -1
	je	.L12
	cmp	DWORD PTR -184[rbp], -1
	jne	.L13
.L12:
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L19
.L13:
	mov	eax, DWORD PTR -184[rbp]
	mov	ecx, 1
	mov	edx, 16
	mov	esi, 0
	mov	edi, eax
	mov	eax, 0
	call	semctl@PLT
	mov	edx, 420
	mov	esi, 576
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -192[rbp], eax
	mov	eax, DWORD PTR -192[rbp]
	mov	edi, eax
	call	close@PLT
	jmp	.L18
.L11:
	mov	eax, DWORD PTR -200[rbp]
	mov	edx, 0
	mov	esi, 2048
	mov	edi, eax
	call	shmget@PLT
	mov	DWORD PTR -188[rbp], eax
	mov	eax, DWORD PTR -200[rbp]
	mov	edx, 0
	mov	esi, 1
	mov	edi, eax
	call	semget@PLT
	mov	DWORD PTR -184[rbp], eax
	cmp	DWORD PTR -188[rbp], -1
	je	.L14
	cmp	DWORD PTR -184[rbp], -1
	jne	.L15
.L14:
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L19
.L15:
	mov	eax, DWORD PTR -188[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	shmctl@PLT
	mov	DWORD PTR -180[rbp], eax
	cmp	DWORD PTR -180[rbp], -1
	jne	.L16
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
.L16:
	mov	eax, DWORD PTR -184[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	mov	eax, 0
	call	semctl@PLT
	mov	DWORD PTR -180[rbp], eax
	cmp	DWORD PTR -180[rbp], -1
	jne	.L17
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
.L17:
	lea	rax, -160[rbp]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	call	stat@PLT
	mov	rax, QWORD PTR -112[rbp]
	mov	DWORD PTR -196[rbp], eax
	mov	esi, 0
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -192[rbp], eax
	mov	eax, DWORD PTR -196[rbp]
	cdqe
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -168[rbp], rax
	mov	eax, DWORD PTR -196[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR -168[rbp]
	mov	eax, DWORD PTR -192[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	eax, DWORD PTR -192[rbp]
	mov	edi, eax
	call	close@PLT
	lea	rdi, .LC7[rip]
	call	remove@PLT
	mov	rax, QWORD PTR -168[rbp]
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -168[rbp]
	mov	rdi, rax
	call	free@PLT
	jmp	.L18
.L8:
	lea	rax, -160[rbp]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	call	stat@PLT
	mov	rax, QWORD PTR -112[rbp]
	mov	DWORD PTR -196[rbp], eax
	mov	esi, 0
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -192[rbp], eax
	mov	eax, DWORD PTR -196[rbp]
	cdqe
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -176[rbp], rax
	mov	eax, DWORD PTR -196[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR -176[rbp]
	mov	eax, DWORD PTR -192[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	eax, DWORD PTR -192[rbp]
	mov	edi, eax
	call	close@PLT
	mov	rax, QWORD PTR -176[rbp]
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -176[rbp]
	mov	rdi, rax
	call	free@PLT
	jmp	.L18
.L21:
	lea	rdi, .LC10[rip]
	call	puts@PLT
	mov	eax, -1
	jmp	.L19
.L18:
	mov	eax, 0
.L19:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	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	"104827552.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Give a command line argument dummy\000"
	.align	2
.LC1:
	.ascii	"-c\000"
	.align	2
.LC2:
	.ascii	"-r\000"
	.align	2
.LC3:
	.ascii	"-v\000"
	.align	2
.LC4:
	.ascii	"tele.c\000"
	.align	2
.LC5:
	.ascii	"Give a valid command line argument dummy\000"
	.align	2
.LC6:
	.ascii	"Error: %s\012\000"
	.align	2
.LC7:
	.ascii	"story\000"
	.align	2
.LC8:
	.ascii	"Your story:\012%s\012\000"
	.align	2
.LC9:
	.ascii	"This is the story thus far:\012%s\012\000"
	.align	2
.LC10:
	.ascii	"Idiotic key failure\000"
	.align	2
.LC11:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 144
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #144
	str	r0, [fp, #-144]
	str	r1, [fp, #-148]
	ldr	r3, .L22
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-144]
	cmp	r3, #1
	bgt	.L2
	ldr	r0, .L22+4
	bl	puts
	mvn	r3, #0
	b	.L19
.L2:
	ldr	r3, [fp, #-148]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, #2
	ldr	r1, .L22+8
	mov	r0, r3
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L4
	ldr	r3, [fp, #-148]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, #2
	ldr	r1, .L22+12
	mov	r0, r3
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L4
	ldr	r3, [fp, #-148]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, #2
	ldr	r1, .L22+16
	mov	r0, r3
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L5
.L4:
	ldr	r3, [fp, #-148]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldrb	r3, [r3, #1]
	strb	r3, [fp, #-133]
	mov	r1, #82
	ldr	r0, .L22+20
	bl	ftok
	str	r0, [fp, #-132]
	ldr	r3, [fp, #-132]
	cmp	r3, #0
	bne	.L6
	b	.L21
.L5:
	ldr	r0, .L22+24
	bl	puts
	mvn	r3, #0
	b	.L19
.L6:
	ldrb	r3, [fp, #-133]	@ zero_extendqisi2
	cmp	r3, #118
	beq	.L8
	cmp	r3, #118
	bgt	.L18
	cmp	r3, #99
	beq	.L10
	cmp	r3, #114
	beq	.L11
	b	.L18
.L10:
	mov	r2, #932
	mov	r1, #2048
	ldr	r0, [fp, #-132]
	bl	shmget
	str	r0, [fp, #-116]
	ldr	r2, .L22+28
	mov	r1, #1
	ldr	r0, [fp, #-132]
	bl	semget
	str	r0, [fp, #-112]
	ldr	r3, [fp, #-116]
	cmn	r3, #1
	beq	.L12
	ldr	r3, [fp, #-112]
	cmn	r3, #1
	bne	.L13
.L12:
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L22+32
	bl	printf
	mvn	r3, #0
	b	.L19
.L13:
	mov	r3, #1
	mov	r2, #16
	mov	r1, #0
	ldr	r0, [fp, #-112]
	bl	semctl
	mov	r2, #420
	mov	r1, #576
	ldr	r0, .L22+36
	bl	open
	str	r0, [fp, #-124]
	ldr	r0, [fp, #-124]
	bl	close
	b	.L18
.L11:
	mov	r2, #0
	mov	r1, #2048
	ldr	r0, [fp, #-132]
	bl	shmget
	str	r0, [fp, #-116]
	mov	r2, #0
	mov	r1, #1
	ldr	r0, [fp, #-132]
	bl	semget
	str	r0, [fp, #-112]
	ldr	r3, [fp, #-116]
	cmn	r3, #1
	beq	.L14
	ldr	r3, [fp, #-112]
	cmn	r3, #1
	bne	.L15
.L14:
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L22+32
	bl	printf
	mvn	r3, #0
	b	.L19
.L15:
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-116]
	bl	shmctl
	str	r0, [fp, #-108]
	ldr	r3, [fp, #-108]
	cmn	r3, #1
	bne	.L16
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L22+32
	bl	printf
.L16:
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-112]
	bl	semctl
	str	r0, [fp, #-108]
	ldr	r3, [fp, #-108]
	cmn	r3, #1
	bne	.L17
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L22+32
	bl	printf
.L17:
	sub	r3, fp, #100
	mov	r1, r3
	ldr	r0, .L22+36
	bl	stat
	ldr	r3, [fp, #-56]
	str	r3, [fp, #-128]
	mov	r1, #0
	ldr	r0, .L22+36
	bl	open
	str	r0, [fp, #-124]
	ldr	r3, [fp, #-128]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-104]
	ldr	r3, [fp, #-128]
	mov	r2, r3
	ldr	r1, [fp, #-104]
	ldr	r0, [fp, #-124]
	bl	read
	ldr	r0, [fp, #-124]
	bl	close
	ldr	r0, .L22+36
	bl	remove
	ldr	r1, [fp, #-104]
	ldr	r0, .L22+40
	bl	printf
	ldr	r0, [fp, #-104]
	bl	free
	b	.L18
.L8:
	sub	r3, fp, #100
	mov	r1, r3
	ldr	r0, .L22+36
	bl	stat
	ldr	r3, [fp, #-56]
	str	r3, [fp, #-128]
	mov	r1, #0
	ldr	r0, .L22+36
	bl	open
	str	r0, [fp, #-124]
	ldr	r3, [fp, #-128]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-120]
	ldr	r3, [fp, #-128]
	mov	r2, r3
	ldr	r1, [fp, #-120]
	ldr	r0, [fp, #-124]
	bl	read
	ldr	r0, [fp, #-124]
	bl	close
	ldr	r1, [fp, #-120]
	ldr	r0, .L22+44
	bl	printf
	ldr	r0, [fp, #-120]
	bl	free
	b	.L18
.L21:
	ldr	r0, .L22+48
	bl	puts
	mvn	r3, #0
	b	.L19
.L18:
	mov	r3, #0
.L19:
	ldr	r2, .L22
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L20
	bl	__stack_chk_fail
.L20:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L23:
	.align	2
.L22:
	.word	.LC11
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	1956
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
