	.file	"173958.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"\nenter 1  for write on file"
.LC1:
	.string	"enter 2  for undo"
.LC2:
	.string	"enter 3  for redo"
.LC3:
	.string	"enter 4  for exit"
.LC4:
	.string	"%d"
.LC5:
	.string	"cls"
.LC6:
	.string	"w"
.LC7:
	.string	"undoredo"
.LC8:
	.string	"error opening file"
.LC9:
	.string	"enter string"
.LC10:
	.string	"%s"
.LC11:
	.string	"\n data saved properly"
.LC12:
	.string	"a"
.LC13:
	.string	"Z:\\undoredo"
.LC14:
	.string	"wrong choice"
	.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, 152
	.cfi_offset 3, -24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
.L8:
	lea	rdi, .LC0[rip]
	call	puts@PLT
	lea	rdi, .LC1[rip]
	call	puts@PLT
	lea	rdi, .LC2[rip]
	call	puts@PLT
	lea	rdi, .LC3[rip]
	call	puts@PLT
	lea	rax, -148[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rdi, .LC5[rip]
	call	system@PLT
	mov	eax, DWORD PTR -148[rbp]
	cmp	eax, 4
	jg	.L2
	cmp	eax, 3
	jge	.L3
	cmp	eax, 1
	je	.L4
	cmp	eax, 2
	je	.L5
	jmp	.L2
.L4:
	lea	rsi, .LC6[rip]
	lea	rdi, .LC7[rip]
	call	fopen@PLT
	mov	QWORD PTR -136[rbp], rax
	cmp	QWORD PTR -136[rbp], 0
	jne	.L6
	lea	rdi, .LC8[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	lea	rdi, .LC9[rip]
	call	puts@PLT
	lea	rax, -128[rbp]
	mov	rsi, rax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	rdx, QWORD PTR -136[rbp]
	lea	rax, -128[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	fputs@PLT
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L7
.L5:
	lea	rsi, .LC12[rip]
	lea	rdi, .LC13[rip]
	call	fopen@PLT
	mov	QWORD PTR -144[rbp], rax
	mov	rax, QWORD PTR -144[rbp]
	mov	edx, 2
	mov	rsi, -1
	mov	rdi, rax
	call	fseek@PLT
	mov	rax, QWORD PTR -144[rbp]
	mov	rdi, rax
	call	ftello@PLT
	mov	rbx, rax
	mov	rax, QWORD PTR -144[rbp]
	mov	rdi, rax
	call	fileno@PLT
	mov	rsi, rbx
	mov	edi, eax
	mov	eax, 0
	call	ftruncate@PLT
	jmp	.L7
.L3:
	mov	edi, 1
	call	exit@PLT
.L2:
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	nop
.L7:
	jmp	.L8
	.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	"173958.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"\012enter 1  for write on file\000"
	.align	2
.LC1:
	.ascii	"enter 2  for undo\000"
	.align	2
.LC2:
	.ascii	"enter 3  for redo\000"
	.align	2
.LC3:
	.ascii	"enter 4  for exit\000"
	.align	2
.LC4:
	.ascii	"%d\000"
	.align	2
.LC5:
	.ascii	"cls\000"
	.align	2
.LC6:
	.ascii	"w\000"
	.align	2
.LC7:
	.ascii	"undoredo\000"
	.align	2
.LC8:
	.ascii	"error opening file\000"
	.align	2
.LC9:
	.ascii	"enter string\000"
	.align	2
.LC10:
	.ascii	"%s\000"
	.align	2
.LC11:
	.ascii	"\012 data saved properly\000"
	.align	2
.LC12:
	.ascii	"a\000"
	.align	2
.LC13:
	.ascii	"Z:\\undoredo\000"
	.align	2
.LC14:
	.ascii	"wrong choice\000"
	.align	2
.LC15:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 120
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #124
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
.L8:
	ldr	r0, .L10+4
	bl	puts
	ldr	r0, .L10+8
	bl	puts
	ldr	r0, .L10+12
	bl	puts
	ldr	r0, .L10+16
	bl	puts
	sub	r3, fp, #128
	mov	r1, r3
	ldr	r0, .L10+20
	bl	__isoc99_scanf
	ldr	r0, .L10+24
	bl	system
	ldr	r3, [fp, #-128]
	cmp	r3, #4
	bgt	.L2
	cmp	r3, #3
	bge	.L3
	cmp	r3, #1
	beq	.L4
	cmp	r3, #2
	beq	.L5
	b	.L2
.L4:
	ldr	r1, .L10+28
	ldr	r0, .L10+32
	bl	fopen
	str	r0, [fp, #-120]
	ldr	r3, [fp, #-120]
	cmp	r3, #0
	bne	.L6
	ldr	r0, .L10+36
	bl	puts
	mov	r0, #1
	bl	exit
.L6:
	ldr	r0, .L10+40
	bl	puts
	sub	r3, fp, #116
	mov	r1, r3
	ldr	r0, .L10+44
	bl	__isoc99_scanf
	sub	r3, fp, #116
	ldr	r1, [fp, #-120]
	mov	r0, r3
	bl	fputs
	ldr	r0, .L10+48
	bl	printf
	b	.L7
.L5:
	ldr	r1, .L10+52
	ldr	r0, .L10+56
	bl	fopen
	str	r0, [fp, #-124]
	mov	r2, #2
	mvn	r1, #0
	ldr	r0, [fp, #-124]
	bl	fseek
	ldr	r0, [fp, #-124]
	bl	fileno
	mov	r4, r0
	ldr	r0, [fp, #-124]
	bl	ftello
	mov	r3, r0
	mov	r1, r3
	mov	r0, r4
	bl	ftruncate
	b	.L7
.L3:
	mov	r0, #1
	bl	exit
.L2:
	ldr	r0, .L10+60
	bl	printf
	nop
.L7:
	b	.L8
.L11:
	.align	2
.L10:
	.word	.LC15
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
