	.file	"89181.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Enter the input string: "
.LC1:
	.string	"%s"
.LC2:
	.string	"Enter the number of pages: "
.LC3:
	.string	"%d"
	.align 8
.LC4:
	.string	"The number of page faults are: %d\n"
	.align 8
.LC5:
	.string	"The number of page hits are: %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, 672
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -644[rbp], 0
	mov	DWORD PTR -640[rbp], 0
	mov	DWORD PTR -636[rbp], 1
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -224[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rax, -224[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -628[rbp], eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -660[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	DWORD PTR -656[rbp], 0
	jmp	.L2
.L3:
	mov	eax, DWORD PTR -656[rbp]
	cdqe
	movzx	edx, BYTE PTR -224[rbp+rax]
	mov	eax, DWORD PTR -656[rbp]
	cdqe
	mov	BYTE PTR -112[rbp+rax], dl
	mov	eax, DWORD PTR -656[rbp]
	cdqe
	mov	DWORD PTR -624[rbp+rax*4], -1
	add	DWORD PTR -644[rbp], 1
	add	DWORD PTR -656[rbp], 1
.L2:
	mov	eax, DWORD PTR -660[rbp]
	cmp	DWORD PTR -656[rbp], eax
	jl	.L3
	mov	eax, DWORD PTR -660[rbp]
	mov	DWORD PTR -656[rbp], eax
	jmp	.L4
.L19:
	mov	DWORD PTR -652[rbp], 0
	jmp	.L5
.L7:
	mov	eax, DWORD PTR -652[rbp]
	cdqe
	movzx	edx, BYTE PTR -112[rbp+rax]
	mov	eax, DWORD PTR -656[rbp]
	cdqe
	movzx	eax, BYTE PTR -224[rbp+rax]
	cmp	dl, al
	jne	.L6
	add	DWORD PTR -640[rbp], 1
	mov	DWORD PTR -636[rbp], 0
.L6:
	add	DWORD PTR -652[rbp], 1
.L5:
	mov	eax, DWORD PTR -660[rbp]
	cmp	DWORD PTR -652[rbp], eax
	jl	.L7
	cmp	DWORD PTR -636[rbp], 1
	jne	.L8
	mov	DWORD PTR -652[rbp], 0
	jmp	.L9
.L13:
	mov	eax, DWORD PTR -656[rbp]
	sub	eax, 1
	mov	DWORD PTR -648[rbp], eax
	jmp	.L10
.L12:
	mov	eax, DWORD PTR -652[rbp]
	cdqe
	movzx	edx, BYTE PTR -112[rbp+rax]
	mov	eax, DWORD PTR -648[rbp]
	cdqe
	movzx	eax, BYTE PTR -224[rbp+rax]
	cmp	dl, al
	jne	.L11
	mov	eax, DWORD PTR -656[rbp]
	cdqe
	mov	edx, DWORD PTR -648[rbp]
	mov	DWORD PTR -624[rbp+rax*4], edx
	mov	DWORD PTR -648[rbp], 0
.L11:
	sub	DWORD PTR -648[rbp], 1
.L10:
	cmp	DWORD PTR -648[rbp], 0
	jns	.L12
	add	DWORD PTR -652[rbp], 1
.L9:
	mov	eax, DWORD PTR -660[rbp]
	cmp	DWORD PTR -652[rbp], eax
	jl	.L13
	mov	DWORD PTR -632[rbp], 0
	mov	DWORD PTR -652[rbp], 0
	jmp	.L14
.L16:
	mov	eax, DWORD PTR -632[rbp]
	cdqe
	mov	edx, DWORD PTR -624[rbp+rax*4]
	mov	eax, DWORD PTR -652[rbp]
	cdqe
	mov	eax, DWORD PTR -624[rbp+rax*4]
	cmp	edx, eax
	jle	.L15
	mov	eax, DWORD PTR -652[rbp]
	mov	DWORD PTR -632[rbp], eax
.L15:
	add	DWORD PTR -652[rbp], 1
.L14:
	mov	eax, DWORD PTR -660[rbp]
	cmp	DWORD PTR -652[rbp], eax
	jl	.L16
	mov	eax, DWORD PTR -656[rbp]
	cdqe
	movzx	edx, BYTE PTR -224[rbp+rax]
	mov	eax, DWORD PTR -632[rbp]
	cdqe
	mov	BYTE PTR -112[rbp+rax], dl
	add	DWORD PTR -644[rbp], 1
.L8:
	mov	DWORD PTR -636[rbp], 1
	mov	DWORD PTR -652[rbp], 0
	jmp	.L17
.L18:
	mov	eax, DWORD PTR -656[rbp]
	cdqe
	mov	DWORD PTR -624[rbp+rax*4], -1
	add	DWORD PTR -652[rbp], 1
.L17:
	mov	eax, DWORD PTR -660[rbp]
	cmp	DWORD PTR -652[rbp], eax
	jl	.L18
	add	DWORD PTR -656[rbp], 1
.L4:
	mov	eax, DWORD PTR -656[rbp]
	cmp	eax, DWORD PTR -628[rbp]
	jl	.L19
	mov	eax, DWORD PTR -644[rbp]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -628[rbp]
	sub	eax, DWORD PTR -644[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	.L21
	call	__stack_chk_fail@PLT
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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	"89181.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Enter the input string: \000"
	.align	2
.LC1:
	.ascii	"%s\000"
	.align	2
.LC2:
	.ascii	"Enter the number of pages: \000"
	.align	2
.LC3:
	.ascii	"%d\000"
	.align	2
.LC4:
	.ascii	"The number of page faults are: %d\012\000"
	.align	2
.LC5:
	.ascii	"The number of page hits are: %d\012\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 = 640
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #640
	ldr	r3, .L22
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-628]
	mov	r3, #0
	str	r3, [fp, #-624]
	mov	r3, #1
	str	r3, [fp, #-620]
	ldr	r0, .L22+4
	bl	printf
	sub	r3, fp, #208
	mov	r1, r3
	ldr	r0, .L22+8
	bl	__isoc99_scanf
	sub	r3, fp, #208
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-612]
	ldr	r0, .L22+12
	bl	printf
	sub	r3, fp, #644
	mov	r1, r3
	ldr	r0, .L22+16
	bl	__isoc99_scanf
	mov	r3, #0
	str	r3, [fp, #-640]
	b	.L2
.L3:
	sub	r2, fp, #208
	ldr	r3, [fp, #-640]
	add	r3, r2, r3
	ldrb	r1, [r3]	@ zero_extendqisi2
	sub	r2, fp, #108
	ldr	r3, [fp, #-640]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	ldr	r3, [fp, #-640]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	mvn	r2, #0
	str	r2, [r3, #-604]
	ldr	r3, [fp, #-628]
	add	r3, r3, #1
	str	r3, [fp, #-628]
	ldr	r3, [fp, #-640]
	add	r3, r3, #1
	str	r3, [fp, #-640]
.L2:
	ldr	r3, [fp, #-644]
	ldr	r2, [fp, #-640]
	cmp	r2, r3
	blt	.L3
	ldr	r3, [fp, #-644]
	str	r3, [fp, #-640]
	b	.L4
.L19:
	mov	r3, #0
	str	r3, [fp, #-636]
	b	.L5
.L7:
	sub	r2, fp, #108
	ldr	r3, [fp, #-636]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	sub	r1, fp, #208
	ldr	r3, [fp, #-640]
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r2, r3
	bne	.L6
	ldr	r3, [fp, #-624]
	add	r3, r3, #1
	str	r3, [fp, #-624]
	mov	r3, #0
	str	r3, [fp, #-620]
.L6:
	ldr	r3, [fp, #-636]
	add	r3, r3, #1
	str	r3, [fp, #-636]
.L5:
	ldr	r3, [fp, #-644]
	ldr	r2, [fp, #-636]
	cmp	r2, r3
	blt	.L7
	ldr	r3, [fp, #-620]
	cmp	r3, #1
	bne	.L8
	mov	r3, #0
	str	r3, [fp, #-636]
	b	.L9
.L13:
	ldr	r3, [fp, #-640]
	sub	r3, r3, #1
	str	r3, [fp, #-632]
	b	.L10
.L12:
	sub	r2, fp, #108
	ldr	r3, [fp, #-636]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	sub	r1, fp, #208
	ldr	r3, [fp, #-632]
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r2, r3
	bne	.L11
	ldr	r3, [fp, #-640]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [fp, #-632]
	str	r2, [r3, #-604]
	mov	r3, #0
	str	r3, [fp, #-632]
.L11:
	ldr	r3, [fp, #-632]
	sub	r3, r3, #1
	str	r3, [fp, #-632]
.L10:
	ldr	r3, [fp, #-632]
	cmp	r3, #0
	bge	.L12
	ldr	r3, [fp, #-636]
	add	r3, r3, #1
	str	r3, [fp, #-636]
.L9:
	ldr	r3, [fp, #-644]
	ldr	r2, [fp, #-636]
	cmp	r2, r3
	blt	.L13
	mov	r3, #0
	str	r3, [fp, #-616]
	mov	r3, #0
	str	r3, [fp, #-636]
	b	.L14
.L16:
	ldr	r3, [fp, #-616]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-604]
	ldr	r3, [fp, #-636]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r3, [r3, #-604]
	cmp	r2, r3
	ble	.L15
	ldr	r3, [fp, #-636]
	str	r3, [fp, #-616]
.L15:
	ldr	r3, [fp, #-636]
	add	r3, r3, #1
	str	r3, [fp, #-636]
.L14:
	ldr	r3, [fp, #-644]
	ldr	r2, [fp, #-636]
	cmp	r2, r3
	blt	.L16
	sub	r2, fp, #208
	ldr	r3, [fp, #-640]
	add	r3, r2, r3
	ldrb	r1, [r3]	@ zero_extendqisi2
	sub	r2, fp, #108
	ldr	r3, [fp, #-616]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	ldr	r3, [fp, #-628]
	add	r3, r3, #1
	str	r3, [fp, #-628]
.L8:
	mov	r3, #1
	str	r3, [fp, #-620]
	mov	r3, #0
	str	r3, [fp, #-636]
	b	.L17
.L18:
	ldr	r3, [fp, #-640]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	mvn	r2, #0
	str	r2, [r3, #-604]
	ldr	r3, [fp, #-636]
	add	r3, r3, #1
	str	r3, [fp, #-636]
.L17:
	ldr	r3, [fp, #-644]
	ldr	r2, [fp, #-636]
	cmp	r2, r3
	blt	.L18
	ldr	r3, [fp, #-640]
	add	r3, r3, #1
	str	r3, [fp, #-640]
.L4:
	ldr	r2, [fp, #-640]
	ldr	r3, [fp, #-612]
	cmp	r2, r3
	blt	.L19
	ldr	r1, [fp, #-628]
	ldr	r0, .L22+20
	bl	printf
	ldr	r2, [fp, #-612]
	ldr	r3, [fp, #-628]
	sub	r3, r2, r3
	mov	r1, r3
	ldr	r0, .L22+24
	bl	printf
	mov	r3, #0
	ldr	r2, .L22
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L21
	bl	__stack_chk_fail
.L21:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L23:
	.align	2
.L22:
	.word	.LC6
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
