#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*/ clear_piece(char **);
int /*<<< orphan*/ rotate_piece(char **);
void set_piece(char piece[7][7], int shape, int rotation) {
  clear_piece(piece);
  switch (shape) {
  case 0:
    if (rotation % 2 == 0) {
      piece[3][1] = 1;
      piece[3][2] = 1;
      piece[3][3] = 1;
      piece[3][4] = 1;
    } else {
      piece[1][3] = 1;
      piece[2][3] = 1;
      piece[3][3] = 1;
      piece[4][3] = 1;
    }
    break;
  case 1:
    piece[3][2] = 1;
    piece[3][3] = 1;
    piece[3][4] = 1;
    piece[4][4] = 1;
    for (int i = 0; i < rotation; i++) {
      rotate_piece(piece);
    }
    break;
  case 2:
    piece[3][2] = 1;
    piece[3][3] = 1;
    piece[3][4] = 1;
    piece[4][2] = 1;
    for (int i = 0; i < rotation; i++) {
      rotate_piece(piece);
    }
    break;
  case 3:
    piece[3][2] = 1;
    piece[3][3] = 1;
    piece[4][2] = 1;
    piece[4][3] = 1;
    break;
  case 4:
    if (rotation % 2 == 0) {
      piece[3][2] = 1;
      piece[3][3] = 1;
      piece[4][3] = 1;
      piece[4][4] = 1;
    } else {
      piece[2][3] = 1;
      piece[3][2] = 1;
      piece[3][3] = 1;
      piece[4][2] = 1;
    }
    break;
  case 5:
    piece[3][2] = 1;
    piece[3][3] = 1;
    piece[3][4] = 1;
    piece[4][3] = 1;
    for (int i = 0; i < rotation; i++) {
      rotate_piece(piece);
    }
    break;
  case 6:
    if (rotation % 2 == 0) {
      piece[3][3] = 1;
      piece[3][4] = 1;
      piece[4][2] = 1;
      piece[4][3] = 1;
    } else {
      piece[2][3] = 1;
      piece[3][3] = 1;
      piece[3][4] = 1;
      piece[4][4] = 1;
    }
    break;
  }
}


x86 assembly (clang, -O0):
<set_piece>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <clear_piece@plt>
mov    -0xc(%rbp),%eax
mov    %rax,-0x28(%rbp)
sub    $0x6,%rax
ja     138c <set_piece+0x26c>
mov    -0x28(%rbp),%rax
lea    0xea9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1199 <set_piece+0x79>
mov    -0x8(%rbp),%rax
movb   $0x1,0x16(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x17(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x18(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x19(%rax)
jmp    11b9 <set_piece+0x99>
mov    -0x8(%rbp),%rax
movb   $0x1,0xa(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x11(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x18(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x1f(%rax)
jmp    138c <set_piece+0x26c>
mov    -0x8(%rbp),%rax
movb   $0x1,0x17(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x18(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x19(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x20(%rax)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1208 <set_piece+0xe8>
mov    -0x8(%rbp),%rdi
call   1030 <rotate_piece@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11e5 <set_piece+0xc5>
jmp    138c <set_piece+0x26c>
mov    -0x8(%rbp),%rax
movb   $0x1,0x17(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x18(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x19(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x1e(%rax)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1257 <set_piece+0x137>
mov    -0x8(%rbp),%rdi
call   1030 <rotate_piece@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1234 <set_piece+0x114>
jmp    138c <set_piece+0x26c>
mov    -0x8(%rbp),%rax
movb   $0x1,0x17(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x18(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x1e(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x1f(%rax)
jmp    138c <set_piece+0x26c>
mov    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    12ba <set_piece+0x19a>
mov    -0x8(%rbp),%rax
movb   $0x1,0x17(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x18(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x1f(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x20(%rax)
jmp    12da <set_piece+0x1ba>
mov    -0x8(%rbp),%rax
movb   $0x1,0x11(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x17(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x18(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x1e(%rax)
jmp    138c <set_piece+0x26c>
mov    -0x8(%rbp),%rax
movb   $0x1,0x17(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x18(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x19(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x1f(%rax)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1329 <set_piece+0x209>
mov    -0x8(%rbp),%rdi
call   1030 <rotate_piece@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1306 <set_piece+0x1e6>
jmp    138c <set_piece+0x26c>
mov    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1367 <set_piece+0x247>
mov    -0x8(%rbp),%rax
movb   $0x1,0x18(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x19(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x1e(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x1f(%rax)
jmp    1387 <set_piece+0x267>
mov    -0x8(%rbp),%rax
movb   $0x1,0x11(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x18(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x19(%rax)
mov    -0x8(%rbp),%rax
movb   $0x1,0x20(%rax)
jmp    138c <set_piece+0x26c>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_piece>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebp
mov    %esi,%r14d
mov    %rdi,%rbx
call   1040 <clear_piece@plt>
cmp    $0x6,%r14d
ja     1253 <set_piece+0x133>
mov    %r14d,%eax
lea    0xebb(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
test   $0x1,%bpl
jne    1223 <set_piece+0x103>
movl   $0x1010101,0x16(%rbx)
jmp    1253 <set_piece+0x133>
movw   $0x101,0x17(%rbx)
movb   $0x1,0x19(%rbx)
movb   $0x1,0x20(%rbx)
test   %ebp,%ebp
jle    1253 <set_piece+0x133>
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <rotate_piece@plt>
add    $0xffffffff,%ebp
jne    1180 <set_piece+0x60>
jmp    1253 <set_piece+0x133>
movw   $0x101,0x17(%rbx)
movb   $0x1,0x19(%rbx)
movb   $0x1,0x1e(%rbx)
test   %ebp,%ebp
jle    1253 <set_piece+0x133>
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <rotate_piece@plt>
add    $0xffffffff,%ebp
jne    11b0 <set_piece+0x90>
jmp    1253 <set_piece+0x133>
movw   $0x101,0x17(%rbx)
movw   $0x101,0x1e(%rbx)
jmp    1253 <set_piece+0x133>
test   $0x1,%bpl
jne    1235 <set_piece+0x115>
movw   $0x101,0x17(%rbx)
movw   $0x101,0x1f(%rbx)
jmp    1253 <set_piece+0x133>
movw   $0x101,0x17(%rbx)
movb   $0x1,0x19(%rbx)
movb   $0x1,0x1f(%rbx)
test   %ebp,%ebp
jle    1253 <set_piece+0x133>
nopl   0x0(%rax)
mov    %rbx,%rdi
call   1030 <rotate_piece@plt>
add    $0xffffffff,%ebp
jne    1200 <set_piece+0xe0>
jmp    1253 <set_piece+0x133>
test   $0x1,%bpl
jne    1245 <set_piece+0x125>
movw   $0x101,0x18(%rbx)
movw   $0x101,0x1e(%rbx)
jmp    1253 <set_piece+0x133>
movb   $0x1,0xa(%rbx)
movb   $0x1,0x11(%rbx)
movb   $0x1,0x18(%rbx)
movb   $0x1,0x1f(%rbx)
jmp    1253 <set_piece+0x133>
movb   $0x1,0x11(%rbx)
movw   $0x101,0x17(%rbx)
movb   $0x1,0x1e(%rbx)
jmp    1253 <set_piece+0x133>
movb   $0x1,0x11(%rbx)
movw   $0x101,0x18(%rbx)
movb   $0x1,0x20(%rbx)
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @set_piece([7 x i8]* %0, i32 %1, i32 %2) {
%4 = alloca [7 x i8]*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store [7 x i8]* %0, [7 x i8]** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%10 = load [7 x i8]*, [7 x i8]** %4
%11 = bitcast [7 x i8]* %10 to i8**
%12 = call i32 @clear_piece(i8** %11)
%13 = load i32, i32* %5
switch i32 %13, label %195 [
i32 0, label %14
i32 1, label %45
i32 2, label %70
i32 3, label %95
i32 4, label %108
i32 5, label %139
i32 6, label %164
]
14: ; preds = %3
%15 = load i32, i32* %6
%16 = srem i32 %15, 2
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %31
18: ; preds = %14
%19 = load [7 x i8]*, [7 x i8]** %4
%20 = getelementptr inbounds [7 x i8], [7 x i8]* %19, i64 3
%21 = getelementptr inbounds [7 x i8], [7 x i8]* %20, i64 0, i64 1
store i8 1, i8* %21
%22 = load [7 x i8]*, [7 x i8]** %4
%23 = getelementptr inbounds [7 x i8], [7 x i8]* %22, i64 3
%24 = getelementptr inbounds [7 x i8], [7 x i8]* %23, i64 0, i64 2
store i8 1, i8* %24
%25 = load [7 x i8]*, [7 x i8]** %4
%26 = getelementptr inbounds [7 x i8], [7 x i8]* %25, i64 3
%27 = getelementptr inbounds [7 x i8], [7 x i8]* %26, i64 0, i64 3
store i8 1, i8* %27
%28 = load [7 x i8]*, [7 x i8]** %4
%29 = getelementptr inbounds [7 x i8], [7 x i8]* %28, i64 3
%30 = getelementptr inbounds [7 x i8], [7 x i8]* %29, i64 0, i64 4
store i8 1, i8* %30
br label %44
31: ; preds = %14
%32 = load [7 x i8]*, [7 x i8]** %4
%33 = getelementptr inbounds [7 x i8], [7 x i8]* %32, i64 1
%34 = getelementptr inbounds [7 x i8], [7 x i8]* %33, i64 0, i64 3
store i8 1, i8* %34
%35 = load [7 x i8]*, [7 x i8]** %4
%36 = getelementptr inbounds [7 x i8], [7 x i8]* %35, i64 2
%37 = getelementptr inbounds [7 x i8], [7 x i8]* %36, i64 0, i64 3
store i8 1, i8* %37
%38 = load [7 x i8]*, [7 x i8]** %4
%39 = getelementptr inbounds [7 x i8], [7 x i8]* %38, i64 3
%40 = getelementptr inbounds [7 x i8], [7 x i8]* %39, i64 0, i64 3
store i8 1, i8* %40
%41 = load [7 x i8]*, [7 x i8]** %4
%42 = getelementptr inbounds [7 x i8], [7 x i8]* %41, i64 4
%43 = getelementptr inbounds [7 x i8], [7 x i8]* %42, i64 0, i64 3
store i8 1, i8* %43
br label %44
44: ; preds = %31, %18
br label %195
45: ; preds = %3
%46 = load [7 x i8]*, [7 x i8]** %4
%47 = getelementptr inbounds [7 x i8], [7 x i8]* %46, i64 3
%48 = getelementptr inbounds [7 x i8], [7 x i8]* %47, i64 0, i64 2
store i8 1, i8* %48
%49 = load [7 x i8]*, [7 x i8]** %4
%50 = getelementptr inbounds [7 x i8], [7 x i8]* %49, i64 3
%51 = getelementptr inbounds [7 x i8], [7 x i8]* %50, i64 0, i64 3
store i8 1, i8* %51
%52 = load [7 x i8]*, [7 x i8]** %4
%53 = getelementptr inbounds [7 x i8], [7 x i8]* %52, i64 3
%54 = getelementptr inbounds [7 x i8], [7 x i8]* %53, i64 0, i64 4
store i8 1, i8* %54
%55 = load [7 x i8]*, [7 x i8]** %4
%56 = getelementptr inbounds [7 x i8], [7 x i8]* %55, i64 4
%57 = getelementptr inbounds [7 x i8], [7 x i8]* %56, i64 0, i64 4
store i8 1, i8* %57
store i32 0, i32* %7
br label %58
58: ; preds = %66, %45
%59 = load i32, i32* %7
%60 = load i32, i32* %6
%61 = icmp slt i32 %59, %60
br i1 %61, label %62, label %69
62: ; preds = %58
%63 = load [7 x i8]*, [7 x i8]** %4
%64 = bitcast [7 x i8]* %63 to i8**
%65 = call i32 @rotate_piece(i8** %64)
br label %66
66: ; preds = %62
%67 = load i32, i32* %7
%68 = add nsw i32 %67, 1
store i32 %68, i32* %7
br label %58
69: ; preds = %58
br label %195
70: ; preds = %3
%71 = load [7 x i8]*, [7 x i8]** %4
%72 = getelementptr inbounds [7 x i8], [7 x i8]* %71, i64 3
%73 = getelementptr inbounds [7 x i8], [7 x i8]* %72, i64 0, i64 2
store i8 1, i8* %73
%74 = load [7 x i8]*, [7 x i8]** %4
%75 = getelementptr inbounds [7 x i8], [7 x i8]* %74, i64 3
%76 = getelementptr inbounds [7 x i8], [7 x i8]* %75, i64 0, i64 3
store i8 1, i8* %76
%77 = load [7 x i8]*, [7 x i8]** %4
%78 = getelementptr inbounds [7 x i8], [7 x i8]* %77, i64 3
%79 = getelementptr inbounds [7 x i8], [7 x i8]* %78, i64 0, i64 4
store i8 1, i8* %79
%80 = load [7 x i8]*, [7 x i8]** %4
%81 = getelementptr inbounds [7 x i8], [7 x i8]* %80, i64 4
%82 = getelementptr inbounds [7 x i8], [7 x i8]* %81, i64 0, i64 2
store i8 1, i8* %82
store i32 0, i32* %8
br label %83
83: ; preds = %91, %70
%84 = load i32, i32* %8
%85 = load i32, i32* %6
%86 = icmp slt i32 %84, %85
br i1 %86, label %87, label %94
87: ; preds = %83
%88 = load [7 x i8]*, [7 x i8]** %4
%89 = bitcast [7 x i8]* %88 to i8**
%90 = call i32 @rotate_piece(i8** %89)
br label %91
91: ; preds = %87
%92 = load i32, i32* %8
%93 = add nsw i32 %92, 1
store i32 %93, i32* %8
br label %83
94: ; preds = %83
br label %195
95: ; preds = %3
%96 = load [7 x i8]*, [7 x i8]** %4
%97 = getelementptr inbounds [7 x i8], [7 x i8]* %96, i64 3
%98 = getelementptr inbounds [7 x i8], [7 x i8]* %97, i64 0, i64 2
store i8 1, i8* %98
%99 = load [7 x i8]*, [7 x i8]** %4
%100 = getelementptr inbounds [7 x i8], [7 x i8]* %99, i64 3
%101 = getelementptr inbounds [7 x i8], [7 x i8]* %100, i64 0, i64 3
store i8 1, i8* %101
%102 = load [7 x i8]*, [7 x i8]** %4
%103 = getelementptr inbounds [7 x i8], [7 x i8]* %102, i64 4
%104 = getelementptr inbounds [7 x i8], [7 x i8]* %103, i64 0, i64 2
store i8 1, i8* %104
%105 = load [7 x i8]*, [7 x i8]** %4
%106 = getelementptr inbounds [7 x i8], [7 x i8]* %105, i64 4
%107 = getelementptr inbounds [7 x i8], [7 x i8]* %106, i64 0, i64 3
store i8 1, i8* %107
br label %195
108: ; preds = %3
%109 = load i32, i32* %6
%110 = srem i32 %109, 2
%111 = icmp eq i32 %110, 0
br i1 %111, label %112, label %125
112: ; preds = %108
%113 = load [7 x i8]*, [7 x i8]** %4
%114 = getelementptr inbounds [7 x i8], [7 x i8]* %113, i64 3
%115 = getelementptr inbounds [7 x i8], [7 x i8]* %114, i64 0, i64 2
store i8 1, i8* %115
%116 = load [7 x i8]*, [7 x i8]** %4
%117 = getelementptr inbounds [7 x i8], [7 x i8]* %116, i64 3
%118 = getelementptr inbounds [7 x i8], [7 x i8]* %117, i64 0, i64 3
store i8 1, i8* %118
%119 = load [7 x i8]*, [7 x i8]** %4
%120 = getelementptr inbounds [7 x i8], [7 x i8]* %119, i64 4
%121 = getelementptr inbounds [7 x i8], [7 x i8]* %120, i64 0, i64 3
store i8 1, i8* %121
%122 = load [7 x i8]*, [7 x i8]** %4
%123 = getelementptr inbounds [7 x i8], [7 x i8]* %122, i64 4
%124 = getelementptr inbounds [7 x i8], [7 x i8]* %123, i64 0, i64 4
store i8 1, i8* %124
br label %138
125: ; preds = %108
%126 = load [7 x i8]*, [7 x i8]** %4
%127 = getelementptr inbounds [7 x i8], [7 x i8]* %126, i64 2
%128 = getelementptr inbounds [7 x i8], [7 x i8]* %127, i64 0, i64 3
store i8 1, i8* %128
%129 = load [7 x i8]*, [7 x i8]** %4
%130 = getelementptr inbounds [7 x i8], [7 x i8]* %129, i64 3
%131 = getelementptr inbounds [7 x i8], [7 x i8]* %130, i64 0, i64 2
store i8 1, i8* %131
%132 = load [7 x i8]*, [7 x i8]** %4
%133 = getelementptr inbounds [7 x i8], [7 x i8]* %132, i64 3
%134 = getelementptr inbounds [7 x i8], [7 x i8]* %133, i64 0, i64 3
store i8 1, i8* %134
%135 = load [7 x i8]*, [7 x i8]** %4
%136 = getelementptr inbounds [7 x i8], [7 x i8]* %135, i64 4
%137 = getelementptr inbounds [7 x i8], [7 x i8]* %136, i64 0, i64 2
store i8 1, i8* %137
br label %138
138: ; preds = %125, %112
br label %195
139: ; preds = %3
%140 = load [7 x i8]*, [7 x i8]** %4
%141 = getelementptr inbounds [7 x i8], [7 x i8]* %140, i64 3
%142 = getelementptr inbounds [7 x i8], [7 x i8]* %141, i64 0, i64 2
store i8 1, i8* %142
%143 = load [7 x i8]*, [7 x i8]** %4
%144 = getelementptr inbounds [7 x i8], [7 x i8]* %143, i64 3
%145 = getelementptr inbounds [7 x i8], [7 x i8]* %144, i64 0, i64 3
store i8 1, i8* %145
%146 = load [7 x i8]*, [7 x i8]** %4
%147 = getelementptr inbounds [7 x i8], [7 x i8]* %146, i64 3
%148 = getelementptr inbounds [7 x i8], [7 x i8]* %147, i64 0, i64 4
store i8 1, i8* %148
%149 = load [7 x i8]*, [7 x i8]** %4
%150 = getelementptr inbounds [7 x i8], [7 x i8]* %149, i64 4
%151 = getelementptr inbounds [7 x i8], [7 x i8]* %150, i64 0, i64 3
store i8 1, i8* %151
store i32 0, i32* %9
br label %152
152: ; preds = %160, %139
%153 = load i32, i32* %9
%154 = load i32, i32* %6
%155 = icmp slt i32 %153, %154
br i1 %155, label %156, label %163
156: ; preds = %152
%157 = load [7 x i8]*, [7 x i8]** %4
%158 = bitcast [7 x i8]* %157 to i8**
%159 = call i32 @rotate_piece(i8** %158)
br label %160
160: ; preds = %156
%161 = load i32, i32* %9
%162 = add nsw i32 %161, 1
store i32 %162, i32* %9
br label %152
163: ; preds = %152
br label %195
164: ; preds = %3
%165 = load i32, i32* %6
%166 = srem i32 %165, 2
%167 = icmp eq i32 %166, 0
br i1 %167, label %168, label %181
168: ; preds = %164
%169 = load [7 x i8]*, [7 x i8]** %4
%170 = getelementptr inbounds [7 x i8], [7 x i8]* %169, i64 3
%171 = getelementptr inbounds [7 x i8], [7 x i8]* %170, i64 0, i64 3
store i8 1, i8* %171
%172 = load [7 x i8]*, [7 x i8]** %4
%173 = getelementptr inbounds [7 x i8], [7 x i8]* %172, i64 3
%174 = getelementptr inbounds [7 x i8], [7 x i8]* %173, i64 0, i64 4
store i8 1, i8* %174
%175 = load [7 x i8]*, [7 x i8]** %4
%176 = getelementptr inbounds [7 x i8], [7 x i8]* %175, i64 4
%177 = getelementptr inbounds [7 x i8], [7 x i8]* %176, i64 0, i64 2
store i8 1, i8* %177
%178 = load [7 x i8]*, [7 x i8]** %4
%179 = getelementptr inbounds [7 x i8], [7 x i8]* %178, i64 4
%180 = getelementptr inbounds [7 x i8], [7 x i8]* %179, i64 0, i64 3
store i8 1, i8* %180
br label %194
181: ; preds = %164
%182 = load [7 x i8]*, [7 x i8]** %4
%183 = getelementptr inbounds [7 x i8], [7 x i8]* %182, i64 2
%184 = getelementptr inbounds [7 x i8], [7 x i8]* %183, i64 0, i64 3
store i8 1, i8* %184
%185 = load [7 x i8]*, [7 x i8]** %4
%186 = getelementptr inbounds [7 x i8], [7 x i8]* %185, i64 3
%187 = getelementptr inbounds [7 x i8], [7 x i8]* %186, i64 0, i64 3
store i8 1, i8* %187
%188 = load [7 x i8]*, [7 x i8]** %4
%189 = getelementptr inbounds [7 x i8], [7 x i8]* %188, i64 3
%190 = getelementptr inbounds [7 x i8], [7 x i8]* %189, i64 0, i64 4
store i8 1, i8* %190
%191 = load [7 x i8]*, [7 x i8]** %4
%192 = getelementptr inbounds [7 x i8], [7 x i8]* %191, i64 4
%193 = getelementptr inbounds [7 x i8], [7 x i8]* %192, i64 0, i64 4
store i8 1, i8* %193
br label %194
194: ; preds = %181, %168
br label %195
195: ; preds = %3, %194, %163, %138, %95, %94, %69, %44
ret void
}

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