#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 */
unsigned int _mm_extract_epi8(int /*<<< orphan*/, int);
unsigned long create_mask(unsigned int, int, unsigned int);
unsigned long write_new(__m128i read) {
  unsigned long write = 0;
  int i;
  unsigned int where = 64;
  unsigned int pulled;
  pulled = _mm_extract_epi8(read, 15);
  where = where - (pulled * 4);
  write |= create_mask(pulled, 0xF, where);
  pulled = _mm_extract_epi8(read, 14);
  where = where - (pulled * 4);
  write |= create_mask(pulled, 0xE, where);
  pulled = _mm_extract_epi8(read, 13);
  where = where - (pulled * 4);
  write |= create_mask(pulled, 0xD, where);
  pulled = _mm_extract_epi8(read, 12);
  where = where - (pulled * 4);
  write |= create_mask(pulled, 0xC, where);
  pulled = _mm_extract_epi8(read, 11);
  where = where - (pulled * 4);
  write |= create_mask(pulled, 0xB, where);
  pulled = _mm_extract_epi8(read, 10);
  where = where - (pulled * 4);
  write |= create_mask(pulled, 0xA, where);
  pulled = _mm_extract_epi8(read, 9);
  where = where - (pulled * 4);
  write |= create_mask(pulled, 9, where);
  pulled = _mm_extract_epi8(read, 8);
  where = where - (pulled * 4);
  write |= create_mask(pulled, 8, where);
  pulled = _mm_extract_epi8(read, 7);
  where = where - (pulled * 4);
  write |= create_mask(pulled, 7, where);
  pulled = _mm_extract_epi8(read, 6);
  where = where - (pulled * 4);
  ;
  write |= create_mask(pulled, 6, where);
  pulled = _mm_extract_epi8(read, 5);
  where = where - (pulled * 4);
  ;
  write |= create_mask(pulled, 5, where);
  pulled = _mm_extract_epi8(read, 4);
  where = where - (pulled * 4);
  ;
  write |= create_mask(pulled, 4, where);
  pulled = _mm_extract_epi8(read, 3);
  where = where - (pulled * 4);
  ;
  write |= create_mask(pulled, 3, where);
  pulled = _mm_extract_epi8(read, 2);
  where = where - (pulled * 4);
  ;
  write |= create_mask(pulled, 2, where);
  pulled = _mm_extract_epi8(read, 1);
  where = where - (pulled * 4);
  ;
  write |= create_mask(pulled, 1, where);
  return write;
}


x86 assembly (clang, -O0):
<write_new>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
movl   $0x40,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    $0xf,%esi
call   1030 <_mm_extract_epi8@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x1c(%rbp),%ecx
shl    $0x2,%ecx
sub    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%edx
mov    $0xf,%esi
call   1040 <create_mask@plt>
or     -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0xe,%esi
call   1030 <_mm_extract_epi8@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x1c(%rbp),%ecx
shl    $0x2,%ecx
sub    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%edx
mov    $0xe,%esi
call   1040 <create_mask@plt>
or     -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0xd,%esi
call   1030 <_mm_extract_epi8@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x1c(%rbp),%ecx
shl    $0x2,%ecx
sub    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%edx
mov    $0xd,%esi
call   1040 <create_mask@plt>
or     -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0xc,%esi
call   1030 <_mm_extract_epi8@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x1c(%rbp),%ecx
shl    $0x2,%ecx
sub    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%edx
mov    $0xc,%esi
call   1040 <create_mask@plt>
or     -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0xb,%esi
call   1030 <_mm_extract_epi8@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x1c(%rbp),%ecx
shl    $0x2,%ecx
sub    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%edx
mov    $0xb,%esi
call   1040 <create_mask@plt>
or     -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0xa,%esi
call   1030 <_mm_extract_epi8@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x1c(%rbp),%ecx
shl    $0x2,%ecx
sub    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%edx
mov    $0xa,%esi
call   1040 <create_mask@plt>
or     -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x9,%esi
call   1030 <_mm_extract_epi8@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x1c(%rbp),%ecx
shl    $0x2,%ecx
sub    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%edx
mov    $0x9,%esi
call   1040 <create_mask@plt>
or     -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x8,%esi
call   1030 <_mm_extract_epi8@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x1c(%rbp),%ecx
shl    $0x2,%ecx
sub    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%edx
mov    $0x8,%esi
call   1040 <create_mask@plt>
or     -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x7,%esi
call   1030 <_mm_extract_epi8@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x1c(%rbp),%ecx
shl    $0x2,%ecx
sub    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%edx
mov    $0x7,%esi
call   1040 <create_mask@plt>
or     -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x6,%esi
call   1030 <_mm_extract_epi8@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x1c(%rbp),%ecx
shl    $0x2,%ecx
sub    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%edx
mov    $0x6,%esi
call   1040 <create_mask@plt>
or     -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x5,%esi
call   1030 <_mm_extract_epi8@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x1c(%rbp),%ecx
shl    $0x2,%ecx
sub    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%edx
mov    $0x5,%esi
call   1040 <create_mask@plt>
or     -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x4,%esi
call   1030 <_mm_extract_epi8@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x1c(%rbp),%ecx
shl    $0x2,%ecx
sub    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%edx
mov    $0x4,%esi
call   1040 <create_mask@plt>
or     -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x3,%esi
call   1030 <_mm_extract_epi8@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x1c(%rbp),%ecx
shl    $0x2,%ecx
sub    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%edx
mov    $0x3,%esi
call   1040 <create_mask@plt>
or     -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x2,%esi
call   1030 <_mm_extract_epi8@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x1c(%rbp),%ecx
shl    $0x2,%ecx
sub    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%edx
mov    $0x2,%esi
call   1040 <create_mask@plt>
or     -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <_mm_extract_epi8@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x1c(%rbp),%ecx
shl    $0x2,%ecx
sub    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%edx
mov    $0x1,%esi
call   1040 <create_mask@plt>
or     -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_new>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edi,%r15d
mov    $0xf,%esi
call   1030 <_mm_extract_epi8@plt>
lea    0x0(,%rax,4),%ecx
mov    $0x40,%ebx
sub    %ecx,%ebx
mov    %eax,%edi
mov    $0xf,%esi
mov    %ebx,%edx
call   1040 <create_mask@plt>
mov    %rax,%r14
mov    %r15d,%edi
mov    $0xe,%esi
call   1030 <_mm_extract_epi8@plt>
lea    0x0(,%rax,4),%ecx
sub    %ecx,%ebx
mov    %eax,%edi
mov    $0xe,%esi
mov    %ebx,%edx
call   1040 <create_mask@plt>
mov    %rax,%rbp
or     %r14,%rbp
mov    %r15d,%edi
mov    $0xd,%esi
call   1030 <_mm_extract_epi8@plt>
lea    0x0(,%rax,4),%ecx
sub    %ecx,%ebx
mov    %eax,%edi
mov    $0xd,%esi
mov    %ebx,%edx
call   1040 <create_mask@plt>
mov    %rax,%r14
or     %rbp,%r14
mov    %r15d,%edi
mov    $0xc,%esi
call   1030 <_mm_extract_epi8@plt>
lea    0x0(,%rax,4),%ecx
sub    %ecx,%ebx
mov    %eax,%edi
mov    $0xc,%esi
mov    %ebx,%edx
call   1040 <create_mask@plt>
mov    %rax,%rbp
or     %r14,%rbp
mov    %r15d,%edi
mov    $0xb,%esi
call   1030 <_mm_extract_epi8@plt>
lea    0x0(,%rax,4),%ecx
sub    %ecx,%ebx
mov    %eax,%edi
mov    $0xb,%esi
mov    %ebx,%edx
call   1040 <create_mask@plt>
mov    %rax,%r14
or     %rbp,%r14
mov    %r15d,%edi
mov    $0xa,%esi
call   1030 <_mm_extract_epi8@plt>
lea    0x0(,%rax,4),%ecx
sub    %ecx,%ebx
mov    %eax,%edi
mov    $0xa,%esi
mov    %ebx,%edx
call   1040 <create_mask@plt>
mov    %rax,%rbp
or     %r14,%rbp
mov    %r15d,%edi
mov    $0x9,%esi
call   1030 <_mm_extract_epi8@plt>
lea    0x0(,%rax,4),%ecx
sub    %ecx,%ebx
mov    %eax,%edi
mov    $0x9,%esi
mov    %ebx,%edx
call   1040 <create_mask@plt>
mov    %rax,%r14
or     %rbp,%r14
mov    %r15d,%edi
mov    $0x8,%esi
call   1030 <_mm_extract_epi8@plt>
lea    0x0(,%rax,4),%ecx
sub    %ecx,%ebx
mov    %eax,%edi
mov    $0x8,%esi
mov    %ebx,%edx
call   1040 <create_mask@plt>
mov    %rax,%rbp
or     %r14,%rbp
mov    %r15d,%edi
mov    $0x7,%esi
call   1030 <_mm_extract_epi8@plt>
lea    0x0(,%rax,4),%ecx
sub    %ecx,%ebx
mov    %eax,%edi
mov    $0x7,%esi
mov    %ebx,%edx
call   1040 <create_mask@plt>
mov    %rax,%r14
or     %rbp,%r14
mov    %r15d,%edi
mov    $0x6,%esi
call   1030 <_mm_extract_epi8@plt>
lea    0x0(,%rax,4),%ecx
sub    %ecx,%ebx
mov    %eax,%edi
mov    $0x6,%esi
mov    %ebx,%edx
call   1040 <create_mask@plt>
mov    %rax,%rbp
or     %r14,%rbp
mov    %r15d,%edi
mov    $0x5,%esi
call   1030 <_mm_extract_epi8@plt>
lea    0x0(,%rax,4),%ecx
sub    %ecx,%ebx
mov    %eax,%edi
mov    $0x5,%esi
mov    %ebx,%edx
call   1040 <create_mask@plt>
mov    %rax,%r14
or     %rbp,%r14
mov    %r15d,%edi
mov    $0x4,%esi
call   1030 <_mm_extract_epi8@plt>
lea    0x0(,%rax,4),%ecx
sub    %ecx,%ebx
mov    %eax,%edi
mov    $0x4,%esi
mov    %ebx,%edx
call   1040 <create_mask@plt>
mov    %rax,%rbp
or     %r14,%rbp
mov    %r15d,%edi
mov    $0x3,%esi
call   1030 <_mm_extract_epi8@plt>
lea    0x0(,%rax,4),%ecx
sub    %ecx,%ebx
mov    %eax,%edi
mov    $0x3,%esi
mov    %ebx,%edx
call   1040 <create_mask@plt>
mov    %rax,%r14
or     %rbp,%r14
mov    %r15d,%edi
mov    $0x2,%esi
call   1030 <_mm_extract_epi8@plt>
lea    0x0(,%rax,4),%ecx
sub    %ecx,%ebx
mov    %eax,%edi
mov    $0x2,%esi
mov    %ebx,%edx
call   1040 <create_mask@plt>
mov    %rax,%rbp
or     %r14,%rbp
mov    %r15d,%edi
mov    $0x1,%esi
call   1030 <_mm_extract_epi8@plt>
lea    0x0(,%rax,4),%ecx
sub    %ecx,%ebx
mov    %eax,%edi
mov    $0x1,%esi
mov    %ebx,%edx
call   1040 <create_mask@plt>
or     %rbp,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i64 @write_new(i32 %0) {
%2 = tail call i32 @_mm_extract_epi8(i32 %0, i32 15)
%3 = mul i32 %2, -4
%4 = add i32 %3, 64
%5 = tail call i64 @create_mask(i32 %2, i32 15, i32 %4)
%6 = tail call i32 @_mm_extract_epi8(i32 %0, i32 14)
%7 = mul i32 %6, -4
%8 = add i32 %7, %4
%9 = tail call i64 @create_mask(i32 %6, i32 14, i32 %8)
%10 = or i64 %9, %5
%11 = tail call i32 @_mm_extract_epi8(i32 %0, i32 13)
%12 = mul i32 %11, -4
%13 = add i32 %12, %8
%14 = tail call i64 @create_mask(i32 %11, i32 13, i32 %13)
%15 = or i64 %10, %14
%16 = tail call i32 @_mm_extract_epi8(i32 %0, i32 12)
%17 = mul i32 %16, -4
%18 = add i32 %17, %13
%19 = tail call i64 @create_mask(i32 %16, i32 12, i32 %18)
%20 = or i64 %15, %19
%21 = tail call i32 @_mm_extract_epi8(i32 %0, i32 11)
%22 = mul i32 %21, -4
%23 = add i32 %22, %18
%24 = tail call i64 @create_mask(i32 %21, i32 11, i32 %23)
%25 = or i64 %20, %24
%26 = tail call i32 @_mm_extract_epi8(i32 %0, i32 10)
%27 = mul i32 %26, -4
%28 = add i32 %27, %23
%29 = tail call i64 @create_mask(i32 %26, i32 10, i32 %28)
%30 = or i64 %25, %29
%31 = tail call i32 @_mm_extract_epi8(i32 %0, i32 9)
%32 = mul i32 %31, -4
%33 = add i32 %32, %28
%34 = tail call i64 @create_mask(i32 %31, i32 9, i32 %33)
%35 = or i64 %30, %34
%36 = tail call i32 @_mm_extract_epi8(i32 %0, i32 8)
%37 = mul i32 %36, -4
%38 = add i32 %37, %33
%39 = tail call i64 @create_mask(i32 %36, i32 8, i32 %38)
%40 = or i64 %35, %39
%41 = tail call i32 @_mm_extract_epi8(i32 %0, i32 7)
%42 = mul i32 %41, -4
%43 = add i32 %42, %38
%44 = tail call i64 @create_mask(i32 %41, i32 7, i32 %43)
%45 = or i64 %40, %44
%46 = tail call i32 @_mm_extract_epi8(i32 %0, i32 6)
%47 = mul i32 %46, -4
%48 = add i32 %47, %43
%49 = tail call i64 @create_mask(i32 %46, i32 6, i32 %48)
%50 = or i64 %45, %49
%51 = tail call i32 @_mm_extract_epi8(i32 %0, i32 5)
%52 = mul i32 %51, -4
%53 = add i32 %52, %48
%54 = tail call i64 @create_mask(i32 %51, i32 5, i32 %53)
%55 = or i64 %50, %54
%56 = tail call i32 @_mm_extract_epi8(i32 %0, i32 4)
%57 = mul i32 %56, -4
%58 = add i32 %57, %53
%59 = tail call i64 @create_mask(i32 %56, i32 4, i32 %58)
%60 = or i64 %55, %59
%61 = tail call i32 @_mm_extract_epi8(i32 %0, i32 3)
%62 = mul i32 %61, -4
%63 = add i32 %62, %58
%64 = tail call i64 @create_mask(i32 %61, i32 3, i32 %63)
%65 = or i64 %60, %64
%66 = tail call i32 @_mm_extract_epi8(i32 %0, i32 2)
%67 = mul i32 %66, -4
%68 = add i32 %67, %63
%69 = tail call i64 @create_mask(i32 %66, i32 2, i32 %68)
%70 = or i64 %65, %69
%71 = tail call i32 @_mm_extract_epi8(i32 %0, i32 1)
%72 = mul i32 %71, -4
%73 = add i32 %72, %68
%74 = tail call i64 @create_mask(i32 %71, i32 1, i32 %73)
%75 = or i64 %70, %74
ret i64 %75
}