#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 */
float atof(char *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ removeNewLine(char *);
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
int /*<<< orphan*/ strncmp(char *, char *, int);
void readProcCpuInfo(char *model, char *cache) {
  FILE *info;
  char *cp;
  int cpus = 0;
  char *buffer_end;
  char buffer[1024];
  char vendor_id[1024];
  char model_name[1024];
  char cpu_MHz[1024];
  int i;
  float f;
  vendor_id[0] = model_name[0] = cpu_MHz[0] = model[0] = cache[0] = '\0';
  info = fopen("/proc/cpuinfo", "r");
  if (info != NULL) {
    while (NULL != fgets(buffer, 1024, info)) {
      buffer_end = buffer + strlen(buffer);
      cp = buffer;
      if (!strncmp(buffer, "processor", 9)) {
        cpus++;
      } else if (!strncmp(buffer, "vendor_id", 9)) {
        cp += strlen("vendor_id");
        while (cp < buffer_end && (*cp == ' ' || *cp == ':' || *cp == '\t'))
          cp++;
        if (cp < buffer_end) {
          strcpy(vendor_id, cp);
        }
        removeNewLine(vendor_id);
      } else if (!strncmp(buffer, "model name", 10)) {
        cp += strlen("model name");
        while (cp < buffer_end && (*cp == ' ' || *cp == ':' || *cp == '\t'))
          cp++;
        if (cp < buffer_end) {
          strcpy(model_name, cp);
        }
        removeNewLine(model_name);
      } else if (!strncmp(buffer, "cpu MHz", 7)) {
        cp += strlen("cpu MHz");
        while (cp < buffer_end && (*cp == ' ' || *cp == ':' || *cp == '\t'))
          cp++;
        if (cp < buffer_end) {
          strcpy(cpu_MHz, cp);
        }
        removeNewLine(cpu_MHz);
      } else if (!strncmp(buffer, "cache size", 10)) {
        cp += strlen("cache size");
        while (cp < buffer_end && (*cp == ' ' || *cp == ':' || *cp == '\t'))
          cp++;
        if (cp < buffer_end) {
          strcpy(cache, cp);
        }
        removeNewLine(cache);
      }
    }
    if (cpus > 1) {
      if (cpus == 2) {
        strcpy(model, "Dual");
      } else {
        sprintf(model, "%d CPU", cpus);
      }
    }
    cp = model + strlen(model);
    if (vendor_id[0] != '\0') {
      if (cp != model) {
        *cp++ = ' ';
      }
      strcpy(cp, vendor_id);
      cp += strlen(vendor_id);
    }
    if (model_name[0] != '\0') {
      if (cp != model) {
        *cp++ = ' ';
      }
      strcpy(cp, model_name);
      cp += strlen(model_name);
    }
    if (cpu_MHz[0] != '\0') {
      if (cp != model) {
        *cp++ = ' ';
      }
      f = atof(cpu_MHz);
      i = (int)(f + 0.5f);
      sprintf(cpu_MHz, "%dMHz", i);
      strcpy(cp, cpu_MHz);
      cp += strlen(cpu_MHz);
    }
    fclose(info);
  }
}


x86 assembly (clang, -O0):
<readProcCpuInfo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1050,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
movb   $0x0,-0x1030(%rbp)
movb   $0x0,-0xc30(%rbp)
movb   $0x0,-0x830(%rbp)
lea    0xe30(%rip),%rdi
lea    0xe3f(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     182c <readProcCpuInfo+0x69c>
jmp    11f4 <readProcCpuInfo+0x64>
lea    -0x430(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    $0x400,%esi
call   1080 <fgets@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     1660 <readProcCpuInfo+0x4d0>
lea    -0x430(%rbp),%rax
mov    %rax,-0x1040(%rbp)
lea    -0x430(%rbp),%rdi
call   1070 <strlen@plt>
mov    %eax,%ecx
mov    -0x1040(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
lea    -0x430(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0x430(%rbp),%rdi
lea    0xdb5(%rip),%rsi
mov    $0x9,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    127e <readProcCpuInfo+0xee>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    165b <readProcCpuInfo+0x4cb>
lea    -0x430(%rbp),%rdi
lea    0xd90(%rip),%rsi
mov    $0x9,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1373 <readProcCpuInfo+0x1e3>
lea    0xd76(%rip),%rdi
call   1070 <strlen@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rcx
xor    %eax,%eax
cmp    -0x30(%rbp),%rcx
mov    %al,-0x1041(%rbp)
jae    1320 <readProcCpuInfo+0x190>
mov    -0x20(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x1042(%rbp)
je     1314 <readProcCpuInfo+0x184>
mov    -0x20(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x3a,%ecx
mov    %al,-0x1042(%rbp)
je     1314 <readProcCpuInfo+0x184>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x1042(%rbp)
mov    -0x1042(%rbp),%al
mov    %al,-0x1041(%rbp)
mov    -0x1041(%rbp),%al
test   $0x1,%al
jne    1333 <readProcCpuInfo+0x1a3>
jmp    1344 <readProcCpuInfo+0x1b4>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    12bb <readProcCpuInfo+0x12b>
mov    -0x20(%rbp),%rax
cmp    -0x30(%rbp),%rax
jae    1362 <readProcCpuInfo+0x1d2>
lea    -0x830(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <strcpy@plt>
lea    -0x830(%rbp),%rdi
call   1090 <removeNewLine@plt>
jmp    1656 <readProcCpuInfo+0x4c6>
lea    -0x430(%rbp),%rdi
lea    0xca5(%rip),%rsi
mov    $0xa,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1468 <readProcCpuInfo+0x2d8>
lea    0xc8b(%rip),%rdi
call   1070 <strlen@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rcx
xor    %eax,%eax
cmp    -0x30(%rbp),%rcx
mov    %al,-0x1043(%rbp)
jae    1415 <readProcCpuInfo+0x285>
mov    -0x20(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x1044(%rbp)
je     1409 <readProcCpuInfo+0x279>
mov    -0x20(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x3a,%ecx
mov    %al,-0x1044(%rbp)
je     1409 <readProcCpuInfo+0x279>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x1044(%rbp)
mov    -0x1044(%rbp),%al
mov    %al,-0x1043(%rbp)
mov    -0x1043(%rbp),%al
test   $0x1,%al
jne    1428 <readProcCpuInfo+0x298>
jmp    1439 <readProcCpuInfo+0x2a9>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    13b0 <readProcCpuInfo+0x220>
mov    -0x20(%rbp),%rax
cmp    -0x30(%rbp),%rax
jae    1457 <readProcCpuInfo+0x2c7>
lea    -0xc30(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <strcpy@plt>
lea    -0xc30(%rbp),%rdi
call   1090 <removeNewLine@plt>
jmp    1651 <readProcCpuInfo+0x4c1>
lea    -0x430(%rbp),%rdi
lea    0xbbb(%rip),%rsi
mov    $0x7,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    155d <readProcCpuInfo+0x3cd>
lea    0xba1(%rip),%rdi
call   1070 <strlen@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rcx
xor    %eax,%eax
cmp    -0x30(%rbp),%rcx
mov    %al,-0x1045(%rbp)
jae    150a <readProcCpuInfo+0x37a>
mov    -0x20(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x1046(%rbp)
je     14fe <readProcCpuInfo+0x36e>
mov    -0x20(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x3a,%ecx
mov    %al,-0x1046(%rbp)
je     14fe <readProcCpuInfo+0x36e>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x1046(%rbp)
mov    -0x1046(%rbp),%al
mov    %al,-0x1045(%rbp)
mov    -0x1045(%rbp),%al
test   $0x1,%al
jne    151d <readProcCpuInfo+0x38d>
jmp    152e <readProcCpuInfo+0x39e>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    14a5 <readProcCpuInfo+0x315>
mov    -0x20(%rbp),%rax
cmp    -0x30(%rbp),%rax
jae    154c <readProcCpuInfo+0x3bc>
lea    -0x1030(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <strcpy@plt>
lea    -0x1030(%rbp),%rdi
call   1090 <removeNewLine@plt>
jmp    164c <readProcCpuInfo+0x4bc>
lea    -0x430(%rbp),%rdi
lea    0xace(%rip),%rsi
mov    $0xa,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1647 <readProcCpuInfo+0x4b7>
lea    0xab4(%rip),%rdi
call   1070 <strlen@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rcx
xor    %eax,%eax
cmp    -0x30(%rbp),%rcx
mov    %al,-0x1047(%rbp)
jae    15ff <readProcCpuInfo+0x46f>
mov    -0x20(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x1048(%rbp)
je     15f3 <readProcCpuInfo+0x463>
mov    -0x20(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x3a,%ecx
mov    %al,-0x1048(%rbp)
je     15f3 <readProcCpuInfo+0x463>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x1048(%rbp)
mov    -0x1048(%rbp),%al
mov    %al,-0x1047(%rbp)
mov    -0x1047(%rbp),%al
test   $0x1,%al
jne    1612 <readProcCpuInfo+0x482>
jmp    1623 <readProcCpuInfo+0x493>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    159a <readProcCpuInfo+0x40a>
mov    -0x20(%rbp),%rax
cmp    -0x30(%rbp),%rax
jae    163e <readProcCpuInfo+0x4ae>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <strcpy@plt>
mov    -0x10(%rbp),%rdi
call   1090 <removeNewLine@plt>
jmp    164c <readProcCpuInfo+0x4bc>
jmp    1651 <readProcCpuInfo+0x4c1>
jmp    1656 <readProcCpuInfo+0x4c6>
jmp    165b <readProcCpuInfo+0x4cb>
jmp    11f4 <readProcCpuInfo+0x64>
cmpl   $0x1,-0x24(%rbp)
jle    16a1 <readProcCpuInfo+0x511>
cmpl   $0x2,-0x24(%rbp)
jne    1689 <readProcCpuInfo+0x4f9>
mov    -0x8(%rbp),%rdi
lea    0x9c5(%rip),%rsi
call   1040 <strcpy@plt>
jmp    169c <readProcCpuInfo+0x50c>
mov    -0x8(%rbp),%rdi
mov    -0x24(%rbp),%edx
lea    0x9b2(%rip),%rsi
call   10b0 <sprintf@plt>
jmp    16a1 <readProcCpuInfo+0x511>
mov    -0x8(%rbp),%rax
mov    %rax,-0x1050(%rbp)
mov    -0x8(%rbp),%rdi
call   1070 <strlen@plt>
mov    %eax,%ecx
mov    -0x1050(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
movsbl -0x830(%rbp),%eax
cmp    $0x0,%eax
je     1724 <readProcCpuInfo+0x594>
mov    -0x20(%rbp),%rax
cmp    -0x8(%rbp),%rax
je     16f8 <readProcCpuInfo+0x568>
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
movb   $0x20,(%rax)
mov    -0x20(%rbp),%rdi
lea    -0x830(%rbp),%rsi
call   1040 <strcpy@plt>
lea    -0x830(%rbp),%rdi
call   1070 <strlen@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
movsbl -0xc30(%rbp),%eax
cmp    $0x0,%eax
je     1780 <readProcCpuInfo+0x5f0>
mov    -0x20(%rbp),%rax
cmp    -0x8(%rbp),%rax
je     1754 <readProcCpuInfo+0x5c4>
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
movb   $0x20,(%rax)
mov    -0x20(%rbp),%rdi
lea    -0xc30(%rbp),%rsi
call   1040 <strcpy@plt>
lea    -0xc30(%rbp),%rdi
call   1070 <strlen@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
movsbl -0x1030(%rbp),%eax
cmp    $0x0,%eax
je     1823 <readProcCpuInfo+0x693>
mov    -0x20(%rbp),%rax
cmp    -0x8(%rbp),%rax
je     17b0 <readProcCpuInfo+0x620>
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
movb   $0x20,(%rax)
lea    -0x1030(%rbp),%rdi
call   1050 <atof@plt>
movss  %xmm0,-0x1038(%rbp)
ff
movss  0x834(%rip),%xmm0
addss  -0x1038(%rbp),%xmm0
ff
cvttss2si %xmm0,%eax
mov    %eax,-0x1034(%rbp)
lea    -0x1030(%rbp),%rdi
mov    -0x1034(%rbp),%edx
lea    0x85e(%rip),%rsi
call   10b0 <sprintf@plt>
mov    -0x20(%rbp),%rdi
lea    -0x1030(%rbp),%rsi
call   1040 <strcpy@plt>
lea    -0x1030(%rbp),%rdi
call   1070 <strlen@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1060 <fclose@plt>
add    $0x1050,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readProcCpuInfo>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1028,%rsp
mov    %rdi,%r15
mov    %rsi,0x10(%rsp)
movb   $0x0,(%rsi)
movb   $0x0,(%rdi)
movb   $0x0,0x420(%rsp)
movb   $0x0,0x820(%rsp)
movb   $0x0,0xc20(%rsp)
lea    0xe36(%rip),%rdi
lea    0xe45(%rip),%rsi
call   10a0 <fopen@plt>
test   %rax,%rax
je     15c3 <readProcCpuInfo+0x433>
mov    %rax,%rbx
lea    0x20(%rsp),%rdi
mov    $0x400,%esi
mov    %rax,%rdx
call   1080 <fgets@plt>
test   %rax,%rax
je     14e1 <readProcCpuInfo+0x351>
mov    %r15,0x18(%rsp)
movl   $0x0,0xc(%rsp)
lea    0x20(%rsp),%rbp
lea    0xe02(%rip),%r12
movabs $0x400000100000200,%r15
jmp    124e <readProcCpuInfo+0xbe>
cs nopw 0x0(%rax,%rax,1)
addl   $0x1,0xc(%rsp)
mov    %rbp,%rdi
mov    $0x400,%esi
mov    %rbx,%rdx
call   1080 <fgets@plt>
test   %rax,%rax
je     14b1 <readProcCpuInfo+0x321>
mov    %rbp,%rdi
call   1070 <strlen@plt>
mov    %eax,%r14d
mov    %rbp,%rdi
lea    0xdaf(%rip),%rsi
mov    $0x9,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     1230 <readProcCpuInfo+0xa0>
movslq %r14d,%rax
lea    (%rsp,%rax,1),%r13
add    $0x20,%r13
mov    %rbp,%rdi
mov    %r12,%rsi
mov    $0x9,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     1310 <readProcCpuInfo+0x180>
mov    %rbx,%r12
mov    %rbp,%rdi
lea    0xd85(%rip),%rbx
mov    %rbx,%rsi
mov    $0xa,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     1355 <readProcCpuInfo+0x1c5>
mov    %rbp,%rdi
lea    0xd71(%rip),%rbx
mov    %rbx,%rsi
mov    $0x7,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     13a5 <readProcCpuInfo+0x215>
mov    %rbp,%rdi
lea    0xd5a(%rip),%rbp
mov    %rbp,%rsi
mov    $0xa,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
mov    %r12,%rbx
je     13f5 <readProcCpuInfo+0x265>
lea    0xd1e(%rip),%r12
lea    0x20(%rsp),%rbp
jmp    1235 <readProcCpuInfo+0xa5>
nopl   0x0(%rax,%rax,1)
mov    %r12,%rdi
call   1070 <strlen@plt>
cmp    %r14d,%eax
jge    1450 <readProcCpuInfo+0x2c0>
cltq
lea    (%rsp,%rax,1),%rsi
add    $0x20,%rsi
nopl   0x0(%rax,%rax,1)
movzbl (%rsi),%eax
cmp    $0x3a,%rax
ja     143a <readProcCpuInfo+0x2aa>
bt     %rax,%r15
jae    143a <readProcCpuInfo+0x2aa>
add    $0x1,%rsi
cmp    %r13,%rsi
jb     1330 <readProcCpuInfo+0x1a0>
jmp    1450 <readProcCpuInfo+0x2c0>
mov    %rbx,%rdi
call   1070 <strlen@plt>
cmp    %r14d,%eax
mov    %r12,%rbx
jge    1467 <readProcCpuInfo+0x2d7>
cltq
lea    (%rsp,%rax,1),%rsi
add    $0x20,%rsi
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%rsi),%eax
cmp    $0x3a,%rax
ja     145a <readProcCpuInfo+0x2ca>
bt     %rax,%r15
jae    145a <readProcCpuInfo+0x2ca>
add    $0x1,%rsi
cmp    %r13,%rsi
jb     1380 <readProcCpuInfo+0x1f0>
jmp    1467 <readProcCpuInfo+0x2d7>
mov    %rbx,%rdi
call   1070 <strlen@plt>
cmp    %r14d,%eax
mov    %r12,%rbx
jge    147e <readProcCpuInfo+0x2ee>
cltq
lea    (%rsp,%rax,1),%rsi
add    $0x20,%rsi
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%rsi),%eax
cmp    $0x3a,%rax
ja     1471 <readProcCpuInfo+0x2e1>
bt     %rax,%r15
jae    1471 <readProcCpuInfo+0x2e1>
add    $0x1,%rsi
cmp    %r13,%rsi
jb     13d0 <readProcCpuInfo+0x240>
jmp    147e <readProcCpuInfo+0x2ee>
mov    %rbp,%rdi
call   1070 <strlen@plt>
cmp    %r14d,%eax
lea    0x20(%rsp),%rbp
jge    1492 <readProcCpuInfo+0x302>
cltq
lea    (%rsp,%rax,1),%rsi
add    $0x20,%rsi
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rsi),%eax
cmp    $0x3a,%rax
ja     1488 <readProcCpuInfo+0x2f8>
bt     %rax,%r15
jae    1488 <readProcCpuInfo+0x2f8>
add    $0x1,%rsi
cmp    %r13,%rsi
jb     1420 <readProcCpuInfo+0x290>
jmp    1492 <readProcCpuInfo+0x302>
lea    0xc20(%rsp),%rdi
call   1040 <strcpy@plt>
nopw   0x0(%rax,%rax,1)
lea    0xc20(%rsp),%rdi
jmp    14a0 <readProcCpuInfo+0x310>
lea    0x820(%rsp),%rdi
call   1040 <strcpy@plt>
lea    0x820(%rsp),%rdi
jmp    14a0 <readProcCpuInfo+0x310>
lea    0x420(%rsp),%rdi
call   1040 <strcpy@plt>
lea    0x420(%rsp),%rdi
jmp    14a0 <readProcCpuInfo+0x310>
mov    0x10(%rsp),%rdi
call   1040 <strcpy@plt>
mov    0x10(%rsp),%rdi
nopw   0x0(%rax,%rax,1)
call   1090 <removeNewLine@plt>
lea    0xb70(%rip),%r12
jmp    1235 <readProcCpuInfo+0xa5>
mov    0xc(%rsp),%edx
cmp    $0x2,%edx
mov    0x18(%rsp),%r15
jl     14e1 <readProcCpuInfo+0x351>
jne    14d2 <readProcCpuInfo+0x342>
lea    0xb7c(%rip),%rsi
mov    %r15,%rdi
call   1040 <strcpy@plt>
jmp    14e1 <readProcCpuInfo+0x351>
lea    0xb70(%rip),%rsi
mov    %r15,%rdi
call   10b0 <sprintf@plt>
mov    %r15,%rdi
call   1070 <strlen@plt>
movslq %eax,%rbp
add    %r15,%rbp
cmpb   $0x0,0xc20(%rsp)
je     1525 <readProcCpuInfo+0x395>
test   %eax,%eax
je     1505 <readProcCpuInfo+0x375>
movb   $0x20,0x0(%rbp)
add    $0x1,%rbp
lea    0xc20(%rsp),%r14
mov    %rbp,%rdi
mov    %r14,%rsi
call   1040 <strcpy@plt>
mov    %r14,%rdi
call   1070 <strlen@plt>
cltq
add    %rax,%rbp
cmpb   $0x0,0x820(%rsp)
je     1563 <readProcCpuInfo+0x3d3>
mov    %r15,%r14
cmp    %r15,%rbp
je     1542 <readProcCpuInfo+0x3b2>
movb   $0x20,0x0(%rbp)
add    $0x1,%rbp
mov    %rbp,%r14
lea    0x820(%rsp),%rbp
mov    %r14,%rdi
mov    %rbp,%rsi
call   1040 <strcpy@plt>
mov    %rbp,%rdi
call   1070 <strlen@plt>
movslq %eax,%rbp
add    %r14,%rbp
cmpb   $0x0,0x420(%rsp)
je     15bb <readProcCpuInfo+0x42b>
cmp    %r15,%rbp
je     157d <readProcCpuInfo+0x3ed>
movb   $0x20,0x0(%rbp)
add    $0x1,%rbp
mov    %rbp,%r15
lea    0x420(%rsp),%rbp
mov    %rbp,%rdi
call   1050 <atof@plt>
addss  0xa6b(%rip),%xmm0
cvttss2si %xmm0,%edx
lea    0xab0(%rip),%rsi
mov    %rbp,%rdi
call   10b0 <sprintf@plt>
mov    %r15,%rdi
mov    %rbp,%rsi
call   1040 <strcpy@plt>
mov    %rbp,%rdi
call   1070 <strlen@plt>
mov    %rbx,%rdi
call   1060 <fclose@plt>
add    $0x1028,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"/proc/cpuinfo\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [10 x i8] c"processor\00"
@.str.3 = [10 x i8] c"vendor_id\00"
@.str.4 = [11 x i8] c"model name\00"
@.str.5 = [8 x i8] c"cpu MHz\00"
@.str.6 = [11 x i8] c"cache size\00"
@.str.7 = [5 x i8] c"Dual\00"
@.str.8 = [7 x i8] c"%d CPU\00"
@.str.9 = [6 x i8] c"%dMHz\00"
define void @readProcCpuInfo(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca [1024 x i8]
%10 = alloca [1024 x i8]
%11 = alloca [1024 x i8]
%12 = alloca [1024 x i8]
%13 = alloca i32
%14 = alloca float
store i8* %0, i8** %3
store i8* %1, i8** %4
store i32 0, i32* %7
%15 = load i8*, i8** %4
%16 = getelementptr inbounds i8, i8* %15, i64 0
store i8 0, i8* %16
%17 = load i8*, i8** %3
%18 = getelementptr inbounds i8, i8* %17, i64 0
store i8 0, i8* %18
%19 = getelementptr inbounds [1024 x i8], [1024 x i8]* %12, i64 0, i64 0
store i8 0, i8* %19
%20 = getelementptr inbounds [1024 x i8], [1024 x i8]* %11, i64 0, i64 0
store i8 0, i8* %20
%21 = getelementptr inbounds [1024 x i8], [1024 x i8]* %10, i64 0, i64 0
store i8 0, i8* %21
%22 = call i32* @fopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %22, i32** %5
%23 = load i32*, i32** %5
%24 = icmp ne i32* %23, null
br i1 %24, label %25, label %326
25: ; preds = %2
br label %26
26: ; preds = %232, %25
%27 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%28 = load i32*, i32** %5
%29 = call i32* @fgets(i8* %27, i32 1024, i32* %28)
%30 = icmp ne i32* null, %29
br i1 %30, label %31, label %233
31: ; preds = %26
%32 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%33 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%34 = call i32 @strlen(i8* %33)
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds i8, i8* %32, i64 %35
store i8* %36, i8** %8
%37 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
store i8* %37, i8** %6
%38 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%39 = call i32 @strncmp(i8* %38, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 9)
%40 = icmp ne i32 %39, 0
br i1 %40, label %44, label %41
41: ; preds = %31
%42 = load i32, i32* %7
%43 = add nsw i32 %42, 1
store i32 %43, i32* %7
br label %232
44: ; preds = %31
%45 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%46 = call i32 @strncmp(i8* %45, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 9)
%47 = icmp ne i32 %46, 0
br i1 %47, label %90, label %48
48: ; preds = %44
%49 = call i32 @strlen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%50 = load i8*, i8** %6
%51 = sext i32 %49 to i64
%52 = getelementptr inbounds i8, i8* %50, i64 %51
store i8* %52, i8** %6
br label %53
53: ; preds = %76, %48
%54 = load i8*, i8** %6
%55 = load i8*, i8** %8
%56 = icmp ult i8* %54, %55
br i1 %56, label %57, label %74
57: ; preds = %53
%58 = load i8*, i8** %6
%59 = load i8, i8* %58
%60 = sext i8 %59 to i32
%61 = icmp eq i32 %60, 32
br i1 %61, label %72, label %62
62: ; preds = %57
%63 = load i8*, i8** %6
%64 = load i8, i8* %63
%65 = sext i8 %64 to i32
%66 = icmp eq i32 %65, 58
br i1 %66, label %72, label %67
67: ; preds = %62
%68 = load i8*, i8** %6
%69 = load i8, i8* %68
%70 = sext i8 %69 to i32
%71 = icmp eq i32 %70, 9
br label %72
72: ; preds = %67, %62, %57
%73 = phi i1 [ true, %62 ], [ true, %57 ], [ %71, %67 ]
br label %74
74: ; preds = %72, %53
%75 = phi i1 [ false, %53 ], [ %73, %72 ]
br i1 %75, label %76, label %79
76: ; preds = %74
%77 = load i8*, i8** %6
%78 = getelementptr inbounds i8, i8* %77, i32 1
store i8* %78, i8** %6
br label %53
79: ; preds = %74
%80 = load i8*, i8** %6
%81 = load i8*, i8** %8
%82 = icmp ult i8* %80, %81
br i1 %82, label %83, label %87
83: ; preds = %79
%84 = getelementptr inbounds [1024 x i8], [1024 x i8]* %10, i64 0, i64 0
%85 = load i8*, i8** %6
%86 = call i32 @strcpy(i8* %84, i8* %85)
br label %87
87: ; preds = %83, %79
%88 = getelementptr inbounds [1024 x i8], [1024 x i8]* %10, i64 0, i64 0
%89 = call i32 @removeNewLine(i8* %88)
br label %231
90: ; preds = %44
%91 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%92 = call i32 @strncmp(i8* %91, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i32 10)
%93 = icmp ne i32 %92, 0
br i1 %93, label %136, label %94
94: ; preds = %90
%95 = call i32 @strlen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
%96 = load i8*, i8** %6
%97 = sext i32 %95 to i64
%98 = getelementptr inbounds i8, i8* %96, i64 %97
store i8* %98, i8** %6
br label %99
99: ; preds = %122, %94
%100 = load i8*, i8** %6
%101 = load i8*, i8** %8
%102 = icmp ult i8* %100, %101
br i1 %102, label %103, label %120
103: ; preds = %99
%104 = load i8*, i8** %6
%105 = load i8, i8* %104
%106 = sext i8 %105 to i32
%107 = icmp eq i32 %106, 32
br i1 %107, label %118, label %108
108: ; preds = %103
%109 = load i8*, i8** %6
%110 = load i8, i8* %109
%111 = sext i8 %110 to i32
%112 = icmp eq i32 %111, 58
br i1 %112, label %118, label %113
113: ; preds = %108
%114 = load i8*, i8** %6
%115 = load i8, i8* %114
%116 = sext i8 %115 to i32
%117 = icmp eq i32 %116, 9
br label %118
118: ; preds = %113, %108, %103
%119 = phi i1 [ true, %108 ], [ true, %103 ], [ %117, %113 ]
br label %120
120: ; preds = %118, %99
%121 = phi i1 [ false, %99 ], [ %119, %118 ]
br i1 %121, label %122, label %125
122: ; preds = %120
%123 = load i8*, i8** %6
%124 = getelementptr inbounds i8, i8* %123, i32 1
store i8* %124, i8** %6
br label %99
125: ; preds = %120
%126 = load i8*, i8** %6
%127 = load i8*, i8** %8
%128 = icmp ult i8* %126, %127
br i1 %128, label %129, label %133
129: ; preds = %125
%130 = getelementptr inbounds [1024 x i8], [1024 x i8]* %11, i64 0, i64 0
%131 = load i8*, i8** %6
%132 = call i32 @strcpy(i8* %130, i8* %131)
br label %133
133: ; preds = %129, %125
%134 = getelementptr inbounds [1024 x i8], [1024 x i8]* %11, i64 0, i64 0
%135 = call i32 @removeNewLine(i8* %134)
br label %230
136: ; preds = %90
%137 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%138 = call i32 @strncmp(i8* %137, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i32 7)
%139 = icmp ne i32 %138, 0
br i1 %139, label %182, label %140
140: ; preds = %136
%141 = call i32 @strlen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%142 = load i8*, i8** %6
%143 = sext i32 %141 to i64
%144 = getelementptr inbounds i8, i8* %142, i64 %143
store i8* %144, i8** %6
br label %145
145: ; preds = %168, %140
%146 = load i8*, i8** %6
%147 = load i8*, i8** %8
%148 = icmp ult i8* %146, %147
br i1 %148, label %149, label %166
149: ; preds = %145
%150 = load i8*, i8** %6
%151 = load i8, i8* %150
%152 = sext i8 %151 to i32
%153 = icmp eq i32 %152, 32
br i1 %153, label %164, label %154
154: ; preds = %149
%155 = load i8*, i8** %6
%156 = load i8, i8* %155
%157 = sext i8 %156 to i32
%158 = icmp eq i32 %157, 58
br i1 %158, label %164, label %159
159: ; preds = %154
%160 = load i8*, i8** %6
%161 = load i8, i8* %160
%162 = sext i8 %161 to i32
%163 = icmp eq i32 %162, 9
br label %164
164: ; preds = %159, %154, %149
%165 = phi i1 [ true, %154 ], [ true, %149 ], [ %163, %159 ]
br label %166
166: ; preds = %164, %145
%167 = phi i1 [ false, %145 ], [ %165, %164 ]
br i1 %167, label %168, label %171
168: ; preds = %166
%169 = load i8*, i8** %6
%170 = getelementptr inbounds i8, i8* %169, i32 1
store i8* %170, i8** %6
br label %145
171: ; preds = %166
%172 = load i8*, i8** %6
%173 = load i8*, i8** %8
%174 = icmp ult i8* %172, %173
br i1 %174, label %175, label %179
175: ; preds = %171
%176 = getelementptr inbounds [1024 x i8], [1024 x i8]* %12, i64 0, i64 0
%177 = load i8*, i8** %6
%178 = call i32 @strcpy(i8* %176, i8* %177)
br label %179
179: ; preds = %175, %171
%180 = getelementptr inbounds [1024 x i8], [1024 x i8]* %12, i64 0, i64 0
%181 = call i32 @removeNewLine(i8* %180)
br label %229
182: ; preds = %136
%183 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%184 = call i32 @strncmp(i8* %183, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i32 10)
%185 = icmp ne i32 %184, 0
br i1 %185, label %228, label %186
186: ; preds = %182
%187 = call i32 @strlen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0))
%188 = load i8*, i8** %6
%189 = sext i32 %187 to i64
%190 = getelementptr inbounds i8, i8* %188, i64 %189
store i8* %190, i8** %6
br label %191
191: ; preds = %214, %186
%192 = load i8*, i8** %6
%193 = load i8*, i8** %8
%194 = icmp ult i8* %192, %193
br i1 %194, label %195, label %212
195: ; preds = %191
%196 = load i8*, i8** %6
%197 = load i8, i8* %196
%198 = sext i8 %197 to i32
%199 = icmp eq i32 %198, 32
br i1 %199, label %210, label %200
200: ; preds = %195
%201 = load i8*, i8** %6
%202 = load i8, i8* %201
%203 = sext i8 %202 to i32
%204 = icmp eq i32 %203, 58
br i1 %204, label %210, label %205
205: ; preds = %200
%206 = load i8*, i8** %6
%207 = load i8, i8* %206
%208 = sext i8 %207 to i32
%209 = icmp eq i32 %208, 9
br label %210
210: ; preds = %205, %200, %195
%211 = phi i1 [ true, %200 ], [ true, %195 ], [ %209, %205 ]
br label %212
212: ; preds = %210, %191
%213 = phi i1 [ false, %191 ], [ %211, %210 ]
br i1 %213, label %214, label %217
214: ; preds = %212
%215 = load i8*, i8** %6
%216 = getelementptr inbounds i8, i8* %215, i32 1
store i8* %216, i8** %6
br label %191
217: ; preds = %212
%218 = load i8*, i8** %6
%219 = load i8*, i8** %8
%220 = icmp ult i8* %218, %219
br i1 %220, label %221, label %225
221: ; preds = %217
%222 = load i8*, i8** %4
%223 = load i8*, i8** %6
%224 = call i32 @strcpy(i8* %222, i8* %223)
br label %225
225: ; preds = %221, %217
%226 = load i8*, i8** %4
%227 = call i32 @removeNewLine(i8* %226)
br label %228
228: ; preds = %225, %182
br label %229
229: ; preds = %228, %179
br label %230
230: ; preds = %229, %133
br label %231
231: ; preds = %230, %87
br label %232
232: ; preds = %231, %41
br label %26
233: ; preds = %26
%234 = load i32, i32* %7
%235 = icmp sgt i32 %234, 1
br i1 %235, label %236, label %247
236: ; preds = %233
%237 = load i32, i32* %7
%238 = icmp eq i32 %237, 2
br i1 %238, label %239, label %242
239: ; preds = %236
%240 = load i8*, i8** %3
%241 = call i32 @strcpy(i8* %240, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
br label %246
242: ; preds = %236
%243 = load i8*, i8** %3
%244 = load i32, i32* %7
%245 = call i32 @sprintf(i8* %243, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i32 %244)
br label %246
246: ; preds = %242, %239
br label %247
247: ; preds = %246, %233
%248 = load i8*, i8** %3
%249 = load i8*, i8** %3
%250 = call i32 @strlen(i8* %249)
%251 = sext i32 %250 to i64
%252 = getelementptr inbounds i8, i8* %248, i64 %251
store i8* %252, i8** %6
%253 = getelementptr inbounds [1024 x i8], [1024 x i8]* %10, i64 0, i64 0
%254 = load i8, i8* %253
%255 = sext i8 %254 to i32
%256 = icmp ne i32 %255, 0
br i1 %256, label %257, label %273
257: ; preds = %247
%258 = load i8*, i8** %6
%259 = load i8*, i8** %3
%260 = icmp ne i8* %258, %259
br i1 %260, label %261, label %264
261: ; preds = %257
%262 = load i8*, i8** %6
%263 = getelementptr inbounds i8, i8* %262, i32 1
store i8* %263, i8** %6
store i8 32, i8* %262
br label %264
264: ; preds = %261, %257
%265 = load i8*, i8** %6
%266 = getelementptr inbounds [1024 x i8], [1024 x i8]* %10, i64 0, i64 0
%267 = call i32 @strcpy(i8* %265, i8* %266)
%268 = getelementptr inbounds [1024 x i8], [1024 x i8]* %10, i64 0, i64 0
%269 = call i32 @strlen(i8* %268)
%270 = load i8*, i8** %6
%271 = sext i32 %269 to i64
%272 = getelementptr inbounds i8, i8* %270, i64 %271
store i8* %272, i8** %6
br label %273
273: ; preds = %264, %247
%274 = getelementptr inbounds [1024 x i8], [1024 x i8]* %11, i64 0, i64 0
%275 = load i8, i8* %274
%276 = sext i8 %275 to i32
%277 = icmp ne i32 %276, 0
br i1 %277, label %278, label %294
278: ; preds = %273
%279 = load i8*, i8** %6
%280 = load i8*, i8** %3
%281 = icmp ne i8* %279, %280
br i1 %281, label %282, label %285
282: ; preds = %278
%283 = load i8*, i8** %6
%284 = getelementptr inbounds i8, i8* %283, i32 1
store i8* %284, i8** %6
store i8 32, i8* %283
br label %285
285: ; preds = %282, %278
%286 = load i8*, i8** %6
%287 = getelementptr inbounds [1024 x i8], [1024 x i8]* %11, i64 0, i64 0
%288 = call i32 @strcpy(i8* %286, i8* %287)
%289 = getelementptr inbounds [1024 x i8], [1024 x i8]* %11, i64 0, i64 0
%290 = call i32 @strlen(i8* %289)
%291 = load i8*, i8** %6
%292 = sext i32 %290 to i64
%293 = getelementptr inbounds i8, i8* %291, i64 %292
store i8* %293, i8** %6
br label %294
294: ; preds = %285, %273
%295 = getelementptr inbounds [1024 x i8], [1024 x i8]* %12, i64 0, i64 0
%296 = load i8, i8* %295
%297 = sext i8 %296 to i32
%298 = icmp ne i32 %297, 0
br i1 %298, label %299, label %323
299: ; preds = %294
%300 = load i8*, i8** %6
%301 = load i8*, i8** %3
%302 = icmp ne i8* %300, %301
br i1 %302, label %303, label %306
303: ; preds = %299
%304 = load i8*, i8** %6
%305 = getelementptr inbounds i8, i8* %304, i32 1
store i8* %305, i8** %6
store i8 32, i8* %304
br label %306
306: ; preds = %303, %299
%307 = getelementptr inbounds [1024 x i8], [1024 x i8]* %12, i64 0, i64 0
%308 = call float @atof(i8* %307)
store float %308, float* %14
%309 = load float, float* %14
%310 = fadd float %309, 5.000000e-01
%311 = fptosi float %310 to i32
store i32 %311, i32* %13
%312 = getelementptr inbounds [1024 x i8], [1024 x i8]* %12, i64 0, i64 0
%313 = load i32, i32* %13
%314 = call i32 @sprintf(i8* %312, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i32 %313)
%315 = load i8*, i8** %6
%316 = getelementptr inbounds [1024 x i8], [1024 x i8]* %12, i64 0, i64 0
%317 = call i32 @strcpy(i8* %315, i8* %316)
%318 = getelementptr inbounds [1024 x i8], [1024 x i8]* %12, i64 0, i64 0
%319 = call i32 @strlen(i8* %318)
%320 = load i8*, i8** %6
%321 = sext i32 %319 to i64
%322 = getelementptr inbounds i8, i8* %320, i64 %321
store i8* %322, i8** %6
br label %323
323: ; preds = %306, %294
%324 = load i32*, i32** %5
%325 = call i32 @fclose(i32* %324)
br label %326
326: ; preds = %323, %2
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"/proc/cpuinfo\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [10 x i8] c"processor\00"
@.str.3 = [10 x i8] c"vendor_id\00"
@.str.4 = [11 x i8] c"model name\00"
@.str.5 = [8 x i8] c"cpu MHz\00"
@.str.6 = [11 x i8] c"cache size\00"
@.str.7 = [5 x i8] c"Dual\00"
@.str.8 = [7 x i8] c"%d CPU\00"
@.str.9 = [6 x i8] c"%dMHz\00"
define void @readProcCpuInfo(i8* %0, i8* %1) {
%3 = alloca [1024 x i8]
%4 = alloca [1024 x i8]
%5 = alloca [1024 x i8]
%6 = alloca [1024 x i8]
%7 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%8 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%9 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%10 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
store i8 0, i8* %1
store i8 0, i8* %0
store i8 0, i8* %10
store i8 0, i8* %9
store i8 0, i8* %8
%11 = tail call i32* @fopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%12 = icmp eq i32* %11, null
br i1 %12, label %161, label %13
13: ; preds = %2
%14 = call i32* @fgets(i8* %7, i32 1024, i32* %11)
%15 = icmp eq i32* %14, null
br i1 %15, label %113, label %16
16: ; preds = %13, %101
%17 = phi i32 [ %102, %101 ], [ 0, %13 ]
%18 = call i32 @strlen(i8* %7)
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 %19
%21 = call i32 @strncmp(i8* %7, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 9)
%22 = icmp eq i32 %21, 0
br i1 %22, label %23, label %25
23: ; preds = %16
%24 = add nsw i32 %17, 1
br label %101
25: ; preds = %16
%26 = call i32 @strncmp(i8* %7, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 9)
%27 = icmp eq i32 %26, 0
br i1 %27, label %28, label %44
28: ; preds = %25
%29 = call i32 @strlen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%30 = icmp slt i32 %29, %18
br i1 %30, label %31, label %42
31: ; preds = %28
%32 = sext i32 %29 to i64
%33 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 %32
br label %34
34: ; preds = %31, %37
%35 = phi i8* [ %38, %37 ], [ %33, %31 ]
%36 = load i8, i8* %35
switch i8 %36, label %40 [
i8 32, label %37
i8 58, label %37
i8 9, label %37
]
37: ; preds = %34, %34, %34
%38 = getelementptr inbounds i8, i8* %35, i64 1
%39 = icmp ult i8* %38, %20
br i1 %39, label %34, label %42
40: ; preds = %34
%41 = call i32 @strcpy(i8* %8, i8* %35)
br label %42
42: ; preds = %37, %28, %40
%43 = call i32 @removeNewLine(i8* %8)
br label %101
44: ; preds = %25
%45 = call i32 @strncmp(i8* %7, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i32 10)
%46 = icmp eq i32 %45, 0
br i1 %46, label %47, label %63
47: ; preds = %44
%48 = call i32 @strlen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
%49 = icmp slt i32 %48, %18
br i1 %49, label %50, label %61
50: ; preds = %47
%51 = sext i32 %48 to i64
%52 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 %51
br label %53
53: ; preds = %50, %56
%54 = phi i8* [ %57, %56 ], [ %52, %50 ]
%55 = load i8, i8* %54
switch i8 %55, label %59 [
i8 32, label %56
i8 58, label %56
i8 9, label %56
]
56: ; preds = %53, %53, %53
%57 = getelementptr inbounds i8, i8* %54, i64 1
%58 = icmp ult i8* %57, %20
br i1 %58, label %53, label %61
59: ; preds = %53
%60 = call i32 @strcpy(i8* %9, i8* %54)
br label %61
61: ; preds = %56, %47, %59
%62 = call i32 @removeNewLine(i8* %9)
br label %101
63: ; preds = %44
%64 = call i32 @strncmp(i8* %7, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i32 7)
%65 = icmp eq i32 %64, 0
br i1 %65, label %66, label %82
66: ; preds = %63
%67 = call i32 @strlen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%68 = icmp slt i32 %67, %18
br i1 %68, label %69, label %80
69: ; preds = %66
%70 = sext i32 %67 to i64
%71 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 %70
br label %72
72: ; preds = %69, %75
%73 = phi i8* [ %76, %75 ], [ %71, %69 ]
%74 = load i8, i8* %73
switch i8 %74, label %78 [
i8 32, label %75
i8 58, label %75
i8 9, label %75
]
75: ; preds = %72, %72, %72
%76 = getelementptr inbounds i8, i8* %73, i64 1
%77 = icmp ult i8* %76, %20
br i1 %77, label %72, label %80
78: ; preds = %72
%79 = call i32 @strcpy(i8* %10, i8* %73)
br label %80
80: ; preds = %75, %66, %78
%81 = call i32 @removeNewLine(i8* %10)
br label %101
82: ; preds = %63
%83 = call i32 @strncmp(i8* %7, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i32 10)
%84 = icmp eq i32 %83, 0
br i1 %84, label %85, label %101
85: ; preds = %82
%86 = call i32 @strlen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0))
%87 = icmp slt i32 %86, %18
br i1 %87, label %88, label %99
88: ; preds = %85
%89 = sext i32 %86 to i64
%90 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 %89
br label %91
91: ; preds = %88, %94
%92 = phi i8* [ %95, %94 ], [ %90, %88 ]
%93 = load i8, i8* %92
switch i8 %93, label %97 [
i8 32, label %94
i8 58, label %94
i8 9, label %94
]
94: ; preds = %91, %91, %91
%95 = getelementptr inbounds i8, i8* %92, i64 1
%96 = icmp ult i8* %95, %20
br i1 %96, label %91, label %99
97: ; preds = %91
%98 = call i32 @strcpy(i8* %1, i8* %92)
br label %99
99: ; preds = %94, %85, %97
%100 = call i32 @removeNewLine(i8* %1)
br label %101
101: ; preds = %42, %80, %99, %82, %61, %23
%102 = phi i32 [ %17, %82 ], [ %17, %99 ], [ %17, %80 ], [ %17, %61 ], [ %17, %42 ], [ %24, %23 ]
%103 = call i32* @fgets(i8* %7, i32 1024, i32* %11)
%104 = icmp eq i32* %103, null
br i1 %104, label %105, label %16
105: ; preds = %101
%106 = icmp sgt i32 %102, 1
br i1 %106, label %107, label %113
107: ; preds = %105
%108 = icmp eq i32 %102, 2
br i1 %108, label %109, label %111
109: ; preds = %107
%110 = call i32 @strcpy(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
br label %113
111: ; preds = %107
%112 = call i32 @sprintf(i8* %0, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i32 %102)
br label %113
113: ; preds = %13, %109, %111, %105
%114 = call i32 @strlen(i8* %0)
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds i8, i8* %0, i64 %115
%117 = load i8, i8* %8
%118 = icmp eq i8 %117, 0
br i1 %118, label %129, label %119
119: ; preds = %113
%120 = icmp eq i32 %114, 0
br i1 %120, label %123, label %121
121: ; preds = %119
%122 = getelementptr inbounds i8, i8* %116, i64 1
store i8 32, i8* %116
br label %123
123: ; preds = %121, %119
%124 = phi i8* [ %122, %121 ], [ %116, %119 ]
%125 = call i32 @strcpy(i8* %124, i8* %8)
%126 = call i32 @strlen(i8* %8)
%127 = sext i32 %126 to i64
%128 = getelementptr inbounds i8, i8* %124, i64 %127
br label %129
129: ; preds = %123, %113
%130 = phi i8* [ %128, %123 ], [ %116, %113 ]
%131 = load i8, i8* %9
%132 = icmp eq i8 %131, 0
br i1 %132, label %143, label %133
133: ; preds = %129
%134 = icmp eq i8* %130, %0
br i1 %134, label %137, label %135
135: ; preds = %133
%136 = getelementptr inbounds i8, i8* %130, i64 1
store i8 32, i8* %130
br label %137
137: ; preds = %135, %133
%138 = phi i8* [ %136, %135 ], [ %0, %133 ]
%139 = call i32 @strcpy(i8* %138, i8* %9)
%140 = call i32 @strlen(i8* %9)
%141 = sext i32 %140 to i64
%142 = getelementptr inbounds i8, i8* %138, i64 %141
br label %143
143: ; preds = %137, %129
%144 = phi i8* [ %142, %137 ], [ %130, %129 ]
%145 = load i8, i8* %10
%146 = icmp eq i8 %145, 0
br i1 %146, label %159, label %147
147: ; preds = %143
%148 = icmp eq i8* %144, %0
br i1 %148, label %151, label %149
149: ; preds = %147
%150 = getelementptr inbounds i8, i8* %144, i64 1
store i8 32, i8* %144
br label %151
151: ; preds = %149, %147
%152 = phi i8* [ %150, %149 ], [ %0, %147 ]
%153 = call float @atof(i8* %10)
%154 = fadd float %153, 5.000000e-01
%155 = fptosi float %154 to i32
%156 = call i32 @sprintf(i8* %10, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i32 %155)
%157 = call i32 @strcpy(i8* %152, i8* %10)
%158 = call i32 @strlen(i8* %10)
br label %159
159: ; preds = %151, %143
%160 = call i32 @fclose(i32* %11)
br label %161
161: ; preds = %159, %2
ret void
}