	.file	"4785.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"enter an option among a, b, c, d: "
.LC1:
	.string	"%c"
.LC2:
	.string	"invalid input given"
.LC3:
	.string	"a was given"
.LC4:
	.string	"b was given"
.LC5:
	.string	"c was given"
.LC6:
	.string	"d was given"
.LC7:
	.string	"some other was given"
	.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, 16
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -9[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	test	eax, eax
	jg	.L2
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
.L2:
	mov	edi, 10
	call	putchar@PLT
	movzx	eax, BYTE PTR -9[rbp]
	movsx	eax, al
	cmp	eax, 100
	je	.L3
	cmp	eax, 100
	jg	.L4
	cmp	eax, 99
	je	.L5
	cmp	eax, 99
	jg	.L4
	cmp	eax, 97
	je	.L6
	cmp	eax, 98
	je	.L7
	jmp	.L4
.L6:
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L8
.L7:
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L8
.L5:
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L8
.L3:
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L8
.L4:
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	nop
.L8:
	mov	eax, 0
	call	wait_for_user
	mov	eax, 0
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
.LC8:
	.string	"\npress enter to exit"
	.text
	.globl	wait_for_user
	.type	wait_for_user, @function
wait_for_user:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	nop
.L12:
	call	getchar@PLT
	cmp	eax, 10
	jne	.L12
	call	getchar@PLT
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	wait_for_user, .-wait_for_user
	.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	"4785.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"enter an option among a, b, c, d: \000"
	.align	2
.LC1:
	.ascii	"%c\000"
	.align	2
.LC2:
	.ascii	"invalid input given\000"
	.align	2
.LC3:
	.ascii	"a was given\000"
	.align	2
.LC4:
	.ascii	"b was given\000"
	.align	2
.LC5:
	.ascii	"c was given\000"
	.align	2
.LC6:
	.ascii	"d was given\000"
	.align	2
.LC7:
	.ascii	"some other was given\000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L12+4
	bl	printf
	sub	r3, fp, #9
	mov	r1, r3
	ldr	r0, .L12+8
	bl	__isoc99_scanf
	mov	r3, r0
	cmp	r3, #0
	bgt	.L2
	ldr	r0, .L12+12
	bl	printf
.L2:
	mov	r0, #10
	bl	putchar
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	sub	r3, r3, #97
	cmp	r3, #3
	ldrls	pc, [pc, r3, asl #2]
	b	.L3
.L5:
	.word	.L8
	.word	.L7
	.word	.L6
	.word	.L4
.L8:
	ldr	r0, .L12+16
	bl	printf
	b	.L9
.L7:
	ldr	r0, .L12+20
	bl	printf
	b	.L9
.L6:
	ldr	r0, .L12+24
	bl	printf
	b	.L9
.L4:
	ldr	r0, .L12+28
	bl	printf
	b	.L9
.L3:
	ldr	r0, .L12+32
	bl	printf
	nop
.L9:
	bl	wait_for_user
	mov	r3, #0
	ldr	r2, .L12
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L11
	bl	__stack_chk_fail
.L11:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC8
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.section	.rodata
	.align	2
.LC9:
	.ascii	"\012press enter to exit\000"
	.text
	.align	2
	.global	wait_for_user
	.syntax unified
	.arm
	.fpu softvfp
	.type	wait_for_user, %function
wait_for_user:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r0, .L16
	bl	printf
	nop
.L15:
	bl	getchar
	mov	r3, r0
	cmp	r3, #10
	bne	.L15
	bl	getchar
	nop
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC9
	.size	wait_for_user, .-wait_for_user
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
