#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_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};
  __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));
  (scratch) = _mm_srli_si128((scratch), 1);
  (scratch2) = _mm_and_si128((aligned_vector)[1], (mask_luma));
  (scratch2) = _mm_srli_si128((scratch2), 1);
  _mm_storeu_si128(&(y_output[0]), (_mm_packus_epi16((scratch), (scratch2))));
  (scratch) = _mm_and_si128((aligned_vector)[2], (mask_luma));
  (scratch) = _mm_srli_si128((scratch), 1);
  (scratch2) = _mm_and_si128((aligned_vector)[3], (mask_luma));
  (scratch2) = _mm_srli_si128((scratch2), 1);
  _mm_storeu_si128(&(y_output[1]), (_mm_packus_epi16((scratch), (scratch2))));
  (scratch) = _mm_and_si128((aligned_vector)[0], (mask_cb));
  (scratch2) = _mm_and_si128((aligned_vector)[1], (mask_cb));
  (scratch) = _mm_packs_epi32((scratch), (scratch2));
  (scratch2) = _mm_and_si128((aligned_vector)[2], (mask_cb));
  (scratch3) = _mm_and_si128((aligned_vector)[3], (mask_cb));
  (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), 2);
  (scratch2) = _mm_and_si128((aligned_vector)[1], (mask_cr));
  (scratch2) = _mm_srli_si128((scratch2), 2);
  (scratch) = _mm_packs_epi32((scratch), (scratch2));
  (scratch2) = _mm_and_si128((aligned_vector)[2], (mask_cr));
  (scratch2) = _mm_srli_si128((scratch2), 2);
  (scratch3) = _mm_and_si128((aligned_vector)[3], (mask_cr));
  (scratch3) = _mm_srli_si128((scratch3), 2);
  (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_uyvy_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    -0x28(%rbp),%rdi
mov    $0x1,%esi
call   1060 <_mm_srli_si128@plt>
mov    %rax,-0x90(%rbp)
mov    -0x90(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x58(%rbp),%rdi
mov    0xd98(%rip),%rsi
call   1090 <_mm_and_si128@plt>
mov    %rax,-0x98(%rbp)
mov    -0x98(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
mov    $0x1,%esi
call   1060 <_mm_srli_si128@plt>
mov    %rax,-0xa0(%rbp)
mov    -0xa0(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -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    0xd30(%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    -0x48(%rbp),%rdi
mov    0xcee(%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    -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    0xc8a(%rip),%rsi
call   1090 <_mm_and_si128@plt>
mov    %rax,-0xc8(%rbp)
mov    -0xc8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x58(%rbp),%rdi
mov    0xc68(%rip),%rsi
call   1090 <_mm_and_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    0xc27(%rip),%rsi
call   1090 <_mm_and_si128@plt>
mov    %rax,-0xe0(%rbp)
mov    -0xe0(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x48(%rbp),%rdi
mov    0xc05(%rip),%rsi
call   1090 <_mm_and_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    $0x2,%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    $0x2,%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    $0x2,%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    $0x2,%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_uyvy_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,0x10(%rsp)
lea    0x8(%rbx),%rdi
call   1070 <_mm_loadu_si128@plt>
mov    %rax,0x8(%rsp)
lea    0x10(%rbx),%rdi
call   1070 <_mm_loadu_si128@plt>
mov    %rax,%r12
mov    %rax,(%rsp)
add    $0x18,%rbx
mov    %rbx,%rdi
call   1070 <_mm_loadu_si128@plt>
mov    %rax,%r15
movabs $0xff00ff00ff00ff00,%r13
mov    %rbp,%rdi
mov    %r13,%rsi
call   1080 <_mm_and_si128@plt>
mov    %rax,%rdi
mov    $0x1,%esi
call   1050 <_mm_srli_si128@plt>
mov    %rax,%rbx
mov    0x8(%rsp),%rdi
mov    %r13,%rsi
call   1080 <_mm_and_si128@plt>
mov    %rax,%rdi
mov    $0x1,%esi
call   1050 <_mm_srli_si128@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <_mm_packus_epi16@plt>
mov    %r14,%rdi
mov    %eax,%esi
call   1060 <_mm_storeu_si128@plt>
mov    %r12,%rdi
mov    %r13,%rsi
call   1080 <_mm_and_si128@plt>
mov    %rax,%rdi
mov    $0x1,%esi
call   1050 <_mm_srli_si128@plt>
mov    %rax,%rbx
mov    %r15,%rdi
mov    %r13,%rsi
call   1080 <_mm_and_si128@plt>
mov    %rax,%rdi
mov    $0x1,%esi
call   1050 <_mm_srli_si128@plt>
add    $0x8,%r14
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <_mm_packus_epi16@plt>
mov    %r14,%rdi
mov    %eax,%esi
call   1060 <_mm_storeu_si128@plt>
movabs $0xff000000ff,%rbx
mov    0x10(%rsp),%r13
mov    %r13,%rdi
mov    %rbx,%rsi
call   1080 <_mm_and_si128@plt>
mov    %rax,%rbp
mov    0x8(%rsp),%r12
mov    %r12,%rdi
mov    %rbx,%rsi
call   1080 <_mm_and_si128@plt>
mov    %rbp,%rdi
mov    %rax,%rsi
call   1040 <_mm_packs_epi32@plt>
mov    %rax,%r14
mov    (%rsp),%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   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 $0xff000000ff0000,%rbx
mov    %r13,%rdi
mov    %rbx,%rsi
call   1080 <_mm_and_si128@plt>
mov    %rax,%rdi
mov    $0x2,%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    $0x2,%esi
call   1050 <_mm_srli_si128@plt>
mov    %rbp,%rdi
mov    %rax,%rsi
call   1040 <_mm_packs_epi32@plt>
mov    %rax,%r14
mov    (%rsp),%rdi
mov    %rbx,%rsi
call   1080 <_mm_and_si128@plt>
mov    %rax,%rdi
mov    $0x2,%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    $0x2,%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_uyvy_to_yuv422p_sse2.mask_luma = internal constant %struct.TYPE_19__ { i32 -16711936, i32 -16711936 }
@unaligned_src_unaligned_dst_repack_uyvy_to_yuv422p_sse2.mask_cb = internal constant %struct.TYPE_19__ { i32 255, i32 255 }
@unaligned_src_unaligned_dst_repack_uyvy_to_yuv422p_sse2.mask_cr = internal constant %struct.TYPE_19__ { i32 16711680, i32 16711680 }
define void @unaligned_src_unaligned_dst_repack_uyvy_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_uyvy_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 = bitcast %struct.TYPE_19__* %9 to i64*
%80 = load i64, i64* %79
%81 = call i64 @_mm_srli_si128(i64 %80, i32 1)
%82 = bitcast %struct.TYPE_19__* %18 to i64*
store i64 %81, i64* %82
%83 = bitcast %struct.TYPE_19__* %9 to i8*
%84 = bitcast %struct.TYPE_19__* %18 to i8*
%85 = getelementptr inbounds [4 x %struct.TYPE_19__], [4 x %struct.TYPE_19__]* %12, i64 0, i64 1
%86 = bitcast %struct.TYPE_19__* %85 to i64*
%87 = load i64, i64* %86
%88 = load i64, i64* bitcast (%struct.TYPE_19__* @unaligned_src_unaligned_dst_repack_uyvy_to_yuv422p_sse2.mask_luma to i64*)
%89 = call i64 @_mm_and_si128(i64 %87, i64 %88)
%90 = bitcast %struct.TYPE_19__* %19 to i64*
store i64 %89, i64* %90
%91 = bitcast %struct.TYPE_19__* %10 to i8*
%92 = bitcast %struct.TYPE_19__* %19 to i8*
%93 = bitcast %struct.TYPE_19__* %10 to i64*
%94 = load i64, i64* %93
%95 = call i64 @_mm_srli_si128(i64 %94, i32 1)
%96 = bitcast %struct.TYPE_19__* %20 to i64*
store i64 %95, i64* %96
%97 = bitcast %struct.TYPE_19__* %10 to i8*
%98 = bitcast %struct.TYPE_19__* %20 to i8*
%99 = load %struct.TYPE_19__*, %struct.TYPE_19__** %6
%100 = getelementptr inbounds %struct.TYPE_19__, %struct.TYPE_19__* %99, i64 0
%101 = bitcast %struct.TYPE_19__* %9 to i64*
%102 = load i64, i64* %101
%103 = bitcast %struct.TYPE_19__* %10 to i64*
%104 = load i64, i64* %103
%105 = call i32 @_mm_packus_epi16(i64 %102, i64 %104)
%106 = call i32 @_mm_storeu_si128(%struct.TYPE_19__* %100, i32 %105)
%107 = getelementptr inbounds [4 x %struct.TYPE_19__], [4 x %struct.TYPE_19__]* %12, i64 0, i64 2
%108 = bitcast %struct.TYPE_19__* %107 to i64*
%109 = load i64, i64* %108
%110 = load i64, i64* bitcast (%struct.TYPE_19__* @unaligned_src_unaligned_dst_repack_uyvy_to_yuv422p_sse2.mask_luma to i64*)
%111 = call i64 @_mm_and_si128(i64 %109, i64 %110)
%112 = bitcast %struct.TYPE_19__* %21 to i64*
store i64 %111, i64* %112
%113 = bitcast %struct.TYPE_19__* %9 to i8*
%114 = bitcast %struct.TYPE_19__* %21 to i8*
%115 = bitcast %struct.TYPE_19__* %9 to i64*
%116 = load i64, i64* %115
%117 = call i64 @_mm_srli_si128(i64 %116, i32 1)
%118 = bitcast %struct.TYPE_19__* %22 to i64*
store i64 %117, i64* %118
%119 = bitcast %struct.TYPE_19__* %9 to i8*
%120 = bitcast %struct.TYPE_19__* %22 to i8*
%121 = getelementptr inbounds [4 x %struct.TYPE_19__], [4 x %struct.TYPE_19__]* %12, i64 0, i64 3
%122 = bitcast %struct.TYPE_19__* %121 to i64*
%123 = load i64, i64* %122
%124 = load i64, i64* bitcast (%struct.TYPE_19__* @unaligned_src_unaligned_dst_repack_uyvy_to_yuv422p_sse2.mask_luma to i64*)
%125 = call i64 @_mm_and_si128(i64 %123, i64 %124)
%126 = bitcast %struct.TYPE_19__* %23 to i64*
store i64 %125, i64* %126
%127 = bitcast %struct.TYPE_19__* %10 to i8*
%128 = bitcast %struct.TYPE_19__* %23 to i8*
%129 = bitcast %struct.TYPE_19__* %10 to i64*
%130 = load i64, i64* %129
%131 = call i64 @_mm_srli_si128(i64 %130, i32 1)
%132 = bitcast %struct.TYPE_19__* %24 to i64*
store i64 %131, i64* %132
%133 = bitcast %struct.TYPE_19__* %10 to i8*
%134 = bitcast %struct.TYPE_19__* %24 to i8*
%135 = load %struct.TYPE_19__*, %struct.TYPE_19__** %6
%136 = getelementptr inbounds %struct.TYPE_19__, %struct.TYPE_19__* %135, i64 1
%137 = bitcast %struct.TYPE_19__* %9 to i64*
%138 = load i64, i64* %137
%139 = bitcast %struct.TYPE_19__* %10 to i64*
%140 = load i64, i64* %139
%141 = call i32 @_mm_packus_epi16(i64 %138, i64 %140)
%142 = call i32 @_mm_storeu_si128(%struct.TYPE_19__* %136, i32 %141)
%143 = getelementptr inbounds [4 x %struct.TYPE_19__], [4 x %struct.TYPE_19__]* %12, i64 0, i64 0
%144 = bitcast %struct.TYPE_19__* %143 to i64*
%145 = load i64, i64* %144
%146 = load i64, i64* bitcast (%struct.TYPE_19__* @unaligned_src_unaligned_dst_repack_uyvy_to_yuv422p_sse2.mask_cb to i64*)
%147 = call i64 @_mm_and_si128(i64 %145, i64 %146)
%148 = bitcast %struct.TYPE_19__* %25 to i64*
store i64 %147, i64* %148
%149 = bitcast %struct.TYPE_19__* %9 to i8*
%150 = bitcast %struct.TYPE_19__* %25 to i8*
%151 = getelementptr inbounds [4 x %struct.TYPE_19__], [4 x %struct.TYPE_19__]* %12, i64 0, i64 1
%152 = bitcast %struct.TYPE_19__* %151 to i64*
%153 = load i64, i64* %152
%154 = load i64, i64* bitcast (%struct.TYPE_19__* @unaligned_src_unaligned_dst_repack_uyvy_to_yuv422p_sse2.mask_cb to i64*)
%155 = call i64 @_mm_and_si128(i64 %153, i64 %154)
%156 = bitcast %struct.TYPE_19__* %26 to i64*
store i64 %155, i64* %156
%157 = bitcast %struct.TYPE_19__* %10 to i8*
%158 = bitcast %struct.TYPE_19__* %26 to i8*
%159 = bitcast %struct.TYPE_19__* %9 to i64*
%160 = load i64, i64* %159
%161 = bitcast %struct.TYPE_19__* %10 to i64*
%162 = load i64, i64* %161
%163 = call i64 @_mm_packs_epi32(i64 %160, i64 %162)
%164 = bitcast %struct.TYPE_19__* %27 to i64*
store i64 %163, i64* %164
%165 = bitcast %struct.TYPE_19__* %9 to i8*
%166 = bitcast %struct.TYPE_19__* %27 to i8*
%167 = getelementptr inbounds [4 x %struct.TYPE_19__], [4 x %struct.TYPE_19__]* %12, i64 0, i64 2
%168 = bitcast %struct.TYPE_19__* %167 to i64*
%169 = load i64, i64* %168
%170 = load i64, i64* bitcast (%struct.TYPE_19__* @unaligned_src_unaligned_dst_repack_uyvy_to_yuv422p_sse2.mask_cb to i64*)
%171 = call i64 @_mm_and_si128(i64 %169, i64 %170)
%172 = bitcast %struct.TYPE_19__* %28 to i64*
store i64 %171, i64* %172
%173 = bitcast %struct.TYPE_19__* %10 to i8*
%174 = bitcast %struct.TYPE_19__* %28 to i8*
%175 = getelementptr inbounds [4 x %struct.TYPE_19__], [4 x %struct.TYPE_19__]* %12, i64 0, i64 3
%176 = bitcast %struct.TYPE_19__* %175 to i64*
%177 = load i64, i64* %176
%178 = load i64, i64* bitcast (%struct.TYPE_19__* @unaligned_src_unaligned_dst_repack_uyvy_to_yuv422p_sse2.mask_cb to i64*)
%179 = call i64 @_mm_and_si128(i64 %177, i64 %178)
%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_uyvy_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 2)
%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_uyvy_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 2)
%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_uyvy_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 2)
%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_uyvy_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 2)
%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_uyvy_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 -71777214294589696)
%13 = tail call i64 @_mm_srli_si128(i64 %12, i32 1)
%14 = tail call i64 @_mm_and_si128(i64 %7, i64 -71777214294589696)
%15 = tail call i64 @_mm_srli_si128(i64 %14, i32 1)
%16 = tail call i32 @_mm_packus_epi16(i64 %13, i64 %15)
%17 = tail call i32 @_mm_storeu_si128(%struct.TYPE_19__* %1, i32 %16)
%18 = tail call i64 @_mm_and_si128(i64 %9, i64 -71777214294589696)
%19 = tail call i64 @_mm_srli_si128(i64 %18, i32 1)
%20 = tail call i64 @_mm_and_si128(i64 %11, i64 -71777214294589696)
%21 = tail call i64 @_mm_srli_si128(i64 %20, i32 1)
%22 = getelementptr inbounds %struct.TYPE_19__, %struct.TYPE_19__* %1, i64 1
%23 = tail call i32 @_mm_packus_epi16(i64 %19, i64 %21)
%24 = tail call i32 @_mm_storeu_si128(%struct.TYPE_19__* %22, i32 %23)
%25 = tail call i64 @_mm_and_si128(i64 %5, i64 1095216660735)
%26 = tail call i64 @_mm_and_si128(i64 %7, i64 1095216660735)
%27 = tail call i64 @_mm_packs_epi32(i64 %25, i64 %26)
%28 = tail call i64 @_mm_and_si128(i64 %9, i64 1095216660735)
%29 = tail call i64 @_mm_and_si128(i64 %11, i64 1095216660735)
%30 = tail call i64 @_mm_packs_epi32(i64 %28, i64 %29)
%31 = tail call i32 @_mm_packus_epi16(i64 %27, 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 71776119077928960)
%34 = tail call i64 @_mm_srli_si128(i64 %33, i32 2)
%35 = tail call i64 @_mm_and_si128(i64 %7, i64 71776119077928960)
%36 = tail call i64 @_mm_srli_si128(i64 %35, i32 2)
%37 = tail call i64 @_mm_packs_epi32(i64 %34, i64 %36)
%38 = tail call i64 @_mm_and_si128(i64 %9, i64 71776119077928960)
%39 = tail call i64 @_mm_srli_si128(i64 %38, i32 2)
%40 = tail call i64 @_mm_and_si128(i64 %11, i64 71776119077928960)
%41 = tail call i64 @_mm_srli_si128(i64 %40, i32 2)
%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
}