void unscrun(register unsigned long *outof, register unsigned char *into) {
  *into++ = (unsigned char)((*outof >> 24) & 0xffL);
  *into++ = (unsigned char)((*outof >> 16) & 0xffL);
  *into++ = (unsigned char)((*outof >> 8) & 0xffL);
  *into++ = (unsigned char)(*outof++ & 0xffL);
  *into++ = (unsigned char)((*outof >> 24) & 0xffL);
  *into++ = (unsigned char)((*outof >> 16) & 0xffL);
  *into++ = (unsigned char)((*outof >> 8) & 0xffL);
  *into = (unsigned char)(*outof & 0xffL);
  return;
}


x86 assembly (clang, -O0):
<unscrun>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
shr    $0x18,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
shr    $0x10,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
shr    $0x8,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
shr    $0x18,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
shr    $0x10,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
shr    $0x8,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<unscrun>:
mov    0x3(%rdi),%al
mov    %al,(%rsi)
mov    0x2(%rdi),%al
mov    %al,0x1(%rsi)
mov    0x1(%rdi),%al
mov    %al,0x2(%rsi)
mov    (%rdi),%al
mov    %al,0x3(%rsi)
mov    0xb(%rdi),%al
mov    %al,0x4(%rsi)
mov    0xa(%rdi),%al
mov    %al,0x5(%rsi)
mov    0x9(%rdi),%al
mov    %al,0x6(%rsi)
mov    0x8(%rdi),%al
mov    %al,0x7(%rsi)
ret

LLVM IR (-O0):
define void @unscrun(i64* %0, i8* %1) {
%3 = alloca i64*
%4 = alloca i8*
store i64* %0, i64** %3
store i8* %1, i8** %4
%5 = load i64*, i64** %3
%6 = load i64, i64* %5
%7 = lshr i64 %6, 24
%8 = and i64 %7, 255
%9 = trunc i64 %8 to i8
%10 = load i8*, i8** %4
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %4
store i8 %9, i8* %10
%12 = load i64*, i64** %3
%13 = load i64, i64* %12
%14 = lshr i64 %13, 16
%15 = and i64 %14, 255
%16 = trunc i64 %15 to i8
%17 = load i8*, i8** %4
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %4
store i8 %16, i8* %17
%19 = load i64*, i64** %3
%20 = load i64, i64* %19
%21 = lshr i64 %20, 8
%22 = and i64 %21, 255
%23 = trunc i64 %22 to i8
%24 = load i8*, i8** %4
%25 = getelementptr inbounds i8, i8* %24, i32 1
store i8* %25, i8** %4
store i8 %23, i8* %24
%26 = load i64*, i64** %3
%27 = getelementptr inbounds i64, i64* %26, i32 1
store i64* %27, i64** %3
%28 = load i64, i64* %26
%29 = and i64 %28, 255
%30 = trunc i64 %29 to i8
%31 = load i8*, i8** %4
%32 = getelementptr inbounds i8, i8* %31, i32 1
store i8* %32, i8** %4
store i8 %30, i8* %31
%33 = load i64*, i64** %3
%34 = load i64, i64* %33
%35 = lshr i64 %34, 24
%36 = and i64 %35, 255
%37 = trunc i64 %36 to i8
%38 = load i8*, i8** %4
%39 = getelementptr inbounds i8, i8* %38, i32 1
store i8* %39, i8** %4
store i8 %37, i8* %38
%40 = load i64*, i64** %3
%41 = load i64, i64* %40
%42 = lshr i64 %41, 16
%43 = and i64 %42, 255
%44 = trunc i64 %43 to i8
%45 = load i8*, i8** %4
%46 = getelementptr inbounds i8, i8* %45, i32 1
store i8* %46, i8** %4
store i8 %44, i8* %45
%47 = load i64*, i64** %3
%48 = load i64, i64* %47
%49 = lshr i64 %48, 8
%50 = and i64 %49, 255
%51 = trunc i64 %50 to i8
%52 = load i8*, i8** %4
%53 = getelementptr inbounds i8, i8* %52, i32 1
store i8* %53, i8** %4
store i8 %51, i8* %52
%54 = load i64*, i64** %3
%55 = load i64, i64* %54
%56 = and i64 %55, 255
%57 = trunc i64 %56 to i8
%58 = load i8*, i8** %4
store i8 %57, i8* %58
ret void
}

LLVM IR (-O2):
define void @unscrun(i64* nocapture %0, i8* nocapture writeonly %1) {
%3 = load i64, i64* %0
%4 = lshr i64 %3, 24
%5 = trunc i64 %4 to i8
%6 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %5, i8* %1
%7 = load i64, i64* %0
%8 = lshr i64 %7, 16
%9 = trunc i64 %8 to i8
%10 = getelementptr inbounds i8, i8* %1, i64 2
store i8 %9, i8* %6
%11 = load i64, i64* %0
%12 = lshr i64 %11, 8
%13 = trunc i64 %12 to i8
%14 = getelementptr inbounds i8, i8* %1, i64 3
store i8 %13, i8* %10
%15 = getelementptr inbounds i64, i64* %0, i64 1
%16 = load i64, i64* %0
%17 = trunc i64 %16 to i8
%18 = getelementptr inbounds i8, i8* %1, i64 4
store i8 %17, i8* %14
%19 = load i64, i64* %15
%20 = lshr i64 %19, 24
%21 = trunc i64 %20 to i8
%22 = getelementptr inbounds i8, i8* %1, i64 5
store i8 %21, i8* %18
%23 = load i64, i64* %15
%24 = lshr i64 %23, 16
%25 = trunc i64 %24 to i8
%26 = getelementptr inbounds i8, i8* %1, i64 6
store i8 %25, i8* %22
%27 = load i64, i64* %15
%28 = lshr i64 %27, 8
%29 = trunc i64 %28 to i8
%30 = getelementptr inbounds i8, i8* %1, i64 7
store i8 %29, i8* %26
%31 = load i64, i64* %15
%32 = trunc i64 %31 to i8
store i8 %32, i8* %30
ret void
}