unsigned char *decode_byte(unsigned char *dest, unsigned char *b, int w) {
  int i, j;
  unsigned char byte, bit;
  for (i = 7; w > 0; --i, --w) {
    byte = 0;
    for (j = 0; j < 4; ++j) {
      bit = b[j];
      bit &= (1 << i);
      bit >>= i;
      bit <<= 3 - j;
      byte |= bit;
    }
    *(dest++) = byte;
  }
  return dest;
}


x86 assembly (clang, -O0):
<decode_byte>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x7,-0x18(%rbp)
cmpl   $0x0,-0x14(%rbp)
jle    11bb <decode_byte+0xbb>
movb   $0x0,-0x1d(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x4,-0x1c(%rbp)
jge    1190 <decode_byte+0x90>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x1e(%rbp)
mov    -0x18(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,%ecx
movzbl -0x1e(%rbp),%eax
and    %ecx,%eax
mov    %al,-0x1e(%rbp)
mov    -0x18(%rbp),%ecx
movzbl -0x1e(%rbp),%eax
sar    %cl,%eax
mov    %al,-0x1e(%rbp)
mov    $0x3,%ecx
sub    -0x1c(%rbp),%ecx
movzbl -0x1e(%rbp),%eax
shl    %cl,%eax
mov    %al,-0x1e(%rbp)
movzbl -0x1e(%rbp),%ecx
movzbl -0x1d(%rbp),%eax
or     %ecx,%eax
mov    %al,-0x1d(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    112b <decode_byte+0x2b>
mov    -0x1d(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x18(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    1116 <decode_byte+0x16>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<decode_byte>:
sub    $0x108,%rsp
test   %edx,%edx
jle    11bd <decode_byte+0xbd>
lea    -0x1(%rdx),%r8d
mov    $0x7,%ecx
cmp    $0xf,%r8d
jb     113c <decode_byte+0x3c>
lea    0x4(%rsi),%rax
cmp    %rdi,%rax
jbe    11c8 <decode_byte+0xc8>
lea    (%r8,%rdi,1),%rax
add    $0x1,%rax
cmp    %rsi,%rax
jbe    11c8 <decode_byte+0xc8>
mov    %rdi,%rax
add    $0x1,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x1,%r10d
shl    %cl,%r10d
movzbl (%rsi),%r8d
and    %r10b,%r8b
movzbl %r8b,%r8d
shr    %cl,%r8d
movzbl 0x1(%rsi),%r9d
and    %r10b,%r9b
movzbl %r9b,%r11d
shr    %cl,%r11d
shl    $0x3,%r8b
movzbl 0x2(%rsi),%r9d
and    %r10b,%r9b
movzbl %r9b,%r9d
shr    %cl,%r9d
shl    $0x2,%r11b
or     %r8b,%r11b
and    0x3(%rsi),%r10b
movzbl %r10b,%edi
shr    %cl,%edi
add    %r9b,%r9b
or     %r9b,%dil
or     %r11b,%dil
mov    %dil,(%rax)
add    $0x1,%rax
add    $0xffffffff,%ecx
add    $0xffffffff,%edx
cmp    $0x1,%edx
ja     1150 <decode_byte+0x50>
add    $0x108,%rsp
ret
mov    %rdi,%rax
add    $0x108,%rsp
ret
add    $0x1,%r8
mov    %r8,%r9
and    $0xfffffffffffffff0,%r9
lea    (%rdi,%r9,1),%rax
mov    $0x7,%ecx
sub    %r9d,%ecx
sub    %r9d,%edx
movzbl (%rsi),%r10d
movd   %r10d,%xmm0
punpcklbw %xmm0,%xmm0
pshuflw $0x0,%xmm0,%xmm0
pshufd $0x0,%xmm0,%xmm0
movdqa %xmm0,0xc0(%rsp)
movzbl 0x1(%rsi),%r10d
movd   %r10d,%xmm0
punpcklbw %xmm0,%xmm0
pshuflw $0x0,%xmm0,%xmm0
pshufd $0x0,%xmm0,%xmm0
movdqa %xmm0,0xb0(%rsp)
movzbl 0x2(%rsi),%r10d
movd   %r10d,%xmm0
punpcklbw %xmm0,%xmm0
pshuflw $0x0,%xmm0,%xmm0
pshufd $0x0,%xmm0,%xmm0
movdqa %xmm0,0xa0(%rsp)
movzbl 0x3(%rsi),%r10d
movd   %r10d,%xmm0
punpcklbw %xmm0,%xmm0
pshuflw $0x0,%xmm0,%xmm0
pshufd $0x0,%xmm0,%xmm0
movdqa %xmm0,0x90(%rsp)
movaps 0xd94(%rip),%xmm0
movdqa 0xd9c(%rip),%xmm2
movdqa 0xda4(%rip),%xmm4
movdqa 0xdac(%rip),%xmm7
xor    %r10d,%r10d
pxor   %xmm8,%xmm8
nopl   0x0(%rax)
movdqa %xmm7,-0x70(%rsp)
movdqa %xmm4,-0x60(%rsp)
movdqa %xmm2,-0x50(%rsp)
movaps %xmm0,-0x80(%rsp)
movdqa -0x80(%rsp),%xmm0
pslld  $0x17,%xmm0
movdqa 0xd86(%rip),%xmm3
paddd  %xmm3,%xmm0
cvttps2dq %xmm0,%xmm0
pshufd $0xf5,%xmm0,%xmm1
movdqa 0xd81(%rip),%xmm6
pmuludq %xmm6,%xmm0
pshufd $0xe8,%xmm0,%xmm0
pmuludq %xmm6,%xmm1
pshufd $0xe8,%xmm1,%xmm1
punpckldq %xmm1,%xmm0
movdqa %xmm2,%xmm1
pslld  $0x17,%xmm1
paddd  %xmm3,%xmm1
cvttps2dq %xmm1,%xmm1
pshufd $0xf5,%xmm1,%xmm2
pmuludq %xmm6,%xmm1
pshufd $0xe8,%xmm1,%xmm1
pmuludq %xmm6,%xmm2
pshufd $0xe8,%xmm2,%xmm2
punpckldq %xmm2,%xmm1
movdqa %xmm4,%xmm2
pslld  $0x17,%xmm2
paddd  %xmm3,%xmm2
cvttps2dq %xmm2,%xmm2
pshufd $0xf5,%xmm2,%xmm4
pmuludq %xmm6,%xmm2
pshufd $0xe8,%xmm2,%xmm5
pmuludq %xmm6,%xmm4
pshufd $0xe8,%xmm4,%xmm2
punpckldq %xmm2,%xmm5
movdqa %xmm7,%xmm2
pslld  $0x17,%xmm2
paddd  %xmm3,%xmm2
cvttps2dq %xmm2,%xmm2
pshufd $0xf5,%xmm2,%xmm4
pmuludq %xmm6,%xmm2
pshufd $0xe8,%xmm2,%xmm2
pmuludq %xmm6,%xmm4
pshufd $0xe8,%xmm4,%xmm4
punpckldq %xmm4,%xmm2
movdqa 0xcef(%rip),%xmm3
pand   %xmm3,%xmm2
pand   %xmm3,%xmm5
packuswb %xmm5,%xmm2
pand   %xmm3,%xmm1
pand   %xmm3,%xmm0
packuswb %xmm0,%xmm1
packuswb %xmm1,%xmm2
movdqa 0xc0(%rsp),%xmm1
pand   %xmm2,%xmm1
movdqa %xmm1,%xmm5
punpcklbw %xmm8,%xmm1
movdqa %xmm1,%xmm14
punpckhwd %xmm8,%xmm1
pshufd $0xee,-0x60(%rsp),%xmm6
pshuflw $0xfe,%xmm6,%xmm0
movdqa %xmm1,%xmm12
psrld  %xmm0,%xmm12
movdqa %xmm0,%xmm9
movdqa %xmm0,0x10(%rsp)
punpckhbw %xmm8,%xmm5
movdqa %xmm5,%xmm0
pshuflw $0x54,%xmm6,%xmm3
movdqa %xmm1,%xmm6
psrld  %xmm3,%xmm6
movdqa %xmm3,%xmm10
punpckhwd %xmm8,%xmm5
pshuflw $0xfe,-0x60(%rsp),%xmm4
movdqa %xmm1,%xmm15
psrld  %xmm4,%xmm15
movdqa %xmm4,%xmm13
punpcklwd %xmm8,%xmm14
pshuflw $0x54,-0x60(%rsp),%xmm4
movdqa %xmm4,(%rsp)
psrld  %xmm4,%xmm1
pshufd $0xee,-0x70(%rsp),%xmm7
pshuflw $0xfe,%xmm7,%xmm3
movdqa %xmm3,-0x10(%rsp)
movdqa %xmm14,%xmm4
psrld  %xmm3,%xmm4
punpckhqdq %xmm12,%xmm6
pshuflw $0x54,%xmm7,%xmm3
movdqa %xmm3,-0x20(%rsp)
movdqa %xmm14,%xmm7
psrld  %xmm3,%xmm7
punpcklqdq %xmm15,%xmm1
pshuflw $0xfe,-0x70(%rsp),%xmm11
fe
movdqa %xmm14,%xmm3
psrld  %xmm11,%xmm3
shufps $0xcc,%xmm6,%xmm1
pshuflw $0x54,-0x70(%rsp),%xmm6
movdqa %xmm6,-0x30(%rsp)
psrld  %xmm6,%xmm14
punpckhqdq %xmm4,%xmm7
punpcklqdq %xmm3,%xmm14
shufps $0xcc,%xmm7,%xmm14
packuswb %xmm1,%xmm14
pshufd $0xee,-0x80(%rsp),%xmm1
pshuflw $0xfe,%xmm1,%xmm4
movdqa %xmm4,0x80(%rsp)
movdqa %xmm5,%xmm3
psrld  %xmm4,%xmm3
pshuflw $0x54,%xmm1,%xmm4
movdqa %xmm4,0x70(%rsp)
movdqa %xmm5,%xmm1
psrld  %xmm4,%xmm1
punpckhqdq %xmm3,%xmm1
pshuflw $0xfe,-0x80(%rsp),%xmm4
movdqa %xmm4,0x60(%rsp)
movdqa %xmm5,%xmm3
psrld  %xmm4,%xmm3
pshuflw $0x54,-0x80(%rsp),%xmm4
movdqa %xmm4,0x50(%rsp)
psrld  %xmm4,%xmm5
punpcklqdq %xmm3,%xmm5
punpcklwd %xmm8,%xmm0
pshufd $0xee,-0x50(%rsp),%xmm3
pshuflw $0xfe,%xmm3,%xmm6
movdqa %xmm6,0x40(%rsp)
movdqa %xmm0,%xmm4
psrld  %xmm6,%xmm4
shufps $0xcc,%xmm1,%xmm5
pshuflw $0x54,%xmm3,%xmm1
movdqa %xmm1,0x30(%rsp)
movdqa %xmm0,%xmm6
psrld  %xmm1,%xmm6
punpckhqdq %xmm4,%xmm6
pshuflw $0xfe,-0x50(%rsp),%xmm1
movdqa %xmm1,0x20(%rsp)
movdqa %xmm0,%xmm4
psrld  %xmm1,%xmm4
pshuflw $0x54,-0x50(%rsp),%xmm1
movdqa %xmm1,-0x40(%rsp)
psrld  %xmm1,%xmm0
punpcklqdq %xmm4,%xmm0
shufps $0xcc,%xmm6,%xmm0
packuswb %xmm5,%xmm0
packuswb %xmm0,%xmm14
movdqa 0xb0(%rsp),%xmm5
pand   %xmm2,%xmm5
movdqa %xmm5,%xmm6
punpcklbw %xmm8,%xmm5
movdqa %xmm5,%xmm0
punpckhwd %xmm8,%xmm5
movdqa %xmm5,%xmm12
psrld  %xmm9,%xmm12
movdqa %xmm5,%xmm4
movdqa %xmm10,%xmm1
movdqa %xmm10,0xf0(%rsp)
psrld  %xmm10,%xmm4
movdqa %xmm5,%xmm15
movdqa %xmm13,%xmm10
movdqa %xmm13,0xe0(%rsp)
psrld  %xmm13,%xmm15
punpckhqdq %xmm12,%xmm4
movdqa (%rsp),%xmm7
psrld  %xmm7,%xmm5
punpcklqdq %xmm15,%xmm5
shufps $0xcc,%xmm4,%xmm5
punpcklwd %xmm8,%xmm0
movdqa %xmm0,%xmm12
movdqa -0x10(%rsp),%xmm13
psrld  %xmm13,%xmm12
movdqa %xmm0,%xmm4
movdqa -0x20(%rsp),%xmm3
psrld  %xmm3,%xmm4
movdqa %xmm0,%xmm15
movdqa %xmm11,%xmm9
movdqa %xmm11,0xd0(%rsp)
psrld  %xmm11,%xmm15
punpckhqdq %xmm12,%xmm4
movdqa -0x30(%rsp),%xmm11
psrld  %xmm11,%xmm0
punpcklqdq %xmm15,%xmm0
shufps $0xcc,%xmm4,%xmm0
packuswb %xmm5,%xmm0
punpckhbw %xmm8,%xmm6
movdqa %xmm6,%xmm4
punpckhwd %xmm8,%xmm6
movdqa %xmm6,%xmm12
psrld  0x80(%rsp),%xmm12
movdqa %xmm6,%xmm5
psrld  0x70(%rsp),%xmm5
movdqa %xmm6,%xmm15
psrld  0x60(%rsp),%xmm15
psrld  0x50(%rsp),%xmm6
punpckhqdq %xmm12,%xmm5
punpcklqdq %xmm15,%xmm6
shufps $0xcc,%xmm5,%xmm6
punpcklwd %xmm8,%xmm4
movdqa %xmm4,%xmm12
psrld  0x40(%rsp),%xmm12
movdqa %xmm4,%xmm5
psrld  0x30(%rsp),%xmm5
movdqa %xmm4,%xmm15
psrld  0x20(%rsp),%xmm15
psrld  -0x40(%rsp),%xmm4
punpckhqdq %xmm12,%xmm5
punpcklqdq %xmm15,%xmm4
shufps $0xcc,%xmm5,%xmm4
packuswb %xmm6,%xmm4
packuswb %xmm4,%xmm0
psllw  $0x3,%xmm14
pand   0x9af(%rip),%xmm14
psllw  $0x2,%xmm0
pand   0x9b2(%rip),%xmm0
movdqa 0xa0(%rsp),%xmm5
pand   %xmm2,%xmm5
movdqa %xmm5,%xmm12
punpcklbw %xmm8,%xmm5
movdqa %xmm5,%xmm15
punpckhwd %xmm8,%xmm5
movdqa %xmm5,%xmm4
psrld  0x10(%rsp),%xmm4
movdqa %xmm5,%xmm6
psrld  %xmm1,%xmm6
por    %xmm14,%xmm0
punpckhqdq %xmm4,%xmm6
movdqa %xmm5,%xmm4
psrld  %xmm10,%xmm4
psrld  %xmm7,%xmm5
punpcklqdq %xmm4,%xmm5
punpcklwd %xmm8,%xmm15
movdqa %xmm15,%xmm14
psrld  %xmm13,%xmm14
movdqa %xmm15,%xmm4
psrld  %xmm3,%xmm4
shufps $0xcc,%xmm6,%xmm5
punpckhqdq %xmm14,%xmm4
movdqa %xmm15,%xmm6
psrld  %xmm9,%xmm6
psrld  %xmm11,%xmm15
punpcklqdq %xmm6,%xmm15
shufps $0xcc,%xmm4,%xmm15
punpckhbw %xmm8,%xmm12
movdqa %xmm12,%xmm14
punpckhwd %xmm8,%xmm12
movdqa %xmm12,%xmm4
movdqa 0x80(%rsp),%xmm1
psrld  %xmm1,%xmm4
packuswb %xmm5,%xmm15
movdqa %xmm12,%xmm5
movdqa 0x70(%rsp),%xmm3
psrld  %xmm3,%xmm5
punpckhqdq %xmm4,%xmm5
movdqa %xmm12,%xmm4
movdqa 0x60(%rsp),%xmm7
psrld  %xmm7,%xmm4
movdqa 0x50(%rsp),%xmm9
psrld  %xmm9,%xmm12
punpcklqdq %xmm4,%xmm12
punpcklwd %xmm8,%xmm14
movdqa %xmm14,%xmm4
movdqa 0x40(%rsp),%xmm10
psrld  %xmm10,%xmm4
shufps $0xcc,%xmm5,%xmm12
movdqa %xmm14,%xmm5
movdqa 0x30(%rsp),%xmm11
psrld  %xmm11,%xmm5
punpckhqdq %xmm4,%xmm5
movdqa %xmm14,%xmm4
movdqa 0x20(%rsp),%xmm13
psrld  %xmm13,%xmm4
psrld  -0x40(%rsp),%xmm14
punpcklqdq %xmm4,%xmm14
shufps $0xcc,%xmm5,%xmm14
packuswb %xmm12,%xmm14
pand   0x90(%rsp),%xmm2
movdqa %xmm2,%xmm4
punpcklbw %xmm8,%xmm2
movdqa %xmm2,%xmm5
punpckhwd %xmm8,%xmm2
movdqa %xmm2,%xmm12
psrld  0x10(%rsp),%xmm12
packuswb %xmm14,%xmm15
movdqa %xmm2,%xmm6
psrld  0xf0(%rsp),%xmm6
punpckhqdq %xmm12,%xmm6
movdqa %xmm2,%xmm12
psrld  0xe0(%rsp),%xmm12
psrld  (%rsp),%xmm2
punpcklqdq %xmm12,%xmm2
punpcklwd %xmm8,%xmm5
movdqa %xmm5,%xmm12
psrld  -0x10(%rsp),%xmm12
shufps $0xcc,%xmm6,%xmm2
movdqa %xmm5,%xmm14
psrld  -0x20(%rsp),%xmm14
punpckhqdq %xmm12,%xmm14
movdqa %xmm5,%xmm6
psrld  0xd0(%rsp),%xmm6
psrld  -0x30(%rsp),%xmm5
punpckhbw %xmm8,%xmm4
punpcklqdq %xmm6,%xmm5
movdqa %xmm4,%xmm6
punpckhwd %xmm8,%xmm4
shufps $0xcc,%xmm14,%xmm5
movdqa %xmm4,%xmm12
psrld  %xmm1,%xmm12
movdqa %xmm4,%xmm14
psrld  %xmm3,%xmm14
packuswb %xmm2,%xmm5
punpckhqdq %xmm12,%xmm14
movdqa %xmm4,%xmm2
psrld  %xmm7,%xmm2
psrld  %xmm9,%xmm4
punpcklwd %xmm8,%xmm6
punpcklqdq %xmm2,%xmm4
movdqa %xmm6,%xmm12
psrld  %xmm10,%xmm12
movdqa %xmm6,%xmm2
psrld  %xmm11,%xmm2
shufps $0xcc,%xmm14,%xmm4
punpckhqdq %xmm12,%xmm2
movdqa %xmm6,%xmm7
psrld  %xmm13,%xmm7
psrld  -0x40(%rsp),%xmm6
punpcklqdq %xmm7,%xmm6
movdqa -0x70(%rsp),%xmm7
shufps $0xcc,%xmm2,%xmm6
movdqa -0x50(%rsp),%xmm2
packuswb %xmm4,%xmm6
movdqa -0x60(%rsp),%xmm4
packuswb %xmm6,%xmm5
paddb  %xmm15,%xmm15
por    %xmm15,%xmm5
por    %xmm0,%xmm5
movdqu %xmm5,(%rdi,%r10,1)
add    $0x10,%r10
movdqa 0x743(%rip),%xmm0
paddd  %xmm0,%xmm7
paddd  %xmm0,%xmm4
paddd  %xmm0,%xmm2
movdqa -0x80(%rsp),%xmm1
paddd  %xmm0,%xmm1
movdqa %xmm1,-0x80(%rsp)
movaps -0x80(%rsp),%xmm0
cmp    %r10,%r9
jne    1290 <decode_byte+0x190>
cmp    %r9,%r8
je     11b5 <decode_byte+0xb5>
jmp    113f <decode_byte+0x3f>

LLVM IR (-O0):
define i8* @decode_byte(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8
%10 = alloca i8
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
store i32 7, i32* %7
br label %11
11: ; preds = %54, %3
%12 = load i32, i32* %6
%13 = icmp sgt i32 %12, 0
br i1 %13, label %14, label %59
14: ; preds = %11
store i8 0, i8* %9
store i32 0, i32* %8
br label %15
15: ; preds = %47, %14
%16 = load i32, i32* %8
%17 = icmp slt i32 %16, 4
br i1 %17, label %18, label %50
18: ; preds = %15
%19 = load i8*, i8** %5
%20 = load i32, i32* %8
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i8, i8* %19, i64 %21
%23 = load i8, i8* %22
store i8 %23, i8* %10
%24 = load i32, i32* %7
%25 = shl i32 1, %24
%26 = load i8, i8* %10
%27 = zext i8 %26 to i32
%28 = and i32 %27, %25
%29 = trunc i32 %28 to i8
store i8 %29, i8* %10
%30 = load i32, i32* %7
%31 = load i8, i8* %10
%32 = zext i8 %31 to i32
%33 = ashr i32 %32, %30
%34 = trunc i32 %33 to i8
store i8 %34, i8* %10
%35 = load i32, i32* %8
%36 = sub nsw i32 3, %35
%37 = load i8, i8* %10
%38 = zext i8 %37 to i32
%39 = shl i32 %38, %36
%40 = trunc i32 %39 to i8
store i8 %40, i8* %10
%41 = load i8, i8* %10
%42 = zext i8 %41 to i32
%43 = load i8, i8* %9
%44 = zext i8 %43 to i32
%45 = or i32 %44, %42
%46 = trunc i32 %45 to i8
store i8 %46, i8* %9
br label %47
47: ; preds = %18
%48 = load i32, i32* %8
%49 = add nsw i32 %48, 1
store i32 %49, i32* %8
br label %15
50: ; preds = %15
%51 = load i8, i8* %9
%52 = load i8*, i8** %4
%53 = getelementptr inbounds i8, i8* %52, i32 1
store i8* %53, i8** %4
store i8 %51, i8* %52
br label %54
54: ; preds = %50
%55 = load i32, i32* %7
%56 = add nsw i32 %55, -1
store i32 %56, i32* %7
%57 = load i32, i32* %6
%58 = add nsw i32 %57, -1
store i32 %58, i32* %6
br label %11
59: ; preds = %11
%60 = load i8*, i8** %4
ret i8* %60
}

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