#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_19__ TYPE_1__;

/* Type definitions */
struct TYPE_19__ {
  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_loadu_si128(TYPE_1__ *);
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 unaligned_src_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};
  __m128i aligned_vector[4];
  (aligned_vector)[0] = _mm_loadu_si128(input);
  (aligned_vector)[1] = _mm_loadu_si128(&input[1]);
  (aligned_vector)[2] = _mm_loadu_si128(&input[2]);
  (aligned_vector)[3] = _mm_loadu_si128(&input[3]);
  (scratch) = _mm_and_si128((aligned_vector)[0], (mask_luma));
  (scratch2) = _mm_and_si128((aligned_vector)[1], (mask_luma));
  (y_output[0]) = (_mm_packus_epi16((scratch), (scratch2)));
  (scratch) = _mm_and_si128((aligned_vector)[2], (mask_luma));
  (scratch2) = _mm_and_si128((aligned_vector)[3], (mask_luma));
  (y_output[1]) = (_mm_packus_epi16((scratch), (scratch2)));
  (scratch) = _mm_and_si128((aligned_vector)[0], (mask_cb));
  (scratch) = _mm_srli_si128((scratch), 1);
  (scratch2) = _mm_and_si128((aligned_vector)[1], (mask_cb));
  (scratch2) = _mm_srli_si128((scratch2), 1);
  (scratch) = _mm_packs_epi32((scratch), (scratch2));
  (scratch2) = _mm_and_si128((aligned_vector)[2], (mask_cb));
  (scratch2) = _mm_srli_si128((scratch2), 1);
  (scratch3) = _mm_and_si128((aligned_vector)[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((aligned_vector)[0], (mask_cr));
  (scratch) = _mm_srli_si128((scratch), 3);
  (scratch2) = _mm_and_si128((aligned_vector)[1], (mask_cr));
  (scratch2) = _mm_srli_si128((scratch2), 3);
  (scratch) = _mm_packs_epi32((scratch), (scratch2));
  (scratch2) = _mm_and_si128((aligned_vector)[2], (mask_cr));
  (scratch2) = _mm_srli_si128((scratch2), 3);
  (scratch3) = _mm_and_si128((aligned_vector)[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):
<unaligned_src_repack_yuyv_to_yuv422p_sse2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x180,%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),%rdi
call   1070 <_mm_loadu_si128@plt>
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x8,%rdi
call   1070 <_mm_loadu_si128@plt>
mov    %rax,-0x70(%rbp)
mov    -0x70(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x10,%rdi
call   1070 <_mm_loadu_si128@plt>
mov    %rax,-0x78(%rbp)
mov    -0x78(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x18,%rdi
call   1070 <_mm_loadu_si128@plt>
mov    %rax,-0x80(%rbp)
mov    -0x80(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x60(%rbp),%rdi
mov    0xdea(%rip),%rsi
call   1080 <_mm_and_si128@plt>
mov    %rax,-0x88(%rbp)
mov    -0x88(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x58(%rbp),%rdi
mov    0xdc8(%rip),%rsi
call   1080 <_mm_and_si128@plt>
mov    %rax,-0x90(%rbp)
mov    -0x90(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x180(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1030 <_mm_packus_epi16@plt>
mov    %rax,%rcx
mov    -0x180(%rbp),%rax
mov    %rcx,-0x98(%rbp)
mov    -0x98(%rbp),%rcx
mov    %rcx,(%rax)
mov    -0x50(%rbp),%rdi
mov    0xd73(%rip),%rsi
call   1080 <_mm_and_si128@plt>
mov    %rax,-0xa0(%rbp)
mov    -0xa0(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x48(%rbp),%rdi
mov    0xd51(%rip),%rsi
call   1080 <_mm_and_si128@plt>
mov    %rax,-0xa8(%rbp)
mov    -0xa8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x178(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1030 <_mm_packus_epi16@plt>
mov    %rax,%rcx
mov    -0x178(%rbp),%rax
mov    %rcx,-0xb0(%rbp)
mov    -0xb0(%rbp),%rcx
mov    %rcx,0x8(%rax)
mov    -0x60(%rbp),%rdi
mov    0xd03(%rip),%rsi
call   1080 <_mm_and_si128@plt>
mov    %rax,-0xb8(%rbp)
mov    -0xb8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    $0x1,%esi
call   1060 <_mm_srli_si128@plt>
mov    %rax,-0xc0(%rbp)
mov    -0xc0(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x58(%rbp),%rdi
mov    0xcc1(%rip),%rsi
call   1080 <_mm_and_si128@plt>
mov    %rax,-0xc8(%rbp)
mov    -0xc8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
mov    $0x1,%esi
call   1060 <_mm_srli_si128@plt>
mov    %rax,-0xd0(%rbp)
mov    -0xd0(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1040 <_mm_packs_epi32@plt>
mov    %rax,-0xd8(%rbp)
mov    -0xd8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x50(%rbp),%rdi
mov    0xc60(%rip),%rsi
call   1080 <_mm_and_si128@plt>
mov    %rax,-0xe0(%rbp)
mov    -0xe0(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
mov    $0x1,%esi
call   1060 <_mm_srli_si128@plt>
mov    %rax,-0xe8(%rbp)
mov    -0xe8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x48(%rbp),%rdi
mov    0xc1e(%rip),%rsi
call   1080 <_mm_and_si128@plt>
mov    %rax,-0xf0(%rbp)
mov    -0xf0(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rdi
mov    $0x1,%esi
call   1060 <_mm_srli_si128@plt>
mov    %rax,-0xf8(%rbp)
mov    -0xf8(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rsi
call   1040 <_mm_packs_epi32@plt>
mov    %rax,-0x100(%rbp)
mov    -0x100(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x170(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1030 <_mm_packus_epi16@plt>
mov    %rax,%rcx
mov    -0x170(%rbp),%rax
mov    %rcx,-0x108(%rbp)
mov    -0x108(%rbp),%rcx
mov    %rcx,(%rax)
mov    -0x60(%rbp),%rdi
mov    0xb92(%rip),%rsi
call   1080 <_mm_and_si128@plt>
mov    %rax,-0x110(%rbp)
mov    -0x110(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    $0x3,%esi
call   1060 <_mm_srli_si128@plt>
mov    %rax,-0x118(%rbp)
mov    -0x118(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x58(%rbp),%rdi
mov    0xb50(%rip),%rsi
call   1080 <_mm_and_si128@plt>
mov    %rax,-0x120(%rbp)
mov    -0x120(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
mov    $0x3,%esi
call   1060 <_mm_srli_si128@plt>
mov    %rax,-0x128(%rbp)
mov    -0x128(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1040 <_mm_packs_epi32@plt>
mov    %rax,-0x130(%rbp)
mov    -0x130(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x50(%rbp),%rdi
mov    0xaef(%rip),%rsi
call   1080 <_mm_and_si128@plt>
mov    %rax,-0x138(%rbp)
mov    -0x138(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
mov    $0x3,%esi
call   1060 <_mm_srli_si128@plt>
mov    %rax,-0x140(%rbp)
mov    -0x140(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x48(%rbp),%rdi
mov    0xaad(%rip),%rsi
call   1080 <_mm_and_si128@plt>
mov    %rax,-0x148(%rbp)
mov    -0x148(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rdi
mov    $0x3,%esi
call   1060 <_mm_srli_si128@plt>
mov    %rax,-0x150(%rbp)
mov    -0x150(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rsi
call   1040 <_mm_packs_epi32@plt>
mov    %rax,-0x158(%rbp)
mov    -0x158(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x168(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1030 <_mm_packus_epi16@plt>
mov    %rax,%rcx
mov    -0x168(%rbp),%rax
mov    %rcx,-0x160(%rbp)
mov    -0x160(%rbp),%rcx
mov    %rcx,(%rax)
add    $0x180,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unaligned_src_repack_yuyv_to_yuv422p_sse2>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rcx,0x30(%rsp)
mov    %rdx,0x28(%rsp)
mov    %rsi,0x10(%rsp)
mov    %rdi,%rbx
call   1060 <_mm_loadu_si128@plt>
mov    %rax,%r13
lea    0x8(%rbx),%rdi
call   1060 <_mm_loadu_si128@plt>
mov    %rax,%r15
mov    %rax,0x8(%rsp)
lea    0x10(%rbx),%rdi
call   1060 <_mm_loadu_si128@plt>
mov    %rax,%r14
mov    %rax,0x18(%rsp)
add    $0x18,%rbx
mov    %rbx,%rdi
call   1060 <_mm_loadu_si128@plt>
mov    %rax,%r12
movabs $0xff00ff00ff00ff,%rbx
mov    %r13,%rdi
mov    %r13,0x20(%rsp)
mov    %rbx,%rsi
call   1070 <_mm_and_si128@plt>
mov    %rax,%rbp
mov    %r15,%rdi
mov    %rbx,%rsi
call   1070 <_mm_and_si128@plt>
mov    %rbp,%rdi
mov    %rax,%rsi
call   1030 <_mm_packus_epi16@plt>
mov    0x10(%rsp),%r15
mov    %rax,(%r15)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1070 <_mm_and_si128@plt>
mov    %rax,%rbp
mov    %r12,%rdi
mov    %rbx,%rsi
call   1070 <_mm_and_si128@plt>
mov    %rbp,%rdi
mov    %rax,%rsi
call   1030 <_mm_packus_epi16@plt>
mov    %rax,0x8(%r15)
movabs $0xff000000ff00,%rbx
mov    %r13,%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    0x8(%rsp),%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,%r14
mov    0x18(%rsp),%r13
mov    %r13,%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    %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    %r14,%rdi
mov    %rax,%rsi
call   1030 <_mm_packus_epi16@plt>
mov    0x28(%rsp),%rcx
mov    %rax,(%rcx)
movabs $0xff000000ff000000,%rbx
mov    0x20(%rsp),%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    0x8(%rsp),%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,%r14
mov    %r13,%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    %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    %r14,%rdi
mov    %rax,%rsi
call   1030 <_mm_packus_epi16@plt>
mov    0x30(%rsp),%rcx
mov    %rax,(%rcx)
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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