#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*/ initalpha();
int /*<<< orphan*/ initbeta();
int /*<<< orphan*/ initregistrator();
int /*<<< orphan*/ processline(char *);
int /*<<< orphan*/ showstats();
int main(void) {
  initregistrator();
  initalpha();
  initbeta();
  processline("[Alpha]");
  processline("A");
  processline("A");
  processline("A");
  processline("B");
  processline("C");
  processline("C");
  processline("[Beta]");
  processline("B");
  processline("B");
  processline("B");
  processline("B");
  processline("D");
  processline("E");
  showstats();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <initregistrator@plt>
mov    $0x0,%al
call   1070 <initalpha@plt>
mov    $0x0,%al
call   1060 <initbeta@plt>
lea    0xe85(%rip),%rdi
call   1040 <processline@plt>
lea    0xe81(%rip),%rdi
call   1040 <processline@plt>
lea    0xe75(%rip),%rdi
call   1040 <processline@plt>
lea    0xe69(%rip),%rdi
call   1040 <processline@plt>
lea    0xe5f(%rip),%rdi
call   1040 <processline@plt>
lea    0xe55(%rip),%rdi
call   1040 <processline@plt>
lea    0xe49(%rip),%rdi
call   1040 <processline@plt>
lea    0xe3f(%rip),%rdi
call   1040 <processline@plt>
lea    0xe2f(%rip),%rdi
call   1040 <processline@plt>
lea    0xe23(%rip),%rdi
call   1040 <processline@plt>
lea    0xe17(%rip),%rdi
call   1040 <processline@plt>
lea    0xe0b(%rip),%rdi
call   1040 <processline@plt>
lea    0xe0a(%rip),%rdi
call   1040 <processline@plt>
lea    0xe00(%rip),%rdi
call   1040 <processline@plt>
mov    $0x0,%al
call   1030 <showstats@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1050 <initregistrator@plt>
xor    %eax,%eax
call   1070 <initalpha@plt>
xor    %eax,%eax
call   1060 <initbeta@plt>
lea    0xe90(%rip),%rdi
call   1040 <processline@plt>
lea    0xe8c(%rip),%rbx
mov    %rbx,%rdi
call   1040 <processline@plt>
mov    %rbx,%rdi
call   1040 <processline@plt>
mov    %rbx,%rdi
call   1040 <processline@plt>
lea    0xe6f(%rip),%rbx
mov    %rbx,%rdi
call   1040 <processline@plt>
lea    0xe62(%rip),%r14
mov    %r14,%rdi
call   1040 <processline@plt>
mov    %r14,%rdi
call   1040 <processline@plt>
lea    0xe4d(%rip),%rdi
call   1040 <processline@plt>
mov    %rbx,%rdi
call   1040 <processline@plt>
mov    %rbx,%rdi
call   1040 <processline@plt>
mov    %rbx,%rdi
call   1040 <processline@plt>
mov    %rbx,%rdi
call   1040 <processline@plt>
lea    0xe28(%rip),%rdi
call   1040 <processline@plt>
lea    0xe1e(%rip),%rdi
call   1040 <processline@plt>
xor    %eax,%eax
call   1030 <showstats@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [8 x i8] c"[Alpha]\00"
@.str.1 = [2 x i8] c"A\00"
@.str.2 = [2 x i8] c"B\00"
@.str.3 = [2 x i8] c"C\00"
@.str.4 = [7 x i8] c"[Beta]\00"
@.str.5 = [2 x i8] c"D\00"
@.str.6 = [2 x i8] c"E\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @initregistrator()
%3 = call i32 (...) @initalpha()
%4 = call i32 (...) @initbeta()
%5 = call i32 @processline(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @processline(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @processline(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @processline(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @processline(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @processline(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%11 = call i32 @processline(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%12 = call i32 @processline(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%13 = call i32 @processline(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%14 = call i32 @processline(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%15 = call i32 @processline(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%16 = call i32 @processline(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%17 = call i32 @processline(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%18 = call i32 @processline(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%19 = call i32 (...) @showstats()
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"[Alpha]\00"
@.str.1 = [2 x i8] c"A\00"
@.str.2 = [2 x i8] c"B\00"
@.str.3 = [2 x i8] c"C\00"
@.str.4 = [7 x i8] c"[Beta]\00"
@.str.5 = [2 x i8] c"D\00"
@.str.6 = [2 x i8] c"E\00"
define i32 @main() {
%1 = tail call i32 (...) @initregistrator()
%2 = tail call i32 (...) @initalpha()
%3 = tail call i32 (...) @initbeta()
%4 = tail call i32 @processline(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @processline(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @processline(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @processline(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%8 = tail call i32 @processline(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%9 = tail call i32 @processline(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%10 = tail call i32 @processline(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%11 = tail call i32 @processline(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%12 = tail call i32 @processline(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%13 = tail call i32 @processline(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%14 = tail call i32 @processline(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%15 = tail call i32 @processline(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%16 = tail call i32 @processline(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%17 = tail call i32 @processline(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%18 = tail call i32 (...) @showstats()
ret i32 0
}