	.file	"208053.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"%15s"
.LC1:
	.string	"button_clicked"
.LC2:
	.string	"cycle_complete"
	.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, 496
	mov	DWORD PTR -484[rbp], edi
	mov	QWORD PTR -496[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -476[rbp], 0
	mov	DWORD PTR -472[rbp], 0
	nop
.L2:
	mov	eax, DWORD PTR -472[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -472[rbp], edx
	lea	rcx, -464[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 4
	sub	rax, rdx
	add	rax, rcx
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	cmp	eax, -1
	jne	.L2
	mov	eax, DWORD PTR -476[rbp]
	mov	edi, eax
	call	print_state
	mov	DWORD PTR -468[rbp], 0
	jmp	.L3
.L17:
	lea	rcx, -464[rbp]
	mov	eax, DWORD PTR -468[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 4
	sub	rax, rdx
	add	rax, rcx
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	call	strcmp@PLT
	test	eax, eax
	jne	.L4
	cmp	DWORD PTR -476[rbp], 5
	ja	.L13
	mov	eax, DWORD PTR -476[rbp]
	lea	rdx, 0[0+rax*4]
	lea	rax, .L7[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L7[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L7:
	.long	.L12-.L7
	.long	.L11-.L7
	.long	.L10-.L7
	.long	.L9-.L7
	.long	.L8-.L7
	.long	.L6-.L7
	.text
.L12:
	mov	DWORD PTR -476[rbp], 4
	jmp	.L13
.L11:
	mov	DWORD PTR -476[rbp], 2
	jmp	.L13
.L10:
	mov	DWORD PTR -476[rbp], 4
	jmp	.L13
.L9:
	mov	DWORD PTR -476[rbp], 1
	jmp	.L13
.L8:
	mov	DWORD PTR -476[rbp], 5
	jmp	.L13
.L6:
	mov	DWORD PTR -476[rbp], 1
	jmp	.L13
.L4:
	lea	rcx, -464[rbp]
	mov	eax, DWORD PTR -468[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	sal	rax, 4
	sub	rax, rdx
	add	rax, rcx
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	call	strcmp@PLT
	test	eax, eax
	jne	.L20
	cmp	DWORD PTR -476[rbp], 1
	je	.L14
	cmp	DWORD PTR -476[rbp], 4
	jne	.L15
	mov	DWORD PTR -476[rbp], 3
	jmp	.L13
.L14:
	mov	DWORD PTR -476[rbp], 0
	jmp	.L13
.L15:
	mov	eax, 1
	jmp	.L18
.L20:
	nop
.L13:
	mov	eax, DWORD PTR -476[rbp]
	mov	edi, eax
	call	print_state
	add	DWORD PTR -468[rbp], 1
.L3:
	mov	eax, DWORD PTR -472[rbp]
	sub	eax, 1
	cmp	DWORD PTR -468[rbp], eax
	jl	.L17
	mov	eax, 0
.L18:
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
.LC3:
	.string	"Door: "
.LC4:
	.string	"CLOSED"
.LC5:
	.string	"CLOSING"
.LC6:
	.string	"STOPPED_WHILE_CLOSING"
.LC7:
	.string	"OPEN"
.LC8:
	.string	"OPENING"
.LC9:
	.string	"STOPPED_WHILE_OPENING"
	.text
	.globl	print_state
	.type	print_state, @function
print_state:
.LFB1:
	.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	DWORD PTR -4[rbp], edi
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	cmp	DWORD PTR -4[rbp], 5
	ja	.L30
	mov	eax, DWORD PTR -4[rbp]
	lea	rdx, 0[0+rax*4]
	lea	rax, .L24[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L24[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L24:
	.long	.L29-.L24
	.long	.L28-.L24
	.long	.L27-.L24
	.long	.L26-.L24
	.long	.L25-.L24
	.long	.L23-.L24
	.text
.L29:
	lea	rdi, .LC4[rip]
	call	puts@PLT
	jmp	.L22
.L28:
	lea	rdi, .LC5[rip]
	call	puts@PLT
	jmp	.L22
.L27:
	lea	rdi, .LC6[rip]
	call	puts@PLT
	jmp	.L22
.L26:
	lea	rdi, .LC7[rip]
	call	puts@PLT
	jmp	.L22
.L25:
	lea	rdi, .LC8[rip]
	call	puts@PLT
	jmp	.L22
.L23:
	lea	rdi, .LC9[rip]
	call	puts@PLT
	nop
.L22:
.L30:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	print_state, .-print_state
	.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	"208053.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%15s\000"
	.align	2
.LC1:
	.ascii	"button_clicked\000"
	.align	2
.LC2:
	.ascii	"cycle_complete\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 = 480
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #480
	str	r0, [fp, #-480]
	str	r1, [fp, #-484]
	ldr	r3, .L21
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-472]
	mov	r3, #0
	str	r3, [fp, #-468]
	nop
.L2:
	ldr	r2, [fp, #-468]
	add	r3, r2, #1
	str	r3, [fp, #-468]
	sub	r1, fp, #460
	mov	r3, r2
	lsl	r3, r3, #4
	sub	r3, r3, r2
	add	r3, r1, r3
	mov	r1, r3
	ldr	r0, .L21+4
	bl	__isoc99_scanf
	mov	r3, r0
	cmn	r3, #1
	bne	.L2
	ldr	r0, [fp, #-472]
	bl	print_state
	mov	r3, #0
	str	r3, [fp, #-464]
	b	.L3
.L17:
	sub	r1, fp, #460
	ldr	r2, [fp, #-464]
	mov	r3, r2
	lsl	r3, r3, #4
	sub	r3, r3, r2
	add	r3, r1, r3
	mov	r1, r3
	ldr	r0, .L21+8
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L4
	ldr	r3, [fp, #-472]
	cmp	r3, #5
	ldrls	pc, [pc, r3, asl #2]
	b	.L13
.L7:
	.word	.L12
	.word	.L11
	.word	.L10
	.word	.L9
	.word	.L8
	.word	.L6
.L12:
	mov	r3, #4
	str	r3, [fp, #-472]
	b	.L13
.L11:
	mov	r3, #2
	str	r3, [fp, #-472]
	b	.L13
.L10:
	mov	r3, #4
	str	r3, [fp, #-472]
	b	.L13
.L9:
	mov	r3, #1
	str	r3, [fp, #-472]
	b	.L13
.L8:
	mov	r3, #5
	str	r3, [fp, #-472]
	b	.L13
.L6:
	mov	r3, #1
	str	r3, [fp, #-472]
	b	.L13
.L4:
	sub	r1, fp, #460
	ldr	r2, [fp, #-464]
	mov	r3, r2
	lsl	r3, r3, #4
	sub	r3, r3, r2
	add	r3, r1, r3
	mov	r1, r3
	ldr	r0, .L21+12
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L20
	ldr	r3, [fp, #-472]
	cmp	r3, #1
	beq	.L14
	ldr	r3, [fp, #-472]
	cmp	r3, #4
	bne	.L15
	mov	r3, #3
	str	r3, [fp, #-472]
	b	.L13
.L14:
	mov	r3, #0
	str	r3, [fp, #-472]
	b	.L13
.L15:
	mov	r3, #1
	b	.L18
.L20:
	nop
.L13:
	ldr	r0, [fp, #-472]
	bl	print_state
	ldr	r3, [fp, #-464]
	add	r3, r3, #1
	str	r3, [fp, #-464]
.L3:
	ldr	r3, [fp, #-468]
	sub	r3, r3, #1
	ldr	r2, [fp, #-464]
	cmp	r2, r3
	blt	.L17
	mov	r3, #0
.L18:
	ldr	r2, .L21
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L19
	bl	__stack_chk_fail
.L19:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L22:
	.align	2
.L21:
	.word	.LC3
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	main, .-main
	.section	.rodata
	.align	2
.LC4:
	.ascii	"Door: \000"
	.align	2
.LC5:
	.ascii	"CLOSED\000"
	.align	2
.LC6:
	.ascii	"CLOSING\000"
	.align	2
.LC7:
	.ascii	"STOPPED_WHILE_CLOSING\000"
	.align	2
.LC8:
	.ascii	"OPEN\000"
	.align	2
.LC9:
	.ascii	"OPENING\000"
	.align	2
.LC10:
	.ascii	"STOPPED_WHILE_OPENING\000"
	.text
	.align	2
	.global	print_state
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_state, %function
print_state:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r0, .L33
	bl	printf
	ldr	r3, [fp, #-8]
	cmp	r3, #5
	ldrls	pc, [pc, r3, asl #2]
	b	.L32
.L26:
	.word	.L31
	.word	.L30
	.word	.L29
	.word	.L28
	.word	.L27
	.word	.L25
.L31:
	ldr	r0, .L33+4
	bl	puts
	b	.L24
.L30:
	ldr	r0, .L33+8
	bl	puts
	b	.L24
.L29:
	ldr	r0, .L33+12
	bl	puts
	b	.L24
.L28:
	ldr	r0, .L33+16
	bl	puts
	b	.L24
.L27:
	ldr	r0, .L33+20
	bl	puts
	b	.L24
.L25:
	ldr	r0, .L33+24
	bl	puts
	nop
.L24:
.L32:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L34:
	.align	2
.L33:
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.size	print_state, .-print_state
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
