#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ free(char *);
int klogctl(int, char *, int);
char *malloc(int);
int overlap_len(char *, char *, int, int);
int /*<<< orphan*/ sleep(unsigned int);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ strcmp(char *, char *);
int /*<<< orphan*/ usage();
int main(int argc, char **argv) {
  int bytes_total;
  int bytes_read;
  int prev_bytes_read = 0;
  char *buffer = NULL;
  char *prev_buffer = NULL;
  char *print_start = NULL;
  unsigned int seconds_to_sleep = 0;
  int skip = 0;
  if (argc > 2) {
    usage();
    return 1;
  } else if (argc == 2) {
    if (!strcmp(argv[1], "--version")) {
      fprintf(stdout, "2010.12.15.1"
                      "\n");
      return 0;
    } else if (!strcmp(argv[1], "--help")) {
      usage();
      return 0;
    } else if (!strcmp(argv[1], "--skip-first")) {
      skip = 1;
    } else {
      usage();
      return 1;
    }
  }
  for (;;) {
    bytes_total = klogctl(10, NULL, 0);
    assert(bytes_total >= 0);
    buffer = malloc(bytes_total + 1);
    bytes_read = klogctl(3, buffer, bytes_total);
    assert((bytes_read >= 0) && (bytes_read <= bytes_total));
    buffer[bytes_read] = '\0';
    if (prev_buffer) {
      const int overlap =
          overlap_len(prev_buffer, buffer, prev_bytes_read, bytes_read);
      if (!overlap) {
        fprintf(
            stderr,
            "WARNING: "
            "Two consecutive calls to syslog(SYSLOG_ACTION_READ_ALL, ...) "
            "returned content with no overlap. "
            "This may indicate that the kernel is producing messages faster "
            "than we can process, which would mean that we have missed some "
            "messages.\n");
        seconds_to_sleep = 1;
      } else {
        const float percentage = overlap * 100.0f / bytes_total;
        seconds_to_sleep = (percentage > 70) ? 3 : 1;
      }
      print_start = buffer + overlap;
    } else {
      print_start = buffer;
      seconds_to_sleep = 1;
    }
    if (skip) {
      skip = 0;
    } else {
      fprintf(stdout, "%s", print_start);
    }
    free(prev_buffer);
    prev_buffer = buffer;
    prev_bytes_read = bytes_read;
    sleep(seconds_to_sleep);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x1c(%rbp)
movq   $0x0,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
movq   $0x0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
movl   $0x0,-0x40(%rbp)
cmpl   $0x2,-0x8(%rbp)
jle    11f0 <main+0x60>
mov    $0x0,%al
call   10a0 <usage@plt>
movl   $0x1,-0x4(%rbp)
jmp    143f <main+0x2af>
cmpl   $0x2,-0x8(%rbp)
jne    12b5 <main+0x125>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdff(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    123a <main+0xaa>
mov    0x2dba(%rip),%rax
mov    (%rax),%edi
lea    0xdeb(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    143f <main+0x2af>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdd7(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    126a <main+0xda>
mov    $0x0,%al
call   10a0 <usage@plt>
movl   $0x0,-0x4(%rbp)
jmp    143f <main+0x2af>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdae(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1293 <main+0x103>
movl   $0x1,-0x40(%rbp)
jmp    12a6 <main+0x116>
mov    $0x0,%al
call   10a0 <usage@plt>
movl   $0x1,-0x4(%rbp)
jmp    143f <main+0x2af>
jmp    12ab <main+0x11b>
jmp    12b0 <main+0x120>
jmp    12b5 <main+0x125>
jmp    12ba <main+0x12a>
jmp    12bf <main+0x12f>
mov    $0xa,%edi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1080 <klogctl@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x14(%rbp),%edi
add    $0x1,%edi
call   1070 <malloc@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    $0x3,%edi
call   1080 <klogctl@plt>
mov    %eax,-0x18(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x18(%rbp)
mov    %al,-0x49(%rbp)
jl     1321 <main+0x191>
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
setle  %al
mov    %al,-0x49(%rbp)
mov    -0x49(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x28(%rbp),%rax
movslq -0x18(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
cmpq   $0x0,-0x30(%rbp)
je     13db <main+0x24b>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    -0x18(%rbp),%ecx
call   1090 <overlap_len@plt>
mov    %eax,-0x44(%rbp)
cmpl   $0x0,-0x44(%rbp)
jne    1388 <main+0x1f8>
mov    0x2c74(%rip),%rax
mov    (%rax),%edi
lea    0xcbf(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x1,-0x3c(%rbp)
jmp    13c7 <main+0x237>
cvtsi2ssl -0x44(%rbp),%xmm0
movss  0xc6f(%rip),%xmm1
mulss  %xmm1,%xmm0
cvtsi2ssl -0x14(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x48(%rbp)
movss  -0x48(%rbp),%xmm0
movss  0xc4c(%rip),%xmm1
mov    $0x1,%eax
mov    $0x3,%ecx
ucomiss %xmm1,%xmm0
cmova  %ecx,%eax
mov    %eax,-0x3c(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x44(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
jmp    13ea <main+0x25a>
mov    -0x28(%rbp),%rax
mov    %rax,-0x38(%rbp)
movl   $0x1,-0x3c(%rbp)
cmpl   $0x0,-0x40(%rbp)
je     1400 <main+0x270>
movl   $0x0,-0x40(%rbp)
jmp    141b <main+0x28b>
mov    0x2bd1(%rip),%rax
mov    (%rax),%edi
mov    -0x38(%rbp),%rdx
lea    0xd11(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
mov    -0x28(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x3c(%rbp),%edi
call   10b0 <sleep@plt>
jmp    12bf <main+0x12f>
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
cmp    $0x3,%edi
jl     11bd <main+0x2d>
xor    %eax,%eax
call   10a0 <usage@plt>
mov    $0x1,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %edi,%ebx
cmp    $0x2,%edi
jne    1209 <main+0x79>
mov    0x8(%rsi),%rbp
lea    0xe39(%rip),%rsi
mov    %rbp,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     134c <main+0x1bc>
lea    0xe3a(%rip),%rsi
mov    %rbp,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     136a <main+0x1da>
lea    0xe2a(%rip),%rsi
mov    %rbp,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
jne    11a0 <main+0x10>
cmp    $0x2,%ebx
setne  %r15b
xor    %r12d,%r12d
xor    %r13d,%r13d
jmp    1239 <main+0xa9>
nopl   0x0(%rax,%rax,1)
mov    %r12,%rdi
call   1030 <free@plt>
mov    %r14d,%edi
call   10b0 <sleep@plt>
mov    $0x1,%r15b
mov    %rbx,%r12
mov    %ebp,%r13d
mov    $0xa,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1080 <klogctl@plt>
mov    %eax,%r14d
mov    %eax,%edi
not    %edi
shr    $0x1f,%edi
call   1050 <assert@plt>
lea    0x1(%r14),%edi
call   1070 <malloc@plt>
mov    %rax,%rbx
mov    $0x3,%edi
mov    %rax,%rsi
mov    %r14d,%edx
call   1080 <klogctl@plt>
mov    %eax,%ebp
test   %eax,%eax
setns  %al
cmp    %r14d,%ebp
setle  %cl
and    %al,%cl
movzbl %cl,%edi
call   1050 <assert@plt>
movslq %ebp,%rax
movb   $0x0,(%rbx,%rax,1)
test   %r12,%r12
je     12e0 <main+0x150>
mov    %r12,%rdi
mov    %rbx,%rsi
mov    %r13d,%edx
mov    %ebp,%ecx
call   1090 <overlap_len@plt>
mov    %eax,%r13d
test   %eax,%eax
je     1300 <main+0x170>
xorps  %xmm0,%xmm0
cvtsi2ss %r13d,%xmm0
mulss  0xd44(%rip),%xmm0
xorps  %xmm1,%xmm1
cvtsi2ss %r14d,%xmm1
divss  %xmm1,%xmm0
xor    %eax,%eax
ucomiss 0xd33(%rip),%xmm0
seta   %al
lea    (%rax,%rax,1),%r14d
add    $0x1,%r14d
jmp    131d <main+0x18d>
xchg   %ax,%ax
mov    $0x1,%r14d
mov    %rbx,%rdx
test   $0x1,%r15b
je     1220 <main+0x90>
jmp    1330 <main+0x1a0>
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x2cd9(%rip),%rax
mov    (%rax),%edi
lea    0xd24(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    $0x1,%r14d
movslq %r13d,%rax
mov    %rbx,%rdx
add    %rax,%rdx
test   $0x1,%r15b
je     1220 <main+0x90>
mov    0x2ca1(%rip),%rax
mov    (%rax),%edi
lea    0xde5(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
jmp    1220 <main+0x90>
mov    0x2c85(%rip),%rax
mov    (%rax),%edi
lea    0xcb6(%rip),%rsi
xor    %ebx,%ebx
xor    %eax,%eax
call   1060 <fprintf@plt>
jmp    11ac <main+0x1c>
xor    %ebx,%ebx
xor    %eax,%eax
call   10a0 <usage@plt>
jmp    11ac <main+0x1c>

LLVM IR (-O0):
@.str = [10 x i8] c"--version\00"
@stdout = global i32 0
@.str.1 = [14 x i8] c"2010.12.15.1\0A\00"
@.str.2 = [7 x i8] c"--help\00"
@.str.3 = [13 x i8] c"--skip-first\00"
@stderr = global i32 0
@.str.4 = [241 x i8] c"WARNING: Two consecutive calls to syslog(SYSLOG_ACTION_READ_ALL, ...) returned content with no overlap. This may indicate that the kernel is producing messages faster than we can process, which would mean that we have missed some messages.\0A\00"
@.str.5 = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %8
store i8* null, i8** %9
store i8* null, i8** %10
store i8* null, i8** %11
store i32 0, i32* %12
store i32 0, i32* %13
%16 = load i32, i32* %4
%17 = icmp sgt i32 %16, 2
br i1 %17, label %18, label %20
18: ; preds = %2
%19 = call i32 (...) @usage()
store i32 1, i32* %3
br label %126
20: ; preds = %2
%21 = load i32, i32* %4
%22 = icmp eq i32 %21, 2
br i1 %22, label %23, label %52
23: ; preds = %20
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 1
%26 = load i8*, i8** %25
%27 = call i32 @strcmp(i8* %26, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%28 = icmp ne i32 %27, 0
br i1 %28, label %32, label %29
29: ; preds = %23
%30 = load i32, i32* @stdout
%31 = call i32 (i32, i8*, ...) @fprintf(i32 %30, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %3
br label %126
32: ; preds = %23
%33 = load i8**, i8*** %5
%34 = getelementptr inbounds i8*, i8** %33, i64 1
%35 = load i8*, i8** %34
%36 = call i32 @strcmp(i8* %35, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%37 = icmp ne i32 %36, 0
br i1 %37, label %40, label %38
38: ; preds = %32
%39 = call i32 (...) @usage()
store i32 0, i32* %3
br label %126
40: ; preds = %32
%41 = load i8**, i8*** %5
%42 = getelementptr inbounds i8*, i8** %41, i64 1
%43 = load i8*, i8** %42
%44 = call i32 @strcmp(i8* %43, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
%45 = icmp ne i32 %44, 0
br i1 %45, label %47, label %46
46: ; preds = %40
store i32 1, i32* %13
br label %49
47: ; preds = %40
%48 = call i32 (...) @usage()
store i32 1, i32* %3
br label %126
49: ; preds = %46
br label %50
50: ; preds = %49
br label %51
51: ; preds = %50
br label %52
52: ; preds = %51, %20
br label %53
53: ; preds = %52
br label %54
54: ; preds = %119, %53
%55 = call i32 @klogctl(i32 10, i8* null, i32 0)
store i32 %55, i32* %6
%56 = load i32, i32* %6
%57 = icmp sge i32 %56, 0
%58 = zext i1 %57 to i32
%59 = call i32 @assert(i32 %58)
%60 = load i32, i32* %6
%61 = add nsw i32 %60, 1
%62 = call i8* @malloc(i32 %61)
store i8* %62, i8** %9
%63 = load i8*, i8** %9
%64 = load i32, i32* %6
%65 = call i32 @klogctl(i32 3, i8* %63, i32 %64)
store i32 %65, i32* %7
%66 = load i32, i32* %7
%67 = icmp sge i32 %66, 0
br i1 %67, label %68, label %72
68: ; preds = %54
%69 = load i32, i32* %7
%70 = load i32, i32* %6
%71 = icmp sle i32 %69, %70
br label %72
72: ; preds = %68, %54
%73 = phi i1 [ false, %54 ], [ %71, %68 ]
%74 = zext i1 %73 to i32
%75 = call i32 @assert(i32 %74)
%76 = load i8*, i8** %9
%77 = load i32, i32* %7
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds i8, i8* %76, i64 %78
store i8 0, i8* %79
%80 = load i8*, i8** %10
%81 = icmp ne i8* %80, null
br i1 %81, label %82, label %109
82: ; preds = %72
%83 = load i8*, i8** %10
%84 = load i8*, i8** %9
%85 = load i32, i32* %8
%86 = load i32, i32* %7
%87 = call i32 @overlap_len(i8* %83, i8* %84, i32 %85, i32 %86)
store i32 %87, i32* %14
%88 = load i32, i32* %14
%89 = icmp ne i32 %88, 0
br i1 %89, label %93, label %90
90: ; preds = %82
%91 = load i32, i32* @stderr
%92 = call i32 (i32, i8*, ...) @fprintf(i32 %91, i8* getelementptr inbounds ([241 x i8], [241 x i8]* @.str.4, i64 0, i64 0))
store i32 1, i32* %12
br label %104
93: ; preds = %82
%94 = load i32, i32* %14
%95 = sitofp i32 %94 to float
%96 = fmul float %95, 1.000000e+02
%97 = load i32, i32* %6
%98 = sitofp i32 %97 to float
%99 = fdiv float %96, %98
store float %99, float* %15
%100 = load float, float* %15
%101 = fcmp ogt float %100, 7.000000e+01
%102 = zext i1 %101 to i64
%103 = select i1 %101, i32 3, i32 1
store i32 %103, i32* %12
br label %104
104: ; preds = %93, %90
%105 = load i8*, i8** %9
%106 = load i32, i32* %14
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds i8, i8* %105, i64 %107
store i8* %108, i8** %11
br label %111
109: ; preds = %72
%110 = load i8*, i8** %9
store i8* %110, i8** %11
store i32 1, i32* %12
br label %111
111: ; preds = %109, %104
%112 = load i32, i32* %13
%113 = icmp ne i32 %112, 0
br i1 %113, label %114, label %115
114: ; preds = %111
store i32 0, i32* %13
br label %119
115: ; preds = %111
%116 = load i32, i32* @stdout
%117 = load i8*, i8** %11
%118 = call i32 (i32, i8*, ...) @fprintf(i32 %116, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %117)
br label %119
119: ; preds = %115, %114
%120 = load i8*, i8** %10
%121 = call i32 @free(i8* %120)
%122 = load i8*, i8** %9
store i8* %122, i8** %10
%123 = load i32, i32* %7
store i32 %123, i32* %8
%124 = load i32, i32* %12
%125 = call i32 @sleep(i32 %124)
br label %54
126: ; preds = %47, %38, %29, %18
%127 = load i32, i32* %3
ret i32 %127
}

LLVM IR (-O2):
@.str = [10 x i8] c"--version\00"
@stdout = global i32 0
@.str.1 = [14 x i8] c"2010.12.15.1\0A\00"
@.str.2 = [7 x i8] c"--help\00"
@.str.3 = [13 x i8] c"--skip-first\00"
@stderr = global i32 0
@.str.4 = [241 x i8] c"WARNING: Two consecutive calls to syslog(SYSLOG_ACTION_READ_ALL, ...) returned content with no overlap. This may indicate that the kernel is producing messages faster than we can process, which would mean that we have missed some messages.\0A\00"
@.str.5 = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 2
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (...) @usage()
br label %73
6: ; preds = %2
%7 = icmp eq i32 %0, 2
br i1 %7, label %10, label %8
8: ; preds = %23, %6
%9 = xor i1 %7, true
br label %28
10: ; preds = %6
%11 = getelementptr inbounds i8*, i8** %1, i64 1
%12 = load i8*, i8** %11
%13 = tail call i32 @strcmp(i8* dereferenceable(1) %12, i8* dereferenceable(10) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %10
%16 = load i32, i32* @stdout
%17 = tail call i32 (i32, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
br label %73
18: ; preds = %10
%19 = tail call i32 @strcmp(i8* dereferenceable(1) %12, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%20 = icmp eq i32 %19, 0
br i1 %20, label %21, label %23
21: ; preds = %18
%22 = tail call i32 (...) @usage()
br label %73
23: ; preds = %18
%24 = tail call i32 @strcmp(i8* dereferenceable(1) %12, i8* dereferenceable(13) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
%25 = icmp eq i32 %24, 0
br i1 %25, label %8, label %26
26: ; preds = %23
%27 = tail call i32 (...) @usage()
br label %73
28: ; preds = %8, %70
%29 = phi i8* [ %37, %70 ], [ null, %8 ]
%30 = phi i1 [ true, %70 ], [ %9, %8 ]
%31 = phi i32 [ %38, %70 ], [ 0, %8 ]
%32 = tail call i32 @klogctl(i32 10, i8* null, i32 0)
%33 = xor i32 %32, -1
%34 = lshr i32 %33, 31
%35 = tail call i32 @assert(i32 %34)
%36 = add nsw i32 %32, 1
%37 = tail call i8* @malloc(i32 %36)
%38 = tail call i32 @klogctl(i32 3, i8* %37, i32 %32)
%39 = icmp sgt i32 %38, -1
%40 = icmp sle i32 %38, %32
%41 = select i1 %39, i1 %40, i1 false
%42 = zext i1 %41 to i32
%43 = tail call i32 @assert(i32 %42)
%44 = sext i32 %38 to i64
%45 = getelementptr inbounds i8, i8* %37, i64 %44
store i8 0, i8* %45
%46 = icmp eq i8* %29, null
br i1 %46, label %64, label %47
47: ; preds = %28
%48 = tail call i32 @overlap_len(i8* %29, i8* %37, i32 %31, i32 %38)
%49 = icmp eq i32 %48, 0
br i1 %49, label %50, label %53
50: ; preds = %47
%51 = load i32, i32* @stderr
%52 = tail call i32 (i32, i8*, ...) @fprintf(i32 %51, i8* getelementptr inbounds ([241 x i8], [241 x i8]* @.str.4, i64 0, i64 0))
br label %60
53: ; preds = %47
%54 = sitofp i32 %48 to float
%55 = fmul float %54, 1.000000e+02
%56 = sitofp i32 %32 to float
%57 = fdiv float %55, %56
%58 = fcmp ogt float %57, 7.000000e+01
%59 = select i1 %58, i32 3, i32 1
br label %60
60: ; preds = %53, %50
%61 = phi i32 [ %59, %53 ], [ 1, %50 ]
%62 = sext i32 %48 to i64
%63 = getelementptr inbounds i8, i8* %37, i64 %62
br label %64
64: ; preds = %28, %60
%65 = phi i8* [ %63, %60 ], [ %37, %28 ]
%66 = phi i32 [ %61, %60 ], [ 1, %28 ]
br i1 %30, label %67, label %70
67: ; preds = %64
%68 = load i32, i32* @stdout
%69 = tail call i32 (i32, i8*, ...) @fprintf(i32 %68, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %65)
br label %70
70: ; preds = %64, %67
%71 = tail call i32 @free(i8* %29)
%72 = tail call i32 @sleep(i32 %66)
br label %28
73: ; preds = %26, %21, %15, %4
%74 = phi i32 [ 1, %4 ], [ 1, %26 ], [ 0, %21 ], [ 0, %15 ]
ret i32 %74
}