	.file	"236227.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"%d\n"
	.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, 16
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	jmp	.L2
.L3:
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
.L2:
	lea	rax, -12[rbp]
	mov	rdi, rax
	call	getint
	test	eax, eax
	jg	.L3
	mov	eax, 0
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	getint
	.type	getint, @function
getint:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 40
	.cfi_offset 3, -24
	mov	QWORD PTR -40[rbp], rdi
	nop
.L7:
	call	__ctype_b_loc@PLT
	mov	rbx, QWORD PTR [rax]
	call	getch
	mov	DWORD PTR -24[rbp], eax
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	add	rax, rax
	add	rax, rbx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 8192
	test	eax, eax
	jne	.L7
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 2048
	test	eax, eax
	jne	.L8
	cmp	DWORD PTR -24[rbp], -1
	je	.L8
	cmp	DWORD PTR -24[rbp], 43
	je	.L8
	cmp	DWORD PTR -24[rbp], 45
	je	.L8
	mov	eax, DWORD PTR -24[rbp]
	mov	edi, eax
	call	ungetch
	mov	eax, 0
	jmp	.L9
.L8:
	cmp	DWORD PTR -24[rbp], 45
	jne	.L10
	mov	eax, -1
	jmp	.L11
.L10:
	mov	eax, 1
.L11:
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -24[rbp], 43
	je	.L12
	cmp	DWORD PTR -24[rbp], 45
	jne	.L13
.L12:
	call	getch
	mov	DWORD PTR -24[rbp], eax
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 2048
	test	eax, eax
	jne	.L13
	cmp	DWORD PTR -24[rbp], -1
	je	.L14
	mov	eax, DWORD PTR -24[rbp]
	mov	edi, eax
	call	ungetch
	cmp	DWORD PTR -20[rbp], 0
	jle	.L15
	mov	eax, 43
	jmp	.L16
.L15:
	mov	eax, 45
.L16:
	mov	edi, eax
	call	ungetch
	mov	eax, 0
	jmp	.L9
.L14:
	mov	eax, DWORD PTR -24[rbp]
	jmp	.L9
.L13:
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR [rax], 0
	jmp	.L17
.L18:
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR [rax]
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	mov	edx, eax
	mov	eax, DWORD PTR -24[rbp]
	sub	eax, 48
	add	edx, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR [rax], edx
	call	getch
	mov	DWORD PTR -24[rbp], eax
.L17:
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 2048
	test	eax, eax
	jne	.L18
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR [rax]
	imul	eax, DWORD PTR -20[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR [rax], edx
	cmp	DWORD PTR -24[rbp], -1
	je	.L19
	mov	eax, DWORD PTR -24[rbp]
	mov	edi, eax
	call	ungetch
.L19:
	mov	eax, DWORD PTR -24[rbp]
.L9:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	getint, .-getint
	.local	buf
	.comm	buf,100,32
	.local	bufp
	.comm	bufp,4,4
	.local	eof_encountered
	.comm	eof_encountered,4,4
	.globl	getch
	.type	getch, @function
getch:
.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, 16
	mov	eax, DWORD PTR eof_encountered[rip]
	test	eax, eax
	je	.L21
	mov	eax, -1
	jmp	.L22
.L21:
	mov	eax, DWORD PTR bufp[rip]
	test	eax, eax
	jle	.L23
	mov	eax, DWORD PTR bufp[rip]
	sub	eax, 1
	mov	DWORD PTR bufp[rip], eax
	mov	eax, DWORD PTR bufp[rip]
	cdqe
	lea	rdx, buf[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	movsx	eax, al
	jmp	.L24
.L23:
	call	getchar@PLT
.L24:
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	jne	.L25
	mov	DWORD PTR eof_encountered[rip], 1
.L25:
	mov	eax, DWORD PTR -4[rbp]
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	getch, .-getch
	.section	.rodata
.LC1:
	.string	"ungetch: too many characters"
	.text
	.globl	ungetch
	.type	ungetch, @function
ungetch:
.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, 16
	mov	DWORD PTR -4[rbp], edi
	mov	eax, DWORD PTR bufp[rip]
	cmp	eax, 99
	jle	.L27
	lea	rdi, .LC1[rip]
	call	puts@PLT
	jmp	.L29
.L27:
	mov	eax, DWORD PTR bufp[rip]
	lea	edx, 1[rax]
	mov	DWORD PTR bufp[rip], edx
	mov	edx, DWORD PTR -4[rbp]
	mov	ecx, edx
	cdqe
	lea	rdx, buf[rip]
	mov	BYTE PTR [rax+rdx], cl
.L29:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	ungetch, .-ungetch
	.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	"236227.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d\012\000"
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.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
	ldr	r3, .L6
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	b	.L2
.L3:
	ldr	r3, [fp, #-12]
	mov	r1, r3
	ldr	r0, .L6+4
	bl	printf
.L2:
	sub	r3, fp, #12
	mov	r0, r3
	bl	getint
	mov	r3, r0
	cmp	r3, #0
	bgt	.L3
	mov	r3, #0
	ldr	r2, .L6
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L5
	bl	__stack_chk_fail
.L5:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	.LC1
	.word	.LC0
	.size	main, .-main
	.align	2
	.global	getint
	.syntax unified
	.arm
	.fpu softvfp
	.type	getint, %function
getint:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-24]
	nop
.L9:
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r4, [r3]
	bl	getch
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #1
	add	r3, r4, r3
	ldrh	r3, [r3]
	and	r3, r3, #8192
	cmp	r3, #0
	bne	.L9
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #2048
	cmp	r3, #0
	bne	.L10
	ldr	r3, [fp, #-20]
	cmn	r3, #1
	beq	.L10
	ldr	r3, [fp, #-20]
	cmp	r3, #43
	beq	.L10
	ldr	r3, [fp, #-20]
	cmp	r3, #45
	beq	.L10
	ldr	r0, [fp, #-20]
	bl	ungetch
	mov	r3, #0
	b	.L11
.L10:
	ldr	r3, [fp, #-20]
	cmp	r3, #45
	bne	.L12
	mvn	r3, #0
	b	.L13
.L12:
	mov	r3, #1
.L13:
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-20]
	cmp	r3, #43
	beq	.L14
	ldr	r3, [fp, #-20]
	cmp	r3, #45
	bne	.L15
.L14:
	bl	getch
	str	r0, [fp, #-20]
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #2048
	cmp	r3, #0
	bne	.L15
	ldr	r3, [fp, #-20]
	cmn	r3, #1
	beq	.L16
	ldr	r0, [fp, #-20]
	bl	ungetch
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	ble	.L17
	mov	r3, #43
	b	.L18
.L17:
	mov	r3, #45
.L18:
	mov	r0, r3
	bl	ungetch
	mov	r3, #0
	b	.L11
.L16:
	ldr	r3, [fp, #-20]
	b	.L11
.L15:
	ldr	r3, [fp, #-24]
	mov	r2, #0
	str	r2, [r3]
	b	.L19
.L20:
	ldr	r3, [fp, #-24]
	ldr	r2, [r3]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	mov	r2, r3
	ldr	r3, [fp, #-20]
	sub	r3, r3, #48
	add	r2, r2, r3
	ldr	r3, [fp, #-24]
	str	r2, [r3]
	bl	getch
	str	r0, [fp, #-20]
.L19:
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #2048
	cmp	r3, #0
	bne	.L20
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	mul	r2, r3, r2
	ldr	r3, [fp, #-24]
	str	r2, [r3]
	ldr	r3, [fp, #-20]
	cmn	r3, #1
	beq	.L21
	ldr	r0, [fp, #-20]
	bl	ungetch
.L21:
	ldr	r3, [fp, #-20]
.L11:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
	.size	getint, .-getint
	.local	buf
	.comm	buf,100,4
	.local	bufp
	.comm	bufp,4,4
	.local	eof_encountered
	.comm	eof_encountered,4,4
	.align	2
	.global	getch
	.syntax unified
	.arm
	.fpu softvfp
	.type	getch, %function
getch:
	@ 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, .L28
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L23
	mvn	r3, #0
	b	.L24
.L23:
	ldr	r3, .L28+4
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L25
	ldr	r3, .L28+4
	ldr	r3, [r3]
	sub	r3, r3, #1
	ldr	r2, .L28+4
	str	r3, [r2]
	ldr	r3, .L28+4
	ldr	r3, [r3]
	ldr	r2, .L28+8
	ldrb	r3, [r2, r3]	@ zero_extendqisi2
	b	.L26
.L25:
	bl	getchar
	mov	r3, r0
.L26:
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L27
	ldr	r3, .L28
	mov	r2, #1
	str	r2, [r3]
.L27:
	ldr	r3, [fp, #-8]
.L24:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L29:
	.align	2
.L28:
	.word	eof_encountered
	.word	bufp
	.word	buf
	.size	getch, .-getch
	.section	.rodata
	.align	2
.LC2:
	.ascii	"ungetch: too many characters\000"
	.text
	.align	2
	.global	ungetch
	.syntax unified
	.arm
	.fpu softvfp
	.type	ungetch, %function
ungetch:
	@ 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	r3, .L34
	ldr	r3, [r3]
	cmp	r3, #99
	ble	.L31
	ldr	r0, .L34+4
	bl	puts
	b	.L33
.L31:
	ldr	r3, .L34
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r1, .L34
	str	r2, [r1]
	ldr	r2, [fp, #-8]
	and	r1, r2, #255
	ldr	r2, .L34+8
	strb	r1, [r2, r3]
.L33:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L35:
	.align	2
.L34:
	.word	bufp
	.word	.LC2
	.word	buf
	.size	ungetch, .-ungetch
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
