#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*/ printf(char *, int);
int testRolAbsolute();
int testRolAbsoluteX();
int testRolImplied();
int testRolZeropage();
int testRolZeropageX();
int testRorAbsolute();
int testRorAbsoluteX();
int testRorImplied();
int testRorZeropage();
int testRorZeropageX();
void testRotate() {
  printf("testRolImplied: %d\r\n", testRolImplied());
  printf("testRolZeropage: %d\r\n", testRolZeropage());
  printf("testRolZeropageX: %d\r\n", testRolZeropageX());
  printf("testRolAbsolute: %d\r\n", testRolAbsolute());
  printf("testRolAbsoluteX: %d\r\n", testRolAbsoluteX());
  printf("testRorImplied: %d\r\n", testRorImplied());
  printf("testRorZeropage: %d\r\n", testRorZeropage());
  printf("testRorZeropageX: %d\r\n", testRorZeropageX());
  printf("testRorAbsolute: %d\r\n", testRorAbsolute());
  printf("testRorAbsoluteX: %d\r\n", testRorAbsoluteX());
}


x86 assembly (clang, -O0):
<testRotate>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1070 <testRolImplied@plt>
mov    %eax,%esi
lea    0xe3c(%rip),%rdi
call   1090 <printf@plt>
mov    $0x0,%al
call   1060 <testRolZeropage@plt>
mov    %eax,%esi
lea    0xe3c(%rip),%rdi
call   1090 <printf@plt>
mov    $0x0,%al
call   1040 <testRolZeropageX@plt>
mov    %eax,%esi
lea    0xe3d(%rip),%rdi
call   1090 <printf@plt>
mov    $0x0,%al
call   10b0 <testRolAbsolute@plt>
mov    %eax,%esi
lea    0xe3f(%rip),%rdi
call   1090 <printf@plt>
mov    $0x0,%al
call   10c0 <testRolAbsoluteX@plt>
mov    %eax,%esi
lea    0xe40(%rip),%rdi
call   1090 <printf@plt>
mov    $0x0,%al
call   1080 <testRorImplied@plt>
mov    %eax,%esi
lea    0xe42(%rip),%rdi
call   1090 <printf@plt>
mov    $0x0,%al
call   1050 <testRorZeropage@plt>
mov    %eax,%esi
lea    0xe42(%rip),%rdi
call   1090 <printf@plt>
mov    $0x0,%al
call   1030 <testRorZeropageX@plt>
mov    %eax,%esi
lea    0xe43(%rip),%rdi
call   1090 <printf@plt>
mov    $0x0,%al
call   10a0 <testRorAbsolute@plt>
mov    %eax,%esi
lea    0xe45(%rip),%rdi
call   1090 <printf@plt>
mov    $0x0,%al
call   10d0 <testRorAbsoluteX@plt>
mov    %eax,%esi
lea    0xe46(%rip),%rdi
call   1090 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testRotate>:
push   %rax
xor    %eax,%eax
call   1070 <testRolImplied@plt>
lea    0xe41(%rip),%rdi
mov    %eax,%esi
call   1090 <printf@plt>
xor    %eax,%eax
call   1060 <testRolZeropage@plt>
lea    0xe41(%rip),%rdi
mov    %eax,%esi
call   1090 <printf@plt>
xor    %eax,%eax
call   1040 <testRolZeropageX@plt>
lea    0xe42(%rip),%rdi
mov    %eax,%esi
call   1090 <printf@plt>
xor    %eax,%eax
call   10b0 <testRolAbsolute@plt>
lea    0xe44(%rip),%rdi
mov    %eax,%esi
call   1090 <printf@plt>
xor    %eax,%eax
call   10c0 <testRolAbsoluteX@plt>
lea    0xe45(%rip),%rdi
mov    %eax,%esi
call   1090 <printf@plt>
xor    %eax,%eax
call   1080 <testRorImplied@plt>
lea    0xe47(%rip),%rdi
mov    %eax,%esi
call   1090 <printf@plt>
xor    %eax,%eax
call   1050 <testRorZeropage@plt>
lea    0xe47(%rip),%rdi
mov    %eax,%esi
call   1090 <printf@plt>
xor    %eax,%eax
call   1030 <testRorZeropageX@plt>
lea    0xe48(%rip),%rdi
mov    %eax,%esi
call   1090 <printf@plt>
xor    %eax,%eax
call   10a0 <testRorAbsolute@plt>
lea    0xe4a(%rip),%rdi
mov    %eax,%esi
call   1090 <printf@plt>
xor    %eax,%eax
call   10d0 <testRorAbsoluteX@plt>
lea    0xe4b(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1090 <printf@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"testRolImplied: %d\0D\0A\00"
@.str.1 = [22 x i8] c"testRolZeropage: %d\0D\0A\00"
@.str.2 = [23 x i8] c"testRolZeropageX: %d\0D\0A\00"
@.str.3 = [22 x i8] c"testRolAbsolute: %d\0D\0A\00"
@.str.4 = [23 x i8] c"testRolAbsoluteX: %d\0D\0A\00"
@.str.5 = [21 x i8] c"testRorImplied: %d\0D\0A\00"
@.str.6 = [22 x i8] c"testRorZeropage: %d\0D\0A\00"
@.str.7 = [23 x i8] c"testRorZeropageX: %d\0D\0A\00"
@.str.8 = [22 x i8] c"testRorAbsolute: %d\0D\0A\00"
@.str.9 = [23 x i8] c"testRorAbsoluteX: %d\0D\0A\00"
define void @testRotate() {
%1 = call i32 (...) @testRolImplied()
%2 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = call i32 (...) @testRolZeropage()
%4 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = call i32 (...) @testRolZeropageX()
%6 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = call i32 (...) @testRolAbsolute()
%8 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 %7)
%9 = call i32 (...) @testRolAbsoluteX()
%10 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0), i32 %9)
%11 = call i32 (...) @testRorImplied()
%12 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i32 %11)
%13 = call i32 (...) @testRorZeropage()
%14 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i32 %13)
%15 = call i32 (...) @testRorZeropageX()
%16 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0), i32 %15)
%17 = call i32 (...) @testRorAbsolute()
%18 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.8, i64 0, i64 0), i32 %17)
%19 = call i32 (...) @testRorAbsoluteX()
%20 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.9, i64 0, i64 0), i32 %19)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"testRolImplied: %d\0D\0A\00"
@.str.1 = [22 x i8] c"testRolZeropage: %d\0D\0A\00"
@.str.2 = [23 x i8] c"testRolZeropageX: %d\0D\0A\00"
@.str.3 = [22 x i8] c"testRolAbsolute: %d\0D\0A\00"
@.str.4 = [23 x i8] c"testRolAbsoluteX: %d\0D\0A\00"
@.str.5 = [21 x i8] c"testRorImplied: %d\0D\0A\00"
@.str.6 = [22 x i8] c"testRorZeropage: %d\0D\0A\00"
@.str.7 = [23 x i8] c"testRorZeropageX: %d\0D\0A\00"
@.str.8 = [22 x i8] c"testRorAbsolute: %d\0D\0A\00"
@.str.9 = [23 x i8] c"testRorAbsoluteX: %d\0D\0A\00"
define void @testRotate() {
%1 = tail call i32 (...) @testRolImplied()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 (...) @testRolZeropage()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = tail call i32 (...) @testRolZeropageX()
%6 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = tail call i32 (...) @testRolAbsolute()
%8 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 %7)
%9 = tail call i32 (...) @testRolAbsoluteX()
%10 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0), i32 %9)
%11 = tail call i32 (...) @testRorImplied()
%12 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i32 %11)
%13 = tail call i32 (...) @testRorZeropage()
%14 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i32 %13)
%15 = tail call i32 (...) @testRorZeropageX()
%16 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0), i32 %15)
%17 = tail call i32 (...) @testRorAbsolute()
%18 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.8, i64 0, i64 0), i32 %17)
%19 = tail call i32 (...) @testRorAbsoluteX()
%20 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.9, i64 0, i64 0), i32 %19)
ret void
}