#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*/ delay(int);
int /*<<< orphan*/ robocar_motor_control(int, int);
int /*<<< orphan*/ robocar_motor_speed(int, int);
void loop() {
  robocar_motor_speed(1, 0);
  robocar_motor_control(1, 0);
  delay(2000);
  robocar_motor_speed(1, 200);
  robocar_motor_control(2, 4);
  robocar_motor_control(3, 5);
  delay(5000);
  robocar_motor_speed(1, 200);
  robocar_motor_control(2, 5);
  robocar_motor_control(3, 4);
  delay(5000);
  robocar_motor_speed(1, 200);
  robocar_motor_control(2, 4);
  robocar_motor_control(3, 4);
  delay(3000);
  robocar_motor_speed(1, 200);
  robocar_motor_control(2, 5);
  robocar_motor_control(3, 5);
  delay(3000);
}


x86 assembly (clang, -O0):
<loop>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <robocar_motor_speed@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1040 <robocar_motor_control@plt>
mov    $0x7d0,%edi
call   1050 <delay@plt>
mov    $0x1,%edi
mov    $0xc8,%esi
call   1030 <robocar_motor_speed@plt>
mov    $0x2,%edi
mov    $0x4,%esi
call   1040 <robocar_motor_control@plt>
mov    $0x3,%edi
mov    $0x5,%esi
call   1040 <robocar_motor_control@plt>
mov    $0x1388,%edi
call   1050 <delay@plt>
mov    $0x1,%edi
mov    $0xc8,%esi
call   1030 <robocar_motor_speed@plt>
mov    $0x2,%edi
mov    $0x5,%esi
call   1040 <robocar_motor_control@plt>
mov    $0x3,%edi
mov    $0x4,%esi
call   1040 <robocar_motor_control@plt>
mov    $0x1388,%edi
call   1050 <delay@plt>
mov    $0x1,%edi
mov    $0xc8,%esi
call   1030 <robocar_motor_speed@plt>
mov    $0x2,%edi
mov    $0x4,%esi
call   1040 <robocar_motor_control@plt>
mov    $0x3,%edi
mov    $0x4,%esi
call   1040 <robocar_motor_control@plt>
mov    $0xbb8,%edi
call   1050 <delay@plt>
mov    $0x1,%edi
mov    $0xc8,%esi
call   1030 <robocar_motor_speed@plt>
mov    $0x2,%edi
mov    $0x5,%esi
call   1040 <robocar_motor_control@plt>
mov    $0x3,%edi
mov    $0x5,%esi
call   1040 <robocar_motor_control@plt>
mov    $0xbb8,%edi
call   1050 <delay@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<loop>:
push   %rax
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <robocar_motor_speed@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1040 <robocar_motor_control@plt>
mov    $0x7d0,%edi
call   1050 <delay@plt>
mov    $0x1,%edi
mov    $0xc8,%esi
call   1030 <robocar_motor_speed@plt>
mov    $0x2,%edi
mov    $0x4,%esi
call   1040 <robocar_motor_control@plt>
mov    $0x3,%edi
mov    $0x5,%esi
call   1040 <robocar_motor_control@plt>
mov    $0x1388,%edi
call   1050 <delay@plt>
mov    $0x1,%edi
mov    $0xc8,%esi
call   1030 <robocar_motor_speed@plt>
mov    $0x2,%edi
mov    $0x5,%esi
call   1040 <robocar_motor_control@plt>
mov    $0x3,%edi
mov    $0x4,%esi
call   1040 <robocar_motor_control@plt>
mov    $0x1388,%edi
call   1050 <delay@plt>
mov    $0x1,%edi
mov    $0xc8,%esi
call   1030 <robocar_motor_speed@plt>
mov    $0x2,%edi
mov    $0x4,%esi
call   1040 <robocar_motor_control@plt>
mov    $0x3,%edi
mov    $0x4,%esi
call   1040 <robocar_motor_control@plt>
mov    $0xbb8,%edi
call   1050 <delay@plt>
mov    $0x1,%edi
mov    $0xc8,%esi
call   1030 <robocar_motor_speed@plt>
mov    $0x2,%edi
mov    $0x5,%esi
call   1040 <robocar_motor_control@plt>
mov    $0x3,%edi
mov    $0x5,%esi
call   1040 <robocar_motor_control@plt>
mov    $0xbb8,%edi
pop    %rax
jmp    1050 <delay@plt>

LLVM IR (-O0):
define void @loop() {
%1 = call i32 @robocar_motor_speed(i32 1, i32 0)
%2 = call i32 @robocar_motor_control(i32 1, i32 0)
%3 = call i32 @delay(i32 2000)
%4 = call i32 @robocar_motor_speed(i32 1, i32 200)
%5 = call i32 @robocar_motor_control(i32 2, i32 4)
%6 = call i32 @robocar_motor_control(i32 3, i32 5)
%7 = call i32 @delay(i32 5000)
%8 = call i32 @robocar_motor_speed(i32 1, i32 200)
%9 = call i32 @robocar_motor_control(i32 2, i32 5)
%10 = call i32 @robocar_motor_control(i32 3, i32 4)
%11 = call i32 @delay(i32 5000)
%12 = call i32 @robocar_motor_speed(i32 1, i32 200)
%13 = call i32 @robocar_motor_control(i32 2, i32 4)
%14 = call i32 @robocar_motor_control(i32 3, i32 4)
%15 = call i32 @delay(i32 3000)
%16 = call i32 @robocar_motor_speed(i32 1, i32 200)
%17 = call i32 @robocar_motor_control(i32 2, i32 5)
%18 = call i32 @robocar_motor_control(i32 3, i32 5)
%19 = call i32 @delay(i32 3000)
ret void
}

LLVM IR (-O2):
define void @loop() {
%1 = tail call i32 @robocar_motor_speed(i32 1, i32 0)
%2 = tail call i32 @robocar_motor_control(i32 1, i32 0)
%3 = tail call i32 @delay(i32 2000)
%4 = tail call i32 @robocar_motor_speed(i32 1, i32 200)
%5 = tail call i32 @robocar_motor_control(i32 2, i32 4)
%6 = tail call i32 @robocar_motor_control(i32 3, i32 5)
%7 = tail call i32 @delay(i32 5000)
%8 = tail call i32 @robocar_motor_speed(i32 1, i32 200)
%9 = tail call i32 @robocar_motor_control(i32 2, i32 5)
%10 = tail call i32 @robocar_motor_control(i32 3, i32 4)
%11 = tail call i32 @delay(i32 5000)
%12 = tail call i32 @robocar_motor_speed(i32 1, i32 200)
%13 = tail call i32 @robocar_motor_control(i32 2, i32 4)
%14 = tail call i32 @robocar_motor_control(i32 3, i32 4)
%15 = tail call i32 @delay(i32 3000)
%16 = tail call i32 @robocar_motor_speed(i32 1, i32 200)
%17 = tail call i32 @robocar_motor_control(i32 2, i32 5)
%18 = tail call i32 @robocar_motor_control(i32 3, i32 5)
%19 = tail call i32 @delay(i32 3000)
ret void
}