#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 uint8_t;
typedef int uint64_t;

/* Variables and functions */
void ToSTC(uint8_t *p_aux, uint64_t i_stc) {
  p_aux[0] = i_stc >> 56;
  p_aux[1] = (i_stc >> 48) & 0xff;
  p_aux[2] = (i_stc >> 40) & 0xff;
  p_aux[3] = (i_stc >> 32) & 0xff;
  p_aux[4] = (i_stc >> 24) & 0xff;
  p_aux[5] = (i_stc >> 16) & 0xff;
  p_aux[6] = (i_stc >> 8) & 0xff;
  p_aux[7] = (i_stc >> 0) & 0xff;
}


x86 assembly (clang, -O0):
<ToSTC>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x38,%ecx
sar    %cl,%eax
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%eax
mov    $0x30,%ecx
sar    %cl,%eax
mov    %eax,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0xc(%rbp),%eax
mov    $0x28,%ecx
sar    %cl,%eax
mov    %eax,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0xc(%rbp),%eax
mov    $0x20,%ecx
sar    %cl,%eax
mov    %eax,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0xc(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x18,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x10(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x10,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x14(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x18(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x0,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x1c(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ToSTC>:
mov    %esi,%eax
mov    %esi,%ecx
movzbl %ah,%edx
movzbl %al,%esi
shr    $0x18,%eax
mov    %eax,0x10(%rdi)
shr    $0x10,%ecx
movzbl %cl,%eax
mov    %eax,0x14(%rdi)
mov    %edx,0x18(%rdi)
mov    %esi,0x1c(%rdi)
ret

LLVM IR (-O0):
define void @ToSTC(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = ashr i32 %5, 56
%7 = load i32*, i32** %3
%8 = getelementptr inbounds i32, i32* %7, i64 0
store i32 %6, i32* %8
%9 = load i32, i32* %4
%10 = ashr i32 %9, 48
%11 = and i32 %10, 255
%12 = load i32*, i32** %3
%13 = getelementptr inbounds i32, i32* %12, i64 1
store i32 %11, i32* %13
%14 = load i32, i32* %4
%15 = ashr i32 %14, 40
%16 = and i32 %15, 255
%17 = load i32*, i32** %3
%18 = getelementptr inbounds i32, i32* %17, i64 2
store i32 %16, i32* %18
%19 = load i32, i32* %4
%20 = ashr i32 %19, 32
%21 = and i32 %20, 255
%22 = load i32*, i32** %3
%23 = getelementptr inbounds i32, i32* %22, i64 3
store i32 %21, i32* %23
%24 = load i32, i32* %4
%25 = ashr i32 %24, 24
%26 = and i32 %25, 255
%27 = load i32*, i32** %3
%28 = getelementptr inbounds i32, i32* %27, i64 4
store i32 %26, i32* %28
%29 = load i32, i32* %4
%30 = ashr i32 %29, 16
%31 = and i32 %30, 255
%32 = load i32*, i32** %3
%33 = getelementptr inbounds i32, i32* %32, i64 5
store i32 %31, i32* %33
%34 = load i32, i32* %4
%35 = ashr i32 %34, 8
%36 = and i32 %35, 255
%37 = load i32*, i32** %3
%38 = getelementptr inbounds i32, i32* %37, i64 6
store i32 %36, i32* %38
%39 = load i32, i32* %4
%40 = ashr i32 %39, 0
%41 = and i32 %40, 255
%42 = load i32*, i32** %3
%43 = getelementptr inbounds i32, i32* %42, i64 7
store i32 %41, i32* %43
ret void
}

LLVM IR (-O2):
define void @ToSTC(i32* nocapture writeonly %0, i32 %1) {
%3 = lshr i32 %1, 24
%4 = getelementptr inbounds i32, i32* %0, i64 4
store i32 %3, i32* %4
%5 = lshr i32 %1, 16
%6 = and i32 %5, 255
%7 = getelementptr inbounds i32, i32* %0, i64 5
store i32 %6, i32* %7
%8 = lshr i32 %1, 8
%9 = and i32 %8, 255
%10 = getelementptr inbounds i32, i32* %0, i64 6
store i32 %9, i32* %10
%11 = and i32 %1, 255
%12 = getelementptr inbounds i32, i32* %0, i64 7
store i32 %11, i32* %12
ret void
}