#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*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *, ...);
void print_usage(char *prog) {
  printf("Usage: %s [OPTIONS] [FILE]\n\nOptions: \n  -x      convert hex "
         "digits to ascii chars (default) \n  -a      convert ascii chars to "
         "hex digits \n  -n      omit the newline after output \n  -s      put "
         "spaces between the output characters \n  -p      prefix output hex "
         "digits with '0x' \n  -i      interactive mode (stdin of and stdout "
         "to console)\n  -h      print this help information \n\n",
         prog);
  printf("Examples: \n  echo 'Hello, World!' | %s -as \n  echo -n '48 65 6C 6C "
         "6F 2C 20 57 6F 72 6C 64 21 0A' | %s -xn \n  %s -a some_file.txt | %s "
         "-n > the_same_file.txt \n",
         prog, prog, prog, prog);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
mov    -0x8(%rbp),%rdx
mov    -0x8(%rbp),%rcx
mov    -0x8(%rbp),%r8
lea    0x1025(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<print_usage>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x103e(%rip),%rdi
mov    %rbx,%rsi
mov    %rbx,%rdx
mov    %rbx,%rcx
mov    %rbx,%r8
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x2e8a(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [378 x i8] c"Usage: %s [OPTIONS] [FILE]\0A\0AOptions: \0A -x convert hex digits to ascii chars (default) \0A -a convert ascii chars to hex digits \0A -n omit the newline after output \0A -s put spaces between the output characters \0A -p prefix output hex digits with '0x' \0A -i interactive mode (stdin of and stdout to console)\0A -h print this help information \0A\0A\00"
@.str.1 = [160 x i8] c"Examples: \0A echo 'Hello, World!' | %s -as \0A echo -n '48 65 6C 6C 6F 2C 20 57 6F 72 6C 64 21 0A' | %s -xn \0A %s -a some_file.txt | %s -n > the_same_file.txt \0A\00"
@EXIT_FAILURE = global i32 0
define void @print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([378 x i8], [378 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i8*, i8** %2
%6 = load i8*, i8** %2
%7 = load i8*, i8** %2
%8 = load i8*, i8** %2
%9 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str.1, i64 0, i64 0), i8* %5, i8* %6, i8* %7, i8* %8)
%10 = load i32, i32* @EXIT_FAILURE
%11 = call i32 @exit(i32 %10)
unreachable
}

LLVM IR (-O2):
@.str = [378 x i8] c"Usage: %s [OPTIONS] [FILE]\0A\0AOptions: \0A -x convert hex digits to ascii chars (default) \0A -a convert ascii chars to hex digits \0A -n omit the newline after output \0A -s put spaces between the output characters \0A -p prefix output hex digits with '0x' \0A -i interactive mode (stdin of and stdout to console)\0A -h print this help information \0A\0A\00"
@.str.1 = [160 x i8] c"Examples: \0A echo 'Hello, World!' | %s -as \0A echo -n '48 65 6C 6C 6F 2C 20 57 6F 72 6C 64 21 0A' | %s -xn \0A %s -a some_file.txt | %s -n > the_same_file.txt \0A\00"
@EXIT_FAILURE = global i32 0
define void @print_usage(i8* %0) {
%2 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([378 x i8], [378 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* %0, i8* %0, i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}