#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*/ disable_servos();
int /*<<< orphan*/ enable_servos();
int /*<<< orphan*/ mav(int, int);
int /*<<< orphan*/ msleep(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ set_servo_position(int /*<<< orphan*/, int);
int main() {
  printf("Let's bulldoze!!!!\n");
  mav(2, 1000);
  mav(0, 1000);
  msleep(2000);
  ao();
  mav(2, 500);
  mav(0, 1000);
  msleep(2700);
  ao();
  mav(2, 1000);
  mav(0, 1000);
  msleep(8000);
  ao();
  mav(2, 500);
  mav(0, 1000);
  msleep(2700);
  ao();
  mav(2, 1000);
  mav(0, 1000);
  msleep(1500);
  ao();
  mav(2, 500);
  mav(0, 1000);
  msleep(2300);
  ao();
  set_servo_position(0, 150);
  enable_servos();
  set_servo_position(0, 1400);
  msleep(1000);
  mav(2, 500);
  mav(0, 500);
  msleep(20000);
  ao();
  set_servo_position(0, 150);
  msleep(1000);
  disable_servos();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe7a(%rip),%rdi
call   1050 <printf@plt>
mov    $0x2,%edi
mov    $0x3e8,%esi
call   1060 <mav@plt>
xor    %edi,%edi
mov    $0x3e8,%esi
call   1060 <mav@plt>
mov    $0x7d0,%edi
call   1040 <msleep@plt>
mov    $0x0,%al
call   1070 <ao@plt>
mov    $0x2,%edi
mov    $0x1f4,%esi
call   1060 <mav@plt>
xor    %edi,%edi
mov    $0x3e8,%esi
call   1060 <mav@plt>
mov    $0xa8c,%edi
call   1040 <msleep@plt>
mov    $0x0,%al
call   1070 <ao@plt>
mov    $0x2,%edi
mov    $0x3e8,%esi
call   1060 <mav@plt>
xor    %edi,%edi
mov    $0x3e8,%esi
call   1060 <mav@plt>
mov    $0x1f40,%edi
call   1040 <msleep@plt>
mov    $0x0,%al
call   1070 <ao@plt>
mov    $0x2,%edi
mov    $0x1f4,%esi
call   1060 <mav@plt>
xor    %edi,%edi
mov    $0x3e8,%esi
call   1060 <mav@plt>
mov    $0xa8c,%edi
call   1040 <msleep@plt>
mov    $0x0,%al
call   1070 <ao@plt>
mov    $0x2,%edi
mov    $0x3e8,%esi
call   1060 <mav@plt>
xor    %edi,%edi
mov    $0x3e8,%esi
call   1060 <mav@plt>
mov    $0x5dc,%edi
call   1040 <msleep@plt>
mov    $0x0,%al
call   1070 <ao@plt>
mov    $0x2,%edi
mov    $0x1f4,%esi
call   1060 <mav@plt>
xor    %edi,%edi
mov    $0x3e8,%esi
call   1060 <mav@plt>
mov    $0x8fc,%edi
call   1040 <msleep@plt>
mov    $0x0,%al
call   1070 <ao@plt>
xor    %edi,%edi
mov    $0x96,%esi
call   1090 <set_servo_position@plt>
mov    $0x0,%al
call   1080 <enable_servos@plt>
xor    %edi,%edi
mov    $0x578,%esi
call   1090 <set_servo_position@plt>
mov    $0x3e8,%edi
call   1040 <msleep@plt>
mov    $0x2,%edi
mov    $0x1f4,%esi
call   1060 <mav@plt>
xor    %edi,%edi
mov    $0x1f4,%esi
call   1060 <mav@plt>
mov    $0x4e20,%edi
call   1040 <msleep@plt>
mov    $0x0,%al
call   1070 <ao@plt>
xor    %edi,%edi
mov    $0x96,%esi
call   1090 <set_servo_position@plt>
mov    $0x3e8,%edi
call   1040 <msleep@plt>
mov    $0x0,%al
call   1030 <disable_servos@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xe88(%rip),%rdi
call   1030 <puts@plt>
mov    $0x2,%edi
mov    $0x3e8,%esi
call   1060 <mav@plt>
xor    %edi,%edi
mov    $0x3e8,%esi
call   1060 <mav@plt>
mov    $0x7d0,%edi
call   1050 <msleep@plt>
xor    %eax,%eax
call   1070 <ao@plt>
mov    $0x2,%edi
mov    $0x1f4,%esi
call   1060 <mav@plt>
xor    %edi,%edi
mov    $0x3e8,%esi
call   1060 <mav@plt>
mov    $0xa8c,%edi
call   1050 <msleep@plt>
xor    %eax,%eax
call   1070 <ao@plt>
mov    $0x2,%edi
mov    $0x3e8,%esi
call   1060 <mav@plt>
xor    %edi,%edi
mov    $0x3e8,%esi
call   1060 <mav@plt>
mov    $0x1f40,%edi
call   1050 <msleep@plt>
xor    %eax,%eax
call   1070 <ao@plt>
mov    $0x2,%edi
mov    $0x1f4,%esi
call   1060 <mav@plt>
xor    %edi,%edi
mov    $0x3e8,%esi
call   1060 <mav@plt>
mov    $0xa8c,%edi
call   1050 <msleep@plt>
xor    %eax,%eax
call   1070 <ao@plt>
mov    $0x2,%edi
mov    $0x3e8,%esi
call   1060 <mav@plt>
xor    %edi,%edi
mov    $0x3e8,%esi
call   1060 <mav@plt>
mov    $0x5dc,%edi
call   1050 <msleep@plt>
xor    %eax,%eax
call   1070 <ao@plt>
mov    $0x2,%edi
mov    $0x1f4,%esi
call   1060 <mav@plt>
xor    %edi,%edi
mov    $0x3e8,%esi
call   1060 <mav@plt>
mov    $0x8fc,%edi
call   1050 <msleep@plt>
xor    %eax,%eax
call   1070 <ao@plt>
xor    %edi,%edi
mov    $0x96,%esi
call   1090 <set_servo_position@plt>
xor    %eax,%eax
call   1080 <enable_servos@plt>
xor    %edi,%edi
mov    $0x578,%esi
call   1090 <set_servo_position@plt>
mov    $0x3e8,%edi
call   1050 <msleep@plt>
mov    $0x2,%edi
mov    $0x1f4,%esi
call   1060 <mav@plt>
xor    %edi,%edi
mov    $0x1f4,%esi
call   1060 <mav@plt>
mov    $0x4e20,%edi
call   1050 <msleep@plt>
xor    %eax,%eax
call   1070 <ao@plt>
xor    %edi,%edi
mov    $0x96,%esi
call   1090 <set_servo_position@plt>
mov    $0x3e8,%edi
call   1050 <msleep@plt>
xor    %eax,%eax
call   1040 <disable_servos@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Let's bulldoze!!!!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @mav(i32 2, i32 1000)
%4 = call i32 @mav(i32 0, i32 1000)
%5 = call i32 @msleep(i32 2000)
%6 = call i32 (...) @ao()
%7 = call i32 @mav(i32 2, i32 500)
%8 = call i32 @mav(i32 0, i32 1000)
%9 = call i32 @msleep(i32 2700)
%10 = call i32 (...) @ao()
%11 = call i32 @mav(i32 2, i32 1000)
%12 = call i32 @mav(i32 0, i32 1000)
%13 = call i32 @msleep(i32 8000)
%14 = call i32 (...) @ao()
%15 = call i32 @mav(i32 2, i32 500)
%16 = call i32 @mav(i32 0, i32 1000)
%17 = call i32 @msleep(i32 2700)
%18 = call i32 (...) @ao()
%19 = call i32 @mav(i32 2, i32 1000)
%20 = call i32 @mav(i32 0, i32 1000)
%21 = call i32 @msleep(i32 1500)
%22 = call i32 (...) @ao()
%23 = call i32 @mav(i32 2, i32 500)
%24 = call i32 @mav(i32 0, i32 1000)
%25 = call i32 @msleep(i32 2300)
%26 = call i32 (...) @ao()
%27 = call i32 @set_servo_position(i32 0, i32 150)
%28 = call i32 (...) @enable_servos()
%29 = call i32 @set_servo_position(i32 0, i32 1400)
%30 = call i32 @msleep(i32 1000)
%31 = call i32 @mav(i32 2, i32 500)
%32 = call i32 @mav(i32 0, i32 500)
%33 = call i32 @msleep(i32 20000)
%34 = call i32 (...) @ao()
%35 = call i32 @set_servo_position(i32 0, i32 150)
%36 = call i32 @msleep(i32 1000)
%37 = call i32 (...) @disable_servos()
ret i32 0
}

LLVM IR (-O2):
@str = [19 x i8] c"Let's bulldoze!!!!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @mav(i32 2, i32 1000)
%3 = tail call i32 @mav(i32 0, i32 1000)
%4 = tail call i32 @msleep(i32 2000)
%5 = tail call i32 (...) @ao()
%6 = tail call i32 @mav(i32 2, i32 500)
%7 = tail call i32 @mav(i32 0, i32 1000)
%8 = tail call i32 @msleep(i32 2700)
%9 = tail call i32 (...) @ao()
%10 = tail call i32 @mav(i32 2, i32 1000)
%11 = tail call i32 @mav(i32 0, i32 1000)
%12 = tail call i32 @msleep(i32 8000)
%13 = tail call i32 (...) @ao()
%14 = tail call i32 @mav(i32 2, i32 500)
%15 = tail call i32 @mav(i32 0, i32 1000)
%16 = tail call i32 @msleep(i32 2700)
%17 = tail call i32 (...) @ao()
%18 = tail call i32 @mav(i32 2, i32 1000)
%19 = tail call i32 @mav(i32 0, i32 1000)
%20 = tail call i32 @msleep(i32 1500)
%21 = tail call i32 (...) @ao()
%22 = tail call i32 @mav(i32 2, i32 500)
%23 = tail call i32 @mav(i32 0, i32 1000)
%24 = tail call i32 @msleep(i32 2300)
%25 = tail call i32 (...) @ao()
%26 = tail call i32 @set_servo_position(i32 0, i32 150)
%27 = tail call i32 (...) @enable_servos()
%28 = tail call i32 @set_servo_position(i32 0, i32 1400)
%29 = tail call i32 @msleep(i32 1000)
%30 = tail call i32 @mav(i32 2, i32 500)
%31 = tail call i32 @mav(i32 0, i32 500)
%32 = tail call i32 @msleep(i32 20000)
%33 = tail call i32 (...) @ao()
%34 = tail call i32 @set_servo_position(i32 0, i32 150)
%35 = tail call i32 @msleep(i32 1000)
%36 = tail call i32 (...) @disable_servos()
ret i32 0
}