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

/* Variables and functions */
double cbor_peek_double(uint8_t *data) {
  union {
    uint64_t n;
    double x;
  } tmp = {.n = ((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 tmp.x;
}


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

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

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

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