#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*/ print_version();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ ts_print_ascii_logo(int);
void help(void) {
  ts_print_ascii_logo(16);
  print_version();
  printf("\n");
  printf("Usage: ts_test [-r <rotate_value>] [--version] [--help]\n");
  printf("\n");
  printf("-r --rotate\n");
  printf("        <rotate_value> 0 ... no rotation; 0 degree (default)\n");
  printf("                       1 ... clockwise orientation; 90 degrees\n");
  printf("                       2 ... upside down orientation; 180 degrees\n");
  printf("                       3 ... counterclockwise orientation; 270 "
         "degrees\n");
  printf("-h --help\n");
  printf("                       print this help test\n");
  printf("-v --version\n");
  printf("                       print version information only\n");
  printf("\n");
  printf(
      "Example (Linux): ts_test -r $(cat /sys/class/graphics/fbcon/rotate)\n");
  printf("\n");
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
mov    $0x10,%edi
call   1050 <ts_print_ascii_logo@plt>
mov    $0x0,%al
call   1030 <print_version@plt>
lea    0x10c3(%rip),%rdi
call   1040 <printf@plt>
lea    0xea8(%rip),%rdi
call   1040 <printf@plt>
lea    0x10ab(%rip),%rdi
call   1040 <printf@plt>
lea    0xec9(%rip),%rdi
call   1040 <printf@plt>
lea    0xeca(%rip),%rdi
call   1040 <printf@plt>
lea    0xefc(%rip),%rdi
call   1040 <printf@plt>
lea    0xf30(%rip),%rdi
call   1040 <printf@plt>
lea    0xf67(%rip),%rdi
call   1040 <printf@plt>
lea    0xfa3(%rip),%rdi
call   1040 <printf@plt>
lea    0xfa2(%rip),%rdi
call   1040 <printf@plt>
lea    0xfc3(%rip),%rdi
call   1040 <printf@plt>
lea    0xfc5(%rip),%rdi
call   1040 <printf@plt>
lea    0x1033(%rip),%rdi
call   1040 <printf@plt>
lea    0xfe4(%rip),%rdi
call   1040 <printf@plt>
lea    0x101b(%rip),%rdi
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<help>:
push   %rax
mov    $0x10,%edi
call   1060 <ts_print_ascii_logo@plt>
xor    %eax,%eax
call   1050 <print_version@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe9d(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xebf(%rip),%rdi
call   1040 <puts@plt>
lea    0xebf(%rip),%rdi
call   1040 <puts@plt>
lea    0xef0(%rip),%rdi
call   1040 <puts@plt>
lea    0xf23(%rip),%rdi
call   1040 <puts@plt>
lea    0xf59(%rip),%rdi
call   1040 <puts@plt>
lea    0xf94(%rip),%rdi
call   1040 <puts@plt>
lea    0xf92(%rip),%rdi
call   1040 <puts@plt>
lea    0xfb2(%rip),%rdi
call   1040 <puts@plt>
lea    0xfb3(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xfd3(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [57 x i8] c"Usage: ts_test [-r <rotate_value>] [--version] [--help]\0A\00"
@.str.2 = [13 x i8] c"-r --rotate\0A\00"
@.str.3 = [62 x i8] c" <rotate_value> 0 ... no rotation; 0 degree (default)\0A\00"
@.str.4 = [64 x i8] c" 1 ... clockwise orientation; 90 degrees\0A\00"
@.str.5 = [67 x i8] c" 2 ... upside down orientation; 180 degrees\0A\00"
@.str.6 = [72 x i8] c" 3 ... counterclockwise orientation; 270 degrees\0A\00"
@.str.7 = [11 x i8] c"-h --help\0A\00"
@.str.8 = [45 x i8] c" print this help test\0A\00"
@.str.9 = [14 x i8] c"-v --version\0A\00"
@.str.10 = [55 x i8] c" print version information only\0A\00"
@.str.11 = [69 x i8] c"Example (Linux): ts_test -r $(cat /sys/class/graphics/fbcon/rotate)\0A\00"
define void @help() {
%1 = call i32 @ts_print_ascii_logo(i32 16)
%2 = call i32 (...) @print_version()
%3 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.3, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.4, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.5, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.6, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.8, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.10, i64 0, i64 0))
%15 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.11, i64 0, i64 0))
%17 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [56 x i8] c"Usage: ts_test [-r <rotate_value>] [--version] [--help]\00"
@str.12 = [12 x i8] c"-r --rotate\00"
@str.13 = [61 x i8] c" <rotate_value> 0 ... no rotation; 0 degree (default)\00"
@str.14 = [63 x i8] c" 1 ... clockwise orientation; 90 degrees\00"
@str.15 = [66 x i8] c" 2 ... upside down orientation; 180 degrees\00"
@str.16 = [71 x i8] c" 3 ... counterclockwise orientation; 270 degrees\00"
@str.17 = [10 x i8] c"-h --help\00"
@str.18 = [44 x i8] c" print this help test\00"
@str.19 = [13 x i8] c"-v --version\00"
@str.20 = [54 x i8] c" print version information only\00"
@str.21 = [68 x i8] c"Example (Linux): ts_test -r $(cat /sys/class/graphics/fbcon/rotate)\00"
define void @help() {
%1 = tail call i32 @ts_print_ascii_logo(i32 16)
%2 = tail call i32 (...) @print_version()
%3 = tail call i32 @putchar(i32 10)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @putchar(i32 10)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.12, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str.13, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str.14, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @str.15, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @str.16, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.17, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.18, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.19, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.20, i64 0, i64 0))
%15 = tail call i32 @putchar(i32 10)
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @str.21, i64 0, i64 0))
%17 = tail call i32 @putchar(i32 10)
ret void
}