#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 uint32_t;
typedef int /*<<< orphan*/ src;

/* Variables and functions */
void AES_hncpy32(uint32_t *dst, uint32_t *src) {
  dst[0] = ((((uint32_t)(src[0]) & 0xff000000) >> 24) |
            (((uint32_t)(src[0]) & 0x00ff0000) >> 8) |
            (((uint32_t)(src[0]) & 0x0000ff00) << 8) |
            (((uint32_t)(src[0]) & 0x000000ff) << 24));
  dst[1] = ((((uint32_t)(src[1]) & 0xff000000) >> 24) |
            (((uint32_t)(src[1]) & 0x00ff0000) >> 8) |
            (((uint32_t)(src[1]) & 0x0000ff00) << 8) |
            (((uint32_t)(src[1]) & 0x000000ff) << 24));
  dst[2] = ((((uint32_t)(src[2]) & 0xff000000) >> 24) |
            (((uint32_t)(src[2]) & 0x00ff0000) >> 8) |
            (((uint32_t)(src[2]) & 0x0000ff00) << 8) |
            (((uint32_t)(src[2]) & 0x000000ff) << 24));
  dst[3] = ((((uint32_t)(src[3]) & 0xff000000) >> 24) |
            (((uint32_t)(src[3]) & 0x00ff0000) >> 8) |
            (((uint32_t)(src[3]) & 0x0000ff00) << 8) |
            (((uint32_t)(src[3]) & 0x000000ff) << 24));
}


x86 assembly (clang, -O0):
<AES_hncpy32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
and    $0xff000000,%ecx
shr    $0x18,%ecx
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
and    $0xff0000,%eax
sar    $0x8,%eax
or     %eax,%ecx
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
and    $0xff00,%eax
shl    $0x8,%eax
or     %eax,%ecx
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
and    $0xff,%eax
shl    $0x18,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%ecx
and    $0xff000000,%ecx
shr    $0x18,%ecx
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%eax
and    $0xff0000,%eax
sar    $0x8,%eax
or     %eax,%ecx
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%eax
and    $0xff00,%eax
shl    $0x8,%eax
or     %eax,%ecx
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%eax
and    $0xff,%eax
shl    $0x18,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%ecx
and    $0xff000000,%ecx
shr    $0x18,%ecx
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%eax
and    $0xff0000,%eax
sar    $0x8,%eax
or     %eax,%ecx
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%eax
and    $0xff00,%eax
shl    $0x8,%eax
or     %eax,%ecx
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%eax
and    $0xff,%eax
shl    $0x18,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%ecx
and    $0xff000000,%ecx
shr    $0x18,%ecx
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%eax
and    $0xff0000,%eax
sar    $0x8,%eax
or     %eax,%ecx
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%eax
and    $0xff00,%eax
shl    $0x8,%eax
or     %eax,%ecx
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%eax
and    $0xff,%eax
shl    $0x18,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0xc(%rax)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @AES_hncpy32(i32* nocapture writeonly %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = tail call i32 @llvm.bswap.i32(i32 %3)
store i32 %4, i32* %0
%5 = getelementptr inbounds i32, i32* %1, i64 1
%6 = load i32, i32* %5
%7 = tail call i32 @llvm.bswap.i32(i32 %6)
%8 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %7, i32* %8
%9 = getelementptr inbounds i32, i32* %1, i64 2
%10 = load i32, i32* %9
%11 = tail call i32 @llvm.bswap.i32(i32 %10)
%12 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %11, i32* %12
%13 = getelementptr inbounds i32, i32* %1, i64 3
%14 = load i32, i32* %13
%15 = tail call i32 @llvm.bswap.i32(i32 %14)
%16 = getelementptr inbounds i32, i32* %0, i64 3
store i32 %15, i32* %16
ret void
}