#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*/ direction(int, char *);
int /*<<< orphan*/ drive(int, char *);
int /*<<< orphan*/ exportIO(int);
int /*<<< orphan*/ setDigital(int, int);
int /*<<< orphan*/ unexportIO(int);
int /*<<< orphan*/ usleep(int);
int main(int argc, char **argv) {
  exportIO(26);
  direction(26, "out");
  drive(26, "strong");
  int i;
  for (i = 1; i < 11; i++) {
    setDigital(26, 1);
    usleep(500000);
    setDigital(26, 0);
    usleep(500000);
  }
  unexportIO(26);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1a,%edi
call   1050 <exportIO@plt>
mov    $0x1a,%edi
lea    0xe74(%rip),%rsi
call   1030 <direction@plt>
mov    $0x1a,%edi
lea    0xe67(%rip),%rsi
call   1060 <drive@plt>
movl   $0x1,-0x14(%rbp)
cmpl   $0xb,-0x14(%rbp)
jge    11f0 <main+0x90>
mov    $0x1a,%edi
mov    $0x1,%esi
call   1040 <setDigital@plt>
mov    $0x7a120,%edi
call   1080 <usleep@plt>
mov    $0x1a,%edi
xor    %esi,%esi
call   1040 <setDigital@plt>
mov    $0x7a120,%edi
call   1080 <usleep@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11a9 <main+0x49>
mov    $0x1a,%edi
call   1070 <unexportIO@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1a,%edi
call   1050 <exportIO@plt>
lea    0xe8e(%rip),%rsi
mov    $0x1a,%edi
call   1030 <direction@plt>
lea    0xe81(%rip),%rsi
mov    $0x1a,%edi
call   1060 <drive@plt>
mov    $0x1a,%edi
mov    $0x1,%esi
call   1040 <setDigital@plt>
mov    $0x7a120,%edi
call   1080 <usleep@plt>
mov    $0x1a,%edi
xor    %esi,%esi
call   1040 <setDigital@plt>
mov    $0x7a120,%edi
call   1080 <usleep@plt>
mov    $0x1a,%edi
mov    $0x1,%esi
call   1040 <setDigital@plt>
mov    $0x7a120,%edi
call   1080 <usleep@plt>
mov    $0x1a,%edi
xor    %esi,%esi
call   1040 <setDigital@plt>
mov    $0x7a120,%edi
call   1080 <usleep@plt>
mov    $0x1a,%edi
mov    $0x1,%esi
call   1040 <setDigital@plt>
mov    $0x7a120,%edi
call   1080 <usleep@plt>
mov    $0x1a,%edi
xor    %esi,%esi
call   1040 <setDigital@plt>
mov    $0x7a120,%edi
call   1080 <usleep@plt>
mov    $0x1a,%edi
mov    $0x1,%esi
call   1040 <setDigital@plt>
mov    $0x7a120,%edi
call   1080 <usleep@plt>
mov    $0x1a,%edi
xor    %esi,%esi
call   1040 <setDigital@plt>
mov    $0x7a120,%edi
call   1080 <usleep@plt>
mov    $0x1a,%edi
mov    $0x1,%esi
call   1040 <setDigital@plt>
mov    $0x7a120,%edi
call   1080 <usleep@plt>
mov    $0x1a,%edi
xor    %esi,%esi
call   1040 <setDigital@plt>
mov    $0x7a120,%edi
call   1080 <usleep@plt>
mov    $0x1a,%edi
mov    $0x1,%esi
call   1040 <setDigital@plt>
mov    $0x7a120,%edi
call   1080 <usleep@plt>
mov    $0x1a,%edi
xor    %esi,%esi
call   1040 <setDigital@plt>
mov    $0x7a120,%edi
call   1080 <usleep@plt>
mov    $0x1a,%edi
mov    $0x1,%esi
call   1040 <setDigital@plt>
mov    $0x7a120,%edi
call   1080 <usleep@plt>
mov    $0x1a,%edi
xor    %esi,%esi
call   1040 <setDigital@plt>
mov    $0x7a120,%edi
call   1080 <usleep@plt>
mov    $0x1a,%edi
mov    $0x1,%esi
call   1040 <setDigital@plt>
mov    $0x7a120,%edi
call   1080 <usleep@plt>
mov    $0x1a,%edi
xor    %esi,%esi
call   1040 <setDigital@plt>
mov    $0x7a120,%edi
call   1080 <usleep@plt>
mov    $0x1a,%edi
mov    $0x1,%esi
call   1040 <setDigital@plt>
mov    $0x7a120,%edi
call   1080 <usleep@plt>
mov    $0x1a,%edi
xor    %esi,%esi
call   1040 <setDigital@plt>
mov    $0x7a120,%edi
call   1080 <usleep@plt>
mov    $0x1a,%edi
mov    $0x1,%esi
call   1040 <setDigital@plt>
mov    $0x7a120,%edi
call   1080 <usleep@plt>
mov    $0x1a,%edi
xor    %esi,%esi
call   1040 <setDigital@plt>
mov    $0x7a120,%edi
call   1080 <usleep@plt>
mov    $0x1a,%edi
call   1070 <unexportIO@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"out\00"
@.str.1 = [7 x i8] c"strong\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @exportIO(i32 26)
%8 = call i32 @direction(i32 26, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @drive(i32 26, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %6
br label %10
10: ; preds = %18, %2
%11 = load i32, i32* %6
%12 = icmp slt i32 %11, 11
br i1 %12, label %13, label %21
13: ; preds = %10
%14 = call i32 @setDigital(i32 26, i32 1)
%15 = call i32 @usleep(i32 500000)
%16 = call i32 @setDigital(i32 26, i32 0)
%17 = call i32 @usleep(i32 500000)
br label %18
18: ; preds = %13
%19 = load i32, i32* %6
%20 = add nsw i32 %19, 1
store i32 %20, i32* %6
br label %10
21: ; preds = %10
%22 = call i32 @unexportIO(i32 26)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"out\00"
@.str.1 = [7 x i8] c"strong\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @exportIO(i32 26)
%4 = tail call i32 @direction(i32 26, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @drive(i32 26, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @setDigital(i32 26, i32 1)
%7 = tail call i32 @usleep(i32 500000)
%8 = tail call i32 @setDigital(i32 26, i32 0)
%9 = tail call i32 @usleep(i32 500000)
%10 = tail call i32 @setDigital(i32 26, i32 1)
%11 = tail call i32 @usleep(i32 500000)
%12 = tail call i32 @setDigital(i32 26, i32 0)
%13 = tail call i32 @usleep(i32 500000)
%14 = tail call i32 @setDigital(i32 26, i32 1)
%15 = tail call i32 @usleep(i32 500000)
%16 = tail call i32 @setDigital(i32 26, i32 0)
%17 = tail call i32 @usleep(i32 500000)
%18 = tail call i32 @setDigital(i32 26, i32 1)
%19 = tail call i32 @usleep(i32 500000)
%20 = tail call i32 @setDigital(i32 26, i32 0)
%21 = tail call i32 @usleep(i32 500000)
%22 = tail call i32 @setDigital(i32 26, i32 1)
%23 = tail call i32 @usleep(i32 500000)
%24 = tail call i32 @setDigital(i32 26, i32 0)
%25 = tail call i32 @usleep(i32 500000)
%26 = tail call i32 @setDigital(i32 26, i32 1)
%27 = tail call i32 @usleep(i32 500000)
%28 = tail call i32 @setDigital(i32 26, i32 0)
%29 = tail call i32 @usleep(i32 500000)
%30 = tail call i32 @setDigital(i32 26, i32 1)
%31 = tail call i32 @usleep(i32 500000)
%32 = tail call i32 @setDigital(i32 26, i32 0)
%33 = tail call i32 @usleep(i32 500000)
%34 = tail call i32 @setDigital(i32 26, i32 1)
%35 = tail call i32 @usleep(i32 500000)
%36 = tail call i32 @setDigital(i32 26, i32 0)
%37 = tail call i32 @usleep(i32 500000)
%38 = tail call i32 @setDigital(i32 26, i32 1)
%39 = tail call i32 @usleep(i32 500000)
%40 = tail call i32 @setDigital(i32 26, i32 0)
%41 = tail call i32 @usleep(i32 500000)
%42 = tail call i32 @setDigital(i32 26, i32 1)
%43 = tail call i32 @usleep(i32 500000)
%44 = tail call i32 @setDigital(i32 26, i32 0)
%45 = tail call i32 @usleep(i32 500000)
%46 = tail call i32 @unexportIO(i32 26)
ret i32 0
}