#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 *);
void usage(void) {
  printf("Usage: ptm2human [options] -i /TRACE/FILE/PATH\n");
  printf("Options:\n");
  printf("  -i|--input <trace file>                 Give the trace file\n\n");
  printf("  -p|--decode-ptm (default option)        Decode PTM trace\n");
  printf("  -c|--context <context ID size>          Give the size of ContextID "
         "for PTM trace only\n");
  printf("  -C|--cycle-accurate                     Enable Cycle-Accurate for "
         "PTM trace only\n\n");
  printf("  -e|--decode-etmv4                       Decode ETMv4 trace\n");
  printf("  -0|--trcidr0 <TRCIDR0 value>            Give the value of TRCIDR0 "
         "which indicates conditional tracing type\n");
  printf("  -8|--trcidr8 <TRCIDR8 value>            Give the value of TRCIDR8 "
         "which indicates max speculation depth\n");
  printf("  -9|--trcidr9 <TRCIDR9 value>            Give the value of TRCIDR9 "
         "which indicates the number of P0 right-hand keys\n");
  printf(
      "  -2|--trcidr12 <TRCIDR12 value>          Give the value of TRCIDR12 "
      "which indicates the number of right-hand keys for cond-inst elements\n");
  printf("  -3|--trcidr13 <TRCIDR13 value>          Give the value of TRCIDR13 "
         "which indicates the number of special right-hand keys for cond-inst "
         "elements\n\n");
  printf("  -d|--debuglog                           Enable debug messages\n");
  printf("  -h|--help                               Show help messages\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xf09(%rip),%rdi
call   1030 <printf@plt>
lea    0xf07(%rip),%rdi
call   1030 <printf@plt>
lea    0xf3b(%rip),%rdi
call   1030 <printf@plt>
lea    0xf6b(%rip),%rdi
call   1030 <printf@plt>
lea    0xfb8(%rip),%rdi
call   1030 <printf@plt>
lea    0x1001(%rip),%rdi
call   1030 <printf@plt>
lea    0x1033(%rip),%rdi
call   1030 <printf@plt>
lea    0x1095(%rip),%rdi
call   1030 <printf@plt>
lea    0x10f4(%rip),%rdi
call   1030 <printf@plt>
lea    0x115e(%rip),%rdi
call   1030 <printf@plt>
lea    0x11dd(%rip),%rdi
call   1030 <printf@plt>
lea    0x1265(%rip),%rdi
call   1030 <printf@plt>
lea    0x129a(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0b(%rip),%rdi
call   1030 <puts@plt>
lea    0xf08(%rip),%rdi
call   1030 <puts@plt>
lea    0xf3b(%rip),%rdi
call   1030 <puts@plt>
lea    0xf6a(%rip),%rdi
call   1030 <puts@plt>
lea    0xfb6(%rip),%rdi
call   1030 <puts@plt>
lea    0xffe(%rip),%rdi
call   1030 <puts@plt>
lea    0x102f(%rip),%rdi
call   1030 <puts@plt>
lea    0x1090(%rip),%rdi
call   1030 <puts@plt>
lea    0x10ee(%rip),%rdi
call   1030 <puts@plt>
lea    0x1157(%rip),%rdi
call   1030 <puts@plt>
lea    0x11d5(%rip),%rdi
call   1030 <puts@plt>
lea    0x125c(%rip),%rdi
call   1030 <puts@plt>
lea    0x1290(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [48 x i8] c"Usage: ptm2human [options] -i /TRACE/FILE/PATH\0A\00"
@.str.1 = [10 x i8] c"Options:\0A\00"
@.str.2 = [64 x i8] c" -i|--input <trace file> Give the trace file\0A\0A\00"
@.str.3 = [60 x i8] c" -p|--decode-ptm (default option) Decode PTM trace\0A\00"
@.str.4 = [89 x i8] c" -c|--context <context ID size> Give the size of ContextID for PTM trace only\0A\00"
@.str.5 = [85 x i8] c" -C|--cycle-accurate Enable Cycle-Accurate for PTM trace only\0A\0A\00"
@.str.6 = [62 x i8] c" -e|--decode-etmv4 Decode ETMv4 trace\0A\00"
@.str.7 = [110 x i8] c" -0|--trcidr0 <TRCIDR0 value> Give the value of TRCIDR0 which indicates conditional tracing type\0A\00"
@.str.8 = [107 x i8] c" -8|--trcidr8 <TRCIDR8 value> Give the value of TRCIDR8 which indicates max speculation depth\0A\00"
@.str.9 = [118 x i8] c" -9|--trcidr9 <TRCIDR9 value> Give the value of TRCIDR9 which indicates the number of P0 right-hand keys\0A\00"
@.str.10 = [139 x i8] c" -2|--trcidr12 <TRCIDR12 value> Give the value of TRCIDR12 which indicates the number of right-hand keys for cond-inst elements\0A\00"
@.str.11 = [148 x i8] c" -3|--trcidr13 <TRCIDR13 value> Give the value of TRCIDR13 which indicates the number of special right-hand keys for cond-inst elements\0A\0A\00"
@.str.12 = [65 x i8] c" -d|--debuglog Enable debug messages\0A\00"
@.str.13 = [62 x i8] c" -h|--help Show help messages\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([89 x i8], [89 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([110 x i8], [110 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([107 x i8], [107 x i8]* @.str.8, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([118 x i8], [118 x i8]* @.str.9, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([139 x i8], [139 x i8]* @.str.10, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.11, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.12, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.13, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [47 x i8] c"Usage: ptm2human [options] -i /TRACE/FILE/PATH\00"
@str.14 = [9 x i8] c"Options:\00"
@str.15 = [63 x i8] c" -i|--input <trace file> Give the trace file\0A\00"
@str.16 = [59 x i8] c" -p|--decode-ptm (default option) Decode PTM trace\00"
@str.17 = [88 x i8] c" -c|--context <context ID size> Give the size of ContextID for PTM trace only\00"
@str.18 = [84 x i8] c" -C|--cycle-accurate Enable Cycle-Accurate for PTM trace only\0A\00"
@str.19 = [61 x i8] c" -e|--decode-etmv4 Decode ETMv4 trace\00"
@str.20 = [109 x i8] c" -0|--trcidr0 <TRCIDR0 value> Give the value of TRCIDR0 which indicates conditional tracing type\00"
@str.21 = [106 x i8] c" -8|--trcidr8 <TRCIDR8 value> Give the value of TRCIDR8 which indicates max speculation depth\00"
@str.22 = [117 x i8] c" -9|--trcidr9 <TRCIDR9 value> Give the value of TRCIDR9 which indicates the number of P0 right-hand keys\00"
@str.23 = [138 x i8] c" -2|--trcidr12 <TRCIDR12 value> Give the value of TRCIDR12 which indicates the number of right-hand keys for cond-inst elements\00"
@str.24 = [147 x i8] c" -3|--trcidr13 <TRCIDR13 value> Give the value of TRCIDR13 which indicates the number of special right-hand keys for cond-inst elements\0A\00"
@str.25 = [64 x i8] c" -d|--debuglog Enable debug messages\00"
@str.26 = [61 x i8] c" -h|--help Show help messages\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.14, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str.15, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.16, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([88 x i8], [88 x i8]* @str.17, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([84 x i8], [84 x i8]* @str.18, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str.19, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([109 x i8], [109 x i8]* @str.20, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([106 x i8], [106 x i8]* @str.21, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([117 x i8], [117 x i8]* @str.22, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([138 x i8], [138 x i8]* @str.23, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([147 x i8], [147 x i8]* @str.24, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str.25, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str.26, i64 0, i64 0))
ret void
}