#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*/ pause_clear(int, int);
int /*<<< orphan*/ printf(char *);
void display_message(int message, int pause) {
  if (message == 1) {
    printf("*******************************************************************"
           "************\n");
    printf("*************************** Welcome to Math Game "
           "******************************\n");
    printf("*******************************************************************"
           "************\n\n");
  } else if (message == 2) {
    printf("Can not find resources file, returning default data.\n");
  } else if (message == 3) {
    printf("No previous autosave to load.\n");
  } else if (message == 4) {
    printf("Invalid initials.\n");
  } else if (message == 5) {
    printf("Cannot find save!\n");
  } else if (message == 6) {
    printf("No save to load.");
  } else if (message == 7) {
    printf("No scores recorded yet...\n");
  } else if (message == 8) {
    printf("New Initials Entered...");
  }
  if (pause) {
    pause_clear(1, 1);
  }
}


x86 assembly (clang, -O0):
<display_message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    1161 <display_message+0x41>
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
lea    0xf06(%rip),%rdi
call   1030 <printf@plt>
lea    0xf4b(%rip),%rdi
call   1030 <printf@plt>
jmp    123c <display_message+0x11c>
cmpl   $0x2,-0x4(%rbp)
jne    117c <display_message+0x5c>
lea    0xf82(%rip),%rdi
call   1030 <printf@plt>
jmp    1237 <display_message+0x117>
cmpl   $0x3,-0x4(%rbp)
jne    1197 <display_message+0x77>
lea    0xf9d(%rip),%rdi
call   1030 <printf@plt>
jmp    1232 <display_message+0x112>
cmpl   $0x4,-0x4(%rbp)
jne    11b2 <display_message+0x92>
lea    0xfa1(%rip),%rdi
call   1030 <printf@plt>
jmp    122d <display_message+0x10d>
cmpl   $0x5,-0x4(%rbp)
jne    11cd <display_message+0xad>
lea    0xf99(%rip),%rdi
call   1030 <printf@plt>
jmp    1228 <display_message+0x108>
cmpl   $0x6,-0x4(%rbp)
jne    11e8 <display_message+0xc8>
lea    0xf91(%rip),%rdi
call   1030 <printf@plt>
jmp    1223 <display_message+0x103>
cmpl   $0x7,-0x4(%rbp)
jne    1203 <display_message+0xe3>
lea    0xf87(%rip),%rdi
call   1030 <printf@plt>
jmp    121e <display_message+0xfe>
cmpl   $0x8,-0x4(%rbp)
jne    1219 <display_message+0xf9>
lea    0xf87(%rip),%rdi
call   1030 <printf@plt>
jmp    121e <display_message+0xfe>
jmp    1223 <display_message+0x103>
jmp    1228 <display_message+0x108>
jmp    122d <display_message+0x10d>
jmp    1232 <display_message+0x112>
jmp    1237 <display_message+0x117>
jmp    123c <display_message+0x11c>
cmpl   $0x0,-0x8(%rbp)
je     1252 <display_message+0x132>
mov    $0x1,%esi
mov    %esi,%edi
call   1040 <pause_clear@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<display_message>:
push   %rbx
mov    %esi,%ebx
add    $0xffffffff,%edi
cmp    $0x7,%edi
ja     11ae <display_message+0x7e>
lea    0xebe(%rip),%rax
movslq (%rax,%rdi,4),%rcx
add    %rax,%rcx
jmp    *%rcx
lea    0xf88(%rip),%rdi
call   1030 <puts@plt>
lea    0xfcc(%rip),%rdi
call   1030 <puts@plt>
lea    0x1010(%rip),%rdi
jmp    118e <display_message+0x5e>
lea    0xf32(%rip),%rdi
jmp    118e <display_message+0x5e>
lea    0xf0b(%rip),%rdi
jmp    118e <display_message+0x5e>
lea    0xef0(%rip),%rdi
jmp    118e <display_message+0x5e>
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
test   %ebx,%ebx
jne    11b2 <display_message+0x82>
pop    %rbx
ret
lea    0xe80(%rip),%rdi
jmp    11c9 <display_message+0x99>
lea    0xea0(%rip),%rdi
call   1030 <puts@plt>
test   %ebx,%ebx
je     1197 <display_message+0x67>
mov    $0x1,%edi
mov    $0x1,%esi
pop    %rbx
jmp    1050 <pause_clear@plt>
lea    0xe68(%rip),%rdi
call   1040 <printf@plt>
test   %ebx,%ebx
jne    11b2 <display_message+0x82>
jmp    1197 <display_message+0x67>

LLVM IR (-O0):
@.str = [81 x i8] c"*******************************************************************************\0A\00"
@.str.1 = [81 x i8] c"*************************** Welcome to Math Game ******************************\0A\00"
@.str.2 = [82 x i8] c"*******************************************************************************\0A\0A\00"
@.str.3 = [54 x i8] c"Can not find resources file, returning default data.\0A\00"
@.str.4 = [31 x i8] c"No previous autosave to load.\0A\00"
@.str.5 = [19 x i8] c"Invalid initials.\0A\00"
@.str.6 = [19 x i8] c"Cannot find save!\0A\00"
@.str.7 = [17 x i8] c"No save to load.\00"
@.str.8 = [27 x i8] c"No scores recorded yet...\0A\00"
@.str.9 = [24 x i8] c"New Initials Entered...\00"
define void @display_message(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = call i32 @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.2, i64 0, i64 0))
br label %53
11: ; preds = %2
%12 = load i32, i32* %3
%13 = icmp eq i32 %12, 2
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.3, i64 0, i64 0))
br label %52
16: ; preds = %11
%17 = load i32, i32* %3
%18 = icmp eq i32 %17, 3
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0))
br label %51
21: ; preds = %16
%22 = load i32, i32* %3
%23 = icmp eq i32 %22, 4
br i1 %23, label %24, label %26
24: ; preds = %21
%25 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0))
br label %50
26: ; preds = %21
%27 = load i32, i32* %3
%28 = icmp eq i32 %27, 5
br i1 %28, label %29, label %31
29: ; preds = %26
%30 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0))
br label %49
31: ; preds = %26
%32 = load i32, i32* %3
%33 = icmp eq i32 %32, 6
br i1 %33, label %34, label %36
34: ; preds = %31
%35 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0))
br label %48
36: ; preds = %31
%37 = load i32, i32* %3
%38 = icmp eq i32 %37, 7
br i1 %38, label %39, label %41
39: ; preds = %36
%40 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0))
br label %47
41: ; preds = %36
%42 = load i32, i32* %3
%43 = icmp eq i32 %42, 8
br i1 %43, label %44, label %46
44: ; preds = %41
%45 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0))
br label %46
46: ; preds = %44, %41
br label %47
47: ; preds = %46, %39
br label %48
48: ; preds = %47, %34
br label %49
49: ; preds = %48, %29
br label %50
50: ; preds = %49, %24
br label %51
51: ; preds = %50, %19
br label %52
52: ; preds = %51, %14
br label %53
53: ; preds = %52, %7
%54 = load i32, i32* %4
%55 = icmp ne i32 %54, 0
br i1 %55, label %56, label %58
56: ; preds = %53
%57 = call i32 @pause_clear(i32 1, i32 1)
br label %58
58: ; preds = %56, %53
ret void
}

LLVM IR (-O2):
@.str.7 = [17 x i8] c"No save to load.\00"
@.str.9 = [24 x i8] c"New Initials Entered...\00"
@str = [26 x i8] c"No scores recorded yet...\00"
@str.10 = [18 x i8] c"Cannot find save!\00"
@str.11 = [18 x i8] c"Invalid initials.\00"
@str.12 = [30 x i8] c"No previous autosave to load.\00"
@str.13 = [53 x i8] c"Can not find resources file, returning default data.\00"
@str.14 = [80 x i8] c"*******************************************************************************\00"
@str.15 = [80 x i8] c"*************************** Welcome to Math Game ******************************\00"
@str.16 = [81 x i8] c"*******************************************************************************\0A\00"
define void @display_message(i32 %0, i32 %1) {
switch i32 %0, label %21 [
i32 1, label %3
i32 2, label %7
i32 3, label %9
i32 4, label %11
i32 5, label %13
i32 6, label %15
i32 7, label %17
i32 8, label %19
]
3: ; preds = %2
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @str.14, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @str.15, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @str.16, i64 0, i64 0))
br label %21
7: ; preds = %2
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.13, i64 0, i64 0))
br label %21
9: ; preds = %2
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.12, i64 0, i64 0))
br label %21
11: ; preds = %2
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.11, i64 0, i64 0))
br label %21
13: ; preds = %2
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.10, i64 0, i64 0))
br label %21
15: ; preds = %2
%16 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0))
br label %21
17: ; preds = %2
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
br label %21
19: ; preds = %2
%20 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0))
br label %21
21: ; preds = %2, %7, %11, %15, %19, %17, %13, %9, %3
%22 = icmp eq i32 %1, 0
br i1 %22, label %25, label %23
23: ; preds = %21
%24 = tail call i32 @pause_clear(i32 1, i32 1)
br label %25
25: ; preds = %23, %21
ret void
}