#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*/ ao();
int /*<<< orphan*/ motor(int, int);
int /*<<< orphan*/ msleep(int);
int /*<<< orphan*/ printf(char *);
int main() {
  if (5 == 5) {
    printf("Moving forward because: 5 == 5 \n");
    motor(0, 100);
    motor(3, 100);
    msleep(1000);
  }
  if (5 != 5) {
    printf("Moving backward because: 5 != 5 \n");
    motor(0, -100);
    motor(3, -100);
    msleep(1000);
  }
  if (5 > 6) {
    printf("Moving forward because: 5 > 6 \n");
    motor(0, 100);
    motor(3, 100);
    msleep(1000);
  }
  if (5 < 6) {
    printf("Moving forward because: 5 < 6 \n");
    motor(0, 100);
    motor(3, 100);
    msleep(1000);
  }
  if (5 >= 7) {
    printf("Moving backward because: 5 >= 7 \n");
    motor(0, -100);
    motor(3, -100);
    msleep(1000);
  }
  if (5 >= 5) {
    printf("Moving forward because: 5 >= 5 \n");
    motor(0, 100);
    motor(3, 100);
    msleep(1000);
  }
  if (5 <= 7) {
    printf("Moving backward because: 5 <= 7 \n");
    motor(0, -100);
    motor(3, -100);
    msleep(1000);
  }
  if (5 <= 4) {
    printf("Moving backward because: 5 <= 4 \n");
    motor(0, -100);
    motor(3, -100);
    msleep(1000);
  }
  if (5 <= 5) {
    printf("Moving backward because: 5 <= 5 \n");
    motor(0, -100);
    motor(3, -100);
    msleep(1000);
  }
  ao();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
call   1050 <printf@plt>
xor    %edi,%edi
mov    $0x64,%esi
call   1030 <motor@plt>
mov    $0x3,%edi
mov    $0x64,%esi
call   1030 <motor@plt>
mov    $0x3e8,%edi
call   1040 <msleep@plt>
lea    0xe9a(%rip),%rdi
call   1050 <printf@plt>
xor    %edi,%edi
mov    $0x64,%esi
call   1030 <motor@plt>
mov    $0x3,%edi
mov    $0x64,%esi
call   1030 <motor@plt>
mov    $0x3e8,%edi
call   1040 <msleep@plt>
lea    0xe89(%rip),%rdi
call   1050 <printf@plt>
xor    %edi,%edi
mov    $0x64,%esi
call   1030 <motor@plt>
mov    $0x3,%edi
mov    $0x64,%esi
call   1030 <motor@plt>
mov    $0x3e8,%edi
call   1040 <msleep@plt>
lea    0xe79(%rip),%rdi
call   1050 <printf@plt>
xor    %edi,%edi
mov    $0xffffff9c,%esi
call   1030 <motor@plt>
mov    $0x3,%edi
mov    $0xffffff9c,%esi
call   1030 <motor@plt>
mov    $0x3e8,%edi
call   1040 <msleep@plt>
lea    0xe6a(%rip),%rdi
call   1050 <printf@plt>
xor    %edi,%edi
mov    $0xffffff9c,%esi
call   1030 <motor@plt>
mov    $0x3,%edi
mov    $0xffffff9c,%esi
call   1030 <motor@plt>
mov    $0x3e8,%edi
call   1040 <msleep@plt>
mov    $0x0,%al
call   1060 <ao@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
mov    $0x64,%esi
call   1030 <motor@plt>
mov    $0x3,%edi
mov    $0x64,%esi
call   1030 <motor@plt>
mov    $0x3e8,%edi
call   1050 <msleep@plt>
lea    0xea7(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
mov    $0x64,%esi
call   1030 <motor@plt>
mov    $0x3,%edi
mov    $0x64,%esi
call   1030 <motor@plt>
mov    $0x3e8,%edi
call   1050 <msleep@plt>
lea    0xe95(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
mov    $0x64,%esi
call   1030 <motor@plt>
mov    $0x3,%edi
mov    $0x64,%esi
call   1030 <motor@plt>
mov    $0x3e8,%edi
call   1050 <msleep@plt>
lea    0xe84(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
mov    $0xffffff9c,%esi
call   1030 <motor@plt>
mov    $0x3,%edi
mov    $0xffffff9c,%esi
call   1030 <motor@plt>
mov    $0x3e8,%edi
call   1050 <msleep@plt>
lea    0xe74(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
mov    $0xffffff9c,%esi
call   1030 <motor@plt>
mov    $0x3,%edi
mov    $0xffffff9c,%esi
call   1030 <motor@plt>
mov    $0x3e8,%edi
call   1050 <msleep@plt>
xor    %eax,%eax
call   1060 <ao@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [33 x i8] c"Moving forward because: 5 == 5 \0A\00"
@.str.1 = [32 x i8] c"Moving forward because: 5 < 6 \0A\00"
@.str.2 = [33 x i8] c"Moving forward because: 5 >= 5 \0A\00"
@.str.3 = [34 x i8] c"Moving backward because: 5 <= 7 \0A\00"
@.str.4 = [34 x i8] c"Moving backward because: 5 <= 5 \0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @motor(i32 0, i32 100)
%4 = call i32 @motor(i32 3, i32 100)
%5 = call i32 @msleep(i32 1000)
%6 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @motor(i32 0, i32 100)
%8 = call i32 @motor(i32 3, i32 100)
%9 = call i32 @msleep(i32 1000)
%10 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
%11 = call i32 @motor(i32 0, i32 100)
%12 = call i32 @motor(i32 3, i32 100)
%13 = call i32 @msleep(i32 1000)
%14 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0))
%15 = call i32 @motor(i32 0, i32 -100)
%16 = call i32 @motor(i32 3, i32 -100)
%17 = call i32 @msleep(i32 1000)
%18 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0))
%19 = call i32 @motor(i32 0, i32 -100)
%20 = call i32 @motor(i32 3, i32 -100)
%21 = call i32 @msleep(i32 1000)
%22 = call i32 (...) @ao()
ret i32 0
}

LLVM IR (-O2):
@str = [32 x i8] c"Moving forward because: 5 == 5 \00"
@str.5 = [31 x i8] c"Moving forward because: 5 < 6 \00"
@str.6 = [32 x i8] c"Moving forward because: 5 >= 5 \00"
@str.7 = [33 x i8] c"Moving backward because: 5 <= 7 \00"
@str.8 = [33 x i8] c"Moving backward because: 5 <= 5 \00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @motor(i32 0, i32 100)
%3 = tail call i32 @motor(i32 3, i32 100)
%4 = tail call i32 @msleep(i32 1000)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.5, i64 0, i64 0))
%6 = tail call i32 @motor(i32 0, i32 100)
%7 = tail call i32 @motor(i32 3, i32 100)
%8 = tail call i32 @msleep(i32 1000)
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.6, i64 0, i64 0))
%10 = tail call i32 @motor(i32 0, i32 100)
%11 = tail call i32 @motor(i32 3, i32 100)
%12 = tail call i32 @msleep(i32 1000)
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.7, i64 0, i64 0))
%14 = tail call i32 @motor(i32 0, i32 -100)
%15 = tail call i32 @motor(i32 3, i32 -100)
%16 = tail call i32 @msleep(i32 1000)
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.8, i64 0, i64 0))
%18 = tail call i32 @motor(i32 0, i32 -100)
%19 = tail call i32 @motor(i32 3, i32 -100)
%20 = tail call i32 @msleep(i32 1000)
%21 = tail call i32 (...) @ao()
ret i32 0
}