#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) {
  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 (int h = 0; h < height;
       h++, output += out_stride >> 1, input += in_stride >> 1) {
    int w;
    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,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x14(%rbp),%eax
sub    $0x7,%eax
mov    %eax,-0x34(%rbp)
mov    $0xffc0,%edi
call   1040 <_mm_set1_epi16@plt>
mov    %eax,-0x38(%rbp)
mov    $0x1f,%edi
call   1040 <_mm_set1_epi16@plt>
mov    %eax,-0x3c(%rbp)
mov    $0x20,%edi
call   1040 <_mm_set1_epi16@plt>
mov    %eax,-0x40(%rbp)
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    133e <conv_0rgb1555_rgb565+0x1ce>
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    1297 <conv_0rgb1555_rgb565+0x127>
mov    -0x28(%rbp),%rdi
movslq -0x48(%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    -0x38(%rbp),%esi
call   1080 <_mm_and_si128@plt>
mov    %eax,-0x50(%rbp)
mov    -0x4c(%rbp),%edi
mov    -0x3c(%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    -0x40(%rbp),%esi
call   1080 <_mm_and_si128@plt>
mov    %eax,-0x58(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x48(%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    -0x48(%rbp),%eax
add    $0x8,%eax
mov    %eax,-0x48(%rbp)
jmp    11eb <conv_0rgb1555_rgb565+0x7b>
jmp    129c <conv_0rgb1555_rgb565+0x12c>
mov    -0x48(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    12fb <conv_0rgb1555_rgb565+0x18b>
mov    -0x28(%rbp),%rax
movslq -0x48(%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    -0x30(%rbp),%rax
movslq -0x48(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    129c <conv_0rgb1555_rgb565+0x12c>
jmp    1300 <conv_0rgb1555_rgb565+0x190>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
mov    -0x1c(%rbp),%ecx
sar    $0x1,%ecx
mov    -0x30(%rbp),%rax
movslq %ecx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%ecx
sar    $0x1,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%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** %13
%31 = load i8*, i8** %7
%32 = bitcast i8* %31 to i32*
store i32* %32, i32** %14
%33 = load i32, i32* %9
%34 = sub nsw i32 %33, 7
store i32 %34, i32* %15
%35 = call i32 @_mm_set1_epi16(i32 65472)
store i32 %35, i32* %16
%36 = call i32 @_mm_set1_epi16(i32 31)
store i32 %36, i32* %17
%37 = call i32 @_mm_set1_epi16(i32 32)
store i32 %37, i32* %18
store i32 0, i32* %19
br label %38
38: ; preds = %109, %6
%39 = load i32, i32* %19
%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* %20
br label %43
43: ; preds = %74, %42
%44 = load i32, i32* %20
%45 = load i32, i32* %15
%46 = icmp slt i32 %44, %45
br i1 %46, label %47, label %77
47: ; preds = %43
%48 = load i32*, i32** %13
%49 = load i32, i32* %20
%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* %16
%56 = call i32 @_mm_and_si128(i32 %54, i32 %55)
store i32 %56, i32* %22
%57 = load i32, i32* %21
%58 = load i32, i32* %17
%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* %18
%63 = call i32 @_mm_and_si128(i32 %61, i32 %62)
store i32 %63, i32* %24
%64 = load i32*, i32** %14
%65 = load i32, i32* %20
%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* %20
%76 = add nsw i32 %75, 8
store i32 %76, i32* %20
br label %43
77: ; preds = %43
br label %78
78: ; preds = %105, %77
%79 = load i32, i32* %20
%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** %13
%84 = load i32, i32* %20
%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** %14
%102 = load i32, i32* %20
%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* %20
%107 = add nsw i32 %106, 1
store i32 %107, i32* %20
br label %78
108: ; preds = %78
br label %109
109: ; preds = %108
%110 = load i32, i32* %19
%111 = add nsw i32 %110, 1
store i32 %111, i32* %19
%112 = load i32, i32* %11
%113 = ashr i32 %112, 1
%114 = load i32*, i32** %14
%115 = sext i32 %113 to i64
%116 = getelementptr inbounds i32, i32* %114, i64 %115
store i32* %116, i32** %14
%117 = load i32, i32* %12
%118 = ashr i32 %117, 1
%119 = load i32*, i32** %13
%120 = sext i32 %118 to i64
%121 = getelementptr inbounds i32, i32* %119, i64 %120
store i32* %121, i32** %13
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 %35
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, %129
%23 = phi i64 [ 0, %12 ], [ %134, %129 ]
%24 = phi i32* [ %14, %12 ], [ %132, %129 ]
%25 = phi i32* [ %13, %12 ], [ %131, %129 ]
%26 = phi i32 [ 0, %12 ], [ %130, %129 ]
%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 %98, label %38
35: ; preds = %129, %6
ret void
36: ; preds = %98
%37 = trunc i64 %111 to i32
br label %38
38: ; preds = %36, %22
%39 = phi i32 [ 0, %22 ], [ %37, %36 ]
%40 = icmp slt i32 %39, %2
br i1 %40, label %41, label %129
41: ; preds = %38
%42 = zext i32 %39 to i64
%43 = xor i32 %39, -1
%44 = add i32 %43, %2
%45 = zext i32 %44 to i64
%46 = add nuw nsw i64 %45, 1
%47 = icmp ult i32 %44, 7
br i1 %47, label %96, label %48
48: ; preds = %41
%49 = shl nuw nsw i64 %42, 2
%50 = getelementptr i8, i8* %28, i64 %49
%51 = xor i32 %39, -1
%52 = add i32 %51, %2
%53 = zext i32 %52 to i64
%54 = add nuw nsw i64 %42, %53
%55 = shl nuw nsw i64 %54, 2
%56 = getelementptr i8, i8* %30, i64 %55
%57 = getelementptr i8, i8* %32, i64 %49
%58 = getelementptr i8, i8* %34, i64 %55
%59 = icmp ult i8* %50, %58
%60 = icmp ult i8* %57, %56
%61 = and i1 %59, %60
br i1 %61, label %96, label %62
62: ; preds = %48
%63 = and i64 %46, 8589934584
%64 = add nuw nsw i64 %63, %42
br label %65
65: ; preds = %65, %62
%66 = phi i64 [ 0, %62 ], [ %92, %65 ]
%67 = add i64 %66, %42
%68 = getelementptr inbounds i32, i32* %24, i64 %67
%69 = bitcast i32* %68 to <4 x i32>*
%70 = load <4 x i32>, <4 x i32>* %69
%71 = getelementptr inbounds i32, i32* %68, i64 4
%72 = bitcast i32* %71 to <4 x i32>*
%73 = load <4 x i32>, <4 x i32>* %72
%74 = shl <4 x i32> %70, <i32 1, i32 1, i32 1, i32 1>
%75 = shl <4 x i32> %73, <i32 1, i32 1, i32 1, i32 1>
%76 = and <4 x i32> %74, <i32 65472, i32 65472, i32 65472, i32 65472>
%77 = and <4 x i32> %75, <i32 65472, i32 65472, i32 65472, i32 65472>
%78 = and <4 x i32> %70, <i32 31, i32 31, i32 31, i32 31>
%79 = and <4 x i32> %73, <i32 31, i32 31, i32 31, i32 31>
%80 = lshr <4 x i32> %70, <i32 4, i32 4, i32 4, i32 4>
%81 = lshr <4 x i32> %73, <i32 4, i32 4, i32 4, i32 4>
%82 = and <4 x i32> %80, <i32 32, i32 32, i32 32, i32 32>
%83 = and <4 x i32> %81, <i32 32, i32 32, i32 32, i32 32>
%84 = or <4 x i32> %76, %78
%85 = or <4 x i32> %77, %79
%86 = or <4 x i32> %84, %82
%87 = or <4 x i32> %85, %83
%88 = getelementptr inbounds i32, i32* %25, i64 %67
%89 = bitcast i32* %88 to <4 x i32>*
store <4 x i32> %86, <4 x i32>* %89
%90 = getelementptr inbounds i32, i32* %88, i64 4
%91 = bitcast i32* %90 to <4 x i32>*
store <4 x i32> %87, <4 x i32>* %91
%92 = add nuw i64 %66, 8
%93 = icmp eq i64 %92, %63
br i1 %93, label %94, label %65
94: ; preds = %65
%95 = icmp eq i64 %46, %63
br i1 %95, label %129, label %96
96: ; preds = %48, %41, %94
%97 = phi i64 [ %42, %48 ], [ %42, %41 ], [ %64, %94 ]
br label %114
98: ; preds = %22, %98
%99 = phi i64 [ %111, %98 ], [ 0, %22 ]
%100 = getelementptr inbounds i32, i32* %24, i64 %99
%101 = tail call i32 @_mm_loadu_si128(i32* %100)
%102 = tail call i32 @_mm_slli_epi16(i32 %101, i32 1)
%103 = tail call i32 @_mm_and_si128(i32 %102, i32 %8)
%104 = tail call i32 @_mm_and_si128(i32 %101, i32 %9)
%105 = tail call i32 @_mm_srli_epi16(i32 %101, i32 4)
%106 = tail call i32 @_mm_and_si128(i32 %105, i32 %10)
%107 = getelementptr inbounds i32, i32* %25, i64 %99
%108 = tail call i32 @_mm_or_si128(i32 %104, i32 %106)
%109 = tail call i32 @_mm_or_si128(i32 %103, i32 %108)
%110 = tail call i32 @_mm_storeu_si128(i32* %107, i32 %109)
%111 = add nuw i64 %99, 8
%112 = trunc i64 %111 to i32
%113 = icmp sgt i32 %7, %112
br i1 %113, label %98, label %36
114: ; preds = %96, %114
%115 = phi i64 [ %126, %114 ], [ %97, %96 ]
%116 = getelementptr inbounds i32, i32* %24, i64 %115
%117 = load i32, i32* %116
%118 = shl i32 %117, 1
%119 = and i32 %118, 65472
%120 = and i32 %117, 31
%121 = lshr i32 %117, 4
%122 = and i32 %121, 32
%123 = or i32 %119, %120
%124 = or i32 %123, %122
%125 = getelementptr inbounds i32, i32* %25, i64 %115
store i32 %124, i32* %125
%126 = add nuw nsw i64 %115, 1
%127 = trunc i64 %126 to i32
%128 = icmp slt i32 %127, %2
br i1 %128, label %114, label %129
129: ; preds = %114, %94, %38
%130 = add nuw nsw i32 %26, 1
%131 = getelementptr inbounds i32, i32* %25, i64 %17
%132 = getelementptr inbounds i32, i32* %24, i64 %19
%133 = icmp eq i32 %130, %3
%134 = add i64 %23, 1
br i1 %133, label %35, label %22
}