#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 /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ stderr;
char *strchr(char *, char);
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ strncpy(char *, char *, int);
char *strstr(char *, char *);
int get_package_version(char *version, char *package, int maxlen) {
  FILE *uconf;
  char buf[2048 + 1];
  char *p, *p2;
  uconf = fopen("..\\configure.ac", "r");
  if (uconf == NULL) {
    fprintf(stderr, "Error opening ");
    perror("..\\configure.ac");
    exit(1);
  }
  package[0] = '\0';
  version[0] = '\0';
  while (fgets(buf, 2048, uconf) != NULL) {
    if ((p = strstr(buf, "AC_INIT(")) != NULL) {
      p += strlen("AC_INIT(");
      if (*p == '[')
        p++;
      p2 = strchr(p, ',');
      if (p2 != NULL) {
        int len = (p2 - p);
        if (len > maxlen)
          len = maxlen;
        strncpy(package, p, len);
        package[len] = '\0';
        if (package[len - 1] == ']')
          package[len - 1] = '\0';
        p += len + 1;
        while ((*p) == ' ' || (*p) == '[')
          p++;
        p2 = strchr(p, ',');
        if (p2 == NULL)
          p2 = strchr(p, ')');
        if (p2 != NULL) {
          len = (p2 - p);
          if (len > maxlen)
            len = maxlen;
          strncpy(version, p, len);
          version[len] = '\0';
          if (version[len - 1] == ']')
            version[len - 1] = '\0';
        }
      }
      if (*version && *package)
        break;
    }
  }
  fclose(uconf);
}


x86 assembly (clang, -O0):
<get_package_version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x850,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
lea    0xe43(%rip),%rdi
lea    0xe4c(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    1203 <get_package_version+0x63>
mov    0x2e01(%rip),%rax
mov    (%rax),%edi
lea    0xe2a(%rip),%rsi
call   1080 <fprintf@plt>
lea    0xe0c(%rip),%rdi
call   10a0 <perror@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
lea    -0x830(%rbp),%rdi
mov    -0x28(%rbp),%rdx
mov    $0x800,%esi
call   1070 <fgets@plt>
cmp    $0x0,%rax
je     14c8 <get_package_version+0x328>
lea    -0x830(%rbp),%rdi
lea    0xde3(%rip),%rsi
call   10c0 <strstr@plt>
mov    %rax,-0x838(%rbp)
cmp    $0x0,%rax
je     14c3 <get_package_version+0x323>
lea    0xdc6(%rip),%rdi
call   1050 <strlen@plt>
mov    %eax,%ecx
mov    -0x838(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x838(%rbp)
mov    -0x838(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5b,%eax
jne    129b <get_package_version+0xfb>
mov    -0x838(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x838(%rbp)
mov    -0x838(%rbp),%rdi
mov    $0x2c,%esi
call   1060 <strchr@plt>
mov    %rax,-0x840(%rbp)
cmpq   $0x0,-0x840(%rbp)
je     1499 <get_package_version+0x2f9>
mov    -0x840(%rbp),%rax
mov    -0x838(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,-0x844(%rbp)
mov    -0x844(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jle    12f0 <get_package_version+0x150>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x844(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x838(%rbp),%rsi
mov    -0x844(%rbp),%edx
call   1030 <strncpy@plt>
mov    -0x18(%rbp),%rax
movslq -0x844(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
mov    -0x844(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x5d,%eax
jne    1346 <get_package_version+0x1a6>
mov    -0x18(%rbp),%rax
mov    -0x844(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x844(%rbp),%ecx
add    $0x1,%ecx
mov    -0x838(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x838(%rbp)
mov    -0x838(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x845(%rbp)
je     1394 <get_package_version+0x1f4>
mov    -0x838(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5b,%eax
sete   %al
mov    %al,-0x845(%rbp)
mov    -0x845(%rbp),%al
test   $0x1,%al
jne    13a7 <get_package_version+0x207>
jmp    13be <get_package_version+0x21e>
mov    -0x838(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x838(%rbp)
jmp    1363 <get_package_version+0x1c3>
mov    -0x838(%rbp),%rdi
mov    $0x2c,%esi
call   1060 <strchr@plt>
mov    %rax,-0x840(%rbp)
cmpq   $0x0,-0x840(%rbp)
jne    13fc <get_package_version+0x25c>
mov    -0x838(%rbp),%rdi
mov    $0x29,%esi
call   1060 <strchr@plt>
mov    %rax,-0x840(%rbp)
cmpq   $0x0,-0x840(%rbp)
je     1494 <get_package_version+0x2f4>
mov    -0x840(%rbp),%rax
mov    -0x838(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,-0x844(%rbp)
mov    -0x844(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jle    1439 <get_package_version+0x299>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x844(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x838(%rbp),%rsi
mov    -0x844(%rbp),%edx
call   1030 <strncpy@plt>
mov    -0x10(%rbp),%rax
movslq -0x844(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x10(%rbp),%rax
mov    -0x844(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x5d,%eax
jne    148f <get_package_version+0x2ef>
mov    -0x10(%rbp),%rax
mov    -0x844(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
jmp    1494 <get_package_version+0x2f4>
jmp    1499 <get_package_version+0x2f9>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     14be <get_package_version+0x31e>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     14be <get_package_version+0x31e>
jmp    14c8 <get_package_version+0x328>
jmp    14c3 <get_package_version+0x323>
jmp    1211 <get_package_version+0x71>
mov    -0x28(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x4(%rbp),%eax
add    $0x850,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_package_version>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x828,%rsp
mov    %edx,0x4(%rsp)
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0xe3e(%rip),%rdi
lea    0xe47(%rip),%rsi
call   1090 <fopen@plt>
test   %rax,%rax
je     139f <get_package_version+0x1ff>
mov    %rax,%r15
mov    %rbx,0x8(%rsp)
movb   $0x0,(%rbx)
movb   $0x0,(%r14)
lea    0x20(%rsp),%rdi
mov    $0x800,%esi
mov    %rax,%rdx
call   1070 <fgets@plt>
test   %rax,%rax
je     1385 <get_package_version+0x1e5>
lea    0xe19(%rip),%rbx
lea    0x20(%rsp),%rbp
mov    %r14,0x10(%rsp)
mov    %r15,0x18(%rsp)
jmp    1239 <get_package_version+0x99>
nopl   0x0(%rax)
mov    %rbp,%rdi
mov    $0x800,%esi
mov    %r15,%rdx
call   1070 <fgets@plt>
test   %rax,%rax
je     1385 <get_package_version+0x1e5>
mov    %rbp,%rdi
mov    %rbx,%rsi
call   10c0 <strstr@plt>
test   %rax,%rax
je     1220 <get_package_version+0x80>
mov    %rax,%r12
mov    %rbx,%rdi
call   1050 <strlen@plt>
mov    %eax,%r15d
cltq
mov    %r12,%rcx
add    %rax,%rcx
mov    (%r12,%rax,1),%r13b
xor    %ebx,%ebx
cmp    $0x5b,%r13b
sete   %bl
add    %rcx,%rbx
mov    %rbx,%rdi
mov    $0x2c,%esi
call   1060 <strchr@plt>
test   %rax,%rax
je     135c <get_package_version+0x1bc>
mov    %rax,%rbp
sub    %ebx,%ebp
mov    0x4(%rsp),%eax
cmp    %eax,%ebp
cmovg  %eax,%ebp
mov    0x8(%rsp),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
call   1030 <strncpy@plt>
movslq %ebp,%rax
movb   $0x0,(%r14,%rax,1)
cmpb   $0x5d,-0x1(%r14,%rax,1)
jne    12bf <get_package_version+0x11f>
mov    0x8(%rsp),%rcx
movb   $0x0,-0x1(%rcx,%rax,1)
xor    %ecx,%ecx
cmp    $0x5b,%r13b
sete   %cl
lea    (%rax,%rbx,1),%r13
add    $0x1,%r13
add    %eax,%r15d
add    %r15d,%ecx
lea    (%r12,%rcx,1),%ebp
add    $0x1,%ebp
mov    0x10(%rsp),%r14
jmp    12f7 <get_package_version+0x157>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%r13
add    $0x1,%ebp
movzbl 0x0(%r13),%eax
cmp    $0x5b,%al
je     12f0 <get_package_version+0x150>
cmp    $0x20,%al
je     12f0 <get_package_version+0x150>
mov    %r13,%rdi
mov    $0x2c,%esi
call   1060 <strchr@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    132e <get_package_version+0x18e>
mov    %r13,%rdi
mov    $0x29,%esi
call   1060 <strchr@plt>
mov    %rax,%rbx
test   %rax,%rax
je     135c <get_package_version+0x1bc>
sub    %ebp,%ebx
mov    0x4(%rsp),%eax
cmp    %eax,%ebx
cmovg  %eax,%ebx
mov    %r14,%rdi
mov    %r13,%rsi
mov    %ebx,%edx
call   1030 <strncpy@plt>
movslq %ebx,%rax
movb   $0x0,(%r14,%rax,1)
cmpb   $0x5d,-0x1(%r14,%rax,1)
jne    135c <get_package_version+0x1bc>
movb   $0x0,-0x1(%r14,%rax,1)
cmpb   $0x0,(%r14)
mov    0x18(%rsp),%r15
lea    0xcb5(%rip),%rbx
lea    0x20(%rsp),%rbp
je     1220 <get_package_version+0x80>
mov    0x8(%rsp),%rax
cmpb   $0x0,(%rax)
je     1220 <get_package_version+0x80>
mov    %r15,%rdi
call   1040 <fclose@plt>
add    $0x828,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2c3a(%rip),%rax
mov    (%rax),%edi
lea    0xc63(%rip),%rsi
call   1080 <fprintf@plt>
lea    0xc45(%rip),%rdi
call   10a0 <perror@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"..\\configure.ac\00"
@.str.1 = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.2 = [15 x i8] c"Error opening \00"
@.str.3 = [9 x i8] c"AC_INIT(\00"
define i32 @get_package_version(i8* %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32*
%9 = alloca [2049 x i8]
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%13 = call i32* @fopen(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %13, i32** %8
%14 = load i32*, i32** %8
%15 = icmp eq i32* %14, null
br i1 %15, label %16, label %21
16: ; preds = %3
%17 = load i32, i32* @stderr
%18 = call i32 @fprintf(i32 %17, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%19 = call i32 @perror(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%20 = call i32 @exit(i32 1)
unreachable
21: ; preds = %3
%22 = load i8*, i8** %6
%23 = getelementptr inbounds i8, i8* %22, i64 0
store i8 0, i8* %23
%24 = load i8*, i8** %5
%25 = getelementptr inbounds i8, i8* %24, i64 0
store i8 0, i8* %25
br label %26
26: ; preds = %168, %21
%27 = getelementptr inbounds [2049 x i8], [2049 x i8]* %9, i64 0, i64 0
%28 = load i32*, i32** %8
%29 = call i32* @fgets(i8* %27, i32 2048, i32* %28)
%30 = icmp ne i32* %29, null
br i1 %30, label %31, label %169
31: ; preds = %26
%32 = getelementptr inbounds [2049 x i8], [2049 x i8]* %9, i64 0, i64 0
%33 = call i8* @strstr(i8* %32, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
store i8* %33, i8** %10
%34 = icmp ne i8* %33, null
br i1 %34, label %35, label %168
35: ; preds = %31
%36 = call i32 @strlen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%37 = load i8*, i8** %10
%38 = sext i32 %36 to i64
%39 = getelementptr inbounds i8, i8* %37, i64 %38
store i8* %39, i8** %10
%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 %47
44: ; preds = %35
%45 = load i8*, i8** %10
%46 = getelementptr inbounds i8, i8* %45, i32 1
store i8* %46, i8** %10
br label %47
47: ; preds = %44, %35
%48 = load i8*, i8** %10
%49 = call i8* @strchr(i8* %48, i8 signext 44)
store i8* %49, i8** %11
%50 = load i8*, i8** %11
%51 = icmp ne i8* %50, null
br i1 %51, label %52, label %156
52: ; preds = %47
%53 = load i8*, i8** %11
%54 = load i8*, i8** %10
%55 = ptrtoint i8* %53 to i64
%56 = ptrtoint i8* %54 to i64
%57 = sub i64 %55, %56
%58 = trunc i64 %57 to i32
store i32 %58, i32* %12
%59 = load i32, i32* %12
%60 = load i32, i32* %7
%61 = icmp sgt i32 %59, %60
br i1 %61, label %62, label %64
62: ; preds = %52
%63 = load i32, i32* %7
store i32 %63, i32* %12
br label %64
64: ; preds = %62, %52
%65 = load i8*, i8** %6
%66 = load i8*, i8** %10
%67 = load i32, i32* %12
%68 = call i32 @strncpy(i8* %65, i8* %66, i32 %67)
%69 = load i8*, i8** %6
%70 = load i32, i32* %12
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds i8, i8* %69, i64 %71
store i8 0, i8* %72
%73 = load i8*, i8** %6
%74 = load i32, i32* %12
%75 = sub nsw i32 %74, 1
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds i8, i8* %73, i64 %76
%78 = load i8, i8* %77
%79 = sext i8 %78 to i32
%80 = icmp eq i32 %79, 93
br i1 %80, label %81, label %87
81: ; preds = %64
%82 = load i8*, i8** %6
%83 = load i32, i32* %12
%84 = sub nsw i32 %83, 1
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds i8, i8* %82, i64 %85
store i8 0, i8* %86
br label %87
87: ; preds = %81, %64
%88 = load i32, i32* %12
%89 = add nsw i32 %88, 1
%90 = load i8*, i8** %10
%91 = sext i32 %89 to i64
%92 = getelementptr inbounds i8, i8* %90, i64 %91
store i8* %92, i8** %10
br label %93
93: ; preds = %105, %87
%94 = load i8*, i8** %10
%95 = load i8, i8* %94
%96 = sext i8 %95 to i32
%97 = icmp eq i32 %96, 32
br i1 %97, label %103, label %98
98: ; preds = %93
%99 = load i8*, i8** %10
%100 = load i8, i8* %99
%101 = sext i8 %100 to i32
%102 = icmp eq i32 %101, 91
br label %103
103: ; preds = %98, %93
%104 = phi i1 [ true, %93 ], [ %102, %98 ]
br i1 %104, label %105, label %108
105: ; preds = %103
%106 = load i8*, i8** %10
%107 = getelementptr inbounds i8, i8* %106, i32 1
store i8* %107, i8** %10
br label %93
108: ; preds = %103
%109 = load i8*, i8** %10
%110 = call i8* @strchr(i8* %109, i8 signext 44)
store i8* %110, i8** %11
%111 = load i8*, i8** %11
%112 = icmp eq i8* %111, null
br i1 %112, label %113, label %116
113: ; preds = %108
%114 = load i8*, i8** %10
%115 = call i8* @strchr(i8* %114, i8 signext 41)
store i8* %115, i8** %11
br label %116
116: ; preds = %113, %108
%117 = load i8*, i8** %11
%118 = icmp ne i8* %117, null
br i1 %118, label %119, label %155
119: ; preds = %116
%120 = load i8*, i8** %11
%121 = load i8*, i8** %10
%122 = ptrtoint i8* %120 to i64
%123 = ptrtoint i8* %121 to i64
%124 = sub i64 %122, %123
%125 = trunc i64 %124 to i32
store i32 %125, i32* %12
%126 = load i32, i32* %12
%127 = load i32, i32* %7
%128 = icmp sgt i32 %126, %127
br i1 %128, label %129, label %131
129: ; preds = %119
%130 = load i32, i32* %7
store i32 %130, i32* %12
br label %131
131: ; preds = %129, %119
%132 = load i8*, i8** %5
%133 = load i8*, i8** %10
%134 = load i32, i32* %12
%135 = call i32 @strncpy(i8* %132, i8* %133, i32 %134)
%136 = load i8*, i8** %5
%137 = load i32, i32* %12
%138 = sext i32 %137 to i64
%139 = getelementptr inbounds i8, i8* %136, i64 %138
store i8 0, i8* %139
%140 = load i8*, i8** %5
%141 = load i32, i32* %12
%142 = sub nsw i32 %141, 1
%143 = sext i32 %142 to i64
%144 = getelementptr inbounds i8, i8* %140, i64 %143
%145 = load i8, i8* %144
%146 = sext i8 %145 to i32
%147 = icmp eq i32 %146, 93
br i1 %147, label %148, label %154
148: ; preds = %131
%149 = load i8*, i8** %5
%150 = load i32, i32* %12
%151 = sub nsw i32 %150, 1
%152 = sext i32 %151 to i64
%153 = getelementptr inbounds i8, i8* %149, i64 %152
store i8 0, i8* %153
br label %154
154: ; preds = %148, %131
br label %155
155: ; preds = %154, %116
br label %156
156: ; preds = %155, %47
%157 = load i8*, i8** %5
%158 = load i8, i8* %157
%159 = sext i8 %158 to i32
%160 = icmp ne i32 %159, 0
br i1 %160, label %161, label %167
161: ; preds = %156
%162 = load i8*, i8** %6
%163 = load i8, i8* %162
%164 = sext i8 %163 to i32
%165 = icmp ne i32 %164, 0
br i1 %165, label %166, label %167
166: ; preds = %161
br label %169
167: ; preds = %161, %156
br label %168
168: ; preds = %167, %31
br label %26
169: ; preds = %166, %26
%170 = load i32*, i32** %8
%171 = call i32 @fclose(i32* %170)
%172 = load i32, i32* %4
ret i32 %172
}

LLVM IR (-O2):
@.str = [16 x i8] c"..\\configure.ac\00"
@.str.1 = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.2 = [15 x i8] c"Error opening \00"
@.str.3 = [9 x i8] c"AC_INIT(\00"
define i32 @get_package_version(i8* %0, i8* %1, i32 %2) {
%4 = alloca [2049 x i8]
%5 = getelementptr inbounds [2049 x i8], [2049 x i8]* %4, i64 0, i64 0
%6 = tail call i32* @fopen(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%7 = icmp eq i32* %6, null
br i1 %7, label %8, label %13
8: ; preds = %3
%9 = load i32, i32* @stderr
%10 = tail call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%11 = tail call i32 @perror(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%12 = tail call i32 @exit(i32 1)
unreachable
13: ; preds = %3
store i8 0, i8* %1
store i8 0, i8* %0
%14 = call i32* @fgets(i8* %5, i32 2048, i32* %6)
%15 = icmp eq i32* %14, null
br i1 %15, label %86, label %16
16: ; preds = %13, %83
%17 = call i8* @strstr(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%18 = icmp eq i8* %17, null
br i1 %18, label %83, label %19
19: ; preds = %16
%20 = call i32 @strlen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i8, i8* %17, i64 %21
%23 = load i8, i8* %22
%24 = icmp eq i8 %23, 91
%25 = zext i1 %24 to i64
%26 = getelementptr i8, i8* %22, i64 %25
%27 = call i8* @strchr(i8* %26, i8 signext 44)
%28 = icmp eq i8* %27, null
br i1 %28, label %77, label %29
29: ; preds = %19
%30 = ptrtoint i8* %27 to i64
%31 = ptrtoint i8* %26 to i64
%32 = sub i64 %30, %31
%33 = trunc i64 %32 to i32
%34 = icmp sgt i32 %33, %2
%35 = select i1 %34, i32 %2, i32 %33
%36 = call i32 @strncpy(i8* %1, i8* %26, i32 %35)
%37 = sext i32 %35 to i64
%38 = getelementptr inbounds i8, i8* %1, i64 %37
store i8 0, i8* %38
%39 = add nsw i32 %35, -1
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds i8, i8* %1, i64 %40
%42 = load i8, i8* %41
%43 = icmp eq i8 %42, 93
br i1 %43, label %44, label %45
44: ; preds = %29
store i8 0, i8* %41
br label %45
45: ; preds = %44, %29
%46 = add nsw i32 %35, 1
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds i8, i8* %26, i64 %47
br label %49
49: ; preds = %52, %45
%50 = phi i8* [ %48, %45 ], [ %53, %52 ]
%51 = load i8, i8* %50
switch i8 %51, label %54 [
i8 32, label %52
i8 91, label %52
]
52: ; preds = %49, %49
%53 = getelementptr inbounds i8, i8* %50, i64 1
br label %49
54: ; preds = %49
%55 = call i8* @strchr(i8* %50, i8 signext 44)
%56 = icmp eq i8* %55, null
br i1 %56, label %57, label %60
57: ; preds = %54
%58 = call i8* @strchr(i8* %50, i8 signext 41)
%59 = icmp eq i8* %58, null
br i1 %59, label %77, label %60
60: ; preds = %54, %57
%61 = phi i8* [ %58, %57 ], [ %55, %54 ]
%62 = ptrtoint i8* %61 to i64
%63 = ptrtoint i8* %50 to i64
%64 = sub i64 %62, %63
%65 = trunc i64 %64 to i32
%66 = icmp sgt i32 %65, %2
%67 = select i1 %66, i32 %2, i32 %65
%68 = call i32 @strncpy(i8* %0, i8* %50, i32 %67)
%69 = sext i32 %67 to i64
%70 = getelementptr inbounds i8, i8* %0, i64 %69
store i8 0, i8* %70
%71 = add nsw i32 %67, -1
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds i8, i8* %0, i64 %72
%74 = load i8, i8* %73
%75 = icmp eq i8 %74, 93
br i1 %75, label %76, label %77
76: ; preds = %60
store i8 0, i8* %73
br label %77
77: ; preds = %57, %76, %60, %19
%78 = load i8, i8* %0
%79 = icmp eq i8 %78, 0
br i1 %79, label %83, label %80
80: ; preds = %77
%81 = load i8, i8* %1
%82 = icmp eq i8 %81, 0
br i1 %82, label %83, label %86
83: ; preds = %77, %80, %16
%84 = call i32* @fgets(i8* %5, i32 2048, i32* %6)
%85 = icmp eq i32* %84, null
br i1 %85, label %86, label %16
86: ; preds = %83, %80, %13
%87 = call i32 @fclose(i32* %6)
ret i32 undef
}