	.file	"506389.c"
	.intel_syntax noprefix
	.text
	.globl	ans
	.bss
	.align 4
	.type	ans, @object
	.size	ans, 4
ans:
	.zero	4
	.globl	num
	.align 4
	.type	num, @object
	.size	num, 4
num:
	.zero	4
	.globl	lastMode
	.data
	.align 4
	.type	lastMode, @object
	.size	lastMode, 4
lastMode:
	.long	112
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	onKey
	.type	onKey, @function
onKey:
.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, 32
	mov	eax, edi
	mov	BYTE PTR -20[rbp], al
	mov	eax, DWORD PTR lastMode[rip]
	cmp	eax, 112
	je	.L2
	lea	rax, num[rip]
	jmp	.L3
.L2:
	lea	rax, ans[rip]
.L3:
	mov	QWORD PTR -8[rbp], rax
	cmp	BYTE PTR -20[rbp], 47
	jle	.L4
	cmp	BYTE PTR -20[rbp], 57
	jg	.L4
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR [rax]
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	mov	edx, eax
	movsx	eax, BYTE PTR -20[rbp]
	sub	eax, 48
	add	edx, eax
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR [rax], edx
	jmp	.L10
.L4:
	cmp	BYTE PTR -20[rbp], 61
	jne	.L6
	mov	eax, DWORD PTR lastMode[rip]
	cmp	eax, 43
	je	.L7
	cmp	eax, 45
	je	.L8
	jmp	.L9
.L7:
	mov	edx, DWORD PTR ans[rip]
	mov	eax, DWORD PTR num[rip]
	add	eax, edx
	mov	DWORD PTR ans[rip], eax
	jmp	.L9
.L8:
	mov	eax, DWORD PTR ans[rip]
	mov	edx, DWORD PTR num[rip]
	sub	eax, edx
	mov	DWORD PTR ans[rip], eax
	nop
.L9:
	mov	eax, DWORD PTR ans[rip]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L10
.L6:
	movsx	eax, BYTE PTR -20[rbp]
	mov	DWORD PTR lastMode[rip], eax
.L10:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	onKey, .-onKey
	.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, 16
	mov	edi, 8192
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	jmp	.L12
.L13:
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	fgetc@PLT
	movsx	eax, al
	mov	edi, eax
	call	onKey
.L12:
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	feof@PLT
	test	eax, eax
	je	.L13
	mov	eax, 0
	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	"506389.c"
	.text
	.global	ans
	.bss
	.align	2
	.type	ans, %object
	.size	ans, 4
ans:
	.space	4
	.global	num
	.align	2
	.type	num, %object
	.size	num, 4
num:
	.space	4
	.global	lastMode
	.data
	.align	2
	.type	lastMode, %object
	.size	lastMode, 4
lastMode:
	.word	112
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d\000"
	.text
	.align	2
	.global	onKey
	.syntax unified
	.arm
	.fpu softvfp
	.type	onKey, %function
onKey:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	mov	r3, r0
	strb	r3, [fp, #-13]
	ldr	r3, .L11
	ldr	r3, [r3]
	cmp	r3, #112
	beq	.L2
	ldr	r3, .L11+4
	b	.L3
.L2:
	ldr	r3, .L11+8
.L3:
	str	r3, [fp, #-8]
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #47
	bls	.L4
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #57
	bhi	.L4
	ldr	r3, [fp, #-8]
	ldr	r2, [r3]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	mov	r2, r3
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	sub	r3, r3, #48
	add	r2, r2, r3
	ldr	r3, [fp, #-8]
	str	r2, [r3]
	b	.L10
.L4:
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r3, #61
	bne	.L6
	ldr	r3, .L11
	ldr	r3, [r3]
	cmp	r3, #43
	beq	.L7
	cmp	r3, #45
	beq	.L8
	b	.L9
.L7:
	ldr	r3, .L11+8
	ldr	r2, [r3]
	ldr	r3, .L11+4
	ldr	r3, [r3]
	add	r3, r2, r3
	ldr	r2, .L11+8
	str	r3, [r2]
	b	.L9
.L8:
	ldr	r3, .L11+8
	ldr	r2, [r3]
	ldr	r3, .L11+4
	ldr	r3, [r3]
	sub	r3, r2, r3
	ldr	r2, .L11+8
	str	r3, [r2]
	nop
.L9:
	ldr	r3, .L11+8
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L11+12
	bl	printf
	b	.L10
.L6:
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	ldr	r2, .L11
	str	r3, [r2]
.L10:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	lastMode
	.word	num
	.word	ans
	.word	.LC0
	.size	onKey, .-onKey
	.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
	mov	r0, #8192
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	b	.L14
.L15:
	ldr	r3, .L17
	ldr	r3, [r3]
	mov	r0, r3
	bl	fgetc
	mov	r3, r0
	and	r3, r3, #255
	mov	r0, r3
	bl	onKey
.L14:
	ldr	r3, .L17
	ldr	r3, [r3]
	mov	r0, r3
	bl	feof
	mov	r3, r0
	cmp	r3, #0
	beq	.L15
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	stdin
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
