#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*/ COLOR_PAIR(int);
int /*<<< orphan*/ attroff(int /*<<< orphan*/);
int /*<<< orphan*/ attron(int /*<<< orphan*/);
int get_cols();
int get_rows();
int /*<<< orphan*/ mvprintw(int, int, char *);
void draw_title() {
  attron(COLOR_PAIR(2));
  int rows = get_rows();
  int cols = get_cols();
  int toplogo = rows / 4;
  int logoleft = (cols / 2) - 32;
  mvprintw(toplogo, logoleft,
           "  _________ _______      _____   ____  __.________________.___.");
  mvprintw(
      toplogo + 1, logoleft,
      " /   _____/ \\      \\    /  _  \\ |    |/ _|\\_   _____/\\__  |   |");
  mvprintw(
      toplogo + 2, logoleft,
      " \\_____  \\  /   |   \\  /  /_\\  \\|      <   |    __)_  /   |   |");
  mvprintw(
      toplogo + 3, logoleft,
      " /        \\/    |    \\/    |    \\    |  \\  |        \\ \\____   |");
  mvprintw(
      toplogo + 4, logoleft,
      "/_______  /\\____|__  /\\____|__  /____|__ \\/_______  / / ______|");
  mvprintw(
      toplogo + 5, logoleft,
      "        \\/         \\/         \\/        \\/        \\/  \\/       ");
  attroff(COLOR_PAIR(2));
}


x86 assembly (clang, -O0):
<draw_title>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x2,%edi
call   1060 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1050 <attron@plt>
mov    $0x0,%al
call   1070 <get_rows@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <get_cols@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
sub    $0x20,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
lea    0xe47(%rip),%rdx
call   1080 <mvprintw@plt>
mov    -0xc(%rbp),%edi
add    $0x1,%edi
mov    -0x10(%rbp),%esi
lea    0xe72(%rip),%rdx
call   1080 <mvprintw@plt>
mov    -0xc(%rbp),%edi
add    $0x2,%edi
mov    -0x10(%rbp),%esi
lea    0xe9d(%rip),%rdx
call   1080 <mvprintw@plt>
mov    -0xc(%rbp),%edi
add    $0x3,%edi
mov    -0x10(%rbp),%esi
lea    0xec8(%rip),%rdx
call   1080 <mvprintw@plt>
mov    -0xc(%rbp),%edi
add    $0x4,%edi
mov    -0x10(%rbp),%esi
lea    0xef3(%rip),%rdx
call   1080 <mvprintw@plt>
mov    -0xc(%rbp),%edi
add    $0x5,%edi
mov    -0x10(%rbp),%esi
lea    0xf1e(%rip),%rdx
call   1080 <mvprintw@plt>
mov    $0x2,%edi
call   1060 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attroff@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_title>:
push   %rbp
push   %rbx
push   %rax
mov    $0x2,%edi
call   1060 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1050 <attron@plt>
xor    %eax,%eax
call   1070 <get_rows@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1040 <get_cols@plt>
lea    0x3(%rbp),%ebx
test   %ebp,%ebp
cmovns %ebp,%ebx
sar    $0x2,%ebx
mov    %eax,%ebp
shr    $0x1f,%ebp
add    %eax,%ebp
sar    %ebp
add    $0xffffffe0,%ebp
lea    0xe5e(%rip),%rdx
mov    %ebx,%edi
mov    %ebp,%esi
call   1080 <mvprintw@plt>
lea    0x1(%rbx),%edi
lea    0xe8b(%rip),%rdx
mov    %ebp,%esi
call   1080 <mvprintw@plt>
lea    0x2(%rbx),%edi
lea    0xeba(%rip),%rdx
mov    %ebp,%esi
call   1080 <mvprintw@plt>
lea    0x3(%rbx),%edi
lea    0xee9(%rip),%rdx
mov    %ebp,%esi
call   1080 <mvprintw@plt>
lea    0x4(%rbx),%edi
lea    0xf18(%rip),%rdx
mov    %ebp,%esi
call   1080 <mvprintw@plt>
add    $0x5,%ebx
lea    0xf47(%rip),%rdx
mov    %ebx,%edi
mov    %ebp,%esi
call   1080 <mvprintw@plt>
mov    $0x2,%edi
call   1060 <COLOR_PAIR@plt>
mov    %eax,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <attroff@plt>

LLVM IR (-O0):
@.str = [64 x i8] c" _________ _______ _____ ____ __.________________.___.\00"
@.str.1 = [64 x i8] c" / _____/ \\ \\ / _ \\ | |/ _|\\_ _____/\\__ | |\00"
@.str.2 = [64 x i8] c" \\_____ \\ / | \\ / /_\\ \\| < | __)_ / | |\00"
@.str.3 = [64 x i8] c" / \\/ | \\/ | \\ | \\ | \\ \\____ |\00"
@.str.4 = [64 x i8] c"/_______ /\\____|__ /\\____|__ /____|__ \\/_______ / / ______|\00"
@.str.5 = [64 x i8] c" \\/ \\/ \\/ \\/ \\/ \\/ \00"
define void @draw_title() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = call i32 @COLOR_PAIR(i32 2)
%6 = call i32 @attron(i32 %5)
%7 = call i32 (...) @get_rows()
store i32 %7, i32* %1
%8 = call i32 (...) @get_cols()
store i32 %8, i32* %2
%9 = load i32, i32* %1
%10 = sdiv i32 %9, 4
store i32 %10, i32* %3
%11 = load i32, i32* %2
%12 = sdiv i32 %11, 2
%13 = sub nsw i32 %12, 32
store i32 %13, i32* %4
%14 = load i32, i32* %3
%15 = load i32, i32* %4
%16 = call i32 @mvprintw(i32 %14, i32 %15, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0))
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 1
%19 = load i32, i32* %4
%20 = call i32 @mvprintw(i32 %18, i32 %19, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.1, i64 0, i64 0))
%21 = load i32, i32* %3
%22 = add nsw i32 %21, 2
%23 = load i32, i32* %4
%24 = call i32 @mvprintw(i32 %22, i32 %23, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.2, i64 0, i64 0))
%25 = load i32, i32* %3
%26 = add nsw i32 %25, 3
%27 = load i32, i32* %4
%28 = call i32 @mvprintw(i32 %26, i32 %27, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.3, i64 0, i64 0))
%29 = load i32, i32* %3
%30 = add nsw i32 %29, 4
%31 = load i32, i32* %4
%32 = call i32 @mvprintw(i32 %30, i32 %31, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.4, i64 0, i64 0))
%33 = load i32, i32* %3
%34 = add nsw i32 %33, 5
%35 = load i32, i32* %4
%36 = call i32 @mvprintw(i32 %34, i32 %35, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.5, i64 0, i64 0))
%37 = call i32 @COLOR_PAIR(i32 2)
%38 = call i32 @attroff(i32 %37)
ret void
}

LLVM IR (-O2):
@.str = [64 x i8] c" _________ _______ _____ ____ __.________________.___.\00"
@.str.1 = [64 x i8] c" / _____/ \\ \\ / _ \\ | |/ _|\\_ _____/\\__ | |\00"
@.str.2 = [64 x i8] c" \\_____ \\ / | \\ / /_\\ \\| < | __)_ / | |\00"
@.str.3 = [64 x i8] c" / \\/ | \\/ | \\ | \\ | \\ \\____ |\00"
@.str.4 = [64 x i8] c"/_______ /\\____|__ /\\____|__ /____|__ \\/_______ / / ______|\00"
@.str.5 = [64 x i8] c" \\/ \\/ \\/ \\/ \\/ \\/ \00"
define void @draw_title() {
%1 = tail call i32 @COLOR_PAIR(i32 2)
%2 = tail call i32 @attron(i32 %1)
%3 = tail call i32 (...) @get_rows()
%4 = tail call i32 (...) @get_cols()
%5 = sdiv i32 %3, 4
%6 = sdiv i32 %4, 2
%7 = add nsw i32 %6, -32
%8 = tail call i32 @mvprintw(i32 %5, i32 %7, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0))
%9 = add nsw i32 %5, 1
%10 = tail call i32 @mvprintw(i32 %9, i32 %7, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.1, i64 0, i64 0))
%11 = add nsw i32 %5, 2
%12 = tail call i32 @mvprintw(i32 %11, i32 %7, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.2, i64 0, i64 0))
%13 = add nsw i32 %5, 3
%14 = tail call i32 @mvprintw(i32 %13, i32 %7, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.3, i64 0, i64 0))
%15 = add nsw i32 %5, 4
%16 = tail call i32 @mvprintw(i32 %15, i32 %7, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.4, i64 0, i64 0))
%17 = add nsw i32 %5, 5
%18 = tail call i32 @mvprintw(i32 %17, i32 %7, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.5, i64 0, i64 0))
%19 = tail call i32 @COLOR_PAIR(i32 2)
%20 = tail call i32 @attroff(i32 %19)
ret void
}