	.file	"1008350.c"
	.intel_syntax noprefix
	.text
	.globl	buf
	.data
	.align 4
	.type	buf, @object
	.size	buf, 4
buf:
	.long	-1
	.text
	.globl	read
	.type	read, @function
read:
.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	eax, DWORD PTR buf[rip]
	cmp	eax, -1
	je	.L2
	mov	eax, DWORD PTR buf[rip]
	mov	DWORD PTR -4[rbp], eax
	mov	DWORD PTR buf[rip], -1
	jmp	.L3
.L2:
	call	read
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	jne	.L3
	mov	edi, 0
	call	exit@PLT
.L3:
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	read, .-read
	.globl	unread
	.type	unread, @function
unread:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR buf[rip], eax
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	unread, .-unread
	.globl	readnum
	.type	readnum, @function
readnum:
.LFB2:
	.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	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -8[rbp], 0
	mov	DWORD PTR -4[rbp], 0
	cmp	DWORD PTR -20[rbp], 45
	jne	.L7
	mov	DWORD PTR -4[rbp], 1
	jmp	.L10
.L7:
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, 48
	add	DWORD PTR -8[rbp], eax
.L10:
	call	read
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], 47
	jle	.L9
	cmp	DWORD PTR -20[rbp], 57
	jg	.L9
	mov	edx, DWORD PTR -8[rbp]
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	mov	DWORD PTR -8[rbp], eax
	mov	eax, DWORD PTR -20[rbp]
	sub	eax, 48
	add	DWORD PTR -8[rbp], eax
	jmp	.L10
.L9:
	mov	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	unread
	nop
	cmp	DWORD PTR -4[rbp], 0
	je	.L11
	neg	DWORD PTR -8[rbp]
.L11:
	mov	eax, DWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	readnum, .-readnum
	.section	.rodata
.LC0:
	.string	"Stack Underflow."
.LC1:
	.string	"Stack Overflow."
.LC2:
	.string	"Error: Division by zero"
.LC3:
	.string	" $ "
.LC4:
	.string	"SP="
.LC5:
	.string	"BP+"
.LC6:
	.string	"="
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 192
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdx, -144[rbp]
	mov	eax, 0
	mov	ecx, 16
	mov	rdi, rdx
	rep stosq
	mov	DWORD PTR -188[rbp], 0
	mov	DWORD PTR -184[rbp], 1
	lea	rax, .LC0[rip]
	mov	QWORD PTR -168[rbp], rax
	lea	rax, .LC1[rip]
	mov	QWORD PTR -160[rbp], rax
	lea	rax, .LC2[rip]
	mov	QWORD PTR -152[rbp], rax
.L30:
	cmp	DWORD PTR -184[rbp], 0
	je	.L14
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	pstr@PLT
	mov	DWORD PTR -184[rbp], 0
.L14:
	call	read
	mov	BYTE PTR -189[rbp], al
	cmp	BYTE PTR -189[rbp], 47
	jle	.L15
	cmp	BYTE PTR -189[rbp], 57
	jg	.L15
	cmp	DWORD PTR -188[rbp], 31
	jle	.L16
	mov	rax, QWORD PTR -160[rbp]
	mov	rdi, rax
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L16:
	movsx	eax, BYTE PTR -189[rbp]
	mov	edi, eax
	call	readnum
	mov	edx, DWORD PTR -188[rbp]
	movsx	rdx, edx
	mov	DWORD PTR -144[rbp+rdx*4], eax
	add	DWORD PTR -188[rbp], 1
	jmp	.L17
.L15:
	cmp	BYTE PTR -189[rbp], 43
	je	.L18
	cmp	BYTE PTR -189[rbp], 45
	je	.L18
	cmp	BYTE PTR -189[rbp], 42
	je	.L18
	cmp	BYTE PTR -189[rbp], 47
	je	.L18
	cmp	BYTE PTR -189[rbp], 37
	jne	.L19
.L18:
	cmp	DWORD PTR -188[rbp], 1
	jg	.L20
	mov	rax, QWORD PTR -168[rbp]
	mov	rdi, rax
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L20:
	sub	DWORD PTR -188[rbp], 1
	mov	eax, DWORD PTR -188[rbp]
	cdqe
	mov	eax, DWORD PTR -144[rbp+rax*4]
	mov	DWORD PTR -176[rbp], eax
	sub	DWORD PTR -188[rbp], 1
	mov	eax, DWORD PTR -188[rbp]
	cdqe
	mov	eax, DWORD PTR -144[rbp+rax*4]
	mov	DWORD PTR -172[rbp], eax
	cmp	BYTE PTR -189[rbp], 43
	jne	.L21
	mov	eax, DWORD PTR -188[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -188[rbp], edx
	mov	ecx, DWORD PTR -176[rbp]
	mov	edx, DWORD PTR -172[rbp]
	add	edx, ecx
	cdqe
	mov	DWORD PTR -144[rbp+rax*4], edx
	jmp	.L32
.L21:
	cmp	BYTE PTR -189[rbp], 45
	jne	.L23
	mov	eax, DWORD PTR -188[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -188[rbp], edx
	mov	edx, DWORD PTR -176[rbp]
	sub	edx, DWORD PTR -172[rbp]
	cdqe
	mov	DWORD PTR -144[rbp+rax*4], edx
	jmp	.L32
.L23:
	cmp	BYTE PTR -189[rbp], 42
	jne	.L24
	mov	eax, DWORD PTR -188[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -188[rbp], edx
	mov	edx, DWORD PTR -176[rbp]
	imul	edx, DWORD PTR -172[rbp]
	cdqe
	mov	DWORD PTR -144[rbp+rax*4], edx
	jmp	.L32
.L24:
	cmp	BYTE PTR -189[rbp], 47
	jne	.L25
	cmp	DWORD PTR -172[rbp], 0
	jne	.L26
	mov	rax, QWORD PTR -152[rbp]
	mov	rdi, rax
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L26:
	mov	ecx, DWORD PTR -188[rbp]
	lea	eax, 1[rcx]
	mov	DWORD PTR -188[rbp], eax
	mov	eax, DWORD PTR -176[rbp]
	cdq
	idiv	DWORD PTR -172[rbp]
	mov	edx, eax
	movsx	rax, ecx
	mov	DWORD PTR -144[rbp+rax*4], edx
	jmp	.L32
.L25:
	cmp	BYTE PTR -189[rbp], 37
	jne	.L32
	cmp	DWORD PTR -172[rbp], 0
	jne	.L27
	mov	rax, QWORD PTR -152[rbp]
	mov	rdi, rax
	call	puts@PLT
	mov	edi, 0
	call	exit@PLT
.L27:
	mov	ecx, DWORD PTR -188[rbp]
	lea	eax, 1[rcx]
	mov	DWORD PTR -188[rbp], eax
	mov	eax, DWORD PTR -176[rbp]
	cdq
	idiv	DWORD PTR -172[rbp]
	movsx	rax, ecx
	mov	DWORD PTR -144[rbp+rax*4], edx
	jmp	.L32
.L19:
	cmp	BYTE PTR -189[rbp], 10
	jne	.L30
	mov	DWORD PTR -180[rbp], 0
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	pstr@PLT
	mov	eax, DWORD PTR -188[rbp]
	mov	edi, eax
	mov	eax, 0
	call	pnum@PLT
	mov	edi, 10
	call	putchar@PLT
	jmp	.L28
.L29:
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	pstr@PLT
	mov	eax, DWORD PTR -180[rbp]
	mov	edi, eax
	mov	eax, 0
	call	pnum@PLT
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	pstr@PLT
	mov	eax, DWORD PTR -180[rbp]
	cdqe
	mov	eax, DWORD PTR -144[rbp+rax*4]
	mov	edi, eax
	mov	eax, 0
	call	pnum@PLT
	mov	edi, 10
	call	putchar@PLT
	add	DWORD PTR -180[rbp], 1
.L28:
	mov	eax, DWORD PTR -180[rbp]
	cmp	eax, DWORD PTR -188[rbp]
	jl	.L29
	mov	DWORD PTR -184[rbp], 1
	jmp	.L30
.L32:
	nop
.L17:
	jmp	.L30
	.cfi_endproc
.LFE3:
	.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	"1008350.c"
	.text
	.global	buf
	.data
	.align	2
	.type	buf, %object
	.size	buf, 4
buf:
	.word	-1
	.text
	.align	2
	.global	read
	.syntax unified
	.arm
	.fpu softvfp
	.type	read, %function
read:
	@ 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, .L5
	ldr	r3, [r3]
	cmn	r3, #1
	beq	.L2
	ldr	r3, .L5
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, .L5
	mvn	r2, #0
	str	r2, [r3]
	b	.L3
.L2:
	bl	read
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L3
	mov	r0, #0
	bl	exit
.L3:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	buf
	.size	read, .-read
	.align	2
	.global	unread
	.syntax unified
	.arm
	.fpu softvfp
	.type	unread, %function
unread:
	@ 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
	str	r0, [fp, #-8]
	ldr	r2, .L8
	ldr	r3, [fp, #-8]
	str	r3, [r2]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L9:
	.align	2
.L8:
	.word	buf
	.size	unread, .-unread
	.align	2
	.global	readnum
	.syntax unified
	.arm
	.fpu softvfp
	.type	readnum, %function
readnum:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	cmp	r3, #45
	bne	.L11
	mov	r3, #1
	str	r3, [fp, #-8]
	b	.L14
.L11:
	ldr	r3, [fp, #-16]
	sub	r3, r3, #48
	ldr	r2, [fp, #-12]
	add	r3, r2, r3
	str	r3, [fp, #-12]
.L14:
	bl	read
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #47
	ble	.L13
	ldr	r3, [fp, #-16]
	cmp	r3, #57
	bgt	.L13
	ldr	r2, [fp, #-12]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-16]
	sub	r3, r3, #48
	ldr	r2, [fp, #-12]
	add	r3, r2, r3
	str	r3, [fp, #-12]
	b	.L14
.L13:
	ldr	r0, [fp, #-16]
	bl	unread
	nop
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L15
	ldr	r3, [fp, #-12]
	rsb	r3, r3, #0
	str	r3, [fp, #-12]
.L15:
	ldr	r3, [fp, #-12]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	readnum, .-readnum
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Stack Underflow.\000"
	.align	2
.LC1:
	.ascii	"Stack Overflow.\000"
	.align	2
.LC2:
	.ascii	"Error: Division by zero\000"
	.align	2
.LC3:
	.ascii	" $ \000"
	.global	__aeabi_idiv
	.global	__aeabi_idivmod
	.align	2
.LC4:
	.ascii	"SP=\000"
	.align	2
.LC5:
	.ascii	"BP+\000"
	.align	2
.LC6:
	.ascii	"=\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 168
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #172
	ldr	r3, .L37
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #144
	mov	r2, #128
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #0
	str	r3, [fp, #-176]
	mov	r3, #1
	str	r3, [fp, #-172]
	ldr	r3, .L37+4
	str	r3, [fp, #-164]
	ldr	r3, .L37+8
	str	r3, [fp, #-160]
	ldr	r3, .L37+12
	str	r3, [fp, #-156]
.L34:
	ldr	r3, [fp, #-172]
	cmp	r3, #0
	beq	.L18
	ldr	r0, .L37+16
	bl	pstr
	mov	r3, #0
	str	r3, [fp, #-172]
.L18:
	bl	read
	mov	r3, r0
	strb	r3, [fp, #-177]
	ldrb	r3, [fp, #-177]	@ zero_extendqisi2
	cmp	r3, #47
	bls	.L19
	ldrb	r3, [fp, #-177]	@ zero_extendqisi2
	cmp	r3, #57
	bhi	.L19
	ldr	r3, [fp, #-176]
	cmp	r3, #31
	ble	.L20
	ldr	r0, [fp, #-160]
	bl	puts
	mov	r0, #0
	bl	exit
.L20:
	ldrb	r3, [fp, #-177]	@ zero_extendqisi2
	mov	r0, r3
	bl	readnum
	mov	r2, r0
	ldr	r3, [fp, #-176]
	lsl	r3, r3, #2
	sub	r1, fp, #12
	add	r3, r1, r3
	str	r2, [r3, #-132]
	ldr	r3, [fp, #-176]
	add	r3, r3, #1
	str	r3, [fp, #-176]
	b	.L21
.L19:
	ldrb	r3, [fp, #-177]	@ zero_extendqisi2
	cmp	r3, #43
	beq	.L22
	ldrb	r3, [fp, #-177]	@ zero_extendqisi2
	cmp	r3, #45
	beq	.L22
	ldrb	r3, [fp, #-177]	@ zero_extendqisi2
	cmp	r3, #42
	beq	.L22
	ldrb	r3, [fp, #-177]	@ zero_extendqisi2
	cmp	r3, #47
	beq	.L22
	ldrb	r3, [fp, #-177]	@ zero_extendqisi2
	cmp	r3, #37
	bne	.L23
.L22:
	ldr	r3, [fp, #-176]
	cmp	r3, #1
	bgt	.L24
	ldr	r0, [fp, #-164]
	bl	puts
	mov	r0, #0
	bl	exit
.L24:
	ldr	r3, [fp, #-176]
	sub	r3, r3, #1
	str	r3, [fp, #-176]
	ldr	r3, [fp, #-176]
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r3, [r3, #-132]
	str	r3, [fp, #-152]
	ldr	r3, [fp, #-176]
	sub	r3, r3, #1
	str	r3, [fp, #-176]
	ldr	r3, [fp, #-176]
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r3, [r3, #-132]
	str	r3, [fp, #-148]
	ldrb	r3, [fp, #-177]	@ zero_extendqisi2
	cmp	r3, #43
	bne	.L25
	ldr	r3, [fp, #-176]
	add	r2, r3, #1
	str	r2, [fp, #-176]
	ldr	r1, [fp, #-152]
	ldr	r2, [fp, #-148]
	add	r2, r1, r2
	lsl	r3, r3, #2
	sub	r1, fp, #12
	add	r3, r1, r3
	str	r2, [r3, #-132]
	b	.L36
.L25:
	ldrb	r3, [fp, #-177]	@ zero_extendqisi2
	cmp	r3, #45
	bne	.L27
	ldr	r3, [fp, #-176]
	add	r2, r3, #1
	str	r2, [fp, #-176]
	ldr	r1, [fp, #-152]
	ldr	r2, [fp, #-148]
	sub	r2, r1, r2
	lsl	r3, r3, #2
	sub	r1, fp, #12
	add	r3, r1, r3
	str	r2, [r3, #-132]
	b	.L36
.L27:
	ldrb	r3, [fp, #-177]	@ zero_extendqisi2
	cmp	r3, #42
	bne	.L28
	ldr	r3, [fp, #-176]
	add	r2, r3, #1
	str	r2, [fp, #-176]
	ldr	r2, [fp, #-152]
	ldr	r1, [fp, #-148]
	mul	r2, r1, r2
	lsl	r3, r3, #2
	sub	r1, fp, #12
	add	r3, r1, r3
	str	r2, [r3, #-132]
	b	.L36
.L28:
	ldrb	r3, [fp, #-177]	@ zero_extendqisi2
	cmp	r3, #47
	bne	.L29
	ldr	r3, [fp, #-148]
	cmp	r3, #0
	bne	.L30
	ldr	r0, [fp, #-156]
	bl	puts
	mov	r0, #0
	bl	exit
.L30:
	ldr	r4, [fp, #-176]
	add	r3, r4, #1
	str	r3, [fp, #-176]
	ldr	r1, [fp, #-148]
	ldr	r0, [fp, #-152]
	bl	__aeabi_idiv
	mov	r3, r0
	mov	r2, r3
	lsl	r3, r4, #2
	sub	r1, fp, #12
	add	r3, r1, r3
	str	r2, [r3, #-132]
	b	.L36
.L29:
	ldrb	r3, [fp, #-177]	@ zero_extendqisi2
	cmp	r3, #37
	bne	.L36
	ldr	r3, [fp, #-148]
	cmp	r3, #0
	bne	.L31
	ldr	r0, [fp, #-156]
	bl	puts
	mov	r0, #0
	bl	exit
.L31:
	ldr	r4, [fp, #-176]
	add	r3, r4, #1
	str	r3, [fp, #-176]
	ldr	r3, [fp, #-152]
	ldr	r1, [fp, #-148]
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	mov	r2, r3
	lsl	r3, r4, #2
	sub	r1, fp, #12
	add	r3, r1, r3
	str	r2, [r3, #-132]
	b	.L36
.L23:
	ldrb	r3, [fp, #-177]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L34
	mov	r3, #0
	str	r3, [fp, #-168]
	ldr	r0, .L37+20
	bl	pstr
	ldr	r0, [fp, #-176]
	bl	pnum
	mov	r0, #10
	bl	putchar
	b	.L32
.L33:
	ldr	r0, .L37+24
	bl	pstr
	ldr	r0, [fp, #-168]
	bl	pnum
	ldr	r0, .L37+28
	bl	pstr
	ldr	r3, [fp, #-168]
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r3, [r3, #-132]
	mov	r0, r3
	bl	pnum
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-168]
	add	r3, r3, #1
	str	r3, [fp, #-168]
.L32:
	ldr	r2, [fp, #-168]
	ldr	r3, [fp, #-176]
	cmp	r2, r3
	blt	.L33
	mov	r3, #1
	str	r3, [fp, #-172]
	b	.L34
.L36:
	nop
.L21:
	b	.L34
.L38:
	.align	2
.L37:
	.word	.LC7
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
