#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_convert96(char *src, char *dest) {
  uint32_t tmp_src[3];
  uint32_t tmp_dest[3];
  char *ptr = dest;
  tmp_src[0] = (uint32_t)(*((uint64_t *)src) >> 32);
  tmp_src[1] = (uint32_t)((*((uint64_t *)src) << 32) >> 32);
  tmp_src[2] = (uint32_t)(*((uint32_t *)((char *)src + sizeof(uint64_t))));
  {
    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));
  };
  {
    tmp_dest[2] =
        (((tmp_src[2] >> 24) & 0x000000FF) | ((tmp_src[2] >> 8) & 0x0000FF00) |
         ((tmp_src[2] << 8) & 0x00FF0000) | ((tmp_src[2] << 24) & 0xFF000000));
  };
  *((uint32_t *)ptr) = tmp_dest[0];
  ptr += sizeof(uint32_t);
  *((uint32_t *)ptr) = tmp_dest[1];
  ptr += sizeof(uint32_t);
  *((uint32_t *)ptr) = tmp_dest[2];
}


x86 assembly (clang, -O0):
<BASIC_convert96>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    $0x20,%ecx
sar    %cl,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    $0x20,%ecx
shl    %cl,%eax
mov    $0x20,%ecx
sar    %cl,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x1c(%rbp),%eax
sar    $0x18,%eax
and    $0xff,%eax
mov    -0x1c(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff00,%ecx
or     %ecx,%eax
mov    -0x1c(%rbp),%ecx
shl    $0x8,%ecx
and    $0xff0000,%ecx
or     %ecx,%eax
mov    -0x1c(%rbp),%ecx
shl    $0x18,%ecx
and    $0xff000000,%ecx
or     %ecx,%eax
mov    %eax,-0x28(%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,-0x24(%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,-0x20(%rbp)
mov    -0x28(%rbp),%ecx
mov    -0x30(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x30(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x30(%rbp)
mov    -0x24(%rbp),%ecx
mov    -0x30(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x30(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%ecx
mov    -0x30(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<BASIC_convert96>:
mov    0x4(%rdi),%eax
bswap  %eax
mov    %eax,0x8(%rsi)
ret

LLVM IR (-O0):
define void @BASIC_convert96(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [3 x i32]
%6 = alloca [3 x i32]
%7 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%8 = load i8*, i8** %4
store i8* %8, i8** %7
%9 = load i8*, i8** %3
%10 = bitcast i8* %9 to i32*
%11 = load i32, i32* %10
%12 = ashr i32 %11, 32
%13 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 0
store i32 %12, i32* %13
%14 = load i8*, i8** %3
%15 = bitcast i8* %14 to i32*
%16 = load i32, i32* %15
%17 = shl i32 %16, 32
%18 = ashr i32 %17, 32
%19 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 1
store i32 %18, i32* %19
%20 = load i8*, i8** %3
%21 = getelementptr inbounds i8, i8* %20, i64 4
%22 = bitcast i8* %21 to i32*
%23 = load i32, i32* %22
%24 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 2
store i32 %23, i32* %24
%25 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 0
%26 = load i32, i32* %25
%27 = ashr i32 %26, 24
%28 = and i32 %27, 255
%29 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 0
%30 = load i32, i32* %29
%31 = ashr i32 %30, 8
%32 = and i32 %31, 65280
%33 = or i32 %28, %32
%34 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 0
%35 = load i32, i32* %34
%36 = shl i32 %35, 8
%37 = and i32 %36, 16711680
%38 = or i32 %33, %37
%39 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 0
%40 = load i32, i32* %39
%41 = shl i32 %40, 24
%42 = and i32 %41, -16777216
%43 = or i32 %38, %42
%44 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 0
store i32 %43, i32* %44
%45 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 1
%46 = load i32, i32* %45
%47 = ashr i32 %46, 24
%48 = and i32 %47, 255
%49 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 1
%50 = load i32, i32* %49
%51 = ashr i32 %50, 8
%52 = and i32 %51, 65280
%53 = or i32 %48, %52
%54 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 1
%55 = load i32, i32* %54
%56 = shl i32 %55, 8
%57 = and i32 %56, 16711680
%58 = or i32 %53, %57
%59 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 1
%60 = load i32, i32* %59
%61 = shl i32 %60, 24
%62 = and i32 %61, -16777216
%63 = or i32 %58, %62
%64 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 1
store i32 %63, i32* %64
%65 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 2
%66 = load i32, i32* %65
%67 = ashr i32 %66, 24
%68 = and i32 %67, 255
%69 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 2
%70 = load i32, i32* %69
%71 = ashr i32 %70, 8
%72 = and i32 %71, 65280
%73 = or i32 %68, %72
%74 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 2
%75 = load i32, i32* %74
%76 = shl i32 %75, 8
%77 = and i32 %76, 16711680
%78 = or i32 %73, %77
%79 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 2
%80 = load i32, i32* %79
%81 = shl i32 %80, 24
%82 = and i32 %81, -16777216
%83 = or i32 %78, %82
%84 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 2
store i32 %83, i32* %84
%85 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 0
%86 = load i32, i32* %85
%87 = load i8*, i8** %7
%88 = bitcast i8* %87 to i32*
store i32 %86, i32* %88
%89 = load i8*, i8** %7
%90 = getelementptr inbounds i8, i8* %89, i64 4
store i8* %90, i8** %7
%91 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 1
%92 = load i32, i32* %91
%93 = load i8*, i8** %7
%94 = bitcast i8* %93 to i32*
store i32 %92, i32* %94
%95 = load i8*, i8** %7
%96 = getelementptr inbounds i8, i8* %95, i64 4
store i8* %96, i8** %7
%97 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 2
%98 = load i32, i32* %97
%99 = load i8*, i8** %7
%100 = bitcast i8* %99 to i32*
store i32 %98, i32* %100
ret void
}

LLVM IR (-O2):
define void @BASIC_convert96(i8* nocapture %0, i8* nocapture writeonly %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 4
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
%6 = tail call i32 @llvm.bswap.i32(i32 %5)
%7 = getelementptr inbounds i8, i8* %1, i64 8
%8 = bitcast i8* %7 to i32*
store i32 %6, i32* %8
ret void
}