#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 */
typedef struct TYPE_17__ TYPE_1__;

/* Type definitions */
struct TYPE_17__ {
  int member_0;
  int member_1;
};
typedef TYPE_1__ __m128i;

/* Variables and functions */
TYPE_1__ _mm_and_si128(TYPE_1__, TYPE_1__ const);
TYPE_1__ _mm_packs_epi32(TYPE_1__, TYPE_1__);
TYPE_1__ _mm_packus_epi16(TYPE_1__, TYPE_1__);
TYPE_1__ _mm_srli_si128(TYPE_1__, int);
extern void repack_yuyv_to_yuv422p_sse2(__m128i *input, __m128i *y_output,
                                        __m128i *u_output, __m128i *v_output) {
  static const __m128i mask_luma = {0x00FF00FF00FF00FFLL, 0x00FF00FF00FF00FFLL};
  static const __m128i mask_cb = {0x0000FF000000FF00LL, 0x0000FF000000FF00LL};
  static const __m128i mask_cr = {0xFF000000FF000000LL, 0xFF000000FF000000LL};
  __m128i scratch = {0x0LL, 0x0LL};
  __m128i scratch2 = {0x0LL, 0x0LL};
  __m128i scratch3 = {0x0LL, 0x0LL};
  ;
  (scratch) = _mm_and_si128((input)[0], (mask_luma));
  (scratch2) = _mm_and_si128((input)[1], (mask_luma));
  (y_output[0]) = (_mm_packus_epi16((scratch), (scratch2)));
  (scratch) = _mm_and_si128((input)[2], (mask_luma));
  (scratch2) = _mm_and_si128((input)[3], (mask_luma));
  (y_output[1]) = (_mm_packus_epi16((scratch), (scratch2)));
  (scratch) = _mm_and_si128((input)[0], (mask_cb));
  (scratch) = _mm_srli_si128((scratch), 1);
  (scratch2) = _mm_and_si128((input)[1], (mask_cb));
  (scratch2) = _mm_srli_si128((scratch2), 1);
  (scratch) = _mm_packs_epi32((scratch), (scratch2));
  (scratch2) = _mm_and_si128((input)[2], (mask_cb));
  (scratch2) = _mm_srli_si128((scratch2), 1);
  (scratch3) = _mm_and_si128((input)[3], (mask_cb));
  (scratch3) = _mm_srli_si128((scratch3), 1);
  (scratch2) = _mm_packs_epi32((scratch2), (scratch3));
  (*u_output) = (_mm_packus_epi16((scratch), (scratch2)));
  (scratch) = _mm_and_si128((input)[0], (mask_cr));
  (scratch) = _mm_srli_si128((scratch), 3);
  (scratch2) = _mm_and_si128((input)[1], (mask_cr));
  (scratch2) = _mm_srli_si128((scratch2), 3);
  (scratch) = _mm_packs_epi32((scratch), (scratch2));
  (scratch2) = _mm_and_si128((input)[2], (mask_cr));
  (scratch2) = _mm_srli_si128((scratch2), 3);
  (scratch3) = _mm_and_si128((input)[3], (mask_cr));
  (scratch3) = _mm_srli_si128((scratch3), 3);
  (scratch2) = _mm_packs_epi32((scratch2), (scratch3));
  (*v_output) = (_mm_packus_epi16((scratch), (scratch2)));
}


x86 assembly (clang, -O0):
<repack_yuyv_to_yuv422p_sse2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x140,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
lea    -0x28(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1050 <memset@plt>
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1050 <memset@plt>
lea    -0x38(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1050 <memset@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    0xe57(%rip),%rsi
call   1070 <_mm_and_si128@plt>
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rdi
mov    0xe37(%rip),%rsi
call   1070 <_mm_and_si128@plt>
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x138(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1030 <_mm_packus_epi16@plt>
mov    %rax,%rcx
mov    -0x138(%rbp),%rax
mov    %rcx,-0x50(%rbp)
mov    -0x50(%rbp),%rcx
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%rdi
mov    0xdea(%rip),%rsi
call   1070 <_mm_and_si128@plt>
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%rdi
mov    0xdca(%rip),%rsi
call   1070 <_mm_and_si128@plt>
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x130(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1030 <_mm_packus_epi16@plt>
mov    %rax,%rcx
mov    -0x130(%rbp),%rax
mov    %rcx,-0x68(%rbp)
mov    -0x68(%rbp),%rcx
mov    %rcx,0x8(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    0xd85(%rip),%rsi
call   1070 <_mm_and_si128@plt>
mov    %rax,-0x70(%rbp)
mov    -0x70(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    $0x1,%esi
call   1060 <_mm_srli_si128@plt>
mov    %rax,-0x78(%rbp)
mov    -0x78(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rdi
mov    0xd4b(%rip),%rsi
call   1070 <_mm_and_si128@plt>
mov    %rax,-0x80(%rbp)
mov    -0x80(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
mov    $0x1,%esi
call   1060 <_mm_srli_si128@plt>
mov    %rax,-0x88(%rbp)
mov    -0x88(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1040 <_mm_packs_epi32@plt>
mov    %rax,-0x90(%rbp)
mov    -0x90(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%rdi
mov    0xcec(%rip),%rsi
call   1070 <_mm_and_si128@plt>
mov    %rax,-0x98(%rbp)
mov    -0x98(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
mov    $0x1,%esi
call   1060 <_mm_srli_si128@plt>
mov    %rax,-0xa0(%rbp)
mov    -0xa0(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%rdi
mov    0xca6(%rip),%rsi
call   1070 <_mm_and_si128@plt>
mov    %rax,-0xa8(%rbp)
mov    -0xa8(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rdi
mov    $0x1,%esi
call   1060 <_mm_srli_si128@plt>
mov    %rax,-0xb0(%rbp)
mov    -0xb0(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rsi
call   1040 <_mm_packs_epi32@plt>
mov    %rax,-0xb8(%rbp)
mov    -0xb8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x128(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1030 <_mm_packus_epi16@plt>
mov    %rax,%rcx
mov    -0x128(%rbp),%rax
mov    %rcx,-0xc0(%rbp)
mov    -0xc0(%rbp),%rcx
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    0xc17(%rip),%rsi
call   1070 <_mm_and_si128@plt>
mov    %rax,-0xc8(%rbp)
mov    -0xc8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    $0x3,%esi
call   1060 <_mm_srli_si128@plt>
mov    %rax,-0xd0(%rbp)
mov    -0xd0(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rdi
mov    0xbd1(%rip),%rsi
call   1070 <_mm_and_si128@plt>
mov    %rax,-0xd8(%rbp)
mov    -0xd8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
mov    $0x3,%esi
call   1060 <_mm_srli_si128@plt>
mov    %rax,-0xe0(%rbp)
mov    -0xe0(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1040 <_mm_packs_epi32@plt>
mov    %rax,-0xe8(%rbp)
mov    -0xe8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%rdi
mov    0xb6c(%rip),%rsi
call   1070 <_mm_and_si128@plt>
mov    %rax,-0xf0(%rbp)
mov    -0xf0(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
mov    $0x3,%esi
call   1060 <_mm_srli_si128@plt>
mov    %rax,-0xf8(%rbp)
mov    -0xf8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%rdi
mov    0xb26(%rip),%rsi
call   1070 <_mm_and_si128@plt>
mov    %rax,-0x100(%rbp)
mov    -0x100(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rdi
mov    $0x3,%esi
call   1060 <_mm_srli_si128@plt>
mov    %rax,-0x108(%rbp)
mov    -0x108(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rsi
call   1040 <_mm_packs_epi32@plt>
mov    %rax,-0x110(%rbp)
mov    -0x110(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x120(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1030 <_mm_packus_epi16@plt>
mov    %rax,%rcx
mov    -0x120(%rbp),%rax
mov    %rcx,-0x118(%rbp)
mov    -0x118(%rbp),%rcx
mov    %rcx,(%rax)
add    $0x140,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<repack_yuyv_to_yuv422p_sse2>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%rbx
mov    (%rdi),%rdi
movabs $0xff00ff00ff00ff,%r13
mov    %r13,%rsi
call   1060 <_mm_and_si128@plt>
mov    %rax,%rbp
mov    0x8(%rbx),%rdi
mov    %r13,%rsi
call   1060 <_mm_and_si128@plt>
mov    %rbp,%rdi
mov    %rax,%rsi
call   1030 <_mm_packus_epi16@plt>
mov    %rax,(%r12)
mov    0x10(%rbx),%rdi
mov    %r13,%rsi
call   1060 <_mm_and_si128@plt>
mov    %rax,%rbp
mov    0x18(%rbx),%rdi
mov    %r13,%rsi
call   1060 <_mm_and_si128@plt>
mov    %rbp,%rdi
mov    %rax,%rsi
call   1030 <_mm_packus_epi16@plt>
mov    %rax,0x8(%r12)
mov    (%rbx),%rdi
movabs $0xff000000ff00,%r12
mov    %r12,%rsi
call   1060 <_mm_and_si128@plt>
mov    %rax,%rdi
mov    $0x1,%esi
call   1050 <_mm_srli_si128@plt>
mov    %rax,%rbp
mov    0x8(%rbx),%rdi
mov    %r12,%rsi
call   1060 <_mm_and_si128@plt>
mov    %rax,%rdi
mov    $0x1,%esi
call   1050 <_mm_srli_si128@plt>
mov    %rbp,%rdi
mov    %rax,%rsi
call   1040 <_mm_packs_epi32@plt>
mov    %rax,%r13
mov    0x10(%rbx),%rdi
mov    %r12,%rsi
call   1060 <_mm_and_si128@plt>
mov    %rax,%rdi
mov    $0x1,%esi
call   1050 <_mm_srli_si128@plt>
mov    %rax,%rbp
mov    0x18(%rbx),%rdi
mov    %r12,%rsi
call   1060 <_mm_and_si128@plt>
mov    %rax,%rdi
mov    $0x1,%esi
call   1050 <_mm_srli_si128@plt>
mov    %rbp,%rdi
mov    %rax,%rsi
call   1040 <_mm_packs_epi32@plt>
mov    %r13,%rdi
mov    %rax,%rsi
call   1030 <_mm_packus_epi16@plt>
mov    %rax,(%r15)
mov    (%rbx),%rdi
movabs $0xff000000ff000000,%r15
mov    %r15,%rsi
call   1060 <_mm_and_si128@plt>
mov    %rax,%rdi
mov    $0x3,%esi
call   1050 <_mm_srli_si128@plt>
mov    %rax,%rbp
mov    0x8(%rbx),%rdi
mov    %r15,%rsi
call   1060 <_mm_and_si128@plt>
mov    %rax,%rdi
mov    $0x3,%esi
call   1050 <_mm_srli_si128@plt>
mov    %rbp,%rdi
mov    %rax,%rsi
call   1040 <_mm_packs_epi32@plt>
mov    %rax,%r12
mov    0x10(%rbx),%rdi
mov    %r15,%rsi
call   1060 <_mm_and_si128@plt>
mov    %rax,%rdi
mov    $0x3,%esi
call   1050 <_mm_srli_si128@plt>
mov    %rax,%rbp
mov    0x18(%rbx),%rdi
mov    %r15,%rsi
call   1060 <_mm_and_si128@plt>
mov    %rax,%rdi
mov    $0x3,%esi
call   1050 <_mm_srli_si128@plt>
mov    %rbp,%rdi
mov    %rax,%rsi
call   1040 <_mm_packs_epi32@plt>
mov    %r12,%rdi
mov    %rax,%rsi
call   1030 <_mm_packus_epi16@plt>
mov    %rax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
%struct.TYPE_17__ = type { i32, i32 }
define void @repack_yuyv_to_yuv422p_sse2(%struct.TYPE_17__* nocapture %0, %struct.TYPE_17__* nocapture writeonly %1, %struct.TYPE_17__* nocapture writeonly %2, %struct.TYPE_17__* nocapture writeonly %3) {
%5 = bitcast %struct.TYPE_17__* %0 to i64*
%6 = load i64, i64* %5
%7 = tail call i64 @_mm_and_si128(i64 %6, i64 71777214294589695)
%8 = getelementptr inbounds %struct.TYPE_17__, %struct.TYPE_17__* %0, i64 1
%9 = bitcast %struct.TYPE_17__* %8 to i64*
%10 = load i64, i64* %9
%11 = tail call i64 @_mm_and_si128(i64 %10, i64 71777214294589695)
%12 = tail call i64 @_mm_packus_epi16(i64 %7, i64 %11)
%13 = bitcast %struct.TYPE_17__* %1 to i64*
store i64 %12, i64* %13
%14 = getelementptr inbounds %struct.TYPE_17__, %struct.TYPE_17__* %0, i64 2
%15 = bitcast %struct.TYPE_17__* %14 to i64*
%16 = load i64, i64* %15
%17 = tail call i64 @_mm_and_si128(i64 %16, i64 71777214294589695)
%18 = getelementptr inbounds %struct.TYPE_17__, %struct.TYPE_17__* %0, i64 3
%19 = bitcast %struct.TYPE_17__* %18 to i64*
%20 = load i64, i64* %19
%21 = tail call i64 @_mm_and_si128(i64 %20, i64 71777214294589695)
%22 = tail call i64 @_mm_packus_epi16(i64 %17, i64 %21)
%23 = getelementptr inbounds %struct.TYPE_17__, %struct.TYPE_17__* %1, i64 1
%24 = bitcast %struct.TYPE_17__* %23 to i64*
store i64 %22, i64* %24
%25 = load i64, i64* %5
%26 = tail call i64 @_mm_and_si128(i64 %25, i64 280375465148160)
%27 = tail call i64 @_mm_srli_si128(i64 %26, i32 1)
%28 = load i64, i64* %9
%29 = tail call i64 @_mm_and_si128(i64 %28, i64 280375465148160)
%30 = tail call i64 @_mm_srli_si128(i64 %29, i32 1)
%31 = tail call i64 @_mm_packs_epi32(i64 %27, i64 %30)
%32 = load i64, i64* %15
%33 = tail call i64 @_mm_and_si128(i64 %32, i64 280375465148160)
%34 = tail call i64 @_mm_srli_si128(i64 %33, i32 1)
%35 = load i64, i64* %19
%36 = tail call i64 @_mm_and_si128(i64 %35, i64 280375465148160)
%37 = tail call i64 @_mm_srli_si128(i64 %36, i32 1)
%38 = tail call i64 @_mm_packs_epi32(i64 %34, i64 %37)
%39 = tail call i64 @_mm_packus_epi16(i64 %31, i64 %38)
%40 = bitcast %struct.TYPE_17__* %2 to i64*
store i64 %39, i64* %40
%41 = load i64, i64* %5
%42 = tail call i64 @_mm_and_si128(i64 %41, i64 -72057589759737856)
%43 = tail call i64 @_mm_srli_si128(i64 %42, i32 3)
%44 = load i64, i64* %9
%45 = tail call i64 @_mm_and_si128(i64 %44, i64 -72057589759737856)
%46 = tail call i64 @_mm_srli_si128(i64 %45, i32 3)
%47 = tail call i64 @_mm_packs_epi32(i64 %43, i64 %46)
%48 = load i64, i64* %15
%49 = tail call i64 @_mm_and_si128(i64 %48, i64 -72057589759737856)
%50 = tail call i64 @_mm_srli_si128(i64 %49, i32 3)
%51 = load i64, i64* %19
%52 = tail call i64 @_mm_and_si128(i64 %51, i64 -72057589759737856)
%53 = tail call i64 @_mm_srli_si128(i64 %52, i32 3)
%54 = tail call i64 @_mm_packs_epi32(i64 %50, i64 %53)
%55 = tail call i64 @_mm_packus_epi16(i64 %47, i64 %54)
%56 = bitcast %struct.TYPE_17__* %3 to i64*
store i64 %55, i64* %56
ret void
}