#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*/ LCD_WriteCommand(int);
int /*<<< orphan*/ LCD_WriteData(unsigned char const);
void Tetris_PieceGen() {
  const unsigned char GP_T[8] = {0x00, 0x0C, 0x0C, 0x0F,
                                 0x0F, 0x0C, 0x0C, 0x00};
  const unsigned char GP_O[8] = {0x00, 0x00, 0x0F, 0x0F,
                                 0x0F, 0x0F, 0x00, 0x00};
  const unsigned char GP_I[8] = {0x06, 0x06, 0x06, 0x06,
                                 0x06, 0x06, 0x06, 0x06};
  const unsigned char GP_J[8] = {0x00, 0x06, 0x06, 0x06,
                                 0x06, 0x1E, 0x1E, 0x00};
  const unsigned char GP_L[8] = {0x00, 0x0C, 0x0C, 0x0C,
                                 0x0C, 0x0F, 0x0F, 0x00};
  const unsigned char GP_S[8] = {0x00, 0x0C, 0x0C, 0x0F,
                                 0x0F, 0x03, 0x03, 0x00};
  const unsigned char GP_Z[8] = {0x00, 0x03, 0x03, 0x0F,
                                 0x0F, 0x0C, 0x0C, 0x00};
  unsigned char i;
  LCD_WriteCommand(0x40);
  for (i = 0; i < 8; ++i) {
    LCD_WriteData(GP_T[i]);
  }
  for (i = 0; i < 8; ++i) {
    LCD_WriteData(GP_O[i]);
  }
  for (i = 0; i < 8; ++i) {
    LCD_WriteData(GP_I[i]);
  }
  for (i = 0; i < 8; ++i) {
    LCD_WriteData(GP_J[i]);
  }
  for (i = 0; i < 8; ++i) {
    LCD_WriteData(GP_L[i]);
  }
  for (i = 0; i < 8; ++i) {
    LCD_WriteData(GP_S[i]);
  }
  for (i = 0; i < 8; ++i) {
    LCD_WriteData(GP_Z[i]);
  }
  LCD_WriteCommand(0x80);
}


x86 assembly (clang, -O0):
<Tetris_PieceGen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xecb(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec8(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec5(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xec2(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xebf(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    $0x40,%edi
call   1030 <LCD_WriteCommand@plt>
movb   $0x0,-0x39(%rbp)
movzbl -0x39(%rbp),%eax
cmp    $0x8,%eax
jge    11ab <Tetris_PieceGen+0x8b>
movzbl -0x39(%rbp),%eax
movzbl -0x8(%rbp,%rax,1),%edi
call   1040 <LCD_WriteData@plt>
mov    -0x39(%rbp),%al
add    $0x1,%al
mov    %al,-0x39(%rbp)
jmp    1183 <Tetris_PieceGen+0x63>
movb   $0x0,-0x39(%rbp)
movzbl -0x39(%rbp),%eax
cmp    $0x8,%eax
jge    11d7 <Tetris_PieceGen+0xb7>
movzbl -0x39(%rbp),%eax
movzbl -0x10(%rbp,%rax,1),%edi
call   1040 <LCD_WriteData@plt>
mov    -0x39(%rbp),%al
add    $0x1,%al
mov    %al,-0x39(%rbp)
jmp    11af <Tetris_PieceGen+0x8f>
movb   $0x0,-0x39(%rbp)
movzbl -0x39(%rbp),%eax
cmp    $0x8,%eax
jge    1203 <Tetris_PieceGen+0xe3>
movzbl -0x39(%rbp),%eax
movzbl -0x18(%rbp,%rax,1),%edi
call   1040 <LCD_WriteData@plt>
mov    -0x39(%rbp),%al
add    $0x1,%al
mov    %al,-0x39(%rbp)
jmp    11db <Tetris_PieceGen+0xbb>
movb   $0x0,-0x39(%rbp)
movzbl -0x39(%rbp),%eax
cmp    $0x8,%eax
jge    122f <Tetris_PieceGen+0x10f>
movzbl -0x39(%rbp),%eax
movzbl -0x20(%rbp,%rax,1),%edi
call   1040 <LCD_WriteData@plt>
mov    -0x39(%rbp),%al
add    $0x1,%al
mov    %al,-0x39(%rbp)
jmp    1207 <Tetris_PieceGen+0xe7>
movb   $0x0,-0x39(%rbp)
movzbl -0x39(%rbp),%eax
cmp    $0x8,%eax
jge    125b <Tetris_PieceGen+0x13b>
movzbl -0x39(%rbp),%eax
movzbl -0x28(%rbp,%rax,1),%edi
call   1040 <LCD_WriteData@plt>
mov    -0x39(%rbp),%al
add    $0x1,%al
mov    %al,-0x39(%rbp)
jmp    1233 <Tetris_PieceGen+0x113>
movb   $0x0,-0x39(%rbp)
movzbl -0x39(%rbp),%eax
cmp    $0x8,%eax
jge    1287 <Tetris_PieceGen+0x167>
movzbl -0x39(%rbp),%eax
movzbl -0x30(%rbp,%rax,1),%edi
call   1040 <LCD_WriteData@plt>
mov    -0x39(%rbp),%al
add    $0x1,%al
mov    %al,-0x39(%rbp)
jmp    125f <Tetris_PieceGen+0x13f>
movb   $0x0,-0x39(%rbp)
movzbl -0x39(%rbp),%eax
cmp    $0x8,%eax
jge    12b3 <Tetris_PieceGen+0x193>
movzbl -0x39(%rbp),%eax
movzbl -0x38(%rbp,%rax,1),%edi
call   1040 <LCD_WriteData@plt>
mov    -0x39(%rbp),%al
add    $0x1,%al
mov    %al,-0x39(%rbp)
jmp    128b <Tetris_PieceGen+0x16b>
mov    $0x80,%edi
call   1030 <LCD_WriteCommand@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Tetris_PieceGen>:
push   %rax
mov    $0x40,%edi
call   1030 <LCD_WriteCommand@plt>
xor    %edi,%edi
call   1040 <LCD_WriteData@plt>
mov    $0xc,%edi
call   1040 <LCD_WriteData@plt>
mov    $0xc,%edi
call   1040 <LCD_WriteData@plt>
mov    $0xf,%edi
call   1040 <LCD_WriteData@plt>
mov    $0xf,%edi
call   1040 <LCD_WriteData@plt>
mov    $0xc,%edi
call   1040 <LCD_WriteData@plt>
mov    $0xc,%edi
call   1040 <LCD_WriteData@plt>
xor    %edi,%edi
call   1040 <LCD_WriteData@plt>
xor    %edi,%edi
call   1040 <LCD_WriteData@plt>
xor    %edi,%edi
call   1040 <LCD_WriteData@plt>
mov    $0xf,%edi
call   1040 <LCD_WriteData@plt>
mov    $0xf,%edi
call   1040 <LCD_WriteData@plt>
mov    $0xf,%edi
call   1040 <LCD_WriteData@plt>
mov    $0xf,%edi
call   1040 <LCD_WriteData@plt>
xor    %edi,%edi
call   1040 <LCD_WriteData@plt>
xor    %edi,%edi
call   1040 <LCD_WriteData@plt>
mov    $0x6,%edi
call   1040 <LCD_WriteData@plt>
mov    $0x6,%edi
call   1040 <LCD_WriteData@plt>
mov    $0x6,%edi
call   1040 <LCD_WriteData@plt>
mov    $0x6,%edi
call   1040 <LCD_WriteData@plt>
mov    $0x6,%edi
call   1040 <LCD_WriteData@plt>
mov    $0x6,%edi
call   1040 <LCD_WriteData@plt>
mov    $0x6,%edi
call   1040 <LCD_WriteData@plt>
mov    $0x6,%edi
call   1040 <LCD_WriteData@plt>
xor    %edi,%edi
call   1040 <LCD_WriteData@plt>
mov    $0x6,%edi
call   1040 <LCD_WriteData@plt>
mov    $0x6,%edi
call   1040 <LCD_WriteData@plt>
mov    $0x6,%edi
call   1040 <LCD_WriteData@plt>
mov    $0x6,%edi
call   1040 <LCD_WriteData@plt>
mov    $0x1e,%edi
call   1040 <LCD_WriteData@plt>
mov    $0x1e,%edi
call   1040 <LCD_WriteData@plt>
xor    %edi,%edi
call   1040 <LCD_WriteData@plt>
xor    %edi,%edi
call   1040 <LCD_WriteData@plt>
mov    $0xc,%edi
call   1040 <LCD_WriteData@plt>
mov    $0xc,%edi
call   1040 <LCD_WriteData@plt>
mov    $0xc,%edi
call   1040 <LCD_WriteData@plt>
mov    $0xc,%edi
call   1040 <LCD_WriteData@plt>
mov    $0xf,%edi
call   1040 <LCD_WriteData@plt>
mov    $0xf,%edi
call   1040 <LCD_WriteData@plt>
xor    %edi,%edi
call   1040 <LCD_WriteData@plt>
xor    %edi,%edi
call   1040 <LCD_WriteData@plt>
mov    $0xc,%edi
call   1040 <LCD_WriteData@plt>
mov    $0xc,%edi
call   1040 <LCD_WriteData@plt>
mov    $0xf,%edi
call   1040 <LCD_WriteData@plt>
mov    $0xf,%edi
call   1040 <LCD_WriteData@plt>
mov    $0x3,%edi
call   1040 <LCD_WriteData@plt>
mov    $0x3,%edi
call   1040 <LCD_WriteData@plt>
xor    %edi,%edi
call   1040 <LCD_WriteData@plt>
xor    %edi,%edi
call   1040 <LCD_WriteData@plt>
mov    $0x3,%edi
call   1040 <LCD_WriteData@plt>
mov    $0x3,%edi
call   1040 <LCD_WriteData@plt>
mov    $0xf,%edi
call   1040 <LCD_WriteData@plt>
mov    $0xf,%edi
call   1040 <LCD_WriteData@plt>
mov    $0xc,%edi
call   1040 <LCD_WriteData@plt>
mov    $0xc,%edi
call   1040 <LCD_WriteData@plt>
xor    %edi,%edi
call   1040 <LCD_WriteData@plt>
mov    $0x80,%edi
pop    %rax
jmp    1030 <LCD_WriteCommand@plt>

LLVM IR (-O0):
@__const.Tetris_PieceGen.GP_T = [8 x i8] c"\00\0C\0C\0F\0F\0C\0C\00"
@__const.Tetris_PieceGen.GP_O = [8 x i8] c"\00\00\0F\0F\0F\0F\00\00"
@__const.Tetris_PieceGen.GP_I = [8 x i8] c"\06\06\06\06\06\06\06\06"
@__const.Tetris_PieceGen.GP_J = [8 x i8] c"\00\06\06\06\06\1E\1E\00"
@__const.Tetris_PieceGen.GP_L = [8 x i8] c"\00\0C\0C\0C\0C\0F\0F\00"
@__const.Tetris_PieceGen.GP_S = [8 x i8] c"\00\0C\0C\0F\0F\03\03\00"
@__const.Tetris_PieceGen.GP_Z = [8 x i8] c"\00\03\03\0F\0F\0C\0C\00"
define void @Tetris_PieceGen() {
%1 = alloca [8 x i8]
%2 = alloca [8 x i8]
%3 = alloca [8 x i8]
%4 = alloca [8 x i8]
%5 = alloca [8 x i8]
%6 = alloca [8 x i8]
%7 = alloca [8 x i8]
%8 = alloca i8
%9 = bitcast [8 x i8]* %1 to i8*
%10 = bitcast [8 x i8]* %2 to i8*
%11 = bitcast [8 x i8]* %3 to i8*
%12 = bitcast [8 x i8]* %4 to i8*
%13 = bitcast [8 x i8]* %5 to i8*
%14 = bitcast [8 x i8]* %6 to i8*
%15 = bitcast [8 x i8]* %7 to i8*
%16 = call i32 @LCD_WriteCommand(i32 64)
store i8 0, i8* %8
br label %17
17: ; preds = %27, %0
%18 = load i8, i8* %8
%19 = zext i8 %18 to i32
%20 = icmp slt i32 %19, 8
br i1 %20, label %21, label %30
21: ; preds = %17
%22 = load i8, i8* %8
%23 = zext i8 %22 to i64
%24 = getelementptr inbounds [8 x i8], [8 x i8]* %1, i64 0, i64 %23
%25 = load i8, i8* %24
%26 = call i32 @LCD_WriteData(i8 zeroext %25)
br label %27
27: ; preds = %21
%28 = load i8, i8* %8
%29 = add i8 %28, 1
store i8 %29, i8* %8
br label %17
30: ; preds = %17
store i8 0, i8* %8
br label %31
31: ; preds = %41, %30
%32 = load i8, i8* %8
%33 = zext i8 %32 to i32
%34 = icmp slt i32 %33, 8
br i1 %34, label %35, label %44
35: ; preds = %31
%36 = load i8, i8* %8
%37 = zext i8 %36 to i64
%38 = getelementptr inbounds [8 x i8], [8 x i8]* %2, i64 0, i64 %37
%39 = load i8, i8* %38
%40 = call i32 @LCD_WriteData(i8 zeroext %39)
br label %41
41: ; preds = %35
%42 = load i8, i8* %8
%43 = add i8 %42, 1
store i8 %43, i8* %8
br label %31
44: ; preds = %31
store i8 0, i8* %8
br label %45
45: ; preds = %55, %44
%46 = load i8, i8* %8
%47 = zext i8 %46 to i32
%48 = icmp slt i32 %47, 8
br i1 %48, label %49, label %58
49: ; preds = %45
%50 = load i8, i8* %8
%51 = zext i8 %50 to i64
%52 = getelementptr inbounds [8 x i8], [8 x i8]* %3, i64 0, i64 %51
%53 = load i8, i8* %52
%54 = call i32 @LCD_WriteData(i8 zeroext %53)
br label %55
55: ; preds = %49
%56 = load i8, i8* %8
%57 = add i8 %56, 1
store i8 %57, i8* %8
br label %45
58: ; preds = %45
store i8 0, i8* %8
br label %59
59: ; preds = %69, %58
%60 = load i8, i8* %8
%61 = zext i8 %60 to i32
%62 = icmp slt i32 %61, 8
br i1 %62, label %63, label %72
63: ; preds = %59
%64 = load i8, i8* %8
%65 = zext i8 %64 to i64
%66 = getelementptr inbounds [8 x i8], [8 x i8]* %4, i64 0, i64 %65
%67 = load i8, i8* %66
%68 = call i32 @LCD_WriteData(i8 zeroext %67)
br label %69
69: ; preds = %63
%70 = load i8, i8* %8
%71 = add i8 %70, 1
store i8 %71, i8* %8
br label %59
72: ; preds = %59
store i8 0, i8* %8
br label %73
73: ; preds = %83, %72
%74 = load i8, i8* %8
%75 = zext i8 %74 to i32
%76 = icmp slt i32 %75, 8
br i1 %76, label %77, label %86
77: ; preds = %73
%78 = load i8, i8* %8
%79 = zext i8 %78 to i64
%80 = getelementptr inbounds [8 x i8], [8 x i8]* %5, i64 0, i64 %79
%81 = load i8, i8* %80
%82 = call i32 @LCD_WriteData(i8 zeroext %81)
br label %83
83: ; preds = %77
%84 = load i8, i8* %8
%85 = add i8 %84, 1
store i8 %85, i8* %8
br label %73
86: ; preds = %73
store i8 0, i8* %8
br label %87
87: ; preds = %97, %86
%88 = load i8, i8* %8
%89 = zext i8 %88 to i32
%90 = icmp slt i32 %89, 8
br i1 %90, label %91, label %100
91: ; preds = %87
%92 = load i8, i8* %8
%93 = zext i8 %92 to i64
%94 = getelementptr inbounds [8 x i8], [8 x i8]* %6, i64 0, i64 %93
%95 = load i8, i8* %94
%96 = call i32 @LCD_WriteData(i8 zeroext %95)
br label %97
97: ; preds = %91
%98 = load i8, i8* %8
%99 = add i8 %98, 1
store i8 %99, i8* %8
br label %87
100: ; preds = %87
store i8 0, i8* %8
br label %101
101: ; preds = %111, %100
%102 = load i8, i8* %8
%103 = zext i8 %102 to i32
%104 = icmp slt i32 %103, 8
br i1 %104, label %105, label %114
105: ; preds = %101
%106 = load i8, i8* %8
%107 = zext i8 %106 to i64
%108 = getelementptr inbounds [8 x i8], [8 x i8]* %7, i64 0, i64 %107
%109 = load i8, i8* %108
%110 = call i32 @LCD_WriteData(i8 zeroext %109)
br label %111
111: ; preds = %105
%112 = load i8, i8* %8
%113 = add i8 %112, 1
store i8 %113, i8* %8
br label %101
114: ; preds = %101
%115 = call i32 @LCD_WriteCommand(i32 128)
ret void
}

LLVM IR (-O2):
define void @Tetris_PieceGen() {
%1 = tail call i32 @LCD_WriteCommand(i32 64)
%2 = tail call i32 @LCD_WriteData(i8 zeroext 0)
%3 = tail call i32 @LCD_WriteData(i8 zeroext 12)
%4 = tail call i32 @LCD_WriteData(i8 zeroext 12)
%5 = tail call i32 @LCD_WriteData(i8 zeroext 15)
%6 = tail call i32 @LCD_WriteData(i8 zeroext 15)
%7 = tail call i32 @LCD_WriteData(i8 zeroext 12)
%8 = tail call i32 @LCD_WriteData(i8 zeroext 12)
%9 = tail call i32 @LCD_WriteData(i8 zeroext 0)
%10 = tail call i32 @LCD_WriteData(i8 zeroext 0)
%11 = tail call i32 @LCD_WriteData(i8 zeroext 0)
%12 = tail call i32 @LCD_WriteData(i8 zeroext 15)
%13 = tail call i32 @LCD_WriteData(i8 zeroext 15)
%14 = tail call i32 @LCD_WriteData(i8 zeroext 15)
%15 = tail call i32 @LCD_WriteData(i8 zeroext 15)
%16 = tail call i32 @LCD_WriteData(i8 zeroext 0)
%17 = tail call i32 @LCD_WriteData(i8 zeroext 0)
%18 = tail call i32 @LCD_WriteData(i8 zeroext 6)
%19 = tail call i32 @LCD_WriteData(i8 zeroext 6)
%20 = tail call i32 @LCD_WriteData(i8 zeroext 6)
%21 = tail call i32 @LCD_WriteData(i8 zeroext 6)
%22 = tail call i32 @LCD_WriteData(i8 zeroext 6)
%23 = tail call i32 @LCD_WriteData(i8 zeroext 6)
%24 = tail call i32 @LCD_WriteData(i8 zeroext 6)
%25 = tail call i32 @LCD_WriteData(i8 zeroext 6)
%26 = tail call i32 @LCD_WriteData(i8 zeroext 0)
%27 = tail call i32 @LCD_WriteData(i8 zeroext 6)
%28 = tail call i32 @LCD_WriteData(i8 zeroext 6)
%29 = tail call i32 @LCD_WriteData(i8 zeroext 6)
%30 = tail call i32 @LCD_WriteData(i8 zeroext 6)
%31 = tail call i32 @LCD_WriteData(i8 zeroext 30)
%32 = tail call i32 @LCD_WriteData(i8 zeroext 30)
%33 = tail call i32 @LCD_WriteData(i8 zeroext 0)
%34 = tail call i32 @LCD_WriteData(i8 zeroext 0)
%35 = tail call i32 @LCD_WriteData(i8 zeroext 12)
%36 = tail call i32 @LCD_WriteData(i8 zeroext 12)
%37 = tail call i32 @LCD_WriteData(i8 zeroext 12)
%38 = tail call i32 @LCD_WriteData(i8 zeroext 12)
%39 = tail call i32 @LCD_WriteData(i8 zeroext 15)
%40 = tail call i32 @LCD_WriteData(i8 zeroext 15)
%41 = tail call i32 @LCD_WriteData(i8 zeroext 0)
%42 = tail call i32 @LCD_WriteData(i8 zeroext 0)
%43 = tail call i32 @LCD_WriteData(i8 zeroext 12)
%44 = tail call i32 @LCD_WriteData(i8 zeroext 12)
%45 = tail call i32 @LCD_WriteData(i8 zeroext 15)
%46 = tail call i32 @LCD_WriteData(i8 zeroext 15)
%47 = tail call i32 @LCD_WriteData(i8 zeroext 3)
%48 = tail call i32 @LCD_WriteData(i8 zeroext 3)
%49 = tail call i32 @LCD_WriteData(i8 zeroext 0)
%50 = tail call i32 @LCD_WriteData(i8 zeroext 0)
%51 = tail call i32 @LCD_WriteData(i8 zeroext 3)
%52 = tail call i32 @LCD_WriteData(i8 zeroext 3)
%53 = tail call i32 @LCD_WriteData(i8 zeroext 15)
%54 = tail call i32 @LCD_WriteData(i8 zeroext 15)
%55 = tail call i32 @LCD_WriteData(i8 zeroext 12)
%56 = tail call i32 @LCD_WriteData(i8 zeroext 12)
%57 = tail call i32 @LCD_WriteData(i8 zeroext 0)
%58 = tail call i32 @LCD_WriteCommand(i32 128)
ret void
}