#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 atoi(char *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
char *get_str(char *, char *);
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ read_line(int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ sprintf(char *, char *, char *);
scalar_t__ strcmp(char *, char *);
char *strstr(char *, char *);
int strtoul(char *, int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ usage(char *);
int main(int argc, char **argv) {
  if (argc != 4)
    usage("args");
  int start = strtoul(argv[3], NULL, 0);
  FILE *f = fopen(argv[1], "rb");
  if (f == NULL)
    usage("failed to open conf.c file");
  char conf_name[200];
  sprintf(conf_name, " %s[]", argv[2]);
  char line[1000];
  char nm[200];
  char val[200];
  int lastid = 0;
  int firstid = 0;
  char *s;
  int found = 0;
  printf("--[[\nGENERATED %s TABLE\n--]]\nreturn {\n _config_id=%d,\n", argv[2],
         start);
  while (read_line(f, line)) {
    if (found) {
      s = strstr(line, "};");
      if (s != 0)
        break;
      int off = 10;
      s = strstr(line, "CONF_INFO(");
      if (s == 0) {
        off = 11;
        s = strstr(line, "CONF_INFO2(");
      }
      if (s != 0) {
        char *c = strstr(line, "//");
        if ((c == 0) || (c > s)) {
          s = get_str(s + off, val);
          get_str(s, nm);
          if (strcmp(nm + 5, "script_allow_lua_native_calls") != 0) {
            lastid = atoi(val) + start;
            if (firstid == 0) {
              firstid = lastid;
              printf(" _first_entry=%d,\n", firstid);
            }
            printf(" %s=%d,\n", nm + 5, lastid);
          }
        }
      }
    } else {
      s = strstr(line, conf_name);
      if (s != 0)
        found = 1;
    }
  }
  fclose(f);
  printf(" _last_entry=%d\n}\n", lastid);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x6a0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x4,-0x8(%rbp)
je     11df <main+0x2f>
lea    0xe26(%rip),%rdi
call   1070 <usage@plt>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   10a0 <strtoul@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe01(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1224 <main+0x74>
lea    0xde9(%rip),%rdi
call   1070 <usage@plt>
lea    -0xf0(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdx
lea    0xde9(%rip),%rsi
call   10c0 <sprintf@plt>
movl   $0x0,-0x684(%rbp)
movl   $0x0,-0x688(%rbp)
movl   $0x0,-0x694(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
mov    -0x14(%rbp),%edx
lea    0xdba(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x20(%rbp),%rdi
lea    -0x4e0(%rbp),%rsi
call   1080 <read_line@plt>
cmp    $0x0,%rax
je     146e <main+0x2be>
cmpl   $0x0,-0x694(%rbp)
je     1432 <main+0x282>
lea    -0x4e0(%rbp),%rdi
lea    0xdb5(%rip),%rsi
call   10d0 <strstr@plt>
mov    %rax,-0x690(%rbp)
cmpq   $0x0,-0x690(%rbp)
je     12ca <main+0x11a>
jmp    146e <main+0x2be>
movl   $0xa,-0x698(%rbp)
lea    -0x4e0(%rbp),%rdi
lea    0xd81(%rip),%rsi
call   10d0 <strstr@plt>
mov    %rax,-0x690(%rbp)
cmpq   $0x0,-0x690(%rbp)
jne    1320 <main+0x170>
movl   $0xb,-0x698(%rbp)
lea    -0x4e0(%rbp),%rdi
lea    0xd5a(%rip),%rsi
call   10d0 <strstr@plt>
mov    %rax,-0x690(%rbp)
cmpq   $0x0,-0x690(%rbp)
je     142d <main+0x27d>
lea    -0x4e0(%rbp),%rdi
lea    0xd3e(%rip),%rsi
call   10d0 <strstr@plt>
mov    %rax,-0x6a0(%rbp)
cmpq   $0x0,-0x6a0(%rbp)
je     136a <main+0x1ba>
mov    -0x6a0(%rbp),%rax
cmp    -0x690(%rbp),%rax
jbe    1428 <main+0x278>
mov    -0x690(%rbp),%rdi
movslq -0x698(%rbp),%rax
add    %rax,%rdi
lea    -0x680(%rbp),%rsi
call   1060 <get_str@plt>
mov    %rax,-0x690(%rbp)
mov    -0x690(%rbp),%rdi
lea    -0x5b0(%rbp),%rsi
call   1060 <get_str@plt>
lea    -0x5b0(%rbp),%rdi
add    $0x5,%rdi
lea    0xcca(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     1423 <main+0x273>
lea    -0x680(%rbp),%rdi
call   10b0 <atoi@plt>
add    -0x14(%rbp),%eax
mov    %eax,-0x684(%rbp)
cmpl   $0x0,-0x688(%rbp)
jne    1404 <main+0x254>
mov    -0x684(%rbp),%eax
mov    %eax,-0x688(%rbp)
mov    -0x688(%rbp),%esi
lea    0xc9e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x5b0(%rbp),%rsi
add    $0x5,%rsi
mov    -0x684(%rbp),%edx
lea    0xc92(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1428 <main+0x278>
jmp    142d <main+0x27d>
jmp    1469 <main+0x2b9>
lea    -0x4e0(%rbp),%rdi
lea    -0xf0(%rbp),%rsi
call   10d0 <strstr@plt>
mov    %rax,-0x690(%rbp)
cmpq   $0x0,-0x690(%rbp)
je     1464 <main+0x2b4>
movl   $0x1,-0x694(%rbp)
jmp    1469 <main+0x2b9>
jmp    1276 <main+0xc6>
mov    -0x20(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x684(%rbp),%esi
lea    0xc33(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x6a0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x668,%rsp
mov    %rsi,%rbx
cmp    $0x4,%edi
je     11d5 <main+0x25>
lea    0xe30(%rip),%rdi
call   1070 <usage@plt>
mov    0x18(%rbx),%rdi
xor    %r12d,%r12d
xor    %esi,%esi
xor    %edx,%edx
call   10a0 <strtoul@plt>
mov    %eax,%r14d
mov    0x8(%rbx),%rdi
lea    0xe12(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,%rbp
test   %rax,%rax
jne    120c <main+0x5c>
lea    0xe01(%rip),%rdi
call   1070 <usage@plt>
mov    0x10(%rbx),%rdx
lea    0xe0c(%rip),%rsi
lea    0xe0(%rsp),%rdi
call   10c0 <sprintf@plt>
mov    0x10(%rbx),%rsi
lea    0xdfa(%rip),%rdi
mov    %r14d,0x4(%rsp)
mov    %r14d,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x280(%rsp),%rsi
mov    %rbp,%rdi
call   1080 <read_line@plt>
test   %rax,%rax
je     13c6 <main+0x216>
lea    0x280(%rsp),%rbx
xor    %r12d,%r12d
xor    %r15d,%r15d
movl   $0x0,(%rsp)
mov    %rbp,0x8(%rsp)
jmp    12ab <main+0xfb>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    0xe0(%rsp),%rsi
call   10d0 <strstr@plt>
xor    %r15d,%r15d
test   %rax,%rax
setne  %r15b
mov    %rbp,%rdi
mov    %rbx,%rsi
call   1080 <read_line@plt>
test   %rax,%rax
je     13c6 <main+0x216>
mov    %rbx,%rdi
test   %r15d,%r15d
je     1280 <main+0xd0>
lea    0xda6(%rip),%rsi
call   10d0 <strstr@plt>
test   %rax,%rax
jne    13c6 <main+0x216>
mov    %rbx,%rdi
lea    0xd91(%rip),%rsi
call   10d0 <strstr@plt>
test   %rax,%rax
je     12f0 <main+0x140>
mov    %rax,%r14
mov    $0xa,%r13d
jmp    1311 <main+0x161>
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
lea    0xd74(%rip),%rsi
call   10d0 <strstr@plt>
test   %rax,%rax
je     13bb <main+0x20b>
mov    %rax,%r14
mov    $0xb,%r13d
mov    %rbx,%rdi
lea    0xd5f(%rip),%rsi
call   10d0 <strstr@plt>
mov    $0x1,%r15d
test   %rax,%rax
je     1334 <main+0x184>
cmp    %r14,%rax
jbe    1297 <main+0xe7>
add    %r13,%r14
mov    %r14,%rdi
lea    0x1b0(%rsp),%rbp
mov    %rbp,%rsi
call   1060 <get_str@plt>
mov    %rax,%rdi
lea    0x10(%rsp),%rsi
call   1060 <get_str@plt>
lea    0x15(%rsp),%rdi
lea    0xd1a(%rip),%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
je     13b1 <main+0x201>
mov    %rbp,%rdi
call   10b0 <atoi@plt>
mov    %eax,%r12d
add    0x4(%rsp),%r12d
cmpl   $0x0,(%rsp)
jne    139b <main+0x1eb>
lea    0xd11(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12d,%eax
mov    %r12d,(%rsp)
lea    0xd0c(%rip),%rdi
lea    0x15(%rsp),%rsi
mov    %r12d,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rsp),%rbp
jmp    1297 <main+0xe7>
mov    $0x1,%r15d
jmp    1297 <main+0xe7>
mov    %rbp,%rdi
call   1030 <fclose@plt>
lea    0xce2(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x668,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"args\00"
@.str.1 = [3 x i8] c"rb\00"
@.str.2 = [27 x i8] c"failed to open conf.c file\00"
@.str.3 = [6 x i8] c" %s[]\00"
@.str.4 = [55 x i8] c"--[[\0AGENERATED %s TABLE\0A--]]\0Areturn {\0A _config_id=%d,\0A\00"
@.str.5 = [3 x i8] c"};\00"
@.str.6 = [11 x i8] c"CONF_INFO(\00"
@.str.7 = [12 x i8] c"CONF_INFO2(\00"
@.str.8 = [3 x i8] c"//\00"
@.str.9 = [30 x i8] c"script_allow_lua_native_calls\00"
@.str.10 = [19 x i8] c" _first_entry=%d,\0A\00"
@.str.11 = [9 x i8] c" %s=%d,\0A\00"
@.str.12 = [19 x i8] c" _last_entry=%d\0A}\0A\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 [200 x i8]
%9 = alloca [1000 x i8]
%10 = alloca [200 x i8]
%11 = alloca [200 x i8]
%12 = alloca i32
%13 = alloca i32
%14 = alloca i8*
%15 = alloca i32
%16 = alloca i32
%17 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%18 = load i32, i32* %4
%19 = icmp ne i32 %18, 4
br i1 %19, label %20, label %22
20: ; preds = %2
%21 = call i32 @usage(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %22
22: ; preds = %20, %2
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 3
%25 = load i8*, i8** %24
%26 = call i32 @strtoul(i8* %25, i32* null, i32 0)
store i32 %26, i32* %6
%27 = load i8**, i8*** %5
%28 = getelementptr inbounds i8*, i8** %27, i64 1
%29 = load i8*, i8** %28
%30 = call i32* @fopen(i8* %29, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %30, i32** %7
%31 = load i32*, i32** %7
%32 = icmp eq i32* %31, null
br i1 %32, label %33, label %35
33: ; preds = %22
%34 = call i32 @usage(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
br label %35
35: ; preds = %33, %22
%36 = getelementptr inbounds [200 x i8], [200 x i8]* %8, i64 0, i64 0
%37 = load i8**, i8*** %5
%38 = getelementptr inbounds i8*, i8** %37, i64 2
%39 = load i8*, i8** %38
%40 = call i32 @sprintf(i8* %36, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* %39)
store i32 0, i32* %12
store i32 0, i32* %13
store i32 0, i32* %15
%41 = load i8**, i8*** %5
%42 = getelementptr inbounds i8*, i8** %41, i64 2
%43 = load i8*, i8** %42
%44 = load i32, i32* %6
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.4, i64 0, i64 0), i8* %43, i32 %44)
br label %46
46: ; preds = %121, %35
%47 = load i32*, i32** %7
%48 = getelementptr inbounds [1000 x i8], [1000 x i8]* %9, i64 0, i64 0
%49 = call i64 @read_line(i32* %47, i8* %48)
%50 = icmp ne i64 %49, 0
br i1 %50, label %51, label %122
51: ; preds = %46
%52 = load i32, i32* %15
%53 = icmp ne i32 %52, 0
br i1 %53, label %54, label %113
54: ; preds = %51
%55 = getelementptr inbounds [1000 x i8], [1000 x i8]* %9, i64 0, i64 0
%56 = call i8* @strstr(i8* %55, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
store i8* %56, i8** %14
%57 = load i8*, i8** %14
%58 = icmp ne i8* %57, null
br i1 %58, label %59, label %60
59: ; preds = %54
br label %122
60: ; preds = %54
store i32 10, i32* %16
%61 = getelementptr inbounds [1000 x i8], [1000 x i8]* %9, i64 0, i64 0
%62 = call i8* @strstr(i8* %61, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0))
store i8* %62, i8** %14
%63 = load i8*, i8** %14
%64 = icmp eq i8* %63, null
br i1 %64, label %65, label %68
65: ; preds = %60
store i32 11, i32* %16
%66 = getelementptr inbounds [1000 x i8], [1000 x i8]* %9, i64 0, i64 0
%67 = call i8* @strstr(i8* %66, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0))
store i8* %67, i8** %14
br label %68
68: ; preds = %65, %60
%69 = load i8*, i8** %14
%70 = icmp ne i8* %69, null
br i1 %70, label %71, label %112
71: ; preds = %68
%72 = getelementptr inbounds [1000 x i8], [1000 x i8]* %9, i64 0, i64 0
%73 = call i8* @strstr(i8* %72, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
store i8* %73, i8** %17
%74 = load i8*, i8** %17
%75 = icmp eq i8* %74, null
br i1 %75, label %80, label %76
76: ; preds = %71
%77 = load i8*, i8** %17
%78 = load i8*, i8** %14
%79 = icmp ugt i8* %77, %78
br i1 %79, label %80, label %111
80: ; preds = %76, %71
%81 = load i8*, i8** %14
%82 = load i32, i32* %16
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds i8, i8* %81, i64 %83
%85 = getelementptr inbounds [200 x i8], [200 x i8]* %11, i64 0, i64 0
%86 = call i8* @get_str(i8* %84, i8* %85)
store i8* %86, i8** %14
%87 = load i8*, i8** %14
%88 = getelementptr inbounds [200 x i8], [200 x i8]* %10, i64 0, i64 0
%89 = call i8* @get_str(i8* %87, i8* %88)
%90 = getelementptr inbounds [200 x i8], [200 x i8]* %10, i64 0, i64 0
%91 = getelementptr inbounds i8, i8* %90, i64 5
%92 = call i64 @strcmp(i8* %91, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.9, i64 0, i64 0))
%93 = icmp ne i64 %92, 0
br i1 %93, label %94, label %110
94: ; preds = %80
%95 = getelementptr inbounds [200 x i8], [200 x i8]* %11, i64 0, i64 0
%96 = call i32 @atoi(i8* %95)
%97 = load i32, i32* %6
%98 = add nsw i32 %96, %97
store i32 %98, i32* %12
%99 = load i32, i32* %13
%100 = icmp eq i32 %99, 0
br i1 %100, label %101, label %105
101: ; preds = %94
%102 = load i32, i32* %12
store i32 %102, i32* %13
%103 = load i32, i32* %13
%104 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0), i32 %103)
br label %105
105: ; preds = %101, %94
%106 = getelementptr inbounds [200 x i8], [200 x i8]* %10, i64 0, i64 0
%107 = getelementptr inbounds i8, i8* %106, i64 5
%108 = load i32, i32* %12
%109 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0), i8* %107, i32 %108)
br label %110
110: ; preds = %105, %80
br label %111
111: ; preds = %110, %76
br label %112
112: ; preds = %111, %68
br label %121
113: ; preds = %51
%114 = getelementptr inbounds [1000 x i8], [1000 x i8]* %9, i64 0, i64 0
%115 = getelementptr inbounds [200 x i8], [200 x i8]* %8, i64 0, i64 0
%116 = call i8* @strstr(i8* %114, i8* %115)
store i8* %116, i8** %14
%117 = load i8*, i8** %14
%118 = icmp ne i8* %117, null
br i1 %118, label %119, label %120
119: ; preds = %113
store i32 1, i32* %15
br label %120
120: ; preds = %119, %113
br label %121
121: ; preds = %120, %112
br label %46
122: ; preds = %59, %46
%123 = load i32*, i32** %7
%124 = call i32 @fclose(i32* %123)
%125 = load i32, i32* %12
%126 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.12, i64 0, i64 0), i32 %125)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"args\00"
@.str.1 = [3 x i8] c"rb\00"
@.str.2 = [27 x i8] c"failed to open conf.c file\00"
@.str.3 = [6 x i8] c" %s[]\00"
@.str.4 = [55 x i8] c"--[[\0AGENERATED %s TABLE\0A--]]\0Areturn {\0A _config_id=%d,\0A\00"
@.str.5 = [3 x i8] c"};\00"
@.str.6 = [11 x i8] c"CONF_INFO(\00"
@.str.7 = [12 x i8] c"CONF_INFO2(\00"
@.str.8 = [3 x i8] c"//\00"
@.str.9 = [30 x i8] c"script_allow_lua_native_calls\00"
@.str.10 = [19 x i8] c" _first_entry=%d,\0A\00"
@.str.11 = [9 x i8] c" %s=%d,\0A\00"
@.str.12 = [19 x i8] c" _last_entry=%d\0A}\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [200 x i8]
%4 = alloca [1000 x i8]
%5 = alloca [200 x i8]
%6 = alloca [200 x i8]
%7 = icmp eq i32 %0, 4
br i1 %7, label %10, label %8
8: ; preds = %2
%9 = tail call i32 @usage(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %2
%11 = getelementptr inbounds i8*, i8** %1, i64 3
%12 = load i8*, i8** %11
%13 = tail call i32 @strtoul(i8* nocapture %12, i32* null, i32 0)
%14 = getelementptr inbounds i8*, i8** %1, i64 1
%15 = load i8*, i8** %14
%16 = tail call i32* @fopen(i8* %15, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%17 = icmp eq i32* %16, null
br i1 %17, label %18, label %20
18: ; preds = %10
%19 = tail call i32 @usage(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
br label %20
20: ; preds = %18, %10
%21 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%22 = getelementptr inbounds i8*, i8** %1, i64 2
%23 = load i8*, i8** %22
%24 = call i32 @sprintf(i8* %21, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* %23)
%25 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 0
%26 = getelementptr inbounds [200 x i8], [200 x i8]* %5, i64 0, i64 0
%27 = getelementptr inbounds [200 x i8], [200 x i8]* %6, i64 0, i64 0
%28 = load i8*, i8** %22
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str.4, i64 0, i64 0), i8* %28, i32 %13)
%30 = call i64 @read_line(i32* %16, i8* %25)
%31 = icmp eq i64 %30, 0
br i1 %31, label %80, label %32
32: ; preds = %20
%33 = getelementptr inbounds [200 x i8], [200 x i8]* %5, i64 0, i64 5
br label %34
34: ; preds = %32, %74
%35 = phi i32 [ 0, %32 ], [ %77, %74 ]
%36 = phi i32 [ 0, %32 ], [ %76, %74 ]
%37 = phi i32 [ 0, %32 ], [ %75, %74 ]
%38 = icmp eq i32 %36, 0
br i1 %38, label %70, label %39
39: ; preds = %34
%40 = call i8* @strstr(i8* %25, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%41 = icmp eq i8* %40, null
br i1 %41, label %42, label %80
42: ; preds = %39
%43 = call i8* @strstr(i8* %25, i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0))
%44 = icmp eq i8* %43, null
br i1 %44, label %45, label %48
45: ; preds = %42
%46 = call i8* @strstr(i8* %25, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0))
%47 = icmp eq i8* %46, null
br i1 %47, label %74, label %48
48: ; preds = %42, %45
%49 = phi i64 [ 11, %45 ], [ 10, %42 ]
%50 = phi i8* [ %46, %45 ], [ %43, %42 ]
%51 = call i8* @strstr(i8* %25, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
%52 = icmp eq i8* %51, null
%53 = icmp ugt i8* %51, %50
%54 = select i1 %52, i1 true, i1 %53
br i1 %54, label %55, label %74
55: ; preds = %48
%56 = getelementptr inbounds i8, i8* %50, i64 %49
%57 = call i8* @get_str(i8* %56, i8* %27)
%58 = call i8* @get_str(i8* %57, i8* %26)
%59 = call i64 @strcmp(i8* %33, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.9, i64 0, i64 0))
%60 = icmp eq i64 %59, 0
br i1 %60, label %74, label %61
61: ; preds = %55
%62 = call i32 @atoi(i8* %27)
%63 = add nsw i32 %62, %13
%64 = icmp eq i32 %37, 0
br i1 %64, label %65, label %67
65: ; preds = %61
%66 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0), i32 %63)
br label %67
67: ; preds = %65, %61
%68 = phi i32 [ %63, %65 ], [ %37, %61 ]
%69 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0), i8* %33, i32 %63)
br label %74
70: ; preds = %34
%71 = call i8* @strstr(i8* %25, i8* %21)
%72 = icmp ne i8* %71, null
%73 = zext i1 %72 to i32
br label %74
74: ; preds = %70, %45, %48, %55, %67
%75 = phi i32 [ %37, %45 ], [ %68, %67 ], [ %37, %55 ], [ %37, %48 ], [ %37, %70 ]
%76 = phi i32 [ 1, %45 ], [ 1, %67 ], [ 1, %55 ], [ 1, %48 ], [ %73, %70 ]
%77 = phi i32 [ %35, %45 ], [ %63, %67 ], [ %35, %55 ], [ %35, %48 ], [ %35, %70 ]
%78 = call i64 @read_line(i32* %16, i8* %25)
%79 = icmp eq i64 %78, 0
br i1 %79, label %80, label %34
80: ; preds = %74, %39, %20
%81 = phi i32 [ 0, %20 ], [ %35, %39 ], [ %77, %74 ]
%82 = call i32 @fclose(i32* %16)
%83 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.12, i64 0, i64 0), i32 %81)
ret i32 0
}