#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__);
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_src_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};
  __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));
  _mm_storeu_si128(&(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));
  _mm_storeu_si128(&(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));
  _mm_storeu_si128(&(*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));
  _mm_storeu_si128(&(*v_output), (_mm_packus_epi16((scratch), (scratch2))));
}


x86 assembly (clang, -O0):
<unaligned_src_unaligned_dst_repack_yuyv_to_yuv422p_sse2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x160,%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   1080 <_mm_loadu_si128@plt>
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x8,%rdi
call   1080 <_mm_loadu_si128@plt>
mov    %rax,-0x70(%rbp)
mov    -0x70(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x10,%rdi
call   1080 <_mm_loadu_si128@plt>
mov    %rax,-0x78(%rbp)
mov    -0x78(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x18,%rdi
call   1080 <_mm_loadu_si128@plt>
mov    %rax,-0x80(%rbp)
mov    -0x80(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x60(%rbp),%rdi
mov    0xdda(%rip),%rsi
call   1090 <_mm_and_si128@plt>
mov    %rax,-0x88(%rbp)
mov    -0x88(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x58(%rbp),%rdi
mov    0xdb8(%rip),%rsi
call   1090 <_mm_and_si128@plt>
mov    %rax,-0x90(%rbp)
mov    -0x90(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x160(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1030 <_mm_packus_epi16@plt>
mov    -0x160(%rbp),%rdi
mov    %eax,%esi
call   1070 <_mm_storeu_si128@plt>
mov    -0x50(%rbp),%rdi
mov    0xd70(%rip),%rsi
call   1090 <_mm_and_si128@plt>
mov    %rax,-0x98(%rbp)
mov    -0x98(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x48(%rbp),%rdi
mov    0xd4e(%rip),%rsi
call   1090 <_mm_and_si128@plt>
mov    %rax,-0xa0(%rbp)
mov    -0xa0(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x158(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1030 <_mm_packus_epi16@plt>
mov    -0x158(%rbp),%rdi
mov    %eax,%esi
call   1070 <_mm_storeu_si128@plt>
mov    -0x60(%rbp),%rdi
mov    0xd0a(%rip),%rsi
call   1090 <_mm_and_si128@plt>
mov    %rax,-0xa8(%rbp)
mov    -0xa8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    $0x1,%esi
call   1060 <_mm_srli_si128@plt>
mov    %rax,-0xb0(%rbp)
mov    -0xb0(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x58(%rbp),%rdi
mov    0xcc8(%rip),%rsi
call   1090 <_mm_and_si128@plt>
mov    %rax,-0xb8(%rbp)
mov    -0xb8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
mov    $0x1,%esi
call   1060 <_mm_srli_si128@plt>
mov    %rax,-0xc0(%rbp)
mov    -0xc0(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1040 <_mm_packs_epi32@plt>
mov    %rax,-0xc8(%rbp)
mov    -0xc8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x50(%rbp),%rdi
mov    0xc67(%rip),%rsi
call   1090 <_mm_and_si128@plt>
mov    %rax,-0xd0(%rbp)
mov    -0xd0(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
mov    $0x1,%esi
call   1060 <_mm_srli_si128@plt>
mov    %rax,-0xd8(%rbp)
mov    -0xd8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x48(%rbp),%rdi
mov    0xc25(%rip),%rsi
call   1090 <_mm_and_si128@plt>
mov    %rax,-0xe0(%rbp)
mov    -0xe0(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rdi
mov    $0x1,%esi
call   1060 <_mm_srli_si128@plt>
mov    %rax,-0xe8(%rbp)
mov    -0xe8(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rsi
call   1040 <_mm_packs_epi32@plt>
mov    %rax,-0xf0(%rbp)
mov    -0xf0(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x150(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1030 <_mm_packus_epi16@plt>
mov    -0x150(%rbp),%rdi
mov    %eax,%esi
call   1070 <_mm_storeu_si128@plt>
mov    -0x60(%rbp),%rdi
mov    0xba6(%rip),%rsi
call   1090 <_mm_and_si128@plt>
mov    %rax,-0xf8(%rbp)
mov    -0xf8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    $0x3,%esi
call   1060 <_mm_srli_si128@plt>
mov    %rax,-0x100(%rbp)
mov    -0x100(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x58(%rbp),%rdi
mov    0xb64(%rip),%rsi
call   1090 <_mm_and_si128@plt>
mov    %rax,-0x108(%rbp)
mov    -0x108(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
mov    $0x3,%esi
call   1060 <_mm_srli_si128@plt>
mov    %rax,-0x110(%rbp)
mov    -0x110(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1040 <_mm_packs_epi32@plt>
mov    %rax,-0x118(%rbp)
mov    -0x118(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x50(%rbp),%rdi
mov    0xb03(%rip),%rsi
call   1090 <_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    -0x48(%rbp),%rdi
mov    0xac1(%rip),%rsi
call   1090 <_mm_and_si128@plt>
mov    %rax,-0x130(%rbp)
mov    -0x130(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rdi
mov    $0x3,%esi
call   1060 <_mm_srli_si128@plt>
mov    %rax,-0x138(%rbp)
mov    -0x138(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rsi
call   1040 <_mm_packs_epi32@plt>
mov    %rax,-0x140(%rbp)
mov    -0x140(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x148(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1030 <_mm_packus_epi16@plt>
mov    -0x148(%rbp),%rdi
mov    %eax,%esi
call   1070 <_mm_storeu_si128@plt>
add    $0x160,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
%struct.TYPE_19__ = type { i32, i32 }
define void @unaligned_src_unaligned_dst_repack_yuyv_to_yuv422p_sse2(%struct.TYPE_19__* %0, %struct.TYPE_19__* %1, %struct.TYPE_19__* %2, %struct.TYPE_19__* %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 i32 @_mm_packus_epi16(i64 %12, i64 %13)
%15 = tail call i32 @_mm_storeu_si128(%struct.TYPE_19__* %1, i32 %14)
%16 = tail call i64 @_mm_and_si128(i64 %9, i64 71777214294589695)
%17 = tail call i64 @_mm_and_si128(i64 %11, i64 71777214294589695)
%18 = getelementptr inbounds %struct.TYPE_19__, %struct.TYPE_19__* %1, i64 1
%19 = tail call i32 @_mm_packus_epi16(i64 %16, i64 %17)
%20 = tail call i32 @_mm_storeu_si128(%struct.TYPE_19__* %18, i32 %19)
%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 i32 @_mm_packus_epi16(i64 %25, i64 %30)
%32 = tail call i32 @_mm_storeu_si128(%struct.TYPE_19__* %2, i32 %31)
%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 i32 @_mm_packus_epi16(i64 %37, i64 %42)
%44 = tail call i32 @_mm_storeu_si128(%struct.TYPE_19__* %3, i32 %43)
ret void
}