	.file	"911645.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	" "
.LC1:
	.string	"forward"
.LC2:
	.string	"down"
.LC3:
	.string	"up"
	.text
	.globl	parse_cmd
	.type	parse_cmd, @function
parse_cmd:
.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, 48
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -40[rbp], rdx
	mov	BYTE PTR -9[rbp], 0
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	strtok@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L2
	mov	rax, QWORD PTR -32[rbp]
	mov	DWORD PTR [rax], 0
	jmp	.L3
.L2:
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L4
	mov	rax, QWORD PTR -32[rbp]
	mov	DWORD PTR [rax], 1
	jmp	.L3
.L4:
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L5
	mov	BYTE PTR -9[rbp], 1
	mov	rax, QWORD PTR -32[rbp]
	mov	DWORD PTR [rax], 1
	jmp	.L3
.L5:
	mov	eax, 1
	jmp	.L6
.L3:
	lea	rsi, .LC0[rip]
	mov	edi, 0
	call	strtok@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	atoi@PLT
	mov	rdx, QWORD PTR -40[rbp]
	mov	DWORD PTR [rdx], eax
	cmp	BYTE PTR -9[rbp], 0
	je	.L7
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	neg	eax
	mov	edx, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR [rax], edx
.L7:
	mov	eax, 0
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	parse_cmd, .-parse_cmd
	.section	.rodata
.LC4:
	.string	"Couldn't parse: %s\n"
.LC5:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 176
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -152[rbp], 128
	jmp	.L9
.L13:
	lea	rdx, -164[rbp]
	lea	rcx, -168[rbp]
	lea	rax, -144[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	parse_cmd
	test	al, al
	je	.L10
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, -144[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L10:
	mov	eax, DWORD PTR -168[rbp]
	test	eax, eax
	jne	.L11
	mov	eax, DWORD PTR -164[rbp]
	add	DWORD PTR -156[rbp], eax
	jmp	.L9
.L11:
	mov	eax, DWORD PTR -164[rbp]
	add	DWORD PTR -160[rbp], eax
.L9:
	mov	rdx, QWORD PTR stdin[rip]
	mov	rax, QWORD PTR -152[rbp]
	mov	ecx, eax
	lea	rax, -144[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L13
	mov	eax, DWORD PTR -156[rbp]
	imul	eax, DWORD PTR -160[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	"911645.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	" \000"
	.align	2
.LC1:
	.ascii	"forward\000"
	.align	2
.LC2:
	.ascii	"down\000"
	.align	2
.LC3:
	.ascii	"up\000"
	.text
	.align	2
	.global	parse_cmd
	.syntax unified
	.arm
	.fpu softvfp
	.type	parse_cmd, %function
parse_cmd:
	@ 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]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	mov	r3, #0
	strb	r3, [fp, #-9]
	ldr	r1, .L8
	ldr	r0, [fp, #-16]
	bl	strtok
	str	r0, [fp, #-8]
	ldr	r1, .L8+4
	ldr	r0, [fp, #-16]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L2
	ldr	r3, [fp, #-20]
	mov	r2, #0
	str	r2, [r3]
	b	.L3
.L2:
	ldr	r1, .L8+8
	ldr	r0, [fp, #-16]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L4
	ldr	r3, [fp, #-20]
	mov	r2, #1
	str	r2, [r3]
	b	.L3
.L4:
	ldr	r1, .L8+12
	ldr	r0, [fp, #-16]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L5
	mov	r3, #1
	strb	r3, [fp, #-9]
	ldr	r3, [fp, #-20]
	mov	r2, #1
	str	r2, [r3]
	b	.L3
.L5:
	mov	r3, #1
	b	.L6
.L3:
	ldr	r1, .L8
	mov	r0, #0
	bl	strtok
	str	r0, [fp, #-8]
	ldr	r0, [fp, #-8]
	bl	atoi
	mov	r2, r0
	ldr	r3, [fp, #-24]
	str	r2, [r3]
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L7
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	rsb	r2, r3, #0
	ldr	r3, [fp, #-24]
	str	r2, [r3]
.L7:
	mov	r3, #0
.L6:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.size	parse_cmd, .-parse_cmd
	.section	.rodata
	.align	2
.LC4:
	.ascii	"Couldn't parse: %s\012\000"
	.align	2
.LC5:
	.ascii	"%d\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 152
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #152
	ldr	r3, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #128
	str	r3, [fp, #-140]
	b	.L11
.L15:
	sub	r2, fp, #152
	sub	r1, fp, #156
	sub	r3, fp, #136
	mov	r0, r3
	bl	parse_cmd
	mov	r3, r0
	cmp	r3, #0
	beq	.L12
	ldr	r3, .L18+4
	ldr	r3, [r3]
	sub	r2, fp, #136
	ldr	r1, .L18+8
	mov	r0, r3
	bl	fprintf
	mov	r0, #1
	bl	exit
.L12:
	ldr	r3, [fp, #-156]
	cmp	r3, #0
	bne	.L13
	ldr	r3, [fp, #-152]
	ldr	r2, [fp, #-144]
	add	r3, r2, r3
	str	r3, [fp, #-144]
	b	.L11
.L13:
	ldr	r3, [fp, #-152]
	ldr	r2, [fp, #-148]
	add	r3, r2, r3
	str	r3, [fp, #-148]
.L11:
	ldr	r1, [fp, #-140]
	ldr	r3, .L18+12
	ldr	r2, [r3]
	sub	r3, fp, #136
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L15
	ldr	r3, [fp, #-144]
	ldr	r2, [fp, #-148]
	mul	r3, r2, r3
	mov	r1, r3
	ldr	r0, .L18+16
	bl	printf
	mov	r3, #0
	ldr	r2, .L18
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L17
	bl	__stack_chk_fail
.L17:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC6
	.word	stderr
	.word	.LC4
	.word	stdin
	.word	.LC5
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
