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

/* Variables and functions */
uint64_t quicly_decode64(const uint8_t **src) {
  uint64_t v = (uint64_t)(*src)[0] << 56 | (uint64_t)(*src)[1] << 48 |
               (uint64_t)(*src)[2] << 40 | (uint64_t)(*src)[3] << 32 |
               (uint64_t)(*src)[4] << 24 | (uint64_t)(*src)[5] << 16 |
               (uint64_t)(*src)[6] << 8 | (*src)[7];
  *src += 8;
  return v;
}


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

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

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

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