#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*/ section;
typedef int /*<<< orphan*/ prev_name;
typedef int /*<<< orphan*/ line;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
char *find_char_or_comment(char *, char);
char *find_last_char_or_comment(char *, char);
char *lskip(char *);
char *rstrip(char *);
int /*<<< orphan*/ strncpy0(char *, char *, int);
int ini_parse_file(FILE *file,
                   int (*handler)(void *, const char *, const char *,
                                  const char *),
                   void *user) {
  char line[200];
  char section[500] = "";
  char prev_name[500] = "";
  char *start;
  char *end;
  char *name;
  char *value;
  int lineno = 0;
  int error = 0;
  while (fgets(line, sizeof(line), file) != NULL) {
    lineno++;
    start = line;
    if (lineno == 1 && (unsigned char)start[0] == 0xEF &&
        (unsigned char)start[1] == 0xBB && (unsigned char)start[2] == 0xBF) {
      start += 3;
    }
    start = lskip(rstrip(start));
    if (*start == ';' || *start == '#') {
    } else if (*start == '[') {
      end = find_last_char_or_comment(start + 1, ']');
      if (*end == ']') {
        *end = '\0';
        strncpy0(section, start + 1, sizeof(section));
        *prev_name = '\0';
      } else if (!error) {
        error = lineno;
      }
    } else if (*start && (*start != ';' || *start == '#')) {
      end = find_char_or_comment(start, '=');
      if (*end != '=') {
        end = find_char_or_comment(start, ':');
      }
      if (*end == '=' || *end == ':') {
        *end = '\0';
        name = rstrip(start);
        value = lskip(end + 1);
        end = find_char_or_comment(value, '\0');
        if (*end == ';' || *end == '#')
          *end = '\0';
        rstrip(value);
        strncpy0(prev_name, name, sizeof(prev_name));
        if (!handler(user, section, name, value) && !error)
          error = lineno;
      } else if (!error) {
        error = lineno;
      }
    }
  }
  return error;
}


x86 assembly (clang, -O0):
<ini_parse_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x510,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x2e0(%rbp),%rdi
xor    %esi,%esi
mov    $0x1f4,%edx
call   1050 <memset@plt>
lea    -0x4e0(%rbp),%rdi
xor    %esi,%esi
mov    $0x1f4,%edx
call   1050 <memset@plt>
movl   $0x0,-0x504(%rbp)
movl   $0x0,-0x508(%rbp)
lea    -0xe0(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    $0xc8,%esi
call   1060 <fgets@plt>
cmp    $0x0,%rax
je     14f1 <ini_parse_file+0x381>
mov    -0x504(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x504(%rbp)
lea    -0xe0(%rbp),%rax
mov    %rax,-0x4e8(%rbp)
cmpl   $0x1,-0x504(%rbp)
jne    125d <ini_parse_file+0xed>
mov    -0x4e8(%rbp),%rax
movzbl (%rax),%eax
cmp    $0xef,%eax
jne    125d <ini_parse_file+0xed>
mov    -0x4e8(%rbp),%rax
movzbl 0x1(%rax),%eax
cmp    $0xbb,%eax
jne    125d <ini_parse_file+0xed>
mov    -0x4e8(%rbp),%rax
movzbl 0x2(%rax),%eax
cmp    $0xbf,%eax
jne    125d <ini_parse_file+0xed>
mov    -0x4e8(%rbp),%rax
add    $0x3,%rax
mov    %rax,-0x4e8(%rbp)
mov    -0x4e8(%rbp),%rdi
call   1030 <rstrip@plt>
mov    %rax,%rdi
call   1090 <lskip@plt>
mov    %rax,-0x4e8(%rbp)
mov    -0x4e8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3b,%eax
je     129e <ini_parse_file+0x12e>
mov    -0x4e8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
jne    12a3 <ini_parse_file+0x133>
jmp    14ec <ini_parse_file+0x37c>
mov    -0x4e8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5b,%eax
jne    133a <ini_parse_file+0x1ca>
mov    -0x4e8(%rbp),%rdi
add    $0x1,%rdi
mov    $0x5d,%esi
call   1040 <find_last_char_or_comment@plt>
mov    %rax,-0x4f0(%rbp)
mov    -0x4f0(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5d,%eax
jne    1317 <ini_parse_file+0x1a7>
mov    -0x4f0(%rbp),%rax
movb   $0x0,(%rax)
lea    -0x2e0(%rbp),%rdi
mov    -0x4e8(%rbp),%rsi
add    $0x1,%rsi
mov    $0x1f4,%edx
call   1080 <strncpy0@plt>
movb   $0x0,-0x4e0(%rbp)
jmp    1335 <ini_parse_file+0x1c5>
cmpl   $0x0,-0x508(%rbp)
jne    1330 <ini_parse_file+0x1c0>
mov    -0x504(%rbp),%eax
mov    %eax,-0x508(%rbp)
jmp    1335 <ini_parse_file+0x1c5>
jmp    14e7 <ini_parse_file+0x377>
mov    -0x4e8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     14e2 <ini_parse_file+0x372>
mov    -0x4e8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3b,%eax
jne    1373 <ini_parse_file+0x203>
mov    -0x4e8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
jne    14e2 <ini_parse_file+0x372>
mov    -0x4e8(%rbp),%rdi
mov    $0x3d,%esi
call   1070 <find_char_or_comment@plt>
mov    %rax,-0x4f0(%rbp)
mov    -0x4f0(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3d,%eax
je     13b6 <ini_parse_file+0x246>
mov    -0x4e8(%rbp),%rdi
mov    $0x3a,%esi
call   1070 <find_char_or_comment@plt>
mov    %rax,-0x4f0(%rbp)
mov    -0x4f0(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3d,%eax
je     13dc <ini_parse_file+0x26c>
mov    -0x4f0(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3a,%eax
jne    14bf <ini_parse_file+0x34f>
mov    -0x4f0(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x4e8(%rbp),%rdi
call   1030 <rstrip@plt>
mov    %rax,-0x4f8(%rbp)
mov    -0x4f0(%rbp),%rdi
add    $0x1,%rdi
call   1090 <lskip@plt>
mov    %rax,-0x500(%rbp)
mov    -0x500(%rbp),%rdi
xor    %esi,%esi
call   1070 <find_char_or_comment@plt>
mov    %rax,-0x4f0(%rbp)
mov    -0x4f0(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3b,%eax
je     144b <ini_parse_file+0x2db>
mov    -0x4f0(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
jne    1455 <ini_parse_file+0x2e5>
mov    -0x4f0(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x500(%rbp),%rdi
call   1030 <rstrip@plt>
lea    -0x4e0(%rbp),%rdi
mov    -0x4f8(%rbp),%rsi
mov    $0x1f4,%edx
call   1080 <strncpy0@plt>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rdi
lea    -0x2e0(%rbp),%rsi
mov    -0x4f8(%rbp),%rdx
mov    -0x500(%rbp),%rcx
call   *%rax
cmp    $0x0,%eax
jne    14ba <ini_parse_file+0x34a>
cmpl   $0x0,-0x508(%rbp)
jne    14ba <ini_parse_file+0x34a>
mov    -0x504(%rbp),%eax
mov    %eax,-0x508(%rbp)
jmp    14dd <ini_parse_file+0x36d>
cmpl   $0x0,-0x508(%rbp)
jne    14d8 <ini_parse_file+0x368>
mov    -0x504(%rbp),%eax
mov    %eax,-0x508(%rbp)
jmp    14dd <ini_parse_file+0x36d>
jmp    14e2 <ini_parse_file+0x372>
jmp    14e7 <ini_parse_file+0x377>
jmp    14ec <ini_parse_file+0x37c>
jmp    11c1 <ini_parse_file+0x51>
mov    -0x508(%rbp),%eax
add    $0x510,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ini_parse_file>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x4e8,%rsp
mov    %rdx,0x18(%rsp)
mov    %rsi,0x10(%rsp)
mov    %rdi,%rbx
lea    0x2f0(%rsp),%rdi
xor    %r14d,%r14d
mov    $0x1f4,%edx
xor    %esi,%esi
call   1050 <memset@plt>
lea    0xf0(%rsp),%rdi
mov    $0x1f4,%edx
xor    %esi,%esi
call   1050 <memset@plt>
lea    0x20(%rsp),%r15
mov    %r15,%rdi
mov    $0xc8,%esi
mov    %rbx,%rdx
call   1060 <fgets@plt>
test   %rax,%rax
je     1393 <ini_parse_file+0x223>
xor    %r14d,%r14d
mov    $0x1,%r12d
lea    0x23(%rsp),%rbp
mov    %rbx,0x8(%rsp)
jmp    121d <ini_parse_file+0xad>
mov    0x8(%rsp),%rbx
lea    0x23(%rsp),%rbp
cs nopw 0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    $0xc8,%esi
mov    %rbx,%rdx
call   1060 <fgets@plt>
add    $0x1,%r12d
test   %rax,%rax
je     1393 <ini_parse_file+0x223>
movzbl 0x20(%rsp),%eax
movzbl 0x21(%rsp),%ecx
xor    $0xef,%al
xor    $0xbb,%cl
movzbl 0x22(%rsp),%edx
xor    $0xbf,%dl
or     %cl,%dl
or     %al,%dl
mov    %rbp,%rdi
je     1240 <ini_parse_file+0xd0>
mov    %r15,%rdi
cmp    $0x1,%r12d
cmovne %r15,%rdi
call   1030 <rstrip@plt>
mov    %rax,%rdi
call   1090 <lskip@plt>
mov    %rax,%r13
movzbl (%rax),%eax
cmp    $0x3a,%al
jg     1270 <ini_parse_file+0x100>
test   %al,%al
je     1200 <ini_parse_file+0x90>
cmp    $0x23,%al
je     1200 <ini_parse_file+0x90>
jmp    12c0 <ini_parse_file+0x150>
nopl   0x0(%rax)
cmp    $0x3b,%al
je     1200 <ini_parse_file+0x90>
cmp    $0x5b,%al
jne    12c0 <ini_parse_file+0x150>
add    $0x1,%r13
mov    %r13,%rdi
mov    $0x5d,%esi
call   1040 <find_last_char_or_comment@plt>
cmpb   $0x5d,(%rax)
jne    1371 <ini_parse_file+0x201>
movb   $0x0,(%rax)
lea    0x2f0(%rsp),%rdi
mov    %r13,%rsi
mov    $0x1f4,%edx
call   1080 <strncpy0@plt>
movb   $0x0,0xf0(%rsp)
jmp    1200 <ini_parse_file+0x90>
nopw   0x0(%rax,%rax,1)
mov    %r13,%rdi
mov    $0x3d,%esi
call   1070 <find_char_or_comment@plt>
mov    %rax,%rbp
cmpb   $0x3d,(%rax)
je     12f4 <ini_parse_file+0x184>
mov    %r13,%rdi
mov    $0x3a,%esi
call   1070 <find_char_or_comment@plt>
mov    %rax,%rbp
movzbl (%rax),%eax
cmp    $0x3d,%al
je     12f4 <ini_parse_file+0x184>
cmp    $0x3a,%al
jne    1384 <ini_parse_file+0x214>
movb   $0x0,0x0(%rbp)
mov    %r13,%rdi
call   1030 <rstrip@plt>
mov    %rax,%rbx
add    $0x1,%rbp
mov    %rbp,%rdi
call   1090 <lskip@plt>
mov    %rax,%rbp
mov    %rax,%rdi
xor    %esi,%esi
call   1070 <find_char_or_comment@plt>
movzbl (%rax),%ecx
cmp    $0x3b,%cl
je     1329 <ini_parse_file+0x1b9>
cmp    $0x23,%cl
jne    132c <ini_parse_file+0x1bc>
movb   $0x0,(%rax)
mov    %rbp,%rdi
call   1030 <rstrip@plt>
lea    0xf0(%rsp),%rdi
mov    %rbx,%rsi
mov    $0x1f4,%edx
call   1080 <strncpy0@plt>
mov    0x18(%rsp),%rdi
lea    0x2f0(%rsp),%rsi
mov    %rbx,%rdx
mov    %rbp,%rcx
call   *0x10(%rsp)
or     %r14d,%eax
jne    11ec <ini_parse_file+0x7c>
mov    %r12d,%r14d
jmp    11ec <ini_parse_file+0x7c>
mov    %r12d,%eax
test   %r14d,%r14d
je     137c <ini_parse_file+0x20c>
mov    %r14d,%eax
mov    %eax,%r14d
jmp    1200 <ini_parse_file+0x90>
mov    %r12d,%eax
test   %r14d,%r14d
lea    0x23(%rsp),%rbp
jne    1379 <ini_parse_file+0x209>
jmp    137c <ini_parse_file+0x20c>
mov    %r14d,%eax
add    $0x4e8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @ini_parse_file(i32* %0, i32 (i8*, i8*, i8*, i8*)* %1, i8* %2) {
%4 = alloca i32*
%5 = alloca i32 (i8*, i8*, i8*, i8*)*
%6 = alloca i8*
%7 = alloca [200 x i8]
%8 = alloca [500 x i8]
%9 = alloca [500 x i8]
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i32
%15 = alloca i32
store i32* %0, i32** %4
store i32 (i8*, i8*, i8*, i8*)* %1, i32 (i8*, i8*, i8*, i8*)** %5
store i8* %2, i8** %6
%16 = bitcast [500 x i8]* %8 to i8*
%17 = bitcast [500 x i8]* %9 to i8*
store i32 0, i32* %14
store i32 0, i32* %15
br label %18
18: ; preds = %174, %3
%19 = getelementptr inbounds [200 x i8], [200 x i8]* %7, i64 0, i64 0
%20 = load i32*, i32** %4
%21 = call i32* @fgets(i8* %19, i32 200, i32* %20)
%22 = icmp ne i32* %21, null
br i1 %22, label %23, label %175
23: ; preds = %18
%24 = load i32, i32* %14
%25 = add nsw i32 %24, 1
store i32 %25, i32* %14
%26 = getelementptr inbounds [200 x i8], [200 x i8]* %7, i64 0, i64 0
store i8* %26, i8** %10
%27 = load i32, i32* %14
%28 = icmp eq i32 %27, 1
br i1 %28, label %29, label %50
29: ; preds = %23
%30 = load i8*, i8** %10
%31 = getelementptr inbounds i8, i8* %30, i64 0
%32 = load i8, i8* %31
%33 = zext i8 %32 to i32
%34 = icmp eq i32 %33, 239
br i1 %34, label %35, label %50
35: ; preds = %29
%36 = load i8*, i8** %10
%37 = getelementptr inbounds i8, i8* %36, i64 1
%38 = load i8, i8* %37
%39 = zext i8 %38 to i32
%40 = icmp eq i32 %39, 187
br i1 %40, label %41, label %50
41: ; preds = %35
%42 = load i8*, i8** %10
%43 = getelementptr inbounds i8, i8* %42, i64 2
%44 = load i8, i8* %43
%45 = zext i8 %44 to i32
%46 = icmp eq i32 %45, 191
br i1 %46, label %47, label %50
47: ; preds = %41
%48 = load i8*, i8** %10
%49 = getelementptr inbounds i8, i8* %48, i64 3
store i8* %49, i8** %10
br label %50
50: ; preds = %47, %41, %35, %29, %23
%51 = load i8*, i8** %10
%52 = call i8* @rstrip(i8* %51)
%53 = call i8* @lskip(i8* %52)
store i8* %53, i8** %10
%54 = load i8*, i8** %10
%55 = load i8, i8* %54
%56 = sext i8 %55 to i32
%57 = icmp eq i32 %56, 59
br i1 %57, label %63, label %58
58: ; preds = %50
%59 = load i8*, i8** %10
%60 = load i8, i8* %59
%61 = sext i8 %60 to i32
%62 = icmp eq i32 %61, 35
br i1 %62, label %63, label %64
63: ; preds = %58, %50
br label %174
64: ; preds = %58
%65 = load i8*, i8** %10
%66 = load i8, i8* %65
%67 = sext i8 %66 to i32
%68 = icmp eq i32 %67, 91
br i1 %68, label %69, label %91
69: ; preds = %64
%70 = load i8*, i8** %10
%71 = getelementptr inbounds i8, i8* %70, i64 1
%72 = call i8* @find_last_char_or_comment(i8* %71, i8 signext 93)
store i8* %72, i8** %11
%73 = load i8*, i8** %11
%74 = load i8, i8* %73
%75 = sext i8 %74 to i32
%76 = icmp eq i32 %75, 93
br i1 %76, label %77, label %84
77: ; preds = %69
%78 = load i8*, i8** %11
store i8 0, i8* %78
%79 = getelementptr inbounds [500 x i8], [500 x i8]* %8, i64 0, i64 0
%80 = load i8*, i8** %10
%81 = getelementptr inbounds i8, i8* %80, i64 1
%82 = call i32 @strncpy0(i8* %79, i8* %81, i32 500)
%83 = getelementptr inbounds [500 x i8], [500 x i8]* %9, i64 0, i64 0
store i8 0, i8* %83
br label %90
84: ; preds = %69
%85 = load i32, i32* %15
%86 = icmp ne i32 %85, 0
br i1 %86, label %89, label %87
87: ; preds = %84
%88 = load i32, i32* %14
store i32 %88, i32* %15
br label %89
89: ; preds = %87, %84
br label %90
90: ; preds = %89, %77
br label %173
91: ; preds = %64
%92 = load i8*, i8** %10
%93 = load i8, i8* %92
%94 = sext i8 %93 to i32
%95 = icmp ne i32 %94, 0
br i1 %95, label %96, label %172
96: ; preds = %91
%97 = load i8*, i8** %10
%98 = load i8, i8* %97
%99 = sext i8 %98 to i32
%100 = icmp ne i32 %99, 59
br i1 %100, label %106, label %101
101: ; preds = %96
%102 = load i8*, i8** %10
%103 = load i8, i8* %102
%104 = sext i8 %103 to i32
%105 = icmp eq i32 %104, 35
br i1 %105, label %106, label %172
106: ; preds = %101, %96
%107 = load i8*, i8** %10
%108 = call i8* @find_char_or_comment(i8* %107, i8 signext 61)
store i8* %108, i8** %11
%109 = load i8*, i8** %11
%110 = load i8, i8* %109
%111 = sext i8 %110 to i32
%112 = icmp ne i32 %111, 61
br i1 %112, label %113, label %116
113: ; preds = %106
%114 = load i8*, i8** %10
%115 = call i8* @find_char_or_comment(i8* %114, i8 signext 58)
store i8* %115, i8** %11
br label %116
116: ; preds = %113, %106
%117 = load i8*, i8** %11
%118 = load i8, i8* %117
%119 = sext i8 %118 to i32
%120 = icmp eq i32 %119, 61
br i1 %120, label %126, label %121
121: ; preds = %116
%122 = load i8*, i8** %11
%123 = load i8, i8* %122
%124 = sext i8 %123 to i32
%125 = icmp eq i32 %124, 58
br i1 %125, label %126, label %165
126: ; preds = %121, %116
%127 = load i8*, i8** %11
store i8 0, i8* %127
%128 = load i8*, i8** %10
%129 = call i8* @rstrip(i8* %128)
store i8* %129, i8** %12
%130 = load i8*, i8** %11
%131 = getelementptr inbounds i8, i8* %130, i64 1
%132 = call i8* @lskip(i8* %131)
store i8* %132, i8** %13
%133 = load i8*, i8** %13
%134 = call i8* @find_char_or_comment(i8* %133, i8 signext 0)
store i8* %134, i8** %11
%135 = load i8*, i8** %11
%136 = load i8, i8* %135
%137 = sext i8 %136 to i32
%138 = icmp eq i32 %137, 59
br i1 %138, label %144, label %139
139: ; preds = %126
%140 = load i8*, i8** %11
%141 = load i8, i8* %140
%142 = sext i8 %141 to i32
%143 = icmp eq i32 %142, 35
br i1 %143, label %144, label %146
144: ; preds = %139, %126
%145 = load i8*, i8** %11
store i8 0, i8* %145
br label %146
146: ; preds = %144, %139
%147 = load i8*, i8** %13
%148 = call i8* @rstrip(i8* %147)
%149 = getelementptr inbounds [500 x i8], [500 x i8]* %9, i64 0, i64 0
%150 = load i8*, i8** %12
%151 = call i32 @strncpy0(i8* %149, i8* %150, i32 500)
%152 = load i32 (i8*, i8*, i8*, i8*)*, i32 (i8*, i8*, i8*, i8*)** %5
%153 = load i8*, i8** %6
%154 = getelementptr inbounds [500 x i8], [500 x i8]* %8, i64 0, i64 0
%155 = load i8*, i8** %12
%156 = load i8*, i8** %13
%157 = call i32 %152(i8* %153, i8* %154, i8* %155, i8* %156)
%158 = icmp ne i32 %157, 0
br i1 %158, label %164, label %159
159: ; preds = %146
%160 = load i32, i32* %15
%161 = icmp ne i32 %160, 0
br i1 %161, label %164, label %162
162: ; preds = %159
%163 = load i32, i32* %14
store i32 %163, i32* %15
br label %164
164: ; preds = %162, %159, %146
br label %171
165: ; preds = %121
%166 = load i32, i32* %15
%167 = icmp ne i32 %166, 0
br i1 %167, label %170, label %168
168: ; preds = %165
%169 = load i32, i32* %14
store i32 %169, i32* %15
br label %170
170: ; preds = %168, %165
br label %171
171: ; preds = %170, %164
br label %172
172: ; preds = %171, %101, %91
br label %173
173: ; preds = %172, %90
br label %174
174: ; preds = %173, %63
br label %18
175: ; preds = %18
%176 = load i32, i32* %15
ret i32 %176
}

LLVM IR (-O2):
define i32 @ini_parse_file(i32* nocapture %0, i32 (i8*, i8*, i8*, i8*)* nocapture %1, i8* %2) {
%4 = alloca [200 x i8]
%5 = alloca [500 x i8]
%6 = alloca [500 x i8]
%7 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%8 = getelementptr inbounds [500 x i8], [500 x i8]* %5, i64 0, i64 0
%9 = getelementptr inbounds [500 x i8], [500 x i8]* %6, i64 0, i64 0
%10 = call i32* @fgets(i8* %7, i32 200, i32* %0)
%11 = icmp eq i32* %10, null
br i1 %11, label %74, label %12
12: ; preds = %3
%13 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 1
%14 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 2
%15 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 3
br label %16
16: ; preds = %12, %70
%17 = phi i32 [ 0, %12 ], [ %71, %70 ]
%18 = phi i32 [ 0, %12 ], [ %19, %70 ]
%19 = add nuw nsw i32 %18, 1
%20 = icmp eq i32 %18, 0
%21 = load i8, i8* %7
%22 = icmp eq i8 %21, -17
%23 = select i1 %20, i1 %22, i1 false
%24 = load i8, i8* %13
%25 = icmp eq i8 %24, -69
%26 = select i1 %23, i1 %25, i1 false
%27 = load i8, i8* %14
%28 = icmp eq i8 %27, -65
%29 = select i1 %26, i1 %28, i1 false
%30 = select i1 %29, i8* %15, i8* %7
%31 = call i8* @rstrip(i8* %30)
%32 = call i8* @lskip(i8* %31)
%33 = load i8, i8* %32
switch i8 %33, label %44 [
i8 59, label %70
i8 35, label %70
i8 91, label %34
i8 0, label %70
]
34: ; preds = %16
%35 = getelementptr inbounds i8, i8* %32, i64 1
%36 = call i8* @find_last_char_or_comment(i8* %35, i8 signext 93)
%37 = load i8, i8* %36
%38 = icmp eq i8 %37, 93
br i1 %38, label %39, label %41
39: ; preds = %34
store i8 0, i8* %36
%40 = call i32 @strncpy0(i8* %8, i8* %35, i32 500)
store i8 0, i8* %9
br label %70
41: ; preds = %34
%42 = icmp eq i32 %17, 0
%43 = select i1 %42, i32 %19, i32 %17
br label %70
44: ; preds = %16
%45 = call i8* @find_char_or_comment(i8* %32, i8 signext 61)
%46 = load i8, i8* %45
%47 = icmp eq i8 %46, 61
br i1 %47, label %51, label %48
48: ; preds = %44
%49 = call i8* @find_char_or_comment(i8* %32, i8 signext 58)
%50 = load i8, i8* %49
switch i8 %50, label %67 [
i8 61, label %51
i8 58, label %51
]
51: ; preds = %44, %48, %48
%52 = phi i8* [ %49, %48 ], [ %49, %48 ], [ %45, %44 ]
store i8 0, i8* %52
%53 = call i8* @rstrip(i8* %32)
%54 = getelementptr inbounds i8, i8* %52, i64 1
%55 = call i8* @lskip(i8* %54)
%56 = call i8* @find_char_or_comment(i8* %55, i8 signext 0)
%57 = load i8, i8* %56
switch i8 %57, label %59 [
i8 59, label %58
i8 35, label %58
]
58: ; preds = %51, %51
store i8 0, i8* %56
br label %59
59: ; preds = %51, %58
%60 = call i8* @rstrip(i8* %55)
%61 = call i32 @strncpy0(i8* %9, i8* %53, i32 500)
%62 = call i32 %1(i8* %2, i8* %8, i8* %53, i8* %55)
%63 = icmp ne i32 %62, 0
%64 = icmp ne i32 %17, 0
%65 = select i1 %63, i1 true, i1 %64
%66 = select i1 %65, i32 %17, i32 %19
br label %70
67: ; preds = %48
%68 = icmp eq i32 %17, 0
%69 = select i1 %68, i32 %19, i32 %17
br label %70
70: ; preds = %67, %59, %41, %16, %16, %16, %39
%71 = phi i32 [ %17, %16 ], [ %17, %39 ], [ %17, %16 ], [ %43, %41 ], [ %17, %16 ], [ %66, %59 ], [ %69, %67 ]
%72 = call i32* @fgets(i8* %7, i32 200, i32* %0)
%73 = icmp eq i32* %72, null
br i1 %73, label %74, label %16
74: ; preds = %70, %3
%75 = phi i32 [ 0, %3 ], [ %71, %70 ]
ret i32 %75
}