#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*/ sprintf(char *, char *, ...);
int strlen(char *);
char *help_message(char *program_name) {
  static char message[2048];
  sprintf(message, "\nUses:\n");
  sprintf(message + strlen(message), "\t%s\t\t   * user mode *\n",
          program_name);
  sprintf(message + strlen(message),
          "\t%s -penc             * encodes characters received by piping *\n",
          program_name);
  sprintf(message + strlen(message),
          "\t%s -pdec             * decodes characters received by piping *\n",
          program_name);
  sprintf(message + strlen(message),
          "\t%s -enc <filename>   * encodes contents of file *\n",
          program_name);
  sprintf(message + strlen(message),
          "\t%s -dec <filename>   * decodes contents of file *\n",
          program_name);
  sprintf(message + strlen(message),
          "\t%s --help            * prints this help message *\n",
          program_name);
  return message;
}


x86 assembly (clang, -O0):
<help_message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0x2f0d(%rip),%rdi
lea    0xec6(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
lea    0x2ef8(%rip),%rdi
call   1030 <strlen@plt>
cltq
lea    0x2eea(%rip),%rdi
add    %rax,%rdi
mov    -0x8(%rbp),%rdx
lea    0xea4(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
lea    0x2ece(%rip),%rdi
call   1030 <strlen@plt>
cltq
lea    0x2ec0(%rip),%rdi
add    %rax,%rdi
mov    -0x8(%rbp),%rdx
lea    0xe91(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
lea    0x2ea4(%rip),%rdi
call   1030 <strlen@plt>
cltq
lea    0x2e96(%rip),%rdi
add    %rax,%rdi
mov    -0x8(%rbp),%rdx
lea    0xea8(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
lea    0x2e7a(%rip),%rdi
call   1030 <strlen@plt>
cltq
lea    0x2e6c(%rip),%rdi
add    %rax,%rdi
mov    -0x8(%rbp),%rdx
lea    0xebf(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
lea    0x2e50(%rip),%rdi
call   1030 <strlen@plt>
cltq
lea    0x2e42(%rip),%rdi
add    %rax,%rdi
mov    -0x8(%rbp),%rdx
lea    0xec9(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
lea    0x2e26(%rip),%rdi
call   1030 <strlen@plt>
cltq
lea    0x2e18(%rip),%rdi
add    %rax,%rdi
mov    -0x8(%rbp),%rdx
lea    0xed3(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
lea    0x2dfc(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<help_message>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
movabs $0xa3a736573550a,%rax
mov    %rax,0x2f08(%rip)
lea    0x2f01(%rip),%r14
mov    %r14,%rdi
call   1030 <strlen@plt>
movslq %eax,%rdi
add    %r14,%rdi
lea    0xeac(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <sprintf@plt>
mov    %r14,%rdi
call   1030 <strlen@plt>
movslq %eax,%rdi
add    %r14,%rdi
lea    0xea4(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <sprintf@plt>
mov    %r14,%rdi
call   1030 <strlen@plt>
movslq %eax,%rdi
add    %r14,%rdi
lea    0xec6(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <sprintf@plt>
mov    %r14,%rdi
call   1030 <strlen@plt>
movslq %eax,%rdi
add    %r14,%rdi
lea    0xee8(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <sprintf@plt>
mov    %r14,%rdi
call   1030 <strlen@plt>
movslq %eax,%rdi
add    %r14,%rdi
lea    0xefd(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <sprintf@plt>
mov    %r14,%rdi
call   1030 <strlen@plt>
movslq %eax,%rdi
add    %r14,%rdi
lea    0xf12(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <sprintf@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@help_message.message = internal global [2048 x i8] zeroinitializer
@.str = [8 x i8] c"\0AUses:\0A\00"
@.str.1 = [23 x i8] c"\09%s\09\09 * user mode *\0A\00"
@.str.2 = [65 x i8] c"\09%s -penc * encodes characters received by piping *\0A\00"
@.str.3 = [65 x i8] c"\09%s -pdec * decodes characters received by piping *\0A\00"
@.str.4 = [52 x i8] c"\09%s -enc <filename> * encodes contents of file *\0A\00"
@.str.5 = [52 x i8] c"\09%s -dec <filename> * decodes contents of file *\0A\00"
@.str.6 = [52 x i8] c"\09%s --help * prints this help message *\0A\00"
define i8* @help_message(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, i8*, ...) @sprintf(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @help_message.message, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @strlen(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @help_message.message, i64 0, i64 0))
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i8, i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @help_message.message, i64 0, i64 0), i64 %5
%7 = load i8*, i8** %2
%8 = call i32 (i8*, i8*, ...) @sprintf(i8* %6, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%9 = call i32 @strlen(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @help_message.message, i64 0, i64 0))
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @help_message.message, i64 0, i64 0), i64 %10
%12 = load i8*, i8** %2
%13 = call i32 (i8*, i8*, ...) @sprintf(i8* %11, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.2, i64 0, i64 0), i8* %12)
%14 = call i32 @strlen(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @help_message.message, i64 0, i64 0))
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @help_message.message, i64 0, i64 0), i64 %15
%17 = load i8*, i8** %2
%18 = call i32 (i8*, i8*, ...) @sprintf(i8* %16, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.3, i64 0, i64 0), i8* %17)
%19 = call i32 @strlen(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @help_message.message, i64 0, i64 0))
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @help_message.message, i64 0, i64 0), i64 %20
%22 = load i8*, i8** %2
%23 = call i32 (i8*, i8*, ...) @sprintf(i8* %21, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.4, i64 0, i64 0), i8* %22)
%24 = call i32 @strlen(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @help_message.message, i64 0, i64 0))
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i8, i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @help_message.message, i64 0, i64 0), i64 %25
%27 = load i8*, i8** %2
%28 = call i32 (i8*, i8*, ...) @sprintf(i8* %26, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.5, i64 0, i64 0), i8* %27)
%29 = call i32 @strlen(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @help_message.message, i64 0, i64 0))
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds i8, i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @help_message.message, i64 0, i64 0), i64 %30
%32 = load i8*, i8** %2
%33 = call i32 (i8*, i8*, ...) @sprintf(i8* %31, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.6, i64 0, i64 0), i8* %32)
ret i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @help_message.message, i64 0, i64 0)
}

LLVM IR (-O2):
@help_message.message = internal global [2048 x i8] zeroinitializer
@.str.1 = [23 x i8] c"\09%s\09\09 * user mode *\0A\00"
@.str.2 = [65 x i8] c"\09%s -penc * encodes characters received by piping *\0A\00"
@.str.3 = [65 x i8] c"\09%s -pdec * decodes characters received by piping *\0A\00"
@.str.4 = [52 x i8] c"\09%s -enc <filename> * encodes contents of file *\0A\00"
@.str.5 = [52 x i8] c"\09%s -dec <filename> * decodes contents of file *\0A\00"
@.str.6 = [52 x i8] c"\09%s --help * prints this help message *\0A\00"
define i8* @help_message(i8* %0) {
store i64 2879017064813834, i64* bitcast ([2048 x i8]* @help_message.message to i64*)
%2 = tail call i32 @strlen(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @help_message.message, i64 0, i64 0))
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds [2048 x i8], [2048 x i8]* @help_message.message, i64 0, i64 %3
%5 = tail call i32 (i8*, i8*, ...) @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%6 = tail call i32 @strlen(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @help_message.message, i64 0, i64 0))
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds [2048 x i8], [2048 x i8]* @help_message.message, i64 0, i64 %7
%9 = tail call i32 (i8*, i8*, ...) @sprintf(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @.str.2, i64 0, i64 0), i8* %0)
%10 = tail call i32 @strlen(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @help_message.message, i64 0, i64 0))
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [2048 x i8], [2048 x i8]* @help_message.message, i64 0, i64 %11
%13 = tail call i32 (i8*, i8*, ...) @sprintf(i8* %12, i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @.str.3, i64 0, i64 0), i8* %0)
%14 = tail call i32 @strlen(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @help_message.message, i64 0, i64 0))
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [2048 x i8], [2048 x i8]* @help_message.message, i64 0, i64 %15
%17 = tail call i32 (i8*, i8*, ...) @sprintf(i8* %16, i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.4, i64 0, i64 0), i8* %0)
%18 = tail call i32 @strlen(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @help_message.message, i64 0, i64 0))
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [2048 x i8], [2048 x i8]* @help_message.message, i64 0, i64 %19
%21 = tail call i32 (i8*, i8*, ...) @sprintf(i8* %20, i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.5, i64 0, i64 0), i8* %0)
%22 = tail call i32 @strlen(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @help_message.message, i64 0, i64 0))
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [2048 x i8], [2048 x i8]* @help_message.message, i64 0, i64 %23
%25 = tail call i32 (i8*, i8*, ...) @sprintf(i8* %24, i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.6, i64 0, i64 0), i8* %0)
ret i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @help_message.message, i64 0, i64 0)
}