#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 */

/* Variables and functions */
int llf(unsigned long long);
unsigned long long llReverse5(unsigned long long x) {
  return ((llf(x) & 0xFF00000000000000ull) >> 56) |
         ((llf(x) & 0x00FF000000000000ull) >> 40) |
         ((llf(x) & 0x0000FF0000000000ull) >> 24) |
         ((llf(x) & 0x000000FF00000000ull) >> 8) |
         ((llf(x) & 0x00000000FF000000ull) << 8) |
         ((llf(x) & 0x0000000000FF0000ull) << 24) |
         ((llf(x) & 0x000000000000FF00ull) << 40) |
         ((llf(x) & 0x00000000000000FFull) << 56);
}


x86 assembly (clang, -O0):
<llReverse5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <llf@plt>
cltq
movabs $0xff00000000000000,%rcx
and    %rcx,%rax
shr    $0x38,%rax
mov    %rax,-0x40(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <llf@plt>
mov    %eax,%ecx
mov    -0x40(%rbp),%rax
movslq %ecx,%rcx
movabs $0xff000000000000,%rdx
and    %rdx,%rcx
shr    $0x28,%rcx
or     %rcx,%rax
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <llf@plt>
mov    %eax,%ecx
mov    -0x38(%rbp),%rax
movslq %ecx,%rcx
movabs $0xff0000000000,%rdx
and    %rdx,%rcx
shr    $0x18,%rcx
or     %rcx,%rax
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <llf@plt>
mov    %eax,%ecx
mov    -0x30(%rbp),%rax
movslq %ecx,%rcx
movabs $0xff00000000,%rdx
and    %rdx,%rcx
shr    $0x8,%rcx
or     %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <llf@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
movabs $0xff000000,%rdx
and    %rdx,%rcx
shl    $0x8,%rcx
or     %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <llf@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
and    $0xff0000,%rcx
shl    $0x18,%rcx
or     %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <llf@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
and    $0xff00,%rcx
shl    $0x28,%rcx
or     %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <llf@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
and    $0xff,%rcx
shl    $0x38,%rcx
or     %rcx,%rax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<llReverse5>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <llf@plt>
movslq %eax,%r15
shr    $0x38,%r15
mov    %r14,%rdi
call   1030 <llf@plt>
movslq %eax,%rbx
shr    $0x28,%rbx
and    $0xff00,%ebx
or     %r15,%rbx
mov    %r14,%rdi
call   1030 <llf@plt>
movslq %eax,%r15
shr    $0x18,%r15
and    $0xff0000,%r15d
or     %rbx,%r15
mov    %r14,%rdi
call   1030 <llf@plt>
movslq %eax,%r12
shr    $0x8,%r12
and    $0xff000000,%r12d
or     %r15,%r12
mov    %r14,%rdi
call   1030 <llf@plt>
mov    %eax,%ebx
and    $0xff000000,%ebx
shl    $0x8,%rbx
or     %r12,%rbx
mov    %r14,%rdi
call   1030 <llf@plt>
mov    %eax,%r15d
and    $0xff0000,%r15d
shl    $0x18,%r15
or     %rbx,%r15
mov    %r14,%rdi
call   1030 <llf@plt>
mov    %eax,%ebx
and    $0xff00,%ebx
shl    $0x28,%rbx
or     %r15,%rbx
mov    %r14,%rdi
call   1030 <llf@plt>
shl    $0x38,%rax
or     %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i64 @llReverse5(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @llf(i64 %3)
%5 = sext i32 %4 to i64
%6 = and i64 %5, -72057594037927936
%7 = lshr i64 %6, 56
%8 = load i64, i64* %2
%9 = call i32 @llf(i64 %8)
%10 = sext i32 %9 to i64
%11 = and i64 %10, 71776119061217280
%12 = lshr i64 %11, 40
%13 = or i64 %7, %12
%14 = load i64, i64* %2
%15 = call i32 @llf(i64 %14)
%16 = sext i32 %15 to i64
%17 = and i64 %16, 280375465082880
%18 = lshr i64 %17, 24
%19 = or i64 %13, %18
%20 = load i64, i64* %2
%21 = call i32 @llf(i64 %20)
%22 = sext i32 %21 to i64
%23 = and i64 %22, 1095216660480
%24 = lshr i64 %23, 8
%25 = or i64 %19, %24
%26 = load i64, i64* %2
%27 = call i32 @llf(i64 %26)
%28 = sext i32 %27 to i64
%29 = and i64 %28, 4278190080
%30 = shl i64 %29, 8
%31 = or i64 %25, %30
%32 = load i64, i64* %2
%33 = call i32 @llf(i64 %32)
%34 = sext i32 %33 to i64
%35 = and i64 %34, 16711680
%36 = shl i64 %35, 24
%37 = or i64 %31, %36
%38 = load i64, i64* %2
%39 = call i32 @llf(i64 %38)
%40 = sext i32 %39 to i64
%41 = and i64 %40, 65280
%42 = shl i64 %41, 40
%43 = or i64 %37, %42
%44 = load i64, i64* %2
%45 = call i32 @llf(i64 %44)
%46 = sext i32 %45 to i64
%47 = and i64 %46, 255
%48 = shl i64 %47, 56
%49 = or i64 %43, %48
ret i64 %49
}

LLVM IR (-O2):
define i64 @llReverse5(i64 %0) {
%2 = tail call i32 @llf(i64 %0)
%3 = sext i32 %2 to i64
%4 = lshr i64 %3, 56
%5 = tail call i32 @llf(i64 %0)
%6 = sext i32 %5 to i64
%7 = lshr i64 %6, 40
%8 = and i64 %7, 65280
%9 = or i64 %8, %4
%10 = tail call i32 @llf(i64 %0)
%11 = sext i32 %10 to i64
%12 = lshr i64 %11, 24
%13 = and i64 %12, 16711680
%14 = or i64 %9, %13
%15 = tail call i32 @llf(i64 %0)
%16 = sext i32 %15 to i64
%17 = lshr i64 %16, 8
%18 = and i64 %17, 4278190080
%19 = or i64 %14, %18
%20 = tail call i32 @llf(i64 %0)
%21 = and i32 %20, -16777216
%22 = zext i32 %21 to i64
%23 = shl nuw nsw i64 %22, 8
%24 = or i64 %19, %23
%25 = tail call i32 @llf(i64 %0)
%26 = and i32 %25, 16711680
%27 = zext i32 %26 to i64
%28 = shl nuw nsw i64 %27, 24
%29 = or i64 %24, %28
%30 = tail call i32 @llf(i64 %0)
%31 = and i32 %30, 65280
%32 = zext i32 %31 to i64
%33 = shl nuw nsw i64 %32, 40
%34 = or i64 %29, %33
%35 = tail call i32 @llf(i64 %0)
%36 = zext i32 %35 to i64
%37 = shl i64 %36, 56
%38 = or i64 %34, %37
ret i64 %38
}