#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 */
typedef int uint8_t;
typedef int uint32_t;
typedef int ui32Byte;
typedef int int32_t;

/* Variables and functions */
int /*<<< orphan*/ WriteCommand(int);
int /*<<< orphan*/ WriteData(int);
void Kentec320x240x16_SSD2119PixelDrawMultiple(void *pvDisplayData,
                                               int32_t i32X, int32_t i32Y,
                                               int32_t i32X0, int32_t i32Count,
                                               int32_t i32BPP,
                                               const uint8_t *pui8Data,
                                               const uint8_t *pui8Palette) {
  uint32_t ui32Byte;
  WriteCommand(0x11);
  WriteData(((0x6830 & 0xff00) | (0x30)));
  WriteCommand(0x4e);
  WriteData((i32X));
  WriteCommand(0x4f);
  WriteData((i32Y));
  WriteCommand(0x22);
  switch (i32BPP & ~0x40000000) {
  case 1: {
    while (i32Count) {
      ui32Byte = *pui8Data++;
      for (; (i32X0 < 8) && i32Count; i32X0++, i32Count--) {
        WriteData(((uint32_t *)pui8Palette)[(ui32Byte >> (7 - i32X0)) & 1]);
      }
      i32X0 = 0;
    }
    break;
  }
  case 4: {
    switch (i32X0 & 1) {
    case 0:
      while (i32Count) {
        ui32Byte = (*pui8Data >> 4) * 3;
        ui32Byte = (*(uint32_t *)(pui8Palette + ui32Byte) & 0x00ffffff);
        WriteData(((((ui32Byte)&0x00f80000) >> 8) |
                   (((ui32Byte)&0x0000fc00) >> 5) |
                   (((ui32Byte)&0x000000f8) >> 3)));
        i32Count--;
        if (i32Count) {
        case 1:
          ui32Byte = (*pui8Data++ & 15) * 3;
          ui32Byte = (*(uint32_t *)(pui8Palette + ui32Byte) & 0x00ffffff);
          WriteData(((((ui32Byte)&0x00f80000) >> 8) |
                     (((ui32Byte)&0x0000fc00) >> 5) |
                     (((ui32Byte)&0x000000f8) >> 3)));
          i32Count--;
        }
      }
    }
    break;
  }
  case 8: {
    while (i32Count--) {
      ui32Byte = *pui8Data++ * 3;
      ui32Byte = *(uint32_t *)(pui8Palette + ui32Byte) & 0x00ffffff;
      WriteData(((((ui32Byte)&0x00f80000) >> 8) |
                 (((ui32Byte)&0x0000fc00) >> 5) |
                 (((ui32Byte)&0x000000f8) >> 3)));
    }
    break;
  }
  }
}


x86 assembly (clang, -O0):
<Kentec320x240x16_SSD2119PixelDrawMultiple>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9d,-0x1c(%rbp)
mov    $0x11,%edi
call   1040 <WriteCommand@plt>
mov    $0x6830,%edi
call   1030 <WriteData@plt>
mov    $0x4e,%edi
call   1040 <WriteCommand@plt>
mov    -0xc(%rbp),%edi
call   1030 <WriteData@plt>
mov    $0x4f,%edi
call   1040 <WriteCommand@plt>
mov    -0x10(%rbp),%edi
call   1030 <WriteData@plt>
mov    $0x22,%edi
call   1040 <WriteCommand@plt>
mov    -0x1c(%rbp),%eax
and    $0xbfffffff,%eax
mov    %eax,-0x24(%rbp)
sub    $0x1,%eax
je     11c2 <Kentec320x240x16_SSD2119PixelDrawMultiple+0xa2>
jmp    11a0 <Kentec320x240x16_SSD2119PixelDrawMultiple+0x80>
mov    -0x24(%rbp),%eax
sub    $0x4,%eax
je     1257 <Kentec320x240x16_SSD2119PixelDrawMultiple+0x137>
jmp    11b1 <Kentec320x240x16_SSD2119PixelDrawMultiple+0x91>
mov    -0x24(%rbp),%eax
sub    $0x8,%eax
je     1360 <Kentec320x240x16_SSD2119PixelDrawMultiple+0x240>
jmp    13d6 <Kentec320x240x16_SSD2119PixelDrawMultiple+0x2b6>
jmp    11c7 <Kentec320x240x16_SSD2119PixelDrawMultiple+0xa7>
cmpl   $0x0,-0x18(%rbp)
je     1252 <Kentec320x240x16_SSD2119PixelDrawMultiple+0x132>
mov    0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,0x10(%rbp)
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
xor    %eax,%eax
cmpl   $0x8,-0x14(%rbp)
mov    %al,-0x25(%rbp)
jge    11fe <Kentec320x240x16_SSD2119PixelDrawMultiple+0xde>
cmpl   $0x0,-0x18(%rbp)
setne  %al
mov    %al,-0x25(%rbp)
mov    -0x25(%rbp),%al
test   $0x1,%al
jne    120e <Kentec320x240x16_SSD2119PixelDrawMultiple+0xee>
jmp    1246 <Kentec320x240x16_SSD2119PixelDrawMultiple+0x126>
mov    0x18(%rbp),%rax
mov    -0x20(%rbp),%edx
mov    $0x7,%ecx
sub    -0x14(%rbp),%ecx
sar    %cl,%edx
mov    %edx,%ecx
and    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <WriteData@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
jmp    11e5 <Kentec320x240x16_SSD2119PixelDrawMultiple+0xc5>
movl   $0x0,-0x14(%rbp)
jmp    11c7 <Kentec320x240x16_SSD2119PixelDrawMultiple+0xa7>
jmp    13d6 <Kentec320x240x16_SSD2119PixelDrawMultiple+0x2b6>
mov    -0x14(%rbp),%eax
and    $0x1,%eax
mov    %eax,-0x2c(%rbp)
je     127c <Kentec320x240x16_SSD2119PixelDrawMultiple+0x15c>
jmp    126b <Kentec320x240x16_SSD2119PixelDrawMultiple+0x14b>
mov    -0x2c(%rbp),%eax
sub    $0x1,%eax
je     12f0 <Kentec320x240x16_SSD2119PixelDrawMultiple+0x1d0>
jmp    135b <Kentec320x240x16_SSD2119PixelDrawMultiple+0x23b>
jmp    1281 <Kentec320x240x16_SSD2119PixelDrawMultiple+0x161>
cmpl   $0x0,-0x18(%rbp)
je     1356 <Kentec320x240x16_SSD2119PixelDrawMultiple+0x236>
mov    0x10(%rbp),%rax
mov    (%rax),%eax
sar    $0x4,%eax
imul   $0x3,%eax,%eax
mov    %eax,-0x20(%rbp)
mov    0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
and    $0xffffff,%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%edi
and    $0xf80000,%edi
sar    $0x8,%edi
mov    -0x20(%rbp),%eax
and    $0xfc00,%eax
sar    $0x5,%eax
or     %eax,%edi
mov    -0x20(%rbp),%eax
and    $0xf8,%eax
sar    $0x3,%eax
or     %eax,%edi
call   1030 <WriteData@plt>
mov    -0x18(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
je     1351 <Kentec320x240x16_SSD2119PixelDrawMultiple+0x231>
jmp    12f0 <Kentec320x240x16_SSD2119PixelDrawMultiple+0x1d0>
mov    0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,0x10(%rbp)
mov    (%rax),%eax
and    $0xf,%eax
imul   $0x3,%eax,%eax
mov    %eax,-0x20(%rbp)
mov    0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
and    $0xffffff,%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%edi
and    $0xf80000,%edi
sar    $0x8,%edi
mov    -0x20(%rbp),%eax
and    $0xfc00,%eax
sar    $0x5,%eax
or     %eax,%edi
mov    -0x20(%rbp),%eax
and    $0xf8,%eax
sar    $0x3,%eax
or     %eax,%edi
call   1030 <WriteData@plt>
mov    -0x18(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
jmp    1281 <Kentec320x240x16_SSD2119PixelDrawMultiple+0x161>
jmp    135b <Kentec320x240x16_SSD2119PixelDrawMultiple+0x23b>
jmp    13d6 <Kentec320x240x16_SSD2119PixelDrawMultiple+0x2b6>
jmp    1365 <Kentec320x240x16_SSD2119PixelDrawMultiple+0x245>
mov    -0x18(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x18(%rbp)
cmp    $0x0,%eax
je     13d1 <Kentec320x240x16_SSD2119PixelDrawMultiple+0x2b1>
mov    0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,0x10(%rbp)
imul   $0x3,(%rax),%eax
mov    %eax,-0x20(%rbp)
mov    0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
and    $0xffffff,%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%edi
and    $0xf80000,%edi
sar    $0x8,%edi
mov    -0x20(%rbp),%eax
and    $0xfc00,%eax
sar    $0x5,%eax
or     %eax,%edi
mov    -0x20(%rbp),%eax
and    $0xf8,%eax
sar    $0x3,%eax
or     %eax,%edi
call   1030 <WriteData@plt>
jmp    1365 <Kentec320x240x16_SSD2119PixelDrawMultiple+0x245>
jmp    13d6 <Kentec320x240x16_SSD2119PixelDrawMultiple+0x2b6>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Kentec320x240x16_SSD2119PixelDrawMultiple>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9d,%r14d
mov    %r8d,%r15d
mov    %ecx,%ebp
mov    %edx,(%rsp)
mov    %esi,%ebx
mov    0x48(%rsp),%r13
mov    0x40(%rsp),%r12
mov    $0x11,%edi
call   1040 <WriteCommand@plt>
mov    $0x6830,%edi
call   1030 <WriteData@plt>
mov    $0x4e,%edi
call   1040 <WriteCommand@plt>
mov    %ebx,%edi
call   1030 <WriteData@plt>
mov    $0x4f,%edi
call   1040 <WriteCommand@plt>
mov    (%rsp),%edi
call   1030 <WriteData@plt>
mov    $0x22,%edi
call   1040 <WriteCommand@plt>
and    $0xbfffffff,%r14d
cmp    $0x1,%r14d
je     11eb <Kentec320x240x16_SSD2119PixelDrawMultiple+0xcb>
cmp    $0x4,%r14d
je     1265 <Kentec320x240x16_SSD2119PixelDrawMultiple+0x145>
cmp    $0x8,%r14d
jne    11f0 <Kentec320x240x16_SSD2119PixelDrawMultiple+0xd0>
test   %r15d,%r15d
je     11f0 <Kentec320x240x16_SSD2119PixelDrawMultiple+0xd0>
mov    %r15d,%ebx
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
movslq (%r12,%rbp,4),%rax
lea    (%rax,%rax,2),%rax
mov    0x0(%r13,%rax,4),%edi
mov    %edi,%eax
shr    $0x8,%eax
and    $0xf800,%eax
mov    %edi,%ecx
shr    $0x5,%ecx
and    $0x7e0,%ecx
or     %eax,%ecx
shr    $0x3,%edi
and    $0x1f,%edi
or     %ecx,%edi
call   1030 <WriteData@plt>
add    $0x1,%rbp
cmp    %ebp,%ebx
jne    11b0 <Kentec320x240x16_SSD2119PixelDrawMultiple+0x90>
jmp    11f0 <Kentec320x240x16_SSD2119PixelDrawMultiple+0xd0>
test   %r15d,%r15d
jne    1210 <Kentec320x240x16_SSD2119PixelDrawMultiple+0xf0>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
nop
mov    %r15d,%eax
xor    %ebp,%ebp
mov    %eax,%r15d
test   %eax,%eax
mov    (%rsp),%r12
je     11f0 <Kentec320x240x16_SSD2119PixelDrawMultiple+0xd0>
mov    (%r12),%r14d
add    $0x4,%r12
mov    %r12,(%rsp)
cmp    $0x7,%ebp
jg     1200 <Kentec320x240x16_SSD2119PixelDrawMultiple+0xe0>
mov    $0x7,%ebx
sub    %ebp,%ebx
nopl   0x0(%rax,%rax,1)
mov    %r14,%rax
mov    %ebx,%ecx
shr    %cl,%rax
mov    %ebp,%r12d
and    $0x1,%eax
mov    0x0(%r13,%rax,4),%edi
call   1030 <WriteData@plt>
lea    0x1(%r12),%ebp
lea    -0x1(%r15),%eax
add    $0xffffffff,%ebx
cmp    $0x6,%r12d
jg     1203 <Kentec320x240x16_SSD2119PixelDrawMultiple+0xe3>
cmp    $0x1,%r15d
mov    %eax,%r15d
jne    1230 <Kentec320x240x16_SSD2119PixelDrawMultiple+0x110>
jmp    1203 <Kentec320x240x16_SSD2119PixelDrawMultiple+0xe3>
test   $0x1,%bpl
jne    12bb <Kentec320x240x16_SSD2119PixelDrawMultiple+0x19b>
mov    %r15d,%ebx
xchg   %ax,%ax
test   %ebx,%ebx
je     11f0 <Kentec320x240x16_SSD2119PixelDrawMultiple+0xd0>
mov    (%r12),%eax
sar    $0x4,%eax
lea    (%rax,%rax,2),%eax
cltq
mov    0x0(%r13,%rax,4),%edi
mov    %edi,%eax
shr    $0x8,%eax
and    $0xf800,%eax
mov    %edi,%ecx
shr    $0x5,%ecx
and    $0x7e0,%ecx
or     %eax,%ecx
shr    $0x3,%edi
and    $0x1f,%edi
or     %ecx,%edi
call   1030 <WriteData@plt>
mov    %ebx,%r15d
mov    $0x0,%ebx
add    $0xffffffff,%r15d
je     1270 <Kentec320x240x16_SSD2119PixelDrawMultiple+0x150>
mov    (%r12),%eax
add    $0x4,%r12
and    $0xf,%eax
lea    (%rax,%rax,2),%rax
mov    0x0(%r13,%rax,4),%edi
mov    %edi,%eax
shr    $0x8,%eax
and    $0xf800,%eax
mov    %edi,%ecx
shr    $0x5,%ecx
and    $0x7e0,%ecx
or     %eax,%ecx
shr    $0x3,%edi
and    $0x1f,%edi
or     %ecx,%edi
call   1030 <WriteData@plt>
add    $0xffffffff,%r15d
jmp    126b <Kentec320x240x16_SSD2119PixelDrawMultiple+0x14b>

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

LLVM IR (-O2):
define void @Kentec320x240x16_SSD2119PixelDrawMultiple(i8* nocapture readnone %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32* nocapture %6, i32* nocapture %7) {
%9 = tail call i32 @WriteCommand(i32 17)
%10 = tail call i32 @WriteData(i32 26672)
%11 = tail call i32 @WriteCommand(i32 78)
%12 = tail call i32 @WriteData(i32 %1)
%13 = tail call i32 @WriteCommand(i32 79)
%14 = tail call i32 @WriteData(i32 %2)
%15 = tail call i32 @WriteCommand(i32 34)
%16 = and i32 %5, -1073741825
switch i32 %16, label %113 [
i32 1, label %19
i32 4, label %46
i32 8, label %17
]
17: ; preds = %8
%18 = icmp eq i32 %4, 0
br i1 %18, label %113, label %93
19: ; preds = %8
%20 = icmp eq i32 %4, 0
br i1 %20, label %113, label %24
21: ; preds = %31, %24
%22 = phi i32 [ %27, %24 ], [ %42, %31 ]
%23 = icmp eq i32 %22, 0
br i1 %23, label %113, label %24
24: ; preds = %19, %21
%25 = phi i32 [ 0, %21 ], [ %3, %19 ]
%26 = phi i32* [ %28, %21 ], [ %6, %19 ]
%27 = phi i32 [ %22, %21 ], [ %4, %19 ]
%28 = getelementptr inbounds i32, i32* %26, i64 1
%29 = load i32, i32* %26
%30 = icmp slt i32 %25, 8
br i1 %30, label %31, label %21
31: ; preds = %24, %31
%32 = phi i32 [ %41, %31 ], [ %25, %24 ]
%33 = phi i32 [ %42, %31 ], [ %27, %24 ]
%34 = sub nsw i32 7, %32
%35 = lshr i32 %29, %34
%36 = and i32 %35, 1
%37 = zext i32 %36 to i64
%38 = getelementptr inbounds i32, i32* %7, i64 %37
%39 = load i32, i32* %38
%40 = tail call i32 @WriteData(i32 %39)
%41 = add nsw i32 %32, 1
%42 = add nsw i32 %33, -1
%43 = icmp slt i32 %32, 7
%44 = icmp ne i32 %42, 0
%45 = select i1 %43, i1 %44, i1 false
br i1 %45, label %31, label %21
46: ; preds = %8
%47 = and i32 %3, 1
%48 = icmp eq i32 %47, 0
br i1 %48, label %49, label %73
49: ; preds = %46, %73
%50 = phi i32 [ %92, %73 ], [ %4, %46 ]
%51 = phi i32* [ %76, %73 ], [ %6, %46 ]
br label %52
52: ; preds = %49, %55
%53 = phi i32 [ 0, %55 ], [ %50, %49 ]
%54 = icmp eq i32 %53, 0
br i1 %54, label %113, label %55
55: ; preds = %52
%56 = load i32, i32* %51
%57 = ashr i32 %56, 4
%58 = mul nsw i32 %57, 3
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds i32, i32* %7, i64 %59
%61 = load i32, i32* %60
%62 = lshr i32 %61, 8
%63 = and i32 %62, 63488
%64 = lshr i32 %61, 5
%65 = and i32 %64, 2016
%66 = or i32 %63, %65
%67 = lshr i32 %61, 3
%68 = and i32 %67, 31
%69 = or i32 %66, %68
%70 = tail call i32 @WriteData(i32 %69)
%71 = add nsw i32 %53, -1
%72 = icmp eq i32 %71, 0
br i1 %72, label %52, label %73
73: ; preds = %55, %46
%74 = phi i32 [ %4, %46 ], [ %71, %55 ]
%75 = phi i32* [ %6, %46 ], [ %51, %55 ]
%76 = getelementptr inbounds i32, i32* %75, i64 1
%77 = load i32, i32* %75
%78 = and i32 %77, 15
%79 = mul nuw nsw i32 %78, 3
%80 = zext i32 %79 to i64
%81 = getelementptr inbounds i32, i32* %7, i64 %80
%82 = load i32, i32* %81
%83 = lshr i32 %82, 8
%84 = and i32 %83, 63488
%85 = lshr i32 %82, 5
%86 = and i32 %85, 2016
%87 = or i32 %84, %86
%88 = lshr i32 %82, 3
%89 = and i32 %88, 31
%90 = or i32 %87, %89
%91 = tail call i32 @WriteData(i32 %90)
%92 = add nsw i32 %74, -1
br label %49
93: ; preds = %17, %93
%94 = phi i32* [ %97, %93 ], [ %6, %17 ]
%95 = phi i32 [ %96, %93 ], [ %4, %17 ]
%96 = add nsw i32 %95, -1
%97 = getelementptr inbounds i32, i32* %94, i64 1
%98 = load i32, i32* %94
%99 = mul nsw i32 %98, 3
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds i32, i32* %7, i64 %100
%102 = load i32, i32* %101
%103 = lshr i32 %102, 8
%104 = and i32 %103, 63488
%105 = lshr i32 %102, 5
%106 = and i32 %105, 2016
%107 = or i32 %104, %106
%108 = lshr i32 %102, 3
%109 = and i32 %108, 31
%110 = or i32 %107, %109
%111 = tail call i32 @WriteData(i32 %110)
%112 = icmp eq i32 %96, 0
br i1 %112, label %113, label %93
113: ; preds = %93, %52, %21, %17, %19, %8
ret void
}