	.file	"68887392.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"a+"
.LC1:
	.string	"wordy.txt"
.LC2:
	.string	"Can't open \"wordy\" file.\n"
.LC3:
	.string	"%d"
	.align 8
.LC4:
	.string	"Enter words to add to the file; press the #"
	.align 8
.LC5:
	.string	"key at the beginning of a line to terminate."
.LC6:
	.string	"%3d %s\n"
.LC7:
	.string	"%40s"
.LC8:
	.string	"File contents:"
.LC9:
	.string	"Done!"
.LC10:
	.string	"Error closing file\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, 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -80[rbp], 0
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	fopen@PLT
	mov	QWORD PTR -72[rbp], rax
	cmp	QWORD PTR -72[rbp], 0
	jne	.L2
	mov	rax, QWORD PTR stdout[rip]
	mov	rcx, rax
	mov	edx, 25
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	rax, QWORD PTR -72[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	jmp	.L3
.L4:
	cmp	DWORD PTR -76[rbp], 10
	jne	.L3
	lea	rdx, -80[rbp]
	mov	rax, QWORD PTR -72[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
.L3:
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	getc@PLT
	mov	DWORD PTR -76[rbp], eax
	cmp	DWORD PTR -76[rbp], -1
	jne	.L4
	lea	rdi, .LC4[rip]
	call	puts@PLT
	lea	rdi, .LC5[rip]
	call	puts@PLT
	jmp	.L5
.L7:
	mov	eax, DWORD PTR -80[rbp]
	add	eax, 1
	mov	DWORD PTR -80[rbp], eax
	mov	edx, DWORD PTR -80[rbp]
	lea	rcx, -64[rbp]
	mov	rax, QWORD PTR -72[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L5:
	mov	rax, QWORD PTR stdin[rip]
	lea	rdx, -64[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	cmp	eax, 1
	jne	.L6
	movzx	eax, BYTE PTR -64[rbp]
	cmp	al, 35
	jne	.L7
.L6:
	lea	rdi, .LC8[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	rewind@PLT
	jmp	.L8
.L9:
	mov	rdx, QWORD PTR stdout[rip]
	lea	rax, -64[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	fputs@PLT
.L8:
	mov	rdx, QWORD PTR -72[rbp]
	lea	rax, -64[rbp]
	mov	esi, 41
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L9
	lea	rdi, .LC9[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -72[rbp]
	mov	rdi, rax
	call	fclose@PLT
	test	eax, eax
	je	.L10
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 19
	mov	esi, 1
	lea	rdi, .LC10[rip]
	call	fwrite@PLT
.L10:
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"68887392.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"a+\000"
	.align	2
.LC1:
	.ascii	"wordy.txt\000"
	.align	2
.LC2:
	.ascii	"Can't open \"wordy\" file.\012\000"
	.align	2
.LC3:
	.ascii	"%d\000"
	.align	2
.LC4:
	.ascii	"Enter words to add to the file; press the #\000"
	.align	2
.LC5:
	.ascii	"key at the beginning of a line to terminate.\000"
	.align	2
.LC6:
	.ascii	"%3d %s\012\000"
	.align	2
.LC7:
	.ascii	"%40s\000"
	.align	2
.LC8:
	.ascii	"File contents:\000"
	.align	2
.LC9:
	.ascii	"Done!\000"
	.align	2
.LC10:
	.ascii	"Error closing file\012\000"
	.align	2
.LC11:
	.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	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #64
	ldr	r3, .L13
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-64]
	ldr	r1, .L13+4
	ldr	r0, .L13+8
	bl	fopen
	str	r0, [fp, #-60]
	ldr	r3, [fp, #-60]
	cmp	r3, #0
	bne	.L2
	ldr	r3, .L13+12
	ldr	r3, [r3]
	mov	r2, #25
	mov	r1, #1
	ldr	r0, .L13+16
	bl	fwrite
	mov	r0, #1
	bl	exit
.L2:
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-60]
	bl	fseek
	b	.L3
.L4:
	ldr	r3, [fp, #-56]
	cmp	r3, #10
	bne	.L3
	sub	r3, fp, #64
	mov	r2, r3
	ldr	r1, .L13+20
	ldr	r0, [fp, #-60]
	bl	__isoc99_fscanf
.L3:
	ldr	r0, [fp, #-60]
	bl	getc
	str	r0, [fp, #-56]
	ldr	r3, [fp, #-56]
	cmn	r3, #1
	bne	.L4
	ldr	r0, .L13+24
	bl	puts
	ldr	r0, .L13+28
	bl	puts
	b	.L5
.L7:
	ldr	r3, [fp, #-64]
	add	r3, r3, #1
	str	r3, [fp, #-64]
	ldr	r2, [fp, #-64]
	sub	r3, fp, #52
	ldr	r1, .L13+32
	ldr	r0, [fp, #-60]
	bl	fprintf
.L5:
	ldr	r3, .L13+36
	ldr	r3, [r3]
	sub	r2, fp, #52
	ldr	r1, .L13+40
	mov	r0, r3
	bl	__isoc99_fscanf
	mov	r3, r0
	cmp	r3, #1
	bne	.L6
	ldrb	r3, [fp, #-52]	@ zero_extendqisi2
	cmp	r3, #35
	bne	.L7
.L6:
	ldr	r0, .L13+44
	bl	puts
	ldr	r0, [fp, #-60]
	bl	rewind
	b	.L8
.L9:
	ldr	r3, .L13+12
	ldr	r2, [r3]
	sub	r3, fp, #52
	mov	r1, r2
	mov	r0, r3
	bl	fputs
.L8:
	sub	r3, fp, #52
	ldr	r2, [fp, #-60]
	mov	r1, #41
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L9
	ldr	r0, .L13+48
	bl	puts
	ldr	r0, [fp, #-60]
	bl	fclose
	mov	r3, r0
	cmp	r3, #0
	beq	.L10
	ldr	r3, .L13+52
	ldr	r3, [r3]
	mov	r2, #19
	mov	r1, #1
	ldr	r0, .L13+56
	bl	fwrite
.L10:
	mov	r3, #0
	ldr	r2, .L13
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L12
	bl	__stack_chk_fail
.L12:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC11
	.word	.LC0
	.word	.LC1
	.word	stdout
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	stdin
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	stderr
	.word	.LC10
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
