	.file	"632756.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"%s.txt"
.LC1:
	.string	"/dev/fibonacci"
	.align 8
.LC2:
	.string	"Failed to open character device"
	.align 8
.LC3:
	.string	"Writing to /dev/fibonacci, returned the sequence %lld\n"
.LC4:
	.string	"w"
.LC5:
	.string	"%d %lld\n"
	.align 8
.LC6:
	.string	"Reading from /dev/fibonacci at offset %d, returned the sequence %s.\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, 224
	mov	DWORD PTR -212[rbp], edi
	mov	QWORD PTR -224[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	movabs	rax, 8392585648475956596
	mov	edx, 0
	mov	QWORD PTR -144[rbp], rax
	mov	QWORD PTR -136[rbp], rdx
	mov	DWORD PTR -128[rbp], 0
	movabs	rax, 2334956331019232628
	movabs	rdx, 29113321804886647
	mov	QWORD PTR -160[rbp], rax
	mov	QWORD PTR -152[rbp], rdx
	mov	DWORD PTR -184[rbp], 100
	cmp	DWORD PTR -212[rbp], 1
	jle	.L2
	mov	rax, QWORD PTR -224[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	lea	rax, -144[rbp]
	mov	rcx, rdx
	lea	rdx, .LC0[rip]
	mov	esi, 20
	mov	rdi, rax
	mov	eax, 0
	call	snprintf@PLT
.L2:
	mov	esi, 2
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -180[rbp], eax
	cmp	DWORD PTR -180[rbp], 0
	jns	.L3
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	mov	DWORD PTR -196[rbp], 0
	jmp	.L4
.L5:
	lea	rax, -160[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rcx, -160[rbp]
	mov	eax, DWORD PTR -180[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	QWORD PTR -168[rbp], rax
	mov	rax, QWORD PTR -168[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -196[rbp], 1
.L4:
	mov	eax, DWORD PTR -196[rbp]
	cmp	eax, DWORD PTR -184[rbp]
	jle	.L5
	lea	rax, -144[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -176[rbp], rax
	mov	DWORD PTR -192[rbp], 0
	jmp	.L6
.L7:
	mov	eax, DWORD PTR -192[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -180[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	call	lseek@PLT
	lea	rcx, -112[rbp]
	mov	eax, DWORD PTR -180[rbp]
	mov	edx, 100
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	QWORD PTR -168[rbp], rax
	mov	rcx, QWORD PTR -168[rbp]
	mov	edx, DWORD PTR -192[rbp]
	mov	rax, QWORD PTR -176[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	lea	rdx, -112[rbp]
	mov	eax, DWORD PTR -192[rbp]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -192[rbp], 1
.L6:
	mov	eax, DWORD PTR -192[rbp]
	cmp	eax, DWORD PTR -184[rbp]
	jle	.L7
	mov	rax, QWORD PTR -176[rbp]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	rax, QWORD PTR -176[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, DWORD PTR -184[rbp]
	mov	DWORD PTR -188[rbp], eax
	jmp	.L8
.L9:
	mov	eax, DWORD PTR -188[rbp]
	movsx	rcx, eax
	mov	eax, DWORD PTR -180[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	call	lseek@PLT
	lea	rcx, -112[rbp]
	mov	eax, DWORD PTR -180[rbp]
	mov	edx, 100
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	QWORD PTR -168[rbp], rax
	lea	rdx, -112[rbp]
	mov	eax, DWORD PTR -188[rbp]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	sub	DWORD PTR -188[rbp], 1
.L8:
	cmp	DWORD PTR -188[rbp], 0
	jns	.L9
	mov	eax, DWORD PTR -180[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	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	"632756.c"
	.text
	.section	.rodata
	.align	2
.LC2:
	.ascii	"%s.txt\000"
	.align	2
.LC3:
	.ascii	"/dev/fibonacci\000"
	.align	2
.LC4:
	.ascii	"Failed to open character device\000"
	.align	2
.LC5:
	.ascii	"Writing to /dev/fibonacci, returned the sequence %l"
	.ascii	"ld\012\000"
	.align	2
.LC6:
	.ascii	"w\000"
	.align	2
.LC7:
	.ascii	"%d %lld\012\000"
	.align	2
.LC8:
	.ascii	"Reading from /dev/fibonacci at offset %d, returned "
	.ascii	"the sequence %s.\012\000"
	.align	2
.LC0:
	.ascii	"test.txt\000"
	.space	11
	.align	2
.LC1:
	.ascii	"testing writing\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 = 184
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #192
	str	r0, [fp, #-184]
	str	r1, [fp, #-188]
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r2, .L12+4
	sub	r3, fp, #128
	ldm	r2, {r0, r1, r2}
	stmia	r3!, {r0, r1}
	strb	r2, [r3]
	sub	r3, fp, #119
	mov	r2, #11
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r3, .L12+8
	sub	ip, fp, #144
	ldm	r3, {r0, r1, r2, r3}
	stm	ip, {r0, r1, r2, r3}
	mov	r3, #100
	str	r3, [fp, #-168]
	ldr	r3, [fp, #-184]
	cmp	r3, #1
	ble	.L2
	ldr	r3, [fp, #-188]
	add	r3, r3, #4
	ldr	r3, [r3]
	sub	r0, fp, #128
	ldr	r2, .L12+12
	mov	r1, #20
	bl	snprintf
.L2:
	mov	r1, #2
	ldr	r0, .L12+16
	bl	open
	str	r0, [fp, #-164]
	ldr	r3, [fp, #-164]
	cmp	r3, #0
	bge	.L3
	ldr	r0, .L12+20
	bl	perror
	mov	r0, #1
	bl	exit
.L3:
	mov	r3, #0
	str	r3, [fp, #-180]
	b	.L4
.L5:
	sub	r3, fp, #144
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r3, fp, #144
	mov	r1, r3
	ldr	r0, [fp, #-164]
	bl	write
	mov	r3, r0
	mov	r2, r3
	asr	r3, r2, #31
	str	r2, [fp, #-156]
	str	r3, [fp, #-152]
	sub	r3, fp, #156
	ldmia	r3, {r2-r3}
	ldr	r0, .L12+24
	bl	printf
	ldr	r3, [fp, #-180]
	add	r3, r3, #1
	str	r3, [fp, #-180]
.L4:
	ldr	r2, [fp, #-180]
	ldr	r3, [fp, #-168]
	cmp	r2, r3
	ble	.L5
	sub	r3, fp, #128
	ldr	r1, .L12+28
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-160]
	mov	r3, #0
	str	r3, [fp, #-176]
	b	.L6
.L7:
	mov	r2, #0
	ldr	r1, [fp, #-176]
	ldr	r0, [fp, #-164]
	bl	lseek
	sub	r3, fp, #108
	mov	r2, #100
	mov	r1, r3
	ldr	r0, [fp, #-164]
	bl	read
	mov	r3, r0
	mov	r2, r3
	asr	r3, r2, #31
	str	r2, [fp, #-156]
	str	r3, [fp, #-152]
	sub	r3, fp, #156
	ldmia	r3, {r2-r3}
	stm	sp, {r2-r3}
	ldr	r2, [fp, #-176]
	ldr	r1, .L12+32
	ldr	r0, [fp, #-160]
	bl	fprintf
	sub	r3, fp, #108
	mov	r2, r3
	ldr	r1, [fp, #-176]
	ldr	r0, .L12+36
	bl	printf
	ldr	r3, [fp, #-176]
	add	r3, r3, #1
	str	r3, [fp, #-176]
.L6:
	ldr	r2, [fp, #-176]
	ldr	r3, [fp, #-168]
	cmp	r2, r3
	ble	.L7
	ldr	r1, [fp, #-160]
	mov	r0, #10
	bl	fputc
	ldr	r0, [fp, #-160]
	bl	fclose
	ldr	r3, [fp, #-168]
	str	r3, [fp, #-172]
	b	.L8
.L9:
	mov	r2, #0
	ldr	r1, [fp, #-172]
	ldr	r0, [fp, #-164]
	bl	lseek
	sub	r3, fp, #108
	mov	r2, #100
	mov	r1, r3
	ldr	r0, [fp, #-164]
	bl	read
	mov	r3, r0
	mov	r2, r3
	asr	r3, r2, #31
	str	r2, [fp, #-156]
	str	r3, [fp, #-152]
	sub	r3, fp, #108
	mov	r2, r3
	ldr	r1, [fp, #-172]
	ldr	r0, .L12+36
	bl	printf
	ldr	r3, [fp, #-172]
	sub	r3, r3, #1
	str	r3, [fp, #-172]
.L8:
	ldr	r3, [fp, #-172]
	cmp	r3, #0
	bge	.L9
	ldr	r0, [fp, #-164]
	bl	close
	mov	r3, #0
	ldr	r2, .L12
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L11
	bl	__stack_chk_fail
.L11:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC9
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
