#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 ivory_serialize_unpack_prim_8_le(const uint8_t *src) {
  return (((uint64_t)src[0] << 0) | ((uint64_t)src[1] << 8) |
          ((uint64_t)src[2] << 16) | ((uint64_t)src[3] << 24) |
          ((uint64_t)src[4] << 32) | ((uint64_t)src[5] << 40) |
          ((uint64_t)src[6] << 48) | ((uint64_t)src[7] << 56));
}


x86 assembly (clang, -O0):
<ivory_serialize_unpack_prim_8_le>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
shl    $0x0,%eax
mov    -0x8(%rbp),%rcx
mov    0x8(%rcx),%rcx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x10(%rcx),%rcx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x18(%rcx),%rcx
shl    $0x18,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x20(%rcx),%rcx
mov    %ecx,%edx
mov    $0x20,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x28(%rcx),%rcx
mov    %ecx,%edx
mov    $0x28,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x30(%rcx),%rcx
mov    %ecx,%edx
mov    $0x30,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x38(%rcx),%rcx
mov    %ecx,%edx
mov    $0x38,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @ivory_serialize_unpack_prim_8_le(i64* nocapture readnone %0) {
ret i32 poison
}