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

/* Variables and functions */
int /*<<< orphan*/ funcLSX(unsigned char *, unsigned char *, unsigned char *);
int /*<<< orphan*/ funcX(unsigned char *, unsigned char *, unsigned char *);
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char const *, int);
void Encrypt_14(const unsigned char *plainText, unsigned char *chipherText,
                unsigned int lenPlainText, unsigned char *keys) {
  unsigned char xTemp[16] = {0};
  unsigned char yTemp[16] = {0};
  int i;
  memcpy(xTemp, plainText, 16);
  for (i = 0; i < 9; ++i) {
    funcLSX(xTemp, keys + 16 * i, yTemp);
    memcpy(xTemp, yTemp, 16);
  }
  funcX(yTemp, keys + 9 * 16, chipherText);
}


x86 assembly (clang, -O0):
<Encrypt_14>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1040 <memset@plt>
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1040 <memset@plt>
lea    -0x30(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x10,%edx
call   1050 <memcpy@plt>
movl   $0x0,-0x44(%rbp)
cmpl   $0x9,-0x44(%rbp)
jge    11d6 <Encrypt_14+0x96>
lea    -0x30(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x44(%rbp),%eax
shl    $0x4,%eax
cltq
add    %rax,%rsi
lea    -0x40(%rbp),%rdx
call   1030 <funcLSX@plt>
lea    -0x30(%rbp),%rdi
lea    -0x40(%rbp),%rsi
mov    $0x10,%edx
call   1050 <memcpy@plt>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1190 <Encrypt_14+0x50>
lea    -0x40(%rbp),%rdi
mov    -0x20(%rbp),%rsi
add    $0x90,%rsi
mov    -0x10(%rbp),%rdx
call   1060 <funcX@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Encrypt_14>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rcx,%rbx
mov    %rsi,%r14
mov    %rdi,%rsi
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
lea    0x10(%rsp),%r15
mov    %r15,%rdi
mov    $0x10,%edx
call   1040 <memcpy@plt>
mov    %rsp,%r12
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r12,%rdx
call   1030 <funcLSX@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    $0x10,%edx
call   1040 <memcpy@plt>
lea    0x10(%rbx),%rsi
mov    %r15,%rdi
mov    %r12,%rdx
call   1030 <funcLSX@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    $0x10,%edx
call   1040 <memcpy@plt>
lea    0x20(%rbx),%rsi
mov    %r15,%rdi
mov    %r12,%rdx
call   1030 <funcLSX@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    $0x10,%edx
call   1040 <memcpy@plt>
lea    0x30(%rbx),%rsi
mov    %r15,%rdi
mov    %r12,%rdx
call   1030 <funcLSX@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    $0x10,%edx
call   1040 <memcpy@plt>
lea    0x40(%rbx),%rsi
mov    %r15,%rdi
mov    %r12,%rdx
call   1030 <funcLSX@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    $0x10,%edx
call   1040 <memcpy@plt>
lea    0x50(%rbx),%rsi
mov    %r15,%rdi
mov    %r12,%rdx
call   1030 <funcLSX@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    $0x10,%edx
call   1040 <memcpy@plt>
lea    0x60(%rbx),%rsi
mov    %r15,%rdi
mov    %r12,%rdx
call   1030 <funcLSX@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    $0x10,%edx
call   1040 <memcpy@plt>
lea    0x70(%rbx),%rsi
mov    %r15,%rdi
mov    %r12,%rdx
call   1030 <funcLSX@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    $0x10,%edx
call   1040 <memcpy@plt>
lea    0x80(%rbx),%rsi
mov    %r15,%rdi
mov    %r12,%rdx
call   1030 <funcLSX@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    $0x10,%edx
call   1040 <memcpy@plt>
add    $0x90,%rbx
mov    %r12,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1050 <funcX@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @Encrypt_14(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca [16 x i8]
%10 = alloca [16 x i8]
%11 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%12 = bitcast [16 x i8]* %9 to i8*
%13 = bitcast [16 x i8]* %10 to i8*
%14 = getelementptr inbounds [16 x i8], [16 x i8]* %9, i64 0, i64 0
%15 = load i8*, i8** %5
%16 = call i32 @memcpy(i8* %14, i8* %15, i32 16)
store i32 0, i32* %11
br label %17
17: ; preds = %32, %4
%18 = load i32, i32* %11
%19 = icmp slt i32 %18, 9
br i1 %19, label %20, label %35
20: ; preds = %17
%21 = getelementptr inbounds [16 x i8], [16 x i8]* %9, i64 0, i64 0
%22 = load i8*, i8** %8
%23 = load i32, i32* %11
%24 = mul nsw i32 16, %23
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i8, i8* %22, i64 %25
%27 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 0
%28 = call i32 @funcLSX(i8* %21, i8* %26, i8* %27)
%29 = getelementptr inbounds [16 x i8], [16 x i8]* %9, i64 0, i64 0
%30 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 0
%31 = call i32 @memcpy(i8* %29, i8* %30, i32 16)
br label %32
32: ; preds = %20
%33 = load i32, i32* %11
%34 = add nsw i32 %33, 1
store i32 %34, i32* %11
br label %17
35: ; preds = %17
%36 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 0
%37 = load i8*, i8** %8
%38 = getelementptr inbounds i8, i8* %37, i64 144
%39 = load i8*, i8** %6
%40 = call i32 @funcX(i8* %36, i8* %38, i8* %39)
ret void
}

LLVM IR (-O2):
define void @Encrypt_14(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca [16 x i8]
%6 = alloca [16 x i8]
%7 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%8 = getelementptr inbounds [16 x i8], [16 x i8]* %6, i64 0, i64 0
%9 = call i32 @memcpy(i8* %7, i8* %0, i32 16)
%10 = call i32 @funcLSX(i8* %7, i8* %3, i8* %8)
%11 = call i32 @memcpy(i8* %7, i8* %8, i32 16)
%12 = getelementptr inbounds i8, i8* %3, i64 16
%13 = call i32 @funcLSX(i8* %7, i8* %12, i8* %8)
%14 = call i32 @memcpy(i8* %7, i8* %8, i32 16)
%15 = getelementptr inbounds i8, i8* %3, i64 32
%16 = call i32 @funcLSX(i8* %7, i8* %15, i8* %8)
%17 = call i32 @memcpy(i8* %7, i8* %8, i32 16)
%18 = getelementptr inbounds i8, i8* %3, i64 48
%19 = call i32 @funcLSX(i8* %7, i8* %18, i8* %8)
%20 = call i32 @memcpy(i8* %7, i8* %8, i32 16)
%21 = getelementptr inbounds i8, i8* %3, i64 64
%22 = call i32 @funcLSX(i8* %7, i8* %21, i8* %8)
%23 = call i32 @memcpy(i8* %7, i8* %8, i32 16)
%24 = getelementptr inbounds i8, i8* %3, i64 80
%25 = call i32 @funcLSX(i8* %7, i8* %24, i8* %8)
%26 = call i32 @memcpy(i8* %7, i8* %8, i32 16)
%27 = getelementptr inbounds i8, i8* %3, i64 96
%28 = call i32 @funcLSX(i8* %7, i8* %27, i8* %8)
%29 = call i32 @memcpy(i8* %7, i8* %8, i32 16)
%30 = getelementptr inbounds i8, i8* %3, i64 112
%31 = call i32 @funcLSX(i8* %7, i8* %30, i8* %8)
%32 = call i32 @memcpy(i8* %7, i8* %8, i32 16)
%33 = getelementptr inbounds i8, i8* %3, i64 128
%34 = call i32 @funcLSX(i8* %7, i8* %33, i8* %8)
%35 = call i32 @memcpy(i8* %7, i8* %8, i32 16)
%36 = getelementptr inbounds i8, i8* %3, i64 144
%37 = call i32 @funcX(i8* %8, i8* %36, i8* %1)
ret void
}