	.file	"11076328.c"
	.intel_syntax noprefix
	.text
	.type	_calc_crc16, @function
_calc_crc16:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	WORD PTR -6[rbp], -1
	jmp	.L2
.L7:
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -24[rbp], rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	xor	WORD PTR -6[rbp], ax
	mov	DWORD PTR -4[rbp], 0
	jmp	.L3
.L6:
	movzx	eax, WORD PTR -6[rbp]
	and	eax, 1
	test	eax, eax
	je	.L4
	shr	WORD PTR -6[rbp]
	xor	WORD PTR -6[rbp], -24575
	jmp	.L5
.L4:
	shr	WORD PTR -6[rbp]
.L5:
	add	DWORD PTR -4[rbp], 1
.L3:
	cmp	DWORD PTR -4[rbp], 7
	jbe	.L6
.L2:
	mov	rax, QWORD PTR -32[rbp]
	lea	rdx, -1[rax]
	mov	QWORD PTR -32[rbp], rdx
	test	rax, rax
	jne	.L7
	movzx	eax, WORD PTR -6[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	_calc_crc16, .-_calc_crc16
	.type	_combine_bytes, @function
_combine_bytes:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	edx, edi
	mov	eax, esi
	mov	BYTE PTR -4[rbp], dl
	mov	BYTE PTR -8[rbp], al
	movzx	eax, BYTE PTR -4[rbp]
	sal	eax, 8
	mov	edx, eax
	movzx	eax, BYTE PTR -8[rbp]
	or	eax, edx
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	_combine_bytes, .-_combine_bytes
	.section	.rodata
.LC0:
	.string	"/dev/i2c-"
.LC1:
	.string	"%s%d"
	.text
	.globl	am2321
	.type	am2321, @function
am2321:
.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, 80
	mov	QWORD PTR -56[rbp], rdi
	mov	QWORD PTR -64[rbp], rsi
	mov	DWORD PTR -68[rbp], edx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edx, DWORD PTR -68[rbp]
	lea	rax, -19[rbp]
	mov	r8d, edx
	lea	rcx, .LC0[rip]
	lea	rdx, .LC1[rip]
	mov	esi, 13
	mov	rdi, rax
	mov	eax, 0
	call	snprintf@PLT
	lea	rax, -19[rbp]
	mov	esi, 2
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -32[rbp], eax
	cmp	DWORD PTR -32[rbp], 0
	jns	.L12
	mov	eax, 1
	jmp	.L21
.L12:
	mov	eax, DWORD PTR -32[rbp]
	mov	edx, 92
	mov	esi, 1795
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	jns	.L14
	mov	eax, 2
	jmp	.L21
.L14:
	mov	eax, DWORD PTR -32[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	write@PLT
	mov	edi, 1000
	call	usleep@PLT
	mov	BYTE PTR -27[rbp], 3
	mov	BYTE PTR -26[rbp], 0
	mov	BYTE PTR -25[rbp], 4
	lea	rcx, -27[rbp]
	mov	eax, DWORD PTR -32[rbp]
	mov	edx, 3
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	test	rax, rax
	jns	.L15
	mov	eax, 3
	jmp	.L21
.L15:
	mov	edi, 1600
	call	usleep@PLT
	lea	rcx, -27[rbp]
	mov	eax, DWORD PTR -32[rbp]
	mov	edx, 8
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	test	rax, rax
	jns	.L16
	mov	eax, 4
	jmp	.L21
.L16:
	mov	eax, DWORD PTR -32[rbp]
	mov	edi, eax
	call	close@PLT
	movzx	eax, BYTE PTR -27[rbp]
	cmp	al, 3
	jne	.L17
	movzx	eax, BYTE PTR -26[rbp]
	cmp	al, 4
	je	.L18
.L17:
	mov	eax, 9
	jmp	.L21
.L18:
	lea	rax, -27[rbp]
	mov	esi, 6
	mov	rdi, rax
	call	_calc_crc16
	mov	WORD PTR -38[rbp], ax
	movzx	eax, BYTE PTR -21[rbp]
	movzx	edx, al
	movzx	eax, BYTE PTR -20[rbp]
	movzx	eax, al
	mov	esi, edx
	mov	edi, eax
	call	_combine_bytes
	mov	WORD PTR -36[rbp], ax
	movzx	eax, WORD PTR -38[rbp]
	cmp	ax, WORD PTR -36[rbp]
	je	.L19
	mov	eax, 10
	jmp	.L21
.L19:
	movzx	eax, BYTE PTR -22[rbp]
	movzx	edx, al
	movzx	eax, BYTE PTR -23[rbp]
	movzx	eax, al
	mov	esi, edx
	mov	edi, eax
	call	_combine_bytes
	mov	WORD PTR -40[rbp], ax
	movzx	eax, BYTE PTR -24[rbp]
	movzx	edx, al
	movzx	eax, BYTE PTR -25[rbp]
	movzx	eax, al
	mov	esi, edx
	mov	edi, eax
	call	_combine_bytes
	mov	WORD PTR -34[rbp], ax
	movzx	eax, WORD PTR -40[rbp]
	test	ax, ax
	jns	.L20
	movzx	eax, WORD PTR -40[rbp]
	and	ax, 32767
	neg	eax
	mov	WORD PTR -40[rbp], ax
.L20:
	movzx	eax, WORD PTR -40[rbp]
	pxor	xmm0, xmm0
	cvtsi2ss	xmm0, eax
	movss	xmm1, DWORD PTR .LC2[rip]
	divss	xmm0, xmm1
	mov	rax, QWORD PTR -56[rbp]
	movss	DWORD PTR [rax], xmm0
	movzx	eax, WORD PTR -34[rbp]
	pxor	xmm0, xmm0
	cvtsi2ss	xmm0, eax
	movss	xmm1, DWORD PTR .LC2[rip]
	divss	xmm0, xmm1
	mov	rax, QWORD PTR -64[rbp]
	movss	DWORD PTR [rax], xmm0
	mov	eax, 0
.L21:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	am2321, .-am2321
	.section	.rodata
.LC3:
	.string	"{\"error\": %d}"
	.align 8
.LC4:
	.string	"{\"temperature\": %.2f, \"humidity\": %.2f, \"bus\": %d}"
	.text
	.globl	main
	.type	main, @function
main:
.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -16[rbp], 1
	cmp	DWORD PTR -36[rbp], 1
	jle	.L24
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -16[rbp], eax
.L24:
	mov	edx, DWORD PTR -16[rbp]
	lea	rcx, -20[rbp]
	lea	rax, -24[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	am2321
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	je	.L25
	mov	eax, DWORD PTR -12[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -12[rbp]
	jmp	.L27
.L25:
	movss	xmm0, DWORD PTR -20[rbp]
	cvtss2sd	xmm0, xmm0
	movss	xmm1, DWORD PTR -24[rbp]
	pxor	xmm2, xmm2
	cvtss2sd	xmm2, xmm1
	movq	rax, xmm2
	mov	edx, DWORD PTR -16[rbp]
	mov	esi, edx
	movapd	xmm1, xmm0
	movq	xmm0, rax
	lea	rdi, .LC4[rip]
	mov	eax, 2
	call	printf@PLT
	mov	eax, 0
.L27:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L28
	call	__stack_chk_fail@PLT
.L28:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	main, .-main
	.section	.rodata
	.align 4
.LC2:
	.long	1092616192
	.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	"11076328.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	_calc_crc16, %function
_calc_crc16:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mvn	r3, #0
	strh	r3, [fp, #-10]	@ movhi
	b	.L2
.L7:
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	str	r2, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	ldrh	r3, [fp, #-10]	@ movhi
	eor	r3, r3, r2
	strh	r3, [fp, #-10]	@ movhi
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L3
.L6:
	ldrh	r3, [fp, #-10]
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L4
	ldrh	r3, [fp, #-10]
	lsr	r3, r3, #1
	strh	r3, [fp, #-10]	@ movhi
	ldrh	r3, [fp, #-10]	@ movhi
	eor	r3, r3, #-67108863
	eor	r3, r3, #66846720
	eor	r3, r3, #237568
	strh	r3, [fp, #-10]	@ movhi
	b	.L5
.L4:
	ldrh	r3, [fp, #-10]
	lsr	r3, r3, #1
	strh	r3, [fp, #-10]	@ movhi
.L5:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L3:
	ldr	r3, [fp, #-8]
	cmp	r3, #7
	bls	.L6
.L2:
	ldr	r3, [fp, #-20]
	sub	r2, r3, #1
	str	r2, [fp, #-20]
	cmp	r3, #0
	bne	.L7
	ldrh	r3, [fp, #-10]
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	_calc_crc16, .-_calc_crc16
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	_combine_bytes, %function
_combine_bytes:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	mov	r3, r0
	mov	r2, r1
	strb	r3, [fp, #-5]
	mov	r3, r2
	strb	r3, [fp, #-6]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	lsl	r3, r3, #8
	lsl	r3, r3, #16
	asr	r2, r3, #16
	ldrb	r3, [fp, #-6]	@ zero_extendqisi2
	lsl	r3, r3, #16
	asr	r3, r3, #16
	orr	r3, r2, r3
	lsl	r3, r3, #16
	asr	r3, r3, #16
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	_combine_bytes, .-_combine_bytes
	.section	.rodata
	.align	2
.LC0:
	.ascii	"/dev/i2c-\000"
	.align	2
.LC1:
	.ascii	"%s%d\000"
	.global	__aeabi_ui2f
	.global	__aeabi_fdiv
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	am2321
	.syntax unified
	.arm
	.fpu softvfp
	.type	am2321, %function
am2321:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #64
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	str	r2, [fp, #-56]
	ldr	r3, .L23
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r0, fp, #20
	ldr	r3, [fp, #-56]
	str	r3, [sp]
	ldr	r3, .L23+4
	ldr	r2, .L23+8
	mov	r1, #13
	bl	snprintf
	sub	r3, fp, #20
	mov	r1, #2
	mov	r0, r3
	bl	open
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bge	.L12
	mov	r3, #1
	b	.L21
.L12:
	mov	r2, #92
	ldr	r1, .L23+12
	ldr	r0, [fp, #-32]
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	bge	.L14
	mov	r3, #2
	b	.L21
.L14:
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-32]
	bl	write
	mov	r0, #1000
	bl	usleep
	mov	r3, #3
	strb	r3, [fp, #-28]
	mov	r3, #0
	strb	r3, [fp, #-27]
	mov	r3, #4
	strb	r3, [fp, #-26]
	sub	r3, fp, #28
	mov	r2, #3
	mov	r1, r3
	ldr	r0, [fp, #-32]
	bl	write
	mov	r3, r0
	cmp	r3, #0
	bge	.L15
	mov	r3, #3
	b	.L21
.L15:
	mov	r0, #1600
	bl	usleep
	sub	r3, fp, #28
	mov	r2, #8
	mov	r1, r3
	ldr	r0, [fp, #-32]
	bl	read
	mov	r3, r0
	cmp	r3, #0
	bge	.L16
	mov	r3, #4
	b	.L21
.L16:
	ldr	r0, [fp, #-32]
	bl	close
	ldrb	r3, [fp, #-28]	@ zero_extendqisi2
	cmp	r3, #3
	bne	.L17
	ldrb	r3, [fp, #-27]	@ zero_extendqisi2
	cmp	r3, #4
	beq	.L18
.L17:
	mov	r3, #9
	b	.L21
.L18:
	sub	r3, fp, #28
	mov	r1, #6
	mov	r0, r3
	bl	_calc_crc16
	mov	r3, r0
	strh	r3, [fp, #-38]	@ movhi
	ldrb	r3, [fp, #-21]	@ zero_extendqisi2
	ldrb	r2, [fp, #-22]	@ zero_extendqisi2
	mov	r1, r2
	mov	r0, r3
	bl	_combine_bytes
	mov	r3, r0
	strh	r3, [fp, #-36]	@ movhi
	ldrh	r2, [fp, #-38]
	ldrh	r3, [fp, #-36]
	cmp	r2, r3
	beq	.L19
	mov	r3, #10
	b	.L21
.L19:
	ldrb	r3, [fp, #-24]	@ zero_extendqisi2
	ldrb	r2, [fp, #-23]	@ zero_extendqisi2
	mov	r1, r2
	mov	r0, r3
	bl	_combine_bytes
	mov	r3, r0
	strh	r3, [fp, #-40]	@ movhi
	ldrb	r3, [fp, #-26]	@ zero_extendqisi2
	ldrb	r2, [fp, #-25]	@ zero_extendqisi2
	mov	r1, r2
	mov	r0, r3
	bl	_combine_bytes
	mov	r3, r0
	strh	r3, [fp, #-34]	@ movhi
	ldrsh	r3, [fp, #-40]
	cmp	r3, #0
	bge	.L20
	ldrh	r3, [fp, #-40]	@ movhi
	lsl	r3, r3, #17
	lsr	r3, r3, #17
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	rsb	r3, r3, #0
	strh	r3, [fp, #-40]	@ movhi
.L20:
	ldrh	r3, [fp, #-40]
	mov	r0, r3
	bl	__aeabi_ui2f
	mov	r3, r0
	ldr	r1, .L23+16
	mov	r0, r3
	bl	__aeabi_fdiv
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-48]
	str	r2, [r3]	@ float
	ldrh	r3, [fp, #-34]
	mov	r0, r3
	bl	__aeabi_ui2f
	mov	r3, r0
	ldr	r1, .L23+16
	mov	r0, r3
	bl	__aeabi_fdiv
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-52]
	str	r2, [r3]	@ float
	mov	r3, #0
.L21:
	ldr	r2, .L23
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L22
	bl	__stack_chk_fail
.L22:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L24:
	.align	2
.L23:
	.word	.LC2
	.word	.LC0
	.word	.LC1
	.word	1795
	.word	1092616192
	.size	am2321, .-am2321
	.section	.rodata
	.align	2
.LC3:
	.ascii	"{\"error\": %d}\000"
	.global	__aeabi_f2d
	.align	2
.LC4:
	.ascii	"{\"temperature\": %.2f, \"humidity\": %.2f, \"bus\""
	.ascii	": %d}\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.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	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #48
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	ldr	r3, .L31
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #1
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-40]
	cmp	r3, #1
	ble	.L26
	ldr	r3, [fp, #-44]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-24]
.L26:
	sub	r1, fp, #28
	sub	r3, fp, #32
	ldr	r2, [fp, #-24]
	mov	r0, r3
	bl	am2321
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	beq	.L27
	ldr	r1, [fp, #-20]
	ldr	r0, .L31+4
	bl	printf
	ldr	r3, [fp, #-20]
	b	.L29
.L27:
	ldr	r3, [fp, #-32]	@ float
	mov	r0, r3
	bl	__aeabi_f2d
	mov	r4, r0
	mov	r5, r1
	ldr	r3, [fp, #-28]	@ float
	mov	r0, r3
	bl	__aeabi_f2d
	mov	r2, r0
	mov	r3, r1
	ldr	r1, [fp, #-24]
	str	r1, [sp, #8]
	stm	sp, {r2-r3}
	mov	r2, r4
	mov	r3, r5
	ldr	r0, .L31+8
	bl	printf
	mov	r3, #0
.L29:
	ldr	r2, .L31
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L30
	bl	__stack_chk_fail
.L30:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L32:
	.align	2
.L31:
	.word	.LC5
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
