#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*/ printVersion();
int /*<<< orphan*/ printf(char *);
void printUsage() {
  printVersion();
  printf("\nUsage: hosts [command] [-f <filename> | -h | -v] [arguments]\n\n");
  printf("Available commands:\n");
  printf("	list	Print the list of entries in the hosts file\n");
  printf("	add		Adds an entry to the hosts file. Arguments: "
         "[hostname] [ip-address]\n");
  printf("	rm		Removes one or more entries from the hosts "
         "file. Arguments: [hostname]...\n\n");
  printf("Available options:\n");
  printf("	-f <filename>	Chooses the file to operate on (default: "
         "/etc/hosts)\n");
  printf("	-h				Prints this help text\n");
  printf("	-v				Prints version information\n");
}


x86 assembly (clang, -O0):
<printUsage>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <printVersion@plt>
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
lea    0xf02(%rip),%rdi
call   1030 <printf@plt>
lea    0xf0b(%rip),%rdi
call   1030 <printf@plt>
lea    0xf32(%rip),%rdi
call   1030 <printf@plt>
lea    0xf71(%rip),%rdi
call   1030 <printf@plt>
lea    0xfb6(%rip),%rdi
call   1030 <printf@plt>
lea    0xfbe(%rip),%rdi
call   1030 <printf@plt>
lea    0xff7(%rip),%rdi
call   1030 <printf@plt>
lea    0x1009(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<printUsage>:
push   %rax
xor    %eax,%eax
call   1040 <printVersion@plt>
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
lea    0xf04(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0c(%rip),%rdi
call   1030 <puts@plt>
lea    0xf32(%rip),%rdi
call   1030 <puts@plt>
lea    0xf70(%rip),%rdi
call   1030 <puts@plt>
lea    0xfb4(%rip),%rdi
call   1030 <puts@plt>
lea    0xfbb(%rip),%rdi
call   1030 <puts@plt>
lea    0xff3(%rip),%rdi
call   1030 <puts@plt>
lea    0x1004(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [64 x i8] c"\0AUsage: hosts [command] [-f <filename> | -h | -v] [arguments]\0A\0A\00"
@.str.1 = [21 x i8] c"Available commands:\0A\00"
@.str.2 = [51 x i8] c"\09list\09Print the list of entries in the hosts file\0A\00"
@.str.3 = [75 x i8] c"\09add\09\09Adds an entry to the hosts file. Arguments: [hostname] [ip-address]\0A\00"
@.str.4 = [81 x i8] c"\09rm\09\09Removes one or more entries from the hosts file. Arguments: [hostname]...\0A\0A\00"
@.str.5 = [20 x i8] c"Available options:\0A\00"
@.str.6 = [69 x i8] c"\09-f <filename>\09Chooses the file to operate on (default: /etc/hosts)\0A\00"
@.str.7 = [30 x i8] c"\09-h\09\09\09\09Prints this help text\0A\00"
@.str.8 = [35 x i8] c"\09-v\09\09\09\09Prints version information\0A\00"
define void @printUsage() {
%1 = call i32 (...) @printVersion()
%2 = call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.3, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.4, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.6, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.8, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [63 x i8] c"\0AUsage: hosts [command] [-f <filename> | -h | -v] [arguments]\0A\00"
@str.9 = [20 x i8] c"Available commands:\00"
@str.10 = [50 x i8] c"\09list\09Print the list of entries in the hosts file\00"
@str.11 = [74 x i8] c"\09add\09\09Adds an entry to the hosts file. Arguments: [hostname] [ip-address]\00"
@str.12 = [80 x i8] c"\09rm\09\09Removes one or more entries from the hosts file. Arguments: [hostname]...\0A\00"
@str.13 = [19 x i8] c"Available options:\00"
@str.14 = [68 x i8] c"\09-f <filename>\09Chooses the file to operate on (default: /etc/hosts)\00"
@str.15 = [29 x i8] c"\09-h\09\09\09\09Prints this help text\00"
@str.16 = [34 x i8] c"\09-v\09\09\09\09Prints version information\00"
define void @printUsage() {
%1 = tail call i32 (...) @printVersion()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.9, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.10, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @str.11, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @str.12, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.13, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @str.14, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.15, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.16, i64 0, i64 0))
ret void
}