#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*/ printf(char *, char *);
int print_help(char *exe) {
  printf("Usage:\n"
         "\t%1$s [<options>] <command>\n"
         "\n"
         "Options:\n"
         "\t-h: show this help and exit\n"
         "\t-v: print the version and exit\n"
         "\t-e <file>: redirect stderr to a file\n"
         "\t-o <file>: redirect stdout to a file\n"
         "\t-O <file>: redirect both stderr and stdout to a file\n"
         "\t-p <file>: print the PID in a file\n"
         "\t-q: quiet mode, don't print normal output\n"
         "\n"
         "Examples:\n"
         "\tBasic:\n"
         "\t\t%1$s mylongprocess --an-option arg1 arg2\n"
         "\n"
         "\tWith stdout/stderr logs:\n"
         "\t\t%1$s -e err.log -o out.log mycmd\n"
         "\n"
         "\tWith a global log and a PID file:\n"
         "\t\t%1$s -q -O mycmd.log -p mycmd.pid mycmd\n"
         "\n",
         exe);
  return 0;
}


x86 assembly (clang, -O0):
<print_help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_help>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [519 x i8] c"Usage:\0A\09%1$s [<options>] <command>\0A\0AOptions:\0A\09-h: show this help and exit\0A\09-v: print the version and exit\0A\09-e <file>: redirect stderr to a file\0A\09-o <file>: redirect stdout to a file\0A\09-O <file>: redirect both stderr and stdout to a file\0A\09-p <file>: print the PID in a file\0A\09-q: quiet mode, don't print normal output\0A\0AExamples:\0A\09Basic:\0A\09\09%1$s mylongprocess --an-option arg1 arg2\0A\0A\09With stdout/stderr logs:\0A\09\09%1$s -e err.log -o out.log mycmd\0A\0A\09With a global log and a PID file:\0A\09\09%1$s -q -O mycmd.log -p mycmd.pid mycmd\0A\0A\00"
define i32 @print_help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([519 x i8], [519 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [519 x i8] c"Usage:\0A\09%1$s [<options>] <command>\0A\0AOptions:\0A\09-h: show this help and exit\0A\09-v: print the version and exit\0A\09-e <file>: redirect stderr to a file\0A\09-o <file>: redirect stdout to a file\0A\09-O <file>: redirect both stderr and stdout to a file\0A\09-p <file>: print the PID in a file\0A\09-q: quiet mode, don't print normal output\0A\0AExamples:\0A\09Basic:\0A\09\09%1$s mylongprocess --an-option arg1 arg2\0A\0A\09With stdout/stderr logs:\0A\09\09%1$s -e err.log -o out.log mycmd\0A\0A\09With a global log and a PID file:\0A\09\09%1$s -q -O mycmd.log -p mycmd.pid mycmd\0A\0A\00"
define i32 @print_help(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([519 x i8], [519 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 0
}