#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*/ one();
int /*<<< orphan*/ usleep(int);
int /*<<< orphan*/ zero();
void sendCommand(char command[]) {
  usleep(12500);
  int i, j;
  for (i = 0; i < 3; i++) {
    for (j = 7; j >= 0; j--) {
      if ((((command[i]) >> (j)) & 0x01) == 0) {
        zero();
      } else {
        one();
      }
    }
  }
  zero();
  zero();
  zero();
}


x86 assembly (clang, -O0):
<sendCommand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x30d4,%edi
call   1050 <usleep@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x3,-0xc(%rbp)
jge    11be <sendCommand+0x8e>
movl   $0x7,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     11ab <sendCommand+0x7b>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x10(%rbp),%ecx
sar    %cl,%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    1191 <sendCommand+0x61>
mov    $0x0,%al
call   1030 <zero@plt>
jmp    1198 <sendCommand+0x68>
mov    $0x0,%al
call   1040 <one@plt>
jmp    119d <sendCommand+0x6d>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    115e <sendCommand+0x2e>
jmp    11b0 <sendCommand+0x80>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    114d <sendCommand+0x1d>
mov    $0x0,%al
call   1030 <zero@plt>
mov    $0x0,%al
call   1030 <zero@plt>
mov    $0x0,%al
call   1030 <zero@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendCommand>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0x30d4,%edi
call   1050 <usleep@plt>
xor    %ebx,%ebx
jmp    1165 <sendCommand+0x35>
cs nopw 0x0(%rax,%rax,1)
nop
xor    %eax,%eax
call   1030 <zero@plt>
add    $0x1,%rbx
cmp    $0x3,%rbx
je     1242 <sendCommand+0x112>
cmpb   $0x0,(%r14,%rbx,1)
js     11d0 <sendCommand+0xa0>
xor    %eax,%eax
call   1030 <zero@plt>
testb  $0x40,(%r14,%rbx,1)
jne    11de <sendCommand+0xae>
xor    %eax,%eax
call   1030 <zero@plt>
testb  $0x20,(%r14,%rbx,1)
je     11ec <sendCommand+0xbc>
xor    %eax,%eax
call   1040 <one@plt>
testb  $0x10,(%r14,%rbx,1)
je     11fa <sendCommand+0xca>
xor    %eax,%eax
call   1040 <one@plt>
testb  $0x8,(%r14,%rbx,1)
je     1208 <sendCommand+0xd8>
xor    %eax,%eax
call   1040 <one@plt>
testb  $0x4,(%r14,%rbx,1)
je     1216 <sendCommand+0xe6>
xor    %eax,%eax
call   1040 <one@plt>
testb  $0x2,(%r14,%rbx,1)
je     1224 <sendCommand+0xf4>
xor    %eax,%eax
call   1040 <one@plt>
testb  $0x1,(%r14,%rbx,1)
je     1150 <sendCommand+0x20>
jmp    1236 <sendCommand+0x106>
xor    %eax,%eax
call   1040 <one@plt>
testb  $0x40,(%r14,%rbx,1)
je     117a <sendCommand+0x4a>
xor    %eax,%eax
call   1040 <one@plt>
testb  $0x20,(%r14,%rbx,1)
jne    1188 <sendCommand+0x58>
xor    %eax,%eax
call   1030 <zero@plt>
testb  $0x10,(%r14,%rbx,1)
jne    1196 <sendCommand+0x66>
xor    %eax,%eax
call   1030 <zero@plt>
testb  $0x8,(%r14,%rbx,1)
jne    11a4 <sendCommand+0x74>
xor    %eax,%eax
call   1030 <zero@plt>
testb  $0x4,(%r14,%rbx,1)
jne    11b2 <sendCommand+0x82>
xor    %eax,%eax
call   1030 <zero@plt>
testb  $0x2,(%r14,%rbx,1)
jne    11c0 <sendCommand+0x90>
xor    %eax,%eax
call   1030 <zero@plt>
testb  $0x1,(%r14,%rbx,1)
je     1150 <sendCommand+0x20>
xor    %eax,%eax
call   1040 <one@plt>
jmp    1157 <sendCommand+0x27>
xor    %eax,%eax
call   1030 <zero@plt>
xor    %eax,%eax
call   1030 <zero@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <zero@plt>

LLVM IR (-O0):
define void @sendCommand(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
%5 = call i32 @usleep(i32 12500)
store i32 0, i32* %3
br label %6
6: ; preds = %33, %1
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 3
br i1 %8, label %9, label %36
9: ; preds = %6
store i32 7, i32* %4
br label %10
10: ; preds = %29, %9
%11 = load i32, i32* %4
%12 = icmp sge i32 %11, 0
br i1 %12, label %13, label %32
13: ; preds = %10
%14 = load i8*, i8** %2
%15 = load i32, i32* %3
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = load i32, i32* %4
%21 = ashr i32 %19, %20
%22 = and i32 %21, 1
%23 = icmp eq i32 %22, 0
br i1 %23, label %24, label %26
24: ; preds = %13
%25 = call i32 (...) @zero()
br label %28
26: ; preds = %13
%27 = call i32 (...) @one()
br label %28
28: ; preds = %26, %24
br label %29
29: ; preds = %28
%30 = load i32, i32* %4
%31 = add nsw i32 %30, -1
store i32 %31, i32* %4
br label %10
32: ; preds = %10
br label %33
33: ; preds = %32
%34 = load i32, i32* %3
%35 = add nsw i32 %34, 1
store i32 %35, i32* %3
br label %6
36: ; preds = %6
%37 = call i32 (...) @zero()
%38 = call i32 (...) @zero()
%39 = call i32 (...) @zero()
ret void
}

LLVM IR (-O2):
define void @sendCommand(i8* nocapture %0) {
%2 = tail call i32 @usleep(i32 12500)
br label %3
3: ; preds = %1, %68
%4 = phi i64 [ 0, %1 ], [ %69, %68 ]
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = icmp sgt i8 %6, -1
br i1 %7, label %8, label %10
8: ; preds = %3
%9 = tail call i32 (...) @zero()
br label %12
10: ; preds = %3
%11 = tail call i32 (...) @one()
br label %12
12: ; preds = %8, %10
%13 = load i8, i8* %5
%14 = and i8 %13, 64
%15 = icmp eq i8 %14, 0
br i1 %15, label %18, label %16
16: ; preds = %12
%17 = tail call i32 (...) @one()
br label %20
18: ; preds = %12
%19 = tail call i32 (...) @zero()
br label %20
20: ; preds = %18, %16
%21 = load i8, i8* %5
%22 = and i8 %21, 32
%23 = icmp eq i8 %22, 0
br i1 %23, label %26, label %24
24: ; preds = %20
%25 = tail call i32 (...) @one()
br label %28
26: ; preds = %20
%27 = tail call i32 (...) @zero()
br label %28
28: ; preds = %26, %24
%29 = load i8, i8* %5
%30 = and i8 %29, 16
%31 = icmp eq i8 %30, 0
br i1 %31, label %34, label %32
32: ; preds = %28
%33 = tail call i32 (...) @one()
br label %36
34: ; preds = %28
%35 = tail call i32 (...) @zero()
br label %36
36: ; preds = %34, %32
%37 = load i8, i8* %5
%38 = and i8 %37, 8
%39 = icmp eq i8 %38, 0
br i1 %39, label %42, label %40
40: ; preds = %36
%41 = tail call i32 (...) @one()
br label %44
42: ; preds = %36
%43 = tail call i32 (...) @zero()
br label %44
44: ; preds = %42, %40
%45 = load i8, i8* %5
%46 = and i8 %45, 4
%47 = icmp eq i8 %46, 0
br i1 %47, label %50, label %48
48: ; preds = %44
%49 = tail call i32 (...) @one()
br label %52
50: ; preds = %44
%51 = tail call i32 (...) @zero()
br label %52
52: ; preds = %50, %48
%53 = load i8, i8* %5
%54 = and i8 %53, 2
%55 = icmp eq i8 %54, 0
br i1 %55, label %58, label %56
56: ; preds = %52
%57 = tail call i32 (...) @one()
br label %60
58: ; preds = %52
%59 = tail call i32 (...) @zero()
br label %60
60: ; preds = %58, %56
%61 = load i8, i8* %5
%62 = and i8 %61, 1
%63 = icmp eq i8 %62, 0
br i1 %63, label %66, label %64
64: ; preds = %60
%65 = tail call i32 (...) @one()
br label %68
66: ; preds = %60
%67 = tail call i32 (...) @zero()
br label %68
68: ; preds = %66, %64
%69 = add nuw nsw i64 %4, 1
%70 = icmp eq i64 %69, 3
br i1 %70, label %71, label %3
71: ; preds = %68
%72 = tail call i32 (...) @zero()
%73 = tail call i32 (...) @zero()
%74 = tail call i32 (...) @zero()
ret void
}