#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 */
char COLOR_PAIR(int);
int /*<<< orphan*/ addch(char);
int /*<<< orphan*/ erase();
int /*<<< orphan*/ getch();
int /*<<< orphan*/ mvprintw(int, int, char *);
int /*<<< orphan*/ printw(char *);
void intro() {
  erase();
  mvprintw(4, 24, "  DICTATOR                      ");
  mvprintw(6, 24, "  Remake of old SPECTRUM Game   ");
  mvprintw(8, 24, "  Devised and Written by        ");
  mvprintw(10, 24, "  Don PRIESTLEY                 ");
  mvprintw(14, 24, "  Copyright  ");
  addch('D');
  addch('k' | COLOR_PAIR(60));
  addch('T');
  addch('R' | COLOR_PAIR(40));
  addch('O' | COLOR_PAIR(50));
  addch('N' | COLOR_PAIR(40));
  addch('I' | COLOR_PAIR(50));
  addch('C' | COLOR_PAIR(40));
  addch('S' | COLOR_PAIR(50));
  printw("  1983");
  mvprintw(16, 24, "  Rewritten in C by #kstn (2015)");
  mvprintw(18, 24, "  Press any key to play         ");
  mvprintw(20, 24, "  Or Ctrl-C to exit             ");
  getch();
}


x86 assembly (clang, -O0):
<intro>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <erase@plt>
mov    $0x4,%edi
mov    $0x18,%esi
lea    0xe84(%rip),%rdx
call   1080 <mvprintw@plt>
mov    $0x6,%edi
mov    $0x18,%esi
lea    0xe8f(%rip),%rdx
call   1080 <mvprintw@plt>
mov    $0x8,%edi
mov    $0x18,%esi
lea    0xe9a(%rip),%rdx
call   1080 <mvprintw@plt>
mov    $0xa,%edi
mov    $0x18,%esi
lea    0xea5(%rip),%rdx
call   1080 <mvprintw@plt>
mov    $0xe,%edi
mov    $0x18,%esi
lea    0xeb0(%rip),%rdx
call   1080 <mvprintw@plt>
mov    $0x44,%edi
call   1060 <addch@plt>
mov    $0x3c,%edi
call   1050 <COLOR_PAIR@plt>
movsbl %al,%eax
or     $0x6b,%eax
movsbl %al,%edi
call   1060 <addch@plt>
mov    $0x54,%edi
call   1060 <addch@plt>
mov    $0x28,%edi
call   1050 <COLOR_PAIR@plt>
movsbl %al,%eax
or     $0x52,%eax
movsbl %al,%edi
call   1060 <addch@plt>
mov    $0x32,%edi
call   1050 <COLOR_PAIR@plt>
movsbl %al,%eax
or     $0x4f,%eax
movsbl %al,%edi
call   1060 <addch@plt>
mov    $0x28,%edi
call   1050 <COLOR_PAIR@plt>
movsbl %al,%eax
or     $0x4e,%eax
movsbl %al,%edi
call   1060 <addch@plt>
mov    $0x32,%edi
call   1050 <COLOR_PAIR@plt>
movsbl %al,%eax
or     $0x49,%eax
movsbl %al,%edi
call   1060 <addch@plt>
mov    $0x28,%edi
call   1050 <COLOR_PAIR@plt>
movsbl %al,%eax
or     $0x43,%eax
movsbl %al,%edi
call   1060 <addch@plt>
mov    $0x32,%edi
call   1050 <COLOR_PAIR@plt>
movsbl %al,%eax
or     $0x53,%eax
movsbl %al,%edi
call   1060 <addch@plt>
lea    0xdf6(%rip),%rdi
call   1040 <printw@plt>
mov    $0x10,%edi
mov    $0x18,%esi
lea    0xde7(%rip),%rdx
call   1080 <mvprintw@plt>
mov    $0x12,%edi
mov    $0x18,%esi
lea    0xdf2(%rip),%rdx
call   1080 <mvprintw@plt>
mov    $0x14,%edi
mov    $0x18,%esi
lea    0xdfd(%rip),%rdx
call   1080 <mvprintw@plt>
mov    $0x0,%al
call   1070 <getch@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<intro>:
push   %rax
xor    %eax,%eax
call   1030 <erase@plt>
lea    0xe91(%rip),%rdx
mov    $0x4,%edi
mov    $0x18,%esi
call   1080 <mvprintw@plt>
lea    0xe9c(%rip),%rdx
mov    $0x6,%edi
mov    $0x18,%esi
call   1080 <mvprintw@plt>
lea    0xea7(%rip),%rdx
mov    $0x8,%edi
mov    $0x18,%esi
call   1080 <mvprintw@plt>
lea    0xeb2(%rip),%rdx
mov    $0xa,%edi
mov    $0x18,%esi
call   1080 <mvprintw@plt>
lea    0xebd(%rip),%rdx
mov    $0xe,%edi
mov    $0x18,%esi
call   1080 <mvprintw@plt>
mov    $0x44,%edi
call   1060 <addch@plt>
mov    $0x3c,%edi
call   1050 <COLOR_PAIR@plt>
or     $0x6b,%al
movsbl %al,%edi
call   1060 <addch@plt>
mov    $0x54,%edi
call   1060 <addch@plt>
mov    $0x28,%edi
call   1050 <COLOR_PAIR@plt>
or     $0x52,%al
movsbl %al,%edi
call   1060 <addch@plt>
mov    $0x32,%edi
call   1050 <COLOR_PAIR@plt>
or     $0x4f,%al
movsbl %al,%edi
call   1060 <addch@plt>
mov    $0x28,%edi
call   1050 <COLOR_PAIR@plt>
or     $0x4e,%al
movsbl %al,%edi
call   1060 <addch@plt>
mov    $0x32,%edi
call   1050 <COLOR_PAIR@plt>
or     $0x49,%al
movsbl %al,%edi
call   1060 <addch@plt>
mov    $0x28,%edi
call   1050 <COLOR_PAIR@plt>
or     $0x43,%al
movsbl %al,%edi
call   1060 <addch@plt>
mov    $0x32,%edi
call   1050 <COLOR_PAIR@plt>
or     $0x53,%al
movsbl %al,%edi
call   1060 <addch@plt>
lea    0xe15(%rip),%rdi
call   1040 <printw@plt>
lea    0xe10(%rip),%rdx
mov    $0x10,%edi
mov    $0x18,%esi
call   1080 <mvprintw@plt>
lea    0xe1b(%rip),%rdx
mov    $0x12,%edi
mov    $0x18,%esi
call   1080 <mvprintw@plt>
lea    0xe26(%rip),%rdx
mov    $0x14,%edi
mov    $0x18,%esi
call   1080 <mvprintw@plt>
xor    %eax,%eax
pop    %rcx
jmp    1070 <getch@plt>

LLVM IR (-O0):
@.str = [33 x i8] c" DICTATOR \00"
@.str.1 = [33 x i8] c" Remake of old SPECTRUM Game \00"
@.str.2 = [33 x i8] c" Devised and Written by \00"
@.str.3 = [33 x i8] c" Don PRIESTLEY \00"
@.str.4 = [14 x i8] c" Copyright \00"
@.str.5 = [7 x i8] c" 1983\00"
@.str.6 = [33 x i8] c" Rewritten in C by #kstn (2015)\00"
@.str.7 = [33 x i8] c" Press any key to play \00"
@.str.8 = [33 x i8] c" Or Ctrl-C to exit \00"
define void @intro() {
%1 = call i32 (...) @erase()
%2 = call i32 @mvprintw(i32 4, i32 24, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @mvprintw(i32 6, i32 24, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @mvprintw(i32 8, i32 24, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @mvprintw(i32 10, i32 24, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0))
%6 = call i32 @mvprintw(i32 14, i32 24, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0))
%7 = call i32 @addch(i8 signext 68)
%8 = call signext i8 @COLOR_PAIR(i32 60)
%9 = sext i8 %8 to i32
%10 = or i32 107, %9
%11 = trunc i32 %10 to i8
%12 = call i32 @addch(i8 signext %11)
%13 = call i32 @addch(i8 signext 84)
%14 = call signext i8 @COLOR_PAIR(i32 40)
%15 = sext i8 %14 to i32
%16 = or i32 82, %15
%17 = trunc i32 %16 to i8
%18 = call i32 @addch(i8 signext %17)
%19 = call signext i8 @COLOR_PAIR(i32 50)
%20 = sext i8 %19 to i32
%21 = or i32 79, %20
%22 = trunc i32 %21 to i8
%23 = call i32 @addch(i8 signext %22)
%24 = call signext i8 @COLOR_PAIR(i32 40)
%25 = sext i8 %24 to i32
%26 = or i32 78, %25
%27 = trunc i32 %26 to i8
%28 = call i32 @addch(i8 signext %27)
%29 = call signext i8 @COLOR_PAIR(i32 50)
%30 = sext i8 %29 to i32
%31 = or i32 73, %30
%32 = trunc i32 %31 to i8
%33 = call i32 @addch(i8 signext %32)
%34 = call signext i8 @COLOR_PAIR(i32 40)
%35 = sext i8 %34 to i32
%36 = or i32 67, %35
%37 = trunc i32 %36 to i8
%38 = call i32 @addch(i8 signext %37)
%39 = call signext i8 @COLOR_PAIR(i32 50)
%40 = sext i8 %39 to i32
%41 = or i32 83, %40
%42 = trunc i32 %41 to i8
%43 = call i32 @addch(i8 signext %42)
%44 = call i32 @printw(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%45 = call i32 @mvprintw(i32 16, i32 24, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0))
%46 = call i32 @mvprintw(i32 18, i32 24, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.7, i64 0, i64 0))
%47 = call i32 @mvprintw(i32 20, i32 24, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.8, i64 0, i64 0))
%48 = call i32 (...) @getch()
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c" DICTATOR \00"
@.str.1 = [33 x i8] c" Remake of old SPECTRUM Game \00"
@.str.2 = [33 x i8] c" Devised and Written by \00"
@.str.3 = [33 x i8] c" Don PRIESTLEY \00"
@.str.4 = [14 x i8] c" Copyright \00"
@.str.5 = [7 x i8] c" 1983\00"
@.str.6 = [33 x i8] c" Rewritten in C by #kstn (2015)\00"
@.str.7 = [33 x i8] c" Press any key to play \00"
@.str.8 = [33 x i8] c" Or Ctrl-C to exit \00"
define void @intro() {
%1 = tail call i32 (...) @erase()
%2 = tail call i32 @mvprintw(i32 4, i32 24, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @mvprintw(i32 6, i32 24, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @mvprintw(i32 8, i32 24, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @mvprintw(i32 10, i32 24, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0))
%6 = tail call i32 @mvprintw(i32 14, i32 24, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0))
%7 = tail call i32 @addch(i8 signext 68)
%8 = tail call signext i8 @COLOR_PAIR(i32 60)
%9 = or i8 %8, 107
%10 = tail call i32 @addch(i8 signext %9)
%11 = tail call i32 @addch(i8 signext 84)
%12 = tail call signext i8 @COLOR_PAIR(i32 40)
%13 = or i8 %12, 82
%14 = tail call i32 @addch(i8 signext %13)
%15 = tail call signext i8 @COLOR_PAIR(i32 50)
%16 = or i8 %15, 79
%17 = tail call i32 @addch(i8 signext %16)
%18 = tail call signext i8 @COLOR_PAIR(i32 40)
%19 = or i8 %18, 78
%20 = tail call i32 @addch(i8 signext %19)
%21 = tail call signext i8 @COLOR_PAIR(i32 50)
%22 = or i8 %21, 73
%23 = tail call i32 @addch(i8 signext %22)
%24 = tail call signext i8 @COLOR_PAIR(i32 40)
%25 = or i8 %24, 67
%26 = tail call i32 @addch(i8 signext %25)
%27 = tail call signext i8 @COLOR_PAIR(i32 50)
%28 = or i8 %27, 83
%29 = tail call i32 @addch(i8 signext %28)
%30 = tail call i32 @printw(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%31 = tail call i32 @mvprintw(i32 16, i32 24, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0))
%32 = tail call i32 @mvprintw(i32 18, i32 24, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.7, i64 0, i64 0))
%33 = tail call i32 @mvprintw(i32 20, i32 24, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.8, i64 0, i64 0))
%34 = tail call i32 (...) @getch()
ret void
}