#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*/ clear_screen();
int /*<<< orphan*/ drawLogo();
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *);
void viewLicense(void) {
  clear_screen();
  drawLogo();
  getchar();
  printf(
      " Copyright (c) 2015\n"
      " Khaled Mohammad <itskhaledmohammad@gmail.com> (twitter: @itskhaledmd)\n"
      " All Rights Reserved.\n"
      "\n"
      " BSD 3-Clause License\n"
      " http://www.opensource.org/licenses/BSD-3-Clause\n"
      "\n"
      " Redistribution and use in source and binary forms, with or without\n"
      " modification, are permitted provided that the following conditions "
      "are\n"
      " met:\n"
      "\n"
      " * Redistributions of source code must retain the above copyright "
      "notice,\n"
      "   this list of conditions and the following disclaimer.\n"
      " * Redistributions in binary form must reproduce the above copyright\n"
      "   notice, this list of conditions and the following disclaimer in the\n"
      "   documentation and/or other materials provided with the "
      "distribution.\n"
      " * Neither the name of (Khaled Mohammad) nor the names of its "
      "contributors\n"
      "   may be used to endorse or promote products derived from this "
      "software\n"
      "   without specific prior written permission.\n"
      "\n"
      " THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "
      "\"AS\n"
      " IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT "
      "LIMITED\n"
      " TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A\n"
      " PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n"
      " HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, "
      "INCIDENTAL,\n"
      " SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT "
      "LIMITED\n"
      " TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, "
      "OR\n"
      " PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY "
      "OF\n"
      " LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n"
      " NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n"
      " SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n");
  printf("Press enter to continue...\n");
  getchar();
}


x86 assembly (clang, -O0):
<viewLicense>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <clear_screen@plt>
mov    $0x0,%al
call   1040 <drawLogo@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
lea    0x14fc(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<viewLicense>:
push   %rax
xor    %eax,%eax
call   1060 <clear_screen@plt>
xor    %eax,%eax
call   1040 <drawLogo@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
lea    0xea3(%rip),%rdi
call   1030 <puts@plt>
lea    0x14fe(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <getchar@plt>

LLVM IR (-O0):
@.str = [1640 x i8] c" Copyright (c) 2015\0A Khaled Mohammad <itskhaledmohammad@gmail.com> (twitter: @itskhaledmd)\0A All Rights Reserved.\0A\0A BSD 3-Clause License\0A http://www.opensource.org/licenses/BSD-3-Clause\0A\0A Redistribution and use in source and binary forms, with or without\0A modification, are permitted provided that the following conditions are\0A met:\0A\0A * Redistributions of source code must retain the above copyright notice,\0A this list of conditions and the following disclaimer.\0A * Redistributions in binary form must reproduce the above copyright\0A notice, this list of conditions and the following disclaimer in the\0A documentation and/or other materials provided with the distribution.\0A * Neither the name of (Khaled Mohammad) nor the names of its contributors\0A may be used to endorse or promote products derived from this software\0A without specific prior written permission.\0A\0A THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \22AS\0A IS\22 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED\0A TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A\0A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\0A HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\0A SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED\0A TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\0A PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\0A LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\0A NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\0A SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\0A\0A\00"
@.str.1 = [28 x i8] c"Press enter to continue...\0A\00"
define void @viewLicense() {
%1 = call i32 (...) @clear_screen()
%2 = call i32 (...) @drawLogo()
%3 = call i32 (...) @getchar()
%4 = call i32 @printf(i8* getelementptr inbounds ([1640 x i8], [1640 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (...) @getchar()
ret void
}

LLVM IR (-O2):
@str = [1639 x i8] c" Copyright (c) 2015\0A Khaled Mohammad <itskhaledmohammad@gmail.com> (twitter: @itskhaledmd)\0A All Rights Reserved.\0A\0A BSD 3-Clause License\0A http://www.opensource.org/licenses/BSD-3-Clause\0A\0A Redistribution and use in source and binary forms, with or without\0A modification, are permitted provided that the following conditions are\0A met:\0A\0A * Redistributions of source code must retain the above copyright notice,\0A this list of conditions and the following disclaimer.\0A * Redistributions in binary form must reproduce the above copyright\0A notice, this list of conditions and the following disclaimer in the\0A documentation and/or other materials provided with the distribution.\0A * Neither the name of (Khaled Mohammad) nor the names of its contributors\0A may be used to endorse or promote products derived from this software\0A without specific prior written permission.\0A\0A THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \22AS\0A IS\22 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED\0A TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A\0A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\0A HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\0A SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED\0A TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\0A PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\0A LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\0A NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\0A SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\0A\00"
@str.2 = [27 x i8] c"Press enter to continue...\00"
define void @viewLicense() {
%1 = tail call i32 (...) @clear_screen()
%2 = tail call i32 (...) @drawLogo()
%3 = tail call i32 (...) @getchar()
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([1639 x i8], [1639 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.2, i64 0, i64 0))
%6 = tail call i32 (...) @getchar()
ret void
}