#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 MP_anin(int);
int /*<<< orphan*/ MP_motor(int, int);
int /*<<< orphan*/ printf(char *, ...);
void MP_display_light_intensity(void) {
  int PV_value = 0;
  printf("Helligkeitsanzeige der Fototransistoren 8..1:\n");
  MP_motor(3, 1);
  while (1) {
    printf("%x, %x, %x, %x, %x, %x, %x, %x\n", MP_anin(7), MP_anin(6),
           MP_anin(5), MP_anin(4), MP_anin(3), MP_anin(2), MP_anin(1),
           MP_anin(0));
  };
}


x86 assembly (clang, -O0):
<MP_display_light_intensity>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x3,%edi
mov    $0x1,%esi
call   1040 <MP_motor@plt>
mov    $0x7,%edi
call   1050 <MP_anin@plt>
mov    %eax,-0x20(%rbp)
mov    $0x6,%edi
call   1050 <MP_anin@plt>
mov    %eax,-0x1c(%rbp)
mov    $0x5,%edi
call   1050 <MP_anin@plt>
mov    %eax,-0x18(%rbp)
mov    $0x4,%edi
call   1050 <MP_anin@plt>
mov    %eax,-0x14(%rbp)
mov    $0x3,%edi
call   1050 <MP_anin@plt>
mov    %eax,-0x10(%rbp)
mov    $0x2,%edi
call   1050 <MP_anin@plt>
mov    %eax,-0xc(%rbp)
mov    $0x1,%edi
call   1050 <MP_anin@plt>
mov    %eax,-0x8(%rbp)
xor    %edi,%edi
call   1050 <MP_anin@plt>
mov    -0x20(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x10(%rbp),%r9d
mov    -0xc(%rbp),%r11d
mov    -0x8(%rbp),%r10d
lea    0xe51(%rip),%rdi
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
mov    $0x0,%al
call   1030 <printf@plt>
jmp    115c <MP_display_light_intensity+0x2c>

x86 assembly (clang, -O2):
<MP_display_light_intensity>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xece(%rip),%rdi
call   1030 <puts@plt>
mov    $0x3,%edi
mov    $0x1,%esi
call   1050 <MP_motor@plt>
cs nopw 0x0(%rax,%rax,1)
mov    $0x7,%edi
call   1060 <MP_anin@plt>
mov    %eax,0x4(%rsp)
mov    $0x6,%edi
call   1060 <MP_anin@plt>
mov    %eax,(%rsp)
mov    $0x5,%edi
call   1060 <MP_anin@plt>
mov    %eax,%r13d
mov    $0x4,%edi
call   1060 <MP_anin@plt>
mov    %eax,%r12d
mov    $0x3,%edi
call   1060 <MP_anin@plt>
mov    %eax,%ebp
mov    $0x2,%edi
call   1060 <MP_anin@plt>
mov    %eax,%r14d
mov    $0x1,%edi
call   1060 <MP_anin@plt>
mov    %eax,%r15d
xor    %edi,%edi
call   1060 <MP_anin@plt>
mov    %eax,%ebx
sub    $0x8,%rsp
lea    0xe21(%rip),%rdi
mov    0xc(%rsp),%esi
mov    0x8(%rsp),%edx
mov    %r13d,%ecx
mov    %r12d,%r8d
mov    %ebp,%r9d
xor    %eax,%eax
push   %rbx
push   %r15
push   %r14
call   1040 <printf@plt>
add    $0x20,%rsp
jmp    1170 <MP_display_light_intensity+0x30>

LLVM IR (-O0):
@.str = [47 x i8] c"Helligkeitsanzeige der Fototransistoren 8..1:\0A\00"
@.str.1 = [32 x i8] c"%x, %x, %x, %x, %x, %x, %x, %x\0A\00"
define void @MP_display_light_intensity() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @MP_motor(i32 3, i32 1)
br label %4
4: ; preds = %0, %4
%5 = call i32 @MP_anin(i32 7)
%6 = call i32 @MP_anin(i32 6)
%7 = call i32 @MP_anin(i32 5)
%8 = call i32 @MP_anin(i32 4)
%9 = call i32 @MP_anin(i32 3)
%10 = call i32 @MP_anin(i32 2)
%11 = call i32 @MP_anin(i32 1)
%12 = call i32 @MP_anin(i32 0)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 %5, i32 %6, i32 %7, i32 %8, i32 %9, i32 %10, i32 %11, i32 %12)
br label %4
}

LLVM IR (-O2):
@.str.1 = [32 x i8] c"%x, %x, %x, %x, %x, %x, %x, %x\0A\00"
@str = [46 x i8] c"Helligkeitsanzeige der Fototransistoren 8..1:\00"
define void @MP_display_light_intensity() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @MP_motor(i32 3, i32 1)
br label %3
3: ; preds = %3, %0
%4 = tail call i32 @MP_anin(i32 7)
%5 = tail call i32 @MP_anin(i32 6)
%6 = tail call i32 @MP_anin(i32 5)
%7 = tail call i32 @MP_anin(i32 4)
%8 = tail call i32 @MP_anin(i32 3)
%9 = tail call i32 @MP_anin(i32 2)
%10 = tail call i32 @MP_anin(i32 1)
%11 = tail call i32 @MP_anin(i32 0)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9, i32 %10, i32 %11)
br label %3
}