#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 atoi(char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
scalar_t__ seteuid(int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcmp(char *, char *);
int /*<<< orphan*/ sys_cpu_pstate(int, int, int);
scalar_t__ sys_cpu_setall(char *, char *);
int /*<<< orphan*/ sys_cpufreq_set(char *, char *);
int main(int argc, char *argv[]) {
  if (argc < 3) {
    fprintf(stderr, "Invalid command. Syntax:\n");
    fprintf(stderr,
            "\tfreqset <frequency|governor> <freq-level|governor-name>\n");
    fprintf(stderr, "\tfreqset <pstate> <min> <max> <turbo>\n");
    return 1;
  }
  if (seteuid(0)) {
    fprintf(stderr, "Unable to assume root privileges\n");
    return 1;
  }
  if (!strcmp(argv[1], "frequency")) {
    if (sys_cpu_setall("scaling_setspeed", argv[2]) == 0) {
      fprintf(stderr, "Unable to open frequency interface for writing.\n");
      return 1;
    }
    return 0;
  } else if (!strcmp(argv[1], "governor")) {
    if (sys_cpu_setall("scaling_governor", argv[2]) == 0) {
      fprintf(stderr, "Unable to open governor interface for writing.\n");
      return 1;
    }
    if (!strcmp(argv[2], "ondemand"))
      sys_cpufreq_set("ondemand/ignore_nice_load", "0");
    else if (!strcmp(argv[2], "conservative"))
      sys_cpufreq_set("conservative/ignore_nice_load", "0");
    return 0;
  } else if (!strcmp(argv[1], "pstate")) {
    int min, max, turbo;
    if (argc < 5) {
      fprintf(stderr, "Invalid number of arguments.\n");
      return 1;
    }
    min = atoi(argv[2]);
    max = atoi(argv[3]);
    turbo = atoi(argv[4]);
    if ((min < 0) || (min > 100) || (max < 0) || (max > 100) || (turbo < 0) ||
        (turbo > 1)) {
      fprintf(stderr, "Invalid pstate values.\n");
      return 1;
    }
    sys_cpu_pstate(min, max, turbo);
    return 0;
  } else {
    fprintf(stderr, "Unknown command.\n");
    return 1;
  }
  return -1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    11db <main+0x6b>
mov    0x2e49(%rip),%rax
mov    (%rax),%edi
lea    0xe60(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e34(%rip),%rax
mov    (%rax),%edi
lea    0xe65(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e1f(%rip),%rax
mov    (%rax),%edi
lea    0xe8a(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1452 <main+0x2e2>
xor    %edi,%edi
call   1090 <seteuid@plt>
cmp    $0x0,%rax
je     120d <main+0x9d>
mov    0x2ded(%rip),%rax
mov    (%rax),%edi
lea    0xe7f(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1452 <main+0x2e2>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe81(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1275 <main+0x105>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
lea    0xe6e(%rip),%rdi
call   1050 <sys_cpu_setall@plt>
cmp    $0x0,%rax
jne    1269 <main+0xf9>
mov    0x2d91(%rip),%rax
mov    (%rax),%edi
lea    0xe60(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1452 <main+0x2e2>
movl   $0x0,-0x4(%rbp)
jmp    1452 <main+0x2e2>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe6d(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1347 <main+0x1d7>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
lea    0xe48(%rip),%rdi
call   1050 <sys_cpu_setall@plt>
cmp    $0x0,%rax
jne    12d1 <main+0x161>
mov    0x2d29(%rip),%rax
mov    (%rax),%edi
lea    0xe3a(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1452 <main+0x2e2>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xe4a(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1306 <main+0x196>
lea    0xe3e(%rip),%rdi
lea    0xe51(%rip),%rsi
call   1070 <sys_cpufreq_set@plt>
jmp    133b <main+0x1cb>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xe3a(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1336 <main+0x1c6>
lea    0xe32(%rip),%rdi
lea    0xe1c(%rip),%rsi
call   1070 <sys_cpufreq_set@plt>
jmp    133b <main+0x1cb>
movl   $0x0,-0x4(%rbp)
jmp    1452 <main+0x2e2>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe24(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1436 <main+0x2c6>
cmpl   $0x5,-0x8(%rbp)
jge    138f <main+0x21f>
mov    0x2c6b(%rip),%rax
mov    (%rax),%edi
lea    0xe03(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1452 <main+0x2e2>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1080 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
call   1080 <atoi@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
call   1080 <atoi@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     13fb <main+0x28b>
cmpl   $0x64,-0x14(%rbp)
jg     13fb <main+0x28b>
cmpl   $0x0,-0x18(%rbp)
jl     13fb <main+0x28b>
cmpl   $0x64,-0x18(%rbp)
jg     13fb <main+0x28b>
cmpl   $0x0,-0x1c(%rbp)
jl     13fb <main+0x28b>
cmpl   $0x1,-0x1c(%rbp)
jle    141c <main+0x2ac>
mov    0x2bde(%rip),%rax
mov    (%rax),%edi
lea    0xd94(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1452 <main+0x2e2>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
call   1060 <sys_cpu_pstate@plt>
movl   $0x0,-0x4(%rbp)
jmp    1452 <main+0x2e2>
mov    0x2ba3(%rip),%rax
mov    (%rax),%edi
lea    0xd71(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
cmp    $0x2,%edi
jg     11a7 <main+0x37>
mov    0x2e60(%rip),%rbx
mov    (%rbx),%edi
lea    0xe77(%rip),%rsi
call   1040 <fprintf@plt>
mov    (%rbx),%edi
lea    0xe83(%rip),%rsi
call   1040 <fprintf@plt>
mov    (%rbx),%edi
lea    0xeaf(%rip),%rsi
jmp    11c8 <main+0x58>
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %edi,%edi
call   1090 <seteuid@plt>
test   %rax,%rax
je     11d9 <main+0x69>
mov    0x2e21(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    0x8(%rbx),%r14
lea    0xeb9(%rip),%rsi
mov    %r14,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     122c <main+0xbc>
lea    0xefa(%rip),%rsi
mov    %r14,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1258 <main+0xe8>
lea    0xf70(%rip),%rsi
mov    %r14,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     12b9 <main+0x149>
mov    0x2dbf(%rip),%rax
mov    (%rax),%edi
lea    0xf8d(%rip),%rsi
jmp    11c8 <main+0x58>
mov    0x10(%rbx),%rsi
lea    0xe70(%rip),%rdi
call   1050 <sys_cpu_setall@plt>
xor    %ebx,%ebx
test   %rax,%rax
jne    11d2 <main+0x62>
mov    0x2d96(%rip),%rax
mov    (%rax),%edi
lea    0xe65(%rip),%rsi
jmp    11c8 <main+0x58>
mov    0x10(%rbx),%rsi
lea    0xe86(%rip),%rdi
call   1050 <sys_cpu_setall@plt>
test   %rax,%rax
je     12d3 <main+0x163>
mov    0x10(%rbx),%rbx
lea    0xeb2(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1333 <main+0x1c3>
lea    0xec0(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
xor    %ebx,%ebx
test   %eax,%eax
jne    11d2 <main+0x62>
lea    0xeb4(%rip),%rdi
lea    0xe9e(%rip),%rsi
call   1070 <sys_cpufreq_set@plt>
jmp    11d2 <main+0x62>
cmp    $0x4,%ebp
ja     12e8 <main+0x178>
mov    0x2d1b(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
jmp    11c8 <main+0x58>
mov    0x2d06(%rip),%rax
mov    (%rax),%edi
lea    0xe17(%rip),%rsi
jmp    11c8 <main+0x58>
mov    0x10(%rbx),%rdi
call   1080 <atoi@plt>
mov    %eax,%r14d
mov    0x18(%rbx),%rdi
call   1080 <atoi@plt>
mov    %eax,%ebp
mov    0x20(%rbx),%rdi
call   1080 <atoi@plt>
cmp    $0x64,%r14d
ja     134d <main+0x1dd>
test   %ebp,%ebp
js     134d <main+0x1dd>
cmp    $0x64,%ebp
jg     134d <main+0x1dd>
test   %eax,%eax
js     134d <main+0x1dd>
cmp    $0x2,%eax
jge    134d <main+0x1dd>
mov    %r14d,%edi
mov    %ebp,%esi
mov    %eax,%edx
call   1060 <sys_cpu_pstate@plt>
xor    %ebx,%ebx
jmp    11d2 <main+0x62>
lea    0xdf9(%rip),%rdi
lea    0xe0c(%rip),%rsi
call   1070 <sys_cpufreq_set@plt>
xor    %ebx,%ebx
jmp    11d2 <main+0x62>
mov    0x2c8c(%rip),%rax
mov    (%rax),%edi
lea    0xe42(%rip),%rsi
jmp    11c8 <main+0x58>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [26 x i8] c"Invalid command. Syntax:\0A\00"
@.str.1 = [58 x i8] c"\09freqset <frequency|governor> <freq-level|governor-name>\0A\00"
@.str.2 = [39 x i8] c"\09freqset <pstate> <min> <max> <turbo>\0A\00"
@.str.3 = [34 x i8] c"Unable to assume root privileges\0A\00"
@.str.4 = [10 x i8] c"frequency\00"
@.str.5 = [17 x i8] c"scaling_setspeed\00"
@.str.6 = [49 x i8] c"Unable to open frequency interface for writing.\0A\00"
@.str.7 = [9 x i8] c"governor\00"
@.str.8 = [17 x i8] c"scaling_governor\00"
@.str.9 = [48 x i8] c"Unable to open governor interface for writing.\0A\00"
@.str.10 = [9 x i8] c"ondemand\00"
@.str.11 = [26 x i8] c"ondemand/ignore_nice_load\00"
@.str.12 = [2 x i8] c"0\00"
@.str.13 = [13 x i8] c"conservative\00"
@.str.14 = [30 x i8] c"conservative/ignore_nice_load\00"
@.str.15 = [7 x i8] c"pstate\00"
@.str.16 = [30 x i8] c"Invalid number of arguments.\0A\00"
@.str.17 = [24 x i8] c"Invalid pstate values.\0A\00"
@.str.18 = [18 x i8] c"Unknown command.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i32, i32* %4
%10 = icmp slt i32 %9, 3
br i1 %10, label %11, label %18
11: ; preds = %2
%12 = load i32, i32* @stderr
%13 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%14 = load i32, i32* @stderr
%15 = call i32 @fprintf(i32 %14, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0))
%16 = load i32, i32* @stderr
%17 = call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0))
store i32 1, i32* %3
br label %126
18: ; preds = %2
%19 = call i64 @seteuid(i32 0)
%20 = icmp ne i64 %19, 0
br i1 %20, label %21, label %24
21: ; preds = %18
%22 = load i32, i32* @stderr
%23 = call i32 @fprintf(i32 %22, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0))
store i32 1, i32* %3
br label %126
24: ; preds = %18
%25 = load i8**, i8*** %5
%26 = getelementptr inbounds i8*, i8** %25, i64 1
%27 = load i8*, i8** %26
%28 = call i32 @strcmp(i8* %27, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
%29 = icmp ne i32 %28, 0
br i1 %29, label %40, label %30
30: ; preds = %24
%31 = load i8**, i8*** %5
%32 = getelementptr inbounds i8*, i8** %31, i64 2
%33 = load i8*, i8** %32
%34 = call i64 @sys_cpu_setall(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i8* %33)
%35 = icmp eq i64 %34, 0
br i1 %35, label %36, label %39
36: ; preds = %30
%37 = load i32, i32* @stderr
%38 = call i32 @fprintf(i32 %37, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.6, i64 0, i64 0))
store i32 1, i32* %3
br label %126
39: ; preds = %30
store i32 0, i32* %3
br label %126
40: ; preds = %24
%41 = load i8**, i8*** %5
%42 = getelementptr inbounds i8*, i8** %41, i64 1
%43 = load i8*, i8** %42
%44 = call i32 @strcmp(i8* %43, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
%45 = icmp ne i32 %44, 0
br i1 %45, label %73, label %46
46: ; preds = %40
%47 = load i8**, i8*** %5
%48 = getelementptr inbounds i8*, i8** %47, i64 2
%49 = load i8*, i8** %48
%50 = call i64 @sys_cpu_setall(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), i8* %49)
%51 = icmp eq i64 %50, 0
br i1 %51, label %52, label %55
52: ; preds = %46
%53 = load i32, i32* @stderr
%54 = call i32 @fprintf(i32 %53, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.9, i64 0, i64 0))
store i32 1, i32* %3
br label %126
55: ; preds = %46
%56 = load i8**, i8*** %5
%57 = getelementptr inbounds i8*, i8** %56, i64 2
%58 = load i8*, i8** %57
%59 = call i32 @strcmp(i8* %58, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0))
%60 = icmp ne i32 %59, 0
br i1 %60, label %63, label %61
61: ; preds = %55
%62 = call i32 @sys_cpufreq_set(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0))
br label %72
63: ; preds = %55
%64 = load i8**, i8*** %5
%65 = getelementptr inbounds i8*, i8** %64, i64 2
%66 = load i8*, i8** %65
%67 = call i32 @strcmp(i8* %66, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.13, i64 0, i64 0))
%68 = icmp ne i32 %67, 0
br i1 %68, label %71, label %69
69: ; preds = %63
%70 = call i32 @sys_cpufreq_set(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0))
br label %71
71: ; preds = %69, %63
br label %72
72: ; preds = %71, %61
store i32 0, i32* %3
br label %126
73: ; preds = %40
%74 = load i8**, i8*** %5
%75 = getelementptr inbounds i8*, i8** %74, i64 1
%76 = load i8*, i8** %75
%77 = call i32 @strcmp(i8* %76, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0))
%78 = icmp ne i32 %77, 0
br i1 %78, label %123, label %79
79: ; preds = %73
%80 = load i32, i32* %4
%81 = icmp slt i32 %80, 5
br i1 %81, label %82, label %85
82: ; preds = %79
%83 = load i32, i32* @stderr
%84 = call i32 @fprintf(i32 %83, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.16, i64 0, i64 0))
store i32 1, i32* %3
br label %126
85: ; preds = %79
%86 = load i8**, i8*** %5
%87 = getelementptr inbounds i8*, i8** %86, i64 2
%88 = load i8*, i8** %87
%89 = call i32 @atoi(i8* %88)
store i32 %89, i32* %6
%90 = load i8**, i8*** %5
%91 = getelementptr inbounds i8*, i8** %90, i64 3
%92 = load i8*, i8** %91
%93 = call i32 @atoi(i8* %92)
store i32 %93, i32* %7
%94 = load i8**, i8*** %5
%95 = getelementptr inbounds i8*, i8** %94, i64 4
%96 = load i8*, i8** %95
%97 = call i32 @atoi(i8* %96)
store i32 %97, i32* %8
%98 = load i32, i32* %6
%99 = icmp slt i32 %98, 0
br i1 %99, label %115, label %100
100: ; preds = %85
%101 = load i32, i32* %6
%102 = icmp sgt i32 %101, 100
br i1 %102, label %115, label %103
103: ; preds = %100
%104 = load i32, i32* %7
%105 = icmp slt i32 %104, 0
br i1 %105, label %115, label %106
106: ; preds = %103
%107 = load i32, i32* %7
%108 = icmp sgt i32 %107, 100
br i1 %108, label %115, label %109
109: ; preds = %106
%110 = load i32, i32* %8
%111 = icmp slt i32 %110, 0
br i1 %111, label %115, label %112
112: ; preds = %109
%113 = load i32, i32* %8
%114 = icmp sgt i32 %113, 1
br i1 %114, label %115, label %118
115: ; preds = %112, %109, %106, %103, %100, %85
%116 = load i32, i32* @stderr
%117 = call i32 @fprintf(i32 %116, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.17, i64 0, i64 0))
store i32 1, i32* %3
br label %126
118: ; preds = %112
%119 = load i32, i32* %6
%120 = load i32, i32* %7
%121 = load i32, i32* %8
%122 = call i32 @sys_cpu_pstate(i32 %119, i32 %120, i32 %121)
store i32 0, i32* %3
br label %126
123: ; preds = %73
%124 = load i32, i32* @stderr
%125 = call i32 @fprintf(i32 %124, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.18, i64 0, i64 0))
store i32 1, i32* %3
br label %126
126: ; preds = %123, %118, %115, %82, %72, %52, %39, %36, %21, %11
%127 = load i32, i32* %3
ret i32 %127
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [26 x i8] c"Invalid command. Syntax:\0A\00"
@.str.1 = [58 x i8] c"\09freqset <frequency|governor> <freq-level|governor-name>\0A\00"
@.str.2 = [39 x i8] c"\09freqset <pstate> <min> <max> <turbo>\0A\00"
@.str.3 = [34 x i8] c"Unable to assume root privileges\0A\00"
@.str.4 = [10 x i8] c"frequency\00"
@.str.5 = [17 x i8] c"scaling_setspeed\00"
@.str.6 = [49 x i8] c"Unable to open frequency interface for writing.\0A\00"
@.str.7 = [9 x i8] c"governor\00"
@.str.8 = [17 x i8] c"scaling_governor\00"
@.str.9 = [48 x i8] c"Unable to open governor interface for writing.\0A\00"
@.str.10 = [9 x i8] c"ondemand\00"
@.str.11 = [26 x i8] c"ondemand/ignore_nice_load\00"
@.str.12 = [2 x i8] c"0\00"
@.str.13 = [13 x i8] c"conservative\00"
@.str.14 = [30 x i8] c"conservative/ignore_nice_load\00"
@.str.15 = [7 x i8] c"pstate\00"
@.str.16 = [30 x i8] c"Invalid number of arguments.\0A\00"
@.str.17 = [24 x i8] c"Invalid pstate values.\0A\00"
@.str.18 = [18 x i8] c"Unknown command.\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 3
br i1 %3, label %4, label %11
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0))
%9 = load i32, i32* @stderr
%10 = tail call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0))
br label %87
11: ; preds = %2
%12 = tail call i64 @seteuid(i32 0)
%13 = icmp eq i64 %12, 0
br i1 %13, label %17, label %14
14: ; preds = %11
%15 = load i32, i32* @stderr
%16 = tail call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0))
br label %87
17: ; preds = %11
%18 = getelementptr inbounds i8*, i8** %1, i64 1
%19 = load i8*, i8** %18
%20 = tail call i32 @strcmp(i8* dereferenceable(1) %19, i8* dereferenceable(10) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
%21 = icmp eq i32 %20, 0
br i1 %21, label %22, label %30
22: ; preds = %17
%23 = getelementptr inbounds i8*, i8** %1, i64 2
%24 = load i8*, i8** %23
%25 = tail call i64 @sys_cpu_setall(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i8* %24)
%26 = icmp eq i64 %25, 0
br i1 %26, label %27, label %87
27: ; preds = %22
%28 = load i32, i32* @stderr
%29 = tail call i32 @fprintf(i32 %28, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.6, i64 0, i64 0))
br label %87
30: ; preds = %17
%31 = tail call i32 @strcmp(i8* dereferenceable(1) %19, i8* dereferenceable(9) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
%32 = icmp eq i32 %31, 0
br i1 %32, label %33, label %52
33: ; preds = %30
%34 = getelementptr inbounds i8*, i8** %1, i64 2
%35 = load i8*, i8** %34
%36 = tail call i64 @sys_cpu_setall(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), i8* %35)
%37 = icmp eq i64 %36, 0
br i1 %37, label %38, label %41
38: ; preds = %33
%39 = load i32, i32* @stderr
%40 = tail call i32 @fprintf(i32 %39, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.9, i64 0, i64 0))
br label %87
41: ; preds = %33
%42 = load i8*, i8** %34
%43 = tail call i32 @strcmp(i8* dereferenceable(1) %42, i8* dereferenceable(9) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0))
%44 = icmp eq i32 %43, 0
br i1 %44, label %45, label %47
45: ; preds = %41
%46 = tail call i32 @sys_cpufreq_set(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0))
br label %87
47: ; preds = %41
%48 = tail call i32 @strcmp(i8* dereferenceable(1) %42, i8* dereferenceable(13) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.13, i64 0, i64 0))
%49 = icmp eq i32 %48, 0
br i1 %49, label %50, label %87
50: ; preds = %47
%51 = tail call i32 @sys_cpufreq_set(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0))
br label %87
52: ; preds = %30
%53 = tail call i32 @strcmp(i8* dereferenceable(1) %19, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0))
%54 = icmp eq i32 %53, 0
br i1 %54, label %55, label %84
55: ; preds = %52
%56 = icmp ult i32 %0, 5
br i1 %56, label %57, label %60
57: ; preds = %55
%58 = load i32, i32* @stderr
%59 = tail call i32 @fprintf(i32 %58, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.16, i64 0, i64 0))
br label %87
60: ; preds = %55
%61 = getelementptr inbounds i8*, i8** %1, i64 2
%62 = load i8*, i8** %61
%63 = tail call i32 @atoi(i8* %62)
%64 = getelementptr inbounds i8*, i8** %1, i64 3
%65 = load i8*, i8** %64
%66 = tail call i32 @atoi(i8* %65)
%67 = getelementptr inbounds i8*, i8** %1, i64 4
%68 = load i8*, i8** %67
%69 = tail call i32 @atoi(i8* %68)
%70 = icmp ugt i32 %63, 100
%71 = icmp slt i32 %66, 0
%72 = select i1 %70, i1 true, i1 %71
%73 = icmp sgt i32 %66, 100
%74 = select i1 %72, i1 true, i1 %73
%75 = icmp slt i32 %69, 0
%76 = select i1 %74, i1 true, i1 %75
%77 = icmp sgt i32 %69, 1
%78 = select i1 %76, i1 true, i1 %77
br i1 %78, label %79, label %82
79: ; preds = %60
%80 = load i32, i32* @stderr
%81 = tail call i32 @fprintf(i32 %80, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.17, i64 0, i64 0))
br label %87
82: ; preds = %60
%83 = tail call i32 @sys_cpu_pstate(i32 %63, i32 %66, i32 %69)
br label %87
84: ; preds = %52
%85 = load i32, i32* @stderr
%86 = tail call i32 @fprintf(i32 %85, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.18, i64 0, i64 0))
br label %87
87: ; preds = %57, %79, %82, %45, %50, %47, %22, %84, %38, %27, %14, %4
%88 = phi i32 [ 1, %4 ], [ 1, %14 ], [ 1, %84 ], [ 1, %38 ], [ 1, %27 ], [ 0, %22 ], [ 0, %47 ], [ 0, %50 ], [ 0, %45 ], [ 1, %57 ], [ 1, %79 ], [ 0, %82 ]
ret i32 %88
}