	.file	"540309.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"clear"
.LC1:
	.string	"/dev/my_cdev0"
.LC2:
	.string	"the_stack_data/540309.c"
	.align 8
.LC3:
	.string	"fd = open(DEVICE_FILE, O_RDWR)"
.LC4:
	.string	"Testing %s\n"
.LC5:
	.string	"Enter data: "
.LC6:
	.string	"%s"
.LC7:
	.string	"Written %ld bytes\n"
.LC8:
	.string	"Added %ld bytes\n"
	.align 8
.LC9:
	.string	"FILE POINTER MOVED TO BEGIN(LSEEK)"
	.align 8
.LC10:
	.string	"Enter count to read and test driver: "
.LC11:
	.string	"%d"
.LC12:
	.string	"Read data: %s\n"
	.align 8
.LC13:
	.string	"Read from current offset, enter count : "
.LC14:
	.string	"Read all: %s\n"
.LC15:
	.string	"Bye!..."
	.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, 544
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC0[rip]
	call	system@PLT
	mov	DWORD PTR -540[rbp], 0
	lea	rax, -272[rbp]
	mov	edx, 256
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	esi, 2
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -536[rbp], eax
	cmp	DWORD PTR -536[rbp], 0
	jne	.L2
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 17
	lea	rsi, .LC2[rip]
	lea	rdi, .LC3[rip]
	call	__assert_fail@PLT
.L2:
	lea	rsi, .LC1[rip]
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rsi, .LC5[rip]
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -528[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__fpurge@PLT
	lea	rax, -528[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rcx, -528[rbp]
	mov	eax, DWORD PTR -536[rbp]
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	write@PLT
	lea	rax, -528[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rsi, .LC5[rip]
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -528[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__fpurge@PLT
	lea	rax, -528[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rcx, -528[rbp]
	mov	eax, DWORD PTR -536[rbp]
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	write@PLT
	lea	rax, -528[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -536[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	mov	eax, 0
	call	lseek@PLT
	lea	rdi, .LC9[rip]
	call	puts@PLT
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -544[rbp], 0
	lea	rax, -544[rbp]
	mov	rsi, rax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__fpurge@PLT
	mov	edx, DWORD PTR -544[rbp]
	lea	rcx, -272[rbp]
	mov	eax, DWORD PTR -536[rbp]
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	read@PLT
	mov	DWORD PTR -532[rbp], eax
	mov	eax, DWORD PTR -532[rbp]
	cdqe
	mov	BYTE PTR -272[rbp+rax], 0
	lea	rax, -272[rbp]
	mov	rsi, rax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -544[rbp]
	mov	rsi, rax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__fpurge@PLT
	mov	edx, DWORD PTR -544[rbp]
	lea	rcx, -272[rbp]
	mov	eax, DWORD PTR -536[rbp]
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	read@PLT
	mov	DWORD PTR -532[rbp], eax
	mov	eax, DWORD PTR -532[rbp]
	cdqe
	mov	BYTE PTR -272[rbp+rax], 0
	lea	rax, -272[rbp]
	mov	rsi, rax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -536[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	mov	eax, 0
	call	lseek@PLT
	lea	rdi, .LC9[rip]
	call	puts@PLT
	lea	rcx, -272[rbp]
	mov	eax, DWORD PTR -536[rbp]
	mov	edx, 256
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	read@PLT
	lea	rax, -272[rbp]
	mov	rsi, rax
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC15[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -536[rbp]
	mov	edi, eax
	mov	eax, 0
	call	close@PLT
	call	getchar@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L4
	call	__stack_chk_fail@PLT
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
	.type	__PRETTY_FUNCTION__.0, @object
	.size	__PRETTY_FUNCTION__.0, 5
__PRETTY_FUNCTION__.0:
	.string	"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	"540309.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"clear\000"
	.align	2
.LC1:
	.ascii	"/dev/my_cdev0\000"
	.align	2
.LC2:
	.ascii	"the_stack_data/540309.c\000"
	.align	2
.LC3:
	.ascii	"fd = open(DEVICE_FILE, O_RDWR)\000"
	.align	2
.LC4:
	.ascii	"Testing %s\012\000"
	.align	2
.LC5:
	.ascii	"Enter data: \000"
	.align	2
.LC6:
	.ascii	"%s\000"
	.align	2
.LC7:
	.ascii	"Written %ld bytes\012\000"
	.align	2
.LC8:
	.ascii	"Added %ld bytes\012\000"
	.align	2
.LC9:
	.ascii	"FILE POINTER MOVED TO BEGIN(LSEEK)\000"
	.align	2
.LC10:
	.ascii	"Enter count to read and test driver: \000"
	.align	2
.LC11:
	.ascii	"%d\000"
	.align	2
.LC12:
	.ascii	"Read data: %s\012\000"
	.align	2
.LC13:
	.ascii	"Read from current offset, enter count : \000"
	.align	2
.LC14:
	.ascii	"Read all: %s\012\000"
	.align	2
.LC15:
	.ascii	"Bye!...\000"
	.align	2
.LC16:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 536
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #536
	ldr	r3, .L5
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L5+4
	bl	system
	mov	r3, #0
	str	r3, [fp, #-532]
	sub	r3, fp, #264
	mov	r2, #256
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r1, #2
	ldr	r0, .L5+8
	bl	open
	str	r0, [fp, #-528]
	ldr	r3, [fp, #-528]
	cmp	r3, #0
	bne	.L2
	ldr	r3, .L5+12
	mov	r2, #17
	ldr	r1, .L5+16
	ldr	r0, .L5+20
	bl	__assert_fail
.L2:
	ldr	r1, .L5+8
	ldr	r0, .L5+24
	bl	printf
	ldr	r1, .L5+28
	ldr	r0, .L5+32
	bl	printf
	sub	r3, fp, #520
	mov	r1, r3
	ldr	r0, .L5+32
	bl	__isoc99_scanf
	ldr	r3, .L5+36
	ldr	r3, [r3]
	mov	r0, r3
	bl	__fpurge
	sub	r3, fp, #520
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r3, fp, #520
	mov	r1, r3
	ldr	r0, [fp, #-528]
	bl	write
	sub	r3, fp, #520
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L5+40
	bl	printf
	ldr	r1, .L5+28
	ldr	r0, .L5+32
	bl	printf
	sub	r3, fp, #520
	mov	r1, r3
	ldr	r0, .L5+32
	bl	__isoc99_scanf
	ldr	r3, .L5+36
	ldr	r3, [r3]
	mov	r0, r3
	bl	__fpurge
	sub	r3, fp, #520
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r3, fp, #520
	mov	r1, r3
	ldr	r0, [fp, #-528]
	bl	write
	sub	r3, fp, #520
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L5+44
	bl	printf
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-528]
	bl	lseek
	ldr	r0, .L5+48
	bl	puts
	ldr	r0, .L5+52
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-536]
	sub	r3, fp, #536
	mov	r1, r3
	ldr	r0, .L5+56
	bl	__isoc99_scanf
	ldr	r3, .L5+36
	ldr	r3, [r3]
	mov	r0, r3
	bl	__fpurge
	ldr	r2, [fp, #-536]
	sub	r3, fp, #264
	mov	r1, r3
	ldr	r0, [fp, #-528]
	bl	read
	str	r0, [fp, #-524]
	sub	r2, fp, #264
	ldr	r3, [fp, #-524]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #264
	mov	r1, r3
	ldr	r0, .L5+60
	bl	printf
	ldr	r0, .L5+64
	bl	printf
	sub	r3, fp, #536
	mov	r1, r3
	ldr	r0, .L5+56
	bl	__isoc99_scanf
	ldr	r3, .L5+36
	ldr	r3, [r3]
	mov	r0, r3
	bl	__fpurge
	ldr	r2, [fp, #-536]
	sub	r3, fp, #264
	mov	r1, r3
	ldr	r0, [fp, #-528]
	bl	read
	str	r0, [fp, #-524]
	sub	r2, fp, #264
	ldr	r3, [fp, #-524]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #264
	mov	r1, r3
	ldr	r0, .L5+60
	bl	printf
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-528]
	bl	lseek
	ldr	r0, .L5+48
	bl	puts
	sub	r3, fp, #264
	mov	r2, #256
	mov	r1, r3
	ldr	r0, [fp, #-528]
	bl	read
	sub	r3, fp, #264
	mov	r1, r3
	ldr	r0, .L5+68
	bl	printf
	ldr	r0, .L5+72
	bl	puts
	ldr	r0, [fp, #-528]
	bl	close
	bl	getchar
	mov	r3, #0
	ldr	r2, .L5
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L4
	bl	__stack_chk_fail
.L4:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	.LC16
	.word	.LC0
	.word	.LC1
	.word	__PRETTY_FUNCTION__.5365
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	stdin
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.size	main, .-main
	.section	.rodata
	.align	2
	.type	__PRETTY_FUNCTION__.5365, %object
	.size	__PRETTY_FUNCTION__.5365, 5
__PRETTY_FUNCTION__.5365:
	.ascii	"main\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
