#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*/ funcR(unsigned char *, unsigned char *);
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char *, int);
void funcL(unsigned char *indata, unsigned char *outdata) {
  unsigned char tmp[16];
  int i = 0;
  memcpy(tmp, indata, 16);
  for (i = 0; i < 16; ++i) {
    funcR(tmp, outdata);
    memcpy(tmp, outdata, 16);
  }
}


x86 assembly (clang, -O0):
<funcL>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x24(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x10,%edx
call   1030 <memcpy@plt>
movl   $0x0,-0x24(%rbp)
cmpl   $0x10,-0x24(%rbp)
jge    1187 <funcL+0x67>
lea    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <funcR@plt>
lea    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x10,%edx
call   1030 <memcpy@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1150 <funcL+0x30>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<funcL>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%rbx
mov    %rdi,%rsi
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x10,%edx
call   1030 <memcpy@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <funcR@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x10,%edx
call   1030 <memcpy@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <funcR@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x10,%edx
call   1030 <memcpy@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <funcR@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x10,%edx
call   1030 <memcpy@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <funcR@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x10,%edx
call   1030 <memcpy@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <funcR@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x10,%edx
call   1030 <memcpy@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <funcR@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x10,%edx
call   1030 <memcpy@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <funcR@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x10,%edx
call   1030 <memcpy@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <funcR@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x10,%edx
call   1030 <memcpy@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <funcR@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x10,%edx
call   1030 <memcpy@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <funcR@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x10,%edx
call   1030 <memcpy@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <funcR@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x10,%edx
call   1030 <memcpy@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <funcR@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x10,%edx
call   1030 <memcpy@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <funcR@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x10,%edx
call   1030 <memcpy@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <funcR@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x10,%edx
call   1030 <memcpy@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <funcR@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x10,%edx
call   1030 <memcpy@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <funcR@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x10,%edx
call   1030 <memcpy@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @funcL(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [16 x i8]
%6 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
store i32 0, i32* %6
%7 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%8 = load i8*, i8** %3
%9 = call i32 @memcpy(i8* %7, i8* %8, i32 16)
store i32 0, i32* %6
br label %10
10: ; preds = %20, %2
%11 = load i32, i32* %6
%12 = icmp slt i32 %11, 16
br i1 %12, label %13, label %23
13: ; preds = %10
%14 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%15 = load i8*, i8** %4
%16 = call i32 @funcR(i8* %14, i8* %15)
%17 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%18 = load i8*, i8** %4
%19 = call i32 @memcpy(i8* %17, i8* %18, i32 16)
br label %20
20: ; preds = %13
%21 = load i32, i32* %6
%22 = add nsw i32 %21, 1
store i32 %22, i32* %6
br label %10
23: ; preds = %10
ret void
}

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