#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 */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ cli_exit();
int /*<<< orphan*/ cli_init();
int /*<<< orphan*/ cli_process();
int /*<<< orphan*/ mastercontroller_init();
int /*<<< orphan*/ mastercontroller_process();
int /*<<< orphan*/ mastercontroller_tick();
int /*<<< orphan*/ usleep(int);
int main() {
  cli_init();
  mastercontroller_init();
  uint8_t i = 0;
  while (1) {
    for (i = 0; i < 5; i++) {
      mastercontroller_process();
      mastercontroller_process();
      mastercontroller_process();
      mastercontroller_process();
      mastercontroller_process();
      usleep(200);
    }
    mastercontroller_tick();
    cli_process();
  }
  cli_exit();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1070 <cli_init@plt>
mov    $0x0,%al
call   1060 <mastercontroller_init@plt>
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    11d0 <main+0x70>
mov    $0x0,%al
call   1040 <mastercontroller_process@plt>
mov    $0x0,%al
call   1040 <mastercontroller_process@plt>
mov    $0x0,%al
call   1040 <mastercontroller_process@plt>
mov    $0x0,%al
call   1040 <mastercontroller_process@plt>
mov    $0x0,%al
call   1040 <mastercontroller_process@plt>
mov    $0xc8,%edi
call   1080 <usleep@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    118b <main+0x2b>
mov    $0x0,%al
call   1050 <mastercontroller_tick@plt>
mov    $0x0,%al
call   1030 <cli_process@plt>
jmp    1184 <main+0x24>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1070 <cli_init@plt>
xor    %eax,%eax
call   1060 <mastercontroller_init@plt>
nop
xor    %eax,%eax
call   1040 <mastercontroller_process@plt>
xor    %eax,%eax
call   1040 <mastercontroller_process@plt>
xor    %eax,%eax
call   1040 <mastercontroller_process@plt>
xor    %eax,%eax
call   1040 <mastercontroller_process@plt>
xor    %eax,%eax
call   1040 <mastercontroller_process@plt>
mov    $0xc8,%edi
call   1080 <usleep@plt>
xor    %eax,%eax
call   1040 <mastercontroller_process@plt>
xor    %eax,%eax
call   1040 <mastercontroller_process@plt>
xor    %eax,%eax
call   1040 <mastercontroller_process@plt>
xor    %eax,%eax
call   1040 <mastercontroller_process@plt>
xor    %eax,%eax
call   1040 <mastercontroller_process@plt>
mov    $0xc8,%edi
call   1080 <usleep@plt>
xor    %eax,%eax
call   1040 <mastercontroller_process@plt>
xor    %eax,%eax
call   1040 <mastercontroller_process@plt>
xor    %eax,%eax
call   1040 <mastercontroller_process@plt>
xor    %eax,%eax
call   1040 <mastercontroller_process@plt>
xor    %eax,%eax
call   1040 <mastercontroller_process@plt>
mov    $0xc8,%edi
call   1080 <usleep@plt>
xor    %eax,%eax
call   1040 <mastercontroller_process@plt>
xor    %eax,%eax
call   1040 <mastercontroller_process@plt>
xor    %eax,%eax
call   1040 <mastercontroller_process@plt>
xor    %eax,%eax
call   1040 <mastercontroller_process@plt>
xor    %eax,%eax
call   1040 <mastercontroller_process@plt>
mov    $0xc8,%edi
call   1080 <usleep@plt>
xor    %eax,%eax
call   1040 <mastercontroller_process@plt>
xor    %eax,%eax
call   1040 <mastercontroller_process@plt>
xor    %eax,%eax
call   1040 <mastercontroller_process@plt>
xor    %eax,%eax
call   1040 <mastercontroller_process@plt>
xor    %eax,%eax
call   1040 <mastercontroller_process@plt>
mov    $0xc8,%edi
call   1080 <usleep@plt>
xor    %eax,%eax
call   1050 <mastercontroller_tick@plt>
xor    %eax,%eax
call   1030 <cli_process@plt>
jmp    1170 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @cli_init()
%4 = call i32 (...) @mastercontroller_init()
store i32 0, i32* %2
br label %5
5: ; preds = %0, %19
store i32 0, i32* %2
br label %6
6: ; preds = %16, %5
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, 5
br i1 %8, label %9, label %19
9: ; preds = %6
%10 = call i32 (...) @mastercontroller_process()
%11 = call i32 (...) @mastercontroller_process()
%12 = call i32 (...) @mastercontroller_process()
%13 = call i32 (...) @mastercontroller_process()
%14 = call i32 (...) @mastercontroller_process()
%15 = call i32 @usleep(i32 200)
br label %16
16: ; preds = %9
%17 = load i32, i32* %2
%18 = add nsw i32 %17, 1
store i32 %18, i32* %2
br label %6
19: ; preds = %6
%20 = call i32 (...) @mastercontroller_tick()
%21 = call i32 (...) @cli_process()
br label %5
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @cli_init()
%2 = tail call i32 (...) @mastercontroller_init()
br label %3
3: ; preds = %3, %0
%4 = tail call i32 (...) @mastercontroller_process()
%5 = tail call i32 (...) @mastercontroller_process()
%6 = tail call i32 (...) @mastercontroller_process()
%7 = tail call i32 (...) @mastercontroller_process()
%8 = tail call i32 (...) @mastercontroller_process()
%9 = tail call i32 @usleep(i32 200)
%10 = tail call i32 (...) @mastercontroller_process()
%11 = tail call i32 (...) @mastercontroller_process()
%12 = tail call i32 (...) @mastercontroller_process()
%13 = tail call i32 (...) @mastercontroller_process()
%14 = tail call i32 (...) @mastercontroller_process()
%15 = tail call i32 @usleep(i32 200)
%16 = tail call i32 (...) @mastercontroller_process()
%17 = tail call i32 (...) @mastercontroller_process()
%18 = tail call i32 (...) @mastercontroller_process()
%19 = tail call i32 (...) @mastercontroller_process()
%20 = tail call i32 (...) @mastercontroller_process()
%21 = tail call i32 @usleep(i32 200)
%22 = tail call i32 (...) @mastercontroller_process()
%23 = tail call i32 (...) @mastercontroller_process()
%24 = tail call i32 (...) @mastercontroller_process()
%25 = tail call i32 (...) @mastercontroller_process()
%26 = tail call i32 (...) @mastercontroller_process()
%27 = tail call i32 @usleep(i32 200)
%28 = tail call i32 (...) @mastercontroller_process()
%29 = tail call i32 (...) @mastercontroller_process()
%30 = tail call i32 (...) @mastercontroller_process()
%31 = tail call i32 (...) @mastercontroller_process()
%32 = tail call i32 (...) @mastercontroller_process()
%33 = tail call i32 @usleep(i32 200)
%34 = tail call i32 (...) @mastercontroller_tick()
%35 = tail call i32 (...) @cli_process()
br label %3
}