int YUV422_to_RGB(unsigned char *y_input, unsigned char *u_input,
                  unsigned char *v_input, unsigned char *rgb_output, int width,
                  int height) {
  int R, G, B;
  int Y, U, V;
  int row;
  int col;
  for (row = 0; row < height; row++) {
    for (col = 0; col < width; col = col + 2) {
      Y = (int)(*(y_input++));
      U = (int)(*(u_input)) - 128;
      V = (int)(*(v_input)) - 128;
      R = ((298 * Y + 409 * V + 128) >> 8);
      G = ((298 * Y - 100 * U - 208 * V + 128) >> 8);
      B = ((298 * Y + 516 * U + 128) >> 8);
      *(rgb_output++) = (unsigned char)((R < 0) ? 0 : ((R > 255) ? 255 : R));
      *(rgb_output++) = (unsigned char)((G < 0) ? 0 : ((G > 255) ? 255 : G));
      *(rgb_output++) = (unsigned char)((B < 0) ? 0 : ((B > 255) ? 255 : B));
      Y = (int)(*(y_input++));
      U = (U + (int)(*(u_input++)) - 128) >> 1;
      V = (V + (int)(*(v_input++)) - 128) >> 1;
      R = ((298 * Y + 409 * V + 128) >> 8);
      G = ((298 * Y - 100 * U - 208 * V + 128) >> 8);
      B = ((298 * Y + 516 * U + 128) >> 8);
      *(rgb_output++) = (unsigned char)((R < 0) ? 0 : ((R > 255) ? 255 : R));
      *(rgb_output++) = (unsigned char)((G < 0) ? 0 : ((G > 255) ? 255 : G));
      *(rgb_output++) = (unsigned char)((B < 0) ? 0 : ((B > 255) ? 255 : B));
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<YUV422_to_RGB>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9d,-0x28(%rbp)
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x28(%rbp),%eax
jge    147d <YUV422_to_RGB+0x37d>
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    146a <YUV422_to_RGB+0x36a>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
mov    %eax,-0x38(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
sub    $0x80,%eax
mov    %eax,-0x3c(%rbp)
mov    -0x18(%rbp),%rax
movzbl (%rax),%eax
sub    $0x80,%eax
mov    %eax,-0x40(%rbp)
imul   $0x12a,-0x38(%rbp),%eax
imul   $0x199,-0x40(%rbp),%ecx
add    %ecx,%eax
add    $0x80,%eax
sar    $0x8,%eax
mov    %eax,-0x2c(%rbp)
imul   $0x12a,-0x38(%rbp),%eax
imul   $0x64,-0x3c(%rbp),%ecx
sub    %ecx,%eax
imul   $0xd0,-0x40(%rbp),%ecx
sub    %ecx,%eax
add    $0x80,%eax
sar    $0x8,%eax
mov    %eax,-0x30(%rbp)
imul   $0x12a,-0x38(%rbp),%eax
imul   $0x204,-0x3c(%rbp),%ecx
add    %ecx,%eax
add    $0x80,%eax
sar    $0x8,%eax
mov    %eax,-0x34(%rbp)
cmpl   $0x0,-0x2c(%rbp)
jge    11e0 <YUV422_to_RGB+0xe0>
xor    %eax,%eax
mov    %eax,-0x4c(%rbp)
jmp    1206 <YUV422_to_RGB+0x106>
cmpl   $0xff,-0x2c(%rbp)
jle    11fa <YUV422_to_RGB+0xfa>
mov    $0xff,%eax
mov    %eax,-0x50(%rbp)
jmp    1200 <YUV422_to_RGB+0x100>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x50(%rbp)
mov    -0x50(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
mov    %al,%cl
mov    -0x20(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x20(%rbp)
mov    %cl,(%rax)
cmpl   $0x0,-0x30(%rbp)
jge    1230 <YUV422_to_RGB+0x130>
xor    %eax,%eax
mov    %eax,-0x54(%rbp)
jmp    1256 <YUV422_to_RGB+0x156>
cmpl   $0xff,-0x30(%rbp)
jle    124a <YUV422_to_RGB+0x14a>
mov    $0xff,%eax
mov    %eax,-0x58(%rbp)
jmp    1250 <YUV422_to_RGB+0x150>
mov    -0x30(%rbp),%eax
mov    %eax,-0x58(%rbp)
mov    -0x58(%rbp),%eax
mov    %eax,-0x54(%rbp)
mov    -0x54(%rbp),%eax
mov    %al,%cl
mov    -0x20(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x20(%rbp)
mov    %cl,(%rax)
cmpl   $0x0,-0x34(%rbp)
jge    1280 <YUV422_to_RGB+0x180>
xor    %eax,%eax
mov    %eax,-0x5c(%rbp)
jmp    12a6 <YUV422_to_RGB+0x1a6>
cmpl   $0xff,-0x34(%rbp)
jle    129a <YUV422_to_RGB+0x19a>
mov    $0xff,%eax
mov    %eax,-0x60(%rbp)
jmp    12a0 <YUV422_to_RGB+0x1a0>
mov    -0x34(%rbp),%eax
mov    %eax,-0x60(%rbp)
mov    -0x60(%rbp),%eax
mov    %eax,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
mov    %al,%cl
mov    -0x20(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x20(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
mov    %eax,-0x38(%rbp)
mov    -0x3c(%rbp),%eax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
movzbl (%rcx),%ecx
add    %ecx,%eax
sub    $0x80,%eax
sar    $0x1,%eax
mov    %eax,-0x3c(%rbp)
mov    -0x40(%rbp),%eax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
movzbl (%rcx),%ecx
add    %ecx,%eax
sub    $0x80,%eax
sar    $0x1,%eax
mov    %eax,-0x40(%rbp)
imul   $0x12a,-0x38(%rbp),%eax
imul   $0x199,-0x40(%rbp),%ecx
add    %ecx,%eax
add    $0x80,%eax
sar    $0x8,%eax
mov    %eax,-0x2c(%rbp)
imul   $0x12a,-0x38(%rbp),%eax
imul   $0x64,-0x3c(%rbp),%ecx
sub    %ecx,%eax
imul   $0xd0,-0x40(%rbp),%ecx
sub    %ecx,%eax
add    $0x80,%eax
sar    $0x8,%eax
mov    %eax,-0x30(%rbp)
imul   $0x12a,-0x38(%rbp),%eax
imul   $0x204,-0x3c(%rbp),%ecx
add    %ecx,%eax
add    $0x80,%eax
sar    $0x8,%eax
mov    %eax,-0x34(%rbp)
cmpl   $0x0,-0x2c(%rbp)
jge    1380 <YUV422_to_RGB+0x280>
xor    %eax,%eax
mov    %eax,-0x64(%rbp)
jmp    13a6 <YUV422_to_RGB+0x2a6>
cmpl   $0xff,-0x2c(%rbp)
jle    139a <YUV422_to_RGB+0x29a>
mov    $0xff,%eax
mov    %eax,-0x68(%rbp)
jmp    13a0 <YUV422_to_RGB+0x2a0>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x68(%rbp)
mov    -0x68(%rbp),%eax
mov    %eax,-0x64(%rbp)
mov    -0x64(%rbp),%eax
mov    %al,%cl
mov    -0x20(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x20(%rbp)
mov    %cl,(%rax)
cmpl   $0x0,-0x30(%rbp)
jge    13d0 <YUV422_to_RGB+0x2d0>
xor    %eax,%eax
mov    %eax,-0x6c(%rbp)
jmp    13f6 <YUV422_to_RGB+0x2f6>
cmpl   $0xff,-0x30(%rbp)
jle    13ea <YUV422_to_RGB+0x2ea>
mov    $0xff,%eax
mov    %eax,-0x70(%rbp)
jmp    13f0 <YUV422_to_RGB+0x2f0>
mov    -0x30(%rbp),%eax
mov    %eax,-0x70(%rbp)
mov    -0x70(%rbp),%eax
mov    %eax,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
mov    %al,%cl
mov    -0x20(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x20(%rbp)
mov    %cl,(%rax)
cmpl   $0x0,-0x34(%rbp)
jge    1420 <YUV422_to_RGB+0x320>
xor    %eax,%eax
mov    %eax,-0x74(%rbp)
jmp    1446 <YUV422_to_RGB+0x346>
cmpl   $0xff,-0x34(%rbp)
jle    143a <YUV422_to_RGB+0x33a>
mov    $0xff,%eax
mov    %eax,-0x78(%rbp)
jmp    1440 <YUV422_to_RGB+0x340>
mov    -0x34(%rbp),%eax
mov    %eax,-0x78(%rbp)
mov    -0x78(%rbp),%eax
mov    %eax,-0x74(%rbp)
mov    -0x74(%rbp),%eax
mov    %al,%cl
mov    -0x20(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x20(%rbp)
mov    %cl,(%rax)
mov    -0x48(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x48(%rbp)
jmp    1136 <YUV422_to_RGB+0x36>
jmp    146f <YUV422_to_RGB+0x36f>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1123 <YUV422_to_RGB+0x23>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<YUV422_to_RGB>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %r9d,-0x74(%rsp)
test   %r9d,%r9d
jle    1b61 <YUV422_to_RGB+0xa61>
mov    %rsi,%r13
lea    -0x1(%r8),%eax
mov    %eax,-0x78(%rsp)
mov    %eax,%esi
shr    %esi
lea    (%rsi,%rsi,2),%rax
add    %rax,%rax
add    $0x6,%rax
mov    %rax,-0x8(%rsp)
lea    0x2(%rsi,%rsi,1),%rax
mov    %rax,-0x10(%rsp)
lea    0x1(%rsi),%rax
mov    %rax,-0x18(%rsp)
add    $0x1,%esi
mov    %rsi,-0x20(%rsp)
and    $0xfffffff0,%esi
mov    %rsi,-0x28(%rsp)
lea    (%rsi,%rsi,1),%eax
mov    %eax,-0x7c(%rsp)
lea    (%rsi,%rsi,1),%rax
mov    %rax,-0x30(%rsp)
lea    (%rax,%rax,2),%rax
mov    %rax,-0x38(%rsp)
xor    %r9d,%r9d
jmp    119e <YUV422_to_RGB+0x9e>
nopl   0x0(%rax)
mov    %r13,%r9
add    $0x1,%r9d
mov    %r12,%rdi
mov    %r15,%r13
mov    %r11,%rdx
mov    %r14,%rcx
cmp    -0x74(%rsp),%r9d
je     1b61 <YUV422_to_RGB+0xa61>
test   %r8d,%r8d
jle    1b50 <YUV422_to_RGB+0xa50>
xor    %r10d,%r10d
cmpl   $0x1e,-0x78(%rsp)
jb     19d0 <YUV422_to_RGB+0x8d0>
mov    -0x8(%rsp),%rax
lea    (%rcx,%rax,1),%rbp
mov    -0x10(%rsp),%rax
add    %rdi,%rax
mov    -0x18(%rsp),%rbx
lea    (%rbx,%r13,1),%rsi
add    %rdx,%rbx
cmp    %rax,%rcx
setb   %r14b
cmp    %rbp,%rdi
setb   %r15b
cmp    %rsi,%rcx
setb   %al
cmp    %rbp,%r13
setb   %sil
cmp    %rbx,%rcx
setb   %bl
cmp    %rbp,%rdx
setb   %r11b
test   %r15b,%r14b
jne    19d0 <YUV422_to_RGB+0x8d0>
and    %sil,%al
jne    19d0 <YUV422_to_RGB+0x8d0>
and    %r11b,%bl
jne    19d0 <YUV422_to_RGB+0x8d0>
mov    -0x30(%rsp),%rax
lea    (%rdi,%rax,1),%r12
mov    -0x28(%rsp),%rax
lea    (%rax,%r13,1),%r15
lea    (%rdx,%rax,1),%r11
mov    -0x38(%rsp),%rsi
lea    (%rcx,%rsi,1),%r14
xor    %r10d,%r10d
nopw   0x0(%rax,%rax,1)
movdqu (%rdi,%r10,2),%xmm11
movdqa %xmm11,-0x60(%rsp)
movdqu 0x10(%rdi,%r10,2),%xmm4
movdqa %xmm4,0x20(%rsp)
movdqa %xmm11,%xmm8
punpckhwd %xmm8,%xmm8
movdqa 0xd94(%rip),%xmm0
pand   %xmm0,%xmm8
punpcklwd %xmm11,%xmm11
pand   %xmm0,%xmm11
movdqa %xmm4,%xmm7
punpckhwd %xmm7,%xmm7
pand   %xmm0,%xmm7
punpcklwd %xmm4,%xmm4
pand   %xmm0,%xmm4
movdqu (%rdx,%r10,1),%xmm13
movdqa %xmm13,%xmm0
pxor   %xmm5,%xmm5
punpcklbw %xmm5,%xmm0
movdqa %xmm0,%xmm2
punpckhwd %xmm5,%xmm2
movdqa %xmm2,%xmm9
movdqa %xmm2,(%rsp)
punpcklwd %xmm5,%xmm0
movdqa %xmm0,%xmm15
movdqa %xmm0,0x10(%rsp)
punpckhbw %xmm5,%xmm13
movdqa %xmm13,%xmm12
punpckhwd %xmm5,%xmm12
movdqa %xmm12,0x30(%rsp)
punpcklwd %xmm5,%xmm13
movdqa %xmm13,0x40(%rsp)
movdqa 0xd23(%rip),%xmm1
paddd  %xmm1,%xmm13
paddd  %xmm1,%xmm12
paddd  %xmm1,%xmm15
paddd  %xmm1,%xmm9
movdqa 0xd17(%rip),%xmm0
pmaddwd %xmm0,%xmm4
pmaddwd %xmm0,%xmm7
pmaddwd %xmm0,%xmm11
pmaddwd %xmm0,%xmm8
movdqa %xmm9,%xmm0
movdqa 0xd08(%rip),%xmm2
pmaddwd %xmm2,%xmm0
movdqa %xmm15,%xmm3
pmaddwd %xmm2,%xmm3
movdqa %xmm2,%xmm5
movdqa 0xcff(%rip),%xmm2
paddd  %xmm2,%xmm8
paddd  %xmm2,%xmm11
movdqa %xmm2,%xmm10
paddd  %xmm11,%xmm3
paddd  %xmm8,%xmm0
movdqa %xmm8,-0x70(%rsp)
psrad  $0x8,%xmm0
psrad  $0x8,%xmm3
packssdw %xmm0,%xmm3
movdqa %xmm12,%xmm0
pmaddwd %xmm5,%xmm0
movdqa %xmm13,%xmm2
pmaddwd %xmm5,%xmm2
movdqa %xmm10,%xmm6
paddd  %xmm10,%xmm7
paddd  %xmm10,%xmm4
paddd  %xmm4,%xmm2
paddd  %xmm7,%xmm0
psrad  $0x8,%xmm0
psrad  $0x8,%xmm2
packssdw %xmm0,%xmm2
packuswb %xmm2,%xmm3
movdqa %xmm3,0x50(%rsp)
movdqu 0x0(%r13,%r10,1),%xmm5
movdqa %xmm5,%xmm10
pxor   %xmm2,%xmm2
punpcklbw %xmm2,%xmm5
movdqa %xmm5,%xmm0
punpckhwd %xmm2,%xmm5
movdqa %xmm5,%xmm2
paddd  %xmm1,%xmm2
movdqa %xmm2,%xmm14
movdqa 0xc6f(%rip),%xmm3
pmaddwd %xmm3,%xmm14
movdqa 0xc72(%rip),%xmm3
pmaddwd %xmm3,%xmm9
movdqa %xmm3,%xmm6
paddd  %xmm8,%xmm14
paddd  %xmm9,%xmm14
punpcklwd 0xca7(%rip),%xmm0
movdqa %xmm0,%xmm9
paddd  %xmm1,%xmm9
movdqa %xmm9,%xmm3
pmaddwd 0xc30(%rip),%xmm3
pmaddwd %xmm6,%xmm15
paddd  %xmm11,%xmm3
paddd  %xmm15,%xmm3
movdqa %xmm3,-0x50(%rsp)
pxor   %xmm3,%xmm3
punpckhbw %xmm3,%xmm10
movdqa %xmm10,%xmm8
punpckhwd %xmm3,%xmm10
pxor   %xmm15,%xmm15
movdqa %xmm10,%xmm6
paddd  %xmm1,%xmm6
movdqa %xmm6,%xmm3
pmaddwd 0xbee(%rip),%xmm3
pmaddwd 0xbf5(%rip),%xmm12
paddd  %xmm7,%xmm3
paddd  %xmm12,%xmm3
punpcklwd %xmm15,%xmm8
movdqa %xmm8,%xmm15
paddd  %xmm1,%xmm15
movdqa %xmm15,%xmm12
movdqa 0xbc0(%rip),%xmm1
pmaddwd %xmm1,%xmm12
movdqa 0xbc3(%rip),%xmm1
pmaddwd %xmm1,%xmm13
paddd  %xmm4,%xmm12
paddd  %xmm13,%xmm12
movdqa 0xbbb(%rip),%xmm13
psrad  $0x8,%xmm14
movdqa -0x50(%rsp),%xmm1
psrad  $0x8,%xmm1
packssdw %xmm14,%xmm1
psrad  $0x8,%xmm3
psrad  $0x8,%xmm12
packssdw %xmm3,%xmm12
packuswb %xmm12,%xmm1
movdqa %xmm1,-0x50(%rsp)
movdqa 0xb11(%rip),%xmm14
pmaddwd %xmm13,%xmm15
paddd  %xmm4,%xmm15
pmaddwd %xmm13,%xmm6
paddd  %xmm7,%xmm6
pmaddwd %xmm13,%xmm9
paddd  %xmm11,%xmm9
pmaddwd %xmm13,%xmm2
paddd  -0x70(%rsp),%xmm2
psrad  $0x8,%xmm2
psrad  $0x8,%xmm9
packssdw %xmm2,%xmm9
psrad  $0x8,%xmm6
psrad  $0x8,%xmm15
packssdw %xmm6,%xmm15
packuswb %xmm15,%xmm9
movdqa %xmm9,-0x70(%rsp)
movdqa 0xb35(%rip),%xmm3
movdqa -0x60(%rsp),%xmm1
psrldq $0x1,%xmm1
movdqa %xmm1,%xmm15
punpckhbw %xmm15,%xmm15
pand   %xmm14,%xmm15
punpcklbw %xmm1,%xmm1
pand   %xmm14,%xmm1
movdqa 0x20(%rsp),%xmm2
psrldq $0x1,%xmm2
movdqa (%rsp),%xmm11
paddd  %xmm11,%xmm11
paddd  %xmm3,%xmm11
movdqa 0x10(%rsp),%xmm9
paddd  %xmm9,%xmm9
paddd  %xmm3,%xmm9
psrad  $0x1,%xmm9
psrad  $0x1,%xmm11
movdqa %xmm1,%xmm6
movdqa 0xa6d(%rip),%xmm12
pmaddwd %xmm12,%xmm6
pmaddwd %xmm12,%xmm15
movdqa %xmm11,%xmm3
movdqa 0xa65(%rip),%xmm13
pmaddwd %xmm13,%xmm3
movdqa %xmm9,%xmm1
pmaddwd %xmm13,%xmm1
movdqa 0xa5e(%rip),%xmm4
paddd  %xmm4,%xmm15
paddd  %xmm4,%xmm6
movdqa %xmm6,-0x60(%rsp)
paddd  %xmm6,%xmm1
paddd  %xmm15,%xmm3
psrad  $0x8,%xmm3
psrad  $0x8,%xmm1
packssdw %xmm3,%xmm1
movdqa %xmm2,%xmm3
movdqa %xmm2,%xmm7
punpckhbw %xmm7,%xmm7
pand   %xmm14,%xmm7
punpcklbw %xmm3,%xmm3
pand   %xmm14,%xmm3
movdqa 0x30(%rsp),%xmm4
paddd  %xmm4,%xmm4
movdqa 0xa4c(%rip),%xmm2
paddd  %xmm2,%xmm4
movdqa 0x40(%rsp),%xmm6
paddd  %xmm6,%xmm6
paddd  %xmm2,%xmm6
psrad  $0x1,%xmm6
psrad  $0x1,%xmm4
pmaddwd %xmm12,%xmm3
movdqa %xmm3,%xmm14
pmaddwd %xmm12,%xmm7
movdqa %xmm4,%xmm3
movdqa %xmm4,%xmm2
pmaddwd %xmm13,%xmm3
movdqa %xmm6,%xmm4
movdqa %xmm6,%xmm12
pmaddwd %xmm13,%xmm4
movdqa 0x9be(%rip),%xmm6
paddd  %xmm6,%xmm7
paddd  %xmm6,%xmm14
paddd  %xmm14,%xmm4
paddd  %xmm7,%xmm3
psrad  $0x8,%xmm3
psrad  $0x8,%xmm4
packssdw %xmm3,%xmm4
packuswb %xmm4,%xmm1
paddd  %xmm5,%xmm5
movdqa 0x9ce(%rip),%xmm4
paddd  %xmm4,%xmm5
psrad  $0x1,%xmm5
movdqa %xmm5,%xmm3
movdqa 0x988(%rip),%xmm13
pmaddwd %xmm13,%xmm3
movdqa 0x98b(%rip),%xmm6
pmaddwd %xmm6,%xmm11
paddd  %xmm15,%xmm3
paddd  %xmm11,%xmm3
paddd  %xmm0,%xmm0
paddd  %xmm4,%xmm0
psrad  $0x1,%xmm0
movdqa %xmm0,%xmm4
pmaddwd %xmm13,%xmm4
pmaddwd %xmm6,%xmm9
movdqa -0x60(%rsp),%xmm11
paddd  %xmm11,%xmm4
paddd  %xmm9,%xmm4
paddd  %xmm10,%xmm10
paddd  0x962(%rip),%xmm10
psrad  $0x1,%xmm10
movdqa %xmm10,%xmm6
pmaddwd %xmm13,%xmm6
pmaddwd 0x92a(%rip),%xmm2
paddd  %xmm7,%xmm6
paddd  %xmm2,%xmm6
paddd  %xmm8,%xmm8
paddd  0x934(%rip),%xmm8
psrad  $0x1,%xmm8
movdqa %xmm8,%xmm2
pmaddwd %xmm13,%xmm2
pmaddwd 0x8fb(%rip),%xmm12
paddd  %xmm14,%xmm2
paddd  %xmm12,%xmm2
psrad  $0x8,%xmm3
psrad  $0x8,%xmm4
packssdw %xmm3,%xmm4
psrad  $0x8,%xmm6
psrad  $0x8,%xmm2
packssdw %xmm6,%xmm2
packuswb %xmm2,%xmm4
movdqa 0x8d9(%rip),%xmm2
pmaddwd %xmm2,%xmm8
paddd  %xmm14,%xmm8
pmaddwd %xmm2,%xmm5
pmaddwd %xmm2,%xmm0
pmaddwd %xmm2,%xmm10
movdqa 0x8e9(%rip),%xmm13
paddd  %xmm7,%xmm10
paddd  %xmm11,%xmm0
paddd  %xmm15,%xmm5
movdqa 0x8c1(%rip),%xmm11
psrad  $0x8,%xmm5
psrad  $0x8,%xmm0
packssdw %xmm5,%xmm0
psrad  $0x8,%xmm10
psrad  $0x8,%xmm8
packssdw %xmm10,%xmm8
packuswb %xmm8,%xmm0
movdqa 0x50(%rsp),%xmm14
movdqa %xmm14,%xmm5
movdqa -0x50(%rsp),%xmm12
punpcklbw %xmm12,%xmm5
pshufd $0x50,%xmm5,%xmm3
pand   %xmm11,%xmm3
movdqa -0x70(%rsp),%xmm9
movdqa %xmm9,%xmm8
punpcklbw %xmm1,%xmm8
pshuflw $0xa1,%xmm8,%xmm6
pshufd $0x44,%xmm6,%xmm6
movdqa %xmm11,%xmm7
pandn  %xmm6,%xmm7
por    %xmm3,%xmm7
movdqa %xmm4,%xmm6
punpcklbw %xmm0,%xmm6
pshufd $0x0,%xmm6,%xmm2
movdqa %xmm13,%xmm10
pandn  %xmm2,%xmm10
pand   %xmm13,%xmm7
por    %xmm7,%xmm10
punpckhbw %xmm0,%xmm4
pshufd $0xfa,%xmm4,%xmm0
movdqa %xmm11,%xmm2
pandn  %xmm0,%xmm2
punpckhbw %xmm1,%xmm9
pshufhw $0xf9,%xmm9,%xmm0
pshufd $0xea,%xmm0,%xmm1
pand   %xmm11,%xmm1
por    %xmm2,%xmm1
pand   %xmm13,%xmm1
movdqa %xmm14,%xmm3
punpckhbw %xmm12,%xmm3
pshufd $0xff,%xmm3,%xmm2
movdqa %xmm13,%xmm0
pandn  %xmm2,%xmm0
por    %xmm1,%xmm0
pshufd $0xa5,%xmm3,%xmm1
movdqa %xmm11,%xmm2
pandn  %xmm1,%xmm2
pshufd $0xa5,%xmm4,%xmm7
pand   %xmm11,%xmm7
por    %xmm2,%xmm7
pshuflw $0xff,%xmm9,%xmm1
pshufhw $0x0,%xmm1,%xmm2
movdqa %xmm13,%xmm1
pandn  %xmm2,%xmm1
pand   %xmm13,%xmm7
por    %xmm7,%xmm1
pshufd $0x50,%xmm3,%xmm2
pand   %xmm11,%xmm2
pshuflw $0xa1,%xmm9,%xmm7
pshufd $0x44,%xmm7,%xmm7
movdqa %xmm11,%xmm3
pandn  %xmm7,%xmm3
por    %xmm2,%xmm3
pand   %xmm13,%xmm3
pshufd $0x0,%xmm4,%xmm2
movdqa %xmm13,%xmm4
pandn  %xmm2,%xmm4
por    %xmm3,%xmm4
pshufd $0xfa,%xmm6,%xmm2
movdqa %xmm11,%xmm3
pandn  %xmm2,%xmm3
pshufhw $0xf9,%xmm8,%xmm2
pshufd $0xea,%xmm2,%xmm2
pand   %xmm11,%xmm2
por    %xmm3,%xmm2
pshufd $0xff,%xmm5,%xmm3
movdqa %xmm13,%xmm7
pandn  %xmm3,%xmm7
pand   %xmm13,%xmm2
por    %xmm2,%xmm7
pshufd $0xa5,%xmm5,%xmm2
movdqa %xmm11,%xmm3
pandn  %xmm2,%xmm3
pshufd $0xa5,%xmm6,%xmm2
pand   %xmm11,%xmm2
por    %xmm3,%xmm2
pshuflw $0xff,%xmm8,%xmm3
pshufhw $0x0,%xmm3,%xmm3
movdqa %xmm13,%xmm5
pandn  %xmm3,%xmm5
pand   %xmm13,%xmm2
por    %xmm2,%xmm5
movdqu %xmm5,0x10(%rcx)
movdqu %xmm7,0x20(%rcx)
movdqu %xmm4,0x30(%rcx)
movdqu %xmm1,0x40(%rcx)
movdqu %xmm0,0x50(%rcx)
movdqu %xmm10,(%rcx)
add    $0x10,%r10
add    $0x60,%rcx
cmp    %r10,%rax
jne    1240 <YUV422_to_RGB+0x140>
mov    -0x7c(%rsp),%r10d
cmp    -0x20(%rsp),%rax
je     1183 <YUV422_to_RGB+0x83>
jmp    19dc <YUV422_to_RGB+0x8dc>
mov    %rdi,%r12
mov    %r13,%r15
mov    %rdx,%r11
mov    %rcx,%r14
mov    %r9,%r13
jmp    1a11 <YUV422_to_RGB+0x911>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x2,%r12
add    $0x1,%r15
add    $0x1,%r11
mov    %bpl,0x5(%r14)
add    $0x6,%r14
add    $0x2,%r10d
cmp    %r8d,%r10d
jge    1180 <YUV422_to_RGB+0x80>
movzbl (%r12),%eax
movzbl (%r15),%edi
lea    -0x80(%rdi),%esi
movzbl (%r11),%r9d
lea    -0x80(%r9),%ecx
imul   $0x12a,%eax,%edx
imul   $0x199,%ecx,%eax
add    %edx,%eax
add    $0x80,%eax
sar    $0x8,%eax
imul   $0xffffff9c,%esi,%ebp
imul   $0xffffff30,%ecx,%ebx
lea    (%rdx,%rbp,1),%ecx
add    $0x80,%ecx
add    %ebx,%ecx
sar    $0x8,%ecx
cmp    $0xff,%eax
mov    $0xff,%ebp
cmovge %ebp,%eax
test   %eax,%eax
jg     1a65 <YUV422_to_RGB+0x965>
xor    %eax,%eax
shl    $0x9,%esi
mov    %al,(%r14)
cmp    $0xff,%ecx
jl     1a78 <YUV422_to_RGB+0x978>
mov    $0xff,%ecx
lea    (%rsi,%rdi,4),%eax
add    $0xfffffe00,%eax
add    %edx,%eax
add    $0x80,%eax
sar    $0x8,%eax
test   %ecx,%ecx
jg     1a90 <YUV422_to_RGB+0x990>
xor    %ecx,%ecx
mov    %cl,0x1(%r14)
cmp    $0xff,%eax
cmovge %ebp,%eax
test   %eax,%eax
jg     1aa2 <YUV422_to_RGB+0x9a2>
xor    %eax,%eax
mov    %al,0x2(%r14)
movzbl 0x1(%r12),%eax
movzbl (%r15),%ecx
add    %ecx,%edi
add    $0xffffff00,%edi
sar    %edi
movzbl (%r11),%ecx
lea    (%rcx,%r9,1),%edx
add    $0xffffff00,%edx
sar    %edx
imul   $0x12a,%eax,%esi
imul   $0x199,%edx,%eax
lea    (%rsi,%rax,1),%ecx
add    $0x80,%ecx
sar    $0x8,%ecx
imul   $0xffffff9c,%edi,%eax
imul   $0xffffff30,%edx,%edx
lea    (%rsi,%rax,1),%ebx
add    $0x80,%ebx
add    %edx,%ebx
cmp    $0xff,%ecx
jl     1b03 <YUV422_to_RGB+0xa03>
mov    $0xff,%ecx
sar    $0x8,%ebx
test   %ecx,%ecx
jg     1b0c <YUV422_to_RGB+0xa0c>
xor    %ecx,%ecx
mov    %edi,%eax
shl    $0x9,%eax
mov    %cl,0x3(%r14)
cmp    $0xff,%ebx
jl     1b22 <YUV422_to_RGB+0xa22>
mov    $0xff,%ebx
lea    (%rax,%rdi,4),%eax
add    %esi,%eax
add    $0x80,%eax
sar    $0x8,%eax
test   %ebx,%ebx
jg     1b35 <YUV422_to_RGB+0xa35>
xor    %ebx,%ebx
mov    %bl,0x4(%r14)
cmp    $0xff,%eax
cmovl  %eax,%ebp
test   %ebp,%ebp
jg     19f0 <YUV422_to_RGB+0x8f0>
xor    %ebp,%ebp
jmp    19f0 <YUV422_to_RGB+0x8f0>
mov    %rcx,%r14
mov    %rdx,%r11
mov    %r13,%r15
mov    %rdi,%r12
jmp    1183 <YUV422_to_RGB+0x83>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @YUV422_to_RGB(i8* %0, i8* %1, i8* %2, i8* %3, i32 %4, i32 %5) {
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%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
store i8* %0, i8** %7
store i8* %1, i8** %8
store i8* %2, i8** %9
store i8* %3, i8** %10
store i32 %4, i32* %11
store i32 %5, i32* %12
store i32 0, i32* %19
br label %21
21: ; preds = %211, %6
%22 = load i32, i32* %19
%23 = load i32, i32* %12
%24 = icmp slt i32 %22, %23
br i1 %24, label %25, label %214
25: ; preds = %21
store i32 0, i32* %20
br label %26
26: ; preds = %207, %25
%27 = load i32, i32* %20
%28 = load i32, i32* %11
%29 = icmp slt i32 %27, %28
br i1 %29, label %30, label %210
30: ; preds = %26
%31 = load i8*, i8** %7
%32 = getelementptr inbounds i8, i8* %31, i32 1
store i8* %32, i8** %7
%33 = load i8, i8* %31
%34 = zext i8 %33 to i32
store i32 %34, i32* %16
%35 = load i8*, i8** %8
%36 = load i8, i8* %35
%37 = zext i8 %36 to i32
%38 = sub nsw i32 %37, 128
store i32 %38, i32* %17
%39 = load i8*, i8** %9
%40 = load i8, i8* %39
%41 = zext i8 %40 to i32
%42 = sub nsw i32 %41, 128
store i32 %42, i32* %18
%43 = load i32, i32* %16
%44 = mul nsw i32 298, %43
%45 = load i32, i32* %18
%46 = mul nsw i32 409, %45
%47 = add nsw i32 %44, %46
%48 = add nsw i32 %47, 128
%49 = ashr i32 %48, 8
store i32 %49, i32* %13
%50 = load i32, i32* %16
%51 = mul nsw i32 298, %50
%52 = load i32, i32* %17
%53 = mul nsw i32 100, %52
%54 = sub nsw i32 %51, %53
%55 = load i32, i32* %18
%56 = mul nsw i32 208, %55
%57 = sub nsw i32 %54, %56
%58 = add nsw i32 %57, 128
%59 = ashr i32 %58, 8
store i32 %59, i32* %14
%60 = load i32, i32* %16
%61 = mul nsw i32 298, %60
%62 = load i32, i32* %17
%63 = mul nsw i32 516, %62
%64 = add nsw i32 %61, %63
%65 = add nsw i32 %64, 128
%66 = ashr i32 %65, 8
store i32 %66, i32* %15
%67 = load i32, i32* %13
%68 = icmp slt i32 %67, 0
br i1 %68, label %69, label %70
69: ; preds = %30
br label %78
70: ; preds = %30
%71 = load i32, i32* %13
%72 = icmp sgt i32 %71, 255
br i1 %72, label %73, label %74
73: ; preds = %70
br label %76
74: ; preds = %70
%75 = load i32, i32* %13
br label %76
76: ; preds = %74, %73
%77 = phi i32 [ 255, %73 ], [ %75, %74 ]
br label %78
78: ; preds = %76, %69
%79 = phi i32 [ 0, %69 ], [ %77, %76 ]
%80 = trunc i32 %79 to i8
%81 = load i8*, i8** %10
%82 = getelementptr inbounds i8, i8* %81, i32 1
store i8* %82, i8** %10
store i8 %80, i8* %81
%83 = load i32, i32* %14
%84 = icmp slt i32 %83, 0
br i1 %84, label %85, label %86
85: ; preds = %78
br label %94
86: ; preds = %78
%87 = load i32, i32* %14
%88 = icmp sgt i32 %87, 255
br i1 %88, label %89, label %90
89: ; preds = %86
br label %92
90: ; preds = %86
%91 = load i32, i32* %14
br label %92
92: ; preds = %90, %89
%93 = phi i32 [ 255, %89 ], [ %91, %90 ]
br label %94
94: ; preds = %92, %85
%95 = phi i32 [ 0, %85 ], [ %93, %92 ]
%96 = trunc i32 %95 to i8
%97 = load i8*, i8** %10
%98 = getelementptr inbounds i8, i8* %97, i32 1
store i8* %98, i8** %10
store i8 %96, i8* %97
%99 = load i32, i32* %15
%100 = icmp slt i32 %99, 0
br i1 %100, label %101, label %102
101: ; preds = %94
br label %110
102: ; preds = %94
%103 = load i32, i32* %15
%104 = icmp sgt i32 %103, 255
br i1 %104, label %105, label %106
105: ; preds = %102
br label %108
106: ; preds = %102
%107 = load i32, i32* %15
br label %108
108: ; preds = %106, %105
%109 = phi i32 [ 255, %105 ], [ %107, %106 ]
br label %110
110: ; preds = %108, %101
%111 = phi i32 [ 0, %101 ], [ %109, %108 ]
%112 = trunc i32 %111 to i8
%113 = load i8*, i8** %10
%114 = getelementptr inbounds i8, i8* %113, i32 1
store i8* %114, i8** %10
store i8 %112, i8* %113
%115 = load i8*, i8** %7
%116 = getelementptr inbounds i8, i8* %115, i32 1
store i8* %116, i8** %7
%117 = load i8, i8* %115
%118 = zext i8 %117 to i32
store i32 %118, i32* %16
%119 = load i32, i32* %17
%120 = load i8*, i8** %8
%121 = getelementptr inbounds i8, i8* %120, i32 1
store i8* %121, i8** %8
%122 = load i8, i8* %120
%123 = zext i8 %122 to i32
%124 = add nsw i32 %119, %123
%125 = sub nsw i32 %124, 128
%126 = ashr i32 %125, 1
store i32 %126, i32* %17
%127 = load i32, i32* %18
%128 = load i8*, i8** %9
%129 = getelementptr inbounds i8, i8* %128, i32 1
store i8* %129, i8** %9
%130 = load i8, i8* %128
%131 = zext i8 %130 to i32
%132 = add nsw i32 %127, %131
%133 = sub nsw i32 %132, 128
%134 = ashr i32 %133, 1
store i32 %134, i32* %18
%135 = load i32, i32* %16
%136 = mul nsw i32 298, %135
%137 = load i32, i32* %18
%138 = mul nsw i32 409, %137
%139 = add nsw i32 %136, %138
%140 = add nsw i32 %139, 128
%141 = ashr i32 %140, 8
store i32 %141, i32* %13
%142 = load i32, i32* %16
%143 = mul nsw i32 298, %142
%144 = load i32, i32* %17
%145 = mul nsw i32 100, %144
%146 = sub nsw i32 %143, %145
%147 = load i32, i32* %18
%148 = mul nsw i32 208, %147
%149 = sub nsw i32 %146, %148
%150 = add nsw i32 %149, 128
%151 = ashr i32 %150, 8
store i32 %151, i32* %14
%152 = load i32, i32* %16
%153 = mul nsw i32 298, %152
%154 = load i32, i32* %17
%155 = mul nsw i32 516, %154
%156 = add nsw i32 %153, %155
%157 = add nsw i32 %156, 128
%158 = ashr i32 %157, 8
store i32 %158, i32* %15
%159 = load i32, i32* %13
%160 = icmp slt i32 %159, 0
br i1 %160, label %161, label %162
161: ; preds = %110
br label %170
162: ; preds = %110
%163 = load i32, i32* %13
%164 = icmp sgt i32 %163, 255
br i1 %164, label %165, label %166
165: ; preds = %162
br label %168
166: ; preds = %162
%167 = load i32, i32* %13
br label %168
168: ; preds = %166, %165
%169 = phi i32 [ 255, %165 ], [ %167, %166 ]
br label %170
170: ; preds = %168, %161
%171 = phi i32 [ 0, %161 ], [ %169, %168 ]
%172 = trunc i32 %171 to i8
%173 = load i8*, i8** %10
%174 = getelementptr inbounds i8, i8* %173, i32 1
store i8* %174, i8** %10
store i8 %172, i8* %173
%175 = load i32, i32* %14
%176 = icmp slt i32 %175, 0
br i1 %176, label %177, label %178
177: ; preds = %170
br label %186
178: ; preds = %170
%179 = load i32, i32* %14
%180 = icmp sgt i32 %179, 255
br i1 %180, label %181, label %182
181: ; preds = %178
br label %184
182: ; preds = %178
%183 = load i32, i32* %14
br label %184
184: ; preds = %182, %181
%185 = phi i32 [ 255, %181 ], [ %183, %182 ]
br label %186
186: ; preds = %184, %177
%187 = phi i32 [ 0, %177 ], [ %185, %184 ]
%188 = trunc i32 %187 to i8
%189 = load i8*, i8** %10
%190 = getelementptr inbounds i8, i8* %189, i32 1
store i8* %190, i8** %10
store i8 %188, i8* %189
%191 = load i32, i32* %15
%192 = icmp slt i32 %191, 0
br i1 %192, label %193, label %194
193: ; preds = %186
br label %202
194: ; preds = %186
%195 = load i32, i32* %15
%196 = icmp sgt i32 %195, 255
br i1 %196, label %197, label %198
197: ; preds = %194
br label %200
198: ; preds = %194
%199 = load i32, i32* %15
br label %200
200: ; preds = %198, %197
%201 = phi i32 [ 255, %197 ], [ %199, %198 ]
br label %202
202: ; preds = %200, %193
%203 = phi i32 [ 0, %193 ], [ %201, %200 ]
%204 = trunc i32 %203 to i8
%205 = load i8*, i8** %10
%206 = getelementptr inbounds i8, i8* %205, i32 1
store i8* %206, i8** %10
store i8 %204, i8* %205
br label %207
207: ; preds = %202
%208 = load i32, i32* %20
%209 = add nsw i32 %208, 2
store i32 %209, i32* %20
br label %26
210: ; preds = %26
br label %211
211: ; preds = %210
%212 = load i32, i32* %19
%213 = add nsw i32 %212, 1
store i32 %213, i32* %19
br label %21
214: ; preds = %21
ret i32 0
}

LLVM IR (-O2):
define i32 @YUV422_to_RGB(i8* nocapture %0, i8* nocapture %1, i8* nocapture %2, i8* nocapture writeonly %3, i32 %4, i32 %5) {
%7 = icmp sgt i32 %5, 0
br i1 %7, label %8, label %263
8: ; preds = %6
%9 = icmp sgt i32 %4, 0
%10 = add i32 %4, -1
%11 = lshr i32 %10, 1
%12 = zext i32 %11 to i64
%13 = mul nuw nsw i64 %12, 6
%14 = add nuw nsw i64 %13, 6
%15 = shl nuw nsw i64 %12, 1
%16 = add nuw nsw i64 %15, 2
%17 = add nuw nsw i64 %12, 1
%18 = add i32 %4, -1
%19 = lshr i32 %18, 1
%20 = add nuw i32 %19, 1
%21 = zext i32 %20 to i64
%22 = icmp ult i32 %18, 30
%23 = and i64 %21, 4294967280
%24 = trunc i64 %23 to i32
%25 = shl i32 %24, 1
%26 = shl nuw nsw i64 %23, 1
%27 = mul nuw nsw i64 %23, 6
%28 = icmp eq i64 %23, %21
br label %29
29: ; preds = %8, %256
%30 = phi i32 [ 0, %8 ], [ %261, %256 ]
%31 = phi i8* [ %0, %8 ], [ %260, %256 ]
%32 = phi i8* [ %1, %8 ], [ %259, %256 ]
%33 = phi i8* [ %2, %8 ], [ %258, %256 ]
%34 = phi i8* [ %3, %8 ], [ %257, %256 ]
br i1 %9, label %35, label %256
35: ; preds = %29
br i1 %22, label %156, label %36
36: ; preds = %35
%37 = getelementptr i8, i8* %34, i64 %14
%38 = getelementptr i8, i8* %31, i64 %16
%39 = getelementptr i8, i8* %32, i64 %17
%40 = getelementptr i8, i8* %33, i64 %17
%41 = icmp ult i8* %34, %38
%42 = icmp ult i8* %31, %37
%43 = and i1 %41, %42
%44 = icmp ult i8* %34, %39
%45 = icmp ult i8* %32, %37
%46 = and i1 %44, %45
%47 = or i1 %43, %46
%48 = icmp ult i8* %34, %40
%49 = icmp ult i8* %33, %37
%50 = and i1 %48, %49
%51 = or i1 %47, %50
br i1 %51, label %156, label %52
52: ; preds = %36
%53 = getelementptr i8, i8* %31, i64 %26
%54 = getelementptr i8, i8* %32, i64 %23
%55 = getelementptr i8, i8* %33, i64 %23
%56 = getelementptr i8, i8* %34, i64 %27
br label %57
57: ; preds = %57, %52
%58 = phi i64 [ 0, %52 ], [ %153, %57 ]
%59 = shl i64 %58, 1
%60 = getelementptr i8, i8* %31, i64 %59
%61 = getelementptr i8, i8* %32, i64 %58
%62 = getelementptr i8, i8* %33, i64 %58
%63 = mul i64 %58, 6
%64 = bitcast i8* %60 to <32 x i8>*
%65 = load <32 x i8>, <32 x i8>* %64
%66 = shufflevector <32 x i8> %65, <32 x i8> poison, <16 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14, i32 16, i32 18, i32 20, i32 22, i32 24, i32 26, i32 28, i32 30>
%67 = shufflevector <32 x i8> %65, <32 x i8> poison, <16 x i32> <i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 13, i32 15, i32 17, i32 19, i32 21, i32 23, i32 25, i32 27, i32 29, i32 31>
%68 = zext <16 x i8> %66 to <16 x i32>
%69 = bitcast i8* %61 to <16 x i8>*
%70 = load <16 x i8>, <16 x i8>* %69
%71 = zext <16 x i8> %70 to <16 x i32>
%72 = add nsw <16 x i32> %71, <i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128>
%73 = bitcast i8* %62 to <16 x i8>*
%74 = load <16 x i8>, <16 x i8>* %73
%75 = zext <16 x i8> %74 to <16 x i32>
%76 = add nsw <16 x i32> %75, <i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128>
%77 = mul nuw nsw <16 x i32> %68, <i32 298, i32 298, i32 298, i32 298, i32 298, i32 298, i32 298, i32 298, i32 298, i32 298, i32 298, i32 298, i32 298, i32 298, i32 298, i32 298>
%78 = mul nsw <16 x i32> %76, <i32 409, i32 409, i32 409, i32 409, i32 409, i32 409, i32 409, i32 409, i32 409, i32 409, i32 409, i32 409, i32 409, i32 409, i32 409, i32 409>
%79 = add nuw nsw <16 x i32> %77, <i32 128, i32 128, i32 128, i32 128, i32 128, i32 128, i32 128, i32 128, i32 128, i32 128, i32 128, i32 128, i32 128, i32 128, i32 128, i32 128>
%80 = add nsw <16 x i32> %79, %78
%81 = ashr <16 x i32> %80, <i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8>
%82 = mul nsw <16 x i32> %72, <i32 -100, i32 -100, i32 -100, i32 -100, i32 -100, i32 -100, i32 -100, i32 -100, i32 -100, i32 -100, i32 -100, i32 -100, i32 -100, i32 -100, i32 -100, i32 -100>
%83 = mul nsw <16 x i32> %76, <i32 -208, i32 -208, i32 -208, i32 -208, i32 -208, i32 -208, i32 -208, i32 -208, i32 -208, i32 -208, i32 -208, i32 -208, i32 -208, i32 -208, i32 -208, i32 -208>
%84 = add nsw <16 x i32> %79, %82
%85 = add nsw <16 x i32> %84, %83
%86 = ashr <16 x i32> %85, <i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8>
%87 = mul nsw <16 x i32> %72, <i32 516, i32 516, i32 516, i32 516, i32 516, i32 516, i32 516, i32 516, i32 516, i32 516, i32 516, i32 516, i32 516, i32 516, i32 516, i32 516>
%88 = add nsw <16 x i32> %79, %87
%89 = ashr <16 x i32> %88, <i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8>
%90 = icmp slt <16 x i32> %81, <i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255>
%91 = select <16 x i1> %90, <16 x i32> %81, <16 x i32> <i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255>
%92 = icmp sgt <16 x i32> %91, zeroinitializer
%93 = select <16 x i1> %92, <16 x i32> %91, <16 x i32> zeroinitializer
%94 = trunc <16 x i32> %93 to <16 x i8>
%95 = icmp slt <16 x i32> %86, <i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255>
%96 = select <16 x i1> %95, <16 x i32> %86, <16 x i32> <i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255>
%97 = icmp sgt <16 x i32> %96, zeroinitializer
%98 = select <16 x i1> %97, <16 x i32> %96, <16 x i32> zeroinitializer
%99 = trunc <16 x i32> %98 to <16 x i8>
%100 = icmp slt <16 x i32> %89, <i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255>
%101 = select <16 x i1> %100, <16 x i32> %89, <16 x i32> <i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255>
%102 = icmp sgt <16 x i32> %101, zeroinitializer
%103 = select <16 x i1> %102, <16 x i32> %101, <16 x i32> zeroinitializer
%104 = trunc <16 x i32> %103 to <16 x i8>
%105 = zext <16 x i8> %67 to <16 x i32>
%106 = bitcast i8* %61 to <16 x i8>*
%107 = load <16 x i8>, <16 x i8>* %106
%108 = zext <16 x i8> %107 to <16 x i32>
%109 = or <16 x i32> %71, <i32 -256, i32 -256, i32 -256, i32 -256, i32 -256, i32 -256, i32 -256, i32 -256, i32 -256, i32 -256, i32 -256, i32 -256, i32 -256, i32 -256, i32 -256, i32 -256>
%110 = add nsw <16 x i32> %109, %108
%111 = ashr <16 x i32> %110, <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>
%112 = bitcast i8* %62 to <16 x i8>*
%113 = load <16 x i8>, <16 x i8>* %112
%114 = zext <16 x i8> %113 to <16 x i32>
%115 = or <16 x i32> %75, <i32 -256, i32 -256, i32 -256, i32 -256, i32 -256, i32 -256, i32 -256, i32 -256, i32 -256, i32 -256, i32 -256, i32 -256, i32 -256, i32 -256, i32 -256, i32 -256>
%116 = add nsw <16 x i32> %115, %114
%117 = ashr <16 x i32> %116, <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>
%118 = mul nuw nsw <16 x i32> %105, <i32 298, i32 298, i32 298, i32 298, i32 298, i32 298, i32 298, i32 298, i32 298, i32 298, i32 298, i32 298, i32 298, i32 298, i32 298, i32 298>
%119 = mul nsw <16 x i32> %117, <i32 409, i32 409, i32 409, i32 409, i32 409, i32 409, i32 409, i32 409, i32 409, i32 409, i32 409, i32 409, i32 409, i32 409, i32 409, i32 409>
%120 = add nuw nsw <16 x i32> %118, <i32 128, i32 128, i32 128, i32 128, i32 128, i32 128, i32 128, i32 128, i32 128, i32 128, i32 128, i32 128, i32 128, i32 128, i32 128, i32 128>
%121 = add nsw <16 x i32> %120, %119
%122 = ashr <16 x i32> %121, <i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8>
%123 = mul nsw <16 x i32> %111, <i32 -100, i32 -100, i32 -100, i32 -100, i32 -100, i32 -100, i32 -100, i32 -100, i32 -100, i32 -100, i32 -100, i32 -100, i32 -100, i32 -100, i32 -100, i32 -100>
%124 = mul nsw <16 x i32> %117, <i32 -208, i32 -208, i32 -208, i32 -208, i32 -208, i32 -208, i32 -208, i32 -208, i32 -208, i32 -208, i32 -208, i32 -208, i32 -208, i32 -208, i32 -208, i32 -208>
%125 = add nsw <16 x i32> %120, %123
%126 = add nsw <16 x i32> %125, %124
%127 = ashr <16 x i32> %126, <i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8>
%128 = mul nsw <16 x i32> %111, <i32 516, i32 516, i32 516, i32 516, i32 516, i32 516, i32 516, i32 516, i32 516, i32 516, i32 516, i32 516, i32 516, i32 516, i32 516, i32 516>
%129 = add nsw <16 x i32> %120, %128
%130 = ashr <16 x i32> %129, <i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8>
%131 = icmp slt <16 x i32> %122, <i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255>
%132 = select <16 x i1> %131, <16 x i32> %122, <16 x i32> <i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255>
%133 = icmp sgt <16 x i32> %132, zeroinitializer
%134 = select <16 x i1> %133, <16 x i32> %132, <16 x i32> zeroinitializer
%135 = trunc <16 x i32> %134 to <16 x i8>
%136 = icmp slt <16 x i32> %127, <i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255>
%137 = select <16 x i1> %136, <16 x i32> %127, <16 x i32> <i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255>
%138 = icmp sgt <16 x i32> %137, zeroinitializer
%139 = select <16 x i1> %138, <16 x i32> %137, <16 x i32> zeroinitializer
%140 = trunc <16 x i32> %139 to <16 x i8>
%141 = icmp slt <16 x i32> %130, <i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255>
%142 = select <16 x i1> %141, <16 x i32> %130, <16 x i32> <i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255, i32 255>
%143 = icmp sgt <16 x i32> %142, zeroinitializer
%144 = select <16 x i1> %143, <16 x i32> %142, <16 x i32> zeroinitializer
%145 = trunc <16 x i32> %144 to <16 x i8>
%146 = getelementptr inbounds i8, i8* %34, i64 %63
%147 = bitcast i8* %146 to <96 x i8>*
%148 = shufflevector <16 x i8> %94, <16 x i8> %99, <32 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31>
%149 = shufflevector <16 x i8> %104, <16 x i8> %135, <32 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31>
%150 = shufflevector <32 x i8> %148, <32 x i8> %149, <64 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31, i32 32, i32 33, i32 34, i32 35, i32 36, i32 37, i32 38, i32 39, i32 40, i32 41, i32 42, i32 43, i32 44, i32 45, i32 46, i32 47, i32 48, i32 49, i32 50, i32 51, i32 52, i32 53, i32 54, i32 55, i32 56, i32 57, i32 58, i32 59, i32 60, i32 61, i32 62, i32 63>
%151 = shufflevector <16 x i8> %140, <16 x i8> %145, <64 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>
%152 = shufflevector <64 x i8> %150, <64 x i8> %151, <96 x i32> <i32 0, i32 16, i32 32, i32 48, i32 64, i32 80, i32 1, i32 17, i32 33, i32 49, i32 65, i32 81, i32 2, i32 18, i32 34, i32 50, i32 66, i32 82, i32 3, i32 19, i32 35, i32 51, i32 67, i32 83, i32 4, i32 20, i32 36, i32 52, i32 68, i32 84, i32 5, i32 21, i32 37, i32 53, i32 69, i32 85, i32 6, i32 22, i32 38, i32 54, i32 70, i32 86, i32 7, i32 23, i32 39, i32 55, i32 71, i32 87, i32 8, i32 24, i32 40, i32 56, i32 72, i32 88, i32 9, i32 25, i32 41, i32 57, i32 73, i32 89, i32 10, i32 26, i32 42, i32 58, i32 74, i32 90, i32 11, i32 27, i32 43, i32 59, i32 75, i32 91, i32 12, i32 28, i32 44, i32 60, i32 76, i32 92, i32 13, i32 29, i32 45, i32 61, i32 77, i32 93, i32 14, i32 30, i32 46, i32 62, i32 78, i32 94, i32 15, i32 31, i32 47, i32 63, i32 79, i32 95>
store <96 x i8> %152, <96 x i8>* %147
%153 = add nuw i64 %58, 16
%154 = icmp eq i64 %153, %23
br i1 %154, label %155, label %57
155: ; preds = %57
br i1 %28, label %256, label %156
156: ; preds = %36, %35, %155
%157 = phi i32 [ 0, %36 ], [ 0, %35 ], [ %25, %155 ]
%158 = phi i8* [ %31, %36 ], [ %31, %35 ], [ %53, %155 ]
%159 = phi i8* [ %32, %36 ], [ %32, %35 ], [ %54, %155 ]
%160 = phi i8* [ %33, %36 ], [ %33, %35 ], [ %55, %155 ]
%161 = phi i8* [ %34, %36 ], [ %34, %35 ], [ %56, %155 ]
br label %162
162: ; preds = %156, %162
%163 = phi i32 [ %254, %162 ], [ %157, %156 ]
%164 = phi i8* [ %208, %162 ], [ %158, %156 ]
%165 = phi i8* [ %211, %162 ], [ %159, %156 ]
%166 = phi i8* [ %217, %162 ], [ %160, %156 ]
%167 = phi i8* [ %253, %162 ], [ %161, %156 ]
%168 = getelementptr inbounds i8, i8* %164, i64 1
%169 = load i8, i8* %164
%170 = zext i8 %169 to i32
%171 = load i8, i8* %165
%172 = zext i8 %171 to i32
%173 = add nsw i32 %172, -128
%174 = load i8, i8* %166
%175 = zext i8 %174 to i32
%176 = add nsw i32 %175, -128
%177 = mul nuw nsw i32 %170, 298
%178 = mul nsw i32 %176, 409
%179 = add nuw nsw i32 %177, 128
%180 = add nsw i32 %179, %178
%181 = ashr i32 %180, 8
%182 = mul nsw i32 %173, -100
%183 = mul nsw i32 %176, -208
%184 = add nsw i32 %179, %182
%185 = add nsw i32 %184, %183
%186 = ashr i32 %185, 8
%187 = mul nsw i32 %173, 516
%188 = add nsw i32 %179, %187
%189 = ashr i32 %188, 8
%190 = icmp slt i32 %181, 255
%191 = select i1 %190, i32 %181, i32 255
%192 = icmp sgt i32 %191, 0
%193 = select i1 %192, i32 %191, i32 0
%194 = trunc i32 %193 to i8
%195 = getelementptr inbounds i8, i8* %167, i64 1
store i8 %194, i8* %167
%196 = icmp slt i32 %186, 255
%197 = select i1 %196, i32 %186, i32 255
%198 = icmp sgt i32 %197, 0
%199 = select i1 %198, i32 %197, i32 0
%200 = trunc i32 %199 to i8
%201 = getelementptr inbounds i8, i8* %167, i64 2
store i8 %200, i8* %195
%202 = icmp slt i32 %189, 255
%203 = select i1 %202, i32 %189, i32 255
%204 = icmp sgt i32 %203, 0
%205 = select i1 %204, i32 %203, i32 0
%206 = trunc i32 %205 to i8
%207 = getelementptr inbounds i8, i8* %167, i64 3
store i8 %206, i8* %201
%208 = getelementptr inbounds i8, i8* %164, i64 2
%209 = load i8, i8* %168
%210 = zext i8 %209 to i32
%211 = getelementptr inbounds i8, i8* %165, i64 1
%212 = load i8, i8* %165
%213 = zext i8 %212 to i32
%214 = or i32 %172, -256
%215 = add nsw i32 %214, %213
%216 = ashr i32 %215, 1
%217 = getelementptr inbounds i8, i8* %166, i64 1
%218 = load i8, i8* %166
%219 = zext i8 %218 to i32
%220 = or i32 %175, -256
%221 = add nsw i32 %220, %219
%222 = ashr i32 %221, 1
%223 = mul nuw nsw i32 %210, 298
%224 = mul nsw i32 %222, 409
%225 = add nuw nsw i32 %223, 128
%226 = add nsw i32 %225, %224
%227 = ashr i32 %226, 8
%228 = mul nsw i32 %216, -100
%229 = mul nsw i32 %222, -208
%230 = add nsw i32 %225, %228
%231 = add nsw i32 %230, %229
%232 = ashr i32 %231, 8
%233 = mul nsw i32 %216, 516
%234 = add nsw i32 %225, %233
%235 = ashr i32 %234, 8
%236 = icmp slt i32 %227, 255
%237 = select i1 %236, i32 %227, i32 255
%238 = icmp sgt i32 %237, 0
%239 = select i1 %238, i32 %237, i32 0
%240 = trunc i32 %239 to i8
%241 = getelementptr inbounds i8, i8* %167, i64 4
store i8 %240, i8* %207
%242 = icmp slt i32 %232, 255
%243 = select i1 %242, i32 %232, i32 255
%244 = icmp sgt i32 %243, 0
%245 = select i1 %244, i32 %243, i32 0
%246 = trunc i32 %245 to i8
%247 = getelementptr inbounds i8, i8* %167, i64 5
store i8 %246, i8* %241
%248 = icmp slt i32 %235, 255
%249 = select i1 %248, i32 %235, i32 255
%250 = icmp sgt i32 %249, 0
%251 = select i1 %250, i32 %249, i32 0
%252 = trunc i32 %251 to i8
%253 = getelementptr inbounds i8, i8* %167, i64 6
store i8 %252, i8* %247
%254 = add nuw nsw i32 %163, 2
%255 = icmp slt i32 %254, %4
br i1 %255, label %162, label %256
256: ; preds = %162, %155, %29
%257 = phi i8* [ %34, %29 ], [ %56, %155 ], [ %253, %162 ]
%258 = phi i8* [ %33, %29 ], [ %55, %155 ], [ %217, %162 ]
%259 = phi i8* [ %32, %29 ], [ %54, %155 ], [ %211, %162 ]
%260 = phi i8* [ %31, %29 ], [ %53, %155 ], [ %208, %162 ]
%261 = add nuw nsw i32 %30, 1
%262 = icmp eq i32 %261, %5
br i1 %262, label %263, label %29
263: ; preds = %256, %6
ret i32 0
}