#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*/ help_ascii_art();
int /*<<< orphan*/ help_print_line();
int /*<<< orphan*/ printf(char *, char *, ...);
void help_show() {
  help_ascii_art();
  help_print_line();
  printf("\n%s\n\n",
         "It's a simple cellular automaton written in C made for Computer "
         "Science\nStudies at the Warsaw University of Technology's Faculty of "
         "Electrical\nEngineering. The program uses the Moore neighborhood, "
         "can use custom rules\n(defaults the rules of John Conway'a Game of "
         "Life) and throws momentary\nstates in the form of PNG, SVG, TXT and "
         "log files for gnuplot.");
  help_print_line();
  printf("\n%s%s%s",
         "Options:\n-l FILE\tReads first state from FILE. Type 'RANDOMIZEDXxY "
         "to get'\n\ta random grid with width X and height Y.\n-n NUM\tSet NUM "
         "of cycles. Dafaults - 100.\n-r RUL\tSet RUL to simulator. Type "
         "number of neighbors when alive\n\tcell stays alive, then type '/', "
         "and type numbers of\n\tneighbors when dead cell turns\n",
         "\tinto alive one. Defaults - '23/3' (John's Conway's game of "
         "life)\n-s\tTurn ON silent mode - no unnecessary output to "
         "stdout.\n-g\tTurn ON writting states to stdout.\n-z\tTurn ON torus "
         "mode.\n-c\tTurn ON generating heat map of changes on "
         "grid.\n-h\tShows HELP (this) and exits.\n",
         "-o NUM\tSet frequency of dumping stats for gnuplot file.\n-m "
         "NUM\tSet frequency of dumping setted states.\n-u\tTurn ON generating "
         "statistic to gnuplot readable file.\n-b FILE\tRead structures to "
         "place on grid from FILE.\n-t\tTurn ON dumping states as TXT "
         "files.\n-p\tTurn ON dumping states as PNG images\n-v\tTurn ON "
         "dumping states as SVG images.\n");
}


x86 assembly (clang, -O0):
<help_show>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <help_ascii_art@plt>
mov    $0x0,%al
call   1050 <help_print_line@plt>
lea    0xeb7(%rip),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <help_print_line@plt>
lea    0x1002(%rip),%rdi
lea    0x1003(%rip),%rsi
lea    0x1132(%rip),%rdx
lea    0x1238(%rip),%rcx
mov    $0x0,%al
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<help_show>:
push   %rax
xor    %eax,%eax
call   1030 <help_ascii_art@plt>
xor    %eax,%eax
call   1050 <help_print_line@plt>
lea    0xeba(%rip),%rdi
lea    0xeb9(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <help_print_line@plt>
lea    0x1005(%rip),%rdi
lea    0x1006(%rip),%rsi
lea    0x1135(%rip),%rdx
lea    0x123b(%rip),%rcx
xor    %eax,%eax
pop    %r8
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"\0A%s\0A\0A\00"
@.str.1 = [353 x i8] c"It's a simple cellular automaton written in C made for Computer Science\0AStudies at the Warsaw University of Technology's Faculty of Electrical\0AEngineering. The program uses the Moore neighborhood, can use custom rules\0A(defaults the rules of John Conway'a Game of Life) and throws momentary\0Astates in the form of PNG, SVG, TXT and log files for gnuplot.\00"
@.str.2 = [8 x i8] c"\0A%s%s%s\00"
@.str.3 = [310 x i8] c"Options:\0A-l FILE\09Reads first state from FILE. Type 'RANDOMIZEDXxY to get'\0A\09a random grid with width X and height Y.\0A-n NUM\09Set NUM of cycles. Dafaults - 100.\0A-r RUL\09Set RUL to simulator. Type number of neighbors when alive\0A\09cell stays alive, then type '/', and type numbers of\0A\09neighbors when dead cell turns\0A\00"
@.str.4 = [269 x i8] c"\09into alive one. Defaults - '23/3' (John's Conway's game of life)\0A-s\09Turn ON silent mode - no unnecessary output to stdout.\0A-g\09Turn ON writting states to stdout.\0A-z\09Turn ON torus mode.\0A-c\09Turn ON generating heat map of changes on grid.\0A-h\09Shows HELP (this) and exits.\0A\00"
@.str.5 = [335 x i8] c"-o NUM\09Set frequency of dumping stats for gnuplot file.\0A-m NUM\09Set frequency of dumping setted states.\0A-u\09Turn ON generating statistic to gnuplot readable file.\0A-b FILE\09Read structures to place on grid from FILE.\0A-t\09Turn ON dumping states as TXT files.\0A-p\09Turn ON dumping states as PNG images\0A-v\09Turn ON dumping states as SVG images.\0A\00"
define void @help_show() {
%1 = call i32 (...) @help_ascii_art()
%2 = call i32 (...) @help_print_line()
%3 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([353 x i8], [353 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 (...) @help_print_line()
%5 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([310 x i8], [310 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([269 x i8], [269 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([335 x i8], [335 x i8]* @.str.5, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"\0A%s\0A\0A\00"
@.str.1 = [353 x i8] c"It's a simple cellular automaton written in C made for Computer Science\0AStudies at the Warsaw University of Technology's Faculty of Electrical\0AEngineering. The program uses the Moore neighborhood, can use custom rules\0A(defaults the rules of John Conway'a Game of Life) and throws momentary\0Astates in the form of PNG, SVG, TXT and log files for gnuplot.\00"
@.str.2 = [8 x i8] c"\0A%s%s%s\00"
@.str.3 = [310 x i8] c"Options:\0A-l FILE\09Reads first state from FILE. Type 'RANDOMIZEDXxY to get'\0A\09a random grid with width X and height Y.\0A-n NUM\09Set NUM of cycles. Dafaults - 100.\0A-r RUL\09Set RUL to simulator. Type number of neighbors when alive\0A\09cell stays alive, then type '/', and type numbers of\0A\09neighbors when dead cell turns\0A\00"
@.str.4 = [269 x i8] c"\09into alive one. Defaults - '23/3' (John's Conway's game of life)\0A-s\09Turn ON silent mode - no unnecessary output to stdout.\0A-g\09Turn ON writting states to stdout.\0A-z\09Turn ON torus mode.\0A-c\09Turn ON generating heat map of changes on grid.\0A-h\09Shows HELP (this) and exits.\0A\00"
@.str.5 = [335 x i8] c"-o NUM\09Set frequency of dumping stats for gnuplot file.\0A-m NUM\09Set frequency of dumping setted states.\0A-u\09Turn ON generating statistic to gnuplot readable file.\0A-b FILE\09Read structures to place on grid from FILE.\0A-t\09Turn ON dumping states as TXT files.\0A-p\09Turn ON dumping states as PNG images\0A-v\09Turn ON dumping states as SVG images.\0A\00"
define void @help_show() {
%1 = tail call i32 (...) @help_ascii_art()
%2 = tail call i32 (...) @help_print_line()
%3 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([353 x i8], [353 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 (...) @help_print_line()
%5 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([310 x i8], [310 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([269 x i8], [269 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([335 x i8], [335 x i8]* @.str.5, i64 0, i64 0))
ret void
}