#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 testSbcAbsolute();
int testSbcAbsoluteX();
int testSbcAbsoluteY();
int testSbcImmediate();
int testSbcIndirectX();
int testSbcIndirectY();
int testSbcZeropage();
int testSbcZeropageX();
void testSbc() {
  printf("testSbcImmediate: %d\r\n", testSbcImmediate());
  printf("testSbcZeropage: %d\r\n", testSbcZeropage());
  printf("testSbcZeropageX: %d\r\n", testSbcZeropageX());
  printf("testSbcAbsolute: %d\r\n", testSbcAbsolute());
  printf("testSbcAbsoluteX: %d\r\n", testSbcAbsoluteX());
  printf("testSbcAbsoluteY: %d\r\n", testSbcAbsoluteY());
  printf("testSbcIndirectX: %d\r\n", testSbcIndirectX());
  printf("testSbcIndirectY: %d\r\n", testSbcIndirectY());
}


x86 assembly (clang, -O0):
<testSbc>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <testSbcImmediate@plt>
mov    %eax,%esi
lea    0xe5c(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1070 <testSbcZeropage@plt>
mov    %eax,%esi
lea    0xe5e(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1090 <testSbcZeropageX@plt>
mov    %eax,%esi
lea    0xe5f(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   10b0 <testSbcAbsolute@plt>
mov    %eax,%esi
lea    0xe61(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   10a0 <testSbcAbsoluteX@plt>
mov    %eax,%esi
lea    0xe62(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1060 <testSbcAbsoluteY@plt>
mov    %eax,%esi
lea    0xe64(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1080 <testSbcIndirectX@plt>
mov    %eax,%esi
lea    0xe66(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <testSbcIndirectY@plt>
mov    %eax,%esi
lea    0xe68(%rip),%rdi
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testSbc>:
push   %rax
xor    %eax,%eax
call   1050 <testSbcImmediate@plt>
lea    0xe61(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
call   1070 <testSbcZeropage@plt>
lea    0xe63(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
call   1090 <testSbcZeropageX@plt>
lea    0xe64(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
call   10b0 <testSbcAbsolute@plt>
lea    0xe66(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
call   10a0 <testSbcAbsoluteX@plt>
lea    0xe67(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
call   1060 <testSbcAbsoluteY@plt>
lea    0xe69(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
call   1080 <testSbcIndirectX@plt>
lea    0xe6b(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <testSbcIndirectY@plt>
lea    0xe6d(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"testSbcImmediate: %d\0D\0A\00"
@.str.1 = [22 x i8] c"testSbcZeropage: %d\0D\0A\00"
@.str.2 = [23 x i8] c"testSbcZeropageX: %d\0D\0A\00"
@.str.3 = [22 x i8] c"testSbcAbsolute: %d\0D\0A\00"
@.str.4 = [23 x i8] c"testSbcAbsoluteX: %d\0D\0A\00"
@.str.5 = [23 x i8] c"testSbcAbsoluteY: %d\0D\0A\00"
@.str.6 = [23 x i8] c"testSbcIndirectX: %d\0D\0A\00"
@.str.7 = [23 x i8] c"testSbcIndirectY: %d\0D\0A\00"
define void @testSbc() {
%1 = call i32 (...) @testSbcImmediate()
%2 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = call i32 (...) @testSbcZeropage()
%4 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = call i32 (...) @testSbcZeropageX()
%6 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = call i32 (...) @testSbcAbsolute()
%8 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 %7)
%9 = call i32 (...) @testSbcAbsoluteX()
%10 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0), i32 %9)
%11 = call i32 (...) @testSbcAbsoluteY()
%12 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i32 %11)
%13 = call i32 (...) @testSbcIndirectX()
%14 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 %13)
%15 = call i32 (...) @testSbcIndirectY()
%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"testSbcImmediate: %d\0D\0A\00"
@.str.1 = [22 x i8] c"testSbcZeropage: %d\0D\0A\00"
@.str.2 = [23 x i8] c"testSbcZeropageX: %d\0D\0A\00"
@.str.3 = [22 x i8] c"testSbcAbsolute: %d\0D\0A\00"
@.str.4 = [23 x i8] c"testSbcAbsoluteX: %d\0D\0A\00"
@.str.5 = [23 x i8] c"testSbcAbsoluteY: %d\0D\0A\00"
@.str.6 = [23 x i8] c"testSbcIndirectX: %d\0D\0A\00"
@.str.7 = [23 x i8] c"testSbcIndirectY: %d\0D\0A\00"
define void @testSbc() {
%1 = tail call i32 (...) @testSbcImmediate()
%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 (...) @testSbcZeropage()
%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 (...) @testSbcZeropageX()
%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 (...) @testSbcAbsolute()
%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 (...) @testSbcAbsoluteX()
%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 (...) @testSbcAbsoluteY()
%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 (...) @testSbcIndirectX()
%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 (...) @testSbcIndirectY()
%16 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0), i32 %15)
ret void
}