	.file	"20450704.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"Enter a integer/whole number [AS STRING]: "
.LC1:
	.string	"%s"
	.align 8
.LC2:
	.string	"\nThe number you have entered is %d [AS INTEGER].\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.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, 88
	.cfi_offset 3, -24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -84[rbp], 0
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -80[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	DWORD PTR -88[rbp], 0
	jmp	.L2
.L3:
	mov	edx, DWORD PTR -84[rbp]
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	mov	ebx, eax
	mov	eax, DWORD PTR -88[rbp]
	cdqe
	movzx	eax, BYTE PTR -80[rbp+rax]
	movsx	eax, al
	mov	edi, eax
	call	strtoint
	add	eax, ebx
	mov	DWORD PTR -84[rbp], eax
	add	DWORD PTR -88[rbp], 1
.L2:
	mov	eax, DWORD PTR -88[rbp]
	movsx	rbx, eax
	lea	rax, -80[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rbx, rax
	jb	.L3
	mov	eax, DWORD PTR -84[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -24[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	strtoint
	.type	strtoint, @function
strtoint:
.LFB7:
	.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	BYTE PTR -4[rbp], al
	cmp	BYTE PTR -4[rbp], 49
	jne	.L7
	mov	eax, 1
	jmp	.L6
.L7:
	cmp	BYTE PTR -4[rbp], 50
	jne	.L9
	mov	eax, 2
	jmp	.L6
.L9:
	cmp	BYTE PTR -4[rbp], 51
	jne	.L10
	mov	eax, 3
	jmp	.L6
.L10:
	cmp	BYTE PTR -4[rbp], 52
	jne	.L11
	mov	eax, 4
	jmp	.L6
.L11:
	cmp	BYTE PTR -4[rbp], 53
	jne	.L12
	mov	eax, 5
	jmp	.L6
.L12:
	cmp	BYTE PTR -4[rbp], 54
	jne	.L13
	mov	eax, 6
	jmp	.L6
.L13:
	cmp	BYTE PTR -4[rbp], 55
	jne	.L14
	mov	eax, 7
	jmp	.L6
.L14:
	cmp	BYTE PTR -4[rbp], 56
	jne	.L15
	mov	eax, 8
	jmp	.L6
.L15:
	cmp	BYTE PTR -4[rbp], 57
	jne	.L16
	mov	eax, 9
	jmp	.L6
.L16:
	cmp	BYTE PTR -4[rbp], 48
	jne	.L17
	mov	eax, 0
	jmp	.L6
.L17:
.L6:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	strtoint, .-strtoint
	.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	"20450704.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Enter a integer/whole number [AS STRING]: \000"
	.align	2
.LC1:
	.ascii	"%s\000"
	.align	2
.LC2:
	.ascii	"\012The number you have entered is %d [AS INTEGER]."
	.ascii	"\012\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #68
	ldr	r3, .L6
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-72]
	ldr	r0, .L6+4
	bl	printf
	sub	r3, fp, #68
	mov	r1, r3
	ldr	r0, .L6+8
	bl	__isoc99_scanf
	mov	r3, #0
	str	r3, [fp, #-76]
	b	.L2
.L3:
	ldr	r2, [fp, #-72]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	mov	r4, r3
	sub	r2, fp, #68
	ldr	r3, [fp, #-76]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	strtoint
	mov	r3, r0
	add	r3, r4, r3
	str	r3, [fp, #-72]
	ldr	r3, [fp, #-76]
	add	r3, r3, #1
	str	r3, [fp, #-76]
.L2:
	sub	r3, fp, #68
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-76]
	cmp	r2, r3
	bhi	.L3
	ldr	r1, [fp, #-72]
	ldr	r0, .L6+12
	bl	printf
	mov	r3, #0
	ldr	r2, .L6
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L5
	bl	__stack_chk_fail
.L5:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L7:
	.align	2
.L6:
	.word	.LC3
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	main, .-main
	.align	2
	.global	strtoint
	.syntax unified
	.arm
	.fpu softvfp
	.type	strtoint, %function
strtoint:
	@ 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
	strb	r3, [fp, #-5]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #49
	bne	.L9
	mov	r3, #1
	b	.L8
.L9:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #50
	bne	.L11
	mov	r3, #2
	b	.L8
.L11:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #51
	bne	.L12
	mov	r3, #3
	b	.L8
.L12:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #52
	bne	.L13
	mov	r3, #4
	b	.L8
.L13:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #53
	bne	.L14
	mov	r3, #5
	b	.L8
.L14:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #54
	bne	.L15
	mov	r3, #6
	b	.L8
.L15:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #55
	bne	.L16
	mov	r3, #7
	b	.L8
.L16:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #56
	bne	.L17
	mov	r3, #8
	b	.L8
.L17:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #57
	bne	.L18
	mov	r3, #9
	b	.L8
.L18:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #48
	bne	.L19
	mov	r3, #0
	b	.L8
.L19:
.L8:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	strtoint, .-strtoint
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
