#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;
typedef int uint32_t;
typedef size_t uint16_t;

/* Variables and functions */
uint64_t us_bits_get_sexlet(const void *base, uint16_t offset) {
  const uint8_t *data = (const uint8_t *)base;
  uint64_t v;
  v = (((uint64_t)((((uint32_t)(0)) << 24) | (((uint32_t)(0)) << 16) |
                   (((uint32_t)((data[offset]))) << 8) |
                   (((uint32_t)((data[offset + 1]))) << 0))
        << 32) |
       ((uint64_t)((((uint32_t)((data[offset + 2]))) << 24) |
                   (((uint32_t)((data[offset + 3]))) << 16) |
                   (((uint32_t)((data[offset + 4]))) << 8) |
                   (((uint32_t)((data[offset + 5]))) << 0))));
  return v;
}


x86 assembly (clang, -O0):
<us_bits_get_sexlet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
shl    $0x8,%eax
or     $0x0,%eax
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%rdx
mov    0x8(%rcx,%rdx,8),%rcx
shl    $0x0,%ecx
or     %ecx,%eax
mov    $0x20,%ecx
shl    %cl,%eax
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%rdx
mov    0x10(%rcx,%rdx,8),%rcx
shl    $0x18,%ecx
mov    -0x18(%rbp),%rdx
mov    -0x10(%rbp),%rsi
mov    0x18(%rdx,%rsi,8),%rdx
shl    $0x10,%edx
or     %edx,%ecx
mov    -0x18(%rbp),%rdx
mov    -0x10(%rbp),%rsi
mov    0x20(%rdx,%rsi,8),%rdx
shl    $0x8,%edx
or     %edx,%ecx
mov    -0x18(%rbp),%rdx
mov    -0x10(%rbp),%rsi
mov    0x28(%rdx,%rsi,8),%rdx
shl    $0x0,%edx
or     %edx,%ecx
or     %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

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

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

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