#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int i, sensorData[3];
  for (i = 0; i < 3; i++)
    sensorData[i] = 2;
  assert(0 == ((sensorData[0] - sensorData[1] - sensorData[2]) / 3));
  assert(2 == ((sensorData[0] + sensorData[1] + sensorData[2]) / 3));
  assert(2 == ((sensorData[0] * sensorData[1] * sensorData[2]) / 3));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    114a <main+0x3a>
movslq -0x8(%rbp),%rax
movl   $0x2,-0x14(%rbp,%rax,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
mov    -0x14(%rbp),%eax
sub    -0x10(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x14(%rbp),%eax
add    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    $0x2,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x14(%rbp),%eax
imul   -0x10(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    $0x2,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [3 x i32]
store i32 0, i32* %1
store i32 0, i32* %2
br label %4
4: ; preds = %11, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 3
br i1 %6, label %7, label %14
7: ; preds = %4
%8 = load i32, i32* %2
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 %9
store i32 2, i32* %10
br label %11
11: ; preds = %7
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 1
store i32 %13, i32* %2
br label %4
14: ; preds = %4
%15 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
%16 = load i32, i32* %15
%17 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 1
%18 = load i32, i32* %17
%19 = sub nsw i32 %16, %18
%20 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 2
%21 = load i32, i32* %20
%22 = sub nsw i32 %19, %21
%23 = sdiv i32 %22, 3
%24 = icmp eq i32 0, %23
%25 = zext i1 %24 to i32
%26 = call i32 @assert(i32 %25)
%27 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
%28 = load i32, i32* %27
%29 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 1
%30 = load i32, i32* %29
%31 = add nsw i32 %28, %30
%32 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 2
%33 = load i32, i32* %32
%34 = add nsw i32 %31, %33
%35 = sdiv i32 %34, 3
%36 = icmp eq i32 2, %35
%37 = zext i1 %36 to i32
%38 = call i32 @assert(i32 %37)
%39 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
%40 = load i32, i32* %39
%41 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 1
%42 = load i32, i32* %41
%43 = mul nsw i32 %40, %42
%44 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 2
%45 = load i32, i32* %44
%46 = mul nsw i32 %43, %45
%47 = sdiv i32 %46, 3
%48 = icmp eq i32 2, %47
%49 = zext i1 %48 to i32
%50 = call i32 @assert(i32 %49)
%51 = load i32, i32* %1
ret i32 %51
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
%2 = tail call i32 @assert(i32 1)
%3 = tail call i32 @assert(i32 1)
ret i32 0
}