#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*/ getchar();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ term_clear();
void cmd_help() {
  term_clear();
  printf("\e[33m"
         "                                                            \n"
         "           .   .--   .                                      \n"
         "           |   |-- .-|  a lightweight line editor           \n"
         "           '-- '-- '-'                                      \n"
         "                                                            \n"
         "\e[1;37;40m"
         "                         H E L P                            \n"
         "\e[33m"
         "   c create   a append    n next line    f find forward     \n"
         "   l load     i insert    N next line*   F find backward    \n"
         "   s save     d delete    p prev line    v view all         \n"
         "   q quit     D delete*   P prev line*   V view all*        \n"
         "   h head     t tail      > go to line   ? help (this)      \n"
         "   <backspace> remove last character of current line.       \n"
         "   <return>    new line next to current line.               \n"
         "   <space>     find next.                                   \n"
         "\e[1;31m"
         "         note: '*' means it will ask you a count.           \n"
         "                                                            \n"
         "\e[1;37;40m"
         "                 C O N T R I B U T E R S                    \n"
         "\e[33m"
         "             eXerigumo Clanjor <cjxgm@126.com>              \n"
         "                                                            \n"
         "\e[m"
         "                press any key to go back...");
  getchar();
}


x86 assembly (clang, -O0):
<cmd_help>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <term_clear@plt>
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_help>:
push   %rax
xor    %eax,%eax
call   1050 <term_clear@plt>
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <getchar@plt>

LLVM IR (-O0):
@.str = [1248 x i8] c"\1B[33m \0A . .-- . \0A | |-- .-| a lightweight line editor \0A '-- '-- '-' \0A \0A\1B[1;37;40m H E L P \0A\1B[33m c create a append n next line f find forward \0A l load i insert N next line* F find backward \0A s save d delete p prev line v view all \0A q quit D delete* P prev line* V view all* \0A h head t tail > go to line ? help (this) \0A <backspace> remove last character of current line. \0A <return> new line next to current line. \0A <space> find next. \0A\1B[1;31m note: '*' means it will ask you a count. \0A \0A\1B[1;37;40m C O N T R I B U T E R S \0A\1B[33m eXerigumo Clanjor <cjxgm@126.com> \0A \0A\1B[m press any key to go back...\00"
define void @cmd_help() {
%1 = call i32 (...) @term_clear()
%2 = call i32 @printf(i8* getelementptr inbounds ([1248 x i8], [1248 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @getchar()
ret void
}

LLVM IR (-O2):
@.str = [1248 x i8] c"\1B[33m \0A . .-- . \0A | |-- .-| a lightweight line editor \0A '-- '-- '-' \0A \0A\1B[1;37;40m H E L P \0A\1B[33m c create a append n next line f find forward \0A l load i insert N next line* F find backward \0A s save d delete p prev line v view all \0A q quit D delete* P prev line* V view all* \0A h head t tail > go to line ? help (this) \0A <backspace> remove last character of current line. \0A <return> new line next to current line. \0A <space> find next. \0A\1B[1;31m note: '*' means it will ask you a count. \0A \0A\1B[1;37;40m C O N T R I B U T E R S \0A\1B[33m eXerigumo Clanjor <cjxgm@126.com> \0A \0A\1B[m press any key to go back...\00"
define void @cmd_help() {
%1 = tail call i32 (...) @term_clear()
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([1248 x i8], [1248 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @getchar()
ret void
}