#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 /*<<< orphan*/ test_init();
int /*<<< orphan*/ test_op_add_8();
int /*<<< orphan*/ test_op_and();
int /*<<< orphan*/ test_op_dec_16();
int /*<<< orphan*/ test_op_dec_8();
int /*<<< orphan*/ test_op_inc_16();
int /*<<< orphan*/ test_op_inc_8();
int /*<<< orphan*/ test_op_ld_8();
int /*<<< orphan*/ test_op_ldi();
int /*<<< orphan*/ test_op_nop();
int /*<<< orphan*/ test_op_or();
int /*<<< orphan*/ test_op_sub_8();
int /*<<< orphan*/ test_op_xor();
int /*<<< orphan*/ test_reset();
int main() {
  test_init();
  test_reset();
  test_op_inc_8();
  test_reset();
  test_op_inc_16();
  test_reset();
  test_op_dec_16();
  test_reset();
  test_op_nop();
  test_reset();
  test_op_ld_8();
  test_reset();
  test_op_ldi();
  test_reset();
  test_op_dec_8();
  test_reset();
  test_op_add_8();
  test_reset();
  test_op_sub_8();
  test_reset();
  test_op_and();
  test_reset();
  test_op_xor();
  test_reset();
  test_op_or();
  printf("All tests passed\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <test_init@plt>
mov    $0x0,%al
call   1090 <test_reset@plt>
mov    $0x0,%al
call   1050 <test_op_inc_8@plt>
mov    $0x0,%al
call   1090 <test_reset@plt>
mov    $0x0,%al
call   10d0 <test_op_inc_16@plt>
mov    $0x0,%al
call   1090 <test_reset@plt>
mov    $0x0,%al
call   10c0 <test_op_dec_16@plt>
mov    $0x0,%al
call   1090 <test_reset@plt>
mov    $0x0,%al
call   10e0 <test_op_nop@plt>
mov    $0x0,%al
call   1090 <test_reset@plt>
mov    $0x0,%al
call   1100 <test_op_ld_8@plt>
mov    $0x0,%al
call   1090 <test_reset@plt>
mov    $0x0,%al
call   1040 <test_op_ldi@plt>
mov    $0x0,%al
call   1090 <test_reset@plt>
mov    $0x0,%al
call   1080 <test_op_dec_8@plt>
mov    $0x0,%al
call   1090 <test_reset@plt>
mov    $0x0,%al
call   10f0 <test_op_add_8@plt>
mov    $0x0,%al
call   1090 <test_reset@plt>
mov    $0x0,%al
call   10a0 <test_op_sub_8@plt>
mov    $0x0,%al
call   1090 <test_reset@plt>
mov    $0x0,%al
call   1070 <test_op_and@plt>
mov    $0x0,%al
call   1090 <test_reset@plt>
mov    $0x0,%al
call   1110 <test_op_xor@plt>
mov    $0x0,%al
call   1090 <test_reset@plt>
mov    $0x0,%al
call   10b0 <test_op_or@plt>
lea    0xd4b(%rip),%rdi
call   1060 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test_init@plt>
xor    %eax,%eax
call   1090 <test_reset@plt>
xor    %eax,%eax
call   1050 <test_op_inc_8@plt>
xor    %eax,%eax
call   1090 <test_reset@plt>
xor    %eax,%eax
call   10d0 <test_op_inc_16@plt>
xor    %eax,%eax
call   1090 <test_reset@plt>
xor    %eax,%eax
call   10c0 <test_op_dec_16@plt>
xor    %eax,%eax
call   1090 <test_reset@plt>
xor    %eax,%eax
call   10e0 <test_op_nop@plt>
xor    %eax,%eax
call   1090 <test_reset@plt>
xor    %eax,%eax
call   1100 <test_op_ld_8@plt>
xor    %eax,%eax
call   1090 <test_reset@plt>
xor    %eax,%eax
call   1040 <test_op_ldi@plt>
xor    %eax,%eax
call   1090 <test_reset@plt>
xor    %eax,%eax
call   1080 <test_op_dec_8@plt>
xor    %eax,%eax
call   1090 <test_reset@plt>
xor    %eax,%eax
call   10f0 <test_op_add_8@plt>
xor    %eax,%eax
call   1090 <test_reset@plt>
xor    %eax,%eax
call   10a0 <test_op_sub_8@plt>
xor    %eax,%eax
call   1090 <test_reset@plt>
xor    %eax,%eax
call   1070 <test_op_and@plt>
xor    %eax,%eax
call   1090 <test_reset@plt>
xor    %eax,%eax
call   1110 <test_op_xor@plt>
xor    %eax,%eax
call   1090 <test_reset@plt>
xor    %eax,%eax
call   10b0 <test_op_or@plt>
lea    0xd59(%rip),%rdi
call   1060 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"All tests passed\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_init()
%3 = call i32 (...) @test_reset()
%4 = call i32 (...) @test_op_inc_8()
%5 = call i32 (...) @test_reset()
%6 = call i32 (...) @test_op_inc_16()
%7 = call i32 (...) @test_reset()
%8 = call i32 (...) @test_op_dec_16()
%9 = call i32 (...) @test_reset()
%10 = call i32 (...) @test_op_nop()
%11 = call i32 (...) @test_reset()
%12 = call i32 (...) @test_op_ld_8()
%13 = call i32 (...) @test_reset()
%14 = call i32 (...) @test_op_ldi()
%15 = call i32 (...) @test_reset()
%16 = call i32 (...) @test_op_dec_8()
%17 = call i32 (...) @test_reset()
%18 = call i32 (...) @test_op_add_8()
%19 = call i32 (...) @test_reset()
%20 = call i32 (...) @test_op_sub_8()
%21 = call i32 (...) @test_reset()
%22 = call i32 (...) @test_op_and()
%23 = call i32 (...) @test_reset()
%24 = call i32 (...) @test_op_xor()
%25 = call i32 (...) @test_reset()
%26 = call i32 (...) @test_op_or()
%27 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [17 x i8] c"All tests passed\00"
define i32 @main() {
%1 = tail call i32 (...) @test_init()
%2 = tail call i32 (...) @test_reset()
%3 = tail call i32 (...) @test_op_inc_8()
%4 = tail call i32 (...) @test_reset()
%5 = tail call i32 (...) @test_op_inc_16()
%6 = tail call i32 (...) @test_reset()
%7 = tail call i32 (...) @test_op_dec_16()
%8 = tail call i32 (...) @test_reset()
%9 = tail call i32 (...) @test_op_nop()
%10 = tail call i32 (...) @test_reset()
%11 = tail call i32 (...) @test_op_ld_8()
%12 = tail call i32 (...) @test_reset()
%13 = tail call i32 (...) @test_op_ldi()
%14 = tail call i32 (...) @test_reset()
%15 = tail call i32 (...) @test_op_dec_8()
%16 = tail call i32 (...) @test_reset()
%17 = tail call i32 (...) @test_op_add_8()
%18 = tail call i32 (...) @test_reset()
%19 = tail call i32 (...) @test_op_sub_8()
%20 = tail call i32 (...) @test_reset()
%21 = tail call i32 (...) @test_op_and()
%22 = tail call i32 (...) @test_reset()
%23 = tail call i32 (...) @test_op_xor()
%24 = tail call i32 (...) @test_reset()
%25 = tail call i32 (...) @test_op_or()
%26 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret i32 0
}