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

/* Variables and functions */
void permute_inv8(void *data) {
  uint64_t t;
  t = (((uint64_t *)data)[(6)]);
  (((uint64_t *)data)[(6)]) = (((uint64_t *)data)[(4)]);
  (((uint64_t *)data)[(4)]) = (((uint64_t *)data)[(2)]);
  (((uint64_t *)data)[(2)]) = (((uint64_t *)data)[(0)]);
  (((uint64_t *)data)[(0)]) = t;
  t = (((uint64_t *)data)[(7)]);
  (((uint64_t *)data)[(7)]) = (((uint64_t *)data)[(3)]);
  (((uint64_t *)data)[(3)]) = t;
}


x86 assembly (clang, -O0):
<permute_inv8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x18(%rax)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x10(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    0x1c(%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x1c(%rax)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<permute_inv8>:
mov    0x18(%rdi),%eax
mov    0xc(%rdi),%rcx
rol    $0x20,%rcx
mov    0x1c(%rdi),%edx
mov    %rcx,0x18(%rdi)
mov    (%rdi),%ecx
mov    0x8(%rdi),%esi
mov    %esi,0x10(%rdi)
mov    %ecx,0x8(%rdi)
mov    %eax,(%rdi)
mov    %edx,0xc(%rdi)
ret

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

LLVM IR (-O2):
define void @permute_inv8(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = getelementptr inbounds i8, i8* %0, i64 24
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
%6 = getelementptr inbounds i8, i8* %0, i64 16
%7 = bitcast i8* %6 to i32*
%8 = load i32, i32* %7
store i32 %8, i32* %4
%9 = getelementptr inbounds i8, i8* %0, i64 8
%10 = bitcast i8* %9 to i32*
%11 = load i32, i32* %10
store i32 %11, i32* %7
%12 = load i32, i32* %2
store i32 %12, i32* %10
store i32 %5, i32* %2
%13 = getelementptr inbounds i8, i8* %0, i64 28
%14 = bitcast i8* %13 to i32*
%15 = load i32, i32* %14
%16 = getelementptr inbounds i8, i8* %0, i64 12
%17 = bitcast i8* %16 to i32*
%18 = load i32, i32* %17
store i32 %18, i32* %14
store i32 %15, i32* %17
ret void
}