#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 */
uint64_t load48(const void *src) {
  const uint8_t *p = (const uint8_t *)src;
  uint64_t w = *p++;
  w |= (uint64_t)(*p++) << 8;
  w |= (uint64_t)(*p++) << 16;
  w |= (uint64_t)(*p++) << 24;
  w |= (uint64_t)(*p++) << 32;
  w |= (uint64_t)(*p++) << 40;
  return w;
}


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

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

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

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