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

/* Variables and functions */
void inv_shift_rows(uint8_t *state) {
  uint8_t temp;
  temp = *(state + 13);
  *(state + 13) = *(state + 9);
  *(state + 9) = *(state + 5);
  *(state + 5) = *(state + 1);
  *(state + 1) = temp;
  temp = *(state + 14);
  *(state + 14) = *(state + 6);
  *(state + 6) = temp;
  temp = *(state + 10);
  *(state + 10) = *(state + 2);
  *(state + 2) = temp;
  temp = *(state + 3);
  *(state + 3) = *(state + 7);
  *(state + 7) = *(state + 11);
  *(state + 11) = *(state + 15);
  *(state + 15) = temp;
}


x86 assembly (clang, -O0):
<inv_shift_rows>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x34(%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x24(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x34(%rax)
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x24(%rax)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x14(%rax)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x8(%rbp),%rax
mov    0x38(%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x38(%rax)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x18(%rax)
mov    -0x8(%rbp),%rax
mov    0x28(%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x28(%rax)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x1c(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0xc(%rax)
mov    -0x8(%rbp),%rax
mov    0x2c(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x1c(%rax)
mov    -0x8(%rbp),%rax
mov    0x3c(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x2c(%rax)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x3c(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<inv_shift_rows>:
mov    0x34(%rdi),%eax
mov    0x24(%rdi),%ecx
mov    %ecx,0x34(%rdi)
mov    0x14(%rdi),%ecx
mov    %ecx,0x24(%rdi)
mov    0x4(%rdi),%ecx
mov    0x8(%rdi),%edx
mov    %ecx,0x14(%rdi)
mov    %eax,0x4(%rdi)
mov    0x38(%rdi),%eax
mov    0x18(%rdi),%ecx
mov    %ecx,0x38(%rdi)
mov    %eax,0x18(%rdi)
mov    0x28(%rdi),%eax
mov    %edx,0x28(%rdi)
mov    %eax,0x8(%rdi)
mov    0xc(%rdi),%eax
mov    0x1c(%rdi),%ecx
mov    %ecx,0xc(%rdi)
mov    0x2c(%rdi),%ecx
mov    %ecx,0x1c(%rdi)
mov    0x3c(%rdi),%ecx
mov    %ecx,0x2c(%rdi)
mov    %eax,0x3c(%rdi)
ret

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

LLVM IR (-O2):
define void @inv_shift_rows(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 13
%3 = load i32, i32* %2
%4 = getelementptr inbounds i32, i32* %0, i64 9
%5 = load i32, i32* %4
store i32 %5, i32* %2
%6 = getelementptr inbounds i32, i32* %0, i64 5
%7 = load i32, i32* %6
store i32 %7, i32* %4
%8 = getelementptr inbounds i32, i32* %0, i64 1
%9 = load i32, i32* %8
store i32 %9, i32* %6
store i32 %3, i32* %8
%10 = getelementptr inbounds i32, i32* %0, i64 14
%11 = load i32, i32* %10
%12 = getelementptr inbounds i32, i32* %0, i64 6
%13 = load i32, i32* %12
store i32 %13, i32* %10
store i32 %11, i32* %12
%14 = getelementptr inbounds i32, i32* %0, i64 10
%15 = load i32, i32* %14
%16 = getelementptr inbounds i32, i32* %0, i64 2
%17 = load i32, i32* %16
store i32 %17, i32* %14
store i32 %15, i32* %16
%18 = getelementptr inbounds i32, i32* %0, i64 3
%19 = load i32, i32* %18
%20 = getelementptr inbounds i32, i32* %0, i64 7
%21 = load i32, i32* %20
store i32 %21, i32* %18
%22 = getelementptr inbounds i32, i32* %0, i64 11
%23 = load i32, i32* %22
store i32 %23, i32* %20
%24 = getelementptr inbounds i32, i32* %0, i64 15
%25 = load i32, i32* %24
store i32 %25, i32* %22
store i32 %19, i32* %24
ret void
}