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

/* Variables and functions */
void BASIC_convert64(char *src, char *dest) {
  uint32_t tmp_src[2];
  uint32_t tmp_dest[2];
  tmp_src[0] = (uint32_t)(*((uint64_t *)src) >> 32);
  tmp_src[1] = (uint32_t)((*((uint64_t *)src) << 32) >> 32);
  {
    tmp_dest[0] =
        (((tmp_src[0] >> 24) & 0x000000FF) | ((tmp_src[0] >> 8) & 0x0000FF00) |
         ((tmp_src[0] << 8) & 0x00FF0000) | ((tmp_src[0] << 24) & 0xFF000000));
  };
  {
    tmp_dest[1] =
        (((tmp_src[1] >> 24) & 0x000000FF) | ((tmp_src[1] >> 8) & 0x0000FF00) |
         ((tmp_src[1] << 8) & 0x00FF0000) | ((tmp_src[1] << 24) & 0xFF000000));
  };
  *((uint64_t *)dest) = (uint64_t)tmp_dest[0];
  *((uint64_t *)dest) <<= 32;
  *((uint64_t *)dest) |= (uint64_t)tmp_dest[1];
}


x86 assembly (clang, -O0):
<BASIC_convert64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    $0x20,%ecx
sar    %cl,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    $0x20,%ecx
shl    %cl,%eax
mov    $0x20,%ecx
sar    %cl,%eax
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%eax
sar    $0x18,%eax
and    $0xff,%eax
mov    -0x18(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff00,%ecx
or     %ecx,%eax
mov    -0x18(%rbp),%ecx
shl    $0x8,%ecx
and    $0xff0000,%ecx
or     %ecx,%eax
mov    -0x18(%rbp),%ecx
shl    $0x18,%ecx
and    $0xff000000,%ecx
or     %ecx,%eax
mov    %eax,-0x20(%rbp)
mov    -0x14(%rbp),%eax
sar    $0x18,%eax
and    $0xff,%eax
mov    -0x14(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff00,%ecx
or     %ecx,%eax
mov    -0x14(%rbp),%ecx
shl    $0x8,%ecx
and    $0xff0000,%ecx
or     %ecx,%eax
mov    -0x14(%rbp),%ecx
shl    $0x18,%ecx
and    $0xff000000,%ecx
or     %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x20(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%edx
mov    $0x20,%ecx
shl    %cl,%edx
mov    %edx,%ecx
mov    %ecx,(%rax)
mov    -0x1c(%rbp),%ecx
mov    -0x10(%rbp),%rax
or     (%rax),%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @BASIC_convert64(i8* nocapture %0, i8* nocapture %1) {
ret void
}