	.file	"347893.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Enter file path: "
.LC1:
	.string	"%s"
.LC2:
	.string	"r"
.LC3:
	.string	"w"
.LC4:
	.string	"remove-blanks.tmp"
.LC5:
	.string	"Unable to open file."
	.align 8
.LC6:
	.string	"Please check you have read/write previleges."
	.align 8
.LC7:
	.string	"\nFile contents before removing all empty lines.\n"
	.align 8
.LC8:
	.string	"\n\n\nFile contents after removing all empty line.\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
	add	rsp, -128
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -112[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rax, -112[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -128[rbp], rax
	lea	rsi, .LC3[rip]
	lea	rdi, .LC4[rip]
	call	fopen@PLT
	mov	QWORD PTR -120[rbp], rax
	cmp	QWORD PTR -128[rbp], 0
	je	.L2
	cmp	QWORD PTR -120[rbp], 0
	jne	.L3
.L2:
	lea	rdi, .LC5[rip]
	call	puts@PLT
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -128[rbp]
	mov	rdi, rax
	call	printFile
	mov	rax, QWORD PTR -128[rbp]
	mov	rdi, rax
	call	rewind@PLT
	mov	rdx, QWORD PTR -120[rbp]
	mov	rax, QWORD PTR -128[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	removeEmptyLines
	mov	rax, QWORD PTR -128[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -120[rbp]
	mov	rdi, rax
	call	fclose@PLT
	lea	rax, -112[rbp]
	mov	rdi, rax
	call	remove@PLT
	lea	rax, -112[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	call	rename@PLT
	lea	rdi, .LC8[rip]
	call	puts@PLT
	lea	rax, -112[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -128[rbp], rax
	mov	rax, QWORD PTR -128[rbp]
	mov	rdi, rax
	call	printFile
	mov	rax, QWORD PTR -128[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	printFile
	.type	printFile, @function
printFile:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	jmp	.L7
.L8:
	movsx	eax, BYTE PTR -1[rbp]
	mov	edi, eax
	call	putchar@PLT
.L7:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	fgetc@PLT
	mov	BYTE PTR -1[rbp], al
	cmp	BYTE PTR -1[rbp], -1
	jne	.L8
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	printFile, .-printFile
	.globl	isEmpty
	.type	isEmpty, @function
isEmpty:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
.L12:
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -24[rbp], rdx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR -1[rbp], al
	cmp	BYTE PTR -1[rbp], 32
	je	.L10
	cmp	BYTE PTR -1[rbp], 9
	je	.L10
	cmp	BYTE PTR -1[rbp], 10
	je	.L10
	cmp	BYTE PTR -1[rbp], 13
	je	.L10
	cmp	BYTE PTR -1[rbp], 0
	je	.L10
	mov	eax, 0
	jmp	.L11
.L10:
	cmp	BYTE PTR -1[rbp], 0
	jne	.L12
	mov	eax, 1
.L11:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	isEmpty, .-isEmpty
	.globl	removeEmptyLines
	.type	removeEmptyLines, @function
removeEmptyLines:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 1024
	mov	QWORD PTR -1016[rbp], rdi
	mov	QWORD PTR -1024[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	jmp	.L14
.L15:
	lea	rax, -1008[rbp]
	mov	rdi, rax
	call	isEmpty
	test	eax, eax
	jne	.L14
	mov	rdx, QWORD PTR -1024[rbp]
	lea	rax, -1008[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	fputs@PLT
.L14:
	mov	rdx, QWORD PTR -1016[rbp]
	lea	rax, -1008[rbp]
	mov	esi, 1000
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L15
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	removeEmptyLines, .-removeEmptyLines
	.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	"347893.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Enter file path: \000"
	.align	2
.LC1:
	.ascii	"%s\000"
	.align	2
.LC2:
	.ascii	"r\000"
	.align	2
.LC3:
	.ascii	"w\000"
	.align	2
.LC4:
	.ascii	"remove-blanks.tmp\000"
	.align	2
.LC5:
	.ascii	"Unable to open file.\000"
	.align	2
.LC6:
	.ascii	"Please check you have read/write previleges.\000"
	.align	2
.LC7:
	.ascii	"\012File contents before removing all empty lines.\012"
	.ascii	"\000"
	.align	2
.LC8:
	.ascii	"\012\012\012File contents after removing all empty "
	.ascii	"line.\012\000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 112
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #112
	ldr	r3, .L6
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L6+4
	bl	printf
	sub	r3, fp, #108
	mov	r1, r3
	ldr	r0, .L6+8
	bl	__isoc99_scanf
	sub	r3, fp, #108
	ldr	r1, .L6+12
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-116]
	ldr	r1, .L6+16
	ldr	r0, .L6+20
	bl	fopen
	str	r0, [fp, #-112]
	ldr	r3, [fp, #-116]
	cmp	r3, #0
	beq	.L2
	ldr	r3, [fp, #-112]
	cmp	r3, #0
	bne	.L3
.L2:
	ldr	r0, .L6+24
	bl	puts
	ldr	r0, .L6+28
	bl	puts
	mov	r0, #1
	bl	exit
.L3:
	ldr	r0, .L6+32
	bl	puts
	ldr	r0, [fp, #-116]
	bl	printFile
	ldr	r0, [fp, #-116]
	bl	rewind
	ldr	r1, [fp, #-112]
	ldr	r0, [fp, #-116]
	bl	removeEmptyLines
	ldr	r0, [fp, #-116]
	bl	fclose
	ldr	r0, [fp, #-112]
	bl	fclose
	sub	r3, fp, #108
	mov	r0, r3
	bl	remove
	sub	r3, fp, #108
	mov	r1, r3
	ldr	r0, .L6+20
	bl	rename
	ldr	r0, .L6+36
	bl	puts
	sub	r3, fp, #108
	ldr	r1, .L6+12
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-116]
	ldr	r0, [fp, #-116]
	bl	printFile
	ldr	r0, [fp, #-116]
	bl	fclose
	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	.LC9
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	main, .-main
	.align	2
	.global	printFile
	.syntax unified
	.arm
	.fpu softvfp
	.type	printFile, %function
printFile:
	@ 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]
	b	.L9
.L11:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	mov	r0, r3
	bl	putchar
.L9:
	ldr	r0, [fp, #-16]
	bl	fgetc
	mov	r3, r0
	strb	r3, [fp, #-5]
	b	.L11
	.size	printFile, .-printFile
	.align	2
	.global	isEmpty
	.syntax unified
	.arm
	.fpu softvfp
	.type	isEmpty, %function
isEmpty:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
.L15:
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	str	r2, [fp, #-16]
	ldrb	r3, [r3]
	strb	r3, [fp, #-5]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #32
	beq	.L13
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #9
	beq	.L13
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #10
	beq	.L13
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #13
	beq	.L13
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L13
	mov	r3, #0
	b	.L14
.L13:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L15
	mov	r3, #1
.L14:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	isEmpty, .-isEmpty
	.section	.rodata
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	removeEmptyLines
	.syntax unified
	.arm
	.fpu softvfp
	.type	removeEmptyLines, %function
removeEmptyLines:
	@ args = 0, pretend = 0, frame = 1016
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1016
	str	r0, [fp, #-1016]
	str	r1, [fp, #-1020]
	ldr	r3, .L20
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	b	.L17
.L18:
	sub	r3, fp, #1008
	mov	r0, r3
	bl	isEmpty
	mov	r3, r0
	cmp	r3, #0
	bne	.L17
	sub	r3, fp, #1008
	ldr	r1, [fp, #-1020]
	mov	r0, r3
	bl	fputs
.L17:
	sub	r3, fp, #1008
	ldr	r2, [fp, #-1016]
	mov	r1, #1000
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L18
	nop
	ldr	r3, .L20
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L19
	bl	__stack_chk_fail
.L19:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L21:
	.align	2
.L20:
	.word	.LC10
	.size	removeEmptyLines, .-removeEmptyLines
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
