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

/* Variables and functions */
uint64_t htolell(uint64_t value) {
  uint64_t tmp;
  ((uint8_t *)&tmp)[0] = (uint8_t)(value >> 0);
  ((uint8_t *)&tmp)[1] = (uint8_t)(value >> 8);
  ((uint8_t *)&tmp)[2] = (uint8_t)(value >> 16);
  ((uint8_t *)&tmp)[3] = (uint8_t)(value >> 24);
  ((uint8_t *)&tmp)[4] = (uint8_t)(value >> 32);
  ((uint8_t *)&tmp)[5] = (uint8_t)(value >> 40);
  ((uint8_t *)&tmp)[6] = (uint8_t)(value >> 48);
  ((uint8_t *)&tmp)[7] = (uint8_t)(value >> 56);
  return tmp;
}


x86 assembly (clang, -O0):
<htolell>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x0,%eax
cltq
mov    %rax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
cltq
mov    %rax,0x0(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
cltq
mov    %rax,0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x18,%eax
cltq
mov    %rax,0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x20,%ecx
sar    %cl,%eax
cltq
mov    %rax,0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x28,%ecx
sar    %cl,%eax
cltq
mov    %rax,0x20(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x30,%ecx
sar    %cl,%eax
cltq
mov    %rax,0x28(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x38,%ecx
sar    %cl,%eax
cltq
mov    %rax,0x30(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<htolell>:
ret

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

LLVM IR (-O2):
define i32 @htolell(i32 %0) {
ret i32 undef
}