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

/* Variables and functions */
int /*<<< orphan*/ decrypt(int *, int *);
int /*<<< orphan*/ encrypt(int *, int *);
int /*<<< orphan*/ printf(char *, int, int);
int main(int argc, char *argv[]) {
  uint32_t v[2] = {0x20, 0x10}, k[4] = {0x04, 0x03, 0x02, 0x01};
  printf("%08X%08X\n", v[0], v[1]);
  encrypt(v, k);
  printf("%08X%08X\n", v[0], v[1]);
  decrypt(v, k);
  printf("%08X%08X\n", v[0], v[1]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xeb3(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xeb8(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xeb5(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    0xeac(%rip),%rdi
call   1040 <printf@plt>
lea    -0x18(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   1050 <encrypt@plt>
mov    -0x18(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    0xe8d(%rip),%rdi
call   1040 <printf@plt>
lea    -0x18(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   1030 <decrypt@plt>
mov    -0x18(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    0xe6e(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x20,%rsp
movabs $0x1000000020,%rax
mov    %rax,0x8(%rsp)
movaps 0xeb1(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
lea    0xeb5(%rip),%r14
mov    %r14,%rdi
mov    $0x20,%esi
mov    $0x10,%edx
call   1040 <printf@plt>
lea    0x8(%rsp),%rbx
lea    0x10(%rsp),%r15
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <encrypt@plt>
mov    0x8(%rsp),%esi
mov    0xc(%rsp),%edx
mov    %r14,%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <decrypt@plt>
mov    0x8(%rsp),%esi
mov    0xc(%rsp),%edx
mov    %r14,%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.v = [2 x i32] [i32 32, i32 16]
@__const.main.k = [4 x i32] [i32 4, i32 3, i32 2, i32 1]
@.str = [10 x i8] c"%08X%08X\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [2 x i32]
%7 = alloca [4 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = bitcast [2 x i32]* %6 to i8*
%9 = bitcast [4 x i32]* %7 to i8*
%10 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
%11 = load i32, i32* %10
%12 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 1
%13 = load i32, i32* %12
%14 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %13)
%15 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
%16 = getelementptr inbounds [4 x i32], [4 x i32]* %7, i64 0, i64 0
%17 = call i32 @encrypt(i32* %15, i32* %16)
%18 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
%19 = load i32, i32* %18
%20 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 1
%21 = load i32, i32* %20
%22 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %19, i32 %21)
%23 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
%24 = getelementptr inbounds [4 x i32], [4 x i32]* %7, i64 0, i64 0
%25 = call i32 @decrypt(i32* %23, i32* %24)
%26 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
%27 = load i32, i32* %26
%28 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 1
%29 = load i32, i32* %28
%30 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %27, i32 %29)
ret i32 0
}

LLVM IR (-O2):
@__const.main.k = [4 x i32] [i32 4, i32 3, i32 2, i32 1]
@.str = [10 x i8] c"%08X%08X\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i64
%4 = bitcast i64* %3 to [2 x i32]*
%5 = alloca [4 x i32]
%6 = bitcast i64* %3 to i8*
store i64 68719476768, i64* %3
%7 = bitcast [4 x i32]* %5 to i8*
%8 = bitcast i64* %3 to i32*
%9 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 1
%10 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 32, i32 16)
%11 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 0
%12 = call i32 @encrypt(i32* %8, i32* %11)
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %13, i32 %14)
%16 = call i32 @decrypt(i32* %8, i32* %11)
%17 = load i32, i32* %8
%18 = load i32, i32* %9
%19 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %17, i32 %18)
ret i32 0
}