#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*/ puts(char *);
int /*<<< orphan*/ test_arithmetic();
int /*<<< orphan*/ test_array();
int /*<<< orphan*/ test_bit_field();
int /*<<< orphan*/ test_bit_operations();
int /*<<< orphan*/ test_if();
int /*<<< orphan*/ test_itoa();
int /*<<< orphan*/ test_jump();
int /*<<< orphan*/ test_struct();
int /*<<< orphan*/ test_switch();
void main() {
  extern void DUART_INIT(void);
  DUART_INIT();
  puts("WELCOME in BSVC-M68K\n");
  test_arithmetic();
  test_itoa();
  test_array();
  test_switch();
  test_if();
  test_bit_operations();
  test_struct();
  test_bit_field();
  test_jump();
  puts("--- ALL TESTS OK\n");
  while (1)
    ;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
call   1050 <DUART_INIT@plt>
lea    0xe40(%rip),%rdi
call   1040 <puts@plt>
mov    $0x0,%al
call   1030 <test_arithmetic@plt>
mov    $0x0,%al
call   1090 <test_itoa@plt>
mov    $0x0,%al
call   10b0 <test_array@plt>
mov    $0x0,%al
call   10d0 <test_switch@plt>
mov    $0x0,%al
call   1070 <test_if@plt>
mov    $0x0,%al
call   1080 <test_bit_operations@plt>
mov    $0x0,%al
call   1060 <test_struct@plt>
mov    $0x0,%al
call   10a0 <test_bit_field@plt>
mov    $0x0,%al
call   10c0 <test_jump@plt>
lea    0xe0b(%rip),%rdi
call   1040 <puts@plt>
jmp    1210 <main+0x60>

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1050 <DUART_INIT@plt>
lea    0xe43(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1030 <test_arithmetic@plt>
xor    %eax,%eax
call   1090 <test_itoa@plt>
xor    %eax,%eax
call   10b0 <test_array@plt>
xor    %eax,%eax
call   10d0 <test_switch@plt>
xor    %eax,%eax
call   1070 <test_if@plt>
xor    %eax,%eax
call   1080 <test_bit_operations@plt>
xor    %eax,%eax
call   1060 <test_struct@plt>
xor    %eax,%eax
call   10a0 <test_bit_field@plt>
xor    %eax,%eax
call   10c0 <test_jump@plt>
lea    0xe0e(%rip),%rdi
call   1040 <puts@plt>
nopl   (%rax)
jmp    1210 <main+0x60>

LLVM IR (-O0):
@.str = [22 x i8] c"WELCOME in BSVC-M68K\0A\00"
@.str.1 = [18 x i8] c"--- ALL TESTS OK\0A\00"
define void @main() {
%1 = call i32 @puts(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @test_arithmetic()
%3 = call i32 (...) @test_itoa()
%4 = call i32 (...) @test_array()
%5 = call i32 (...) @test_switch()
%6 = call i32 (...) @test_if()
%7 = call i32 (...) @test_bit_operations()
%8 = call i32 (...) @test_struct()
%9 = call i32 (...) @test_bit_field()
%10 = call i32 (...) @test_jump()
%11 = call i32 @puts(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
br label %12
12: ; preds = %0, %12
br label %12
}

LLVM IR (-O2):
@.str = [22 x i8] c"WELCOME in BSVC-M68K\0A\00"
@.str.1 = [18 x i8] c"--- ALL TESTS OK\0A\00"
define void @main() {
tail call void @DUART_INIT()
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @test_arithmetic()
%3 = tail call i32 (...) @test_itoa()
%4 = tail call i32 (...) @test_array()
%5 = tail call i32 (...) @test_switch()
%6 = tail call i32 (...) @test_if()
%7 = tail call i32 (...) @test_bit_operations()
%8 = tail call i32 (...) @test_struct()
%9 = tail call i32 (...) @test_bit_field()
%10 = tail call i32 (...) @test_jump()
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
br label %12
12: ; preds = %0, %12
br label %12
}