#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 PrintUsage(char *BinName) {
  printf("OhGodATool %s\n", "v1.2.1");
  printf("Usage: %s [-i GPUIdx | -f VBIOSFile] [Generic Options] [--core-state "
         "StateIdx] [--mem-state StateIdx] [--volt-state StateIdx] [State "
         "modification options]\n",
         BinName);
  printf("Generic modification options:\n");
  printf("\t--set-fanspeed <percent>\n\t--set-tdp <W>\n\t--set-tdc "
         "<W>\n\t--set-max-power <W>\n");
  printf("\t--set-max-core-clock <Mhz>\n\t--set-max-mem-clock <Mhz>\n");
  printf("State selection options (must be used before state modification "
         "options; -1 indicates last existing state):\n");
  printf("\t--core-state <index>\n\t--mem-state <index>\n\t--volt-state "
         "<index>\n");
  printf("State modification options:\n");
  printf(
      "\t--mem-clock <Mhz>\n\t--core-clock <Mhz>\n\t--mem-vddc-idx <index>\n");
  printf("\t--core-vddc-idx <index>\n\t--mvdd <mV>\n\t--vddci "
         "<mV>\n\t--core-vddc-off <mV>\n");
  printf("\t--vddc-gfx-off <mV>\n\t--vddc-table-set <mV>\n");
  printf("Display options (shows the selected states, or if none selected, all "
         "states):\n");
  printf("\t--show-mem\n\t--show-core\n\t--show-voltage\n");
  printf("\t--show-fanspeed\n\t--show-temp\n");
}


x86 assembly (clang, -O0):
<PrintUsage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
lea    0xee5(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf68(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf79(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfb9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xfe3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1042(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1076(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1085(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10b7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x10f4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1113(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1154(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0x1170(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PrintUsage>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
lea    0xedd(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed6(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf61(%rip),%rdi
call   1030 <puts@plt>
lea    0xf73(%rip),%rdi
call   1030 <puts@plt>
lea    0xfb4(%rip),%rdi
call   1030 <puts@plt>
lea    0xfdf(%rip),%rdi
call   1030 <puts@plt>
lea    0x103f(%rip),%rdi
call   1030 <puts@plt>
lea    0x1074(%rip),%rdi
call   1030 <puts@plt>
lea    0x1084(%rip),%rdi
call   1030 <puts@plt>
lea    0x10b7(%rip),%rdi
call   1030 <puts@plt>
lea    0x10f5(%rip),%rdi
call   1030 <puts@plt>
lea    0x1115(%rip),%rdi
call   1030 <puts@plt>
lea    0x1157(%rip),%rdi
call   1030 <puts@plt>
lea    0x1174(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"OhGodATool %s\0A\00"
@.str.1 = [7 x i8] c"v1.2.1\00"
@.str.2 = [156 x i8] c"Usage: %s [-i GPUIdx | -f VBIOSFile] [Generic Options] [--core-state StateIdx] [--mem-state StateIdx] [--volt-state StateIdx] [State modification options]\0A\00"
@.str.3 = [31 x i8] c"Generic modification options:\0A\00"
@.str.4 = [78 x i8] c"\09--set-fanspeed <percent>\0A\09--set-tdp <W>\0A\09--set-tdc <W>\0A\09--set-max-power <W>\0A\00"
@.str.5 = [56 x i8] c"\09--set-max-core-clock <Mhz>\0A\09--set-max-mem-clock <Mhz>\0A\00"
@.str.6 = [109 x i8] c"State selection options (must be used before state modification options; -1 indicates last existing state):\0A\00"
@.str.7 = [66 x i8] c"\09--core-state <index>\0A\09--mem-state <index>\0A\09--volt-state <index>\0A\00"
@.str.8 = [29 x i8] c"State modification options:\0A\00"
@.str.9 = [64 x i8] c"\09--mem-clock <Mhz>\0A\09--core-clock <Mhz>\0A\09--mem-vddc-idx <index>\0A\00"
@.str.10 = [75 x i8] c"\09--core-vddc-idx <index>\0A\09--mvdd <mV>\0A\09--vddci <mV>\0A\09--core-vddc-off <mV>\0A\00"
@.str.11 = [45 x i8] c"\09--vddc-gfx-off <mV>\0A\09--vddc-table-set <mV>\0A\00"
@.str.12 = [79 x i8] c"Display options (shows the selected states, or if none selected, all states):\0A\00"
@.str.13 = [42 x i8] c"\09--show-mem\0A\09--show-core\0A\09--show-voltage\0A\00"
@.str.14 = [31 x i8] c"\09--show-fanspeed\0A\09--show-temp\0A\00"
define void @PrintUsage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([156 x i8], [156 x i8]* @.str.2, i64 0, i64 0), i8* %4)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.4, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.5, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([109 x i8], [109 x i8]* @.str.6, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.7, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.8, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.9, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.10, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.11, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.12, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.13, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.14, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"OhGodATool %s\0A\00"
@.str.1 = [7 x i8] c"v1.2.1\00"
@.str.2 = [156 x i8] c"Usage: %s [-i GPUIdx | -f VBIOSFile] [Generic Options] [--core-state StateIdx] [--mem-state StateIdx] [--volt-state StateIdx] [State modification options]\0A\00"
@str = [30 x i8] c"Generic modification options:\00"
@str.15 = [77 x i8] c"\09--set-fanspeed <percent>\0A\09--set-tdp <W>\0A\09--set-tdc <W>\0A\09--set-max-power <W>\00"
@str.16 = [55 x i8] c"\09--set-max-core-clock <Mhz>\0A\09--set-max-mem-clock <Mhz>\00"
@str.17 = [108 x i8] c"State selection options (must be used before state modification options; -1 indicates last existing state):\00"
@str.18 = [65 x i8] c"\09--core-state <index>\0A\09--mem-state <index>\0A\09--volt-state <index>\00"
@str.19 = [28 x i8] c"State modification options:\00"
@str.20 = [63 x i8] c"\09--mem-clock <Mhz>\0A\09--core-clock <Mhz>\0A\09--mem-vddc-idx <index>\00"
@str.21 = [74 x i8] c"\09--core-vddc-idx <index>\0A\09--mvdd <mV>\0A\09--vddci <mV>\0A\09--core-vddc-off <mV>\00"
@str.22 = [44 x i8] c"\09--vddc-gfx-off <mV>\0A\09--vddc-table-set <mV>\00"
@str.23 = [78 x i8] c"Display options (shows the selected states, or if none selected, all states):\00"
@str.24 = [41 x i8] c"\09--show-mem\0A\09--show-core\0A\09--show-voltage\00"
@str.25 = [30 x i8] c"\09--show-fanspeed\0A\09--show-temp\00"
define void @PrintUsage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([156 x i8], [156 x i8]* @.str.2, i64 0, i64 0), i8* %0)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([77 x i8], [77 x i8]* @str.15, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str.16, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([108 x i8], [108 x i8]* @str.17, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @str.18, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.19, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str.20, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @str.21, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.22, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([78 x i8], [78 x i8]* @str.23, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.24, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.25, i64 0, i64 0))
ret void
}