#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 */
struct GTPeriph {
  int dummy;
};

/* Variables and functions */
int gtemu_getxout(struct GTPeriph *);
void gtemu_placelights(struct GTPeriph *ph, void *pixels, int pitch,
                       int power) {
  int y;
  for (y = 474; y < 478; y++) {
    int i, j, x0;
    unsigned short c;
    unsigned short *line = (unsigned short *)(pixels + y * pitch);
    int xout = gtemu_getxout(ph);
    for (i = 0; i < 4; i++) {
      c = xout & 1 ? 0x0f42 : 0x222;
      xout >>= 1;
      x0 = i * 8 + 6;
      for (j = x0; j < x0 + 4; j++) {
        line[j] = c;
      }
    }
    c = power ? 0x0f42 : 0x222;
    x0 = 632;
    for (j = x0; j < x0 + 4; j++) {
      line[j] = c;
    }
  }
}


x86 assembly (clang, -O0):
<gtemu_placelights>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
movl   $0x1da,-0x1c(%rbp)
cmpl   $0x1de,-0x1c(%rbp)
jge    1249 <gtemu_placelights+0x139>
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
imul   -0x14(%rbp),%ecx
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <gtemu_getxout@plt>
mov    %eax,-0x3c(%rbp)
movl   $0x0,-0x20(%rbp)
cmpl   $0x4,-0x20(%rbp)
jge    11e3 <gtemu_placelights+0xd3>
mov    -0x3c(%rbp),%edx
and    $0x1,%edx
mov    $0x222,%eax
mov    $0xf42,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %ax,-0x2a(%rbp)
mov    -0x3c(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x3c(%rbp)
mov    -0x20(%rbp),%eax
shl    $0x3,%eax
add    $0x6,%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    -0x28(%rbp),%ecx
add    $0x4,%ecx
cmp    %ecx,%eax
jge    11d0 <gtemu_placelights+0xc0>
mov    -0x2a(%rbp),%dx
mov    -0x38(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    %dx,(%rax,%rcx,2)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11a1 <gtemu_placelights+0x91>
jmp    11d5 <gtemu_placelights+0xc5>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1162 <gtemu_placelights+0x52>
mov    -0x18(%rbp),%edx
mov    $0x222,%eax
mov    $0xf42,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %ax,-0x2a(%rbp)
movl   $0x278,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    -0x28(%rbp),%ecx
add    $0x4,%ecx
cmp    %ecx,%eax
jge    1236 <gtemu_placelights+0x126>
mov    -0x2a(%rbp),%dx
mov    -0x38(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    %dx,(%rax,%rcx,2)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1207 <gtemu_placelights+0xf7>
jmp    123b <gtemu_placelights+0x12b>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    112d <gtemu_placelights+0x1d>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gtemu_placelights>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,(%rsp)
test   %ecx,%ecx
mov    $0x222,%r12d
mov    $0xf42,%r13d
cmove  %r12d,%r13d
movslq %edx,%r15
imul   $0x1da,%r15,%r14
call   1030 <gtemu_getxout@plt>
test   $0x1,%al
mov    $0xf42,%ecx
cmove  %r12d,%ecx
mov    %cx,0xc(%rbx,%r14,1)
mov    %cx,0xe(%rbx,%r14,1)
mov    %cx,0x10(%rbx,%r14,1)
mov    %cx,0x12(%rbx,%r14,1)
test   $0x2,%al
mov    $0xf42,%ecx
cmove  %r12d,%ecx
mov    %cx,0x1c(%rbx,%r14,1)
mov    %cx,0x1e(%rbx,%r14,1)
mov    %cx,0x20(%rbx,%r14,1)
mov    %cx,0x22(%rbx,%r14,1)
test   $0x4,%al
mov    $0xf42,%ecx
cmove  %r12d,%ecx
mov    %cx,0x2c(%rbx,%r14,1)
mov    %cx,0x2e(%rbx,%r14,1)
mov    %cx,0x30(%rbx,%r14,1)
mov    %cx,0x32(%rbx,%r14,1)
test   $0x8,%al
mov    $0xf42,%eax
cmove  %r12d,%eax
mov    %ax,0x3c(%rbx,%r14,1)
mov    %ax,0x3e(%rbx,%r14,1)
mov    %ax,0x40(%rbx,%r14,1)
mov    %ax,0x42(%rbx,%r14,1)
mov    %r13w,0x4f0(%rbx,%r14,1)
mov    %r13w,0x4f2(%rbx,%r14,1)
mov    %r13w,0x4f4(%rbx,%r14,1)
mov    %r13w,0x4f6(%rbx,%r14,1)
imul   $0x1db,%r15,%rbp
mov    (%rsp),%r14
mov    %r14,%rdi
call   1030 <gtemu_getxout@plt>
test   $0x1,%al
mov    $0xf42,%ecx
cmove  %r12d,%ecx
mov    %cx,0xc(%rbx,%rbp,1)
mov    %cx,0xe(%rbx,%rbp,1)
mov    %cx,0x10(%rbx,%rbp,1)
mov    %cx,0x12(%rbx,%rbp,1)
test   $0x2,%al
mov    $0xf42,%ecx
cmove  %r12d,%ecx
mov    %cx,0x1c(%rbx,%rbp,1)
mov    %cx,0x1e(%rbx,%rbp,1)
mov    %cx,0x20(%rbx,%rbp,1)
mov    %cx,0x22(%rbx,%rbp,1)
test   $0x4,%al
mov    $0xf42,%ecx
cmove  %r12d,%ecx
mov    %cx,0x2c(%rbx,%rbp,1)
mov    %cx,0x2e(%rbx,%rbp,1)
mov    %cx,0x30(%rbx,%rbp,1)
mov    %cx,0x32(%rbx,%rbp,1)
test   $0x8,%al
mov    $0xf42,%eax
cmove  %r12d,%eax
mov    %ax,0x3c(%rbx,%rbp,1)
mov    %ax,0x3e(%rbx,%rbp,1)
mov    %ax,0x40(%rbx,%rbp,1)
mov    %ax,0x42(%rbx,%rbp,1)
mov    %r13w,0x4f0(%rbx,%rbp,1)
mov    %r13w,0x4f2(%rbx,%rbp,1)
mov    %r13w,0x4f4(%rbx,%rbp,1)
mov    %r13w,0x4f6(%rbx,%rbp,1)
imul   $0x1dc,%r15,%rbp
mov    %r14,%rdi
call   1030 <gtemu_getxout@plt>
test   $0x1,%al
mov    $0xf42,%ecx
cmove  %r12d,%ecx
mov    %cx,0xc(%rbx,%rbp,1)
mov    %cx,0xe(%rbx,%rbp,1)
mov    %cx,0x10(%rbx,%rbp,1)
mov    %cx,0x12(%rbx,%rbp,1)
test   $0x2,%al
mov    $0xf42,%ecx
cmove  %r12d,%ecx
mov    %cx,0x1c(%rbx,%rbp,1)
mov    %cx,0x1e(%rbx,%rbp,1)
mov    %cx,0x20(%rbx,%rbp,1)
mov    %cx,0x22(%rbx,%rbp,1)
test   $0x4,%al
mov    $0xf42,%ecx
cmove  %r12d,%ecx
mov    %cx,0x2c(%rbx,%rbp,1)
mov    %cx,0x2e(%rbx,%rbp,1)
mov    %cx,0x30(%rbx,%rbp,1)
mov    %cx,0x32(%rbx,%rbp,1)
test   $0x8,%al
mov    $0xf42,%eax
cmove  %r12d,%eax
mov    %ax,0x3c(%rbx,%rbp,1)
mov    %ax,0x3e(%rbx,%rbp,1)
mov    %ax,0x40(%rbx,%rbp,1)
mov    %ax,0x42(%rbx,%rbp,1)
mov    %r13w,0x4f0(%rbx,%rbp,1)
mov    %r13w,0x4f2(%rbx,%rbp,1)
mov    %r13w,0x4f4(%rbx,%rbp,1)
mov    %r13w,0x4f6(%rbx,%rbp,1)
imul   $0x1dd,%r15,%rbp
mov    %r14,%rdi
call   1030 <gtemu_getxout@plt>
test   $0x1,%al
mov    $0xf42,%ecx
cmove  %r12d,%ecx
mov    %cx,0xc(%rbx,%rbp,1)
mov    %cx,0xe(%rbx,%rbp,1)
mov    %cx,0x10(%rbx,%rbp,1)
test   $0x2,%al
mov    $0xf42,%edx
cmove  %r12d,%edx
mov    %cx,0x12(%rbx,%rbp,1)
mov    %dx,0x1c(%rbx,%rbp,1)
mov    %dx,0x1e(%rbx,%rbp,1)
mov    %dx,0x20(%rbx,%rbp,1)
test   $0x4,%al
mov    $0xf42,%ecx
cmove  %r12d,%ecx
mov    %dx,0x22(%rbx,%rbp,1)
mov    %cx,0x2c(%rbx,%rbp,1)
mov    %cx,0x2e(%rbx,%rbp,1)
mov    %cx,0x30(%rbx,%rbp,1)
mov    %cx,0x32(%rbx,%rbp,1)
test   $0x8,%al
mov    $0xf42,%eax
cmove  %r12d,%eax
mov    %ax,0x3c(%rbx,%rbp,1)
mov    %ax,0x3e(%rbx,%rbp,1)
mov    %ax,0x40(%rbx,%rbp,1)
mov    %ax,0x42(%rbx,%rbp,1)
mov    %r13w,0x4f0(%rbx,%rbp,1)
mov    %r13w,0x4f2(%rbx,%rbp,1)
mov    %r13w,0x4f4(%rbx,%rbp,1)
mov    %r13w,0x4f6(%rbx,%rbp,1)
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.GTPeriph = type { i32 }
define void @gtemu_placelights(%struct.GTPeriph* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca %struct.GTPeriph*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i16
%14 = alloca i16*
%15 = alloca i32
store %struct.GTPeriph* %0, %struct.GTPeriph** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
store i32 474, i32* %9
br label %16
16: ; preds = %85, %4
%17 = load i32, i32* %9
%18 = icmp slt i32 %17, 478
br i1 %18, label %19, label %88
19: ; preds = %16
%20 = load i8*, i8** %6
%21 = load i32, i32* %9
%22 = load i32, i32* %7
%23 = mul nsw i32 %21, %22
%24 = sext i32 %23 to i64
%25 = getelementptr i8, i8* %20, i64 %24
%26 = bitcast i8* %25 to i16*
store i16* %26, i16** %14
%27 = load %struct.GTPeriph*, %struct.GTPeriph** %5
%28 = call i32 @gtemu_getxout(%struct.GTPeriph* %27)
store i32 %28, i32* %15
store i32 0, i32* %10
br label %29
29: ; preds = %60, %19
%30 = load i32, i32* %10
%31 = icmp slt i32 %30, 4
br i1 %31, label %32, label %63
32: ; preds = %29
%33 = load i32, i32* %15
%34 = and i32 %33, 1
%35 = icmp ne i32 %34, 0
%36 = zext i1 %35 to i64
%37 = select i1 %35, i32 3906, i32 546
%38 = trunc i32 %37 to i16
store i16 %38, i16* %13
%39 = load i32, i32* %15
%40 = ashr i32 %39, 1
store i32 %40, i32* %15
%41 = load i32, i32* %10
%42 = mul nsw i32 %41, 8
%43 = add nsw i32 %42, 6
store i32 %43, i32* %12
%44 = load i32, i32* %12
store i32 %44, i32* %11
br label %45
45: ; preds = %56, %32
%46 = load i32, i32* %11
%47 = load i32, i32* %12
%48 = add nsw i32 %47, 4
%49 = icmp slt i32 %46, %48
br i1 %49, label %50, label %59
50: ; preds = %45
%51 = load i16, i16* %13
%52 = load i16*, i16** %14
%53 = load i32, i32* %11
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds i16, i16* %52, i64 %54
store i16 %51, i16* %55
br label %56
56: ; preds = %50
%57 = load i32, i32* %11
%58 = add nsw i32 %57, 1
store i32 %58, i32* %11
br label %45
59: ; preds = %45
br label %60
60: ; preds = %59
%61 = load i32, i32* %10
%62 = add nsw i32 %61, 1
store i32 %62, i32* %10
br label %29
63: ; preds = %29
%64 = load i32, i32* %8
%65 = icmp ne i32 %64, 0
%66 = zext i1 %65 to i64
%67 = select i1 %65, i32 3906, i32 546
%68 = trunc i32 %67 to i16
store i16 %68, i16* %13
store i32 632, i32* %12
%69 = load i32, i32* %12
store i32 %69, i32* %11
br label %70
70: ; preds = %81, %63
%71 = load i32, i32* %11
%72 = load i32, i32* %12
%73 = add nsw i32 %72, 4
%74 = icmp slt i32 %71, %73
br i1 %74, label %75, label %84
75: ; preds = %70
%76 = load i16, i16* %13
%77 = load i16*, i16** %14
%78 = load i32, i32* %11
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds i16, i16* %77, i64 %79
store i16 %76, i16* %80
br label %81
81: ; preds = %75
%82 = load i32, i32* %11
%83 = add nsw i32 %82, 1
store i32 %83, i32* %11
br label %70
84: ; preds = %70
br label %85
85: ; preds = %84
%86 = load i32, i32* %9
%87 = add nsw i32 %86, 1
store i32 %87, i32* %9
br label %16
88: ; preds = %16
ret void
}

LLVM IR (-O2):
%struct.GTPeriph = type { i32 }
define void @gtemu_placelights(%struct.GTPeriph* %0, i8* nocapture writeonly %1, i32 %2, i32 %3) {
%5 = icmp eq i32 %3, 0
%6 = select i1 %5, i16 546, i16 3906
%7 = sext i32 %2 to i64
%8 = mul nsw i64 %7, 474
%9 = getelementptr i8, i8* %1, i64 %8
%10 = tail call i32 @gtemu_getxout(%struct.GTPeriph* %0)
%11 = and i32 %10, 1
%12 = icmp eq i32 %11, 0
%13 = select i1 %12, i16 546, i16 3906
%14 = getelementptr inbounds i8, i8* %9, i64 12
%15 = bitcast i8* %14 to i16*
store i16 %13, i16* %15
%16 = getelementptr inbounds i8, i8* %9, i64 14
%17 = bitcast i8* %16 to i16*
store i16 %13, i16* %17
%18 = getelementptr inbounds i8, i8* %9, i64 16
%19 = bitcast i8* %18 to i16*
store i16 %13, i16* %19
%20 = getelementptr inbounds i8, i8* %9, i64 18
%21 = bitcast i8* %20 to i16*
store i16 %13, i16* %21
%22 = and i32 %10, 2
%23 = icmp eq i32 %22, 0
%24 = select i1 %23, i16 546, i16 3906
%25 = getelementptr inbounds i8, i8* %9, i64 28
%26 = bitcast i8* %25 to i16*
store i16 %24, i16* %26
%27 = getelementptr inbounds i8, i8* %9, i64 30
%28 = bitcast i8* %27 to i16*
store i16 %24, i16* %28
%29 = getelementptr inbounds i8, i8* %9, i64 32
%30 = bitcast i8* %29 to i16*
store i16 %24, i16* %30
%31 = getelementptr inbounds i8, i8* %9, i64 34
%32 = bitcast i8* %31 to i16*
store i16 %24, i16* %32
%33 = and i32 %10, 4
%34 = icmp eq i32 %33, 0
%35 = select i1 %34, i16 546, i16 3906
%36 = getelementptr inbounds i8, i8* %9, i64 44
%37 = bitcast i8* %36 to i16*
store i16 %35, i16* %37
%38 = getelementptr inbounds i8, i8* %9, i64 46
%39 = bitcast i8* %38 to i16*
store i16 %35, i16* %39
%40 = getelementptr inbounds i8, i8* %9, i64 48
%41 = bitcast i8* %40 to i16*
store i16 %35, i16* %41
%42 = getelementptr inbounds i8, i8* %9, i64 50
%43 = bitcast i8* %42 to i16*
store i16 %35, i16* %43
%44 = and i32 %10, 8
%45 = icmp eq i32 %44, 0
%46 = select i1 %45, i16 546, i16 3906
%47 = getelementptr inbounds i8, i8* %9, i64 60
%48 = bitcast i8* %47 to i16*
store i16 %46, i16* %48
%49 = getelementptr inbounds i8, i8* %9, i64 62
%50 = bitcast i8* %49 to i16*
store i16 %46, i16* %50
%51 = getelementptr inbounds i8, i8* %9, i64 64
%52 = bitcast i8* %51 to i16*
store i16 %46, i16* %52
%53 = getelementptr inbounds i8, i8* %9, i64 66
%54 = bitcast i8* %53 to i16*
store i16 %46, i16* %54
%55 = getelementptr inbounds i8, i8* %9, i64 1264
%56 = bitcast i8* %55 to i16*
store i16 %6, i16* %56
%57 = getelementptr inbounds i8, i8* %9, i64 1266
%58 = bitcast i8* %57 to i16*
store i16 %6, i16* %58
%59 = getelementptr inbounds i8, i8* %9, i64 1268
%60 = bitcast i8* %59 to i16*
store i16 %6, i16* %60
%61 = getelementptr inbounds i8, i8* %9, i64 1270
%62 = bitcast i8* %61 to i16*
store i16 %6, i16* %62
%63 = mul nsw i64 %7, 475
%64 = getelementptr i8, i8* %1, i64 %63
%65 = tail call i32 @gtemu_getxout(%struct.GTPeriph* %0)
%66 = and i32 %65, 1
%67 = icmp eq i32 %66, 0
%68 = select i1 %67, i16 546, i16 3906
%69 = getelementptr inbounds i8, i8* %64, i64 12
%70 = bitcast i8* %69 to i16*
store i16 %68, i16* %70
%71 = getelementptr inbounds i8, i8* %64, i64 14
%72 = bitcast i8* %71 to i16*
store i16 %68, i16* %72
%73 = getelementptr inbounds i8, i8* %64, i64 16
%74 = bitcast i8* %73 to i16*
store i16 %68, i16* %74
%75 = getelementptr inbounds i8, i8* %64, i64 18
%76 = bitcast i8* %75 to i16*
store i16 %68, i16* %76
%77 = and i32 %65, 2
%78 = icmp eq i32 %77, 0
%79 = select i1 %78, i16 546, i16 3906
%80 = getelementptr inbounds i8, i8* %64, i64 28
%81 = bitcast i8* %80 to i16*
store i16 %79, i16* %81
%82 = getelementptr inbounds i8, i8* %64, i64 30
%83 = bitcast i8* %82 to i16*
store i16 %79, i16* %83
%84 = getelementptr inbounds i8, i8* %64, i64 32
%85 = bitcast i8* %84 to i16*
store i16 %79, i16* %85
%86 = getelementptr inbounds i8, i8* %64, i64 34
%87 = bitcast i8* %86 to i16*
store i16 %79, i16* %87
%88 = and i32 %65, 4
%89 = icmp eq i32 %88, 0
%90 = select i1 %89, i16 546, i16 3906
%91 = getelementptr inbounds i8, i8* %64, i64 44
%92 = bitcast i8* %91 to i16*
store i16 %90, i16* %92
%93 = getelementptr inbounds i8, i8* %64, i64 46
%94 = bitcast i8* %93 to i16*
store i16 %90, i16* %94
%95 = getelementptr inbounds i8, i8* %64, i64 48
%96 = bitcast i8* %95 to i16*
store i16 %90, i16* %96
%97 = getelementptr inbounds i8, i8* %64, i64 50
%98 = bitcast i8* %97 to i16*
store i16 %90, i16* %98
%99 = and i32 %65, 8
%100 = icmp eq i32 %99, 0
%101 = select i1 %100, i16 546, i16 3906
%102 = getelementptr inbounds i8, i8* %64, i64 60
%103 = bitcast i8* %102 to i16*
store i16 %101, i16* %103
%104 = getelementptr inbounds i8, i8* %64, i64 62
%105 = bitcast i8* %104 to i16*
store i16 %101, i16* %105
%106 = getelementptr inbounds i8, i8* %64, i64 64
%107 = bitcast i8* %106 to i16*
store i16 %101, i16* %107
%108 = getelementptr inbounds i8, i8* %64, i64 66
%109 = bitcast i8* %108 to i16*
store i16 %101, i16* %109
%110 = getelementptr inbounds i8, i8* %64, i64 1264
%111 = bitcast i8* %110 to i16*
store i16 %6, i16* %111
%112 = getelementptr inbounds i8, i8* %64, i64 1266
%113 = bitcast i8* %112 to i16*
store i16 %6, i16* %113
%114 = getelementptr inbounds i8, i8* %64, i64 1268
%115 = bitcast i8* %114 to i16*
store i16 %6, i16* %115
%116 = getelementptr inbounds i8, i8* %64, i64 1270
%117 = bitcast i8* %116 to i16*
store i16 %6, i16* %117
%118 = mul nsw i64 %7, 476
%119 = getelementptr i8, i8* %1, i64 %118
%120 = tail call i32 @gtemu_getxout(%struct.GTPeriph* %0)
%121 = and i32 %120, 1
%122 = icmp eq i32 %121, 0
%123 = select i1 %122, i16 546, i16 3906
%124 = getelementptr inbounds i8, i8* %119, i64 12
%125 = bitcast i8* %124 to i16*
store i16 %123, i16* %125
%126 = getelementptr inbounds i8, i8* %119, i64 14
%127 = bitcast i8* %126 to i16*
store i16 %123, i16* %127
%128 = getelementptr inbounds i8, i8* %119, i64 16
%129 = bitcast i8* %128 to i16*
store i16 %123, i16* %129
%130 = getelementptr inbounds i8, i8* %119, i64 18
%131 = bitcast i8* %130 to i16*
store i16 %123, i16* %131
%132 = and i32 %120, 2
%133 = icmp eq i32 %132, 0
%134 = select i1 %133, i16 546, i16 3906
%135 = getelementptr inbounds i8, i8* %119, i64 28
%136 = bitcast i8* %135 to i16*
store i16 %134, i16* %136
%137 = getelementptr inbounds i8, i8* %119, i64 30
%138 = bitcast i8* %137 to i16*
store i16 %134, i16* %138
%139 = getelementptr inbounds i8, i8* %119, i64 32
%140 = bitcast i8* %139 to i16*
store i16 %134, i16* %140
%141 = getelementptr inbounds i8, i8* %119, i64 34
%142 = bitcast i8* %141 to i16*
store i16 %134, i16* %142
%143 = and i32 %120, 4
%144 = icmp eq i32 %143, 0
%145 = select i1 %144, i16 546, i16 3906
%146 = getelementptr inbounds i8, i8* %119, i64 44
%147 = bitcast i8* %146 to i16*
store i16 %145, i16* %147
%148 = getelementptr inbounds i8, i8* %119, i64 46
%149 = bitcast i8* %148 to i16*
store i16 %145, i16* %149
%150 = getelementptr inbounds i8, i8* %119, i64 48
%151 = bitcast i8* %150 to i16*
store i16 %145, i16* %151
%152 = getelementptr inbounds i8, i8* %119, i64 50
%153 = bitcast i8* %152 to i16*
store i16 %145, i16* %153
%154 = and i32 %120, 8
%155 = icmp eq i32 %154, 0
%156 = select i1 %155, i16 546, i16 3906
%157 = getelementptr inbounds i8, i8* %119, i64 60
%158 = bitcast i8* %157 to i16*
store i16 %156, i16* %158
%159 = getelementptr inbounds i8, i8* %119, i64 62
%160 = bitcast i8* %159 to i16*
store i16 %156, i16* %160
%161 = getelementptr inbounds i8, i8* %119, i64 64
%162 = bitcast i8* %161 to i16*
store i16 %156, i16* %162
%163 = getelementptr inbounds i8, i8* %119, i64 66
%164 = bitcast i8* %163 to i16*
store i16 %156, i16* %164
%165 = getelementptr inbounds i8, i8* %119, i64 1264
%166 = bitcast i8* %165 to i16*
store i16 %6, i16* %166
%167 = getelementptr inbounds i8, i8* %119, i64 1266
%168 = bitcast i8* %167 to i16*
store i16 %6, i16* %168
%169 = getelementptr inbounds i8, i8* %119, i64 1268
%170 = bitcast i8* %169 to i16*
store i16 %6, i16* %170
%171 = getelementptr inbounds i8, i8* %119, i64 1270
%172 = bitcast i8* %171 to i16*
store i16 %6, i16* %172
%173 = mul nsw i64 %7, 477
%174 = getelementptr i8, i8* %1, i64 %173
%175 = tail call i32 @gtemu_getxout(%struct.GTPeriph* %0)
%176 = and i32 %175, 1
%177 = icmp eq i32 %176, 0
%178 = select i1 %177, i16 546, i16 3906
%179 = getelementptr inbounds i8, i8* %174, i64 12
%180 = bitcast i8* %179 to i16*
store i16 %178, i16* %180
%181 = getelementptr inbounds i8, i8* %174, i64 14
%182 = bitcast i8* %181 to i16*
store i16 %178, i16* %182
%183 = getelementptr inbounds i8, i8* %174, i64 16
%184 = bitcast i8* %183 to i16*
store i16 %178, i16* %184
%185 = getelementptr inbounds i8, i8* %174, i64 18
%186 = bitcast i8* %185 to i16*
store i16 %178, i16* %186
%187 = and i32 %175, 2
%188 = icmp eq i32 %187, 0
%189 = select i1 %188, i16 546, i16 3906
%190 = getelementptr inbounds i8, i8* %174, i64 28
%191 = bitcast i8* %190 to i16*
store i16 %189, i16* %191
%192 = getelementptr inbounds i8, i8* %174, i64 30
%193 = bitcast i8* %192 to i16*
store i16 %189, i16* %193
%194 = getelementptr inbounds i8, i8* %174, i64 32
%195 = bitcast i8* %194 to i16*
store i16 %189, i16* %195
%196 = getelementptr inbounds i8, i8* %174, i64 34
%197 = bitcast i8* %196 to i16*
store i16 %189, i16* %197
%198 = and i32 %175, 4
%199 = icmp eq i32 %198, 0
%200 = select i1 %199, i16 546, i16 3906
%201 = getelementptr inbounds i8, i8* %174, i64 44
%202 = bitcast i8* %201 to i16*
store i16 %200, i16* %202
%203 = getelementptr inbounds i8, i8* %174, i64 46
%204 = bitcast i8* %203 to i16*
store i16 %200, i16* %204
%205 = getelementptr inbounds i8, i8* %174, i64 48
%206 = bitcast i8* %205 to i16*
store i16 %200, i16* %206
%207 = getelementptr inbounds i8, i8* %174, i64 50
%208 = bitcast i8* %207 to i16*
store i16 %200, i16* %208
%209 = and i32 %175, 8
%210 = icmp eq i32 %209, 0
%211 = select i1 %210, i16 546, i16 3906
%212 = getelementptr inbounds i8, i8* %174, i64 60
%213 = bitcast i8* %212 to i16*
store i16 %211, i16* %213
%214 = getelementptr inbounds i8, i8* %174, i64 62
%215 = bitcast i8* %214 to i16*
store i16 %211, i16* %215
%216 = getelementptr inbounds i8, i8* %174, i64 64
%217 = bitcast i8* %216 to i16*
store i16 %211, i16* %217
%218 = getelementptr inbounds i8, i8* %174, i64 66
%219 = bitcast i8* %218 to i16*
store i16 %211, i16* %219
%220 = getelementptr inbounds i8, i8* %174, i64 1264
%221 = bitcast i8* %220 to i16*
store i16 %6, i16* %221
%222 = getelementptr inbounds i8, i8* %174, i64 1266
%223 = bitcast i8* %222 to i16*
store i16 %6, i16* %223
%224 = getelementptr inbounds i8, i8* %174, i64 1268
%225 = bitcast i8* %224 to i16*
store i16 %6, i16* %225
%226 = getelementptr inbounds i8, i8* %174, i64 1270
%227 = bitcast i8* %226 to i16*
store i16 %6, i16* %227
ret void
}