#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EXIT_FAILURE;
int EXIT_SUCCESS;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char const *, ...);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ strncmp(char *, char *, int);
int strtol(char *, char **, int);
int cpu_info(const char *prefix, const char *format, bool avg, bool hasc,
             const char *delimeter) {
  FILE *f = fopen("/proc/stat", "r");
  if (!f) {
    fputs("Can't open "
          "/proc/stat",
          stderr);
    return EXIT_FAILURE;
  }
  bool first = false;
  int cpus = 0;
  int wj_ = 0, tj_ = 0;
  static int wj[8], tj[8];
  for (;;) {
    char line[256];
    fgets(line, 256, f);
    if (!strncmp(line, "cpu", 3)) {
      char cpunum = 'a';
      char *p = line + 3;
      if (*p == ' ') {
        if (!avg)
          continue;
      } else
        cpunum = *p++;
      p++;
      for (int i = 0; i < 7; i++, p++) {
        int v = strtol(p, &p, 10);
        if (i < 3)
          wj_ += v;
        tj_ += v;
      }
      int usage = ((wj_ - wj[cpus]) * 100) / (tj_ - tj[cpus]);
      printf("%s", first ? delimeter : prefix);
      if (usage < 0 || usage > 100)
        usage = 0;
      if (hasc)
        printf(format, cpunum, usage);
      else
        printf(format, usage);
      wj[cpus] = wj_;
      tj[cpus] = tj_;
      cpus++;
      first = true;
    } else
      break;
  }
  fclose(f);
  printf("\n");
  fflush(stdout);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<cpu_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x170,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %ecx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
lea    0xe69(%rip),%rdi
lea    0xe55(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    11e5 <cpu_info+0x65>
mov    0x2e1a(%rip),%rax
mov    (%rax),%esi
lea    0xe33(%rip),%rdi
call   1060 <fputs@plt>
mov    0x2dfd(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    145c <cpu_info+0x2dc>
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
movl   $0x0,-0x40(%rbp)
lea    -0x140(%rbp),%rdi
mov    -0x30(%rbp),%rdx
mov    $0x100,%esi
call   1070 <fgets@plt>
lea    -0x140(%rbp),%rdi
lea    0xdf4(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1421 <cpu_info+0x2a1>
movb   $0x61,-0x141(%rbp)
lea    -0x140(%rbp),%rax
add    $0x3,%rax
mov    %rax,-0x150(%rbp)
mov    -0x150(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jne    1277 <cpu_info+0xf7>
cmpl   $0x0,-0x1c(%rbp)
jne    1272 <cpu_info+0xf2>
jmp    1201 <cpu_info+0x81>
jmp    1294 <cpu_info+0x114>
mov    -0x150(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x150(%rbp)
mov    (%rax),%al
mov    %al,-0x141(%rbp)
mov    -0x150(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x150(%rbp)
movl   $0x0,-0x154(%rbp)
cmpl   $0x7,-0x154(%rbp)
jge    1326 <cpu_info+0x1a6>
mov    -0x150(%rbp),%rdi
lea    -0x150(%rbp),%rsi
mov    $0xa,%edx
call   1080 <strtol@plt>
mov    %eax,-0x158(%rbp)
cmpl   $0x3,-0x154(%rbp)
jge    12f4 <cpu_info+0x174>
mov    -0x158(%rbp),%eax
add    -0x3c(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x158(%rbp),%eax
add    -0x40(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x154(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x154(%rbp)
mov    -0x150(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x150(%rbp)
jmp    12b0 <cpu_info+0x130>
mov    -0x3c(%rbp),%eax
movslq -0x38(%rbp),%rdx
lea    0x2d4c(%rip),%rcx
sub    (%rcx,%rdx,4),%eax
imul   $0x64,%eax,%eax
mov    -0x40(%rbp),%ecx
movslq -0x38(%rbp),%rsi
lea    0x2d58(%rip),%rdx
sub    (%rdx,%rsi,4),%ecx
cltd
idiv   %ecx
mov    %eax,-0x15c(%rbp)
cmpl   $0x0,-0x34(%rbp)
je     136e <cpu_info+0x1ee>
mov    -0x28(%rbp),%rax
mov    %rax,-0x168(%rbp)
jmp    1379 <cpu_info+0x1f9>
mov    -0x10(%rbp),%rax
mov    %rax,-0x168(%rbp)
mov    -0x168(%rbp),%rsi
lea    0xc95(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
cmpl   $0x0,-0x15c(%rbp)
jl     13a8 <cpu_info+0x228>
cmpl   $0x64,-0x15c(%rbp)
jle    13b2 <cpu_info+0x232>
movl   $0x0,-0x15c(%rbp)
cmpl   $0x0,-0x20(%rbp)
je     13d9 <cpu_info+0x259>
mov    -0x18(%rbp),%rdi
movsbl -0x141(%rbp),%esi
mov    -0x15c(%rbp),%edx
mov    $0x0,%al
call   1050 <printf@plt>
jmp    13ea <cpu_info+0x26a>
mov    -0x18(%rbp),%rdi
mov    -0x15c(%rbp),%esi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x3c(%rbp),%edx
movslq -0x38(%rbp),%rcx
lea    0x2c88(%rip),%rax
mov    %edx,(%rax,%rcx,4)
mov    -0x40(%rbp),%edx
movslq -0x38(%rbp),%rcx
lea    0x2c97(%rip),%rax
mov    %edx,(%rax,%rcx,4)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
movl   $0x1,-0x34(%rbp)
jmp    1426 <cpu_info+0x2a6>
jmp    142b <cpu_info+0x2ab>
jmp    1201 <cpu_info+0x81>
mov    -0x30(%rbp),%rdi
call   1040 <fclose@plt>
lea    0xbe4(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0x2b87(%rip),%rax
mov    (%rax),%edi
call   1090 <fflush@plt>
mov    0x2b71(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x170,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpu_info>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x148,%rsp
mov    %r8,0x38(%rsp)
mov    %ecx,0x10(%rsp)
mov    %edx,0x14(%rsp)
mov    %rsi,0x20(%rsp)
mov    %rdi,0x30(%rsp)
lea    0xe4e(%rip),%rdi
lea    0xe3a(%rip),%rsi
call   10b0 <fopen@plt>
test   %rax,%rax
je     1229 <cpu_info+0x99>
mov    %rax,%rbx
lea    0x40(%rsp),%rbp
mov    %rbp,%rdi
mov    $0x100,%esi
mov    %rax,%rdx
call   1080 <fgets@plt>
lea    0xe29(%rip),%rsi
mov    %rbp,%rdi
mov    $0x3,%edx
call   1040 <strncmp@plt>
test   %eax,%eax
je     1259 <cpu_info+0xc9>
mov    %rbx,%rdi
call   1050 <fclose@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x2db7(%rip),%rax
mov    (%rax),%edi
call   10a0 <fflush@plt>
mov    0x2da1(%rip),%rax
jmp    1245 <cpu_info+0xb5>
mov    0x2db0(%rip),%rax
mov    (%rax),%esi
lea    0xdc9(%rip),%rdi
call   1070 <fputs@plt>
mov    0x2d93(%rip),%rax
mov    (%rax),%eax
add    $0x148,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0x61,%r13d
xor    %r12d,%r12d
xor    %r14d,%r14d
xor    %eax,%eax
mov    %rax,0x28(%rsp)
movl   $0x0,0xc(%rsp)
mov    %rbx,0x18(%rsp)
jmp    12ec <cpu_info+0x15c>
mov    0x20(%rsp),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x18(%rsp),%rbx
lea    0x2dfa(%rip),%rax
mov    %r14d,(%rax,%rbp,4)
lea    0x2e0f(%rip),%rax
mov    %r12d,(%rax,%rbp,4)
add    $0x1,%ebp
mov    %rbp,0x28(%rsp)
movl   $0x1,0xc(%rsp)
lea    0x40(%rsp),%rbp
mov    $0x61,%r13d
mov    %rbp,%rdi
mov    $0x100,%esi
mov    %rbx,%rdx
call   1080 <fgets@plt>
mov    %rbp,%rdi
lea    0xd3e(%rip),%rsi
mov    $0x3,%edx
call   1040 <strncmp@plt>
test   %eax,%eax
jne    1200 <cpu_info+0x70>
movzbl 0x43(%rsp),%eax
mov    %eax,%r15d
cmp    $0x20,%al
cmove  %r13d,%r15d
jne    1303 <cpu_info+0x173>
cmpl   $0x0,0x14(%rsp)
je     12c0 <cpu_info+0x130>
xor    %ecx,%ecx
cmp    $0x20,%al
setne  %cl
lea    0x4(%rcx,%rbp,1),%rdi
mov    %rdi,(%rsp)
mov    %rsp,%r13
mov    %r13,%rsi
mov    $0xa,%edx
call   1090 <strtol@plt>
add    %eax,%r14d
add    %eax,%r12d
mov    (%rsp),%rdi
add    $0x1,%rdi
mov    %rdi,(%rsp)
mov    %r13,%rsi
mov    $0xa,%edx
call   1090 <strtol@plt>
add    %eax,%r14d
add    %eax,%r12d
mov    (%rsp),%rdi
add    $0x1,%rdi
mov    %rdi,(%rsp)
mov    %r13,%rsi
mov    $0xa,%edx
call   1090 <strtol@plt>
add    %eax,%r14d
add    %eax,%r12d
mov    (%rsp),%rdi
add    $0x1,%rdi
mov    %rdi,(%rsp)
mov    %r13,%rsi
mov    $0xa,%edx
call   1090 <strtol@plt>
mov    %eax,%ebx
add    %r12d,%ebx
mov    (%rsp),%rdi
add    $0x1,%rdi
mov    %rdi,(%rsp)
mov    %r13,%rsi
mov    $0xa,%edx
call   1090 <strtol@plt>
mov    %eax,%ebp
add    %ebx,%ebp
mov    (%rsp),%rdi
add    $0x1,%rdi
mov    %rdi,(%rsp)
mov    %r13,%rsi
mov    $0xa,%edx
call   1090 <strtol@plt>
mov    %eax,%ebx
add    %ebp,%ebx
mov    (%rsp),%rdi
add    $0x1,%rdi
mov    %rdi,(%rsp)
mov    %r13,%rsi
mov    $0xa,%edx
call   1090 <strtol@plt>
mov    %eax,%r12d
addq   $0x1,(%rsp)
add    %ebx,%r12d
mov    0x28(%rsp),%rbp
movslq %ebp,%rbp
mov    %r14d,%eax
lea    0x2c9b(%rip),%rcx
sub    (%rcx,%rbp,4),%eax
imul   $0x64,%eax,%eax
mov    %r12d,%ecx
lea    0x2cab(%rip),%rdx
sub    (%rdx,%rbp,4),%ecx
cltd
idiv   %ecx
mov    %eax,%r13d
cmpl   $0x0,0xc(%rsp)
mov    0x38(%rsp),%rsi
cmove  0x30(%rsp),%rsi
lea    0xbf7(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
cmp    $0x65,%r13d
mov    $0x0,%eax
cmovae %eax,%r13d
cmpl   $0x0,0x10(%rsp)
je     127b <cpu_info+0xeb>
movsbl %r15b,%esi
mov    0x20(%rsp),%rdi
mov    %r13d,%edx
xor    %eax,%eax
call   1060 <printf@plt>
jmp    128a <cpu_info+0xfa>

LLVM IR (-O0):
@.str = [11 x i8] c"/proc/stat\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [22 x i8] c"Can't open /proc/stat\00"
@stderr = global i32 0
@EXIT_FAILURE = global i32 0
@cpu_info.wj = internal global [8 x i32] zeroinitializer
@cpu_info.tj = internal global [8 x i32] zeroinitializer
@.str.3 = [4 x i8] c"cpu\00"
@.str.4 = [3 x i8] c"%s\00"
@.str.5 = [2 x i8] c"\0A\00"
@stdout = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @cpu_info(i8* %0, i8* %1, i32 %2, i32 %3, i8* %4) {
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i32*
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca [256 x i8]
%18 = alloca i8
%19 = alloca i8*
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
store i8* %0, i8** %7
store i8* %1, i8** %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i8* %4, i8** %11
%23 = call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %23, i32** %12
%24 = load i32*, i32** %12
%25 = icmp ne i32* %24, null
br i1 %25, label %30, label %26
26: ; preds = %5
%27 = load i32, i32* @stderr
%28 = call i32 @fputs(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 %27)
%29 = load i32, i32* @EXIT_FAILURE
store i32 %29, i32* %6
br label %141
30: ; preds = %5
store i32 0, i32* %13
store i32 0, i32* %14
store i32 0, i32* %15
store i32 0, i32* %16
br label %31
31: ; preds = %133, %48, %30
%32 = getelementptr inbounds [256 x i8], [256 x i8]* %17, i64 0, i64 0
%33 = load i32*, i32** %12
%34 = call i32 @fgets(i8* %32, i32 256, i32* %33)
%35 = getelementptr inbounds [256 x i8], [256 x i8]* %17, i64 0, i64 0
%36 = call i32 @strncmp(i8* %35, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 3)
%37 = icmp ne i32 %36, 0
br i1 %37, label %132, label %38
38: ; preds = %31
store i8 97, i8* %18
%39 = getelementptr inbounds [256 x i8], [256 x i8]* %17, i64 0, i64 0
%40 = getelementptr inbounds i8, i8* %39, i64 3
store i8* %40, i8** %19
%41 = load i8*, i8** %19
%42 = load i8, i8* %41
%43 = sext i8 %42 to i32
%44 = icmp eq i32 %43, 32
br i1 %44, label %45, label %50
45: ; preds = %38
%46 = load i32, i32* %9
%47 = icmp ne i32 %46, 0
br i1 %47, label %49, label %48
48: ; preds = %45
br label %31
49: ; preds = %45
br label %54
50: ; preds = %38
%51 = load i8*, i8** %19
%52 = getelementptr inbounds i8, i8* %51, i32 1
store i8* %52, i8** %19
%53 = load i8, i8* %51
store i8 %53, i8* %18
br label %54
54: ; preds = %50, %49
%55 = load i8*, i8** %19
%56 = getelementptr inbounds i8, i8* %55, i32 1
store i8* %56, i8** %19
store i32 0, i32* %20
br label %57
57: ; preds = %73, %54
%58 = load i32, i32* %20
%59 = icmp slt i32 %58, 7
br i1 %59, label %60, label %78
60: ; preds = %57
%61 = load i8*, i8** %19
%62 = call i32 @strtol(i8* %61, i8** %19, i32 10)
store i32 %62, i32* %21
%63 = load i32, i32* %20
%64 = icmp slt i32 %63, 3
br i1 %64, label %65, label %69
65: ; preds = %60
%66 = load i32, i32* %21
%67 = load i32, i32* %15
%68 = add nsw i32 %67, %66
store i32 %68, i32* %15
br label %69
69: ; preds = %65, %60
%70 = load i32, i32* %21
%71 = load i32, i32* %16
%72 = add nsw i32 %71, %70
store i32 %72, i32* %16
br label %73
73: ; preds = %69
%74 = load i32, i32* %20
%75 = add nsw i32 %74, 1
store i32 %75, i32* %20
%76 = load i8*, i8** %19
%77 = getelementptr inbounds i8, i8* %76, i32 1
store i8* %77, i8** %19
br label %57
78: ; preds = %57
%79 = load i32, i32* %15
%80 = load i32, i32* %14
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds [8 x i32], [8 x i32]* @cpu_info.wj, i64 0, i64 %81
%83 = load i32, i32* %82
%84 = sub nsw i32 %79, %83
%85 = mul nsw i32 %84, 100
%86 = load i32, i32* %16
%87 = load i32, i32* %14
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds [8 x i32], [8 x i32]* @cpu_info.tj, i64 0, i64 %88
%90 = load i32, i32* %89
%91 = sub nsw i32 %86, %90
%92 = sdiv i32 %85, %91
store i32 %92, i32* %22
%93 = load i32, i32* %13
%94 = icmp ne i32 %93, 0
br i1 %94, label %95, label %97
95: ; preds = %78
%96 = load i8*, i8** %11
br label %99
97: ; preds = %78
%98 = load i8*, i8** %7
br label %99
99: ; preds = %97, %95
%100 = phi i8* [ %96, %95 ], [ %98, %97 ]
%101 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* %100)
%102 = load i32, i32* %22
%103 = icmp slt i32 %102, 0
br i1 %103, label %107, label %104
104: ; preds = %99
%105 = load i32, i32* %22
%106 = icmp sgt i32 %105, 100
br i1 %106, label %107, label %108
107: ; preds = %104, %99
store i32 0, i32* %22
br label %108
108: ; preds = %107, %104
%109 = load i32, i32* %10
%110 = icmp ne i32 %109, 0
br i1 %110, label %111, label %117
111: ; preds = %108
%112 = load i8*, i8** %8
%113 = load i8, i8* %18
%114 = sext i8 %113 to i32
%115 = load i32, i32* %22
%116 = call i32 (i8*, ...) @printf(i8* %112, i32 %114, i32 %115)
br label %121
117: ; preds = %108
%118 = load i8*, i8** %8
%119 = load i32, i32* %22
%120 = call i32 (i8*, ...) @printf(i8* %118, i32 %119)
br label %121
121: ; preds = %117, %111
%122 = load i32, i32* %15
%123 = load i32, i32* %14
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds [8 x i32], [8 x i32]* @cpu_info.wj, i64 0, i64 %124
store i32 %122, i32* %125
%126 = load i32, i32* %16
%127 = load i32, i32* %14
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds [8 x i32], [8 x i32]* @cpu_info.tj, i64 0, i64 %128
store i32 %126, i32* %129
%130 = load i32, i32* %14
%131 = add nsw i32 %130, 1
store i32 %131, i32* %14
store i32 1, i32* %13
br label %133
132: ; preds = %31
br label %134
133: ; preds = %121
br label %31
134: ; preds = %132
%135 = load i32*, i32** %12
%136 = call i32 @fclose(i32* %135)
%137 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%138 = load i32, i32* @stdout
%139 = call i32 @fflush(i32 %138)
%140 = load i32, i32* @EXIT_SUCCESS
store i32 %140, i32* %6
br label %141
141: ; preds = %134, %26
%142 = load i32, i32* %6
ret i32 %142
}

LLVM IR (-O2):
@.str = [11 x i8] c"/proc/stat\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [22 x i8] c"Can't open /proc/stat\00"
@stderr = global i32 0
@EXIT_FAILURE = global i32 0
@cpu_info.wj = internal unnamed_addr global [8 x i32] zeroinitializer
@cpu_info.tj = internal unnamed_addr global [8 x i32] zeroinitializer
@.str.3 = [4 x i8] c"cpu\00"
@.str.4 = [3 x i8] c"%s\00"
@stdout = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @cpu_info(i8* %0, i8* nocapture %1, i32 %2, i32 %3, i8* %4) {
%6 = alloca [256 x i8]
%7 = alloca i8*
%8 = tail call i32* @fopen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%9 = icmp eq i32* %8, null
br i1 %9, label %20, label %10
10: ; preds = %5
%11 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%12 = call i32 @fgets(i8* %11, i32 256, i32* %8)
%13 = call i32 @strncmp(i8* %11, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 3)
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %96
15: ; preds = %10
%16 = bitcast i8** %7 to i8*
%17 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 3
%18 = icmp ne i32 %2, 0
%19 = icmp eq i32 %3, 0
br label %23
20: ; preds = %5
%21 = load i32, i32* @stderr
%22 = tail call i32 @fputs(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 %21)
br label %101
23: ; preds = %15, %88
%24 = phi i32 [ 0, %15 ], [ %92, %88 ]
%25 = phi i32 [ 0, %15 ], [ %91, %88 ]
%26 = phi i32 [ 0, %15 ], [ %90, %88 ]
%27 = phi i32 [ 0, %15 ], [ %89, %88 ]
%28 = load i8, i8* %17
%29 = icmp ne i8 %28, 32
%30 = or i1 %29, %18
%31 = select i1 %29, i8 %28, i8 97
br i1 %30, label %32, label %88
32: ; preds = %23
%33 = select i1 %29, i64 4, i64 3
%34 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 %33
%35 = getelementptr inbounds i8, i8* %34, i64 1
store i8* %35, i8** %7
%36 = call i32 @strtol(i8* %35, i8** %7, i32 10)
%37 = add nsw i32 %36, %25
%38 = add nsw i32 %36, %24
%39 = load i8*, i8** %7
%40 = getelementptr inbounds i8, i8* %39, i64 1
store i8* %40, i8** %7
%41 = call i32 @strtol(i8* %40, i8** %7, i32 10)
%42 = add nsw i32 %41, %37
%43 = add nsw i32 %41, %38
%44 = load i8*, i8** %7
%45 = getelementptr inbounds i8, i8* %44, i64 1
store i8* %45, i8** %7
%46 = call i32 @strtol(i8* %45, i8** %7, i32 10)
%47 = add nsw i32 %46, %42
%48 = add nsw i32 %46, %43
%49 = load i8*, i8** %7
%50 = getelementptr inbounds i8, i8* %49, i64 1
store i8* %50, i8** %7
%51 = call i32 @strtol(i8* %50, i8** %7, i32 10)
%52 = add nsw i32 %51, %48
%53 = load i8*, i8** %7
%54 = getelementptr inbounds i8, i8* %53, i64 1
store i8* %54, i8** %7
%55 = call i32 @strtol(i8* %54, i8** %7, i32 10)
%56 = add nsw i32 %55, %52
%57 = load i8*, i8** %7
%58 = getelementptr inbounds i8, i8* %57, i64 1
store i8* %58, i8** %7
%59 = call i32 @strtol(i8* %58, i8** %7, i32 10)
%60 = add nsw i32 %59, %56
%61 = load i8*, i8** %7
%62 = getelementptr inbounds i8, i8* %61, i64 1
store i8* %62, i8** %7
%63 = call i32 @strtol(i8* %62, i8** %7, i32 10)
%64 = add nsw i32 %63, %60
%65 = load i8*, i8** %7
%66 = getelementptr inbounds i8, i8* %65, i64 1
store i8* %66, i8** %7
%67 = sext i32 %26 to i64
%68 = getelementptr inbounds [8 x i32], [8 x i32]* @cpu_info.wj, i64 0, i64 %67
%69 = load i32, i32* %68
%70 = sub nsw i32 %47, %69
%71 = mul nsw i32 %70, 100
%72 = getelementptr inbounds [8 x i32], [8 x i32]* @cpu_info.tj, i64 0, i64 %67
%73 = load i32, i32* %72
%74 = sub nsw i32 %64, %73
%75 = sdiv i32 %71, %74
%76 = icmp eq i32 %27, 0
%77 = select i1 %76, i8* %0, i8* %4
%78 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* %77)
%79 = icmp ugt i32 %75, 100
%80 = select i1 %79, i32 0, i32 %75
br i1 %19, label %84, label %81
81: ; preds = %32
%82 = sext i8 %31 to i32
%83 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %1, i32 %82, i32 %80)
br label %86
84: ; preds = %32
%85 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %1, i32 %80)
br label %86
86: ; preds = %84, %81
store i32 %47, i32* %68
store i32 %64, i32* %72
%87 = add nsw i32 %26, 1
br label %88
88: ; preds = %23, %86
%89 = phi i32 [ 1, %86 ], [ %27, %23 ]
%90 = phi i32 [ %87, %86 ], [ %26, %23 ]
%91 = phi i32 [ %47, %86 ], [ %25, %23 ]
%92 = phi i32 [ %64, %86 ], [ %24, %23 ]
%93 = call i32 @fgets(i8* %11, i32 256, i32* %8)
%94 = call i32 @strncmp(i8* %11, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 3)
%95 = icmp eq i32 %94, 0
br i1 %95, label %23, label %96
96: ; preds = %88, %10
%97 = call i32 @fclose(i32* %8)
%98 = call i32 @putchar(i32 10)
%99 = load i32, i32* @stdout
%100 = call i32 @fflush(i32 %99)
br label %101
101: ; preds = %96, %20
%102 = phi i32* [ @EXIT_SUCCESS, %96 ], [ @EXIT_FAILURE, %20 ]
%103 = load i32, i32* %102
ret i32 %103
}