	.file	"370064.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"db.txt"
.LC1:
	.string	"error trying delete the file"
	.text
	.globl	delete_file
	.type	delete_file, @function
delete_file:
.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, 16
	lea	rdi, .LC0[rip]
	call	remove@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	je	.L3
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
.L3:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	delete_file, .-delete_file
	.section	.rodata
.LC2:
	.string	"r"
.LC3:
	.string	"file does not exist"
.LC4:
	.string	"35m"
.LC5:
	.string	"\033["
.LC6:
	.string	"%s%s"
.LC7:
	.string	"content inside file: %c\n"
.LC8:
	.string	"0m"
	.text
	.globl	read_content
	.type	read_content, @function
read_content:
.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, 16
	lea	rsi, .LC2[rip]
	lea	rdi, .LC0[rip]
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L5
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	call	print_menu
.L5:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fgetc@PLT
	mov	BYTE PTR -9[rbp], al
	lea	rdx, .LC4[rip]
	lea	rsi, .LC5[rip]
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	movsx	eax, BYTE PTR -9[rbp]
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdx, .LC8[rip]
	lea	rsi, .LC5[rip]
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	read_content, .-read_content
	.section	.rodata
.LC9:
	.string	"w"
.LC10:
	.string	"writing %d in db.txt\n"
	.text
	.globl	write_content
	.type	write_content, @function
write_content:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	lea	rsi, .LC9[rip]
	lea	rdi, .LC0[rip]
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	edi, 0
	call	time@PLT
	mov	edi, eax
	call	srand@PLT
	call	rand@PLT
	cdq
	shr	edx, 31
	add	eax, edx
	and	eax, 1
	sub	eax, edx
	mov	DWORD PTR -12[rbp], eax
	lea	rdx, .LC4[rip]
	lea	rsi, .LC5[rip]
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, eax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdx, .LC8[rip]
	lea	rsi, .LC5[rip]
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -12[rbp]
	lea	edx, 48[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	mov	edi, edx
	call	fputc@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	write_content, .-write_content
	.section	.rodata
.LC11:
	.string	"clear"
	.align 8
.LC12:
	.string	"error trying to clear the screen"
.LC13:
	.string	"32m"
.LC14:
	.string	"(r) Read"
.LC15:
	.string	"(w) Write"
.LC16:
	.string	"(d) Delete"
.LC17:
	.string	"(q) exit"
	.text
	.globl	print_menu
	.type	print_menu, @function
print_menu:
.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, 16
	lea	rdi, .LC11[rip]
	call	system@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	je	.L8
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
.L8:
	lea	rdx, .LC13[rip]
	lea	rsi, .LC5[rip]
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 10
	call	putchar@PLT
	lea	rdi, .LC14[rip]
	call	puts@PLT
	lea	rdi, .LC15[rip]
	call	puts@PLT
	lea	rdi, .LC16[rip]
	call	puts@PLT
	lea	rdi, .LC17[rip]
	call	puts@PLT
	lea	rdx, .LC8[rip]
	lea	rsi, .LC5[rip]
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	print_menu, .-print_menu
	.section	.rodata
.LC18:
	.string	"%c"
.LC19:
	.string	"failed to read the option"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, 0
	call	print_menu
.L17:
	lea	rax, -9[rbp]
	mov	rsi, rax
	lea	rdi, .LC18[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	cmp	eax, 1
	je	.L10
	lea	rdi, .LC19[rip]
	mov	eax, 0
	call	printf@PLT
.L10:
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	__fpurge@PLT
	movzx	eax, BYTE PTR -9[rbp]
	movsx	eax, al
	cmp	eax, 119
	je	.L11
	cmp	eax, 119
	jg	.L12
	cmp	eax, 114
	je	.L13
	cmp	eax, 114
	jg	.L12
	cmp	eax, 100
	je	.L14
	cmp	eax, 113
	je	.L20
	jmp	.L12
.L13:
	mov	eax, 0
	call	read_content
	jmp	.L16
.L11:
	mov	eax, 0
	call	write_content
	jmp	.L16
.L14:
	mov	eax, 0
	call	delete_file
	mov	eax, 0
	call	print_menu
	jmp	.L16
.L12:
	mov	eax, 0
	call	print_menu
	jmp	.L16
.L20:
	nop
.L16:
	movzx	eax, BYTE PTR -9[rbp]
	cmp	al, 113
	jne	.L17
	mov	eax, 0
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.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	"370064.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"db.txt\000"
	.align	2
.LC1:
	.ascii	"error trying delete the file\000"
	.text
	.align	2
	.global	delete_file
	.syntax unified
	.arm
	.fpu softvfp
	.type	delete_file, %function
delete_file:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r0, .L4
	bl	remove
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L3
	ldr	r0, .L4+4
	bl	printf
.L3:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC0
	.word	.LC1
	.size	delete_file, .-delete_file
	.section	.rodata
	.align	2
.LC2:
	.ascii	"r\000"
	.align	2
.LC3:
	.ascii	"file does not exist\000"
	.align	2
.LC4:
	.ascii	"35m\000"
	.align	2
.LC5:
	.ascii	"\033[\000"
	.align	2
.LC6:
	.ascii	"%s%s\000"
	.align	2
.LC7:
	.ascii	"content inside file: %c\012\000"
	.align	2
.LC8:
	.ascii	"0m\000"
	.text
	.align	2
	.global	read_content
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_content, %function
read_content:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r1, .L8
	ldr	r0, .L8+4
	bl	fopen
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L7
	ldr	r0, .L8+8
	bl	printf
	bl	print_menu
.L7:
	ldr	r0, [fp, #-8]
	bl	fgetc
	mov	r3, r0
	strb	r3, [fp, #-9]
	ldr	r2, .L8+12
	ldr	r1, .L8+16
	ldr	r0, .L8+20
	bl	printf
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L8+24
	bl	printf
	ldr	r2, .L8+28
	ldr	r1, .L8+16
	ldr	r0, .L8+20
	bl	printf
	ldr	r0, [fp, #-8]
	bl	fclose
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	.LC2
	.word	.LC0
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	read_content, .-read_content
	.section	.rodata
	.align	2
.LC9:
	.ascii	"w\000"
	.align	2
.LC10:
	.ascii	"writing %d in db.txt\012\000"
	.text
	.align	2
	.global	write_content
	.syntax unified
	.arm
	.fpu softvfp
	.type	write_content, %function
write_content:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r1, .L11
	ldr	r0, .L11+4
	bl	fopen
	str	r0, [fp, #-12]
	mov	r0, #0
	bl	time
	mov	r3, r0
	mov	r0, r3
	bl	srand
	bl	rand
	mov	r3, r0
	cmp	r3, #0
	and	r3, r3, #1
	rsblt	r3, r3, #0
	str	r3, [fp, #-8]
	ldr	r2, .L11+8
	ldr	r1, .L11+12
	ldr	r0, .L11+16
	bl	printf
	ldr	r1, [fp, #-8]
	ldr	r0, .L11+20
	bl	printf
	ldr	r2, .L11+24
	ldr	r1, .L11+12
	ldr	r0, .L11+16
	bl	printf
	ldr	r3, [fp, #-8]
	add	r3, r3, #48
	ldr	r1, [fp, #-12]
	mov	r0, r3
	bl	fputc
	ldr	r0, [fp, #-12]
	bl	fclose
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC9
	.word	.LC0
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC10
	.word	.LC8
	.size	write_content, .-write_content
	.section	.rodata
	.align	2
.LC11:
	.ascii	"clear\000"
	.align	2
.LC12:
	.ascii	"error trying to clear the screen\000"
	.align	2
.LC13:
	.ascii	"32m\000"
	.align	2
.LC14:
	.ascii	"(r) Read\000"
	.align	2
.LC15:
	.ascii	"(w) Write\000"
	.align	2
.LC16:
	.ascii	"(d) Delete\000"
	.align	2
.LC17:
	.ascii	"(q) exit\000"
	.text
	.align	2
	.global	print_menu
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_menu, %function
print_menu:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r0, .L15
	bl	system
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L14
	ldr	r0, .L15+4
	bl	printf
.L14:
	ldr	r2, .L15+8
	ldr	r1, .L15+12
	ldr	r0, .L15+16
	bl	printf
	mov	r0, #10
	bl	putchar
	ldr	r0, .L15+20
	bl	puts
	ldr	r0, .L15+24
	bl	puts
	ldr	r0, .L15+28
	bl	puts
	ldr	r0, .L15+32
	bl	puts
	ldr	r2, .L15+36
	ldr	r1, .L15+12
	ldr	r0, .L15+16
	bl	printf
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC5
	.word	.LC6
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC8
	.size	print_menu, .-print_menu
	.section	.rodata
	.align	2
.LC18:
	.ascii	"%c\000"
	.align	2
.LC19:
	.ascii	"failed to read the option\000"
	.align	2
.LC20:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r3, .L30
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	bl	print_menu
.L26:
	sub	r3, fp, #9
	mov	r1, r3
	ldr	r0, .L30+4
	bl	__isoc99_scanf
	mov	r3, r0
	cmp	r3, #1
	beq	.L18
	ldr	r0, .L30+8
	bl	printf
.L18:
	ldr	r3, .L30+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	__fpurge
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	sub	r3, r3, #100
	cmp	r3, #19
	ldrls	pc, [pc, r3, asl #2]
	b	.L19
.L21:
	.word	.L24
	.word	.L19
	.word	.L19
	.word	.L19
	.word	.L19
	.word	.L19
	.word	.L19
	.word	.L19
	.word	.L19
	.word	.L19
	.word	.L19
	.word	.L19
	.word	.L19
	.word	.L29
	.word	.L22
	.word	.L19
	.word	.L19
	.word	.L19
	.word	.L19
	.word	.L20
.L22:
	bl	read_content
	b	.L25
.L20:
	bl	write_content
	b	.L25
.L24:
	bl	delete_file
	bl	print_menu
	b	.L25
.L19:
	bl	print_menu
	b	.L25
.L29:
	nop
.L25:
	ldrb	r3, [fp, #-9]	@ zero_extendqisi2
	cmp	r3, #113
	bne	.L26
	mov	r3, #0
	ldr	r2, .L30
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L28
	bl	__stack_chk_fail
.L28:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L31:
	.align	2
.L30:
	.word	.LC20
	.word	.LC18
	.word	.LC19
	.word	stdin
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
