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


x86 assembly (clang, -O0):
<bytestream_get_le64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x40,%rcx
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    -0x8(%rax),%rax
mov    $0x38,%ecx
shl    %cl,%eax
mov    -0x8(%rbp),%rcx
mov    (%rcx),%rcx
mov    -0x10(%rcx),%rcx
mov    %ecx,%edx
mov    $0x30,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    (%rcx),%rcx
mov    -0x18(%rcx),%rcx
mov    %ecx,%edx
mov    $0x28,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    (%rcx),%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    (%rcx),%rcx
mov    -0x28(%rcx),%rcx
shl    $0x18,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    (%rcx),%rcx
mov    -0x30(%rcx),%rcx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    (%rcx),%rcx
mov    -0x38(%rcx),%rcx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    (%rcx),%rcx
mov    -0x40(%rcx),%rcx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bytestream_get_le64>:
addq   $0x40,(%rdi)
ret

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

LLVM IR (-O2):
define i32 @bytestream_get_le64(i64** nocapture %0) {
%2 = load i64*, i64** %0
%3 = getelementptr inbounds i64, i64* %2, i64 8
store i64* %3, i64** %0
ret i32 poison
}