	.file	"245214.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"echo 'BB-ADC' > /sys/devices/platform/bone_capemgr/slots"
.LC1:
	.string	"BB-ADC Fail"
	.align 8
.LC2:
	.string	"\n\nv0= %d\nv1= %d\nv2= %d\nv3= %d\nv4= %d\nv5= %d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.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
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	system@PLT
	mov	DWORD PTR -28[rbp], eax
	cmp	DWORD PTR -28[rbp], 0
	jns	.L2
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	edi, 0
	call	adc_read
	mov	DWORD PTR -24[rbp], eax
	mov	edi, 1
	call	adc_read
	mov	DWORD PTR -20[rbp], eax
	mov	edi, 2
	call	adc_read
	mov	DWORD PTR -16[rbp], eax
	mov	edi, 3
	call	adc_read
	mov	DWORD PTR -12[rbp], eax
	mov	edi, 4
	call	adc_read
	mov	DWORD PTR -8[rbp], eax
	mov	edi, 5
	call	adc_read
	mov	DWORD PTR -4[rbp], eax
	mov	r8d, DWORD PTR -8[rbp]
	mov	edi, DWORD PTR -12[rbp]
	mov	ecx, DWORD PTR -16[rbp]
	mov	edx, DWORD PTR -20[rbp]
	mov	eax, DWORD PTR -24[rbp]
	sub	rsp, 8
	mov	esi, DWORD PTR -4[rbp]
	push	rsi
	mov	r9d, r8d
	mov	r8d, edi
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	add	rsp, 16
	mov	edi, 1
	mov	eax, 0
	call	sleep@PLT
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC3:
	.string	"/sys/bus/iio/devices/iio:device0/in_voltage%d_raw"
.LC4:
	.string	"adc/get-value"
	.text
	.globl	adc_read
	.type	adc_read, @function
adc_read:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 112
	mov	DWORD PTR -100[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edx, DWORD PTR -100[rbp]
	lea	rax, -80[rbp]
	mov	ecx, edx
	lea	rdx, .LC3[rip]
	mov	esi, 64
	mov	rdi, rax
	mov	eax, 0
	call	snprintf@PLT
	mov	DWORD PTR -92[rbp], eax
	lea	rax, -80[rbp]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -88[rbp], eax
	cmp	DWORD PTR -88[rbp], 0
	jns	.L4
	lea	rdi, .LC4[rip]
	call	perror@PLT
.L4:
	lea	rcx, -83[rbp]
	mov	eax, DWORD PTR -88[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	edi, eax
	mov	eax, 0
	call	read@PLT
	mov	eax, DWORD PTR -88[rbp]
	mov	edi, eax
	mov	eax, 0
	call	close@PLT
	lea	rax, -83[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	atoi@PLT
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	adc_read, .-adc_read
	.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	"245214.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"echo 'BB-ADC' > /sys/devices/platform/bone_capemgr/"
	.ascii	"slots\000"
	.align	2
.LC1:
	.ascii	"BB-ADC Fail\000"
	.align	2
.LC2:
	.ascii	"\012\012v0= %d\012v1= %d\012v2= %d\012v3= %d\012v4="
	.ascii	" %d\012v5= %d\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	ldr	r0, .L3
	bl	system
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bge	.L2
	ldr	r0, .L3+4
	bl	perror
	mov	r0, #1
	bl	exit
.L2:
	mov	r0, #0
	bl	adc_read
	str	r0, [fp, #-28]
	mov	r0, #1
	bl	adc_read
	str	r0, [fp, #-24]
	mov	r0, #2
	bl	adc_read
	str	r0, [fp, #-20]
	mov	r0, #3
	bl	adc_read
	str	r0, [fp, #-16]
	mov	r0, #4
	bl	adc_read
	str	r0, [fp, #-12]
	mov	r0, #5
	bl	adc_read
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	str	r3, [sp, #8]
	ldr	r3, [fp, #-12]
	str	r3, [sp, #4]
	ldr	r3, [fp, #-16]
	str	r3, [sp]
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-24]
	ldr	r1, [fp, #-28]
	ldr	r0, .L3+8
	bl	printf
	mov	r0, #1
	bl	sleep
	b	.L2
.L4:
	.align	2
.L3:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	main, .-main
	.section	.rodata
	.align	2
.LC3:
	.ascii	"/sys/bus/iio/devices/iio:device0/in_voltage%d_raw\000"
	.align	2
.LC4:
	.ascii	"adc/get-value\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	adc_read
	.syntax unified
	.arm
	.fpu softvfp
	.type	adc_read, %function
adc_read:
	@ args = 0, pretend = 0, frame = 88
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #88
	str	r0, [fp, #-88]
	ldr	r3, .L9
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r0, fp, #72
	ldr	r3, [fp, #-88]
	ldr	r2, .L9+4
	mov	r1, #64
	bl	snprintf
	str	r0, [fp, #-84]
	sub	r3, fp, #72
	mov	r1, #0
	mov	r0, r3
	bl	open
	str	r0, [fp, #-80]
	ldr	r3, [fp, #-80]
	cmp	r3, #0
	bge	.L6
	ldr	r0, .L9+8
	bl	perror
.L6:
	sub	r3, fp, #76
	mov	r2, #4
	mov	r1, r3
	ldr	r0, [fp, #-80]
	bl	read
	ldr	r0, [fp, #-80]
	bl	close
	sub	r3, fp, #76
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	ldr	r2, .L9
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L8
	bl	__stack_chk_fail
.L8:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC5
	.word	.LC3
	.word	.LC4
	.size	adc_read, .-adc_read
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
