#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 testLsrAbsolute();
int testLsrAbsoluteX();
int testLsrImplied();
int testLsrZeropage();
int testLsrZeropageX();
void testLsr() {
  printf("testLsrImplied: %d\r\n", testLsrImplied());
  printf("testLsrZeropage: %d\r\n", testLsrZeropage());
  printf("testLdyZeropageX: %d\r\n", testLsrZeropageX());
  printf("testLsrAbsolute: %d\r\n", testLsrAbsolute());
  printf("testLsrAbsoluteX: %d\r\n", testLsrAbsoluteX());
}


x86 assembly (clang, -O0):
<testLsr>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <testLsrImplied@plt>
mov    %eax,%esi
lea    0xe8c(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1070 <testLsrZeropage@plt>
mov    %eax,%esi
lea    0xe8c(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1060 <testLsrZeropageX@plt>
mov    %eax,%esi
lea    0xe8d(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1080 <testLsrAbsolute@plt>
mov    %eax,%esi
lea    0xe8f(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <testLsrAbsoluteX@plt>
mov    %eax,%esi
lea    0xe90(%rip),%rdi
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testLsr>:
push   %rax
xor    %eax,%eax
call   1050 <testLsrImplied@plt>
lea    0xe91(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
call   1070 <testLsrZeropage@plt>
lea    0xe91(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
call   1060 <testLsrZeropageX@plt>
lea    0xe92(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
call   1080 <testLsrAbsolute@plt>
lea    0xe94(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <testLsrAbsoluteX@plt>
lea    0xe95(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"testLsrImplied: %d\0D\0A\00"
@.str.1 = [22 x i8] c"testLsrZeropage: %d\0D\0A\00"
@.str.2 = [23 x i8] c"testLdyZeropageX: %d\0D\0A\00"
@.str.3 = [22 x i8] c"testLsrAbsolute: %d\0D\0A\00"
@.str.4 = [23 x i8] c"testLsrAbsoluteX: %d\0D\0A\00"
define void @testLsr() {
%1 = call i32 (...) @testLsrImplied()
%2 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = call i32 (...) @testLsrZeropage()
%4 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = call i32 (...) @testLsrZeropageX()
%6 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = call i32 (...) @testLsrAbsolute()
%8 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 %7)
%9 = call i32 (...) @testLsrAbsoluteX()
%10 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0), i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"testLsrImplied: %d\0D\0A\00"
@.str.1 = [22 x i8] c"testLsrZeropage: %d\0D\0A\00"
@.str.2 = [23 x i8] c"testLdyZeropageX: %d\0D\0A\00"
@.str.3 = [22 x i8] c"testLsrAbsolute: %d\0D\0A\00"
@.str.4 = [23 x i8] c"testLsrAbsoluteX: %d\0D\0A\00"
define void @testLsr() {
%1 = tail call i32 (...) @testLsrImplied()
%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 (...) @testLsrZeropage()
%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 (...) @testLsrZeropageX()
%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 (...) @testLsrAbsolute()
%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 (...) @testLsrAbsoluteX()
%10 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0), i32 %9)
ret void
}