#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 EOF;
int alarm_detected(char *, int);
int atoi(char *);
int detect_cycle(char *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
int /*<<< orphan*/ get_cycle_number(char *, char *);
int getc(int /*<<< orphan*/ *);
int /*<<< orphan*/ out_to_print(char *, char *, char *, char *, int);
int /*<<< orphan*/ print_time();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ stdout;
int strlen(char *);
int /*<<< orphan*/ system(char *);
int main(int argc, char **argv) {
  FILE *pFile;
  FILE *pAlarms;
  int sequence = 0;
  int interval = atoi(argv[1]);
  int count = 0;
  int receiving = 0;
  int c;
  char cycnum[6];
  int done = (0 != 0);
  int cycles = 0;
  int alarm_argc = 0;
  int alarm_start_point = 0;
  int start_relay = 0;
  int alarm_count = 0;
  int alarm_active = 0;
  char alarm_cmd[64];
  int print_pdf = 0;
  int i = 0;
  printf("\n\nCycle Detection Application Started  ");
  print_time();
  printf("Monitors active_log.txt file every %d seconds.\n\nVersion 0 "
         "2015-OCT-20 By -DL-\n\n",
         interval);
  while (!done) {
    sleep(interval);
    alarm_argc = 0;
    pFile = fopen("/var/www/active_log.txt", "r");
    if (pFile != NULL) {
      c = getc(pFile);
      while (c != EOF) {
        count++;
        c = getc(pFile);
      }
      fclose(pFile);
      if (count == 0) {
        sequence = 0;
        start_relay = 0;
        alarm_start_point = 0;
        alarm_count = 0;
      } else {
        if ((sequence == 0) && (receiving == count)) {
          sequence = 1;
          printf("LOG FILE ACTIVE ");
          print_time();
        }
        if (sequence == 3) {
          if (detect_cycle(argv[3]) == 0) {
            printf("NON CYCLE PRINT\n");
            sequence = 5;
          } else {
            printf("CYCLE NUMBER: %s  \n", cycnum);
            sequence = 4;
            print_pdf = 1;
          }
        }
        if (sequence == 4) {
          if (detect_cycle(argv[4]) >= 1) {
            printf("END OF CYCLE DETECTED  ");
            print_time();
            sequence = 5;
          }
        }
        if ((sequence == 5) && (receiving == count)) {
          out_to_print(cycnum, argv[5], argv[8], argv[9], print_pdf);
          sequence = 0;
          printf("\n\n\n");
          if (print_pdf == 1) {
            cycles++;
            printf("(%d)out of (%d) cycles printed before reboot.\n\n\n",
                   cycles, atoi(argv[6]));
          }
          print_pdf = 0;
          if (cycles == atoi(argv[6])) {
            printf("Rebooting system");
            system("sudo /sbin/shutdown -r now");
          }
        }
        if (sequence == 2) {
          get_cycle_number(argv[2], cycnum);
          if (strlen(cycnum) >= 2)
            sequence = 3;
          else {
            printf("NO CYCLE NUMBER DETECTED\n");
            sequence = 5;
          }
        }
        if ((sequence == 1) && (receiving == count))
          sequence = 2;
        if ((sequence == 4) && (alarm_count < atoi(argv[7]))) {
          for (alarm_argc = 10; alarm_argc < argc; alarm_argc++) {
            alarm_active, start_relay = alarm_detected(argv[alarm_argc],
                                                       alarm_start_point);
            if (start_relay > alarm_start_point) {
              printf("%s ALARM DETECTED  ", argv[alarm_argc]);
              print_time();
              pAlarms = fopen("/var/www/alarms.txt", "a");
              fprintf(pAlarms, "%s  ", argv[alarm_argc]);
              print_time();
              fclose(pAlarms);
              alarm_start_point = start_relay;
              alarm_count++;
            }
          }
        }
      }
      receiving = count;
      count = 0;
    } else
      printf("LOG_FILE = NULL\n");
    fflush(stdout);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   10e0 <atoi@plt>
mov    %eax,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x40(%rbp)
movl   $0x0,-0x44(%rbp)
movl   $0x0,-0x48(%rbp)
movl   $0x0,-0x4c(%rbp)
movl   $0x0,-0x50(%rbp)
movl   $0x0,-0x54(%rbp)
movl   $0x0,-0x58(%rbp)
movl   $0x0,-0xa4(%rbp)
movl   $0x0,-0xa8(%rbp)
lea    0xd86(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    $0x0,%al
call   10c0 <print_time@plt>
mov    -0x28(%rbp),%esi
lea    0xd96(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
cmpl   $0x0,-0x40(%rbp)
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    12af <main+0xbf>
jmp    169e <main+0x4ae>
mov    -0x28(%rbp),%edi
call   1100 <sleep@plt>
movl   $0x0,-0x48(%rbp)
lea    0xdb3(%rip),%rdi
lea    0xdc4(%rip),%rsi
call   10d0 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     167d <main+0x48d>
mov    -0x18(%rbp),%rdi
call   1110 <getc@plt>
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    0x2cf2(%rip),%rcx
cmp    (%rcx),%eax
je     1318 <main+0x128>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x18(%rbp),%rdi
call   1110 <getc@plt>
mov    %eax,-0x34(%rbp)
jmp    12ec <main+0xfc>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
cmpl   $0x0,-0x2c(%rbp)
jne    134c <main+0x15c>
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x50(%rbp)
movl   $0x0,-0x4c(%rbp)
movl   $0x0,-0x54(%rbp)
jmp    166b <main+0x47b>
cmpl   $0x0,-0x24(%rbp)
jne    137e <main+0x18e>
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jne    137e <main+0x18e>
movl   $0x1,-0x24(%rbp)
lea    0xd22(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    $0x0,%al
call   10c0 <print_time@plt>
cmpl   $0x3,-0x24(%rbp)
jne    13e0 <main+0x1f0>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
call   10f0 <detect_cycle@plt>
cmp    $0x0,%eax
jne    13b8 <main+0x1c8>
lea    0xcfe(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0x5,-0x24(%rbp)
jmp    13db <main+0x1eb>
lea    -0x3a(%rbp),%rsi
lea    0xcf1(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0x4,-0x24(%rbp)
movl   $0x1,-0xa4(%rbp)
jmp    13e0 <main+0x1f0>
cmpl   $0x4,-0x24(%rbp)
jne    1421 <main+0x231>
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
call   10f0 <detect_cycle@plt>
cmp    $0x1,%eax
jl     141c <main+0x22c>
lea    0xcc1(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    $0x0,%al
call   10c0 <print_time@plt>
movl   $0x5,-0x24(%rbp)
jmp    1421 <main+0x231>
cmpl   $0x5,-0x24(%rbp)
jne    1505 <main+0x315>
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jne    1505 <main+0x315>
lea    -0x3a(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x28(%rax),%rsi
mov    -0x10(%rbp),%rax
mov    0x40(%rax),%rdx
mov    -0x10(%rbp),%rax
mov    0x48(%rax),%rcx
mov    -0xa4(%rbp),%r8d
call   1040 <out_to_print@plt>
movl   $0x0,-0x24(%rbp)
lea    0xca0(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
cmpl   $0x1,-0xa4(%rbp)
jne    14b6 <main+0x2c6>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%eax
mov    %eax,-0xac(%rbp)
mov    -0x10(%rbp),%rax
mov    0x30(%rax),%rdi
call   10e0 <atoi@plt>
mov    -0xac(%rbp),%esi
mov    %eax,%edx
lea    0xc31(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0x0,-0xa4(%rbp)
mov    -0x44(%rbp),%eax
mov    %eax,-0xb0(%rbp)
mov    -0x10(%rbp),%rax
mov    0x30(%rax),%rdi
call   10e0 <atoi@plt>
mov    %eax,%ecx
mov    -0xb0(%rbp),%eax
cmp    %ecx,%eax
jne    1500 <main+0x310>
lea    0xc24(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xc27(%rip),%rdi
call   1060 <system@plt>
jmp    1505 <main+0x315>
cmpl   $0x2,-0x24(%rbp)
jne    1558 <main+0x368>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    -0x3a(%rbp),%rsi
call   1080 <get_cycle_number@plt>
lea    -0x3a(%rbp),%rdi
call   1050 <strlen@plt>
cmp    $0x2,%eax
jl     153e <main+0x34e>
movl   $0x3,-0x24(%rbp)
jmp    1553 <main+0x363>
lea    0xbf8(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0x5,-0x24(%rbp)
jmp    1558 <main+0x368>
cmpl   $0x1,-0x24(%rbp)
jne    1575 <main+0x385>
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jne    1575 <main+0x385>
movl   $0x2,-0x24(%rbp)
cmpl   $0x4,-0x24(%rbp)
jne    1666 <main+0x476>
mov    -0x54(%rbp),%eax
mov    %eax,-0xb4(%rbp)
mov    -0x10(%rbp),%rax
mov    0x38(%rax),%rdi
call   10e0 <atoi@plt>
mov    %eax,%ecx
mov    -0xb4(%rbp),%eax
cmp    %ecx,%eax
jge    1666 <main+0x476>
movl   $0xa,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1661 <main+0x471>
mov    -0x10(%rbp),%rax
movslq -0x48(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x4c(%rbp),%esi
call   10a0 <alarm_detected@plt>
mov    %eax,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x4c(%rbp),%eax
jle    164e <main+0x45e>
mov    -0x10(%rbp),%rax
movslq -0x48(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xb69(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    $0x0,%al
call   10c0 <print_time@plt>
lea    0xb68(%rip),%rdi
lea    0xb75(%rip),%rsi
call   10d0 <fopen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rax
movslq -0x48(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xb57(%rip),%rsi
call   1090 <fprintf@plt>
mov    $0x0,%al
call   10c0 <print_time@plt>
mov    -0x20(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x50(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    1653 <main+0x463>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    15ac <main+0x3bc>
jmp    1666 <main+0x476>
jmp    166b <main+0x47b>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x30(%rbp)
movl   $0x0,-0x2c(%rbp)
jmp    168b <main+0x49b>
lea    0xb02(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    0x2946(%rip),%rax
mov    (%rax),%edi
call   10b0 <fflush@plt>
jmp    1299 <main+0xa9>
mov    -0x4(%rbp),%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%r14
mov    %edi,%ebp
mov    0x8(%rsi),%rdi
call   10f0 <atoi@plt>
mov    %eax,%ebx
lea    0xdf3(%rip),%rdi
xor    %eax,%eax
call   1080 <printf@plt>
xor    %eax,%eax
call   10d0 <print_time@plt>
lea    0xe06(%rip),%rdi
mov    %ebx,0x14(%rsp)
mov    %ebx,%esi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %ebp,0x10(%rsp)
mov    %ebp,%eax
mov    %rax,0x20(%rsp)
mov    0x2d8f(%rip),%r12
movl   $0x0,0x8(%rsp)
xor    %r13d,%r13d
movl   $0x0,0xc(%rsp)
xor    %ebp,%ebp
movl   $0x0,0x4(%rsp)
movl   $0x0,(%rsp)
jmp    12ae <main+0xae>
nop
mov    %rbx,%rdi
call   1040 <fclose@plt>
xor    %r13d,%r13d
movl   $0x0,0xc(%rsp)
xor    %r15d,%r15d
movl   $0x0,(%rsp)
mov    0x2d34(%rip),%rax
mov    (%rax),%edi
call   10c0 <fflush@plt>
mov    %r15d,%ebp
mov    0x14(%rsp),%edi
call   1110 <sleep@plt>
lea    0xdd2(%rip),%rdi
lea    0xde3(%rip),%rsi
call   10e0 <fopen@plt>
test   %rax,%rax
je     1350 <main+0x150>
mov    %rax,%rbx
mov    %rax,%rdi
call   1120 <getc@plt>
cmp    (%r12),%eax
je     1280 <main+0x80>
xor    %r15d,%r15d
nopw   0x0(%rax,%rax,1)
add    $0x1,%r15d
mov    %rbx,%rdi
call   1120 <getc@plt>
cmp    (%r12),%eax
jne    12f0 <main+0xf0>
mov    %rbx,%rdi
call   1040 <fclose@plt>
mov    (%rsp),%edx
cmp    $0x5,%edx
ja     1364 <main+0x164>
mov    %edx,%eax
lea    0xce5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
cmp    %r15d,%ebp
jne    1296 <main+0x96>
lea    0xd76(%rip),%rdi
xor    %eax,%eax
call   1080 <printf@plt>
xor    %eax,%eax
call   10d0 <print_time@plt>
movl   $0x2,(%rsp)
jmp    135c <main+0x15c>
nopl   0x0(%rax,%rax,1)
lea    0xe1c(%rip),%rdi
call   1030 <puts@plt>
mov    %ebp,%r15d
jmp    129d <main+0x9d>
xor    %eax,%eax
cmp    %r15d,%ebp
sete   %al
add    $0x1,%eax
cmp    $0x1,%edx
cmove  %eax,%edx
mov    %edx,(%rsp)
jmp    129d <main+0x9d>
mov    0x10(%r14),%rdi
lea    0x1a(%rsp),%rbx
mov    %rbx,%rsi
call   1090 <get_cycle_number@plt>
mov    %rbx,%rdi
call   1060 <strlen@plt>
cmp    $0x1,%eax
jle    1555 <main+0x355>
movl   $0x3,(%rsp)
jmp    129d <main+0x9d>
mov    0x18(%r14),%rdi
call   1100 <detect_cycle@plt>
test   %eax,%eax
je     1579 <main+0x379>
lea    0xcf8(%rip),%rdi
lea    0x1a(%rsp),%rsi
xor    %eax,%eax
call   1080 <printf@plt>
movl   $0x1,0x4(%rsp)
mov    0x20(%r14),%rdi
call   1100 <detect_cycle@plt>
test   %eax,%eax
jle    145b <main+0x25b>
lea    0xce4(%rip),%rdi
xor    %eax,%eax
call   1080 <printf@plt>
xor    %eax,%eax
call   10d0 <print_time@plt>
cmp    %r15d,%ebp
jne    158e <main+0x38e>
mov    0x28(%r14),%rsi
mov    0x40(%r14),%rdx
mov    0x48(%r14),%rcx
lea    0x1a(%rsp),%rdi
mov    0x4(%rsp),%ebx
mov    %ebx,%r8d
call   1050 <out_to_print@plt>
lea    0xcef(%rip),%rdi
call   1030 <puts@plt>
cmp    $0x1,%ebx
jne    150c <main+0x30c>
mov    0x8(%rsp),%ebx
add    $0x1,%ebx
mov    0x30(%r14),%rdi
call   10f0 <atoi@plt>
lea    0xc9c(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1080 <printf@plt>
jmp    1510 <main+0x310>
mov    0x38(%r14),%rdi
call   10f0 <atoi@plt>
cmp    %eax,0xc(%rsp)
jge    156d <main+0x36d>
mov    0x10(%rsp),%eax
cmp    $0xb,%eax
jl     156d <main+0x36d>
movl   $0x4,(%rsp)
mov    $0xa,%ebp
mov    %r13d,%ebx
jmp    149f <main+0x29f>
nopl   0x0(%rax)
add    $0x1,%rbp
cmp    %rbp,0x20(%rsp)
je     159a <main+0x39a>
mov    (%r14,%rbp,8),%rdi
mov    %ebx,%esi
call   10b0 <alarm_detected@plt>
cmp    %ebx,%eax
jle    1490 <main+0x290>
mov    %eax,%r13d
mov    (%r14,%rbp,8),%rsi
lea    0xc88(%rip),%rdi
xor    %eax,%eax
call   1080 <printf@plt>
xor    %eax,%eax
call   10d0 <print_time@plt>
lea    0xc87(%rip),%rdi
lea    0xc94(%rip),%rsi
call   10e0 <fopen@plt>
mov    %rax,%rbx
mov    (%r14,%rbp,8),%rdx
mov    %rax,%rdi
lea    0xc80(%rip),%rsi
call   10a0 <fprintf@plt>
xor    %eax,%eax
call   10d0 <print_time@plt>
mov    %rbx,%rdi
call   1040 <fclose@plt>
addl   $0x1,0xc(%rsp)
mov    %r13d,%ebx
jmp    1490 <main+0x290>
mov    0x8(%rsp),%ebx
mov    0x30(%r14),%rdi
call   10f0 <atoi@plt>
cmp    %eax,%ebx
mov    %ebx,0x8(%rsp)
jne    1545 <main+0x345>
movl   $0x0,0x4(%rsp)
lea    0xbe8(%rip),%rdi
xor    %eax,%eax
call   1080 <printf@plt>
lea    0xbeb(%rip),%rdi
call   1070 <system@plt>
jmp    154d <main+0x34d>
movl   $0x0,0x4(%rsp)
mov    %ebp,%r15d
jmp    1296 <main+0x96>
lea    0xc27(%rip),%rdi
call   1030 <puts@plt>
movl   $0x5,(%rsp)
jmp    129d <main+0x9d>
movl   $0x4,(%rsp)
jmp    129d <main+0x9d>
lea    0xc1c(%rip),%rdi
call   1030 <puts@plt>
cmp    %r15d,%ebp
je     1402 <main+0x202>
movl   $0x5,(%rsp)
jmp    129d <main+0x9d>
mov    %ebx,%r13d
jmp    129d <main+0x9d>

LLVM IR (-O0):
@.str = [40 x i8] c"\0A\0ACycle Detection Application Started \00"
@.str.1 = [80 x i8] c"Monitors active_log.txt file every %d seconds.\0A\0AVersion 0 2015-OCT-20 By -DL-\0A\0A\00"
@.str.2 = [24 x i8] c"/var/www/active_log.txt\00"
@.str.3 = [2 x i8] c"r\00"
@EOF = global i32 0
@.str.4 = [17 x i8] c"LOG FILE ACTIVE \00"
@.str.5 = [17 x i8] c"NON CYCLE PRINT\0A\00"
@.str.6 = [20 x i8] c"CYCLE NUMBER: %s \0A\00"
@.str.7 = [24 x i8] c"END OF CYCLE DETECTED \00"
@.str.8 = [4 x i8] c"\0A\0A\0A\00"
@.str.9 = [49 x i8] c"(%d)out of (%d) cycles printed before reboot.\0A\0A\0A\00"
@.str.10 = [17 x i8] c"Rebooting system\00"
@.str.11 = [27 x i8] c"sudo /sbin/shutdown -r now\00"
@.str.12 = [26 x i8] c"NO CYCLE NUMBER DETECTED\0A\00"
@.str.13 = [20 x i8] c"%s ALARM DETECTED \00"
@.str.14 = [20 x i8] c"/var/www/alarms.txt\00"
@.str.15 = [2 x i8] c"a\00"
@.str.16 = [5 x i8] c"%s \00"
@.str.17 = [17 x i8] c"LOG_FILE = NULL\0A\00"
@stdout = global i32 0
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
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca [6 x i8]
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca [64 x i8]
%22 = alloca i32
%23 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %8
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 1
%26 = load i8*, i8** %25
%27 = call i32 @atoi(i8* %26)
store i32 %27, i32* %9
store i32 0, i32* %10
store i32 0, i32* %11
store i32 0, i32* %14
store i32 0, i32* %15
store i32 0, i32* %16
store i32 0, i32* %17
store i32 0, i32* %18
store i32 0, i32* %19
store i32 0, i32* %20
store i32 0, i32* %22
store i32 0, i32* %23
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%29 = call i32 (...) @print_time()
%30 = load i32, i32* %9
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.1, i64 0, i64 0), i32 %30)
br label %32
32: ; preds = %224, %2
%33 = load i32, i32* %14
%34 = icmp ne i32 %33, 0
%35 = xor i1 %34, true
br i1 %35, label %36, label %227
36: ; preds = %32
%37 = load i32, i32* %9
%38 = call i32 @sleep(i32 %37)
store i32 0, i32* %16
%39 = call i32* @fopen(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %39, i32** %6
%40 = load i32*, i32** %6
%41 = icmp ne i32* %40, null
br i1 %41, label %42, label %222
42: ; preds = %36
%43 = load i32*, i32** %6
%44 = call i32 @getc(i32* %43)
store i32 %44, i32* %12
br label %45
45: ; preds = %49, %42
%46 = load i32, i32* %12
%47 = load i32, i32* @EOF
%48 = icmp ne i32 %46, %47
br i1 %48, label %49, label %54
49: ; preds = %45
%50 = load i32, i32* %10
%51 = add nsw i32 %50, 1
store i32 %51, i32* %10
%52 = load i32*, i32** %6
%53 = call i32 @getc(i32* %52)
store i32 %53, i32* %12
br label %45
54: ; preds = %45
%55 = load i32*, i32** %6
%56 = call i32 @fclose(i32* %55)
%57 = load i32, i32* %10
%58 = icmp eq i32 %57, 0
br i1 %58, label %59, label %60
59: ; preds = %54
store i32 0, i32* %8
store i32 0, i32* %18
store i32 0, i32* %17
store i32 0, i32* %19
br label %220
60: ; preds = %54
%61 = load i32, i32* %8
%62 = icmp eq i32 %61, 0
br i1 %62, label %63, label %70
63: ; preds = %60
%64 = load i32, i32* %11
%65 = load i32, i32* %10
%66 = icmp eq i32 %64, %65
br i1 %66, label %67, label %70
67: ; preds = %63
store i32 1, i32* %8
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
%69 = call i32 (...) @print_time()
br label %70
70: ; preds = %67, %63, %60
%71 = load i32, i32* %8
%72 = icmp eq i32 %71, 3
br i1 %72, label %73, label %85
73: ; preds = %70
%74 = load i8**, i8*** %5
%75 = getelementptr inbounds i8*, i8** %74, i64 3
%76 = load i8*, i8** %75
%77 = call i32 @detect_cycle(i8* %76)
%78 = icmp eq i32 %77, 0
br i1 %78, label %79, label %81
79: ; preds = %73
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
store i32 5, i32* %8
br label %84
81: ; preds = %73
%82 = getelementptr inbounds [6 x i8], [6 x i8]* %13, i64 0, i64 0
%83 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i8* %82)
store i32 4, i32* %8
store i32 1, i32* %22
br label %84
84: ; preds = %81, %79
br label %85
85: ; preds = %84, %70
%86 = load i32, i32* %8
%87 = icmp eq i32 %86, 4
br i1 %87, label %88, label %98
88: ; preds = %85
%89 = load i8**, i8*** %5
%90 = getelementptr inbounds i8*, i8** %89, i64 4
%91 = load i8*, i8** %90
%92 = call i32 @detect_cycle(i8* %91)
%93 = icmp sge i32 %92, 1
br i1 %93, label %94, label %97
94: ; preds = %88
%95 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.7, i64 0, i64 0))
%96 = call i32 (...) @print_time()
store i32 5, i32* %8
br label %97
97: ; preds = %94, %88
br label %98
98: ; preds = %97, %85
%99 = load i32, i32* %8
%100 = icmp eq i32 %99, 5
br i1 %100, label %101, label %141
101: ; preds = %98
%102 = load i32, i32* %11
%103 = load i32, i32* %10
%104 = icmp eq i32 %102, %103
br i1 %104, label %105, label %141
105: ; preds = %101
%106 = getelementptr inbounds [6 x i8], [6 x i8]* %13, i64 0, i64 0
%107 = load i8**, i8*** %5
%108 = getelementptr inbounds i8*, i8** %107, i64 5
%109 = load i8*, i8** %108
%110 = load i8**, i8*** %5
%111 = getelementptr inbounds i8*, i8** %110, i64 8
%112 = load i8*, i8** %111
%113 = load i8**, i8*** %5
%114 = getelementptr inbounds i8*, i8** %113, i64 9
%115 = load i8*, i8** %114
%116 = load i32, i32* %22
%117 = call i32 @out_to_print(i8* %106, i8* %109, i8* %112, i8* %115, i32 %116)
store i32 0, i32* %8
%118 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
%119 = load i32, i32* %22
%120 = icmp eq i32 %119, 1
br i1 %120, label %121, label %130
121: ; preds = %105
%122 = load i32, i32* %15
%123 = add nsw i32 %122, 1
store i32 %123, i32* %15
%124 = load i32, i32* %15
%125 = load i8**, i8*** %5
%126 = getelementptr inbounds i8*, i8** %125, i64 6
%127 = load i8*, i8** %126
%128 = call i32 @atoi(i8* %127)
%129 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.9, i64 0, i64 0), i32 %124, i32 %128)
br label %130
130: ; preds = %121, %105
store i32 0, i32* %22
%131 = load i32, i32* %15
%132 = load i8**, i8*** %5
%133 = getelementptr inbounds i8*, i8** %132, i64 6
%134 = load i8*, i8** %133
%135 = call i32 @atoi(i8* %134)
%136 = icmp eq i32 %131, %135
br i1 %136, label %137, label %140
137: ; preds = %130
%138 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0))
%139 = call i32 @system(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.11, i64 0, i64 0))
br label %140
140: ; preds = %137, %130
br label %141
141: ; preds = %140, %101, %98
%142 = load i32, i32* %8
%143 = icmp eq i32 %142, 2
br i1 %143, label %144, label %157
144: ; preds = %141
%145 = load i8**, i8*** %5
%146 = getelementptr inbounds i8*, i8** %145, i64 2
%147 = load i8*, i8** %146
%148 = getelementptr inbounds [6 x i8], [6 x i8]* %13, i64 0, i64 0
%149 = call i32 @get_cycle_number(i8* %147, i8* %148)
%150 = getelementptr inbounds [6 x i8], [6 x i8]* %13, i64 0, i64 0
%151 = call i32 @strlen(i8* %150)
%152 = icmp sge i32 %151, 2
br i1 %152, label %153, label %154
153: ; preds = %144
store i32 3, i32* %8
br label %156
154: ; preds = %144
%155 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.12, i64 0, i64 0))
store i32 5, i32* %8
br label %156
156: ; preds = %154, %153
br label %157
157: ; preds = %156, %141
%158 = load i32, i32* %8
%159 = icmp eq i32 %158, 1
br i1 %159, label %160, label %165
160: ; preds = %157
%161 = load i32, i32* %11
%162 = load i32, i32* %10
%163 = icmp eq i32 %161, %162
br i1 %163, label %164, label %165
164: ; preds = %160
store i32 2, i32* %8
br label %165
165: ; preds = %164, %160, %157
%166 = load i32, i32* %8
%167 = icmp eq i32 %166, 4
br i1 %167, label %168, label %219
168: ; preds = %165
%169 = load i32, i32* %19
%170 = load i8**, i8*** %5
%171 = getelementptr inbounds i8*, i8** %170, i64 7
%172 = load i8*, i8** %171
%173 = call i32 @atoi(i8* %172)
%174 = icmp slt i32 %169, %173
br i1 %174, label %175, label %219
175: ; preds = %168
store i32 10, i32* %16
br label %176
176: ; preds = %215, %175
%177 = load i32, i32* %16
%178 = load i32, i32* %4
%179 = icmp slt i32 %177, %178
br i1 %179, label %180, label %218
180: ; preds = %176
%181 = load i32, i32* %20
%182 = load i8**, i8*** %5
%183 = load i32, i32* %16
%184 = sext i32 %183 to i64
%185 = getelementptr inbounds i8*, i8** %182, i64 %184
%186 = load i8*, i8** %185
%187 = load i32, i32* %17
%188 = call i32 @alarm_detected(i8* %186, i32 %187)
store i32 %188, i32* %18
%189 = load i32, i32* %18
%190 = load i32, i32* %17
%191 = icmp sgt i32 %189, %190
br i1 %191, label %192, label %214
192: ; preds = %180
%193 = load i8**, i8*** %5
%194 = load i32, i32* %16
%195 = sext i32 %194 to i64
%196 = getelementptr inbounds i8*, i8** %193, i64 %195
%197 = load i8*, i8** %196
%198 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.13, i64 0, i64 0), i8* %197)
%199 = call i32 (...) @print_time()
%200 = call i32* @fopen(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0))
store i32* %200, i32** %7
%201 = load i32*, i32** %7
%202 = load i8**, i8*** %5
%203 = load i32, i32* %16
%204 = sext i32 %203 to i64
%205 = getelementptr inbounds i8*, i8** %202, i64 %204
%206 = load i8*, i8** %205
%207 = call i32 @fprintf(i32* %201, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0), i8* %206)
%208 = call i32 (...) @print_time()
%209 = load i32*, i32** %7
%210 = call i32 @fclose(i32* %209)
%211 = load i32, i32* %18
store i32 %211, i32* %17
%212 = load i32, i32* %19
%213 = add nsw i32 %212, 1
store i32 %213, i32* %19
br label %214
214: ; preds = %192, %180
br label %215
215: ; preds = %214
%216 = load i32, i32* %16
%217 = add nsw i32 %216, 1
store i32 %217, i32* %16
br label %176
218: ; preds = %176
br label %219
219: ; preds = %218, %168, %165
br label %220
220: ; preds = %219, %59
%221 = load i32, i32* %10
store i32 %221, i32* %11
store i32 0, i32* %10
br label %224
222: ; preds = %36
%223 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.17, i64 0, i64 0))
br label %224
224: ; preds = %222, %220
%225 = load i32, i32* @stdout
%226 = call i32 @fflush(i32 %225)
br label %32
227: ; preds = %32
%228 = load i32, i32* %3
ret i32 %228
}

LLVM IR (-O2):
@.str = [40 x i8] c"\0A\0ACycle Detection Application Started \00"
@.str.1 = [80 x i8] c"Monitors active_log.txt file every %d seconds.\0A\0AVersion 0 2015-OCT-20 By -DL-\0A\0A\00"
@.str.2 = [24 x i8] c"/var/www/active_log.txt\00"
@.str.3 = [2 x i8] c"r\00"
@EOF = global i32 0
@.str.4 = [17 x i8] c"LOG FILE ACTIVE \00"
@.str.6 = [20 x i8] c"CYCLE NUMBER: %s \0A\00"
@.str.7 = [24 x i8] c"END OF CYCLE DETECTED \00"
@.str.9 = [49 x i8] c"(%d)out of (%d) cycles printed before reboot.\0A\0A\0A\00"
@.str.10 = [17 x i8] c"Rebooting system\00"
@.str.11 = [27 x i8] c"sudo /sbin/shutdown -r now\00"
@.str.13 = [20 x i8] c"%s ALARM DETECTED \00"
@.str.14 = [20 x i8] c"/var/www/alarms.txt\00"
@.str.15 = [2 x i8] c"a\00"
@.str.16 = [5 x i8] c"%s \00"
@stdout = global i32 0
@str = [16 x i8] c"LOG_FILE = NULL\00"
@str.18 = [25 x i8] c"NO CYCLE NUMBER DETECTED\00"
@str.19 = [3 x i8] c"\0A\0A\00"
@str.20 = [16 x i8] c"NON CYCLE PRINT\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [6 x i8]
%4 = getelementptr inbounds i8*, i8** %1, i64 1
%5 = load i8*, i8** %4
%6 = tail call i32 @atoi(i8* %5)
%7 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 (...) @print_time()
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%11 = getelementptr inbounds i8*, i8** %1, i64 2
%12 = getelementptr inbounds i8*, i8** %1, i64 3
%13 = getelementptr inbounds i8*, i8** %1, i64 4
%14 = getelementptr inbounds i8*, i8** %1, i64 7
%15 = icmp sgt i32 %0, 10
%16 = getelementptr inbounds i8*, i8** %1, i64 5
%17 = getelementptr inbounds i8*, i8** %1, i64 8
%18 = getelementptr inbounds i8*, i8** %1, i64 9
%19 = getelementptr inbounds i8*, i8** %1, i64 6
%20 = zext i32 %0 to i64
br label %21
21: ; preds = %131, %2
%22 = phi i32 [ 0, %2 ], [ %132, %131 ]
%23 = phi i32 [ 0, %2 ], [ %133, %131 ]
%24 = phi i32 [ 0, %2 ], [ %134, %131 ]
%25 = phi i32 [ 0, %2 ], [ %135, %131 ]
%26 = phi i32 [ 0, %2 ], [ %136, %131 ]
%27 = phi i32 [ 0, %2 ], [ %137, %131 ]
%28 = call i32 @sleep(i32 %6)
%29 = call i32* @fopen(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%30 = icmp eq i32* %29, null
br i1 %30, label %129, label %31
31: ; preds = %21
%32 = call i32 @getc(i32* %29)
%33 = load i32, i32* @EOF
%34 = icmp eq i32 %32, %33
br i1 %34, label %35, label %37
35: ; preds = %31
%36 = call i32 @fclose(i32* %29)
br label %131
37: ; preds = %31, %37
%38 = phi i32 [ %39, %37 ], [ 0, %31 ]
%39 = add nuw nsw i32 %38, 1
%40 = call i32 @getc(i32* %29)
%41 = load i32, i32* @EOF
%42 = icmp eq i32 %40, %41
br i1 %42, label %43, label %37
43: ; preds = %37
%44 = call i32 @fclose(i32* %29)
switch i32 %27, label %96 [
i32 0, label %45
i32 3, label %50
i32 4, label %58
i32 5, label %66
i32 2, label %89
]
45: ; preds = %43
%46 = icmp eq i32 %25, %39
br i1 %46, label %47, label %131
47: ; preds = %45
%48 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
%49 = call i32 (...) @print_time()
br label %131
50: ; preds = %43
%51 = load i8*, i8** %12
%52 = call i32 @detect_cycle(i8* %51)
%53 = icmp eq i32 %52, 0
br i1 %53, label %54, label %56
54: ; preds = %50
%55 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.20, i64 0, i64 0))
br label %66
56: ; preds = %50
%57 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i8* %7)
br label %58
58: ; preds = %43, %56
%59 = phi i32 [ 1, %56 ], [ %26, %43 ]
%60 = load i8*, i8** %13
%61 = call i32 @detect_cycle(i8* %60)
%62 = icmp sgt i32 %61, 0
br i1 %62, label %63, label %101
63: ; preds = %58
%64 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.7, i64 0, i64 0))
%65 = call i32 (...) @print_time()
br label %66
66: ; preds = %43, %54, %63
%67 = phi i32 [ %59, %63 ], [ %26, %54 ], [ %26, %43 ]
%68 = icmp eq i32 %25, %39
br i1 %68, label %69, label %131
69: ; preds = %66
%70 = load i8*, i8** %16
%71 = load i8*, i8** %17
%72 = load i8*, i8** %18
%73 = call i32 @out_to_print(i8* %7, i8* %70, i8* %71, i8* %72, i32 %67)
%74 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str.19, i64 0, i64 0))
%75 = icmp eq i32 %67, 1
br i1 %75, label %76, label %81
76: ; preds = %69
%77 = add nsw i32 %22, 1
%78 = load i8*, i8** %19
%79 = call i32 @atoi(i8* %78)
%80 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.9, i64 0, i64 0), i32 %77, i32 %79)
br label %81
81: ; preds = %76, %69
%82 = phi i32 [ %77, %76 ], [ %22, %69 ]
%83 = load i8*, i8** %19
%84 = call i32 @atoi(i8* %83)
%85 = icmp eq i32 %82, %84
br i1 %85, label %86, label %131
86: ; preds = %81
%87 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0))
%88 = call i32 @system(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.11, i64 0, i64 0))
br label %131
89: ; preds = %43
%90 = load i8*, i8** %11
%91 = call i32 @get_cycle_number(i8* %90, i8* %7)
%92 = call i32 @strlen(i8* %7)
%93 = icmp sgt i32 %92, 1
br i1 %93, label %131, label %94
94: ; preds = %89
%95 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.18, i64 0, i64 0))
br label %131
96: ; preds = %43
%97 = icmp eq i32 %25, %39
%98 = select i1 %97, i32 2, i32 1
%99 = icmp eq i32 %27, 1
%100 = select i1 %99, i32 %98, i32 %27
br label %131
101: ; preds = %58
%102 = load i8*, i8** %14
%103 = call i32 @atoi(i8* %102)
%104 = icmp slt i32 %24, %103
br i1 %104, label %105, label %131
105: ; preds = %101
br i1 %15, label %106, label %131
106: ; preds = %105, %124
%107 = phi i64 [ %127, %124 ], [ 10, %105 ]
%108 = phi i32 [ %126, %124 ], [ %24, %105 ]
%109 = phi i32 [ %125, %124 ], [ %23, %105 ]
%110 = getelementptr inbounds i8*, i8** %1, i64 %107
%111 = load i8*, i8** %110
%112 = call i32 @alarm_detected(i8* %111, i32 %109)
%113 = icmp sgt i32 %112, %109
br i1 %113, label %114, label %124
114: ; preds = %106
%115 = load i8*, i8** %110
%116 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.13, i64 0, i64 0), i8* %115)
%117 = call i32 (...) @print_time()
%118 = call i32* @fopen(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0))
%119 = load i8*, i8** %110
%120 = call i32 @fprintf(i32* %118, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0), i8* %119)
%121 = call i32 (...) @print_time()
%122 = call i32 @fclose(i32* %118)
%123 = add nsw i32 %108, 1
br label %124
124: ; preds = %106, %114
%125 = phi i32 [ %112, %114 ], [ %109, %106 ]
%126 = phi i32 [ %123, %114 ], [ %108, %106 ]
%127 = add nuw nsw i64 %107, 1
%128 = icmp eq i64 %127, %20
br i1 %128, label %131, label %106
129: ; preds = %21
%130 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
br label %131
131: ; preds = %124, %35, %105, %96, %45, %86, %81, %66, %94, %89, %47, %101, %129
%132 = phi i32 [ %22, %129 ], [ %22, %101 ], [ %22, %47 ], [ %82, %86 ], [ %82, %81 ], [ %22, %66 ], [ %22, %94 ], [ %22, %89 ], [ %22, %45 ], [ %22, %96 ], [ %22, %105 ], [ %22, %35 ], [ %22, %124 ]
%133 = phi i32 [ %23, %129 ], [ %23, %101 ], [ %23, %47 ], [ %23, %86 ], [ %23, %81 ], [ %23, %66 ], [ %23, %94 ], [ %23, %89 ], [ %23, %45 ], [ %23, %96 ], [ %23, %105 ], [ 0, %35 ], [ %125, %124 ]
%134 = phi i32 [ %24, %129 ], [ %24, %101 ], [ %24, %47 ], [ %24, %86 ], [ %24, %81 ], [ %24, %66 ], [ %24, %94 ], [ %24, %89 ], [ %24, %45 ], [ %24, %96 ], [ %24, %105 ], [ 0, %35 ], [ %126, %124 ]
%135 = phi i32 [ %25, %129 ], [ %39, %101 ], [ %25, %47 ], [ %25, %86 ], [ %25, %81 ], [ %39, %66 ], [ %39, %94 ], [ %39, %89 ], [ %39, %45 ], [ %39, %96 ], [ %39, %105 ], [ 0, %35 ], [ %39, %124 ]
%136 = phi i32 [ %26, %129 ], [ %59, %101 ], [ %26, %47 ], [ 0, %86 ], [ 0, %81 ], [ %67, %66 ], [ %26, %94 ], [ %26, %89 ], [ %26, %45 ], [ %26, %96 ], [ %59, %105 ], [ %26, %35 ], [ %59, %124 ]
%137 = phi i32 [ %27, %129 ], [ 4, %101 ], [ 2, %47 ], [ 0, %86 ], [ 0, %81 ], [ 5, %66 ], [ 5, %94 ], [ 3, %89 ], [ 0, %45 ], [ %100, %96 ], [ 4, %105 ], [ 0, %35 ], [ 4, %124 ]
%138 = load i32, i32* @stdout
%139 = call i32 @fflush(i32 %138)
br label %21
}