#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*/ baseRuota(int, int);
int /*<<< orphan*/ braccioAlzato();
int /*<<< orphan*/ braccioChiuso(int);
int /*<<< orphan*/ pinzaClose();
int /*<<< orphan*/ pinzaOpen();
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ usleep(int);
void stretching() {
  int i;
  baseRuota(200, 0);
  braccioAlzato();
  sleep(1);
  for (i = 0; i < 2; i++) {
    pinzaOpen();
    usleep(700000);
    pinzaClose();
    usleep(700000);
  }
  baseRuota(20, 90);
  braccioChiuso(100);
  usleep(500000);
}


x86 assembly (clang, -O0):
<stretching>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xc8,%edi
xor    %esi,%esi
call   1030 <baseRuota@plt>
mov    $0x0,%al
call   1060 <braccioAlzato@plt>
mov    $0x1,%edi
call   1080 <sleep@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x2,-0x4(%rbp)
jge    11d6 <stretching+0x66>
mov    $0x0,%al
call   1040 <pinzaOpen@plt>
mov    $0xaae60,%edi
call   1090 <usleep@plt>
mov    $0x0,%al
call   1050 <pinzaClose@plt>
mov    $0xaae60,%edi
call   1090 <usleep@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    119c <stretching+0x2c>
mov    $0x14,%edi
mov    $0x5a,%esi
call   1030 <baseRuota@plt>
mov    $0x64,%edi
call   1070 <braccioChiuso@plt>
mov    $0x7a120,%edi
call   1090 <usleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stretching>:
push   %rax
mov    $0xc8,%edi
xor    %esi,%esi
call   1030 <baseRuota@plt>
xor    %eax,%eax
call   1060 <braccioAlzato@plt>
mov    $0x1,%edi
call   1080 <sleep@plt>
xor    %eax,%eax
call   1040 <pinzaOpen@plt>
mov    $0xaae60,%edi
call   1090 <usleep@plt>
xor    %eax,%eax
call   1050 <pinzaClose@plt>
mov    $0xaae60,%edi
call   1090 <usleep@plt>
xor    %eax,%eax
call   1040 <pinzaOpen@plt>
mov    $0xaae60,%edi
call   1090 <usleep@plt>
xor    %eax,%eax
call   1050 <pinzaClose@plt>
mov    $0xaae60,%edi
call   1090 <usleep@plt>
mov    $0x14,%edi
mov    $0x5a,%esi
call   1030 <baseRuota@plt>
mov    $0x64,%edi
call   1070 <braccioChiuso@plt>
mov    $0x7a120,%edi
pop    %rax
jmp    1090 <usleep@plt>

LLVM IR (-O0):
define void @stretching() {
%1 = alloca i32
%2 = call i32 @baseRuota(i32 200, i32 0)
%3 = call i32 (...) @braccioAlzato()
%4 = call i32 @sleep(i32 1)
store i32 0, i32* %1
br label %5
5: ; preds = %13, %0
%6 = load i32, i32* %1
%7 = icmp slt i32 %6, 2
br i1 %7, label %8, label %16
8: ; preds = %5
%9 = call i32 (...) @pinzaOpen()
%10 = call i32 @usleep(i32 700000)
%11 = call i32 (...) @pinzaClose()
%12 = call i32 @usleep(i32 700000)
br label %13
13: ; preds = %8
%14 = load i32, i32* %1
%15 = add nsw i32 %14, 1
store i32 %15, i32* %1
br label %5
16: ; preds = %5
%17 = call i32 @baseRuota(i32 20, i32 90)
%18 = call i32 @braccioChiuso(i32 100)
%19 = call i32 @usleep(i32 500000)
ret void
}

LLVM IR (-O2):
define void @stretching() {
%1 = tail call i32 @baseRuota(i32 200, i32 0)
%2 = tail call i32 (...) @braccioAlzato()
%3 = tail call i32 @sleep(i32 1)
%4 = tail call i32 (...) @pinzaOpen()
%5 = tail call i32 @usleep(i32 700000)
%6 = tail call i32 (...) @pinzaClose()
%7 = tail call i32 @usleep(i32 700000)
%8 = tail call i32 (...) @pinzaOpen()
%9 = tail call i32 @usleep(i32 700000)
%10 = tail call i32 (...) @pinzaClose()
%11 = tail call i32 @usleep(i32 700000)
%12 = tail call i32 @baseRuota(i32 20, i32 90)
%13 = tail call i32 @braccioChiuso(i32 100)
%14 = tail call i32 @usleep(i32 500000)
ret void
}