#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 *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[1024];
  char section[64] = "";
  char prev_name[64] = "";
  char *start;
  char *end;
  char *name;
  char *value;
  int lineno = 0;
  int error = 0;
  while (fgets(line, sizeof(line), file) != NULL) {
    lineno++;
    start = lskip(rstrip(line));
    if (*start == ';' || *start == '#') {
    } else if (*start == '[') {
      end = find_char_or_comment(start + 1, ']');
      if (*end == ']') {
        *end = '\0';
        strncpy0(section, start + 1, sizeof(section) - 1);
        *prev_name = '\0';
        if (!handler(user, section, NULL, NULL) && !error)
          error = lineno;
      } else if (!error) {
        error = lineno;
      }
    } else if (*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 = '\0';
        rstrip(value);
        strncpy0(prev_name, name, sizeof(prev_name) - 1);
        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    $0x4d0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x460(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1040 <memset@plt>
lea    -0x4a0(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1040 <memset@plt>
movl   $0x0,-0x4c4(%rbp)
movl   $0x0,-0x4c8(%rbp)
lea    -0x420(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    $0x400,%esi
call   1050 <fgets@plt>
cmp    $0x0,%rax
je     1485 <ini_parse_file+0x325>
mov    -0x4c4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c4(%rbp)
lea    -0x420(%rbp),%rdi
call   1030 <rstrip@plt>
mov    %rax,%rdi
call   1080 <lskip@plt>
mov    %rax,-0x4a8(%rbp)
mov    -0x4a8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3b,%eax
je     1220 <ini_parse_file+0xc0>
mov    -0x4a8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
jne    1225 <ini_parse_file+0xc5>
jmp    1480 <ini_parse_file+0x320>
mov    -0x4a8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5b,%eax
jne    12f4 <ini_parse_file+0x194>
mov    -0x4a8(%rbp),%rdi
add    $0x1,%rdi
mov    $0x5d,%esi
call   1060 <find_char_or_comment@plt>
mov    %rax,-0x4b0(%rbp)
mov    -0x4b0(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5d,%eax
jne    12d1 <ini_parse_file+0x171>
mov    -0x4b0(%rbp),%rax
movb   $0x0,(%rax)
lea    -0x460(%rbp),%rdi
mov    -0x4a8(%rbp),%rsi
add    $0x1,%rsi
mov    $0x3f,%edx
call   1070 <strncpy0@plt>
movb   $0x0,-0x4a0(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rdi
lea    -0x460(%rbp),%rsi
xor    %ecx,%ecx
mov    %rcx,%rdx
call   *%rax
cmp    $0x0,%eax
jne    12cc <ini_parse_file+0x16c>
cmpl   $0x0,-0x4c8(%rbp)
jne    12cc <ini_parse_file+0x16c>
mov    -0x4c4(%rbp),%eax
mov    %eax,-0x4c8(%rbp)
jmp    12ef <ini_parse_file+0x18f>
cmpl   $0x0,-0x4c8(%rbp)
jne    12ea <ini_parse_file+0x18a>
mov    -0x4c4(%rbp),%eax
mov    %eax,-0x4c8(%rbp)
jmp    12ef <ini_parse_file+0x18f>
jmp    147b <ini_parse_file+0x31b>
mov    -0x4a8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1476 <ini_parse_file+0x316>
mov    -0x4a8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3b,%eax
je     1476 <ini_parse_file+0x316>
mov    -0x4a8(%rbp),%rdi
mov    $0x3d,%esi
call   1060 <find_char_or_comment@plt>
mov    %rax,-0x4b0(%rbp)
mov    -0x4b0(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3d,%eax
je     135d <ini_parse_file+0x1fd>
mov    -0x4a8(%rbp),%rdi
mov    $0x3a,%esi
call   1060 <find_char_or_comment@plt>
mov    %rax,-0x4b0(%rbp)
mov    -0x4b0(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3d,%eax
je     1383 <ini_parse_file+0x223>
mov    -0x4b0(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3a,%eax
jne    1453 <ini_parse_file+0x2f3>
mov    -0x4b0(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x4a8(%rbp),%rdi
call   1030 <rstrip@plt>
mov    %rax,-0x4b8(%rbp)
mov    -0x4b0(%rbp),%rdi
add    $0x1,%rdi
call   1080 <lskip@plt>
mov    %rax,-0x4c0(%rbp)
mov    -0x4c0(%rbp),%rdi
xor    %esi,%esi
call   1060 <find_char_or_comment@plt>
mov    %rax,-0x4b0(%rbp)
mov    -0x4b0(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3b,%eax
jne    13e9 <ini_parse_file+0x289>
mov    -0x4b0(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x4c0(%rbp),%rdi
call   1030 <rstrip@plt>
lea    -0x4a0(%rbp),%rdi
mov    -0x4b8(%rbp),%rsi
mov    $0x3f,%edx
call   1070 <strncpy0@plt>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rdi
lea    -0x460(%rbp),%rsi
mov    -0x4b8(%rbp),%rdx
mov    -0x4c0(%rbp),%rcx
call   *%rax
cmp    $0x0,%eax
jne    144e <ini_parse_file+0x2ee>
cmpl   $0x0,-0x4c8(%rbp)
jne    144e <ini_parse_file+0x2ee>
mov    -0x4c4(%rbp),%eax
mov    %eax,-0x4c8(%rbp)
jmp    1471 <ini_parse_file+0x311>
cmpl   $0x0,-0x4c8(%rbp)
jne    146c <ini_parse_file+0x30c>
mov    -0x4c4(%rbp),%eax
mov    %eax,-0x4c8(%rbp)
jmp    1471 <ini_parse_file+0x311>
jmp    1476 <ini_parse_file+0x316>
jmp    147b <ini_parse_file+0x31b>
jmp    1480 <ini_parse_file+0x320>
jmp    11b1 <ini_parse_file+0x51>
mov    -0x4c8(%rbp),%eax
add    $0x4d0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ini_parse_file>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x4a8,%rsp
mov    %rdx,0x10(%rsp)
mov    %rsi,0x8(%rsp)
mov    %rdi,%r14
xorps  %xmm0,%xmm0
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
lea    0xa0(%rsp),%rdi
mov    $0x400,%esi
mov    %r14,%rdx
call   1040 <fgets@plt>
xor    %r15d,%r15d
test   %rax,%rax
je     1334 <ini_parse_file+0x1e4>
mov    $0x1,%r12d
lea    0xa0(%rsp),%r13
mov    %r14,0x18(%rsp)
jmp    122d <ini_parse_file+0xdd>
mov    %r14,%rdi
call   1030 <rstrip@plt>
lea    0x20(%rsp),%rdi
mov    %rbp,%rsi
mov    $0x3f,%edx
call   1060 <strncpy0@plt>
mov    0x10(%rsp),%rdi
lea    0x60(%rsp),%rsi
mov    %rbp,%rdx
mov    %r14,%rcx
call   *0x8(%rsp)
or     %r15d,%eax
cmove  %r12d,%r15d
mov    0x18(%rsp),%r14
nop
mov    %r13,%rdi
mov    $0x400,%esi
mov    %r14,%rdx
call   1040 <fgets@plt>
add    $0x1,%r12d
test   %rax,%rax
je     1334 <ini_parse_file+0x1e4>
mov    %r13,%rdi
call   1030 <rstrip@plt>
mov    %rax,%rdi
call   1070 <lskip@plt>
mov    %rax,%rbp
movzbl (%rax),%eax
cmp    $0x3a,%al
jg     1260 <ini_parse_file+0x110>
test   %al,%al
je     1210 <ini_parse_file+0xc0>
cmp    $0x23,%al
je     1210 <ini_parse_file+0xc0>
jmp    12c0 <ini_parse_file+0x170>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
cmp    $0x3b,%al
je     1210 <ini_parse_file+0xc0>
cmp    $0x5b,%al
jne    12c0 <ini_parse_file+0x170>
add    $0x1,%rbp
mov    %rbp,%rdi
mov    $0x5d,%esi
call   1050 <find_char_or_comment@plt>
cmpb   $0x5d,(%rax)
jne    1328 <ini_parse_file+0x1d8>
movb   $0x0,(%rax)
lea    0x60(%rsp),%rbx
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0x3f,%edx
call   1060 <strncpy0@plt>
movb   $0x0,0x20(%rsp)
mov    0x10(%rsp),%rdi
mov    %rbx,%rsi
xor    %edx,%edx
xor    %ecx,%ecx
call   *0x8(%rsp)
or     %r15d,%eax
jmp    132b <ini_parse_file+0x1db>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbp,%rdi
mov    $0x3d,%esi
call   1050 <find_char_or_comment@plt>
mov    %rax,%rbx
cmpb   $0x3d,(%rax)
je     12f0 <ini_parse_file+0x1a0>
mov    %rbp,%rdi
mov    $0x3a,%esi
call   1050 <find_char_or_comment@plt>
mov    %rax,%rbx
movzbl (%rax),%eax
cmp    $0x3d,%al
je     12f0 <ini_parse_file+0x1a0>
cmp    $0x3a,%al
jne    1328 <ini_parse_file+0x1d8>
movb   $0x0,(%rbx)
mov    %rbp,%rdi
call   1030 <rstrip@plt>
mov    %rax,%rbp
add    $0x1,%rbx
mov    %rbx,%rdi
call   1070 <lskip@plt>
mov    %rax,%r14
mov    %rax,%rdi
xor    %esi,%esi
call   1050 <find_char_or_comment@plt>
cmpb   $0x3b,(%rax)
jne    11d5 <ini_parse_file+0x85>
movb   $0x0,(%rax)
jmp    11d5 <ini_parse_file+0x85>
test   %r15d,%r15d
cmove  %r12d,%r15d
jmp    1210 <ini_parse_file+0xc0>
mov    %r15d,%eax
add    $0x4a8,%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 [1024 x i8]
%8 = alloca [64 x i8]
%9 = alloca [64 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 [64 x i8]* %8 to i8*
%17 = bitcast [64 x i8]* %9 to i8*
store i32 0, i32* %14
store i32 0, i32* %15
br label %18
18: ; preds = %150, %3
%19 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%20 = load i32*, i32** %4
%21 = call i32* @fgets(i8* %19, i32 1024, i32* %20)
%22 = icmp ne i32* %21, null
br i1 %22, label %23, label %151
23: ; preds = %18
%24 = load i32, i32* %14
%25 = add nsw i32 %24, 1
store i32 %25, i32* %14
%26 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%27 = call i8* @rstrip(i8* %26)
%28 = call i8* @lskip(i8* %27)
store i8* %28, i8** %10
%29 = load i8*, i8** %10
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
%32 = icmp eq i32 %31, 59
br i1 %32, label %38, label %33
33: ; preds = %23
%34 = load i8*, i8** %10
%35 = load i8, i8* %34
%36 = sext i8 %35 to i32
%37 = icmp eq i32 %36, 35
br i1 %37, label %38, label %39
38: ; preds = %33, %23
br label %150
39: ; preds = %33
%40 = load i8*, i8** %10
%41 = load i8, i8* %40
%42 = sext i8 %41 to i32
%43 = icmp eq i32 %42, 91
br i1 %43, label %44, label %77
44: ; preds = %39
%45 = load i8*, i8** %10
%46 = getelementptr inbounds i8, i8* %45, i64 1
%47 = call i8* @find_char_or_comment(i8* %46, i8 signext 93)
store i8* %47, i8** %11
%48 = load i8*, i8** %11
%49 = load i8, i8* %48
%50 = sext i8 %49 to i32
%51 = icmp eq i32 %50, 93
br i1 %51, label %52, label %70
52: ; preds = %44
%53 = load i8*, i8** %11
store i8 0, i8* %53
%54 = getelementptr inbounds [64 x i8], [64 x i8]* %8, i64 0, i64 0
%55 = load i8*, i8** %10
%56 = getelementptr inbounds i8, i8* %55, i64 1
%57 = call i32 @strncpy0(i8* %54, i8* %56, i32 63)
%58 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
store i8 0, i8* %58
%59 = load i32 (i8*, i8*, i8*, i8*)*, i32 (i8*, i8*, i8*, i8*)** %5
%60 = load i8*, i8** %6
%61 = getelementptr inbounds [64 x i8], [64 x i8]* %8, i64 0, i64 0
%62 = call i32 %59(i8* %60, i8* %61, i8* null, i8* null)
%63 = icmp ne i32 %62, 0
br i1 %63, label %69, label %64
64: ; preds = %52
%65 = load i32, i32* %15
%66 = icmp ne i32 %65, 0
br i1 %66, label %69, label %67
67: ; preds = %64
%68 = load i32, i32* %14
store i32 %68, i32* %15
br label %69
69: ; preds = %67, %64, %52
br label %76
70: ; preds = %44
%71 = load i32, i32* %15
%72 = icmp ne i32 %71, 0
br i1 %72, label %75, label %73
73: ; preds = %70
%74 = load i32, i32* %14
store i32 %74, i32* %15
br label %75
75: ; preds = %73, %70
br label %76
76: ; preds = %75, %69
br label %149
77: ; preds = %39
%78 = load i8*, i8** %10
%79 = load i8, i8* %78
%80 = sext i8 %79 to i32
%81 = icmp ne i32 %80, 0
br i1 %81, label %82, label %148
82: ; preds = %77
%83 = load i8*, i8** %10
%84 = load i8, i8* %83
%85 = sext i8 %84 to i32
%86 = icmp ne i32 %85, 59
br i1 %86, label %87, label %148
87: ; preds = %82
%88 = load i8*, i8** %10
%89 = call i8* @find_char_or_comment(i8* %88, i8 signext 61)
store i8* %89, i8** %11
%90 = load i8*, i8** %11
%91 = load i8, i8* %90
%92 = sext i8 %91 to i32
%93 = icmp ne i32 %92, 61
br i1 %93, label %94, label %97
94: ; preds = %87
%95 = load i8*, i8** %10
%96 = call i8* @find_char_or_comment(i8* %95, i8 signext 58)
store i8* %96, i8** %11
br label %97
97: ; preds = %94, %87
%98 = load i8*, i8** %11
%99 = load i8, i8* %98
%100 = sext i8 %99 to i32
%101 = icmp eq i32 %100, 61
br i1 %101, label %107, label %102
102: ; preds = %97
%103 = load i8*, i8** %11
%104 = load i8, i8* %103
%105 = sext i8 %104 to i32
%106 = icmp eq i32 %105, 58
br i1 %106, label %107, label %141
107: ; preds = %102, %97
%108 = load i8*, i8** %11
store i8 0, i8* %108
%109 = load i8*, i8** %10
%110 = call i8* @rstrip(i8* %109)
store i8* %110, i8** %12
%111 = load i8*, i8** %11
%112 = getelementptr inbounds i8, i8* %111, i64 1
%113 = call i8* @lskip(i8* %112)
store i8* %113, i8** %13
%114 = load i8*, i8** %13
%115 = call i8* @find_char_or_comment(i8* %114, i8 signext 0)
store i8* %115, i8** %11
%116 = load i8*, i8** %11
%117 = load i8, i8* %116
%118 = sext i8 %117 to i32
%119 = icmp eq i32 %118, 59
br i1 %119, label %120, label %122
120: ; preds = %107
%121 = load i8*, i8** %11
store i8 0, i8* %121
br label %122
122: ; preds = %120, %107
%123 = load i8*, i8** %13
%124 = call i8* @rstrip(i8* %123)
%125 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%126 = load i8*, i8** %12
%127 = call i32 @strncpy0(i8* %125, i8* %126, i32 63)
%128 = load i32 (i8*, i8*, i8*, i8*)*, i32 (i8*, i8*, i8*, i8*)** %5
%129 = load i8*, i8** %6
%130 = getelementptr inbounds [64 x i8], [64 x i8]* %8, i64 0, i64 0
%131 = load i8*, i8** %12
%132 = load i8*, i8** %13
%133 = call i32 %128(i8* %129, i8* %130, i8* %131, i8* %132)
%134 = icmp ne i32 %133, 0
br i1 %134, label %140, label %135
135: ; preds = %122
%136 = load i32, i32* %15
%137 = icmp ne i32 %136, 0
br i1 %137, label %140, label %138
138: ; preds = %135
%139 = load i32, i32* %14
store i32 %139, i32* %15
br label %140
140: ; preds = %138, %135, %122
br label %147
141: ; preds = %102
%142 = load i32, i32* %15
%143 = icmp ne i32 %142, 0
br i1 %143, label %146, label %144
144: ; preds = %141
%145 = load i32, i32* %14
store i32 %145, i32* %15
br label %146
146: ; preds = %144, %141
br label %147
147: ; preds = %146, %140
br label %148
148: ; preds = %147, %82, %77
br label %149
149: ; preds = %148, %76
br label %150
150: ; preds = %149, %38
br label %18
151: ; preds = %18
%152 = load i32, i32* %15
ret i32 %152
}

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