#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 */
char *isRotation(char *, char *);
int /*<<< orphan*/ printf(char *, char *, char *, char *);
int main() {
  char *x = "milk";
  char *y = "ilkm";
  char *z = "mikl";
  printf("isRotation(%s,%s): %s\n", x, y, isRotation(x, y));
  printf("isRotation(%s,%s): %s\n", x, z, isRotation(x, z));
  printf("isRotation(%s,%s): %s\n", y, z, isRotation(y, z));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xecb(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xec5(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <isRotation@plt>
mov    -0x48(%rbp),%rsi
mov    -0x40(%rbp),%rdx
mov    %rax,%rcx
lea    0xe97(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <isRotation@plt>
mov    -0x38(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    %rax,%rcx
lea    0xe63(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <isRotation@plt>
mov    -0x28(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    %rax,%rcx
lea    0xe2f(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xed1(%rip),%r12
lea    0xecf(%rip),%r14
mov    %r12,%rdi
mov    %r14,%rsi
call   1030 <isRotation@plt>
lea    0xec7(%rip),%r15
mov    %r15,%rdi
mov    %r12,%rsi
mov    %r14,%rdx
mov    %rax,%rcx
call   1040 <printf@plt>
lea    0xeaa(%rip),%rbx
mov    %r12,%rdi
mov    %rbx,%rsi
call   1030 <isRotation@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
mov    %rax,%rcx
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <isRotation@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
mov    %rax,%rcx
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [5 x i8] c"milk\00"
@.str.1 = [5 x i8] c"ilkm\00"
@.str.2 = [5 x i8] c"mikl\00"
@.str.3 = [23 x i8] c"isRotation(%s,%s): %s\0A\00"
define i32 @main() {
%1 = alloca i8*
%2 = alloca i8*
%3 = alloca i8*
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8** %2
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8** %3
%4 = load i8*, i8** %1
%5 = load i8*, i8** %2
%6 = load i8*, i8** %1
%7 = load i8*, i8** %2
%8 = call i8* @isRotation(i8* %6, i8* %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), i8* %4, i8* %5, i8* %8)
%10 = load i8*, i8** %1
%11 = load i8*, i8** %3
%12 = load i8*, i8** %1
%13 = load i8*, i8** %3
%14 = call i8* @isRotation(i8* %12, i8* %13)
%15 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), i8* %10, i8* %11, i8* %14)
%16 = load i8*, i8** %2
%17 = load i8*, i8** %3
%18 = load i8*, i8** %2
%19 = load i8*, i8** %3
%20 = call i8* @isRotation(i8* %18, i8* %19)
%21 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), i8* %16, i8* %17, i8* %20)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"milk\00"
@.str.1 = [5 x i8] c"ilkm\00"
@.str.2 = [5 x i8] c"mikl\00"
@.str.3 = [23 x i8] c"isRotation(%s,%s): %s\0A\00"
define i32 @main() {
%1 = tail call i8* @isRotation(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%3 = tail call i8* @isRotation(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %3)
%5 = tail call i8* @isRotation(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %5)
ret i32 0
}