	.file	"34297.c"
	.intel_syntax noprefix
	.text
	.globl	parse_direction
	.type	parse_direction, @function
parse_direction:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, edi
	mov	QWORD PTR -16[rbp], rsi
	mov	BYTE PTR -4[rbp], al
	movsx	eax, BYTE PTR -4[rbp]
	cmp	eax, 118
	je	.L2
	cmp	eax, 118
	jg	.L7
	cmp	eax, 94
	je	.L4
	cmp	eax, 94
	jg	.L7
	cmp	eax, 60
	je	.L5
	cmp	eax, 62
	je	.L6
	jmp	.L7
.L4:
	mov	rax, QWORD PTR -16[rbp]
	mov	DWORD PTR [rax], 0
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 4
	mov	DWORD PTR [rax], 1
	jmp	.L3
.L2:
	mov	rax, QWORD PTR -16[rbp]
	mov	DWORD PTR [rax], 0
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 4
	mov	DWORD PTR [rax], -1
	jmp	.L3
.L6:
	mov	rax, QWORD PTR -16[rbp]
	mov	DWORD PTR [rax], 1
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 4
	mov	DWORD PTR [rax], 0
	jmp	.L3
.L5:
	mov	rax, QWORD PTR -16[rbp]
	mov	DWORD PTR [rax], -1
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 4
	mov	DWORD PTR [rax], 0
	nop
.L3:
.L7:
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	parse_direction, .-parse_direction
	.globl	position_was_visited
	.type	position_was_visited, @function
position_was_visited:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	jmp	.L9
.L12:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR 16[rbp]
	cmp	rdx, rax
	jne	.L10
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR 24[rbp]
	cmp	rdx, rax
	jne	.L10
	mov	eax, 1
	jmp	.L11
.L10:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -8[rbp], rax
.L9:
	cmp	QWORD PTR -8[rbp], 0
	jne	.L12
	mov	eax, 0
.L11:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	position_was_visited, .-position_was_visited
	.globl	mark_position_visited
	.type	mark_position_visited, @function
mark_position_visited:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	edi, 24
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rdx, QWORD PTR 16[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rdx, QWORD PTR 24[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	mark_position_visited, .-mark_position_visited
	.globl	list_length
	.type	list_length, @function
list_length:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -8[rbp], 0
	jmp	.L15
.L16:
	add	QWORD PTR -8[rbp], 1
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -24[rbp], rax
.L15:
	cmp	QWORD PTR -24[rbp], 0
	jne	.L16
	mov	rax, QWORD PTR -8[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	list_length, .-list_length
	.globl	clear_memory
	.type	clear_memory, @function
clear_memory:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	jmp	.L19
.L20:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
.L19:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	jne	.L20
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	clear_memory, .-clear_memory
	.section	.rodata
.LC0:
	.string	"r"
.LC1:
	.string	"./input.txt"
.LC2:
	.string	"%ld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 96
	mov	DWORD PTR -84[rbp], edi
	mov	QWORD PTR -96[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	BYTE PTR -65[rbp], 0
	mov	QWORD PTR -64[rbp], 0
	mov	QWORD PTR -48[rbp], 0
	mov	QWORD PTR -40[rbp], 0
	lea	rax, -64[rbp]
	sub	rsp, 8
	push	QWORD PTR -32[rbp]
	push	QWORD PTR -40[rbp]
	push	QWORD PTR -48[rbp]
	mov	rdi, rax
	call	mark_position_visited
	add	rsp, 32
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	fopen@PLT
	mov	QWORD PTR -56[rbp], rax
	jmp	.L22
.L23:
	movsx	eax, BYTE PTR -65[rbp]
	lea	rdx, -16[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	parse_direction
	mov	rdx, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	add	rax, rdx
	mov	QWORD PTR -48[rbp], rax
	mov	rdx, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	add	rax, rdx
	mov	QWORD PTR -40[rbp], rax
	mov	rax, QWORD PTR -64[rbp]
	sub	rsp, 8
	push	QWORD PTR -32[rbp]
	push	QWORD PTR -40[rbp]
	push	QWORD PTR -48[rbp]
	mov	rdi, rax
	call	position_was_visited
	add	rsp, 32
	xor	eax, 1
	test	al, al
	je	.L22
	lea	rax, -64[rbp]
	sub	rsp, 8
	push	QWORD PTR -32[rbp]
	push	QWORD PTR -40[rbp]
	push	QWORD PTR -48[rbp]
	mov	rdi, rax
	call	mark_position_visited
	add	rsp, 32
.L22:
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	fgetc@PLT
	mov	BYTE PTR -65[rbp], al
	cmp	BYTE PTR -65[rbp], -1
	jne	.L23
	mov	rax, QWORD PTR -64[rbp]
	mov	rdi, rax
	call	list_length
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -64[rbp]
	mov	rdi, rax
	call	clear_memory
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.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	"34297.c"
	.text
	.align	2
	.global	parse_direction
	.syntax unified
	.arm
	.fpu softvfp
	.type	parse_direction, %function
parse_direction:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	mov	r3, r0
	str	r1, [fp, #-12]
	strb	r3, [fp, #-5]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #118
	beq	.L2
	cmp	r3, #118
	bgt	.L7
	cmp	r3, #94
	beq	.L4
	cmp	r3, #94
	bgt	.L7
	cmp	r3, #60
	beq	.L5
	cmp	r3, #62
	beq	.L6
	b	.L7
.L4:
	ldr	r3, [fp, #-12]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r3, #4
	mov	r2, #1
	str	r2, [r3]
	b	.L3
.L2:
	ldr	r3, [fp, #-12]
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r3, #4
	mvn	r2, #0
	str	r2, [r3]
	b	.L3
.L6:
	ldr	r3, [fp, #-12]
	mov	r2, #1
	str	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r3, #4
	mov	r2, #0
	str	r2, [r3]
	b	.L3
.L5:
	ldr	r3, [fp, #-12]
	mvn	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r3, #4
	mov	r2, #0
	str	r2, [r3]
	nop
.L3:
.L7:
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	parse_direction, .-parse_direction
	.align	2
	.global	position_was_visited
	.syntax unified
	.arm
	.fpu softvfp
	.type	position_was_visited, %function
position_was_visited:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-8]
	sub	r0, fp, #20
	stm	r0, {r1, r2, r3}
	b	.L9
.L12:
	ldr	r3, [fp, #-8]
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	bne	.L10
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	bne	.L10
	mov	r3, #1
	b	.L11
.L10:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-8]
.L9:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L12
	mov	r3, #0
.L11:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	position_was_visited, .-position_was_visited
	.align	2
	.global	mark_position_visited
	.syntax unified
	.arm
	.fpu softvfp
	.type	mark_position_visited, %function
mark_position_visited:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	sub	r0, fp, #28
	stm	r0, {r1, r2, r3}
	mov	r0, #12
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-8]
	str	r2, [r3]
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-8]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	mark_position_visited, .-mark_position_visited
	.align	2
	.global	list_length
	.syntax unified
	.arm
	.fpu softvfp
	.type	list_length, %function
list_length:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L15
.L16:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-16]
.L15:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L16
	ldr	r3, [fp, #-8]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	list_length, .-list_length
	.align	2
	.global	clear_memory
	.syntax unified
	.arm
	.fpu softvfp
	.type	clear_memory, %function
clear_memory:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	b	.L19
.L20:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-16]
	str	r2, [r3]
	ldr	r0, [fp, #-8]
	bl	free
.L19:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L20
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	clear_memory, .-clear_memory
	.section	.rodata
	.align	2
.LC0:
	.ascii	"r\000"
	.align	2
.LC1:
	.ascii	"./input.txt\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	ldr	r3, .L26
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	strb	r3, [fp, #-37]
	mov	r3, #0
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-24]
	sub	r0, fp, #36
	sub	r3, fp, #28
	ldm	r3, {r1, r2, r3}
	bl	mark_position_visited
	ldr	r1, .L26+4
	ldr	r0, .L26+8
	bl	fopen
	str	r0, [fp, #-32]
	b	.L22
.L25:
	sub	r0, fp, #36
	sub	r3, fp, #28
	ldm	r3, {r1, r2, r3}
	bl	mark_position_visited
.L22:
	ldr	r0, [fp, #-32]
	bl	fgetc
	mov	r3, r0
	strb	r3, [fp, #-37]
	sub	r2, fp, #16
	ldrb	r3, [fp, #-37]	@ zero_extendqisi2
	mov	r1, r2
	mov	r0, r3
	bl	parse_direction
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	str	r3, [fp, #-28]
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	str	r3, [fp, #-24]
	ldr	r0, [fp, #-36]
	sub	r3, fp, #28
	ldm	r3, {r1, r2, r3}
	bl	position_was_visited
	mov	r3, r0
	eor	r3, r3, #1
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L22
	b	.L25
.L27:
	.align	2
.L26:
	.word	.LC2
	.word	.LC0
	.word	.LC1
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
