	.file	"793511.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"ERROR: Unable to open file (%s) for read\n"
.LC1:
	.string	"Error"
	.text
	.globl	openFile
	.type	openFile, @function
openFile:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L2
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L2:
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	openFile, .-openFile
	.globl	closeFile
	.type	closeFile, @function
closeFile:
.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
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	closeFile, .-closeFile
	.globl	sleep
	.type	sleep, @function
sleep:
.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, 64
	mov	QWORD PTR -56[rbp], rdi
	mov	QWORD PTR -64[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR -48[rbp], rax
	mov	rax, QWORD PTR -64[rbp]
	mov	QWORD PTR -40[rbp], rax
	mov	rax, QWORD PTR -48[rbp]
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR -24[rbp], rax
	lea	rax, -32[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	nanosleep@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	sleep, .-sleep
	.section	.rodata
.LC2:
	.string	"w"
.LC3:
	.string	"/sys/class/gpio/export"
.LC4:
	.string	"%d"
	.align 8
.LC5:
	.string	"ERROR: Unable to open the file."
	.text
	.globl	exportGPIOFile
	.type	exportGPIOFile, @function
exportGPIOFile:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	lea	rsi, .LC2[rip]
	lea	rdi, .LC3[rip]
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	edx, DWORD PTR -20[rbp]
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	cmp	QWORD PTR -8[rbp], 0
	jne	.L8
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L8:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	fclose@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	exportGPIOFile, .-exportGPIOFile
	.section	.rodata
.LC6:
	.string	"r"
.LC7:
	.string	"/sys/class/gpio/gpio26/value"
	.text
	.globl	saveGPIOValue
	.type	saveGPIOValue, @function
saveGPIOValue:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	lea	rsi, .LC6[rip]
	lea	rdi, .LC7[rip]
	call	openFile
	mov	QWORD PTR -8[rbp], rax
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, 1024
	mov	rdi, rax
	call	fgets@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	closeFile
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	saveGPIOValue, .-saveGPIOValue
	.section	.rodata
.LC8:
	.string	"Reading: '%s'"
.LC9:
	.string	"Read: '%s'"
	.text
	.globl	readGPIOValue
	.type	readGPIOValue, @function
readGPIOValue:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 1056
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rsi, .LC6[rip]
	lea	rdi, .LC7[rip]
	call	openFile
	mov	QWORD PTR -1048[rbp], rax
	lea	rsi, .LC7[rip]
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rdx, QWORD PTR -1048[rbp]
	lea	rax, -1040[rbp]
	mov	esi, 1024
	mov	rdi, rax
	call	fgets@PLT
	lea	rax, -1040[rbp]
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -1048[rbp]
	mov	rdi, rax
	call	closeFile
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	readGPIOValue, .-readGPIOValue
	.section	.rodata
.LC10:
	.string	"0"
	.text
	.globl	checkIfPressed
	.type	checkIfPressed, @function
checkIfPressed:
.LFB12:
	.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	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC10[rip]
	call	strcmp@PLT
	test	eax, eax
	sete	al
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	checkIfPressed, .-checkIfPressed
	.section	.rodata
.LC11:
	.string	"%s"
.LC12:
	.string	"ERROR WRITING DATA"
	.text
	.globl	writeToLED
	.type	writeToLED, @function
writeToLED:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	openFile
	mov	QWORD PTR -8[rbp], rax
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	jg	.L15
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
.L15:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	closeFile
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	writeToLED, .-writeToLED
	.section	.rodata
.LC13:
	.string	"1"
	.align 8
.LC14:
	.string	"/sys/class/leds/beaglebone:green:usr0/brightness"
	.text
	.globl	flashNTimes
	.type	flashNTimes, @function
flashNTimes:
.LFB14:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L17
.L18:
	lea	rsi, .LC13[rip]
	lea	rdi, .LC14[rip]
	call	writeToLED
	mov	esi, 100000000
	mov	edi, 0
	call	sleep
	lea	rsi, .LC10[rip]
	lea	rdi, .LC14[rip]
	call	writeToLED
	mov	esi, 100000000
	mov	edi, 0
	call	sleep
	add	DWORD PTR -4[rbp], 1
.L17:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jl	.L18
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	flashNTimes, .-flashNTimes
	.section	.rodata
	.align 8
.LC15:
	.string	"Hello embedded world, from Andrew Song!"
.LC16:
	.string	"none"
	.align 8
.LC17:
	.string	"/sys/class/leds/beaglebone:green:usr0/trigger"
.LC18:
	.string	"\n"
	.align 8
.LC19:
	.string	"Flashing %d time(s): Joystick = %d & counter = %d\n"
.LC20:
	.string	"Thank you for the blinks!"
	.text
	.globl	main
	.type	main, @function
main:
.LFB15:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 1056
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC15[rip]
	call	puts@PLT
	mov	edi, 30
	call	exportGPIOFile
	lea	rsi, .LC16[rip]
	lea	rdi, .LC17[rip]
	call	writeToLED
	mov	DWORD PTR -1052[rbp], 0
	jmp	.L20
.L24:
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	saveGPIOValue
	lea	rax, -1040[rbp]
	lea	rsi, .LC18[rip]
	mov	rdi, rax
	call	strcspn@PLT
	mov	BYTE PTR -1040[rbp+rax], 0
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -1044[rbp], eax
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	checkIfPressed
	mov	BYTE PTR -1053[rbp], al
	mov	DWORD PTR -1048[rbp], 1
	cmp	BYTE PTR -1053[rbp], 0
	je	.L21
	mov	DWORD PTR -1048[rbp], 3
.L21:
	cmp	BYTE PTR -1053[rbp], 0
	je	.L22
	add	DWORD PTR -1052[rbp], 1
	mov	eax, DWORD PTR -1048[rbp]
	mov	edi, eax
	call	flashNTimes
	jmp	.L23
.L22:
	mov	DWORD PTR -1052[rbp], 0
	mov	eax, DWORD PTR -1048[rbp]
	mov	edi, eax
	call	flashNTimes
.L23:
	cmp	DWORD PTR -1044[rbp], 0
	sete	al
	movzx	edx, al
	mov	ecx, DWORD PTR -1052[rbp]
	mov	eax, DWORD PTR -1048[rbp]
	mov	esi, eax
	lea	rdi, .LC19[rip]
	mov	eax, 0
	call	printf@PLT
	mov	esi, 600000000
	mov	edi, 0
	call	sleep
.L20:
	cmp	DWORD PTR -1052[rbp], 9
	jle	.L24
	lea	rdi, .LC20[rip]
	call	puts@PLT
	mov	eax, 0
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L26
	call	__stack_chk_fail@PLT
.L26:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.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	"793511.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"ERROR: Unable to open file (%s) for read\012\000"
	.align	2
.LC1:
	.ascii	"Error\000"
	.text
	.align	2
	.global	openFile
	.syntax unified
	.arm
	.fpu softvfp
	.type	openFile, %function
openFile:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	fopen
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L2
	ldr	r1, [fp, #-16]
	ldr	r0, .L4
	bl	printf
	ldr	r0, .L4+4
	bl	perror
	mvn	r0, #0
	bl	exit
.L2:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC0
	.word	.LC1
	.size	openFile, .-openFile
	.align	2
	.global	closeFile
	.syntax unified
	.arm
	.fpu softvfp
	.type	closeFile, %function
closeFile:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r0, [fp, #-8]
	bl	fclose
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	closeFile, .-closeFile
	.section	.rodata
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	sleep
	.syntax unified
	.arm
	.fpu softvfp
	.type	sleep, %function
sleep:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	ldr	r3, .L9
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-32]
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-36]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-12]
	sub	r3, fp, #16
	mov	r1, #0
	mov	r0, r3
	bl	nanosleep
	nop
	ldr	r3, .L9
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L8
	bl	__stack_chk_fail
.L8:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC2
	.size	sleep, .-sleep
	.section	.rodata
	.align	2
.LC3:
	.ascii	"w\000"
	.align	2
.LC4:
	.ascii	"/sys/class/gpio/export\000"
	.align	2
.LC5:
	.ascii	"%d\000"
	.align	2
.LC6:
	.ascii	"ERROR: Unable to open the file.\000"
	.text
	.align	2
	.global	exportGPIOFile
	.syntax unified
	.arm
	.fpu softvfp
	.type	exportGPIOFile, %function
exportGPIOFile:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r1, .L13
	ldr	r0, .L13+4
	bl	fopen
	str	r0, [fp, #-8]
	ldr	r2, [fp, #-16]
	ldr	r1, .L13+8
	ldr	r0, [fp, #-8]
	bl	fprintf
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L12
	ldr	r0, .L13+12
	bl	puts
	mov	r0, #1
	bl	exit
.L12:
	ldr	r0, [fp, #-8]
	bl	fclose
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	exportGPIOFile, .-exportGPIOFile
	.section	.rodata
	.align	2
.LC7:
	.ascii	"r\000"
	.align	2
.LC8:
	.ascii	"/sys/class/gpio/gpio26/value\000"
	.text
	.align	2
	.global	saveGPIOValue
	.syntax unified
	.arm
	.fpu softvfp
	.type	saveGPIOValue, %function
saveGPIOValue:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r1, .L16
	ldr	r0, .L16+4
	bl	openFile
	str	r0, [fp, #-8]
	ldr	r2, [fp, #-8]
	mov	r1, #1024
	ldr	r0, [fp, #-16]
	bl	fgets
	ldr	r0, [fp, #-8]
	bl	closeFile
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC7
	.word	.LC8
	.size	saveGPIOValue, .-saveGPIOValue
	.section	.rodata
	.align	2
.LC9:
	.ascii	"Reading: '%s'\000"
	.align	2
.LC10:
	.ascii	"Read: '%s'\000"
	.align	2
.LC11:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	readGPIOValue
	.syntax unified
	.arm
	.fpu softvfp
	.type	readGPIOValue, %function
readGPIOValue:
	@ args = 0, pretend = 0, frame = 1032
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1024
	sub	sp, sp, #8
	ldr	r3, .L20
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r1, .L20+4
	ldr	r0, .L20+8
	bl	openFile
	str	r0, [fp, #-1036]
	ldr	r1, .L20+8
	ldr	r0, .L20+12
	bl	printf
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-1036]
	mov	r1, #1024
	mov	r0, r3
	bl	fgets
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L20+16
	bl	printf
	ldr	r0, [fp, #-1036]
	bl	closeFile
	nop
	ldr	r3, .L20
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L19
	bl	__stack_chk_fail
.L19:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L21:
	.align	2
.L20:
	.word	.LC11
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.size	readGPIOValue, .-readGPIOValue
	.section	.rodata
	.align	2
.LC12:
	.ascii	"0\000"
	.text
	.align	2
	.global	checkIfPressed
	.syntax unified
	.arm
	.fpu softvfp
	.type	checkIfPressed, %function
checkIfPressed:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r1, [fp, #-8]
	ldr	r0, .L24
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L25:
	.align	2
.L24:
	.word	.LC12
	.size	checkIfPressed, .-checkIfPressed
	.section	.rodata
	.align	2
.LC13:
	.ascii	"%s\000"
	.align	2
.LC14:
	.ascii	"ERROR WRITING DATA\000"
	.text
	.align	2
	.global	writeToLED
	.syntax unified
	.arm
	.fpu softvfp
	.type	writeToLED, %function
writeToLED:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r1, .L28
	ldr	r0, [fp, #-16]
	bl	openFile
	str	r0, [fp, #-12]
	ldr	r2, [fp, #-20]
	ldr	r1, .L28+4
	ldr	r0, [fp, #-12]
	bl	fprintf
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bgt	.L27
	ldr	r0, .L28+8
	bl	printf
.L27:
	ldr	r0, [fp, #-12]
	bl	closeFile
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L29:
	.align	2
.L28:
	.word	.LC3
	.word	.LC13
	.word	.LC14
	.size	writeToLED, .-writeToLED
	.section	.rodata
	.align	2
.LC15:
	.ascii	"1\000"
	.align	2
.LC16:
	.ascii	"/sys/class/leds/beaglebone:green:usr0/brightness\000"
	.text
	.align	2
	.global	flashNTimes
	.syntax unified
	.arm
	.fpu softvfp
	.type	flashNTimes, %function
flashNTimes:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L31
.L32:
	ldr	r1, .L33
	ldr	r0, .L33+4
	bl	writeToLED
	ldr	r1, .L33+8
	mov	r0, #0
	bl	sleep
	ldr	r1, .L33+12
	ldr	r0, .L33+4
	bl	writeToLED
	ldr	r1, .L33+8
	mov	r0, #0
	bl	sleep
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L31:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	blt	.L32
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L34:
	.align	2
.L33:
	.word	.LC15
	.word	.LC16
	.word	100000000
	.word	.LC12
	.size	flashNTimes, .-flashNTimes
	.section	.rodata
	.align	2
.LC17:
	.ascii	"Hello embedded world, from Andrew Song!\000"
	.align	2
.LC18:
	.ascii	"none\000"
	.align	2
.LC19:
	.ascii	"/sys/class/leds/beaglebone:green:usr0/trigger\000"
	.align	2
.LC20:
	.ascii	"\012\000"
	.align	2
.LC21:
	.ascii	"Flashing %d time(s): Joystick = %d & counter = %d\012"
	.ascii	"\000"
	.align	2
.LC22:
	.ascii	"Thank you for the blinks!\000"
	.align	2
.LC23:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1048
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1040
	sub	sp, sp, #8
	ldr	r3, .L43
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L43+4
	bl	puts
	mov	r0, #30
	bl	exportGPIOFile
	ldr	r1, .L43+8
	ldr	r0, .L43+12
	bl	writeToLED
	mov	r3, #0
	str	r3, [fp, #-1044]
	b	.L36
.L40:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	saveGPIOValue
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L43+16
	mov	r0, r3
	bl	strcspn
	mov	r3, r0
	sub	r2, fp, #4
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3, #-1028]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-1036]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	checkIfPressed
	mov	r3, r0
	strb	r3, [fp, #-1045]
	mov	r3, #1
	str	r3, [fp, #-1040]
	ldrb	r3, [fp, #-1045]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L37
	mov	r3, #3
	str	r3, [fp, #-1040]
.L37:
	ldrb	r3, [fp, #-1045]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L38
	ldr	r3, [fp, #-1044]
	add	r3, r3, #1
	str	r3, [fp, #-1044]
	ldr	r0, [fp, #-1040]
	bl	flashNTimes
	b	.L39
.L38:
	mov	r3, #0
	str	r3, [fp, #-1044]
	ldr	r0, [fp, #-1040]
	bl	flashNTimes
.L39:
	ldr	r3, [fp, #-1036]
	cmp	r3, #0
	moveq	r3, #1
	movne	r3, #0
	and	r3, r3, #255
	mov	r2, r3
	ldr	r3, [fp, #-1044]
	ldr	r1, [fp, #-1040]
	ldr	r0, .L43+20
	bl	printf
	ldr	r1, .L43+24
	mov	r0, #0
	bl	sleep
.L36:
	ldr	r3, [fp, #-1044]
	cmp	r3, #9
	ble	.L40
	ldr	r0, .L43+28
	bl	puts
	mov	r3, #0
	ldr	r2, .L43
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L42
	bl	__stack_chk_fail
.L42:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L44:
	.align	2
.L43:
	.word	.LC23
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.word	.LC20
	.word	.LC21
	.word	600000000
	.word	.LC22
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
