#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*/ ACS_HLINE;
int /*<<< orphan*/ ACS_VLINE;
int /*<<< orphan*/ COLOR_PAIR(int);
int /*<<< orphan*/ attron(int /*<<< orphan*/);
int /*<<< orphan*/ box(int /*<<< orphan*/, int /*<<< orphan*/,
                       int /*<<< orphan*/);
int /*<<< orphan*/ erase();
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ mvprintw(int, int, char *, ...);
int /*<<< orphan*/ refresh();
int /*<<< orphan*/ stdscr;
void credits() {
  erase();
  refresh();
  attron(COLOR_PAIR(3));
  box(stdscr, ACS_VLINE, ACS_HLINE);
  mvprintw(0, 4, " CREDITS ");
  mvprintw(3, 5, " %s %.2f, just another clone of snake", "ZNAKE", 1.18);
  mvprintw(5, 5, " Coded by %s", "Ulven101 <ulven101@gmail.com>");
  mvprintw(6, 5, "   and distributed under GPL3 license");
  mvprintw(7, 5,
           " Feel free to contact me for infos about the code, suggestion ");
  mvprintw(8, 5, "   and bug reporting, please :D");
  refresh();
  getchar();
  erase();
  refresh();
}


x86 assembly (clang, -O0):
<credits>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <erase@plt>
mov    $0x0,%al
call   1080 <refresh@plt>
mov    $0x3,%edi
call   1070 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1040 <attron@plt>
mov    0x2e4e(%rip),%rax
mov    (%rax),%edi
mov    0x2e2d(%rip),%rax
mov    (%rax),%esi
mov    0x2e2c(%rip),%rax
mov    (%rax),%edx
call   1060 <box@plt>
xor    %edi,%edi
mov    $0x4,%esi
lea    0xe47(%rip),%rdx
mov    $0x0,%al
call   1090 <mvprintw@plt>
mov    $0x3,%edi
mov    $0x5,%esi
lea    0xe39(%rip),%rdx
lea    0xe58(%rip),%rcx
movsd  0xe18(%rip),%xmm0
mov    $0x1,%al
call   1090 <mvprintw@plt>
mov    $0x5,%esi
lea    0xe43(%rip),%rdx
lea    0xe49(%rip),%rcx
mov    %esi,%edi
mov    $0x0,%al
call   1090 <mvprintw@plt>
mov    $0x6,%edi
mov    $0x5,%esi
lea    0xe4d(%rip),%rdx
mov    $0x0,%al
call   1090 <mvprintw@plt>
mov    $0x7,%edi
mov    $0x5,%esi
lea    0xe5b(%rip),%rdx
mov    $0x0,%al
call   1090 <mvprintw@plt>
mov    $0x8,%edi
mov    $0x5,%esi
lea    0xe82(%rip),%rdx
mov    $0x0,%al
call   1090 <mvprintw@plt>
mov    $0x0,%al
call   1080 <refresh@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
mov    $0x0,%al
call   1030 <erase@plt>
mov    $0x0,%al
call   1080 <refresh@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<credits>:
push   %rax
xor    %eax,%eax
call   1030 <erase@plt>
xor    %eax,%eax
call   1080 <refresh@plt>
mov    $0x3,%edi
call   1070 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1040 <attron@plt>
mov    0x2e51(%rip),%rax
mov    (%rax),%edi
mov    0x2e30(%rip),%rax
mov    (%rax),%esi
mov    0x2e2f(%rip),%rax
mov    (%rax),%edx
call   1060 <box@plt>
lea    0xe51(%rip),%rdx
xor    %edi,%edi
mov    $0x4,%esi
xor    %eax,%eax
call   1090 <mvprintw@plt>
lea    0xe46(%rip),%rdx
lea    0xe65(%rip),%rcx
movsd  0xe25(%rip),%xmm0
mov    $0x3,%edi
mov    $0x5,%esi
mov    $0x1,%al
call   1090 <mvprintw@plt>
lea    0xe4b(%rip),%rdx
lea    0xe51(%rip),%rcx
mov    $0x5,%edi
mov    $0x5,%esi
xor    %eax,%eax
call   1090 <mvprintw@plt>
lea    0xe57(%rip),%rdx
mov    $0x6,%edi
mov    $0x5,%esi
xor    %eax,%eax
call   1090 <mvprintw@plt>
lea    0xe65(%rip),%rdx
mov    $0x7,%edi
mov    $0x5,%esi
xor    %eax,%eax
call   1090 <mvprintw@plt>
lea    0xe8c(%rip),%rdx
mov    $0x8,%edi
mov    $0x5,%esi
xor    %eax,%eax
call   1090 <mvprintw@plt>
xor    %eax,%eax
call   1080 <refresh@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %eax,%eax
call   1030 <erase@plt>
xor    %eax,%eax
pop    %rcx
jmp    1080 <refresh@plt>

LLVM IR (-O0):
@stdscr = global i32 0
@ACS_VLINE = global i32 0
@ACS_HLINE = global i32 0
@.str = [10 x i8] c" CREDITS \00"
@.str.1 = [38 x i8] c" %s %.2f, just another clone of snake\00"
@.str.2 = [6 x i8] c"ZNAKE\00"
@.str.3 = [13 x i8] c" Coded by %s\00"
@.str.4 = [30 x i8] c"Ulven101 <ulven101@gmail.com>\00"
@.str.5 = [38 x i8] c" and distributed under GPL3 license\00"
@.str.6 = [63 x i8] c" Feel free to contact me for infos about the code, suggestion \00"
@.str.7 = [32 x i8] c" and bug reporting, please :D\00"
define void @credits() {
%1 = call i32 (...) @erase()
%2 = call i32 (...) @refresh()
%3 = call i32 @COLOR_PAIR(i32 3)
%4 = call i32 @attron(i32 %3)
%5 = load i32, i32* @stdscr
%6 = load i32, i32* @ACS_VLINE
%7 = load i32, i32* @ACS_HLINE
%8 = call i32 @box(i32 %5, i32 %6, i32 %7)
%9 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 0, i32 4, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%10 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 3, i32 5, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), double 1.180000e+00)
%11 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 5, i32 5, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0))
%12 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 6, i32 5, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.5, i64 0, i64 0))
%13 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 7, i32 5, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.6, i64 0, i64 0))
%14 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 8, i32 5, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.7, i64 0, i64 0))
%15 = call i32 (...) @refresh()
%16 = call i32 (...) @getchar()
%17 = call i32 (...) @erase()
%18 = call i32 (...) @refresh()
ret void
}

LLVM IR (-O2):
@stdscr = global i32 0
@ACS_VLINE = global i32 0
@ACS_HLINE = global i32 0
@.str = [10 x i8] c" CREDITS \00"
@.str.1 = [38 x i8] c" %s %.2f, just another clone of snake\00"
@.str.2 = [6 x i8] c"ZNAKE\00"
@.str.3 = [13 x i8] c" Coded by %s\00"
@.str.4 = [30 x i8] c"Ulven101 <ulven101@gmail.com>\00"
@.str.5 = [38 x i8] c" and distributed under GPL3 license\00"
@.str.6 = [63 x i8] c" Feel free to contact me for infos about the code, suggestion \00"
@.str.7 = [32 x i8] c" and bug reporting, please :D\00"
define void @credits() {
%1 = tail call i32 (...) @erase()
%2 = tail call i32 (...) @refresh()
%3 = tail call i32 @COLOR_PAIR(i32 3)
%4 = tail call i32 @attron(i32 %3)
%5 = load i32, i32* @stdscr
%6 = load i32, i32* @ACS_VLINE
%7 = load i32, i32* @ACS_HLINE
%8 = tail call i32 @box(i32 %5, i32 %6, i32 %7)
%9 = tail call i32 (i32, i32, i8*, ...) @mvprintw(i32 0, i32 4, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%10 = tail call i32 (i32, i32, i8*, ...) @mvprintw(i32 3, i32 5, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), double 1.180000e+00)
%11 = tail call i32 (i32, i32, i8*, ...) @mvprintw(i32 5, i32 5, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0))
%12 = tail call i32 (i32, i32, i8*, ...) @mvprintw(i32 6, i32 5, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.5, i64 0, i64 0))
%13 = tail call i32 (i32, i32, i8*, ...) @mvprintw(i32 7, i32 5, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.6, i64 0, i64 0))
%14 = tail call i32 (i32, i32, i8*, ...) @mvprintw(i32 8, i32 5, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.7, i64 0, i64 0))
%15 = tail call i32 (...) @refresh()
%16 = tail call i32 (...) @getchar()
%17 = tail call i32 (...) @erase()
%18 = tail call i32 (...) @refresh()
ret void
}