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

/* Variables and functions */
void data_convert(uint8_t *data) {
  uint8_t tmpval, index = 0;
  for (index = 0; index < 16; index++) {
    tmpval = data[index];
    data[index] = data[31 - index];
    data[31 - index] = tmpval;
  }
  for (index = 0; index < 6; index++) {
    tmpval = data[52 + index];
    data[52 + index] = data[52 + 11 - index];
    data[52 + 11 - index] = tmpval;
  }
}


x86 assembly (clang, -O0):
<data_convert>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x10,-0x10(%rbp)
jge    116e <data_convert+0x6e>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x1f,%ecx
sub    -0x10(%rbp),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%rax
mov    $0x1f,%ecx
sub    -0x10(%rbp),%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1116 <data_convert+0x16>
movl   $0x0,-0x10(%rbp)
cmpl   $0x6,-0x10(%rbp)
jge    11d7 <data_convert+0xd7>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
add    $0x34,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x3f,%ecx
sub    -0x10(%rbp),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
add    $0x34,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%rax
mov    $0x3f,%ecx
sub    -0x10(%rbp),%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1175 <data_convert+0x75>
pop    %rbp
ret

x86 assembly (clang, -O2):
<data_convert>:
movdqu 0x70(%rdi),%xmm0
pshufd $0x1b,%xmm0,%xmm0
movdqu (%rdi),%xmm1
movdqu 0x10(%rdi),%xmm2
movdqu 0x20(%rdi),%xmm3
movdqu 0x30(%rdi),%xmm4
movdqu %xmm0,(%rdi)
pshufd $0x1b,%xmm1,%xmm0
movdqu %xmm0,0x70(%rdi)
movdqu 0x60(%rdi),%xmm0
pshufd $0x1b,%xmm0,%xmm0
movdqu %xmm0,0x10(%rdi)
pshufd $0x1b,%xmm2,%xmm0
movdqu %xmm0,0x60(%rdi)
movdqu 0x50(%rdi),%xmm0
pshufd $0x1b,%xmm0,%xmm0
movdqu %xmm0,0x20(%rdi)
pshufd $0x1b,%xmm3,%xmm0
movdqu %xmm0,0x50(%rdi)
movdqu 0x40(%rdi),%xmm0
pshufd $0x1b,%xmm0,%xmm0
movdqu %xmm0,0x30(%rdi)
pshufd $0x1b,%xmm4,%xmm0
movdqu %xmm0,0x40(%rdi)
mov    0xd0(%rdi),%eax
mov    0xfc(%rdi),%ecx
mov    %ecx,0xd0(%rdi)
mov    %eax,0xfc(%rdi)
mov    0xd4(%rdi),%eax
mov    0xf8(%rdi),%ecx
mov    %ecx,0xd4(%rdi)
mov    %eax,0xf8(%rdi)
mov    0xd8(%rdi),%eax
mov    0xf4(%rdi),%ecx
mov    %ecx,0xd8(%rdi)
mov    %eax,0xf4(%rdi)
mov    0xdc(%rdi),%eax
mov    0xf0(%rdi),%ecx
mov    %ecx,0xdc(%rdi)
mov    %eax,0xf0(%rdi)
mov    0xe0(%rdi),%eax
mov    0xec(%rdi),%ecx
mov    %ecx,0xe0(%rdi)
mov    %eax,0xec(%rdi)
rolq   $0x20,0xe4(%rdi)
20
ret

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

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