	.file	"656563.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.type	BIT_RDY, @object
	.size	BIT_RDY, 1
BIT_RDY:
	.byte	7
	.type	BIT_C1, @object
	.size	BIT_C1, 1
BIT_C1:
	.byte	6
	.type	BIT_C0, @object
	.size	BIT_C0, 1
BIT_C0:
	.byte	5
	.type	BIT_OC, @object
	.size	BIT_OC, 1
BIT_OC:
	.byte	4
	.type	BIT_S1, @object
	.size	BIT_S1, 1
BIT_S1:
	.byte	3
	.type	BIT_S0, @object
	.size	BIT_S0, 1
BIT_S0:
	.byte	2
	.type	BIT_G1, @object
	.size	BIT_G1, 1
BIT_G1:
	.byte	1
	.type	BIT_G0, @object
	.size	BIT_G0, 1
BIT_G0:
	.zero	1
	.globl	fd
	.bss
	.align 4
	.type	fd, @object
	.size	fd, 4
fd:
	.zero	4
	.section	.rodata
	.align 8
.LC0:
	.string	"(reset) Failed to write to the i2c bus"
	.text
	.globl	dev_reset
	.type	dev_reset, @function
dev_reset:
.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	BYTE PTR -18[rbp], 0
	mov	BYTE PTR -17[rbp], 6
	mov	eax, DWORD PTR fd[rip]
	lea	rcx, -18[rbp]
	mov	edx, 2
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -24[rbp], eax
	cmp	DWORD PTR -24[rbp], 2
	je	.L4
	lea	rdi, .LC0[rip]
	call	perror@PLT
.L4:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	dev_reset, .-dev_reset
	.section	.rodata
.LC1:
	.string	"/dev/i2c-3"
	.align 8
.LC2:
	.string	"Failed to acquire bus access and/or talk to slave"
	.align 8
.LC4:
	.string	"Failed to write to the i2c bus"
	.align 8
.LC5:
	.string	"Failed to read from the i2c bus"
	.align 8
.LC16:
	.string	"reg: %0x ch: %d gain: %d  %0X %0X %0X %.4fv (%d) %.0f %.4f\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	esi, 2
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR fd[rip], eax
	mov	eax, DWORD PTR fd[rip]
	test	eax, eax
	jns	.L6
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	mov	eax, DWORD PTR fd[rip]
	mov	edx, 104
	mov	esi, 1795
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	mov	DWORD PTR -80[rbp], eax
	cmp	DWORD PTR -80[rbp], 0
	jns	.L7
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L7:
	mov	eax, 0
	call	dev_reset
	pxor	xmm0, xmm0
	movsd	QWORD PTR -64[rbp], xmm0
	mov	DWORD PTR -68[rbp], 0
.L17:
	mov	DWORD PTR -72[rbp], 0
	jmp	.L8
.L16:
	mov	DWORD PTR -76[rbp], 0
	jmp	.L9
.L15:
	mov	eax, 7
	movzx	eax, al
	mov	edx, 1
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	mov	esi, eax
	mov	eax, 5
	movzx	eax, al
	mov	edx, DWORD PTR -76[rbp]
	mov	ecx, eax
	sal	edx, cl
	mov	eax, edx
	or	esi, eax
	mov	edx, esi
	mov	eax, 4
	movzx	eax, al
	mov	esi, 1
	mov	ecx, eax
	sal	esi, cl
	mov	eax, esi
	or	edx, eax
	mov	eax, 3
	movzx	eax, al
	mov	esi, 1
	mov	ecx, eax
	sal	esi, cl
	mov	eax, esi
	or	edx, eax
	mov	eax, DWORD PTR -72[rbp]
	or	eax, edx
	mov	BYTE PTR -81[rbp], al
	movzx	eax, BYTE PTR -81[rbp]
	mov	BYTE PTR -18[rbp], al
	mov	eax, DWORD PTR fd[rip]
	lea	rcx, -18[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -80[rbp], eax
	cmp	DWORD PTR -80[rbp], 1
	je	.L10
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	eax, 0
	call	dev_reset
	mov	edi, 1
	call	sleep@PLT
.L10:
	mov	edi, 4000
	call	usleep@PLT
	mov	eax, DWORD PTR fd[rip]
	lea	rcx, -18[rbp]
	mov	edx, 3
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -80[rbp], eax
	cmp	DWORD PTR -80[rbp], 3
	je	.L11
	lea	rdi, .LC5[rip]
	call	perror@PLT
.L11:
	movzx	eax, BYTE PTR -18[rbp]
	movzx	eax, al
	sal	eax, 8
	mov	edx, eax
	movzx	eax, BYTE PTR -17[rbp]
	movzx	eax, al
	or	eax, edx
	mov	DWORD PTR -80[rbp], eax
	cmp	DWORD PTR -80[rbp], 32767
	jle	.L12
	mov	eax, 65536
	sub	eax, DWORD PTR -80[rbp]
	mov	DWORD PTR -80[rbp], eax
.L12:
	pxor	xmm1, xmm1
	cvtsi2sd	xmm1, DWORD PTR -80[rbp]
	movsd	xmm0, QWORD PTR .LC6[rip]
	mulsd	xmm0, xmm1
	movsd	xmm1, QWORD PTR .LC7[rip]
	divsd	xmm0, xmm1
	movsd	QWORD PTR -56[rbp], xmm0
	cmp	DWORD PTR -68[rbp], 0
	je	.L13
	movsd	xmm1, QWORD PTR -64[rbp]
	movsd	xmm0, QWORD PTR .LC8[rip]
	mulsd	xmm1, xmm0
	movsd	xmm2, QWORD PTR -56[rbp]
	movsd	xmm0, QWORD PTR .LC9[rip]
	mulsd	xmm0, xmm2
	addsd	xmm0, xmm1
	movsd	QWORD PTR -64[rbp], xmm0
	jmp	.L14
.L13:
	movsd	xmm0, QWORD PTR -56[rbp]
	movsd	QWORD PTR -64[rbp], xmm0
	mov	DWORD PTR -68[rbp], 1
.L14:
	movsd	xmm1, QWORD PTR -56[rbp]
	movsd	xmm0, QWORD PTR .LC10[rip]
	mulsd	xmm0, xmm1
	movsd	xmm1, QWORD PTR .LC11[rip]
	divsd	xmm0, xmm1
	movsd	QWORD PTR -48[rbp], xmm0
	movsd	xmm0, QWORD PTR -48[rbp]
	movsd	xmm1, QWORD PTR .LC12[rip]
	divsd	xmm0, xmm1
	movsd	QWORD PTR -40[rbp], xmm0
	movsd	xmm0, QWORD PTR .LC13[rip]
	mov	rax, QWORD PTR -48[rbp]
	movapd	xmm1, xmm0
	movq	xmm0, rax
	call	pow@PLT
	movsd	xmm1, QWORD PTR .LC14[rip]
	mulsd	xmm1, xmm0
	movsd	xmm0, QWORD PTR .LC15[rip]
	subsd	xmm0, xmm1
	movsd	QWORD PTR -32[rbp], xmm0
	movzx	eax, BYTE PTR -16[rbp]
	movzx	edi, al
	movzx	eax, BYTE PTR -17[rbp]
	movzx	r9d, al
	movzx	eax, BYTE PTR -18[rbp]
	movzx	r10d, al
	movzx	eax, BYTE PTR -81[rbp]
	movsd	xmm1, QWORD PTR -32[rbp]
	movsd	xmm0, QWORD PTR -48[rbp]
	mov	rsi, QWORD PTR -56[rbp]
	mov	ecx, DWORD PTR -72[rbp]
	mov	edx, DWORD PTR -76[rbp]
	mov	r8d, DWORD PTR -80[rbp]
	push	r8
	push	rdi
	movapd	xmm2, xmm1
	movapd	xmm1, xmm0
	movq	xmm0, rsi
	mov	r8d, r10d
	mov	esi, eax
	lea	rdi, .LC16[rip]
	mov	eax, 3
	call	printf@PLT
	add	rsp, 16
	mov	edi, 90000
	call	usleep@PLT
	add	DWORD PTR -76[rbp], 1
.L9:
	cmp	DWORD PTR -76[rbp], 0
	jle	.L15
	add	DWORD PTR -72[rbp], 1
.L8:
	cmp	DWORD PTR -72[rbp], 0
	jle	.L16
	jmp	.L17
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC6:
	.long	-755914244
	.long	1073766989
	.align 8
.LC7:
	.long	0
	.long	1088421888
	.align 8
.LC8:
	.long	-652835029
	.long	1072691150
	.align 8
.LC9:
	.long	-755914244
	.long	1062232653
	.align 8
.LC10:
	.long	0
	.long	1089981600
	.align 8
.LC11:
	.long	735298401
	.long	1071651173
	.align 8
.LC12:
	.long	-574494826
	.long	1085992641
	.align 8
.LC13:
	.long	1724968817
	.long	1070094987
	.align 8
.LC14:
	.long	1030792151
	.long	1085493898
	.align 8
.LC15:
	.long	-1717986918
	.long	1088791897
	.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	"656563.c"
	.text
	.section	.rodata
	.type	BIT_RDY, %object
	.size	BIT_RDY, 1
BIT_RDY:
	.byte	7
	.type	BIT_C1, %object
	.size	BIT_C1, 1
BIT_C1:
	.byte	6
	.type	BIT_C0, %object
	.size	BIT_C0, 1
BIT_C0:
	.byte	5
	.type	BIT_OC, %object
	.size	BIT_OC, 1
BIT_OC:
	.byte	4
	.type	BIT_S1, %object
	.size	BIT_S1, 1
BIT_S1:
	.byte	3
	.type	BIT_S0, %object
	.size	BIT_S0, 1
BIT_S0:
	.byte	2
	.type	BIT_G1, %object
	.size	BIT_G1, 1
BIT_G1:
	.byte	1
	.type	BIT_G0, %object
	.size	BIT_G0, 1
BIT_G0:
	.space	1
	.comm	fd,4,4
	.align	2
.LC0:
	.ascii	"(reset) Failed to write to the i2c bus\000"
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	dev_reset
	.syntax unified
	.arm
	.fpu softvfp
	.type	dev_reset, %function
dev_reset:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r3, .L5
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	strb	r3, [fp, #-20]
	mov	r3, #6
	strb	r3, [fp, #-19]
	ldr	r3, .L5+4
	ldr	r3, [r3]
	sub	r1, fp, #20
	mov	r2, #2
	mov	r0, r3
	bl	write
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #2
	beq	.L4
	ldr	r0, .L5+8
	bl	perror
.L4:
	nop
	ldr	r3, .L5
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L3
	bl	__stack_chk_fail
.L3:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	.LC1
	.word	fd
	.word	.LC0
	.size	dev_reset, .-dev_reset
	.section	.rodata
	.align	2
.LC2:
	.ascii	"/dev/i2c-3\000"
	.align	2
.LC3:
	.ascii	"Failed to acquire bus access and/or talk to slave\000"
	.align	2
.LC4:
	.ascii	"Failed to write to the i2c bus\000"
	.align	2
.LC5:
	.ascii	"Failed to read from the i2c bus\000"
	.global	__aeabi_i2d
	.global	__aeabi_dmul
	.global	__aeabi_ddiv
	.global	__aeabi_dadd
	.global	__aeabi_dsub
	.align	2
.LC6:
	.ascii	"reg: %0x ch: %d gain: %d  %0X %0X %0X %.4fv (%d) %."
	.ascii	"0f %.4f\012\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 80
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #128
	ldr	r3, .L21
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r1, #2
	ldr	r0, .L21+4
	bl	open
	mov	r3, r0
	ldr	r2, .L21+8
	str	r3, [r2]
	ldr	r3, .L21+8
	ldr	r3, [r3]
	cmp	r3, #0
	bge	.L8
	ldr	r0, .L21+4
	bl	perror
	mov	r0, #1
	bl	exit
.L8:
	ldr	r3, .L21+8
	ldr	r3, [r3]
	mov	r2, #104
	ldr	r1, .L21+12
	mov	r0, r3
	bl	ioctl
	str	r0, [fp, #-84]
	ldr	r3, [fp, #-84]
	cmp	r3, #0
	bge	.L9
	ldr	r0, .L21+16
	bl	perror
	mov	r0, #1
	bl	exit
.L9:
	bl	dev_reset
	mov	r2, #0
	mov	r3, #0
	str	r2, [fp, #-68]
	str	r3, [fp, #-64]
	mov	r3, #0
	str	r3, [fp, #-72]
.L19:
	mov	r3, #0
	str	r3, [fp, #-76]
	b	.L10
.L18:
	mov	r3, #0
	str	r3, [fp, #-80]
	b	.L11
.L17:
	mov	r3, #7
	mov	r2, r3
	mov	r3, #1
	lsl	r3, r3, r2
	lsl	r3, r3, #24
	asr	r2, r3, #24
	mov	r3, #5
	mov	r1, r3
	ldr	r3, [fp, #-80]
	lsl	r3, r3, r1
	lsl	r3, r3, #24
	asr	r3, r3, #24
	orr	r3, r2, r3
	lsl	r3, r3, #24
	asr	r2, r3, #24
	mov	r3, #4
	mov	r1, r3
	mov	r3, #1
	lsl	r3, r3, r1
	lsl	r3, r3, #24
	asr	r3, r3, #24
	orr	r3, r2, r3
	lsl	r3, r3, #24
	asr	r2, r3, #24
	mov	r3, #3
	mov	r1, r3
	mov	r3, #1
	lsl	r3, r3, r1
	lsl	r3, r3, #24
	asr	r3, r3, #24
	orr	r3, r2, r3
	lsl	r3, r3, #24
	asr	r2, r3, #24
	ldr	r3, [fp, #-76]
	lsl	r3, r3, #24
	asr	r3, r3, #24
	orr	r3, r2, r3
	lsl	r3, r3, #24
	asr	r3, r3, #24
	strb	r3, [fp, #-85]
	ldrb	r3, [fp, #-85]
	strb	r3, [fp, #-28]
	ldr	r3, .L21+8
	ldr	r3, [r3]
	sub	r1, fp, #28
	mov	r2, #1
	mov	r0, r3
	bl	write
	str	r0, [fp, #-84]
	ldr	r3, [fp, #-84]
	cmp	r3, #1
	beq	.L12
	ldr	r0, .L21+20
	bl	perror
	bl	dev_reset
	mov	r0, #1
	bl	sleep
.L12:
	mov	r0, #4000
	bl	usleep
	ldr	r3, .L21+8
	ldr	r3, [r3]
	sub	r1, fp, #28
	mov	r2, #3
	mov	r0, r3
	bl	read
	str	r0, [fp, #-84]
	ldr	r3, [fp, #-84]
	cmp	r3, #3
	beq	.L13
	ldr	r0, .L21+24
	bl	perror
.L13:
	ldrb	r3, [fp, #-28]	@ zero_extendqisi2
	lsl	r3, r3, #8
	ldrb	r2, [fp, #-27]	@ zero_extendqisi2
	orr	r3, r3, r2
	str	r3, [fp, #-84]
	ldr	r3, [fp, #-84]
	cmp	r3, #32768
	blt	.L14
	ldr	r3, [fp, #-84]
	rsb	r3, r3, #65536
	str	r3, [fp, #-84]
.L14:
	ldr	r0, [fp, #-84]
	bl	__aeabi_i2d
	ldr	r2, .L21+28
	ldr	r3, .L21+32
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	mov	r2, #0
	ldr	r3, .L21+36
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-60]
	str	r3, [fp, #-56]
	ldr	r3, [fp, #-72]
	cmp	r3, #0
	beq	.L15
	ldr	r2, .L21+40
	ldr	r3, .L21+44
	sub	r1, fp, #68
	ldmia	r1, {r0-r1}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r4, r2
	mov	r5, r3
	ldr	r2, .L21+28
	ldr	r3, .L21+48
	sub	r1, fp, #60
	ldmia	r1, {r0-r1}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dadd
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-68]
	str	r3, [fp, #-64]
	b	.L16
.L15:
	sub	r3, fp, #60
	ldmia	r3, {r2-r3}
	str	r2, [fp, #-68]
	str	r3, [fp, #-64]
	mov	r3, #1
	str	r3, [fp, #-72]
.L16:
	mov	r2, #0
	ldr	r3, .L21+52
	sub	r1, fp, #60
	ldmia	r1, {r0-r1}
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	ldr	r2, .L21+56
	ldr	r3, .L21+60
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-52]
	str	r3, [fp, #-48]
	ldr	r2, .L21+64
	ldr	r3, .L21+68
	sub	r1, fp, #52
	ldmia	r1, {r0-r1}
	bl	__aeabi_ddiv
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-44]
	str	r3, [fp, #-40]
	ldr	r2, .L21+72
	ldr	r3, .L21+76
	sub	r1, fp, #52
	ldmia	r1, {r0-r1}
	bl	pow
	ldr	r2, .L21+80
	ldr	r3, .L21+84
	bl	__aeabi_dmul
	mov	r2, r0
	mov	r3, r1
	ldr	r0, .L21+88
	ldr	r1, .L21+92
	bl	__aeabi_dsub
	mov	r2, r0
	mov	r3, r1
	str	r2, [fp, #-36]
	str	r3, [fp, #-32]
	ldrb	r1, [fp, #-85]	@ zero_extendqisi2
	ldrb	r3, [fp, #-28]	@ zero_extendqisi2
	mov	r0, r3
	ldrb	r3, [fp, #-27]	@ zero_extendqisi2
	mov	ip, r3
	ldrb	r3, [fp, #-26]	@ zero_extendqisi2
	mov	lr, r3
	sub	r3, fp, #36
	ldmia	r3, {r2-r3}
	str	r2, [sp, #40]
	str	r3, [sp, #44]
	sub	r3, fp, #52
	ldmia	r3, {r2-r3}
	str	r2, [sp, #32]
	str	r3, [sp, #36]
	ldr	r3, [fp, #-84]
	str	r3, [sp, #24]
	sub	r3, fp, #60
	ldmia	r3, {r2-r3}
	str	r2, [sp, #16]
	str	r3, [sp, #20]
	str	lr, [sp, #8]
	str	ip, [sp, #4]
	str	r0, [sp]
	ldr	r3, [fp, #-76]
	ldr	r2, [fp, #-80]
	ldr	r0, .L21+96
	bl	printf
	ldr	r0, .L21+100
	bl	usleep
	ldr	r3, [fp, #-80]
	add	r3, r3, #1
	str	r3, [fp, #-80]
.L11:
	ldr	r3, [fp, #-80]
	cmp	r3, #0
	ble	.L17
	ldr	r3, [fp, #-76]
	add	r3, r3, #1
	str	r3, [fp, #-76]
.L10:
	ldr	r3, [fp, #-76]
	cmp	r3, #0
	ble	.L18
	b	.L19
.L22:
	.align	2
.L21:
	.word	.LC7
	.word	.LC2
	.word	fd
	.word	1795
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	-755914244
	.word	1073766989
	.word	1088421888
	.word	-652835029
	.word	1072691150
	.word	1062232653
	.word	1089981600
	.word	735298401
	.word	1071651173
	.word	-574494826
	.word	1085992641
	.word	1724968817
	.word	1070094987
	.word	1030792151
	.word	1085493898
	.word	-1717986918
	.word	1088791897
	.word	.LC6
	.word	90000
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
