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


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

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

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

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