#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__);
int /*<<< orphan*/ _mm_packus_epi16(TYPE_1__, TYPE_1__);
TYPE_1__ _mm_srli_si128(TYPE_1__, int);
int /*<<< orphan*/ _mm_storeu_si128(TYPE_1__ *, int /*<<< orphan*/);
extern void unaligned_dst_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));
  _mm_storeu_si128(&(y_output[0]), (_mm_packus_epi16((scratch), (scratch2))));
  (scratch) = _mm_and_si128((input)[2], (mask_luma));
  (scratch2) = _mm_and_si128((input)[3], (mask_luma));
  _mm_storeu_si128(&(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));
  _mm_storeu_si128(&(*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));
  _mm_storeu_si128(&(*v_output), (_mm_packus_epi16((scratch), (scratch2))));
}


x86 assembly (clang, -O0):
<unaligned_dst_repack_yuyv_to_yuv422p_sse2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%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    0xe47(%rip),%rsi
call   1080 <_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    0xe27(%rip),%rsi
call   1080 <_mm_and_si128@plt>
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x118(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1030 <_mm_packus_epi16@plt>
mov    -0x118(%rbp),%rdi
mov    %eax,%esi
call   1070 <_mm_storeu_si128@plt>
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%rdi
mov    0xde1(%rip),%rsi
call   1080 <_mm_and_si128@plt>
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%rdi
mov    0xdc1(%rip),%rsi
call   1080 <_mm_and_si128@plt>
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x110(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1030 <_mm_packus_epi16@plt>
mov    -0x110(%rbp),%rdi
mov    %eax,%esi
call   1070 <_mm_storeu_si128@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    0xd80(%rip),%rsi
call   1080 <_mm_and_si128@plt>
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    $0x1,%esi
call   1060 <_mm_srli_si128@plt>
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rdi
mov    0xd46(%rip),%rsi
call   1080 <_mm_and_si128@plt>
mov    %rax,-0x70(%rbp)
mov    -0x70(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
mov    $0x1,%esi
call   1060 <_mm_srli_si128@plt>
mov    %rax,-0x78(%rbp)
mov    -0x78(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1040 <_mm_packs_epi32@plt>
mov    %rax,-0x80(%rbp)
mov    -0x80(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%rdi
mov    0xcf3(%rip),%rsi
call   1080 <_mm_and_si128@plt>
mov    %rax,-0x88(%rbp)
mov    -0x88(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
mov    $0x1,%esi
call   1060 <_mm_srli_si128@plt>
mov    %rax,-0x90(%rbp)
mov    -0x90(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%rdi
mov    0xcad(%rip),%rsi
call   1080 <_mm_and_si128@plt>
mov    %rax,-0x98(%rbp)
mov    -0x98(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rdi
mov    $0x1,%esi
call   1060 <_mm_srli_si128@plt>
mov    %rax,-0xa0(%rbp)
mov    -0xa0(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rsi
call   1040 <_mm_packs_epi32@plt>
mov    %rax,-0xa8(%rbp)
mov    -0xa8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x108(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1030 <_mm_packus_epi16@plt>
mov    -0x108(%rbp),%rdi
mov    %eax,%esi
call   1070 <_mm_storeu_si128@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    0xc2b(%rip),%rsi
call   1080 <_mm_and_si128@plt>
mov    %rax,-0xb0(%rbp)
mov    -0xb0(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    $0x3,%esi
call   1060 <_mm_srli_si128@plt>
mov    %rax,-0xb8(%rbp)
mov    -0xb8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rdi
mov    0xbe5(%rip),%rsi
call   1080 <_mm_and_si128@plt>
mov    %rax,-0xc0(%rbp)
mov    -0xc0(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
mov    $0x3,%esi
call   1060 <_mm_srli_si128@plt>
mov    %rax,-0xc8(%rbp)
mov    -0xc8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1040 <_mm_packs_epi32@plt>
mov    %rax,-0xd0(%rbp)
mov    -0xd0(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%rdi
mov    0xb80(%rip),%rsi
call   1080 <_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    -0x8(%rbp),%rax
mov    0x18(%rax),%rdi
mov    0xb3a(%rip),%rsi
call   1080 <_mm_and_si128@plt>
mov    %rax,-0xe8(%rbp)
mov    -0xe8(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rdi
mov    $0x3,%esi
call   1060 <_mm_srli_si128@plt>
mov    %rax,-0xf0(%rbp)
mov    -0xf0(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rsi
call   1040 <_mm_packs_epi32@plt>
mov    %rax,-0xf8(%rbp)
mov    -0xf8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x100(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1030 <_mm_packus_epi16@plt>
mov    -0x100(%rbp),%rdi
mov    %eax,%esi
call   1070 <_mm_storeu_si128@plt>
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unaligned_dst_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,%rbx
mov    %rdi,%r12
mov    (%rdi),%rdi
movabs $0xff00ff00ff00ff,%r13
mov    %r13,%rsi
call   1070 <_mm_and_si128@plt>
mov    %rax,%rbp
mov    0x8(%r12),%rdi
mov    %r13,%rsi
call   1070 <_mm_and_si128@plt>
mov    %rbp,%rdi
mov    %rax,%rsi
call   1030 <_mm_packus_epi16@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1060 <_mm_storeu_si128@plt>
mov    0x10(%r12),%rdi
mov    %r13,%rsi
call   1070 <_mm_and_si128@plt>
mov    %rax,%rbp
mov    0x18(%r12),%rdi
mov    %r13,%rsi
call   1070 <_mm_and_si128@plt>
add    $0x8,%rbx
mov    %rbp,%rdi
mov    %rax,%rsi
call   1030 <_mm_packus_epi16@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1060 <_mm_storeu_si128@plt>
mov    (%r12),%rdi
movabs $0xff000000ff00,%rbx
mov    %rbx,%rsi
call   1070 <_mm_and_si128@plt>
mov    %rax,%rdi
mov    $0x1,%esi
call   1050 <_mm_srli_si128@plt>
mov    %rax,%rbp
mov    0x8(%r12),%rdi
mov    %rbx,%rsi
call   1070 <_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(%r12),%rdi
mov    %rbx,%rsi
call   1070 <_mm_and_si128@plt>
mov    %rax,%rdi
mov    $0x1,%esi
call   1050 <_mm_srli_si128@plt>
mov    %rax,%rbp
mov    0x18(%r12),%rdi
mov    %rbx,%rsi
call   1070 <_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    %r15,%rdi
mov    %eax,%esi
call   1060 <_mm_storeu_si128@plt>
mov    (%r12),%rdi
movabs $0xff000000ff000000,%rbx
mov    %rbx,%rsi
call   1070 <_mm_and_si128@plt>
mov    %rax,%rdi
mov    $0x3,%esi
call   1050 <_mm_srli_si128@plt>
mov    %rax,%rbp
mov    0x8(%r12),%rdi
mov    %rbx,%rsi
call   1070 <_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,%r15
mov    0x10(%r12),%rdi
mov    %rbx,%rsi
call   1070 <_mm_and_si128@plt>
mov    %rax,%rdi
mov    $0x3,%esi
call   1050 <_mm_srli_si128@plt>
mov    %rax,%rbp
mov    0x18(%r12),%rdi
mov    %rbx,%rsi
call   1070 <_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    %r15,%rdi
mov    %rax,%rsi
call   1030 <_mm_packus_epi16@plt>
mov    %r14,%rdi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1060 <_mm_storeu_si128@plt>

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

LLVM IR (-O2):
%struct.TYPE_17__ = type { i32, i32 }
define void @unaligned_dst_repack_yuyv_to_yuv422p_sse2(%struct.TYPE_17__* nocapture %0, %struct.TYPE_17__* %1, %struct.TYPE_17__* %2, %struct.TYPE_17__* %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 i32 @_mm_packus_epi16(i64 %7, i64 %11)
%13 = tail call i32 @_mm_storeu_si128(%struct.TYPE_17__* %1, i32 %12)
%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 = getelementptr inbounds %struct.TYPE_17__, %struct.TYPE_17__* %1, i64 1
%23 = tail call i32 @_mm_packus_epi16(i64 %17, i64 %21)
%24 = tail call i32 @_mm_storeu_si128(%struct.TYPE_17__* %22, i32 %23)
%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 i32 @_mm_packus_epi16(i64 %31, i64 %38)
%40 = tail call i32 @_mm_storeu_si128(%struct.TYPE_17__* %2, i32 %39)
%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 i32 @_mm_packus_epi16(i64 %47, i64 %54)
%56 = tail call i32 @_mm_storeu_si128(%struct.TYPE_17__* %3, i32 %55)
ret void
}