#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 testAdcAbsolute();
int testAdcAbsoluteX();
int testAdcAbsoluteY();
int testAdcImmediate();
int testAdcIndirectX();
int testAdcIndirectY();
int testAdcZeropage();
int testAdcZeropageX();
void testAdc() {
  printf("testAdcImmediate: %d\r\n", testAdcImmediate());
  printf("testAdcZeropage: %d\r\n", testAdcZeropage());
  printf("testAdcZeropageX: %d\r\n", testAdcZeropageX());
  printf("testAdcAbsolute: %d\r\n", testAdcAbsolute());
  printf("testAdcAbsoluteX: %d\r\n", testAdcAbsoluteX());
  printf("testAdcAbsoluteY: %d\r\n", testAdcAbsoluteY());
  printf("testAdcIndirectX: %d\r\n", testAdcIndirectX());
  printf("testAdcIndirectY: %d\r\n", testAdcIndirectY());
}


x86 assembly (clang, -O0):
<testAdc>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1080 <testAdcImmediate@plt>
mov    %eax,%esi
lea    0xe5c(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   10b0 <testAdcZeropage@plt>
mov    %eax,%esi
lea    0xe5e(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1040 <testAdcZeropageX@plt>
mov    %eax,%esi
lea    0xe5f(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   10a0 <testAdcAbsolute@plt>
mov    %eax,%esi
lea    0xe61(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1070 <testAdcAbsoluteX@plt>
mov    %eax,%esi
lea    0xe62(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1030 <testAdcAbsoluteY@plt>
mov    %eax,%esi
lea    0xe64(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1090 <testAdcIndirectX@plt>
mov    %eax,%esi
lea    0xe66(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1060 <testAdcIndirectY@plt>
mov    %eax,%esi
lea    0xe68(%rip),%rdi
call   1050 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testAdc>:
push   %rax
xor    %eax,%eax
call   1080 <testAdcImmediate@plt>
lea    0xe61(%rip),%rdi
mov    %eax,%esi
call   1050 <printf@plt>
xor    %eax,%eax
call   10b0 <testAdcZeropage@plt>
lea    0xe63(%rip),%rdi
mov    %eax,%esi
call   1050 <printf@plt>
xor    %eax,%eax
call   1040 <testAdcZeropageX@plt>
lea    0xe64(%rip),%rdi
mov    %eax,%esi
call   1050 <printf@plt>
xor    %eax,%eax
call   10a0 <testAdcAbsolute@plt>
lea    0xe66(%rip),%rdi
mov    %eax,%esi
call   1050 <printf@plt>
xor    %eax,%eax
call   1070 <testAdcAbsoluteX@plt>
lea    0xe67(%rip),%rdi
mov    %eax,%esi
call   1050 <printf@plt>
xor    %eax,%eax
call   1030 <testAdcAbsoluteY@plt>
lea    0xe69(%rip),%rdi
mov    %eax,%esi
call   1050 <printf@plt>
xor    %eax,%eax
call   1090 <testAdcIndirectX@plt>
lea    0xe6b(%rip),%rdi
mov    %eax,%esi
call   1050 <printf@plt>
xor    %eax,%eax
call   1060 <testAdcIndirectY@plt>
lea    0xe6d(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1050 <printf@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"testAdcImmediate: %d\0D\0A\00"
@.str.1 = [22 x i8] c"testAdcZeropage: %d\0D\0A\00"
@.str.2 = [23 x i8] c"testAdcZeropageX: %d\0D\0A\00"
@.str.3 = [22 x i8] c"testAdcAbsolute: %d\0D\0A\00"
@.str.4 = [23 x i8] c"testAdcAbsoluteX: %d\0D\0A\00"
@.str.5 = [23 x i8] c"testAdcAbsoluteY: %d\0D\0A\00"
@.str.6 = [23 x i8] c"testAdcIndirectX: %d\0D\0A\00"
@.str.7 = [23 x i8] c"testAdcIndirectY: %d\0D\0A\00"
define void @testAdc() {
%1 = call i32 (...) @testAdcImmediate()
%2 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = call i32 (...) @testAdcZeropage()
%4 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = call i32 (...) @testAdcZeropageX()
%6 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = call i32 (...) @testAdcAbsolute()
%8 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 %7)
%9 = call i32 (...) @testAdcAbsoluteX()
%10 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0), i32 %9)
%11 = call i32 (...) @testAdcAbsoluteY()
%12 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i32 %11)
%13 = call i32 (...) @testAdcIndirectX()
%14 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 %13)
%15 = call i32 (...) @testAdcIndirectY()
%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"testAdcImmediate: %d\0D\0A\00"
@.str.1 = [22 x i8] c"testAdcZeropage: %d\0D\0A\00"
@.str.2 = [23 x i8] c"testAdcZeropageX: %d\0D\0A\00"
@.str.3 = [22 x i8] c"testAdcAbsolute: %d\0D\0A\00"
@.str.4 = [23 x i8] c"testAdcAbsoluteX: %d\0D\0A\00"
@.str.5 = [23 x i8] c"testAdcAbsoluteY: %d\0D\0A\00"
@.str.6 = [23 x i8] c"testAdcIndirectX: %d\0D\0A\00"
@.str.7 = [23 x i8] c"testAdcIndirectY: %d\0D\0A\00"
define void @testAdc() {
%1 = tail call i32 (...) @testAdcImmediate()
%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 (...) @testAdcZeropage()
%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 (...) @testAdcZeropageX()
%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 (...) @testAdcAbsolute()
%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 (...) @testAdcAbsoluteX()
%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 (...) @testAdcAbsoluteY()
%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 (...) @testAdcIndirectX()
%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 (...) @testAdcIndirectY()
%16 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0), i32 %15)
ret void
}