#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 testJmpAbsolute();
int testLdaAbsolute();
int testLdaAbsoluteX();
int testLdaAbsoluteY();
int testLdaImmediate();
int testLdaIndirectY();
int testLdaZeropage();
int testLdaZeropageX();
int testLdxAbsolute();
int testLdxAbsoluteY();
int testLdxImmediate();
int testLdxZeropage();
int testLdxZeropageY();
int testLdyAbsolute();
int testLdyAbsoluteX();
int testLdyImmediate();
int testLdyZeropage();
int testLdyZeropageX();
void testLoads() {
  printf("testLdaImmediate: %d\r\n", testLdaImmediate());
  printf("testLdaZeropage: %d\r\n", testLdaZeropage());
  printf("testLdaZeropageX: %d\r\n", testLdaZeropageX());
  printf("testLdaAbsolute: %d\r\n", testLdaAbsolute());
  printf("testLdaAbsoluteX: %d\r\n", testLdaAbsoluteX());
  printf("testLdaAbsoluteY: %d\r\n", testLdaAbsoluteY());
  printf("testLdaIndirectX: %d\r\n", testJmpAbsolute());
  printf("testLdaIndirectY: %d\r\n", testLdaIndirectY());
  printf("testLdxImmediate: %d\r\n", testLdxImmediate());
  printf("testLdxZeropage: %d\r\n", testLdxZeropage());
  printf("testLdxZeropageY: %d\r\n", testLdxZeropageY());
  printf("testLdxAbsolute: %d\r\n", testLdxAbsolute());
  printf("testLdxAbsoluteY: %d\r\n", testLdxAbsoluteY());
  printf("testLdyImmediate: %d\r\n", testLdyImmediate());
  printf("testLdyZeropage: %d\r\n", testLdyZeropage());
  printf("testLdyZeropageX: %d\r\n", testLdyZeropageX());
  printf("testLdyAbsolute: %d\r\n", testLdyAbsolute());
  printf("testLdyAbsoluteX: %d\r\n", testLdyAbsoluteX());
}


x86 assembly (clang, -O0):
<testLoads>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1100 <testLdaImmediate@plt>
mov    %eax,%esi
lea    0xdbc(%rip),%rdi
call   1060 <printf@plt>
mov    $0x0,%al
call   10f0 <testLdaZeropage@plt>
mov    %eax,%esi
lea    0xdbe(%rip),%rdi
call   1060 <printf@plt>
mov    $0x0,%al
call   1150 <testLdaZeropageX@plt>
mov    %eax,%esi
lea    0xdbf(%rip),%rdi
call   1060 <printf@plt>
mov    $0x0,%al
call   1040 <testLdaAbsolute@plt>
mov    %eax,%esi
lea    0xdc1(%rip),%rdi
call   1060 <printf@plt>
mov    $0x0,%al
call   1120 <testLdaAbsoluteX@plt>
mov    %eax,%esi
lea    0xdc2(%rip),%rdi
call   1060 <printf@plt>
mov    $0x0,%al
call   1080 <testLdaAbsoluteY@plt>
mov    %eax,%esi
lea    0xdc4(%rip),%rdi
call   1060 <printf@plt>
mov    $0x0,%al
call   10b0 <testJmpAbsolute@plt>
mov    %eax,%esi
lea    0xdc6(%rip),%rdi
call   1060 <printf@plt>
mov    $0x0,%al
call   10c0 <testLdaIndirectY@plt>
mov    %eax,%esi
lea    0xdc8(%rip),%rdi
call   1060 <printf@plt>
mov    $0x0,%al
call   10e0 <testLdxImmediate@plt>
mov    %eax,%esi
lea    0xdca(%rip),%rdi
call   1060 <printf@plt>
mov    $0x0,%al
call   1110 <testLdxZeropage@plt>
mov    %eax,%esi
lea    0xdcc(%rip),%rdi
call   1060 <printf@plt>
mov    $0x0,%al
call   1140 <testLdxZeropageY@plt>
mov    %eax,%esi
lea    0xdcd(%rip),%rdi
call   1060 <printf@plt>
mov    $0x0,%al
call   1030 <testLdxAbsolute@plt>
mov    %eax,%esi
lea    0xdcf(%rip),%rdi
call   1060 <printf@plt>
mov    $0x0,%al
call   1130 <testLdxAbsoluteY@plt>
mov    %eax,%esi
lea    0xdd0(%rip),%rdi
call   1060 <printf@plt>
mov    $0x0,%al
call   10a0 <testLdyImmediate@plt>
mov    %eax,%esi
lea    0xdd2(%rip),%rdi
call   1060 <printf@plt>
mov    $0x0,%al
call   1070 <testLdyZeropage@plt>
mov    %eax,%esi
lea    0xdd4(%rip),%rdi
call   1060 <printf@plt>
mov    $0x0,%al
call   1050 <testLdyZeropageX@plt>
mov    %eax,%esi
lea    0xdd5(%rip),%rdi
call   1060 <printf@plt>
mov    $0x0,%al
call   1090 <testLdyAbsolute@plt>
mov    %eax,%esi
lea    0xdd7(%rip),%rdi
call   1060 <printf@plt>
mov    $0x0,%al
call   10d0 <testLdyAbsoluteX@plt>
mov    %eax,%esi
lea    0xdd8(%rip),%rdi
call   1060 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testLoads>:
push   %rax
xor    %eax,%eax
call   1100 <testLdaImmediate@plt>
lea    0xdc1(%rip),%rdi
mov    %eax,%esi
call   1060 <printf@plt>
xor    %eax,%eax
call   10f0 <testLdaZeropage@plt>
lea    0xdc3(%rip),%rdi
mov    %eax,%esi
call   1060 <printf@plt>
xor    %eax,%eax
call   1150 <testLdaZeropageX@plt>
lea    0xdc4(%rip),%rdi
mov    %eax,%esi
call   1060 <printf@plt>
xor    %eax,%eax
call   1040 <testLdaAbsolute@plt>
lea    0xdc6(%rip),%rdi
mov    %eax,%esi
call   1060 <printf@plt>
xor    %eax,%eax
call   1120 <testLdaAbsoluteX@plt>
lea    0xdc7(%rip),%rdi
mov    %eax,%esi
call   1060 <printf@plt>
xor    %eax,%eax
call   1080 <testLdaAbsoluteY@plt>
lea    0xdc9(%rip),%rdi
mov    %eax,%esi
call   1060 <printf@plt>
xor    %eax,%eax
call   10b0 <testJmpAbsolute@plt>
lea    0xdcb(%rip),%rdi
mov    %eax,%esi
call   1060 <printf@plt>
xor    %eax,%eax
call   10c0 <testLdaIndirectY@plt>
lea    0xdcd(%rip),%rdi
mov    %eax,%esi
call   1060 <printf@plt>
xor    %eax,%eax
call   10e0 <testLdxImmediate@plt>
lea    0xdcf(%rip),%rdi
mov    %eax,%esi
call   1060 <printf@plt>
xor    %eax,%eax
call   1110 <testLdxZeropage@plt>
lea    0xdd1(%rip),%rdi
mov    %eax,%esi
call   1060 <printf@plt>
xor    %eax,%eax
call   1140 <testLdxZeropageY@plt>
lea    0xdd2(%rip),%rdi
mov    %eax,%esi
call   1060 <printf@plt>
xor    %eax,%eax
call   1030 <testLdxAbsolute@plt>
lea    0xdd4(%rip),%rdi
mov    %eax,%esi
call   1060 <printf@plt>
xor    %eax,%eax
call   1130 <testLdxAbsoluteY@plt>
lea    0xdd5(%rip),%rdi
mov    %eax,%esi
call   1060 <printf@plt>
xor    %eax,%eax
call   10a0 <testLdyImmediate@plt>
lea    0xdd7(%rip),%rdi
mov    %eax,%esi
call   1060 <printf@plt>
xor    %eax,%eax
call   1070 <testLdyZeropage@plt>
lea    0xdd9(%rip),%rdi
mov    %eax,%esi
call   1060 <printf@plt>
xor    %eax,%eax
call   1050 <testLdyZeropageX@plt>
lea    0xdda(%rip),%rdi
mov    %eax,%esi
call   1060 <printf@plt>
xor    %eax,%eax
call   1090 <testLdyAbsolute@plt>
lea    0xddc(%rip),%rdi
mov    %eax,%esi
call   1060 <printf@plt>
xor    %eax,%eax
call   10d0 <testLdyAbsoluteX@plt>
lea    0xddd(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1060 <printf@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"testLdaImmediate: %d\0D\0A\00"
@.str.1 = [22 x i8] c"testLdaZeropage: %d\0D\0A\00"
@.str.2 = [23 x i8] c"testLdaZeropageX: %d\0D\0A\00"
@.str.3 = [22 x i8] c"testLdaAbsolute: %d\0D\0A\00"
@.str.4 = [23 x i8] c"testLdaAbsoluteX: %d\0D\0A\00"
@.str.5 = [23 x i8] c"testLdaAbsoluteY: %d\0D\0A\00"
@.str.6 = [23 x i8] c"testLdaIndirectX: %d\0D\0A\00"
@.str.7 = [23 x i8] c"testLdaIndirectY: %d\0D\0A\00"
@.str.8 = [23 x i8] c"testLdxImmediate: %d\0D\0A\00"
@.str.9 = [22 x i8] c"testLdxZeropage: %d\0D\0A\00"
@.str.10 = [23 x i8] c"testLdxZeropageY: %d\0D\0A\00"
@.str.11 = [22 x i8] c"testLdxAbsolute: %d\0D\0A\00"
@.str.12 = [23 x i8] c"testLdxAbsoluteY: %d\0D\0A\00"
@.str.13 = [23 x i8] c"testLdyImmediate: %d\0D\0A\00"
@.str.14 = [22 x i8] c"testLdyZeropage: %d\0D\0A\00"
@.str.15 = [23 x i8] c"testLdyZeropageX: %d\0D\0A\00"
@.str.16 = [22 x i8] c"testLdyAbsolute: %d\0D\0A\00"
@.str.17 = [23 x i8] c"testLdyAbsoluteX: %d\0D\0A\00"
define void @testLoads() {
%1 = call i32 (...) @testLdaImmediate()
%2 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = call i32 (...) @testLdaZeropage()
%4 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = call i32 (...) @testLdaZeropageX()
%6 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = call i32 (...) @testLdaAbsolute()
%8 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 %7)
%9 = call i32 (...) @testLdaAbsoluteX()
%10 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0), i32 %9)
%11 = call i32 (...) @testLdaAbsoluteY()
%12 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i32 %11)
%13 = call i32 (...) @testJmpAbsolute()
%14 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 %13)
%15 = call i32 (...) @testLdaIndirectY()
%16 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0), i32 %15)
%17 = call i32 (...) @testLdxImmediate()
%18 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), i32 %17)
%19 = call i32 (...) @testLdxZeropage()
%20 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.9, i64 0, i64 0), i32 %19)
%21 = call i32 (...) @testLdxZeropageY()
%22 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.10, i64 0, i64 0), i32 %21)
%23 = call i32 (...) @testLdxAbsolute()
%24 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.11, i64 0, i64 0), i32 %23)
%25 = call i32 (...) @testLdxAbsoluteY()
%26 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.12, i64 0, i64 0), i32 %25)
%27 = call i32 (...) @testLdyImmediate()
%28 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.13, i64 0, i64 0), i32 %27)
%29 = call i32 (...) @testLdyZeropage()
%30 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.14, i64 0, i64 0), i32 %29)
%31 = call i32 (...) @testLdyZeropageX()
%32 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.15, i64 0, i64 0), i32 %31)
%33 = call i32 (...) @testLdyAbsolute()
%34 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.16, i64 0, i64 0), i32 %33)
%35 = call i32 (...) @testLdyAbsoluteX()
%36 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.17, i64 0, i64 0), i32 %35)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"testLdaImmediate: %d\0D\0A\00"
@.str.1 = [22 x i8] c"testLdaZeropage: %d\0D\0A\00"
@.str.2 = [23 x i8] c"testLdaZeropageX: %d\0D\0A\00"
@.str.3 = [22 x i8] c"testLdaAbsolute: %d\0D\0A\00"
@.str.4 = [23 x i8] c"testLdaAbsoluteX: %d\0D\0A\00"
@.str.5 = [23 x i8] c"testLdaAbsoluteY: %d\0D\0A\00"
@.str.6 = [23 x i8] c"testLdaIndirectX: %d\0D\0A\00"
@.str.7 = [23 x i8] c"testLdaIndirectY: %d\0D\0A\00"
@.str.8 = [23 x i8] c"testLdxImmediate: %d\0D\0A\00"
@.str.9 = [22 x i8] c"testLdxZeropage: %d\0D\0A\00"
@.str.10 = [23 x i8] c"testLdxZeropageY: %d\0D\0A\00"
@.str.11 = [22 x i8] c"testLdxAbsolute: %d\0D\0A\00"
@.str.12 = [23 x i8] c"testLdxAbsoluteY: %d\0D\0A\00"
@.str.13 = [23 x i8] c"testLdyImmediate: %d\0D\0A\00"
@.str.14 = [22 x i8] c"testLdyZeropage: %d\0D\0A\00"
@.str.15 = [23 x i8] c"testLdyZeropageX: %d\0D\0A\00"
@.str.16 = [22 x i8] c"testLdyAbsolute: %d\0D\0A\00"
@.str.17 = [23 x i8] c"testLdyAbsoluteX: %d\0D\0A\00"
define void @testLoads() {
%1 = tail call i32 (...) @testLdaImmediate()
%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 (...) @testLdaZeropage()
%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 (...) @testLdaZeropageX()
%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 (...) @testLdaAbsolute()
%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 (...) @testLdaAbsoluteX()
%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 (...) @testLdaAbsoluteY()
%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 (...) @testJmpAbsolute()
%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 (...) @testLdaIndirectY()
%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 (...) @testLdxImmediate()
%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 (...) @testLdxZeropage()
%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 (...) @testLdxZeropageY()
%22 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.10, i64 0, i64 0), i32 %21)
%23 = tail call i32 (...) @testLdxAbsolute()
%24 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.11, i64 0, i64 0), i32 %23)
%25 = tail call i32 (...) @testLdxAbsoluteY()
%26 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.12, i64 0, i64 0), i32 %25)
%27 = tail call i32 (...) @testLdyImmediate()
%28 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.13, i64 0, i64 0), i32 %27)
%29 = tail call i32 (...) @testLdyZeropage()
%30 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.14, i64 0, i64 0), i32 %29)
%31 = tail call i32 (...) @testLdyZeropageX()
%32 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.15, i64 0, i64 0), i32 %31)
%33 = tail call i32 (...) @testLdyAbsolute()
%34 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.16, i64 0, i64 0), i32 %33)
%35 = tail call i32 (...) @testLdyAbsoluteX()
%36 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.17, i64 0, i64 0), i32 %35)
ret void
}