#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 testAndAbsolute();
int testAndAbsoluteX();
int testAndAbsoluteY();
int testAndImmediate();
int testAndIndirectX();
int testAndIndirectY();
int testAndZeropage();
int testAndZeropageX();
void testAnd() {
  printf("testAndImmediate: %d\r\n", testAndImmediate());
  printf("testAndZeropage: %d\r\n", testAndZeropage());
  printf("testAndZeropageX: %d\r\n", testAndZeropageX());
  printf("testAndAbsolute: %d\r\n", testAndAbsolute());
  printf("testAndAbsoluteX: %d\r\n", testAndAbsoluteX());
  printf("testAndAbsoluteY: %d\r\n", testAndAbsoluteY());
  printf("testAndIndirectX: %d\r\n", testAndIndirectX());
  printf("testAndIndirectY: %d\r\n", testAndIndirectY());
}


x86 assembly (clang, -O0):
<testAnd>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   10a0 <testAndImmediate@plt>
mov    %eax,%esi
lea    0xe5c(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1030 <testAndZeropage@plt>
mov    %eax,%esi
lea    0xe5e(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1040 <testAndZeropageX@plt>
mov    %eax,%esi
lea    0xe5f(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1080 <testAndAbsolute@plt>
mov    %eax,%esi
lea    0xe61(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   10b0 <testAndAbsoluteX@plt>
mov    %eax,%esi
lea    0xe62(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1070 <testAndAbsoluteY@plt>
mov    %eax,%esi
lea    0xe64(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1060 <testAndIndirectX@plt>
mov    %eax,%esi
lea    0xe66(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1090 <testAndIndirectY@plt>
mov    %eax,%esi
lea    0xe68(%rip),%rdi
call   1050 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testAnd>:
push   %rax
xor    %eax,%eax
call   10a0 <testAndImmediate@plt>
lea    0xe61(%rip),%rdi
mov    %eax,%esi
call   1050 <printf@plt>
xor    %eax,%eax
call   1030 <testAndZeropage@plt>
lea    0xe63(%rip),%rdi
mov    %eax,%esi
call   1050 <printf@plt>
xor    %eax,%eax
call   1040 <testAndZeropageX@plt>
lea    0xe64(%rip),%rdi
mov    %eax,%esi
call   1050 <printf@plt>
xor    %eax,%eax
call   1080 <testAndAbsolute@plt>
lea    0xe66(%rip),%rdi
mov    %eax,%esi
call   1050 <printf@plt>
xor    %eax,%eax
call   10b0 <testAndAbsoluteX@plt>
lea    0xe67(%rip),%rdi
mov    %eax,%esi
call   1050 <printf@plt>
xor    %eax,%eax
call   1070 <testAndAbsoluteY@plt>
lea    0xe69(%rip),%rdi
mov    %eax,%esi
call   1050 <printf@plt>
xor    %eax,%eax
call   1060 <testAndIndirectX@plt>
lea    0xe6b(%rip),%rdi
mov    %eax,%esi
call   1050 <printf@plt>
xor    %eax,%eax
call   1090 <testAndIndirectY@plt>
lea    0xe6d(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1050 <printf@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"testAndImmediate: %d\0D\0A\00"
@.str.1 = [22 x i8] c"testAndZeropage: %d\0D\0A\00"
@.str.2 = [23 x i8] c"testAndZeropageX: %d\0D\0A\00"
@.str.3 = [22 x i8] c"testAndAbsolute: %d\0D\0A\00"
@.str.4 = [23 x i8] c"testAndAbsoluteX: %d\0D\0A\00"
@.str.5 = [23 x i8] c"testAndAbsoluteY: %d\0D\0A\00"
@.str.6 = [23 x i8] c"testAndIndirectX: %d\0D\0A\00"
@.str.7 = [23 x i8] c"testAndIndirectY: %d\0D\0A\00"
define void @testAnd() {
%1 = call i32 (...) @testAndImmediate()
%2 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = call i32 (...) @testAndZeropage()
%4 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = call i32 (...) @testAndZeropageX()
%6 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = call i32 (...) @testAndAbsolute()
%8 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 %7)
%9 = call i32 (...) @testAndAbsoluteX()
%10 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0), i32 %9)
%11 = call i32 (...) @testAndAbsoluteY()
%12 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i32 %11)
%13 = call i32 (...) @testAndIndirectX()
%14 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 %13)
%15 = call i32 (...) @testAndIndirectY()
%16 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0), i32 %15)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"testAndImmediate: %d\0D\0A\00"
@.str.1 = [22 x i8] c"testAndZeropage: %d\0D\0A\00"
@.str.2 = [23 x i8] c"testAndZeropageX: %d\0D\0A\00"
@.str.3 = [22 x i8] c"testAndAbsolute: %d\0D\0A\00"
@.str.4 = [23 x i8] c"testAndAbsoluteX: %d\0D\0A\00"
@.str.5 = [23 x i8] c"testAndAbsoluteY: %d\0D\0A\00"
@.str.6 = [23 x i8] c"testAndIndirectX: %d\0D\0A\00"
@.str.7 = [23 x i8] c"testAndIndirectY: %d\0D\0A\00"
define void @testAnd() {
%1 = tail call i32 (...) @testAndImmediate()
%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 (...) @testAndZeropage()
%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 (...) @testAndZeropageX()
%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 (...) @testAndAbsolute()
%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 (...) @testAndAbsoluteX()
%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 (...) @testAndAbsoluteY()
%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 (...) @testAndIndirectX()
%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 (...) @testAndIndirectY()
%16 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0), i32 %15)
ret void
}