#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 */
char *line_contains(char *, char *);
scalar_t__ strcmp(char *, char *);
scalar_t__ strncmp(char *, char *, int);
int line_isoptstats(char *line) {
  int rc;
  rc = 0;
  if (strncmp(line, "*** WARNING[2052] Optimizer internal counters: pass ",
              52) == 0) {
    rc = 1;
  } else if (strcmp(line, ".\n") == 0) {
    rc = 1;
  } else {
    char *next;
    next = line_contains(line, "groups,");
    if (next) {
      next = line_contains(next, "tasks,");
      if (next) {
        next = line_contains(next, "rules,");
        if (next) {
          rc = 1;
        }
      }
    } else {
      next = line_contains(line, "groups merged,");
      if (next) {
        next = line_contains(next, "expr. cleaned up,");
        if (next) {
          next = line_contains(next, "tasks pruned");
          if (next) {
            rc = 1;
          }
        }
      } else {
        next = line_contains(line,
                             "log/phys/plans/dupl expressions in CascadesMemo");
        if (next) {
          rc = 1;
        }
      }
    }
  }
  return rc;
}


x86 assembly (clang, -O0):
<line_isoptstats>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb2(%rip),%rsi
mov    $0x34,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    116e <line_isoptstats+0x3e>
movl   $0x1,-0xc(%rbp)
jmp    12aa <line_isoptstats+0x17a>
mov    -0x8(%rbp),%rdi
lea    0xebc(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1194 <line_isoptstats+0x64>
movl   $0x1,-0xc(%rbp)
jmp    12a5 <line_isoptstats+0x175>
mov    -0x8(%rbp),%rdi
lea    0xe99(%rip),%rsi
call   1050 <line_contains@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1202 <line_isoptstats+0xd2>
mov    -0x18(%rbp),%rdi
lea    0xe82(%rip),%rsi
call   1050 <line_contains@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     11fd <line_isoptstats+0xcd>
mov    -0x18(%rbp),%rdi
lea    0xe6a(%rip),%rsi
call   1050 <line_contains@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     11f8 <line_isoptstats+0xc8>
movl   $0x1,-0xc(%rbp)
jmp    11fd <line_isoptstats+0xcd>
jmp    12a0 <line_isoptstats+0x170>
mov    -0x8(%rbp),%rdi
lea    0xe41(%rip),%rsi
call   1050 <line_contains@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1270 <line_isoptstats+0x140>
mov    -0x18(%rbp),%rdi
lea    0xe31(%rip),%rsi
call   1050 <line_contains@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     126b <line_isoptstats+0x13b>
mov    -0x18(%rbp),%rdi
lea    0xe24(%rip),%rsi
call   1050 <line_contains@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1266 <line_isoptstats+0x136>
movl   $0x1,-0xc(%rbp)
jmp    126b <line_isoptstats+0x13b>
jmp    129b <line_isoptstats+0x16b>
mov    -0x8(%rbp),%rdi
lea    0xe01(%rip),%rsi
call   1050 <line_contains@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1296 <line_isoptstats+0x166>
movl   $0x1,-0xc(%rbp)
jmp    129b <line_isoptstats+0x16b>
jmp    12a0 <line_isoptstats+0x170>
jmp    12a5 <line_isoptstats+0x175>
jmp    12aa <line_isoptstats+0x17a>
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<line_isoptstats>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xec3(%rip),%rsi
mov    $0x34,%edx
call   1030 <strncmp@plt>
mov    $0x1,%bpl
test   %rax,%rax
je     11ed <line_isoptstats+0xbd>
lea    0xedb(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     11ed <line_isoptstats+0xbd>
lea    0xec6(%rip),%rsi
mov    %rbx,%rdi
call   1050 <line_contains@plt>
test   %rax,%rax
je     119f <line_isoptstats+0x6f>
lea    0xeba(%rip),%rsi
mov    %rax,%rdi
call   1050 <line_contains@plt>
test   %rax,%rax
je     11d3 <line_isoptstats+0xa3>
lea    0xead(%rip),%rsi
mov    %rax,%rdi
jmp    11e1 <line_isoptstats+0xb1>
lea    0xea8(%rip),%rsi
mov    %rbx,%rdi
call   1050 <line_contains@plt>
test   %rax,%rax
je     11d7 <line_isoptstats+0xa7>
lea    0xea3(%rip),%rsi
mov    %rax,%rdi
call   1050 <line_contains@plt>
test   %rax,%rax
je     11d3 <line_isoptstats+0xa3>
lea    0xea1(%rip),%rsi
mov    %rax,%rdi
jmp    11e1 <line_isoptstats+0xb1>
xor    %ebp,%ebp
jmp    11ed <line_isoptstats+0xbd>
lea    0xe9e(%rip),%rsi
mov    %rbx,%rdi
call   1050 <line_contains@plt>
test   %rax,%rax
setne  %bpl
movzbl %bpl,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [53 x i8] c"*** WARNING[2052] Optimizer internal counters: pass \00"
@.str.1 = [3 x i8] c".\0A\00"
@.str.2 = [8 x i8] c"groups,\00"
@.str.3 = [7 x i8] c"tasks,\00"
@.str.4 = [7 x i8] c"rules,\00"
@.str.5 = [15 x i8] c"groups merged,\00"
@.str.6 = [18 x i8] c"expr. cleaned up,\00"
@.str.7 = [13 x i8] c"tasks pruned\00"
@.str.8 = [48 x i8] c"log/phys/plans/dupl expressions in CascadesMemo\00"
define i32 @line_isoptstats(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
store i8* %0, i8** %2
store i32 0, i32* %3
%5 = load i8*, i8** %2
%6 = call i64 @strncmp(i8* %5, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i32 52)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 1, i32* %3
br label %60
9: ; preds = %1
%10 = load i8*, i8** %2
%11 = call i64 @strcmp(i8* %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %9
store i32 1, i32* %3
br label %59
14: ; preds = %9
%15 = load i8*, i8** %2
%16 = call i8* @line_contains(i8* %15, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
store i8* %16, i8** %4
%17 = load i8*, i8** %4
%18 = icmp ne i8* %17, null
br i1 %18, label %19, label %32
19: ; preds = %14
%20 = load i8*, i8** %4
%21 = call i8* @line_contains(i8* %20, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
store i8* %21, i8** %4
%22 = load i8*, i8** %4
%23 = icmp ne i8* %22, null
br i1 %23, label %24, label %31
24: ; preds = %19
%25 = load i8*, i8** %4
%26 = call i8* @line_contains(i8* %25, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
store i8* %26, i8** %4
%27 = load i8*, i8** %4
%28 = icmp ne i8* %27, null
br i1 %28, label %29, label %30
29: ; preds = %24
store i32 1, i32* %3
br label %30
30: ; preds = %29, %24
br label %31
31: ; preds = %30, %19
br label %58
32: ; preds = %14
%33 = load i8*, i8** %2
%34 = call i8* @line_contains(i8* %33, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0))
store i8* %34, i8** %4
%35 = load i8*, i8** %4
%36 = icmp ne i8* %35, null
br i1 %36, label %37, label %50
37: ; preds = %32
%38 = load i8*, i8** %4
%39 = call i8* @line_contains(i8* %38, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0))
store i8* %39, i8** %4
%40 = load i8*, i8** %4
%41 = icmp ne i8* %40, null
br i1 %41, label %42, label %49
42: ; preds = %37
%43 = load i8*, i8** %4
%44 = call i8* @line_contains(i8* %43, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0))
store i8* %44, i8** %4
%45 = load i8*, i8** %4
%46 = icmp ne i8* %45, null
br i1 %46, label %47, label %48
47: ; preds = %42
store i32 1, i32* %3
br label %48
48: ; preds = %47, %42
br label %49
49: ; preds = %48, %37
br label %57
50: ; preds = %32
%51 = load i8*, i8** %2
%52 = call i8* @line_contains(i8* %51, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.8, i64 0, i64 0))
store i8* %52, i8** %4
%53 = load i8*, i8** %4
%54 = icmp ne i8* %53, null
br i1 %54, label %55, label %56
55: ; preds = %50
store i32 1, i32* %3
br label %56
56: ; preds = %55, %50
br label %57
57: ; preds = %56, %49
br label %58
58: ; preds = %57, %31
br label %59
59: ; preds = %58, %13
br label %60
60: ; preds = %59, %8
%61 = load i32, i32* %3
ret i32 %61
}

LLVM IR (-O2):
@.str = [53 x i8] c"*** WARNING[2052] Optimizer internal counters: pass \00"
@.str.1 = [3 x i8] c".\0A\00"
@.str.2 = [8 x i8] c"groups,\00"
@.str.3 = [7 x i8] c"tasks,\00"
@.str.4 = [7 x i8] c"rules,\00"
@.str.5 = [15 x i8] c"groups merged,\00"
@.str.6 = [18 x i8] c"expr. cleaned up,\00"
@.str.7 = [13 x i8] c"tasks pruned\00"
@.str.8 = [48 x i8] c"log/phys/plans/dupl expressions in CascadesMemo\00"
define i32 @line_isoptstats(i8* %0) {
%2 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i32 52)
%3 = icmp eq i64 %2, 0
br i1 %3, label %28, label %4
4: ; preds = %1
%5 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
br i1 %6, label %28, label %7
7: ; preds = %4
%8 = tail call i8* @line_contains(i8* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%9 = icmp eq i8* %8, null
br i1 %9, label %16, label %10
10: ; preds = %7
%11 = tail call i8* @line_contains(i8* %8, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%12 = icmp eq i8* %11, null
br i1 %12, label %28, label %13
13: ; preds = %10
%14 = tail call i8* @line_contains(i8* %11, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%15 = icmp ne i8* %14, null
br label %28
16: ; preds = %7
%17 = tail call i8* @line_contains(i8* %0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0))
%18 = icmp eq i8* %17, null
br i1 %18, label %25, label %19
19: ; preds = %16
%20 = tail call i8* @line_contains(i8* %17, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0))
%21 = icmp eq i8* %20, null
br i1 %21, label %28, label %22
22: ; preds = %19
%23 = tail call i8* @line_contains(i8* %20, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0))
%24 = icmp ne i8* %23, null
br label %28
25: ; preds = %16
%26 = tail call i8* @line_contains(i8* %0, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.8, i64 0, i64 0))
%27 = icmp ne i8* %26, null
br label %28
28: ; preds = %25, %22, %13, %10, %19, %4, %1
%29 = phi i1 [ true, %1 ], [ true, %4 ], [ false, %10 ], [ false, %19 ], [ %15, %13 ], [ %24, %22 ], [ %27, %25 ]
%30 = zext i1 %29 to i32
ret i32 %30
}