#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 */
char *_DtHPrGetMessage(int, int, char *);
int /*<<< orphan*/ printf(char *);
void Usage(void) {
  static char *usage[] = {
      "dthelpprint - Print program for Help\n\n",
      "Usage: dthelpprint [options]\n",
      "Options controlling how to print:\n",
      "\t"
      "-printer"
      " printername  printer to use\n",
      "\t"
      "-copies"
      " number        number of copies to print\n",
      "\t"
      "-outputFile"
      " filename  write output to this file\n",
      "\t"
      "-paperSize"
      " size       format content to this paper size\n",
      "\t\tsize = {"
      "help_papersize_letter"
      "|"
      "help_papersize_legal"
      "|\n",
      "\t\t        "
      "help_papersize_executive"
      "|"
      "help_papersize_a4"
      "|"
      "help_papersize_b5"
      "}\n",
      "\t"
      "-display"
      " displayname  display from which to get resources\n",
      "\t"
      "-name"
      " name            program name used when getting resources\n",
      "\t"
      "-class"
      " name           class name used when getting resources\n",
      "\t"
      "-xrm"
      " resourcestring   additional resources\n",
      "Options controlling what to print:\n",
      "\t"
      "-helpType"
      " type        type of Help data\n",
      "\t\ttype = 0 (help volume), 1 (string), 2 (man page), 3 (help file)\n",
      "\t"
      "-helpVolume"
      " volume    full path of help volume file\n",
      "\t"
      "-locationId"
      " location  name of Help topic in the volume\n",
      "\t"
      "-allTopics"
      "            print all topics, toc, & index in the help volume\n",
      "\t"
      "-subTopics"
      "            print topic locationId and all subtopics\n",
      "\t"
      "-oneTopic"
      "             print topic locationId\n",
      "\t"
      "-toc"
      "                  print help volume table of contents\n",
      "\t"
      "-index"
      "                print help volume index\n",
      "\t"
      "-frontMatter"
      "          print help volume front matter\n",
      "\t"
      "-manPage"
      " manpagename  name of man page\n",
      "\t"
      "-stringData"
      " string    Help text to print\n",
      "\t"
      "-helpFile"
      " filename    file containing Help text\n",
      "\t"
      "-topicTitle"
      " title     title string for Help text\n",
      NULL};
  int i;
  for (i = 0; usage[i]; i++)
    printf(_DtHPrGetMessage(5, i, usage[i]));
}


x86 assembly (clang, -O0):
<Usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movslq -0x4(%rbp),%rcx
lea    0x2f06(%rip),%rax
cmpq   $0x0,(%rax,%rcx,8)
je     1177 <Usage+0x57>
mov    -0x4(%rbp),%esi
movslq -0x4(%rbp),%rcx
lea    0x2eed(%rip),%rax
mov    (%rax,%rcx,8),%rdx
mov    $0x5,%edi
call   1040 <_DtHPrGetMessage@plt>
mov    %rax,%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <Usage+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Usage>:
push   %r14
push   %rbx
push   %rax
lea    0x2c05(%rip),%r14
xor    %ebx,%ebx
nopl   (%rax)
mov    (%r14),%rdx
mov    $0x5,%edi
mov    %ebx,%esi
call   1040 <_DtHPrGetMessage@plt>
mov    %rax,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
add    $0x8,%r14
cmp    $0x1c,%rbx
jne    1130 <Usage+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@Usage.usage = internal global [29 x i8*] [i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.16, i32 0, i32 0), i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.17, i32 0, i32 0), i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.18, i32 0, i32 0), i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.19, i32 0, i32 0), i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.20, i32 0, i32 0), i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.21, i32 0, i32 0), i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.22, i32 0, i32 0), i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.23, i32 0, i32 0), i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.24, i32 0, i32 0), i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.25, i32 0, i32 0), i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.26, i32 0, i32 0), i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.27, i32 0, i32 0), i8* null]
@.str = [39 x i8] c"dthelpprint - Print program for Help\0A\0A\00"
@.str.1 = [30 x i8] c"Usage: dthelpprint [options]\0A\00"
@.str.2 = [35 x i8] c"Options controlling how to print:\0A\00"
@.str.3 = [39 x i8] c"\09-printer printername printer to use\0A\00"
@.str.4 = [50 x i8] c"\09-copies number number of copies to print\0A\00"
@.str.5 = [50 x i8] c"\09-outputFile filename write output to this file\0A\00"
@.str.6 = [58 x i8] c"\09-paperSize size format content to this paper size\0A\00"
@.str.7 = [55 x i8] c"\09\09size = {help_papersize_letter|help_papersize_legal|\0A\00"
@.str.8 = [73 x i8] c"\09\09 help_papersize_executive|help_papersize_a4|help_papersize_b5}\0A\00"
@.str.9 = [60 x i8] c"\09-display displayname display from which to get resources\0A\00"
@.str.10 = [65 x i8] c"\09-name name program name used when getting resources\0A\00"
@.str.11 = [63 x i8] c"\09-class name class name used when getting resources\0A\00"
@.str.12 = [45 x i8] c"\09-xrm resourcestring additional resources\0A\00"
@.str.13 = [36 x i8] c"Options controlling what to print:\0A\00"
@.str.14 = [42 x i8] c"\09-helpType type type of Help data\0A\00"
@.str.15 = [67 x i8] c"\09\09type = 0 (help volume), 1 (string), 2 (man page), 3 (help file)\0A\00"
@.str.16 = [54 x i8] c"\09-helpVolume volume full path of help volume file\0A\00"
@.str.17 = [57 x i8] c"\09-locationId location name of Help topic in the volume\0A\00"
@.str.18 = [74 x i8] c"\09-allTopics print all topics, toc, & index in the help volume\0A\00"
@.str.19 = [65 x i8] c"\09-subTopics print topic locationId and all subtopics\0A\00"
@.str.20 = [47 x i8] c"\09-oneTopic print topic locationId\0A\00"
@.str.21 = [60 x i8] c"\09-toc print help volume table of contents\0A\00"
@.str.22 = [48 x i8] c"\09-index print help volume index\0A\00"
@.str.23 = [55 x i8] c"\09-frontMatter print help volume front matter\0A\00"
@.str.24 = [41 x i8] c"\09-manPage manpagename name of man page\0A\00"
@.str.25 = [43 x i8] c"\09-stringData string Help text to print\0A\00"
@.str.26 = [50 x i8] c"\09-helpFile filename file containing Help text\0A\00"
@.str.27 = [51 x i8] c"\09-topicTitle title title string for Help text\0A\00"
define void @Usage() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %16, %0
%3 = load i32, i32* %1
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds [29 x i8*], [29 x i8*]* @Usage.usage, i64 0, i64 %4
%6 = load i8*, i8** %5
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %19
8: ; preds = %2
%9 = load i32, i32* %1
%10 = load i32, i32* %1
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [29 x i8*], [29 x i8*]* @Usage.usage, i64 0, i64 %11
%13 = load i8*, i8** %12
%14 = call i8* @_DtHPrGetMessage(i32 5, i32 %9, i8* %13)
%15 = call i32 @printf(i8* %14)
br label %16
16: ; preds = %8
%17 = load i32, i32* %1
%18 = add nsw i32 %17, 1
store i32 %18, i32* %1
br label %2
19: ; preds = %2
ret void
}

LLVM IR (-O2):
@Usage.usage = internal unnamed_addr constant [29 x i8*] [i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.16, i32 0, i32 0), i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.17, i32 0, i32 0), i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.18, i32 0, i32 0), i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.19, i32 0, i32 0), i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.20, i32 0, i32 0), i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.21, i32 0, i32 0), i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.22, i32 0, i32 0), i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.23, i32 0, i32 0), i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.24, i32 0, i32 0), i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.25, i32 0, i32 0), i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.26, i32 0, i32 0), i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.27, i32 0, i32 0), i8* null]
@.str = [39 x i8] c"dthelpprint - Print program for Help\0A\0A\00"
@.str.1 = [30 x i8] c"Usage: dthelpprint [options]\0A\00"
@.str.2 = [35 x i8] c"Options controlling how to print:\0A\00"
@.str.3 = [39 x i8] c"\09-printer printername printer to use\0A\00"
@.str.4 = [50 x i8] c"\09-copies number number of copies to print\0A\00"
@.str.5 = [50 x i8] c"\09-outputFile filename write output to this file\0A\00"
@.str.6 = [58 x i8] c"\09-paperSize size format content to this paper size\0A\00"
@.str.7 = [55 x i8] c"\09\09size = {help_papersize_letter|help_papersize_legal|\0A\00"
@.str.8 = [73 x i8] c"\09\09 help_papersize_executive|help_papersize_a4|help_papersize_b5}\0A\00"
@.str.9 = [60 x i8] c"\09-display displayname display from which to get resources\0A\00"
@.str.10 = [65 x i8] c"\09-name name program name used when getting resources\0A\00"
@.str.11 = [63 x i8] c"\09-class name class name used when getting resources\0A\00"
@.str.12 = [45 x i8] c"\09-xrm resourcestring additional resources\0A\00"
@.str.13 = [36 x i8] c"Options controlling what to print:\0A\00"
@.str.14 = [42 x i8] c"\09-helpType type type of Help data\0A\00"
@.str.15 = [67 x i8] c"\09\09type = 0 (help volume), 1 (string), 2 (man page), 3 (help file)\0A\00"
@.str.16 = [54 x i8] c"\09-helpVolume volume full path of help volume file\0A\00"
@.str.17 = [57 x i8] c"\09-locationId location name of Help topic in the volume\0A\00"
@.str.18 = [74 x i8] c"\09-allTopics print all topics, toc, & index in the help volume\0A\00"
@.str.19 = [65 x i8] c"\09-subTopics print topic locationId and all subtopics\0A\00"
@.str.20 = [47 x i8] c"\09-oneTopic print topic locationId\0A\00"
@.str.21 = [60 x i8] c"\09-toc print help volume table of contents\0A\00"
@.str.22 = [48 x i8] c"\09-index print help volume index\0A\00"
@.str.23 = [55 x i8] c"\09-frontMatter print help volume front matter\0A\00"
@.str.24 = [41 x i8] c"\09-manPage manpagename name of man page\0A\00"
@.str.25 = [43 x i8] c"\09-stringData string Help text to print\0A\00"
@.str.26 = [50 x i8] c"\09-helpFile filename file containing Help text\0A\00"
@.str.27 = [51 x i8] c"\09-topicTitle title title string for Help text\0A\00"
define void @Usage() {
br label %1
1: ; preds = %0, %1
%2 = phi i64 [ 0, %0 ], [ %8, %1 ]
%3 = getelementptr inbounds [29 x i8*], [29 x i8*]* @Usage.usage, i64 0, i64 %2
%4 = load i8*, i8** %3
%5 = trunc i64 %2 to i32
%6 = tail call i8* @_DtHPrGetMessage(i32 5, i32 %5, i8* %4)
%7 = tail call i32 @printf(i8* dereferenceable(1) %6)
%8 = add nuw nsw i64 %2, 1
%9 = icmp eq i64 %8, 28
br i1 %9, label %10, label %1
10: ; preds = %1
ret void
}