#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*/ sendCommand(int);
int /*<<< orphan*/ sendData(int);
void draw_Graph(void) {
  sendCommand(0b10110000);
  sendCommand(0b00000000);
  sendCommand(0b00010000);
  sendData(0xFF);
  sendCommand(0b10110001);
  sendCommand(0b00000000);
  sendCommand(0b00010000);
  sendData(0xFF);
  sendCommand(0b10110010);
  sendCommand(0b00000000);
  sendCommand(0b00010000);
  sendData(0xFF);
  sendCommand(0b10110011);
  sendCommand(0b00000000);
  sendCommand(0b00010000);
  sendData(0xFF);
  sendCommand(0b10110100);
  sendCommand(0b00000000);
  sendCommand(0b00010000);
  sendData(0xFF);
  sendCommand(0b10110101);
  sendCommand(0b00000000);
  sendCommand(0b00010000);
  sendData(0xFF);
  sendCommand(0b10110110);
  sendCommand(0b00000000);
  sendCommand(0b00010000);
  sendData(0xFF);
  sendCommand(0b10110111);
  sendCommand(0b00000000);
  sendCommand(0b00010000);
  sendData(0xFF);
  for (int j = 1; j < 102; j++) {
    sendCommand(0b00001111 & j);
    sendCommand((0b00001111 & (j >> 4)) | (1 << 4));
    sendData(0b10000000);
  }
}


x86 assembly (clang, -O0):
<draw_Graph>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xb0,%edi
call   1030 <sendCommand@plt>
xor    %edi,%edi
call   1030 <sendCommand@plt>
mov    $0x10,%edi
call   1030 <sendCommand@plt>
mov    $0xff,%edi
call   1040 <sendData@plt>
mov    $0xb1,%edi
call   1030 <sendCommand@plt>
xor    %edi,%edi
call   1030 <sendCommand@plt>
mov    $0x10,%edi
call   1030 <sendCommand@plt>
mov    $0xff,%edi
call   1040 <sendData@plt>
mov    $0xb2,%edi
call   1030 <sendCommand@plt>
xor    %edi,%edi
call   1030 <sendCommand@plt>
mov    $0x10,%edi
call   1030 <sendCommand@plt>
mov    $0xff,%edi
call   1040 <sendData@plt>
mov    $0xb3,%edi
call   1030 <sendCommand@plt>
xor    %edi,%edi
call   1030 <sendCommand@plt>
mov    $0x10,%edi
call   1030 <sendCommand@plt>
mov    $0xff,%edi
call   1040 <sendData@plt>
mov    $0xb4,%edi
call   1030 <sendCommand@plt>
xor    %edi,%edi
call   1030 <sendCommand@plt>
mov    $0x10,%edi
call   1030 <sendCommand@plt>
mov    $0xff,%edi
call   1040 <sendData@plt>
mov    $0xb5,%edi
call   1030 <sendCommand@plt>
xor    %edi,%edi
call   1030 <sendCommand@plt>
mov    $0x10,%edi
call   1030 <sendCommand@plt>
mov    $0xff,%edi
call   1040 <sendData@plt>
mov    $0xb6,%edi
call   1030 <sendCommand@plt>
xor    %edi,%edi
call   1030 <sendCommand@plt>
mov    $0x10,%edi
call   1030 <sendCommand@plt>
mov    $0xff,%edi
call   1040 <sendData@plt>
mov    $0xb7,%edi
call   1030 <sendCommand@plt>
xor    %edi,%edi
call   1030 <sendCommand@plt>
mov    $0x10,%edi
call   1030 <sendCommand@plt>
mov    $0xff,%edi
call   1040 <sendData@plt>
movl   $0x1,-0x4(%rbp)
cmpl   $0x66,-0x4(%rbp)
jge    1295 <draw_Graph+0x175>
mov    -0x4(%rbp),%edi
and    $0xf,%edi
call   1030 <sendCommand@plt>
mov    -0x4(%rbp),%edi
sar    $0x4,%edi
and    $0xf,%edi
or     $0x10,%edi
call   1030 <sendCommand@plt>
mov    $0x80,%edi
call   1040 <sendData@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1257 <draw_Graph+0x137>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_Graph>:
push   %rbx
mov    $0xb0,%edi
call   1030 <sendCommand@plt>
xor    %edi,%edi
call   1030 <sendCommand@plt>
mov    $0x10,%edi
call   1030 <sendCommand@plt>
mov    $0xff,%edi
call   1040 <sendData@plt>
mov    $0xb1,%edi
call   1030 <sendCommand@plt>
xor    %edi,%edi
call   1030 <sendCommand@plt>
mov    $0x10,%edi
call   1030 <sendCommand@plt>
mov    $0xff,%edi
call   1040 <sendData@plt>
mov    $0xb2,%edi
call   1030 <sendCommand@plt>
xor    %edi,%edi
call   1030 <sendCommand@plt>
mov    $0x10,%edi
call   1030 <sendCommand@plt>
mov    $0xff,%edi
call   1040 <sendData@plt>
mov    $0xb3,%edi
call   1030 <sendCommand@plt>
xor    %edi,%edi
call   1030 <sendCommand@plt>
mov    $0x10,%edi
call   1030 <sendCommand@plt>
mov    $0xff,%edi
call   1040 <sendData@plt>
mov    $0xb4,%edi
call   1030 <sendCommand@plt>
xor    %edi,%edi
call   1030 <sendCommand@plt>
mov    $0x10,%edi
call   1030 <sendCommand@plt>
mov    $0xff,%edi
call   1040 <sendData@plt>
mov    $0xb5,%edi
call   1030 <sendCommand@plt>
xor    %edi,%edi
call   1030 <sendCommand@plt>
mov    $0x10,%edi
call   1030 <sendCommand@plt>
mov    $0xff,%edi
call   1040 <sendData@plt>
mov    $0xb6,%edi
call   1030 <sendCommand@plt>
xor    %edi,%edi
call   1030 <sendCommand@plt>
mov    $0x10,%edi
call   1030 <sendCommand@plt>
mov    $0xff,%edi
call   1040 <sendData@plt>
mov    $0xb7,%edi
call   1030 <sendCommand@plt>
xor    %edi,%edi
call   1030 <sendCommand@plt>
mov    $0x10,%edi
call   1030 <sendCommand@plt>
mov    $0xff,%edi
call   1040 <sendData@plt>
mov    $0x1,%ebx
xchg   %ax,%ax
mov    %ebx,%edi
and    $0xf,%edi
call   1030 <sendCommand@plt>
mov    %ebx,%edi
shr    $0x4,%edi
or     $0x10,%edi
call   1030 <sendCommand@plt>
mov    $0x80,%edi
call   1040 <sendData@plt>
add    $0x1,%ebx
cmp    $0x66,%ebx
jne    1250 <draw_Graph+0x130>
pop    %rbx
ret

LLVM IR (-O0):
define void @draw_Graph() {
%1 = alloca i32
%2 = call i32 @sendCommand(i32 176)
%3 = call i32 @sendCommand(i32 0)
%4 = call i32 @sendCommand(i32 16)
%5 = call i32 @sendData(i32 255)
%6 = call i32 @sendCommand(i32 177)
%7 = call i32 @sendCommand(i32 0)
%8 = call i32 @sendCommand(i32 16)
%9 = call i32 @sendData(i32 255)
%10 = call i32 @sendCommand(i32 178)
%11 = call i32 @sendCommand(i32 0)
%12 = call i32 @sendCommand(i32 16)
%13 = call i32 @sendData(i32 255)
%14 = call i32 @sendCommand(i32 179)
%15 = call i32 @sendCommand(i32 0)
%16 = call i32 @sendCommand(i32 16)
%17 = call i32 @sendData(i32 255)
%18 = call i32 @sendCommand(i32 180)
%19 = call i32 @sendCommand(i32 0)
%20 = call i32 @sendCommand(i32 16)
%21 = call i32 @sendData(i32 255)
%22 = call i32 @sendCommand(i32 181)
%23 = call i32 @sendCommand(i32 0)
%24 = call i32 @sendCommand(i32 16)
%25 = call i32 @sendData(i32 255)
%26 = call i32 @sendCommand(i32 182)
%27 = call i32 @sendCommand(i32 0)
%28 = call i32 @sendCommand(i32 16)
%29 = call i32 @sendData(i32 255)
%30 = call i32 @sendCommand(i32 183)
%31 = call i32 @sendCommand(i32 0)
%32 = call i32 @sendCommand(i32 16)
%33 = call i32 @sendData(i32 255)
store i32 1, i32* %1
br label %34
34: ; preds = %47, %0
%35 = load i32, i32* %1
%36 = icmp slt i32 %35, 102
br i1 %36, label %37, label %50
37: ; preds = %34
%38 = load i32, i32* %1
%39 = and i32 15, %38
%40 = call i32 @sendCommand(i32 %39)
%41 = load i32, i32* %1
%42 = ashr i32 %41, 4
%43 = and i32 15, %42
%44 = or i32 %43, 16
%45 = call i32 @sendCommand(i32 %44)
%46 = call i32 @sendData(i32 128)
br label %47
47: ; preds = %37
%48 = load i32, i32* %1
%49 = add nsw i32 %48, 1
store i32 %49, i32* %1
br label %34
50: ; preds = %34
ret void
}

LLVM IR (-O2):
define void @draw_Graph() {
%1 = tail call i32 @sendCommand(i32 176)
%2 = tail call i32 @sendCommand(i32 0)
%3 = tail call i32 @sendCommand(i32 16)
%4 = tail call i32 @sendData(i32 255)
%5 = tail call i32 @sendCommand(i32 177)
%6 = tail call i32 @sendCommand(i32 0)
%7 = tail call i32 @sendCommand(i32 16)
%8 = tail call i32 @sendData(i32 255)
%9 = tail call i32 @sendCommand(i32 178)
%10 = tail call i32 @sendCommand(i32 0)
%11 = tail call i32 @sendCommand(i32 16)
%12 = tail call i32 @sendData(i32 255)
%13 = tail call i32 @sendCommand(i32 179)
%14 = tail call i32 @sendCommand(i32 0)
%15 = tail call i32 @sendCommand(i32 16)
%16 = tail call i32 @sendData(i32 255)
%17 = tail call i32 @sendCommand(i32 180)
%18 = tail call i32 @sendCommand(i32 0)
%19 = tail call i32 @sendCommand(i32 16)
%20 = tail call i32 @sendData(i32 255)
%21 = tail call i32 @sendCommand(i32 181)
%22 = tail call i32 @sendCommand(i32 0)
%23 = tail call i32 @sendCommand(i32 16)
%24 = tail call i32 @sendData(i32 255)
%25 = tail call i32 @sendCommand(i32 182)
%26 = tail call i32 @sendCommand(i32 0)
%27 = tail call i32 @sendCommand(i32 16)
%28 = tail call i32 @sendData(i32 255)
%29 = tail call i32 @sendCommand(i32 183)
%30 = tail call i32 @sendCommand(i32 0)
%31 = tail call i32 @sendCommand(i32 16)
%32 = tail call i32 @sendData(i32 255)
br label %34
33: ; preds = %34
ret void
34: ; preds = %0, %34
%35 = phi i32 [ 1, %0 ], [ %42, %34 ]
%36 = and i32 %35, 15
%37 = tail call i32 @sendCommand(i32 %36)
%38 = lshr i32 %35, 4
%39 = or i32 %38, 16
%40 = tail call i32 @sendCommand(i32 %39)
%41 = tail call i32 @sendData(i32 128)
%42 = add nuw nsw i32 %35, 1
%43 = icmp eq i32 %42, 102
br i1 %43, label %33, label %34
}