#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 */

/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_and_si128(int /*<<< orphan*/, int /*<<< orphan*/ const);
int /*<<< orphan*/ _mm_or_si128(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_set_epi32(int, int, int, int);
int /*<<< orphan*/ _mm_slli_si128(int /*<<< orphan*/, int);
int /*<<< orphan*/ _mm_srli_si128(int /*<<< orphan*/, int);
int /*<<< orphan*/ _mm_storeu_si128(int /*<<< orphan*/ *, int /*<<< orphan*/);
void store_bgr24_sse2(void *output, __m128i a, __m128i b, __m128i c,
                      __m128i d) {
  const __m128i mask_0 = _mm_set_epi32(0, 0, 0, 0x00ffffff);
  const __m128i mask_1 = _mm_set_epi32(0, 0, 0x00ffffff, 0);
  const __m128i mask_2 = _mm_set_epi32(0, 0x00ffffff, 0, 0);
  const __m128i mask_3 = _mm_set_epi32(0x00ffffff, 0, 0, 0);
  __m128i a0 = _mm_and_si128(a, mask_0);
  __m128i a1 = _mm_srli_si128(_mm_and_si128(a, mask_1), 1);
  __m128i a2 = _mm_srli_si128(_mm_and_si128(a, mask_2), 2);
  __m128i a3 = _mm_srli_si128(_mm_and_si128(a, mask_3), 3);
  __m128i a4 = _mm_slli_si128(_mm_and_si128(b, mask_0), 12);
  __m128i a5 = _mm_slli_si128(_mm_and_si128(b, mask_1), 11);
  __m128i b0 = _mm_srli_si128(_mm_and_si128(b, mask_1), 5);
  __m128i b1 = _mm_srli_si128(_mm_and_si128(b, mask_2), 6);
  __m128i b2 = _mm_srli_si128(_mm_and_si128(b, mask_3), 7);
  __m128i b3 = _mm_slli_si128(_mm_and_si128(c, mask_0), 8);
  __m128i b4 = _mm_slli_si128(_mm_and_si128(c, mask_1), 7);
  __m128i b5 = _mm_slli_si128(_mm_and_si128(c, mask_2), 6);
  __m128i c0 = _mm_srli_si128(_mm_and_si128(c, mask_2), 10);
  __m128i c1 = _mm_srli_si128(_mm_and_si128(c, mask_3), 11);
  __m128i c2 = _mm_slli_si128(_mm_and_si128(d, mask_0), 4);
  __m128i c3 = _mm_slli_si128(_mm_and_si128(d, mask_1), 3);
  __m128i c4 = _mm_slli_si128(_mm_and_si128(d, mask_2), 2);
  __m128i c5 = _mm_slli_si128(_mm_and_si128(d, mask_3), 1);
  __m128i *out = (__m128i *)output;
  _mm_storeu_si128(
      out + 0,
      _mm_or_si128(
          a0,
          _mm_or_si128(
              a1, _mm_or_si128(a2, _mm_or_si128(a3, _mm_or_si128(a4, a5))))));
  _mm_storeu_si128(
      out + 1,
      _mm_or_si128(
          b0,
          _mm_or_si128(
              b1, _mm_or_si128(b2, _mm_or_si128(b3, _mm_or_si128(b4, b5))))));
  _mm_storeu_si128(
      out + 2,
      _mm_or_si128(
          c0,
          _mm_or_si128(
              c1, _mm_or_si128(c2, _mm_or_si128(c3, _mm_or_si128(c4, c5))))));
}


x86 assembly (clang, -O0):
<store_bgr24_sse2>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
xor    %edx,%edx
mov    $0xffffff,%ecx
mov    %edx,%edi
mov    %edx,%esi
call   1030 <_mm_set_epi32@plt>
mov    %eax,-0x1c(%rbp)
xor    %ecx,%ecx
mov    $0xffffff,%edx
mov    %ecx,%edi
mov    %ecx,%esi
call   1030 <_mm_set_epi32@plt>
mov    %eax,-0x20(%rbp)
xor    %ecx,%ecx
mov    $0xffffff,%esi
mov    %ecx,%edi
mov    %ecx,%edx
call   1030 <_mm_set_epi32@plt>
mov    %eax,-0x24(%rbp)
mov    $0xffffff,%edi
xor    %ecx,%ecx
mov    %ecx,%esi
mov    %ecx,%edx
call   1030 <_mm_set_epi32@plt>
mov    %eax,-0x28(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x1c(%rbp),%esi
call   1070 <_mm_and_si128@plt>
mov    %eax,-0x2c(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x20(%rbp),%esi
call   1070 <_mm_and_si128@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1040 <_mm_srli_si128@plt>
mov    %eax,-0x30(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x24(%rbp),%esi
call   1070 <_mm_and_si128@plt>
mov    %eax,%edi
mov    $0x2,%esi
call   1040 <_mm_srli_si128@plt>
mov    %eax,-0x34(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x28(%rbp),%esi
call   1070 <_mm_and_si128@plt>
mov    %eax,%edi
mov    $0x3,%esi
call   1040 <_mm_srli_si128@plt>
mov    %eax,-0x38(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x1c(%rbp),%esi
call   1070 <_mm_and_si128@plt>
mov    %eax,%edi
mov    $0xc,%esi
call   1080 <_mm_slli_si128@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x20(%rbp),%esi
call   1070 <_mm_and_si128@plt>
mov    %eax,%edi
mov    $0xb,%esi
call   1080 <_mm_slli_si128@plt>
mov    %eax,-0x40(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x20(%rbp),%esi
call   1070 <_mm_and_si128@plt>
mov    %eax,%edi
mov    $0x5,%esi
call   1040 <_mm_srli_si128@plt>
mov    %eax,-0x44(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x24(%rbp),%esi
call   1070 <_mm_and_si128@plt>
mov    %eax,%edi
mov    $0x6,%esi
call   1040 <_mm_srli_si128@plt>
mov    %eax,-0x48(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x28(%rbp),%esi
call   1070 <_mm_and_si128@plt>
mov    %eax,%edi
mov    $0x7,%esi
call   1040 <_mm_srli_si128@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x1c(%rbp),%esi
call   1070 <_mm_and_si128@plt>
mov    %eax,%edi
mov    $0x8,%esi
call   1080 <_mm_slli_si128@plt>
mov    %eax,-0x50(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x20(%rbp),%esi
call   1070 <_mm_and_si128@plt>
mov    %eax,%edi
mov    $0x7,%esi
call   1080 <_mm_slli_si128@plt>
mov    %eax,-0x54(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x24(%rbp),%esi
call   1070 <_mm_and_si128@plt>
mov    %eax,%edi
mov    $0x6,%esi
call   1080 <_mm_slli_si128@plt>
mov    %eax,-0x58(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x24(%rbp),%esi
call   1070 <_mm_and_si128@plt>
mov    %eax,%edi
mov    $0xa,%esi
call   1040 <_mm_srli_si128@plt>
mov    %eax,-0x5c(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x28(%rbp),%esi
call   1070 <_mm_and_si128@plt>
mov    %eax,%edi
mov    $0xb,%esi
call   1040 <_mm_srli_si128@plt>
mov    %eax,-0x60(%rbp)
mov    -0x18(%rbp),%edi
mov    -0x1c(%rbp),%esi
call   1070 <_mm_and_si128@plt>
mov    %eax,%edi
mov    $0x4,%esi
call   1080 <_mm_slli_si128@plt>
mov    %eax,-0x64(%rbp)
mov    -0x18(%rbp),%edi
mov    -0x20(%rbp),%esi
call   1070 <_mm_and_si128@plt>
mov    %eax,%edi
mov    $0x3,%esi
call   1080 <_mm_slli_si128@plt>
mov    %eax,-0x68(%rbp)
mov    -0x18(%rbp),%edi
mov    -0x24(%rbp),%esi
call   1070 <_mm_and_si128@plt>
mov    %eax,%edi
mov    $0x2,%esi
call   1080 <_mm_slli_si128@plt>
mov    %eax,-0x6c(%rbp)
mov    -0x18(%rbp),%edi
mov    -0x28(%rbp),%esi
call   1070 <_mm_and_si128@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1080 <_mm_slli_si128@plt>
mov    %eax,-0x70(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x78(%rbp)
mov    -0x78(%rbp),%rax
mov    %rax,-0xb0(%rbp)
mov    -0x2c(%rbp),%eax
mov    %eax,-0xb4(%rbp)
mov    -0x30(%rbp),%eax
mov    %eax,-0xb8(%rbp)
mov    -0x34(%rbp),%eax
mov    %eax,-0xbc(%rbp)
mov    -0x38(%rbp),%eax
mov    %eax,-0xc0(%rbp)
mov    -0x3c(%rbp),%edi
mov    -0x40(%rbp),%esi
call   1050 <_mm_or_si128@plt>
mov    -0xc0(%rbp),%edi
mov    %eax,%esi
call   1050 <_mm_or_si128@plt>
mov    -0xbc(%rbp),%edi
mov    %eax,%esi
call   1050 <_mm_or_si128@plt>
mov    -0xb8(%rbp),%edi
mov    %eax,%esi
call   1050 <_mm_or_si128@plt>
mov    -0xb4(%rbp),%edi
mov    %eax,%esi
call   1050 <_mm_or_si128@plt>
mov    -0xb0(%rbp),%rdi
mov    %eax,%esi
call   1060 <_mm_storeu_si128@plt>
mov    -0x78(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x98(%rbp)
mov    -0x44(%rbp),%eax
mov    %eax,-0x9c(%rbp)
mov    -0x48(%rbp),%eax
mov    %eax,-0xa0(%rbp)
mov    -0x4c(%rbp),%eax
mov    %eax,-0xa4(%rbp)
mov    -0x50(%rbp),%eax
mov    %eax,-0xa8(%rbp)
mov    -0x54(%rbp),%edi
mov    -0x58(%rbp),%esi
call   1050 <_mm_or_si128@plt>
mov    -0xa8(%rbp),%edi
mov    %eax,%esi
call   1050 <_mm_or_si128@plt>
mov    -0xa4(%rbp),%edi
mov    %eax,%esi
call   1050 <_mm_or_si128@plt>
mov    -0xa0(%rbp),%edi
mov    %eax,%esi
call   1050 <_mm_or_si128@plt>
mov    -0x9c(%rbp),%edi
mov    %eax,%esi
call   1050 <_mm_or_si128@plt>
mov    -0x98(%rbp),%rdi
mov    %eax,%esi
call   1060 <_mm_storeu_si128@plt>
mov    -0x78(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x80(%rbp)
mov    -0x5c(%rbp),%eax
mov    %eax,-0x84(%rbp)
mov    -0x60(%rbp),%eax
mov    %eax,-0x88(%rbp)
mov    -0x64(%rbp),%eax
mov    %eax,-0x8c(%rbp)
mov    -0x68(%rbp),%eax
mov    %eax,-0x90(%rbp)
mov    -0x6c(%rbp),%edi
mov    -0x70(%rbp),%esi
call   1050 <_mm_or_si128@plt>
mov    -0x90(%rbp),%edi
mov    %eax,%esi
call   1050 <_mm_or_si128@plt>
mov    -0x8c(%rbp),%edi
mov    %eax,%esi
call   1050 <_mm_or_si128@plt>
mov    -0x88(%rbp),%edi
mov    %eax,%esi
call   1050 <_mm_or_si128@plt>
mov    -0x84(%rbp),%edi
mov    %eax,%esi
call   1050 <_mm_or_si128@plt>
mov    -0x80(%rbp),%rdi
mov    %eax,%esi
call   1060 <_mm_storeu_si128@plt>
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<store_bgr24_sse2>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %r8d,0x34(%rsp)
mov    %ecx,0x4(%rsp)
mov    %edx,%r13d
mov    %esi,%ebx
mov    %rdi,0x40(%rsp)
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
mov    $0xffffff,%ecx
call   1030 <_mm_set_epi32@plt>
mov    %eax,%ebp
mov    %eax,(%rsp)
xor    %edi,%edi
xor    %esi,%esi
mov    $0xffffff,%edx
xor    %ecx,%ecx
call   1030 <_mm_set_epi32@plt>
mov    %eax,%r15d
xor    %edi,%edi
mov    $0xffffff,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <_mm_set_epi32@plt>
mov    %eax,%r14d
mov    $0xffffff,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <_mm_set_epi32@plt>
mov    %eax,%r12d
mov    %ebx,%edi
mov    %ebp,%esi
call   1070 <_mm_and_si128@plt>
mov    %eax,0x3c(%rsp)
mov    %ebx,%edi
mov    %r15d,%esi
call   1070 <_mm_and_si128@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1040 <_mm_srli_si128@plt>
mov    %eax,0x38(%rsp)
mov    %ebx,%edi
mov    %r14d,%ebp
mov    %r14d,%esi
call   1070 <_mm_and_si128@plt>
mov    %eax,%edi
mov    $0x2,%esi
call   1040 <_mm_srli_si128@plt>
mov    %eax,0x30(%rsp)
mov    %ebx,%edi
mov    %r12d,%ebx
mov    %r12d,%esi
call   1070 <_mm_and_si128@plt>
mov    %eax,%edi
mov    $0x3,%esi
call   1040 <_mm_srli_si128@plt>
mov    %eax,0x24(%rsp)
mov    %r13d,%edi
mov    (%rsp),%r12d
mov    %r12d,%esi
call   1070 <_mm_and_si128@plt>
mov    %eax,%edi
mov    $0xc,%esi
call   1080 <_mm_slli_si128@plt>
mov    %eax,0x20(%rsp)
mov    %r13d,%edi
mov    %r15d,%esi
call   1070 <_mm_and_si128@plt>
mov    %eax,%edi
mov    $0xb,%esi
call   1080 <_mm_slli_si128@plt>
mov    %eax,0x14(%rsp)
mov    %r13d,%edi
mov    %r15d,%esi
call   1070 <_mm_and_si128@plt>
mov    %eax,%edi
mov    $0x5,%esi
call   1040 <_mm_srli_si128@plt>
mov    %eax,0x2c(%rsp)
mov    %r13d,%edi
mov    %r14d,%esi
call   1070 <_mm_and_si128@plt>
mov    %eax,%edi
mov    $0x6,%esi
call   1040 <_mm_srli_si128@plt>
mov    %eax,0x28(%rsp)
mov    %r13d,%edi
mov    %ebx,%esi
mov    %ebx,%r13d
call   1070 <_mm_and_si128@plt>
mov    %eax,%edi
mov    $0x7,%esi
call   1040 <_mm_srli_si128@plt>
mov    %eax,0x1c(%rsp)
mov    0x4(%rsp),%ebx
mov    %ebx,%edi
mov    %r12d,%esi
call   1070 <_mm_and_si128@plt>
mov    %eax,%edi
mov    $0x8,%esi
call   1080 <_mm_slli_si128@plt>
mov    %eax,0x10(%rsp)
mov    %ebx,%edi
mov    %r15d,%esi
call   1070 <_mm_and_si128@plt>
mov    %eax,%edi
mov    $0x7,%esi
call   1080 <_mm_slli_si128@plt>
mov    %eax,0xc(%rsp)
mov    %ebx,%edi
mov    %r14d,%esi
call   1070 <_mm_and_si128@plt>
mov    %eax,%edi
mov    $0x6,%esi
call   1080 <_mm_slli_si128@plt>
mov    %eax,0x8(%rsp)
mov    %ebx,%edi
mov    %r14d,%esi
call   1070 <_mm_and_si128@plt>
mov    %eax,%edi
mov    $0xa,%esi
call   1040 <_mm_srli_si128@plt>
mov    %eax,0x18(%rsp)
mov    %ebx,%edi
mov    %r13d,%esi
call   1070 <_mm_and_si128@plt>
mov    %eax,%edi
mov    $0xb,%esi
call   1040 <_mm_srli_si128@plt>
mov    %eax,0x4(%rsp)
mov    0x34(%rsp),%ebx
mov    %ebx,%edi
mov    %r12d,%esi
call   1070 <_mm_and_si128@plt>
mov    %eax,%edi
mov    $0x4,%esi
call   1080 <_mm_slli_si128@plt>
mov    %eax,(%rsp)
mov    %ebx,%edi
mov    %r15d,%esi
call   1070 <_mm_and_si128@plt>
mov    %eax,%edi
mov    $0x3,%esi
call   1080 <_mm_slli_si128@plt>
mov    %eax,%r14d
mov    %ebx,%edi
mov    %ebp,%esi
call   1070 <_mm_and_si128@plt>
mov    %eax,%edi
mov    $0x2,%esi
call   1080 <_mm_slli_si128@plt>
mov    %eax,%ebp
mov    %ebx,%edi
mov    %r13d,%esi
call   1070 <_mm_and_si128@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1080 <_mm_slli_si128@plt>
mov    %eax,%ebx
mov    0x20(%rsp),%edi
mov    0x14(%rsp),%esi
call   1050 <_mm_or_si128@plt>
mov    0x24(%rsp),%edi
mov    %eax,%esi
call   1050 <_mm_or_si128@plt>
mov    0x30(%rsp),%edi
mov    %eax,%esi
call   1050 <_mm_or_si128@plt>
mov    0x38(%rsp),%edi
mov    %eax,%esi
call   1050 <_mm_or_si128@plt>
mov    0x3c(%rsp),%edi
mov    %eax,%esi
call   1050 <_mm_or_si128@plt>
mov    0x40(%rsp),%r12
mov    %r12,%rdi
mov    %eax,%esi
call   1060 <_mm_storeu_si128@plt>
lea    0x4(%r12),%r15
mov    0xc(%rsp),%edi
mov    0x8(%rsp),%esi
call   1050 <_mm_or_si128@plt>
mov    0x10(%rsp),%edi
mov    %eax,%esi
call   1050 <_mm_or_si128@plt>
mov    0x1c(%rsp),%edi
mov    %eax,%esi
call   1050 <_mm_or_si128@plt>
mov    0x28(%rsp),%edi
mov    %eax,%esi
call   1050 <_mm_or_si128@plt>
mov    0x2c(%rsp),%edi
mov    %eax,%esi
call   1050 <_mm_or_si128@plt>
mov    %r15,%rdi
mov    %eax,%esi
call   1060 <_mm_storeu_si128@plt>
add    $0x8,%r12
mov    %ebp,%edi
mov    %ebx,%esi
call   1050 <_mm_or_si128@plt>
mov    %r14d,%edi
mov    %eax,%esi
call   1050 <_mm_or_si128@plt>
mov    (%rsp),%edi
mov    %eax,%esi
call   1050 <_mm_or_si128@plt>
mov    0x4(%rsp),%edi
mov    %eax,%esi
call   1050 <_mm_or_si128@plt>
mov    0x18(%rsp),%edi
mov    %eax,%esi
call   1050 <_mm_or_si128@plt>
mov    %r12,%rdi
mov    %eax,%esi
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1060 <_mm_storeu_si128@plt>

LLVM IR (-O0):
define void @store_bgr24_sse2(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32
%28 = alloca i32
%29 = alloca i32
%30 = alloca i32
%31 = alloca i32
%32 = alloca i32
%33 = alloca i32*
store i8* %0, i8** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%34 = call i32 @_mm_set_epi32(i32 0, i32 0, i32 0, i32 16777215)
store i32 %34, i32* %11
%35 = call i32 @_mm_set_epi32(i32 0, i32 0, i32 16777215, i32 0)
store i32 %35, i32* %12
%36 = call i32 @_mm_set_epi32(i32 0, i32 16777215, i32 0, i32 0)
store i32 %36, i32* %13
%37 = call i32 @_mm_set_epi32(i32 16777215, i32 0, i32 0, i32 0)
store i32 %37, i32* %14
%38 = load i32, i32* %7
%39 = load i32, i32* %11
%40 = call i32 @_mm_and_si128(i32 %38, i32 %39)
store i32 %40, i32* %15
%41 = load i32, i32* %7
%42 = load i32, i32* %12
%43 = call i32 @_mm_and_si128(i32 %41, i32 %42)
%44 = call i32 @_mm_srli_si128(i32 %43, i32 1)
store i32 %44, i32* %16
%45 = load i32, i32* %7
%46 = load i32, i32* %13
%47 = call i32 @_mm_and_si128(i32 %45, i32 %46)
%48 = call i32 @_mm_srli_si128(i32 %47, i32 2)
store i32 %48, i32* %17
%49 = load i32, i32* %7
%50 = load i32, i32* %14
%51 = call i32 @_mm_and_si128(i32 %49, i32 %50)
%52 = call i32 @_mm_srli_si128(i32 %51, i32 3)
store i32 %52, i32* %18
%53 = load i32, i32* %8
%54 = load i32, i32* %11
%55 = call i32 @_mm_and_si128(i32 %53, i32 %54)
%56 = call i32 @_mm_slli_si128(i32 %55, i32 12)
store i32 %56, i32* %19
%57 = load i32, i32* %8
%58 = load i32, i32* %12
%59 = call i32 @_mm_and_si128(i32 %57, i32 %58)
%60 = call i32 @_mm_slli_si128(i32 %59, i32 11)
store i32 %60, i32* %20
%61 = load i32, i32* %8
%62 = load i32, i32* %12
%63 = call i32 @_mm_and_si128(i32 %61, i32 %62)
%64 = call i32 @_mm_srli_si128(i32 %63, i32 5)
store i32 %64, i32* %21
%65 = load i32, i32* %8
%66 = load i32, i32* %13
%67 = call i32 @_mm_and_si128(i32 %65, i32 %66)
%68 = call i32 @_mm_srli_si128(i32 %67, i32 6)
store i32 %68, i32* %22
%69 = load i32, i32* %8
%70 = load i32, i32* %14
%71 = call i32 @_mm_and_si128(i32 %69, i32 %70)
%72 = call i32 @_mm_srli_si128(i32 %71, i32 7)
store i32 %72, i32* %23
%73 = load i32, i32* %9
%74 = load i32, i32* %11
%75 = call i32 @_mm_and_si128(i32 %73, i32 %74)
%76 = call i32 @_mm_slli_si128(i32 %75, i32 8)
store i32 %76, i32* %24
%77 = load i32, i32* %9
%78 = load i32, i32* %12
%79 = call i32 @_mm_and_si128(i32 %77, i32 %78)
%80 = call i32 @_mm_slli_si128(i32 %79, i32 7)
store i32 %80, i32* %25
%81 = load i32, i32* %9
%82 = load i32, i32* %13
%83 = call i32 @_mm_and_si128(i32 %81, i32 %82)
%84 = call i32 @_mm_slli_si128(i32 %83, i32 6)
store i32 %84, i32* %26
%85 = load i32, i32* %9
%86 = load i32, i32* %13
%87 = call i32 @_mm_and_si128(i32 %85, i32 %86)
%88 = call i32 @_mm_srli_si128(i32 %87, i32 10)
store i32 %88, i32* %27
%89 = load i32, i32* %9
%90 = load i32, i32* %14
%91 = call i32 @_mm_and_si128(i32 %89, i32 %90)
%92 = call i32 @_mm_srli_si128(i32 %91, i32 11)
store i32 %92, i32* %28
%93 = load i32, i32* %10
%94 = load i32, i32* %11
%95 = call i32 @_mm_and_si128(i32 %93, i32 %94)
%96 = call i32 @_mm_slli_si128(i32 %95, i32 4)
store i32 %96, i32* %29
%97 = load i32, i32* %10
%98 = load i32, i32* %12
%99 = call i32 @_mm_and_si128(i32 %97, i32 %98)
%100 = call i32 @_mm_slli_si128(i32 %99, i32 3)
store i32 %100, i32* %30
%101 = load i32, i32* %10
%102 = load i32, i32* %13
%103 = call i32 @_mm_and_si128(i32 %101, i32 %102)
%104 = call i32 @_mm_slli_si128(i32 %103, i32 2)
store i32 %104, i32* %31
%105 = load i32, i32* %10
%106 = load i32, i32* %14
%107 = call i32 @_mm_and_si128(i32 %105, i32 %106)
%108 = call i32 @_mm_slli_si128(i32 %107, i32 1)
store i32 %108, i32* %32
%109 = load i8*, i8** %6
%110 = bitcast i8* %109 to i32*
store i32* %110, i32** %33
%111 = load i32*, i32** %33
%112 = getelementptr inbounds i32, i32* %111, i64 0
%113 = load i32, i32* %15
%114 = load i32, i32* %16
%115 = load i32, i32* %17
%116 = load i32, i32* %18
%117 = load i32, i32* %19
%118 = load i32, i32* %20
%119 = call i32 @_mm_or_si128(i32 %117, i32 %118)
%120 = call i32 @_mm_or_si128(i32 %116, i32 %119)
%121 = call i32 @_mm_or_si128(i32 %115, i32 %120)
%122 = call i32 @_mm_or_si128(i32 %114, i32 %121)
%123 = call i32 @_mm_or_si128(i32 %113, i32 %122)
%124 = call i32 @_mm_storeu_si128(i32* %112, i32 %123)
%125 = load i32*, i32** %33
%126 = getelementptr inbounds i32, i32* %125, i64 1
%127 = load i32, i32* %21
%128 = load i32, i32* %22
%129 = load i32, i32* %23
%130 = load i32, i32* %24
%131 = load i32, i32* %25
%132 = load i32, i32* %26
%133 = call i32 @_mm_or_si128(i32 %131, i32 %132)
%134 = call i32 @_mm_or_si128(i32 %130, i32 %133)
%135 = call i32 @_mm_or_si128(i32 %129, i32 %134)
%136 = call i32 @_mm_or_si128(i32 %128, i32 %135)
%137 = call i32 @_mm_or_si128(i32 %127, i32 %136)
%138 = call i32 @_mm_storeu_si128(i32* %126, i32 %137)
%139 = load i32*, i32** %33
%140 = getelementptr inbounds i32, i32* %139, i64 2
%141 = load i32, i32* %27
%142 = load i32, i32* %28
%143 = load i32, i32* %29
%144 = load i32, i32* %30
%145 = load i32, i32* %31
%146 = load i32, i32* %32
%147 = call i32 @_mm_or_si128(i32 %145, i32 %146)
%148 = call i32 @_mm_or_si128(i32 %144, i32 %147)
%149 = call i32 @_mm_or_si128(i32 %143, i32 %148)
%150 = call i32 @_mm_or_si128(i32 %142, i32 %149)
%151 = call i32 @_mm_or_si128(i32 %141, i32 %150)
%152 = call i32 @_mm_storeu_si128(i32* %140, i32 %151)
ret void
}

LLVM IR (-O2):
define void @store_bgr24_sse2(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @_mm_set_epi32(i32 0, i32 0, i32 0, i32 16777215)
%7 = tail call i32 @_mm_set_epi32(i32 0, i32 0, i32 16777215, i32 0)
%8 = tail call i32 @_mm_set_epi32(i32 0, i32 16777215, i32 0, i32 0)
%9 = tail call i32 @_mm_set_epi32(i32 16777215, i32 0, i32 0, i32 0)
%10 = tail call i32 @_mm_and_si128(i32 %1, i32 %6)
%11 = tail call i32 @_mm_and_si128(i32 %1, i32 %7)
%12 = tail call i32 @_mm_srli_si128(i32 %11, i32 1)
%13 = tail call i32 @_mm_and_si128(i32 %1, i32 %8)
%14 = tail call i32 @_mm_srli_si128(i32 %13, i32 2)
%15 = tail call i32 @_mm_and_si128(i32 %1, i32 %9)
%16 = tail call i32 @_mm_srli_si128(i32 %15, i32 3)
%17 = tail call i32 @_mm_and_si128(i32 %2, i32 %6)
%18 = tail call i32 @_mm_slli_si128(i32 %17, i32 12)
%19 = tail call i32 @_mm_and_si128(i32 %2, i32 %7)
%20 = tail call i32 @_mm_slli_si128(i32 %19, i32 11)
%21 = tail call i32 @_mm_and_si128(i32 %2, i32 %7)
%22 = tail call i32 @_mm_srli_si128(i32 %21, i32 5)
%23 = tail call i32 @_mm_and_si128(i32 %2, i32 %8)
%24 = tail call i32 @_mm_srli_si128(i32 %23, i32 6)
%25 = tail call i32 @_mm_and_si128(i32 %2, i32 %9)
%26 = tail call i32 @_mm_srli_si128(i32 %25, i32 7)
%27 = tail call i32 @_mm_and_si128(i32 %3, i32 %6)
%28 = tail call i32 @_mm_slli_si128(i32 %27, i32 8)
%29 = tail call i32 @_mm_and_si128(i32 %3, i32 %7)
%30 = tail call i32 @_mm_slli_si128(i32 %29, i32 7)
%31 = tail call i32 @_mm_and_si128(i32 %3, i32 %8)
%32 = tail call i32 @_mm_slli_si128(i32 %31, i32 6)
%33 = tail call i32 @_mm_and_si128(i32 %3, i32 %8)
%34 = tail call i32 @_mm_srli_si128(i32 %33, i32 10)
%35 = tail call i32 @_mm_and_si128(i32 %3, i32 %9)
%36 = tail call i32 @_mm_srli_si128(i32 %35, i32 11)
%37 = tail call i32 @_mm_and_si128(i32 %4, i32 %6)
%38 = tail call i32 @_mm_slli_si128(i32 %37, i32 4)
%39 = tail call i32 @_mm_and_si128(i32 %4, i32 %7)
%40 = tail call i32 @_mm_slli_si128(i32 %39, i32 3)
%41 = tail call i32 @_mm_and_si128(i32 %4, i32 %8)
%42 = tail call i32 @_mm_slli_si128(i32 %41, i32 2)
%43 = tail call i32 @_mm_and_si128(i32 %4, i32 %9)
%44 = tail call i32 @_mm_slli_si128(i32 %43, i32 1)
%45 = bitcast i8* %0 to i32*
%46 = tail call i32 @_mm_or_si128(i32 %18, i32 %20)
%47 = tail call i32 @_mm_or_si128(i32 %16, i32 %46)
%48 = tail call i32 @_mm_or_si128(i32 %14, i32 %47)
%49 = tail call i32 @_mm_or_si128(i32 %12, i32 %48)
%50 = tail call i32 @_mm_or_si128(i32 %10, i32 %49)
%51 = tail call i32 @_mm_storeu_si128(i32* %45, i32 %50)
%52 = getelementptr inbounds i8, i8* %0, i64 4
%53 = bitcast i8* %52 to i32*
%54 = tail call i32 @_mm_or_si128(i32 %30, i32 %32)
%55 = tail call i32 @_mm_or_si128(i32 %28, i32 %54)
%56 = tail call i32 @_mm_or_si128(i32 %26, i32 %55)
%57 = tail call i32 @_mm_or_si128(i32 %24, i32 %56)
%58 = tail call i32 @_mm_or_si128(i32 %22, i32 %57)
%59 = tail call i32 @_mm_storeu_si128(i32* %53, i32 %58)
%60 = getelementptr inbounds i8, i8* %0, i64 8
%61 = bitcast i8* %60 to i32*
%62 = tail call i32 @_mm_or_si128(i32 %42, i32 %44)
%63 = tail call i32 @_mm_or_si128(i32 %40, i32 %62)
%64 = tail call i32 @_mm_or_si128(i32 %38, i32 %63)
%65 = tail call i32 @_mm_or_si128(i32 %36, i32 %64)
%66 = tail call i32 @_mm_or_si128(i32 %34, i32 %65)
%67 = tail call i32 @_mm_storeu_si128(i32* %61, i32 %66)
ret void
}