	.file	"576846.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"r"
.LC1:
	.string	"test.txt"
.LC2:
	.string	"File doesn't exist"
.LC3:
	.string	"that"
	.align 8
.LC4:
	.string	"Number of times the given word occurs in file is %d\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
	sub	rsp, 112
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -108[rbp], 0
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	fopen@PLT
	mov	QWORD PTR -104[rbp], rax
	cmp	QWORD PTR -104[rbp], 0
	jne	.L3
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	lea	rax, -96[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	display
	add	DWORD PTR -108[rbp], eax
.L3:
	mov	rdx, QWORD PTR -104[rbp]
	lea	rax, -96[rbp]
	mov	esi, 81
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L4
	mov	eax, DWORD PTR -108[rbp]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -104[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC5:
	.string	"%s"
.LC6:
	.string	"count = %d\n"
	.text
	.globl	display
	.type	display, @function
display:
.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, 144
	mov	QWORD PTR -136[rbp], rdi
	mov	QWORD PTR -144[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -104[rbp], 0
	mov	rax, QWORD PTR -144[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -100[rbp], eax
	mov	DWORD PTR -116[rbp], 0
	jmp	.L8
.L12:
	mov	DWORD PTR -108[rbp], 0
	mov	eax, DWORD PTR -116[rbp]
	cdqe
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -136[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	call	is_end
	test	eax, eax
	je	.L9
	mov	edx, DWORD PTR -116[rbp]
	mov	eax, DWORD PTR -100[rbp]
	add	eax, edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -136[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	call	is_end
	test	eax, eax
	je	.L9
	mov	DWORD PTR -108[rbp], 0
	mov	eax, DWORD PTR -116[rbp]
	mov	DWORD PTR -112[rbp], eax
	jmp	.L10
.L11:
	mov	eax, DWORD PTR -112[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -136[rbp]
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	mov	eax, DWORD PTR -108[rbp]
	cdqe
	mov	BYTE PTR -96[rbp+rax], dl
	add	DWORD PTR -112[rbp], 1
	add	DWORD PTR -108[rbp], 1
.L10:
	mov	eax, DWORD PTR -108[rbp]
	cmp	eax, DWORD PTR -100[rbp]
	jl	.L11
	mov	eax, DWORD PTR -108[rbp]
	cdqe
	mov	BYTE PTR -96[rbp+rax], 0
	mov	rdx, QWORD PTR -144[rbp]
	lea	rax, -96[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L9
	add	DWORD PTR -104[rbp], 1
.L9:
	add	DWORD PTR -116[rbp], 1
.L8:
	mov	eax, DWORD PTR -116[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -136[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L12
	cmp	DWORD PTR -104[rbp], 0
	jle	.L13
	mov	rax, QWORD PTR -136[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -104[rbp]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
.L13:
	mov	eax, DWORD PTR -104[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	display, .-display
	.globl	is_end
	.type	is_end, @function
is_end:
.LFB8:
	.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
	cmp	DWORD PTR -4[rbp], 59
	jg	.L17
	cmp	DWORD PTR -4[rbp], 9
	jl	.L18
	mov	eax, DWORD PTR -4[rbp]
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	movabs	rax, 864796685866370560
	and	rax, rdx
	test	rax, rax
	setne	al
	test	al, al
	jne	.L19
	jmp	.L18
.L17:
	cmp	DWORD PTR -4[rbp], 11296
	jne	.L18
.L19:
	mov	eax, 1
	jmp	.L20
.L18:
	mov	eax, 0
.L20:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	is_end, .-is_end
	.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	"576846.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"r\000"
	.align	2
.LC1:
	.ascii	"test.txt\000"
	.align	2
.LC2:
	.ascii	"File doesn't exist\000"
	.align	2
.LC3:
	.ascii	"that\000"
	.align	2
.LC4:
	.ascii	"Number of times the given word occurs in file is %d"
	.ascii	"\012\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 96
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #96
	ldr	r3, .L7
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-100]
	ldr	r1, .L7+4
	ldr	r0, .L7+8
	bl	fopen
	str	r0, [fp, #-96]
	ldr	r3, [fp, #-96]
	cmp	r3, #0
	bne	.L3
	ldr	r0, .L7+12
	bl	puts
	mov	r0, #1
	bl	exit
.L4:
	sub	r3, fp, #92
	ldr	r1, .L7+16
	mov	r0, r3
	bl	display
	mov	r2, r0
	ldr	r3, [fp, #-100]
	add	r3, r3, r2
	str	r3, [fp, #-100]
.L3:
	sub	r3, fp, #92
	ldr	r2, [fp, #-96]
	mov	r1, #81
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L4
	ldr	r1, [fp, #-100]
	ldr	r0, .L7+20
	bl	printf
	ldr	r0, [fp, #-96]
	bl	fclose
	mov	r3, #0
	ldr	r2, .L7
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L6
	bl	__stack_chk_fail
.L6:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L8:
	.align	2
.L7:
	.word	.LC5
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.section	.rodata
	.align	2
.LC6:
	.ascii	"%s\000"
	.align	2
.LC7:
	.ascii	"count = %d\012\000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	display
	.syntax unified
	.arm
	.fpu softvfp
	.type	display, %function
display:
	@ args = 0, pretend = 0, frame = 112
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #112
	str	r0, [fp, #-112]
	str	r1, [fp, #-116]
	ldr	r3, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-96]
	ldr	r0, [fp, #-116]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-92]
	mov	r3, #0
	str	r3, [fp, #-108]
	b	.L10
.L14:
	mov	r3, #0
	str	r3, [fp, #-100]
	ldr	r3, [fp, #-108]
	sub	r3, r3, #1
	ldr	r2, [fp, #-112]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	is_end
	mov	r3, r0
	cmp	r3, #0
	beq	.L11
	ldr	r2, [fp, #-108]
	ldr	r3, [fp, #-92]
	add	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-112]
	add	r3, r3, r2
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	is_end
	mov	r3, r0
	cmp	r3, #0
	beq	.L11
	mov	r3, #0
	str	r3, [fp, #-100]
	ldr	r3, [fp, #-108]
	str	r3, [fp, #-104]
	b	.L12
.L13:
	ldr	r3, [fp, #-104]
	ldr	r2, [fp, #-112]
	add	r3, r2, r3
	ldrb	r1, [r3]	@ zero_extendqisi2
	sub	r2, fp, #88
	ldr	r3, [fp, #-100]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	ldr	r3, [fp, #-104]
	add	r3, r3, #1
	str	r3, [fp, #-104]
	ldr	r3, [fp, #-100]
	add	r3, r3, #1
	str	r3, [fp, #-100]
.L12:
	ldr	r2, [fp, #-100]
	ldr	r3, [fp, #-92]
	cmp	r2, r3
	blt	.L13
	sub	r2, fp, #88
	ldr	r3, [fp, #-100]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #88
	ldr	r1, [fp, #-116]
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L11
	ldr	r3, [fp, #-96]
	add	r3, r3, #1
	str	r3, [fp, #-96]
.L11:
	ldr	r3, [fp, #-108]
	add	r3, r3, #1
	str	r3, [fp, #-108]
.L10:
	ldr	r3, [fp, #-108]
	ldr	r2, [fp, #-112]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L14
	ldr	r3, [fp, #-96]
	cmp	r3, #0
	ble	.L15
	ldr	r1, [fp, #-112]
	ldr	r0, .L18+4
	bl	printf
	ldr	r1, [fp, #-96]
	ldr	r0, .L18+8
	bl	printf
.L15:
	ldr	r3, [fp, #-96]
	ldr	r2, .L18
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L17
	bl	__stack_chk_fail
.L17:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC8
	.word	.LC6
	.word	.LC7
	.size	display, .-display
	.align	2
	.global	is_end
	.syntax unified
	.arm
	.fpu softvfp
	.type	is_end, %function
is_end:
	@ 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	r3, [fp, #-8]
	cmp	r3, #59
	bgt	.L21
	ldr	r3, [fp, #-8]
	cmp	r3, #9
	blt	.L22
	ldr	r3, [fp, #-8]
	sub	r3, r3, #9
	cmp	r3, #50
	ldrls	pc, [pc, r3, asl #2]
	b	.L22
.L24:
	.word	.L23
	.word	.L23
	.word	.L22
	.word	.L22
	.word	.L22
	.word	.L22
	.word	.L22
	.word	.L22
	.word	.L22
	.word	.L22
	.word	.L22
	.word	.L22
	.word	.L22
	.word	.L22
	.word	.L22
	.word	.L22
	.word	.L22
	.word	.L22
	.word	.L22
	.word	.L22
	.word	.L22
	.word	.L22
	.word	.L22
	.word	.L23
	.word	.L22
	.word	.L22
	.word	.L22
	.word	.L22
	.word	.L22
	.word	.L22
	.word	.L22
	.word	.L22
	.word	.L22
	.word	.L22
	.word	.L22
	.word	.L22
	.word	.L23
	.word	.L23
	.word	.L22
	.word	.L22
	.word	.L22
	.word	.L22
	.word	.L22
	.word	.L22
	.word	.L22
	.word	.L22
	.word	.L22
	.word	.L22
	.word	.L22
	.word	.L23
	.word	.L23
.L21:
	ldr	r3, [fp, #-8]
	ldr	r2, .L26
	cmp	r3, r2
	bne	.L22
.L23:
	mov	r3, #1
	b	.L25
.L22:
	mov	r3, #0
.L25:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L27:
	.align	2
.L26:
	.word	11296
	.size	is_end, .-is_end
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
