#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 testCmpAbsolute();
int testCmpAbsoluteX();
int testCmpAbsoluteY();
int testCmpImmediate();
int testCmpIndirectX();
int testCmpIndirectY();
int testCmpZeropage();
int testCmpZeropageX();
int testCpxAbsolute();
int testCpxImmediate();
int testCpxZeropage();
int testCpyAbsolute();
int testCpyImmediate();
int testCpyZeropage();
void testCompare() {
  printf("testCmpImmediate: %d\r\n", testCmpImmediate());
  printf("testCmpZeropage: %d\r\n", testCmpZeropage());
  printf("testCmpZeropageX: %d\r\n", testCmpZeropageX());
  printf("testCmpAbsolute: %d\r\n", testCmpAbsolute());
  printf("testCmpAbsoluteX: %d\r\n", testCmpAbsoluteX());
  printf("testCmpAbsoluteY: %d\r\n", testCmpAbsoluteY());
  printf("testCmpIndirectX: %d\r\n", testCmpIndirectX());
  printf("testCmpIndirectY: %d\r\n", testCmpIndirectY());
  printf("testCpxImmediate: %d\r\n", testCpxImmediate());
  printf("testCpxZeropage: %d\r\n", testCpxZeropage());
  printf("testCpxAbsolute: %d\r\n", testCpxAbsolute());
  printf("testCpyImmediate: %d\r\n", testCpyImmediate());
  printf("testCpyZeropage: %d\r\n", testCpyZeropage());
  printf("testCpyAbsolute: %d\r\n", testCpyAbsolute());
}


x86 assembly (clang, -O0):
<testCompare>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1070 <testCmpImmediate@plt>
mov    %eax,%esi
lea    0xdfc(%rip),%rdi
call   1060 <printf@plt>
mov    $0x0,%al
call   10b0 <testCmpZeropage@plt>
mov    %eax,%esi
lea    0xdfe(%rip),%rdi
call   1060 <printf@plt>
mov    $0x0,%al
call   10f0 <testCmpZeropageX@plt>
mov    %eax,%esi
lea    0xdff(%rip),%rdi
call   1060 <printf@plt>
mov    $0x0,%al
call   10a0 <testCmpAbsolute@plt>
mov    %eax,%esi
lea    0xe01(%rip),%rdi
call   1060 <printf@plt>
mov    $0x0,%al
call   10d0 <testCmpAbsoluteX@plt>
mov    %eax,%esi
lea    0xe02(%rip),%rdi
call   1060 <printf@plt>
mov    $0x0,%al
call   1050 <testCmpAbsoluteY@plt>
mov    %eax,%esi
lea    0xe04(%rip),%rdi
call   1060 <printf@plt>
mov    $0x0,%al
call   1040 <testCmpIndirectX@plt>
mov    %eax,%esi
lea    0xe06(%rip),%rdi
call   1060 <printf@plt>
mov    $0x0,%al
call   10c0 <testCmpIndirectY@plt>
mov    %eax,%esi
lea    0xe08(%rip),%rdi
call   1060 <printf@plt>
mov    $0x0,%al
call   1080 <testCpxImmediate@plt>
mov    %eax,%esi
lea    0xe0a(%rip),%rdi
call   1060 <printf@plt>
mov    $0x0,%al
call   1110 <testCpxZeropage@plt>
mov    %eax,%esi
lea    0xe0c(%rip),%rdi
call   1060 <printf@plt>
mov    $0x0,%al
call   1090 <testCpxAbsolute@plt>
mov    %eax,%esi
lea    0xe0d(%rip),%rdi
call   1060 <printf@plt>
mov    $0x0,%al
call   10e0 <testCpyImmediate@plt>
mov    %eax,%esi
lea    0xe0e(%rip),%rdi
call   1060 <printf@plt>
mov    $0x0,%al
call   1030 <testCpyZeropage@plt>
mov    %eax,%esi
lea    0xe10(%rip),%rdi
call   1060 <printf@plt>
mov    $0x0,%al
call   1100 <testCpyAbsolute@plt>
mov    %eax,%esi
lea    0xe11(%rip),%rdi
call   1060 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testCompare>:
push   %rax
xor    %eax,%eax
call   1070 <testCmpImmediate@plt>
lea    0xe01(%rip),%rdi
mov    %eax,%esi
call   1060 <printf@plt>
xor    %eax,%eax
call   10b0 <testCmpZeropage@plt>
lea    0xe03(%rip),%rdi
mov    %eax,%esi
call   1060 <printf@plt>
xor    %eax,%eax
call   10f0 <testCmpZeropageX@plt>
lea    0xe04(%rip),%rdi
mov    %eax,%esi
call   1060 <printf@plt>
xor    %eax,%eax
call   10a0 <testCmpAbsolute@plt>
lea    0xe06(%rip),%rdi
mov    %eax,%esi
call   1060 <printf@plt>
xor    %eax,%eax
call   10d0 <testCmpAbsoluteX@plt>
lea    0xe07(%rip),%rdi
mov    %eax,%esi
call   1060 <printf@plt>
xor    %eax,%eax
call   1050 <testCmpAbsoluteY@plt>
lea    0xe09(%rip),%rdi
mov    %eax,%esi
call   1060 <printf@plt>
xor    %eax,%eax
call   1040 <testCmpIndirectX@plt>
lea    0xe0b(%rip),%rdi
mov    %eax,%esi
call   1060 <printf@plt>
xor    %eax,%eax
call   10c0 <testCmpIndirectY@plt>
lea    0xe0d(%rip),%rdi
mov    %eax,%esi
call   1060 <printf@plt>
xor    %eax,%eax
call   1080 <testCpxImmediate@plt>
lea    0xe0f(%rip),%rdi
mov    %eax,%esi
call   1060 <printf@plt>
xor    %eax,%eax
call   1110 <testCpxZeropage@plt>
lea    0xe11(%rip),%rdi
mov    %eax,%esi
call   1060 <printf@plt>
xor    %eax,%eax
call   1090 <testCpxAbsolute@plt>
lea    0xe12(%rip),%rdi
mov    %eax,%esi
call   1060 <printf@plt>
xor    %eax,%eax
call   10e0 <testCpyImmediate@plt>
lea    0xe13(%rip),%rdi
mov    %eax,%esi
call   1060 <printf@plt>
xor    %eax,%eax
call   1030 <testCpyZeropage@plt>
lea    0xe15(%rip),%rdi
mov    %eax,%esi
call   1060 <printf@plt>
xor    %eax,%eax
call   1100 <testCpyAbsolute@plt>
lea    0xe16(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1060 <printf@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"testCmpImmediate: %d\0D\0A\00"
@.str.1 = [22 x i8] c"testCmpZeropage: %d\0D\0A\00"
@.str.2 = [23 x i8] c"testCmpZeropageX: %d\0D\0A\00"
@.str.3 = [22 x i8] c"testCmpAbsolute: %d\0D\0A\00"
@.str.4 = [23 x i8] c"testCmpAbsoluteX: %d\0D\0A\00"
@.str.5 = [23 x i8] c"testCmpAbsoluteY: %d\0D\0A\00"
@.str.6 = [23 x i8] c"testCmpIndirectX: %d\0D\0A\00"
@.str.7 = [23 x i8] c"testCmpIndirectY: %d\0D\0A\00"
@.str.8 = [23 x i8] c"testCpxImmediate: %d\0D\0A\00"
@.str.9 = [22 x i8] c"testCpxZeropage: %d\0D\0A\00"
@.str.10 = [22 x i8] c"testCpxAbsolute: %d\0D\0A\00"
@.str.11 = [23 x i8] c"testCpyImmediate: %d\0D\0A\00"
@.str.12 = [22 x i8] c"testCpyZeropage: %d\0D\0A\00"
@.str.13 = [22 x i8] c"testCpyAbsolute: %d\0D\0A\00"
define void @testCompare() {
%1 = call i32 (...) @testCmpImmediate()
%2 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = call i32 (...) @testCmpZeropage()
%4 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = call i32 (...) @testCmpZeropageX()
%6 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = call i32 (...) @testCmpAbsolute()
%8 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 %7)
%9 = call i32 (...) @testCmpAbsoluteX()
%10 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0), i32 %9)
%11 = call i32 (...) @testCmpAbsoluteY()
%12 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i32 %11)
%13 = call i32 (...) @testCmpIndirectX()
%14 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 %13)
%15 = call i32 (...) @testCmpIndirectY()
%16 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0), i32 %15)
%17 = call i32 (...) @testCpxImmediate()
%18 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), i32 %17)
%19 = call i32 (...) @testCpxZeropage()
%20 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.9, i64 0, i64 0), i32 %19)
%21 = call i32 (...) @testCpxAbsolute()
%22 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0), i32 %21)
%23 = call i32 (...) @testCpyImmediate()
%24 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.11, i64 0, i64 0), i32 %23)
%25 = call i32 (...) @testCpyZeropage()
%26 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.12, i64 0, i64 0), i32 %25)
%27 = call i32 (...) @testCpyAbsolute()
%28 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0), i32 %27)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"testCmpImmediate: %d\0D\0A\00"
@.str.1 = [22 x i8] c"testCmpZeropage: %d\0D\0A\00"
@.str.2 = [23 x i8] c"testCmpZeropageX: %d\0D\0A\00"
@.str.3 = [22 x i8] c"testCmpAbsolute: %d\0D\0A\00"
@.str.4 = [23 x i8] c"testCmpAbsoluteX: %d\0D\0A\00"
@.str.5 = [23 x i8] c"testCmpAbsoluteY: %d\0D\0A\00"
@.str.6 = [23 x i8] c"testCmpIndirectX: %d\0D\0A\00"
@.str.7 = [23 x i8] c"testCmpIndirectY: %d\0D\0A\00"
@.str.8 = [23 x i8] c"testCpxImmediate: %d\0D\0A\00"
@.str.9 = [22 x i8] c"testCpxZeropage: %d\0D\0A\00"
@.str.10 = [22 x i8] c"testCpxAbsolute: %d\0D\0A\00"
@.str.11 = [23 x i8] c"testCpyImmediate: %d\0D\0A\00"
@.str.12 = [22 x i8] c"testCpyZeropage: %d\0D\0A\00"
@.str.13 = [22 x i8] c"testCpyAbsolute: %d\0D\0A\00"
define void @testCompare() {
%1 = tail call i32 (...) @testCmpImmediate()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 (...) @testCmpZeropage()
%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 (...) @testCmpZeropageX()
%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 (...) @testCmpAbsolute()
%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 (...) @testCmpAbsoluteX()
%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 (...) @testCmpAbsoluteY()
%12 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i32 %11)
%13 = tail call i32 (...) @testCmpIndirectX()
%14 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 %13)
%15 = tail call i32 (...) @testCmpIndirectY()
%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 (...) @testCpxImmediate()
%18 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), i32 %17)
%19 = tail call i32 (...) @testCpxZeropage()
%20 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.9, i64 0, i64 0), i32 %19)
%21 = tail call i32 (...) @testCpxAbsolute()
%22 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0), i32 %21)
%23 = tail call i32 (...) @testCpyImmediate()
%24 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.11, i64 0, i64 0), i32 %23)
%25 = tail call i32 (...) @testCpyZeropage()
%26 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.12, i64 0, i64 0), i32 %25)
%27 = tail call i32 (...) @testCpyAbsolute()
%28 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.13, i64 0, i64 0), i32 %27)
ret void
}