#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_uyvy_to_yuv422p_sse2(__m128i *input, __m128i *y_output,
                                        __m128i *u_output, __m128i *v_output) {
  static const __m128i mask_luma = {0xFF00FF00FF00FF00LL, 0xFF00FF00FF00FF00LL};
  static const __m128i mask_cb = {0x000000FF000000FFLL, 0x000000FF000000FFLL};
  static const __m128i mask_cr = {0x00FF000000FF0000LL, 0x00FF000000FF0000LL};
  __m128i scratch = {0x0LL, 0x0LL};
  __m128i scratch2 = {0x0LL, 0x0LL};
  __m128i scratch3 = {0x0LL, 0x0LL};
  ;
  (scratch) = _mm_and_si128((input)[0], (mask_luma));
  (scratch) = _mm_srli_si128((scratch), 1);
  (scratch2) = _mm_and_si128((input)[1], (mask_luma));
  (scratch2) = _mm_srli_si128((scratch2), 1);
  (y_output[0]) = (_mm_packus_epi16((scratch), (scratch2)));
  (scratch) = _mm_and_si128((input)[2], (mask_luma));
  (scratch) = _mm_srli_si128((scratch), 1);
  (scratch2) = _mm_and_si128((input)[3], (mask_luma));
  (scratch2) = _mm_srli_si128((scratch2), 1);
  (y_output[1]) = (_mm_packus_epi16((scratch), (scratch2)));
  (scratch) = _mm_and_si128((input)[0], (mask_cb));
  (scratch2) = _mm_and_si128((input)[1], (mask_cb));
  (scratch) = _mm_packs_epi32((scratch), (scratch2));
  (scratch2) = _mm_and_si128((input)[2], (mask_cb));
  (scratch3) = _mm_and_si128((input)[3], (mask_cb));
  (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), 2);
  (scratch2) = _mm_and_si128((input)[1], (mask_cr));
  (scratch2) = _mm_srli_si128((scratch2), 2);
  (scratch) = _mm_packs_epi32((scratch), (scratch2));
  (scratch2) = _mm_and_si128((input)[2], (mask_cr));
  (scratch2) = _mm_srli_si128((scratch2), 2);
  (scratch3) = _mm_and_si128((input)[3], (mask_cr));
  (scratch3) = _mm_srli_si128((scratch3), 2);
  (scratch2) = _mm_packs_epi32((scratch2), (scratch3));
  (*v_output) = (_mm_packus_epi16((scratch), (scratch2)));
}


x86 assembly (clang, -O0):
<repack_uyvy_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    -0x28(%rbp),%rdi
mov    $0x1,%esi
call   1060 <_mm_srli_si128@plt>
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rdi
mov    0xe1d(%rip),%rsi
call   1070 <_mm_and_si128@plt>
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
mov    $0x1,%esi
call   1060 <_mm_srli_si128@plt>
mov    %rax,-0x58(%rbp)
mov    -0x58(%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,-0x60(%rbp)
mov    -0x60(%rbp),%rcx
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%rdi
mov    0xdb6(%rip),%rsi
call   1070 <_mm_and_si128@plt>
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    $0x1,%esi
call   1060 <_mm_srli_si128@plt>
mov    %rax,-0x70(%rbp)
mov    -0x70(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%rdi
mov    0xd7c(%rip),%rsi
call   1070 <_mm_and_si128@plt>
mov    %rax,-0x78(%rbp)
mov    -0x78(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
mov    $0x1,%esi
call   1060 <_mm_srli_si128@plt>
mov    %rax,-0x80(%rbp)
mov    -0x80(%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,-0x88(%rbp)
mov    -0x88(%rbp),%rcx
mov    %rcx,0x8(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    0xd17(%rip),%rsi
call   1070 <_mm_and_si128@plt>
mov    %rax,-0x90(%rbp)
mov    -0x90(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rdi
mov    0xcf1(%rip),%rsi
call   1070 <_mm_and_si128@plt>
mov    %rax,-0x98(%rbp)
mov    -0x98(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1040 <_mm_packs_epi32@plt>
mov    %rax,-0xa0(%rbp)
mov    -0xa0(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%rdi
mov    0xcac(%rip),%rsi
call   1070 <_mm_and_si128@plt>
mov    %rax,-0xa8(%rbp)
mov    -0xa8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%rdi
mov    0xc86(%rip),%rsi
call   1070 <_mm_and_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    $0x2,%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    $0x2,%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    $0x2,%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    $0x2,%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_uyvy_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 $0xff00ff00ff00ff00,%r13
mov    %r13,%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    %r13,%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   1030 <_mm_packus_epi16@plt>
mov    %rax,(%r12)
mov    0x10(%rbx),%rdi
mov    %r13,%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    %r13,%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   1030 <_mm_packus_epi16@plt>
mov    %rax,0x8(%r12)
mov    (%rbx),%rdi
movabs $0xff000000ff,%r12
mov    %r12,%rsi
call   1060 <_mm_and_si128@plt>
mov    %rax,%rbp
mov    0x8(%rbx),%rdi
mov    %r12,%rsi
call   1060 <_mm_and_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,%rbp
mov    0x18(%rbx),%rdi
mov    %r12,%rsi
call   1060 <_mm_and_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 $0xff000000ff0000,%r15
mov    %r15,%rsi
call   1060 <_mm_and_si128@plt>
mov    %rax,%rdi
mov    $0x2,%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    $0x2,%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    $0x2,%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    $0x2,%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_uyvy_to_yuv422p_sse2.mask_luma = internal constant %struct.TYPE_17__ { i32 -16711936, i32 -16711936 }
@repack_uyvy_to_yuv422p_sse2.mask_cb = internal constant %struct.TYPE_17__ { i32 255, i32 255 }
@repack_uyvy_to_yuv422p_sse2.mask_cr = internal constant %struct.TYPE_17__ { i32 16711680, i32 16711680 }
define void @repack_uyvy_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_uyvy_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 = bitcast %struct.TYPE_17__* %9 to i64*
%53 = load i64, i64* %52
%54 = call i64 @_mm_srli_si128(i64 %53, i32 1)
%55 = bitcast %struct.TYPE_17__* %13 to i64*
store i64 %54, i64* %55
%56 = bitcast %struct.TYPE_17__* %9 to i8*
%57 = bitcast %struct.TYPE_17__* %13 to i8*
%58 = load %struct.TYPE_17__*, %struct.TYPE_17__** %5
%59 = getelementptr inbounds %struct.TYPE_17__, %struct.TYPE_17__* %58, i64 1
%60 = bitcast %struct.TYPE_17__* %59 to i64*
%61 = load i64, i64* %60
%62 = load i64, i64* bitcast (%struct.TYPE_17__* @repack_uyvy_to_yuv422p_sse2.mask_luma to i64*)
%63 = call i64 @_mm_and_si128(i64 %61, i64 %62)
%64 = bitcast %struct.TYPE_17__* %14 to i64*
store i64 %63, i64* %64
%65 = bitcast %struct.TYPE_17__* %10 to i8*
%66 = bitcast %struct.TYPE_17__* %14 to i8*
%67 = bitcast %struct.TYPE_17__* %10 to i64*
%68 = load i64, i64* %67
%69 = call i64 @_mm_srli_si128(i64 %68, i32 1)
%70 = bitcast %struct.TYPE_17__* %15 to i64*
store i64 %69, i64* %70
%71 = bitcast %struct.TYPE_17__* %10 to i8*
%72 = bitcast %struct.TYPE_17__* %15 to i8*
%73 = load %struct.TYPE_17__*, %struct.TYPE_17__** %6
%74 = getelementptr inbounds %struct.TYPE_17__, %struct.TYPE_17__* %73, i64 0
%75 = bitcast %struct.TYPE_17__* %9 to i64*
%76 = load i64, i64* %75
%77 = bitcast %struct.TYPE_17__* %10 to i64*
%78 = load i64, i64* %77
%79 = call i64 @_mm_packus_epi16(i64 %76, i64 %78)
%80 = bitcast %struct.TYPE_17__* %16 to i64*
store i64 %79, i64* %80
%81 = bitcast %struct.TYPE_17__* %74 to i8*
%82 = bitcast %struct.TYPE_17__* %16 to i8*
%83 = load %struct.TYPE_17__*, %struct.TYPE_17__** %5
%84 = getelementptr inbounds %struct.TYPE_17__, %struct.TYPE_17__* %83, i64 2
%85 = bitcast %struct.TYPE_17__* %84 to i64*
%86 = load i64, i64* %85
%87 = load i64, i64* bitcast (%struct.TYPE_17__* @repack_uyvy_to_yuv422p_sse2.mask_luma to i64*)
%88 = call i64 @_mm_and_si128(i64 %86, i64 %87)
%89 = bitcast %struct.TYPE_17__* %17 to i64*
store i64 %88, i64* %89
%90 = bitcast %struct.TYPE_17__* %9 to i8*
%91 = bitcast %struct.TYPE_17__* %17 to i8*
%92 = bitcast %struct.TYPE_17__* %9 to i64*
%93 = load i64, i64* %92
%94 = call i64 @_mm_srli_si128(i64 %93, i32 1)
%95 = bitcast %struct.TYPE_17__* %18 to i64*
store i64 %94, i64* %95
%96 = bitcast %struct.TYPE_17__* %9 to i8*
%97 = bitcast %struct.TYPE_17__* %18 to i8*
%98 = load %struct.TYPE_17__*, %struct.TYPE_17__** %5
%99 = getelementptr inbounds %struct.TYPE_17__, %struct.TYPE_17__* %98, i64 3
%100 = bitcast %struct.TYPE_17__* %99 to i64*
%101 = load i64, i64* %100
%102 = load i64, i64* bitcast (%struct.TYPE_17__* @repack_uyvy_to_yuv422p_sse2.mask_luma to i64*)
%103 = call i64 @_mm_and_si128(i64 %101, i64 %102)
%104 = bitcast %struct.TYPE_17__* %19 to i64*
store i64 %103, i64* %104
%105 = bitcast %struct.TYPE_17__* %10 to i8*
%106 = bitcast %struct.TYPE_17__* %19 to i8*
%107 = bitcast %struct.TYPE_17__* %10 to i64*
%108 = load i64, i64* %107
%109 = call i64 @_mm_srli_si128(i64 %108, i32 1)
%110 = bitcast %struct.TYPE_17__* %20 to i64*
store i64 %109, i64* %110
%111 = bitcast %struct.TYPE_17__* %10 to i8*
%112 = bitcast %struct.TYPE_17__* %20 to i8*
%113 = load %struct.TYPE_17__*, %struct.TYPE_17__** %6
%114 = getelementptr inbounds %struct.TYPE_17__, %struct.TYPE_17__* %113, i64 1
%115 = bitcast %struct.TYPE_17__* %9 to i64*
%116 = load i64, i64* %115
%117 = bitcast %struct.TYPE_17__* %10 to i64*
%118 = load i64, i64* %117
%119 = call i64 @_mm_packus_epi16(i64 %116, i64 %118)
%120 = bitcast %struct.TYPE_17__* %21 to i64*
store i64 %119, i64* %120
%121 = bitcast %struct.TYPE_17__* %114 to i8*
%122 = bitcast %struct.TYPE_17__* %21 to i8*
%123 = load %struct.TYPE_17__*, %struct.TYPE_17__** %5
%124 = getelementptr inbounds %struct.TYPE_17__, %struct.TYPE_17__* %123, i64 0
%125 = bitcast %struct.TYPE_17__* %124 to i64*
%126 = load i64, i64* %125
%127 = load i64, i64* bitcast (%struct.TYPE_17__* @repack_uyvy_to_yuv422p_sse2.mask_cb to i64*)
%128 = call i64 @_mm_and_si128(i64 %126, i64 %127)
%129 = bitcast %struct.TYPE_17__* %22 to i64*
store i64 %128, i64* %129
%130 = bitcast %struct.TYPE_17__* %9 to i8*
%131 = bitcast %struct.TYPE_17__* %22 to i8*
%132 = load %struct.TYPE_17__*, %struct.TYPE_17__** %5
%133 = getelementptr inbounds %struct.TYPE_17__, %struct.TYPE_17__* %132, i64 1
%134 = bitcast %struct.TYPE_17__* %133 to i64*
%135 = load i64, i64* %134
%136 = load i64, i64* bitcast (%struct.TYPE_17__* @repack_uyvy_to_yuv422p_sse2.mask_cb to i64*)
%137 = call i64 @_mm_and_si128(i64 %135, i64 %136)
%138 = bitcast %struct.TYPE_17__* %23 to i64*
store i64 %137, i64* %138
%139 = bitcast %struct.TYPE_17__* %10 to i8*
%140 = bitcast %struct.TYPE_17__* %23 to i8*
%141 = bitcast %struct.TYPE_17__* %9 to i64*
%142 = load i64, i64* %141
%143 = bitcast %struct.TYPE_17__* %10 to i64*
%144 = load i64, i64* %143
%145 = call i64 @_mm_packs_epi32(i64 %142, i64 %144)
%146 = bitcast %struct.TYPE_17__* %24 to i64*
store i64 %145, i64* %146
%147 = bitcast %struct.TYPE_17__* %9 to i8*
%148 = bitcast %struct.TYPE_17__* %24 to i8*
%149 = load %struct.TYPE_17__*, %struct.TYPE_17__** %5
%150 = getelementptr inbounds %struct.TYPE_17__, %struct.TYPE_17__* %149, i64 2
%151 = bitcast %struct.TYPE_17__* %150 to i64*
%152 = load i64, i64* %151
%153 = load i64, i64* bitcast (%struct.TYPE_17__* @repack_uyvy_to_yuv422p_sse2.mask_cb to i64*)
%154 = call i64 @_mm_and_si128(i64 %152, i64 %153)
%155 = bitcast %struct.TYPE_17__* %25 to i64*
store i64 %154, i64* %155
%156 = bitcast %struct.TYPE_17__* %10 to i8*
%157 = bitcast %struct.TYPE_17__* %25 to i8*
%158 = load %struct.TYPE_17__*, %struct.TYPE_17__** %5
%159 = getelementptr inbounds %struct.TYPE_17__, %struct.TYPE_17__* %158, i64 3
%160 = bitcast %struct.TYPE_17__* %159 to i64*
%161 = load i64, i64* %160
%162 = load i64, i64* bitcast (%struct.TYPE_17__* @repack_uyvy_to_yuv422p_sse2.mask_cb to i64*)
%163 = call i64 @_mm_and_si128(i64 %161, i64 %162)
%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_uyvy_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 2)
%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_uyvy_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 2)
%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_uyvy_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 2)
%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_uyvy_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 2)
%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_uyvy_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 -71777214294589696)
%8 = tail call i64 @_mm_srli_si128(i64 %7, i32 1)
%9 = getelementptr inbounds %struct.TYPE_17__, %struct.TYPE_17__* %0, i64 1
%10 = bitcast %struct.TYPE_17__* %9 to i64*
%11 = load i64, i64* %10
%12 = tail call i64 @_mm_and_si128(i64 %11, i64 -71777214294589696)
%13 = tail call i64 @_mm_srli_si128(i64 %12, i32 1)
%14 = tail call i64 @_mm_packus_epi16(i64 %8, i64 %13)
%15 = bitcast %struct.TYPE_17__* %1 to i64*
store i64 %14, i64* %15
%16 = getelementptr inbounds %struct.TYPE_17__, %struct.TYPE_17__* %0, i64 2
%17 = bitcast %struct.TYPE_17__* %16 to i64*
%18 = load i64, i64* %17
%19 = tail call i64 @_mm_and_si128(i64 %18, i64 -71777214294589696)
%20 = tail call i64 @_mm_srli_si128(i64 %19, i32 1)
%21 = getelementptr inbounds %struct.TYPE_17__, %struct.TYPE_17__* %0, i64 3
%22 = bitcast %struct.TYPE_17__* %21 to i64*
%23 = load i64, i64* %22
%24 = tail call i64 @_mm_and_si128(i64 %23, i64 -71777214294589696)
%25 = tail call i64 @_mm_srli_si128(i64 %24, i32 1)
%26 = tail call i64 @_mm_packus_epi16(i64 %20, i64 %25)
%27 = getelementptr inbounds %struct.TYPE_17__, %struct.TYPE_17__* %1, i64 1
%28 = bitcast %struct.TYPE_17__* %27 to i64*
store i64 %26, i64* %28
%29 = load i64, i64* %5
%30 = tail call i64 @_mm_and_si128(i64 %29, i64 1095216660735)
%31 = load i64, i64* %10
%32 = tail call i64 @_mm_and_si128(i64 %31, i64 1095216660735)
%33 = tail call i64 @_mm_packs_epi32(i64 %30, i64 %32)
%34 = load i64, i64* %17
%35 = tail call i64 @_mm_and_si128(i64 %34, i64 1095216660735)
%36 = load i64, i64* %22
%37 = tail call i64 @_mm_and_si128(i64 %36, i64 1095216660735)
%38 = tail call i64 @_mm_packs_epi32(i64 %35, i64 %37)
%39 = tail call i64 @_mm_packus_epi16(i64 %33, 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 71776119077928960)
%43 = tail call i64 @_mm_srli_si128(i64 %42, i32 2)
%44 = load i64, i64* %10
%45 = tail call i64 @_mm_and_si128(i64 %44, i64 71776119077928960)
%46 = tail call i64 @_mm_srli_si128(i64 %45, i32 2)
%47 = tail call i64 @_mm_packs_epi32(i64 %43, i64 %46)
%48 = load i64, i64* %17
%49 = tail call i64 @_mm_and_si128(i64 %48, i64 71776119077928960)
%50 = tail call i64 @_mm_srli_si128(i64 %49, i32 2)
%51 = load i64, i64* %22
%52 = tail call i64 @_mm_and_si128(i64 %51, i64 71776119077928960)
%53 = tail call i64 @_mm_srli_si128(i64 %52, i32 2)
%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
}