#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 uint16_t;
typedef int int16_t;
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_and_si128(int /*<<< orphan*/ const,
                                 int /*<<< orphan*/ const);
int /*<<< orphan*/ _mm_loadu_si128(int /*<<< orphan*/ const *);
int /*<<< orphan*/ _mm_or_si128(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_set1_epi16(int);
int /*<<< orphan*/ const _mm_slli_epi16(int /*<<< orphan*/ const, int);
int /*<<< orphan*/ const _mm_srli_epi16(int /*<<< orphan*/ const, int);
int /*<<< orphan*/ _mm_storeu_si128(int /*<<< orphan*/ *, int /*<<< orphan*/);
void conv_0rgb1555_rgb565(void *output_, const void *input_, int width,
                          int height, int out_stride, int in_stride) {
  int h, w;
  const uint16_t *input = (const uint16_t *)input_;
  uint16_t *output = (uint16_t *)output_;
  int max_width = width - 7;
  const __m128i hi_mask = _mm_set1_epi16((int16_t)((0x1f << 11) | (0x1f << 6)));
  const __m128i lo_mask = _mm_set1_epi16(0x1f);
  const __m128i glow_mask = _mm_set1_epi16(1 << 5);
  for (h = 0; h < height;
       h++, output += out_stride >> 1, input += in_stride >> 1) {
    for (w = 0; w < max_width; w += 8) {
      const __m128i in = _mm_loadu_si128((const __m128i *)(input + w));
      __m128i rg = _mm_and_si128(_mm_slli_epi16(in, 1), hi_mask);
      __m128i b = _mm_and_si128(in, lo_mask);
      __m128i glow = _mm_and_si128(_mm_srli_epi16(in, 4), glow_mask);
      _mm_storeu_si128((__m128i *)(output + w),
                       _mm_or_si128(rg, _mm_or_si128(b, glow)));
    }
    for (; w < width; w++) {
      uint16_t col = input[w];
      uint16_t rg = (col << 1) & ((0x1f << 11) | (0x1f << 6));
      uint16_t b = col & 0x1f;
      uint16_t glow = (col >> 4) & (1 << 5);
      output[w] = rg | b | glow;
    }
  }
}


x86 assembly (clang, -O0):
<conv_0rgb1555_rgb565>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x14(%rbp),%eax
sub    $0x7,%eax
mov    %eax,-0x3c(%rbp)
mov    $0xffc0,%edi
call   1040 <_mm_set1_epi16@plt>
mov    %eax,-0x40(%rbp)
mov    $0x1f,%edi
call   1040 <_mm_set1_epi16@plt>
mov    %eax,-0x44(%rbp)
mov    $0x20,%edi
call   1040 <_mm_set1_epi16@plt>
mov    %eax,-0x48(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    133e <conv_0rgb1555_rgb565+0x1ce>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    1297 <conv_0rgb1555_rgb565+0x127>
mov    -0x30(%rbp),%rdi
movslq -0x28(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
call   1070 <_mm_loadu_si128@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x4c(%rbp),%edi
mov    $0x1,%esi
call   1090 <_mm_slli_epi16@plt>
mov    %eax,%edi
mov    -0x40(%rbp),%esi
call   1080 <_mm_and_si128@plt>
mov    %eax,-0x50(%rbp)
mov    -0x4c(%rbp),%edi
mov    -0x44(%rbp),%esi
call   1080 <_mm_and_si128@plt>
mov    %eax,-0x54(%rbp)
mov    -0x4c(%rbp),%edi
mov    $0x4,%esi
call   1030 <_mm_srli_epi16@plt>
mov    %eax,%edi
mov    -0x48(%rbp),%esi
call   1080 <_mm_and_si128@plt>
mov    %eax,-0x58(%rbp)
mov    -0x38(%rbp),%rax
movslq -0x28(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x70(%rbp)
mov    -0x50(%rbp),%eax
mov    %eax,-0x74(%rbp)
mov    -0x54(%rbp),%edi
mov    -0x58(%rbp),%esi
call   1050 <_mm_or_si128@plt>
mov    -0x74(%rbp),%edi
mov    %eax,%esi
call   1050 <_mm_or_si128@plt>
mov    -0x70(%rbp),%rdi
mov    %eax,%esi
call   1060 <_mm_storeu_si128@plt>
mov    -0x28(%rbp),%eax
add    $0x8,%eax
mov    %eax,-0x28(%rbp)
jmp    11eb <conv_0rgb1555_rgb565+0x7b>
jmp    129c <conv_0rgb1555_rgb565+0x12c>
mov    -0x28(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    12fb <conv_0rgb1555_rgb565+0x18b>
mov    -0x30(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
shl    $0x1,%eax
and    $0xffc0,%eax
mov    %eax,-0x60(%rbp)
mov    -0x5c(%rbp),%eax
and    $0x1f,%eax
mov    %eax,-0x64(%rbp)
mov    -0x5c(%rbp),%eax
sar    $0x4,%eax
and    $0x20,%eax
mov    %eax,-0x68(%rbp)
mov    -0x60(%rbp),%edx
or     -0x64(%rbp),%edx
or     -0x68(%rbp),%edx
mov    -0x38(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    129c <conv_0rgb1555_rgb565+0x12c>
jmp    1300 <conv_0rgb1555_rgb565+0x190>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    -0x1c(%rbp),%ecx
sar    $0x1,%ecx
mov    -0x38(%rbp),%rax
movslq %ecx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
mov    -0x20(%rbp),%ecx
sar    $0x1,%ecx
mov    -0x30(%rbp),%rax
movslq %ecx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
jmp    11d8 <conv_0rgb1555_rgb565+0x68>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<conv_0rgb1555_rgb565>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %r9d,%ebx
mov    %r8d,%r12d
mov    %ecx,%ebp
mov    %edx,%r14d
mov    %rsi,0x38(%rsp)
mov    %rdi,0x30(%rsp)
mov    $0xffc0,%edi
call   1040 <_mm_set1_epi16@plt>
mov    %eax,%r13d
mov    $0x1f,%edi
call   1040 <_mm_set1_epi16@plt>
mov    %eax,0x28(%rsp)
mov    $0x20,%edi
call   1040 <_mm_set1_epi16@plt>
mov    %ebp,0x1c(%rsp)
test   %ebp,%ebp
jle    148d <conv_0rgb1555_rgb565+0x31d>
lea    -0x7(%r14),%r15d
sar    %r12d
movslq %r12d,%rcx
sar    %ebx
movslq %ebx,%rdx
shl    $0x2,%rcx
mov    %rcx,0x48(%rsp)
shl    $0x2,%rdx
mov    %rdx,0x40(%rsp)
mov    0x38(%rsp),%rcx
lea    0x10(%rcx),%r11
xor    %r12d,%r12d
mov    %rcx,%rdi
mov    0x30(%rsp),%r8
mov    %r14,0x50(%rsp)
mov    %r15d,0x24(%rsp)
mov    %eax,0x20(%rsp)
jmp    122f <conv_0rgb1555_rgb565+0xbf>
nopl   0x0(%rax)
add    $0x1,%r12
add    0x48(%rsp),%r8
mov    0x40(%rsp),%rcx
add    %rcx,%rdi
add    %rcx,%r11
cmp    0x1c(%rsp),%r12d
je     148d <conv_0rgb1555_rgb565+0x31d>
mov    %r8,0x8(%rsp)
mov    %rdi,0x10(%rsp)
mov    %r12,0x58(%rsp)
mov    %r11,0x60(%rsp)
mov    $0x0,%ebx
cmp    $0x8,%r14d
mov    %r13d,%ebp
jl     12f7 <conv_0rgb1555_rgb565+0x187>
xor    %ebx,%ebx
mov    0x10(%rsp),%r14
mov    0x8(%rsp),%r12
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1070 <_mm_loadu_si128@plt>
mov    %eax,%r13d
mov    %eax,%edi
mov    $0x1,%esi
call   1090 <_mm_slli_epi16@plt>
mov    %eax,%edi
mov    %ebp,%esi
call   1080 <_mm_and_si128@plt>
mov    %eax,0x2c(%rsp)
mov    %r13d,%edi
mov    0x28(%rsp),%esi
call   1080 <_mm_and_si128@plt>
mov    %ebp,%r15d
mov    %eax,%ebp
mov    %r13d,%edi
mov    $0x4,%esi
call   1030 <_mm_srli_epi16@plt>
mov    %eax,%edi
mov    0x20(%rsp),%esi
call   1080 <_mm_and_si128@plt>
mov    %ebp,%edi
mov    %r15d,%ebp
mov    %eax,%esi
call   1050 <_mm_or_si128@plt>
mov    0x2c(%rsp),%edi
mov    %eax,%esi
call   1050 <_mm_or_si128@plt>
mov    %r12,%rdi
mov    %eax,%esi
call   1060 <_mm_storeu_si128@plt>
mov    0x24(%rsp),%r15d
add    $0x20,%r12
add    $0x20,%r14
add    $0x8,%ebx
cmp    %ebx,%r15d
jg     1270 <conv_0rgb1555_rgb565+0x100>
mov    0x50(%rsp),%r14
cmp    %r14d,%ebx
mov    %ebp,%r13d
mov    0x60(%rsp),%r11
mov    0x58(%rsp),%r12
movdqa 0xcec(%rip),%xmm5
movdqa 0xcf4(%rip),%xmm6
movdqa 0xcfc(%rip),%xmm7
mov    0x10(%rsp),%rdi
mov    0x8(%rsp),%r8
jge    1210 <conv_0rgb1555_rgb565+0xa0>
mov    %ebx,%esi
not    %ebx
add    %r14d,%ebx
cmp    $0x7,%ebx
jae    1350 <conv_0rgb1555_rgb565+0x1e0>
mov    %rsi,%rbp
jmp    1460 <conv_0rgb1555_rgb565+0x2f0>
nopl   0x0(%rax,%rax,1)
mov    0x48(%rsp),%rcx
imul   %r12,%rcx
mov    0x40(%rsp),%rbp
imul   %r12,%rbp
mov    0x30(%rsp),%r9
lea    (%r9,%rcx,1),%rdx
mov    0x38(%rsp),%r10
lea    (%r10,%rbp,1),%rdi
add    $0x4,%rdi
lea    (%rdx,%rsi,4),%r8
lea    (%rbx,%rsi,1),%rdx
lea    (%rdi,%rdx,4),%rdi
cmp    %rdi,%r8
jae    13b9 <conv_0rgb1555_rgb565+0x249>
add    %r10,%rbp
add    %r9,%rcx
add    $0x4,%rcx
lea    (%rcx,%rdx,4),%rcx
lea    0x0(,%rsi,4),%rdx
add    %rbp,%rdx
cmp    %rcx,%rdx
jae    13b9 <conv_0rgb1555_rgb565+0x249>
mov    %rsi,%rbp
mov    0x10(%rsp),%rdi
mov    0x8(%rsp),%r8
jmp    1460 <conv_0rgb1555_rgb565+0x2f0>
add    $0x1,%rbx
mov    %rbx,%rcx
and    $0xfffffffffffffff8,%rcx
lea    (%rcx,%rsi,1),%rbp
mov    0x8(%rsp),%r8
lea    (%r8,%rsi,4),%rdx
lea    (%r11,%rsi,4),%rsi
xor    %edi,%edi
nopw   0x0(%rax,%rax,1)
movdqu -0x10(%rsi,%rdi,4),%xmm0
movdqu (%rsi,%rdi,4),%xmm1
movdqa %xmm0,%xmm2
paddd  %xmm0,%xmm2
movdqa %xmm1,%xmm3
paddd  %xmm1,%xmm3
pand   %xmm5,%xmm2
pand   %xmm5,%xmm3
movdqa %xmm0,%xmm4
pand   %xmm6,%xmm4
por    %xmm2,%xmm4
movdqa %xmm1,%xmm2
pand   %xmm6,%xmm2
por    %xmm3,%xmm2
psrld  $0x4,%xmm0
psrld  $0x4,%xmm1
pand   %xmm7,%xmm0
por    %xmm4,%xmm0
pand   %xmm7,%xmm1
por    %xmm2,%xmm1
movdqu %xmm0,(%rdx,%rdi,4)
movdqu %xmm1,0x10(%rdx,%rdi,4)
add    $0x8,%rdi
cmp    %rdi,%rcx
jne    13e0 <conv_0rgb1555_rgb565+0x270>
cmp    %rcx,%rbx
mov    0x10(%rsp),%rdi
je     1210 <conv_0rgb1555_rgb565+0xa0>
nopw   0x0(%rax,%rax,1)
mov    (%rdi,%rbp,4),%ecx
mov    %ecx,%edx
and    $0x7fe0,%edx
mov    %ecx,%esi
and    $0x1f,%esi
shr    $0x4,%ecx
and    $0x20,%ecx
lea    (%rsi,%rdx,2),%edx
or     %ecx,%edx
mov    %edx,(%r8,%rbp,4)
add    $0x1,%rbp
cmp    %r14d,%ebp
jl     1460 <conv_0rgb1555_rgb565+0x2f0>
jmp    1210 <conv_0rgb1555_rgb565+0xa0>
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @conv_0rgb1555_rgb565(i8* %0, i8* %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32*
%16 = alloca i32*
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32
%28 = alloca i32
store i8* %0, i8** %7
store i8* %1, i8** %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%29 = load i8*, i8** %8
%30 = bitcast i8* %29 to i32*
store i32* %30, i32** %15
%31 = load i8*, i8** %7
%32 = bitcast i8* %31 to i32*
store i32* %32, i32** %16
%33 = load i32, i32* %9
%34 = sub nsw i32 %33, 7
store i32 %34, i32* %17
%35 = call i32 @_mm_set1_epi16(i32 65472)
store i32 %35, i32* %18
%36 = call i32 @_mm_set1_epi16(i32 31)
store i32 %36, i32* %19
%37 = call i32 @_mm_set1_epi16(i32 32)
store i32 %37, i32* %20
store i32 0, i32* %13
br label %38
38: ; preds = %109, %6
%39 = load i32, i32* %13
%40 = load i32, i32* %10
%41 = icmp slt i32 %39, %40
br i1 %41, label %42, label %122
42: ; preds = %38
store i32 0, i32* %14
br label %43
43: ; preds = %74, %42
%44 = load i32, i32* %14
%45 = load i32, i32* %17
%46 = icmp slt i32 %44, %45
br i1 %46, label %47, label %77
47: ; preds = %43
%48 = load i32*, i32** %15
%49 = load i32, i32* %14
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds i32, i32* %48, i64 %50
%52 = call i32 @_mm_loadu_si128(i32* %51)
store i32 %52, i32* %21
%53 = load i32, i32* %21
%54 = call i32 @_mm_slli_epi16(i32 %53, i32 1)
%55 = load i32, i32* %18
%56 = call i32 @_mm_and_si128(i32 %54, i32 %55)
store i32 %56, i32* %22
%57 = load i32, i32* %21
%58 = load i32, i32* %19
%59 = call i32 @_mm_and_si128(i32 %57, i32 %58)
store i32 %59, i32* %23
%60 = load i32, i32* %21
%61 = call i32 @_mm_srli_epi16(i32 %60, i32 4)
%62 = load i32, i32* %20
%63 = call i32 @_mm_and_si128(i32 %61, i32 %62)
store i32 %63, i32* %24
%64 = load i32*, i32** %16
%65 = load i32, i32* %14
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds i32, i32* %64, i64 %66
%68 = load i32, i32* %22
%69 = load i32, i32* %23
%70 = load i32, i32* %24
%71 = call i32 @_mm_or_si128(i32 %69, i32 %70)
%72 = call i32 @_mm_or_si128(i32 %68, i32 %71)
%73 = call i32 @_mm_storeu_si128(i32* %67, i32 %72)
br label %74
74: ; preds = %47
%75 = load i32, i32* %14
%76 = add nsw i32 %75, 8
store i32 %76, i32* %14
br label %43
77: ; preds = %43
br label %78
78: ; preds = %105, %77
%79 = load i32, i32* %14
%80 = load i32, i32* %9
%81 = icmp slt i32 %79, %80
br i1 %81, label %82, label %108
82: ; preds = %78
%83 = load i32*, i32** %15
%84 = load i32, i32* %14
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds i32, i32* %83, i64 %85
%87 = load i32, i32* %86
store i32 %87, i32* %25
%88 = load i32, i32* %25
%89 = shl i32 %88, 1
%90 = and i32 %89, 65472
store i32 %90, i32* %26
%91 = load i32, i32* %25
%92 = and i32 %91, 31
store i32 %92, i32* %27
%93 = load i32, i32* %25
%94 = ashr i32 %93, 4
%95 = and i32 %94, 32
store i32 %95, i32* %28
%96 = load i32, i32* %26
%97 = load i32, i32* %27
%98 = or i32 %96, %97
%99 = load i32, i32* %28
%100 = or i32 %98, %99
%101 = load i32*, i32** %16
%102 = load i32, i32* %14
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds i32, i32* %101, i64 %103
store i32 %100, i32* %104
br label %105
105: ; preds = %82
%106 = load i32, i32* %14
%107 = add nsw i32 %106, 1
store i32 %107, i32* %14
br label %78
108: ; preds = %78
br label %109
109: ; preds = %108
%110 = load i32, i32* %13
%111 = add nsw i32 %110, 1
store i32 %111, i32* %13
%112 = load i32, i32* %11
%113 = ashr i32 %112, 1
%114 = load i32*, i32** %16
%115 = sext i32 %113 to i64
%116 = getelementptr inbounds i32, i32* %114, i64 %115
store i32* %116, i32** %16
%117 = load i32, i32* %12
%118 = ashr i32 %117, 1
%119 = load i32*, i32** %15
%120 = sext i32 %118 to i64
%121 = getelementptr inbounds i32, i32* %119, i64 %120
store i32* %121, i32** %15
br label %38
122: ; preds = %38
ret void
}

LLVM IR (-O2):
define void @conv_0rgb1555_rgb565(i8* %0, i8* %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = add nsw i32 %2, -7
%8 = tail call i32 @_mm_set1_epi16(i32 65472)
%9 = tail call i32 @_mm_set1_epi16(i32 31)
%10 = tail call i32 @_mm_set1_epi16(i32 32)
%11 = icmp sgt i32 %3, 0
br i1 %11, label %12, label %134
12: ; preds = %6
%13 = bitcast i8* %0 to i32*
%14 = bitcast i8* %1 to i32*
%15 = icmp sgt i32 %2, 7
%16 = ashr i32 %4, 1
%17 = sext i32 %16 to i64
%18 = ashr i32 %5, 1
%19 = sext i32 %18 to i64
%20 = shl nsw i64 %17, 2
%21 = shl nsw i64 %19, 2
br label %22
22: ; preds = %12, %128
%23 = phi i64 [ 0, %12 ], [ %133, %128 ]
%24 = phi i32 [ 0, %12 ], [ %129, %128 ]
%25 = phi i32* [ %14, %12 ], [ %131, %128 ]
%26 = phi i32* [ %13, %12 ], [ %130, %128 ]
%27 = mul i64 %20, %23
%28 = getelementptr i8, i8* %0, i64 %27
%29 = add i64 %27, 4
%30 = getelementptr i8, i8* %0, i64 %29
%31 = mul i64 %21, %23
%32 = getelementptr i8, i8* %1, i64 %31
%33 = add i64 %31, 4
%34 = getelementptr i8, i8* %1, i64 %33
br i1 %15, label %97, label %37
35: ; preds = %97
%36 = trunc i64 %110 to i32
br label %37
37: ; preds = %35, %22
%38 = phi i32 [ 0, %22 ], [ %36, %35 ]
%39 = icmp slt i32 %38, %2
br i1 %39, label %40, label %128
40: ; preds = %37
%41 = zext i32 %38 to i64
%42 = xor i32 %38, -1
%43 = add i32 %42, %2
%44 = zext i32 %43 to i64
%45 = add nuw nsw i64 %44, 1
%46 = icmp ult i32 %43, 7
br i1 %46, label %95, label %47
47: ; preds = %40
%48 = shl nuw nsw i64 %41, 2
%49 = getelementptr i8, i8* %28, i64 %48
%50 = xor i32 %38, -1
%51 = add i32 %50, %2
%52 = zext i32 %51 to i64
%53 = add nuw nsw i64 %41, %52
%54 = shl nuw nsw i64 %53, 2
%55 = getelementptr i8, i8* %30, i64 %54
%56 = getelementptr i8, i8* %32, i64 %48
%57 = getelementptr i8, i8* %34, i64 %54
%58 = icmp ult i8* %49, %57
%59 = icmp ult i8* %56, %55
%60 = and i1 %58, %59
br i1 %60, label %95, label %61
61: ; preds = %47
%62 = and i64 %45, 8589934584
%63 = add nuw nsw i64 %62, %41
br label %64
64: ; preds = %64, %61
%65 = phi i64 [ 0, %61 ], [ %91, %64 ]
%66 = add i64 %65, %41
%67 = getelementptr inbounds i32, i32* %25, i64 %66
%68 = bitcast i32* %67 to <4 x i32>*
%69 = load <4 x i32>, <4 x i32>* %68
%70 = getelementptr inbounds i32, i32* %67, i64 4
%71 = bitcast i32* %70 to <4 x i32>*
%72 = load <4 x i32>, <4 x i32>* %71
%73 = shl <4 x i32> %69, <i32 1, i32 1, i32 1, i32 1>
%74 = shl <4 x i32> %72, <i32 1, i32 1, i32 1, i32 1>
%75 = and <4 x i32> %73, <i32 65472, i32 65472, i32 65472, i32 65472>
%76 = and <4 x i32> %74, <i32 65472, i32 65472, i32 65472, i32 65472>
%77 = and <4 x i32> %69, <i32 31, i32 31, i32 31, i32 31>
%78 = and <4 x i32> %72, <i32 31, i32 31, i32 31, i32 31>
%79 = lshr <4 x i32> %69, <i32 4, i32 4, i32 4, i32 4>
%80 = lshr <4 x i32> %72, <i32 4, i32 4, i32 4, i32 4>
%81 = and <4 x i32> %79, <i32 32, i32 32, i32 32, i32 32>
%82 = and <4 x i32> %80, <i32 32, i32 32, i32 32, i32 32>
%83 = or <4 x i32> %75, %77
%84 = or <4 x i32> %76, %78
%85 = or <4 x i32> %83, %81
%86 = or <4 x i32> %84, %82
%87 = getelementptr inbounds i32, i32* %26, i64 %66
%88 = bitcast i32* %87 to <4 x i32>*
store <4 x i32> %85, <4 x i32>* %88
%89 = getelementptr inbounds i32, i32* %87, i64 4
%90 = bitcast i32* %89 to <4 x i32>*
store <4 x i32> %86, <4 x i32>* %90
%91 = add nuw i64 %65, 8
%92 = icmp eq i64 %91, %62
br i1 %92, label %93, label %64
93: ; preds = %64
%94 = icmp eq i64 %45, %62
br i1 %94, label %128, label %95
95: ; preds = %47, %40, %93
%96 = phi i64 [ %41, %47 ], [ %41, %40 ], [ %63, %93 ]
br label %113
97: ; preds = %22, %97
%98 = phi i64 [ %110, %97 ], [ 0, %22 ]
%99 = getelementptr inbounds i32, i32* %25, i64 %98
%100 = tail call i32 @_mm_loadu_si128(i32* %99)
%101 = tail call i32 @_mm_slli_epi16(i32 %100, i32 1)
%102 = tail call i32 @_mm_and_si128(i32 %101, i32 %8)
%103 = tail call i32 @_mm_and_si128(i32 %100, i32 %9)
%104 = tail call i32 @_mm_srli_epi16(i32 %100, i32 4)
%105 = tail call i32 @_mm_and_si128(i32 %104, i32 %10)
%106 = getelementptr inbounds i32, i32* %26, i64 %98
%107 = tail call i32 @_mm_or_si128(i32 %103, i32 %105)
%108 = tail call i32 @_mm_or_si128(i32 %102, i32 %107)
%109 = tail call i32 @_mm_storeu_si128(i32* %106, i32 %108)
%110 = add nuw i64 %98, 8
%111 = trunc i64 %110 to i32
%112 = icmp sgt i32 %7, %111
br i1 %112, label %97, label %35
113: ; preds = %95, %113
%114 = phi i64 [ %125, %113 ], [ %96, %95 ]
%115 = getelementptr inbounds i32, i32* %25, i64 %114
%116 = load i32, i32* %115
%117 = shl i32 %116, 1
%118 = and i32 %117, 65472
%119 = and i32 %116, 31
%120 = lshr i32 %116, 4
%121 = and i32 %120, 32
%122 = or i32 %118, %119
%123 = or i32 %122, %121
%124 = getelementptr inbounds i32, i32* %26, i64 %114
store i32 %123, i32* %124
%125 = add nuw nsw i64 %114, 1
%126 = trunc i64 %125 to i32
%127 = icmp slt i32 %126, %2
br i1 %127, label %113, label %128
128: ; preds = %113, %93, %37
%129 = add nuw nsw i32 %24, 1
%130 = getelementptr inbounds i32, i32* %26, i64 %17
%131 = getelementptr inbounds i32, i32* %25, i64 %19
%132 = icmp eq i32 %129, %3
%133 = add i64 %23, 1
br i1 %132, label %134, label %22
134: ; preds = %128, %6
ret void
}