#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*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stderr;
void copyweightfunc(unsigned char *dest, const unsigned char *src,
                    int rotation) {
  int i, i0, j, j0;
  for (j = 0; j < 6; j++) {
    for (i = 0; i < 6; i++) {
      switch (rotation) {
      case 0:
        j0 = j;
        i0 = i;
        break;
      case 90:
        j0 = i;
        i0 = 6 - j - 1;
        break;
      case 180:
      case -180:
        j0 = 6 - j - 1;
        i0 = 6 - i - 1;
        break;
      case -90:
        j0 = 6 - i - 1;
        i0 = j;
        break;
      default:
        fprintf(stderr, "BUG: Illegal rotation: %i\n", rotation);
        return;
      }
      dest[j * 6 + i] = src[j0 * 6 + i0];
    }
  }
}


x86 assembly (clang, -O0):
<copyweightfunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x20(%rbp)
cmpl   $0x6,-0x20(%rbp)
jge    1264 <copyweightfunc+0x154>
movl   $0x0,-0x18(%rbp)
cmpl   $0x6,-0x18(%rbp)
jge    1251 <copyweightfunc+0x141>
mov    -0x14(%rbp),%eax
mov    %eax,-0x28(%rbp)
sub    $0xffffff4c,%eax
je     11ca <copyweightfunc+0xba>
jmp    115b <copyweightfunc+0x4b>
mov    -0x28(%rbp),%eax
sub    $0xffffffa6,%eax
je     11eb <copyweightfunc+0xdb>
jmp    116c <copyweightfunc+0x5c>
mov    -0x28(%rbp),%eax
test   %eax,%eax
je     11a0 <copyweightfunc+0x90>
jmp    117c <copyweightfunc+0x6c>
mov    -0x28(%rbp),%eax
sub    $0x5a,%eax
je     11b1 <copyweightfunc+0xa1>
jmp    118d <copyweightfunc+0x7d>
mov    -0x28(%rbp),%eax
sub    $0xb4,%eax
je     11ca <copyweightfunc+0xba>
jmp    1204 <copyweightfunc+0xf4>
mov    -0x20(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    1221 <copyweightfunc+0x111>
mov    -0x18(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    $0x6,%eax
sub    -0x20(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1221 <copyweightfunc+0x111>
mov    $0x6,%eax
sub    -0x20(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    $0x6,%eax
sub    -0x18(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1221 <copyweightfunc+0x111>
mov    $0x6,%eax
sub    -0x18(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    1221 <copyweightfunc+0x111>
mov    0x2dd5(%rip),%rax
mov    (%rax),%edi
mov    -0x14(%rbp),%edx
lea    0xde9(%rip),%rsi
call   1030 <fprintf@plt>
jmp    1264 <copyweightfunc+0x154>
mov    -0x10(%rbp),%rax
imul   $0x6,-0x24(%rbp),%ecx
add    -0x1c(%rbp),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
imul   $0x6,-0x20(%rbp),%ecx
add    -0x18(%rbp),%ecx
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    113b <copyweightfunc+0x2b>
jmp    1256 <copyweightfunc+0x146>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    112a <copyweightfunc+0x1a>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copyweightfunc>:
push   %r15
push   %r14
push   %r12
push   %rbx
test   %edx,%edx
js     112f <copyweightfunc+0x1f>
je     1140 <copyweightfunc+0x30>
cmp    $0xb4,%edx
je     1140 <copyweightfunc+0x30>
cmp    $0x5a,%edx
je     1140 <copyweightfunc+0x30>
jmp    140e <copyweightfunc+0x2fe>
cmp    $0xffffff4c,%edx
je     1140 <copyweightfunc+0x30>
cmp    $0xffffffa6,%edx
jne    140e <copyweightfunc+0x2fe>
add    $0x5,%rdi
mov    $0x5,%r12d
xor    %r15d,%r15d
movabs $0x600000000,%r8
movabs $0x400000000,%r9
movabs $0x300000000,%r10
movabs $0x200000000,%r11
xor    %ecx,%ecx
jmp    11a8 <copyweightfunc+0x98>
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
lea    (%r14,%r14,2),%eax
lea    (%rbx,%rax,2),%eax
cltq
movzbl (%rsi,%rax,1),%eax
mov    %al,(%rdi)
add    $0x1,%rcx
add    %r8,%r15
add    $0xffffffffffffffff,%r12
add    $0x6,%rdi
cmp    $0x6,%rcx
je     1406 <copyweightfunc+0x2f6>
mov    $0x5,%r14d
sub    %ecx,%r14d
cmp    $0x59,%edx
jg     11e0 <copyweightfunc+0xd0>
cmp    $0xffffff4c,%edx
je     11ed <copyweightfunc+0xdd>
test   %edx,%edx
jne    1210 <copyweightfunc+0x100>
mov    %r15,%rax
sar    $0x20,%rax
movzbl (%rsi,%rax,1),%eax
mov    %al,-0x5(%rdi)
jmp    123b <copyweightfunc+0x12b>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmp    $0x5a,%edx
je     1200 <copyweightfunc+0xf0>
cmp    $0xb4,%edx
jne    1210 <copyweightfunc+0x100>
mov    $0x5,%ebx
mov    %r12d,%eax
jmp    1217 <copyweightfunc+0x107>
nopw   0x0(%rax,%rax,1)
movzbl (%rsi,%r12,1),%eax
mov    %al,-0x5(%rdi)
jmp    12b0 <copyweightfunc+0x1a0>
nopl   (%rax)
mov    $0x5,%eax
mov    %ecx,%ebx
lea    (%rax,%rax,2),%eax
lea    (%rbx,%rax,2),%eax
cltq
movzbl (%rsi,%rax,1),%eax
mov    %al,-0x5(%rdi)
cmp    $0x59,%edx
jg     1290 <copyweightfunc+0x180>
cmp    $0xffffff4c,%edx
je     129d <copyweightfunc+0x18d>
test   %edx,%edx
jne    12e2 <copyweightfunc+0x1d2>
mov    %r15,%rax
sar    $0x20,%rax
or     $0x1,%rax
movzbl (%rsi,%rax,1),%eax
mov    %al,-0x4(%rdi)
lea    (%r15,%r11,1),%rax
sar    $0x20,%rax
movzbl (%rsi,%rax,1),%eax
mov    %al,-0x3(%rdi)
lea    (%r15,%r10,1),%rax
sar    $0x20,%rax
movzbl (%rsi,%rax,1),%eax
mov    %al,-0x2(%rdi)
lea    (%r15,%r9,1),%rax
sar    $0x20,%rax
movzbl (%rsi,%rax,1),%eax
mov    %al,-0x1(%rdi)
mov    $0x5,%ebx
mov    %ecx,%r14d
jmp    1180 <copyweightfunc+0x70>
nopw   0x0(%rax,%rax,1)
cmp    $0x5a,%edx
je     12b0 <copyweightfunc+0x1a0>
cmp    $0xb4,%edx
jne    12e2 <copyweightfunc+0x1d2>
mov    $0x4,%ebx
mov    %r12d,%eax
jmp    12e9 <copyweightfunc+0x1d9>
nopw   0x0(%rax,%rax,1)
movzbl 0x6(%rsi,%r12,1),%eax
mov    %al,-0x4(%rdi)
movzbl 0xc(%rsi,%r12,1),%eax
mov    %al,-0x3(%rdi)
movzbl 0x12(%rsi,%r12,1),%eax
mov    %al,-0x2(%rdi)
movzbl 0x18(%rsi,%r12,1),%eax
mov    %al,-0x1(%rdi)
mov    %r14d,%ebx
mov    $0x5,%r14d
jmp    1180 <copyweightfunc+0x70>
mov    $0x4,%eax
mov    %ecx,%ebx
lea    (%rax,%rax,2),%eax
lea    (%rbx,%rax,2),%eax
cltq
movzbl (%rsi,%rax,1),%eax
mov    %al,-0x4(%rdi)
cmp    $0x59,%edx
jg     130f <copyweightfunc+0x1ff>
cmp    $0xffffff4c,%edx
je     131c <copyweightfunc+0x20c>
test   %edx,%edx
je     124d <copyweightfunc+0x13d>
jmp    1326 <copyweightfunc+0x216>
cmp    $0x5a,%edx
je     12b9 <copyweightfunc+0x1a9>
cmp    $0xb4,%edx
jne    1326 <copyweightfunc+0x216>
mov    $0x3,%ebx
mov    %r12d,%eax
jmp    132d <copyweightfunc+0x21d>
mov    $0x3,%eax
mov    %ecx,%ebx
lea    (%rax,%rax,2),%eax
lea    (%rbx,%rax,2),%eax
cltq
movzbl (%rsi,%rax,1),%eax
mov    %al,-0x3(%rdi)
cmp    $0x59,%edx
jg     1353 <copyweightfunc+0x243>
cmp    $0xffffff4c,%edx
je     1364 <copyweightfunc+0x254>
test   %edx,%edx
je     125c <copyweightfunc+0x14c>
jmp    136e <copyweightfunc+0x25e>
cmp    $0x5a,%edx
je     12c2 <copyweightfunc+0x1b2>
cmp    $0xb4,%edx
jne    136e <copyweightfunc+0x25e>
mov    $0x2,%ebx
mov    %r12d,%eax
jmp    1375 <copyweightfunc+0x265>
mov    $0x2,%eax
mov    %ecx,%ebx
lea    (%rax,%rax,2),%eax
lea    (%rbx,%rax,2),%eax
cltq
movzbl (%rsi,%rax,1),%eax
mov    %al,-0x2(%rdi)
cmp    $0x59,%edx
jg     139b <copyweightfunc+0x28b>
cmp    $0xffffff4c,%edx
je     13ac <copyweightfunc+0x29c>
test   %edx,%edx
je     126b <copyweightfunc+0x15b>
jmp    13b6 <copyweightfunc+0x2a6>
cmp    $0x5a,%edx
je     12cb <copyweightfunc+0x1bb>
cmp    $0xb4,%edx
jne    13b6 <copyweightfunc+0x2a6>
mov    $0x1,%ebx
mov    %r12d,%eax
jmp    13bd <copyweightfunc+0x2ad>
mov    $0x1,%eax
mov    %ecx,%ebx
lea    (%rax,%rax,2),%eax
lea    (%rbx,%rax,2),%eax
cltq
movzbl (%rsi,%rax,1),%eax
mov    %al,-0x1(%rdi)
cmp    $0x59,%edx
jg     13e7 <copyweightfunc+0x2d7>
cmp    $0xffffff4c,%edx
je     1179 <copyweightfunc+0x69>
test   %edx,%edx
je     127a <copyweightfunc+0x16a>
jmp    13fc <copyweightfunc+0x2ec>
cmp    $0x5a,%edx
je     12d4 <copyweightfunc+0x1c4>
cmp    $0xb4,%edx
je     1179 <copyweightfunc+0x69>
xor    %r14d,%r14d
mov    %ecx,%ebx
jmp    1180 <copyweightfunc+0x70>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret
mov    0x2bcb(%rip),%rax
mov    (%rax),%edi
lea    0xbe2(%rip),%rsi
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [27 x i8] c"BUG: Illegal rotation: %i\0A\00"
define void @copyweightfunc(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
store i32 0, i32* %9
br label %11
11: ; preds = %64, %3
%12 = load i32, i32* %9
%13 = icmp slt i32 %12, 6
br i1 %13, label %14, label %67
14: ; preds = %11
store i32 0, i32* %7
br label %15
15: ; preds = %60, %14
%16 = load i32, i32* %7
%17 = icmp slt i32 %16, 6
br i1 %17, label %18, label %63
18: ; preds = %15
%19 = load i32, i32* %6
switch i32 %19, label %40 [
i32 0, label %20
i32 90, label %23
i32 180, label %28
i32 -180, label %28
i32 -90, label %35
]
20: ; preds = %18
%21 = load i32, i32* %9
store i32 %21, i32* %10
%22 = load i32, i32* %7
store i32 %22, i32* %8
br label %44
23: ; preds = %18
%24 = load i32, i32* %7
store i32 %24, i32* %10
%25 = load i32, i32* %9
%26 = sub nsw i32 6, %25
%27 = sub nsw i32 %26, 1
store i32 %27, i32* %8
br label %44
28: ; preds = %18, %18
%29 = load i32, i32* %9
%30 = sub nsw i32 6, %29
%31 = sub nsw i32 %30, 1
store i32 %31, i32* %10
%32 = load i32, i32* %7
%33 = sub nsw i32 6, %32
%34 = sub nsw i32 %33, 1
store i32 %34, i32* %8
br label %44
35: ; preds = %18
%36 = load i32, i32* %7
%37 = sub nsw i32 6, %36
%38 = sub nsw i32 %37, 1
store i32 %38, i32* %10
%39 = load i32, i32* %9
store i32 %39, i32* %8
br label %44
40: ; preds = %18
%41 = load i32, i32* @stderr
%42 = load i32, i32* %6
%43 = call i32 @fprintf(i32 %41, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %42)
br label %67
44: ; preds = %35, %28, %23, %20
%45 = load i8*, i8** %5
%46 = load i32, i32* %10
%47 = mul nsw i32 %46, 6
%48 = load i32, i32* %8
%49 = add nsw i32 %47, %48
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds i8, i8* %45, i64 %50
%52 = load i8, i8* %51
%53 = load i8*, i8** %4
%54 = load i32, i32* %9
%55 = mul nsw i32 %54, 6
%56 = load i32, i32* %7
%57 = add nsw i32 %55, %56
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds i8, i8* %53, i64 %58
store i8 %52, i8* %59
br label %60
60: ; preds = %44
%61 = load i32, i32* %7
%62 = add nsw i32 %61, 1
store i32 %62, i32* %7
br label %15
63: ; preds = %15
br label %64
64: ; preds = %63
%65 = load i32, i32* %9
%66 = add nsw i32 %65, 1
store i32 %66, i32* %9
br label %11
67: ; preds = %40, %11
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [27 x i8] c"BUG: Illegal rotation: %i\0A\00"
define void @copyweightfunc(i8* nocapture writeonly %0, i8* nocapture %1, i32 %2) {
switch i32 %2, label %22 [
i32 0, label %4
i32 90, label %4
i32 180, label %4
i32 -180, label %4
i32 -90, label %4
]
4: ; preds = %3, %3, %3, %3, %3
br label %5
5: ; preds = %4, %141
%6 = phi i64 [ %151, %141 ], [ 0, %4 ]
%7 = trunc i64 %6 to i32
%8 = sub nuw nsw i32 5, %7
%9 = mul nuw nsw i64 %6, 6
switch i32 %2, label %21 [
i32 0, label %10
i32 90, label %16
i32 180, label %25
i32 -180, label %25
]
10: ; preds = %5
%11 = mul i64 %6, 25769803776
%12 = ashr exact i64 %11, 32
%13 = getelementptr inbounds i8, i8* %1, i64 %12
%14 = load i8, i8* %13
%15 = getelementptr inbounds i8, i8* %0, i64 %9
store i8 %14, i8* %15
br label %42
16: ; preds = %5
%17 = zext i32 %8 to i64
%18 = getelementptr inbounds i8, i8* %1, i64 %17
%19 = load i8, i8* %18
%20 = getelementptr inbounds i8, i8* %0, i64 %9
store i8 %19, i8* %20
br label %34
21: ; preds = %5
br label %25
22: ; preds = %3
%23 = load i32, i32* @stderr
%24 = tail call i32 @fprintf(i32 %23, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %2)
br label %153
25: ; preds = %5, %5, %21
%26 = phi i32 [ %7, %21 ], [ 5, %5 ], [ 5, %5 ]
%27 = phi i32 [ 5, %21 ], [ %8, %5 ], [ %8, %5 ]
%28 = mul nuw nsw i32 %27, 6
%29 = add nsw i32 %28, %26
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds i8, i8* %1, i64 %30
%32 = load i8, i8* %31
%33 = getelementptr inbounds i8, i8* %0, i64 %9
store i8 %32, i8* %33
switch i32 %2, label %41 [
i32 0, label %42
i32 90, label %34
i32 180, label %50
i32 -180, label %50
]
34: ; preds = %25, %16
%35 = sub nsw i64 11, %6
%36 = and i64 %35, 4294967295
%37 = getelementptr inbounds i8, i8* %1, i64 %36
%38 = load i8, i8* %37
%39 = or i64 %9, 1
%40 = getelementptr inbounds i8, i8* %0, i64 %39
store i8 %38, i8* %40
br label %60
41: ; preds = %25
br label %50
42: ; preds = %10, %25
%43 = mul i64 %6, 25769803776
%44 = ashr exact i64 %43, 32
%45 = or i64 %44, 1
%46 = getelementptr inbounds i8, i8* %1, i64 %45
%47 = load i8, i8* %46
%48 = or i64 %9, 1
%49 = getelementptr inbounds i8, i8* %0, i64 %48
store i8 %47, i8* %49
br label %68
50: ; preds = %25, %25, %41
%51 = phi i32 [ %7, %41 ], [ 4, %25 ], [ 4, %25 ]
%52 = phi i32 [ 4, %41 ], [ %8, %25 ], [ %8, %25 ]
%53 = mul nuw nsw i32 %52, 6
%54 = add nsw i32 %53, %51
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds i8, i8* %1, i64 %55
%57 = load i8, i8* %56
%58 = or i64 %9, 1
%59 = getelementptr inbounds i8, i8* %0, i64 %58
store i8 %57, i8* %59
switch i32 %2, label %67 [
i32 0, label %68
i32 90, label %60
i32 180, label %76
i32 -180, label %76
]
60: ; preds = %50, %34
%61 = sub nsw i64 17, %6
%62 = and i64 %61, 4294967295
%63 = getelementptr inbounds i8, i8* %1, i64 %62
%64 = load i8, i8* %63
%65 = add nuw nsw i64 %9, 2
%66 = getelementptr inbounds i8, i8* %0, i64 %65
store i8 %64, i8* %66
br label %86
67: ; preds = %50
br label %76
68: ; preds = %42, %50
%69 = mul i64 %6, 25769803776
%70 = add i64 %69, 8589934592
%71 = ashr exact i64 %70, 32
%72 = getelementptr inbounds i8, i8* %1, i64 %71
%73 = load i8, i8* %72
%74 = add nuw nsw i64 %9, 2
%75 = getelementptr inbounds i8, i8* %0, i64 %74
store i8 %73, i8* %75
br label %94
76: ; preds = %50, %50, %67
%77 = phi i32 [ %7, %67 ], [ 3, %50 ], [ 3, %50 ]
%78 = phi i32 [ 3, %67 ], [ %8, %50 ], [ %8, %50 ]
%79 = mul nuw nsw i32 %78, 6
%80 = add nsw i32 %79, %77
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds i8, i8* %1, i64 %81
%83 = load i8, i8* %82
%84 = add nuw nsw i64 %9, 2
%85 = getelementptr inbounds i8, i8* %0, i64 %84
store i8 %83, i8* %85
switch i32 %2, label %93 [
i32 0, label %94
i32 90, label %86
i32 180, label %102
i32 -180, label %102
]
86: ; preds = %76, %60
%87 = sub nsw i64 23, %6
%88 = and i64 %87, 4294967295
%89 = getelementptr inbounds i8, i8* %1, i64 %88
%90 = load i8, i8* %89
%91 = add nuw nsw i64 %9, 3
%92 = getelementptr inbounds i8, i8* %0, i64 %91
store i8 %90, i8* %92
br label %112
93: ; preds = %76
br label %102
94: ; preds = %68, %76
%95 = mul i64 %6, 25769803776
%96 = add i64 %95, 12884901888
%97 = ashr exact i64 %96, 32
%98 = getelementptr inbounds i8, i8* %1, i64 %97
%99 = load i8, i8* %98
%100 = add nuw nsw i64 %9, 3
%101 = getelementptr inbounds i8, i8* %0, i64 %100
store i8 %99, i8* %101
br label %120
102: ; preds = %76, %76, %93
%103 = phi i32 [ %7, %93 ], [ 2, %76 ], [ 2, %76 ]
%104 = phi i32 [ 2, %93 ], [ %8, %76 ], [ %8, %76 ]
%105 = mul nuw nsw i32 %104, 6
%106 = add nsw i32 %105, %103
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds i8, i8* %1, i64 %107
%109 = load i8, i8* %108
%110 = add nuw nsw i64 %9, 3
%111 = getelementptr inbounds i8, i8* %0, i64 %110
store i8 %109, i8* %111
switch i32 %2, label %119 [
i32 0, label %120
i32 90, label %112
i32 180, label %128
i32 -180, label %128
]
112: ; preds = %102, %86
%113 = sub nsw i64 29, %6
%114 = and i64 %113, 4294967295
%115 = getelementptr inbounds i8, i8* %1, i64 %114
%116 = load i8, i8* %115
%117 = add nuw nsw i64 %9, 4
%118 = getelementptr inbounds i8, i8* %0, i64 %117
store i8 %116, i8* %118
br label %139
119: ; preds = %102
br label %128
120: ; preds = %94, %102
%121 = mul i64 %6, 25769803776
%122 = add i64 %121, 17179869184
%123 = ashr exact i64 %122, 32
%124 = getelementptr inbounds i8, i8* %1, i64 %123
%125 = load i8, i8* %124
%126 = add nuw nsw i64 %9, 4
%127 = getelementptr inbounds i8, i8* %0, i64 %126
store i8 %125, i8* %127
br label %141
128: ; preds = %102, %102, %119
%129 = phi i32 [ %7, %119 ], [ 1, %102 ], [ 1, %102 ]
%130 = phi i32 [ 1, %119 ], [ %8, %102 ], [ %8, %102 ]
%131 = mul nuw nsw i32 %130, 6
%132 = add nsw i32 %131, %129
%133 = sext i32 %132 to i64
%134 = getelementptr inbounds i8, i8* %1, i64 %133
%135 = load i8, i8* %134
%136 = add nuw nsw i64 %9, 4
%137 = getelementptr inbounds i8, i8* %0, i64 %136
store i8 %135, i8* %137
switch i32 %2, label %140 [
i32 0, label %141
i32 90, label %139
i32 180, label %138
i32 -180, label %138
]
138: ; preds = %128, %128
br label %141
139: ; preds = %112, %128
br label %141
140: ; preds = %128
br label %141
141: ; preds = %120, %140, %139, %138, %128
%142 = phi i32 [ %7, %140 ], [ 0, %138 ], [ %8, %139 ], [ 5, %128 ], [ 5, %120 ]
%143 = phi i32 [ 0, %140 ], [ %8, %138 ], [ 5, %139 ], [ %7, %128 ], [ %7, %120 ]
%144 = mul nsw i32 %143, 6
%145 = add nsw i32 %144, %142
%146 = sext i32 %145 to i64
%147 = getelementptr inbounds i8, i8* %1, i64 %146
%148 = load i8, i8* %147
%149 = add nuw nsw i64 %9, 5
%150 = getelementptr inbounds i8, i8* %0, i64 %149
store i8 %148, i8* %150
%151 = add nuw nsw i64 %6, 1
%152 = icmp eq i64 %151, 6
br i1 %152, label %153, label %5
153: ; preds = %141, %22
ret void
}