#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*/ init();
int /*<<< orphan*/ printf(char *, unsigned int, unsigned int, unsigned int,
                          unsigned int, unsigned int, unsigned int);
unsigned int proxSensor(int);
int /*<<< orphan*/ sleep(int);
int main(int argc, char *argv[]) {
  unsigned int prox1, prox2, prox3, prox4, prox5, prox6;
  init();
  while (1) {
    prox1 = proxSensor(1);
    prox2 = proxSensor(2);
    prox3 = proxSensor(3);
    prox4 = proxSensor(4);
    prox5 = proxSensor(5);
    prox6 = proxSensor(6);
    printf("proximity sensor = %d %d %d %d %d %d\n", prox1, prox2, prox3, prox4,
           prox5, prox6);
    sleep(1);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <init@plt>
mov    $0x1,%edi
call   1030 <proxSensor@plt>
mov    %eax,-0x14(%rbp)
mov    $0x2,%edi
call   1030 <proxSensor@plt>
mov    %eax,-0x18(%rbp)
mov    $0x3,%edi
call   1030 <proxSensor@plt>
mov    %eax,-0x1c(%rbp)
mov    $0x4,%edi
call   1030 <proxSensor@plt>
mov    %eax,-0x20(%rbp)
mov    $0x5,%edi
call   1030 <proxSensor@plt>
mov    %eax,-0x24(%rbp)
mov    $0x6,%edi
call   1030 <proxSensor@plt>
mov    %eax,-0x28(%rbp)
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
mov    -0x24(%rbp),%r9d
mov    -0x28(%rbp),%eax
lea    0xe3a(%rip),%rdi
mov    %eax,(%rsp)
call   1040 <printf@plt>
mov    $0x1,%edi
call   1060 <sleep@plt>
jmp    115d <main+0x1d>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
xor    %eax,%eax
call   1050 <init@plt>
lea    0xea7(%rip),%r14
nopl   0x0(%rax)
mov    $0x1,%edi
call   1030 <proxSensor@plt>
mov    %eax,%r15d
mov    $0x2,%edi
call   1030 <proxSensor@plt>
mov    %eax,%r12d
mov    $0x3,%edi
call   1030 <proxSensor@plt>
mov    %eax,%r13d
mov    $0x4,%edi
call   1030 <proxSensor@plt>
mov    %eax,%ebx
mov    $0x5,%edi
call   1030 <proxSensor@plt>
mov    %eax,%ebp
mov    $0x6,%edi
call   1030 <proxSensor@plt>
mov    %eax,(%rsp)
mov    %r14,%rdi
mov    %r15d,%esi
mov    %r12d,%edx
mov    %r13d,%ecx
mov    %ebx,%r8d
mov    %ebp,%r9d
call   1040 <printf@plt>
mov    $0x1,%edi
call   1060 <sleep@plt>
jmp    1160 <main+0x20>

LLVM IR (-O0):
@.str = [38 x i8] c"proximity sensor = %d %d %d %d %d %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%12 = call i32 (...) @init()
br label %13
13: ; preds = %2, %13
%14 = call i32 @proxSensor(i32 1)
store i32 %14, i32* %6
%15 = call i32 @proxSensor(i32 2)
store i32 %15, i32* %7
%16 = call i32 @proxSensor(i32 3)
store i32 %16, i32* %8
%17 = call i32 @proxSensor(i32 4)
store i32 %17, i32* %9
%18 = call i32 @proxSensor(i32 5)
store i32 %18, i32* %10
%19 = call i32 @proxSensor(i32 6)
store i32 %19, i32* %11
%20 = load i32, i32* %6
%21 = load i32, i32* %7
%22 = load i32, i32* %8
%23 = load i32, i32* %9
%24 = load i32, i32* %10
%25 = load i32, i32* %11
%26 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %20, i32 %21, i32 %22, i32 %23, i32 %24, i32 %25)
%27 = call i32 @sleep(i32 1)
br label %13
}

LLVM IR (-O2):
@.str = [38 x i8] c"proximity sensor = %d %d %d %d %d %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @init()
br label %4
4: ; preds = %4, %2
%5 = tail call i32 @proxSensor(i32 1)
%6 = tail call i32 @proxSensor(i32 2)
%7 = tail call i32 @proxSensor(i32 3)
%8 = tail call i32 @proxSensor(i32 4)
%9 = tail call i32 @proxSensor(i32 5)
%10 = tail call i32 @proxSensor(i32 6)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6, i32 %7, i32 %8, i32 %9, i32 %10)
%12 = tail call i32 @sleep(i32 1)
br label %4
}