#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 */
int /*<<< orphan*/ strncmp(char *, char *, int);
int GetUserFileEntryLength(int max_filename_len, int max_linkname_len,
                           char *template) {
  int len, n;
  char *sptr;
  for (len = 0, sptr = template; *sptr;) {
    if (*sptr == '%') {
      sptr++;
      if (!strncmp(sptr, "tag", 3)) {
        n = 1;
      } else if (!strncmp(sptr, "fnm", 3)) {
        n = max_filename_len;
      } else if (!strncmp(sptr, "atr", 3)) {
        n = 10;
      } else if (!strncmp(sptr, "lct", 3)) {
        n = 3;
      } else if (!strncmp(sptr, "fsz", 3)) {
        n = 7;
      } else if (!strncmp(sptr, "mot", 3)) {
        n = 12;
      } else if (!strncmp(sptr, "lnm", 3)) {
        n = max_linkname_len;
      } else if (!strncmp(sptr, "uid", 3)) {
        n = 8;
      } else if (!strncmp(sptr, "gid", 3)) {
        n = 8;
      } else if (!strncmp(sptr, "ino", 3)) {
        n = 7;
      } else if (!strncmp(sptr, "act", 3)) {
        n = 12;
      } else if (!strncmp(sptr, "sct", 3)) {
        n = 12;
      } else {
        n = -1;
      }
      if (n == -1) {
        len++;
        sptr++;
      } else {
        len += n;
        if (*sptr)
          sptr++;
        if (*sptr)
          sptr++;
        if (*sptr)
          sptr++;
      }
    } else {
      sptr++;
      len++;
    }
  }
  return (len);
}


x86 assembly (clang, -O0):
<GetUserFileEntryLength>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmpb   $0x0,(%rax)
je     142a <GetUserFileEntryLength+0x31a>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x25,%eax
jne    1410 <GetUserFileEntryLength+0x300>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
lea    0xe9b(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1184 <GetUserFileEntryLength+0x74>
movl   $0x1,-0x18(%rbp)
jmp    138e <GetUserFileEntryLength+0x27e>
mov    -0x20(%rbp),%rdi
lea    0xe75(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    11ad <GetUserFileEntryLength+0x9d>
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    1389 <GetUserFileEntryLength+0x279>
mov    -0x20(%rbp),%rdi
lea    0xe50(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    11d7 <GetUserFileEntryLength+0xc7>
movl   $0xa,-0x18(%rbp)
jmp    1384 <GetUserFileEntryLength+0x274>
mov    -0x20(%rbp),%rdi
lea    0xe2a(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1201 <GetUserFileEntryLength+0xf1>
movl   $0x3,-0x18(%rbp)
jmp    137f <GetUserFileEntryLength+0x26f>
mov    -0x20(%rbp),%rdi
lea    0xe04(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    122b <GetUserFileEntryLength+0x11b>
movl   $0x7,-0x18(%rbp)
jmp    137a <GetUserFileEntryLength+0x26a>
mov    -0x20(%rbp),%rdi
lea    0xdde(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1255 <GetUserFileEntryLength+0x145>
movl   $0xc,-0x18(%rbp)
jmp    1375 <GetUserFileEntryLength+0x265>
mov    -0x20(%rbp),%rdi
lea    0xdb8(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    127e <GetUserFileEntryLength+0x16e>
mov    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    1370 <GetUserFileEntryLength+0x260>
mov    -0x20(%rbp),%rdi
lea    0xd93(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    12a8 <GetUserFileEntryLength+0x198>
movl   $0x8,-0x18(%rbp)
jmp    136b <GetUserFileEntryLength+0x25b>
mov    -0x20(%rbp),%rdi
lea    0xd6d(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    12d2 <GetUserFileEntryLength+0x1c2>
movl   $0x8,-0x18(%rbp)
jmp    1366 <GetUserFileEntryLength+0x256>
mov    -0x20(%rbp),%rdi
lea    0xd47(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    12fc <GetUserFileEntryLength+0x1ec>
movl   $0x7,-0x18(%rbp)
jmp    1361 <GetUserFileEntryLength+0x251>
mov    -0x20(%rbp),%rdi
lea    0xd21(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1326 <GetUserFileEntryLength+0x216>
movl   $0xc,-0x18(%rbp)
jmp    135c <GetUserFileEntryLength+0x24c>
mov    -0x20(%rbp),%rdi
lea    0xcfb(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1350 <GetUserFileEntryLength+0x240>
movl   $0xc,-0x18(%rbp)
jmp    1357 <GetUserFileEntryLength+0x247>
movl   $0xffffffff,-0x18(%rbp)
jmp    135c <GetUserFileEntryLength+0x24c>
jmp    1361 <GetUserFileEntryLength+0x251>
jmp    1366 <GetUserFileEntryLength+0x256>
jmp    136b <GetUserFileEntryLength+0x25b>
jmp    1370 <GetUserFileEntryLength+0x260>
jmp    1375 <GetUserFileEntryLength+0x265>
jmp    137a <GetUserFileEntryLength+0x26a>
jmp    137f <GetUserFileEntryLength+0x26f>
jmp    1384 <GetUserFileEntryLength+0x274>
jmp    1389 <GetUserFileEntryLength+0x279>
jmp    138e <GetUserFileEntryLength+0x27e>
cmpl   $0xffffffff,-0x18(%rbp)
jne    13b2 <GetUserFileEntryLength+0x2a2>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    140b <GetUserFileEntryLength+0x2fb>
mov    -0x18(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x20(%rbp),%rax
cmpb   $0x0,(%rax)
je     13d4 <GetUserFileEntryLength+0x2c4>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmpb   $0x0,(%rax)
je     13ed <GetUserFileEntryLength+0x2dd>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmpb   $0x0,(%rax)
je     1406 <GetUserFileEntryLength+0x2f6>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    140b <GetUserFileEntryLength+0x2fb>
jmp    1425 <GetUserFileEntryLength+0x315>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1131 <GetUserFileEntryLength+0x21>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetUserFileEntryLength>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %esi,0x4(%rsp)
mov    %edi,%r12d
xor    %ebp,%ebp
lea    0xed2(%rip),%r15
jmp    1160 <GetUserFileEntryLength+0x50>
mov    $0x1,%ebx
add    %ebx,%ebp
lea    0x2(%r14),%rax
xor    %ecx,%ecx
cmpb   $0x0,0x1(%r14)
sete   %cl
cmove  %r13,%rax
neg    %rcx
cmpb   $0x1,0x2(%r14,%rcx,1)
sbb    $0xffffffffffffffff,%rax
cmpb   $0x1,(%rax)
sbb    $0xffffffffffffffff,%rax
mov    %rax,%r14
movzbl (%r14),%eax
cmp    $0x25,%al
je     1180 <GetUserFileEntryLength+0x70>
test   %al,%al
je     1312 <GetUserFileEntryLength+0x202>
add    $0x1,%r14
add    $0x1,%ebp
jmp    1160 <GetUserFileEntryLength+0x50>
nopl   0x0(%rax)
lea    0x1(%r14),%r13
mov    %r13,%rdi
mov    %r15,%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     1130 <GetUserFileEntryLength+0x20>
mov    %r13,%rdi
lea    0xe62(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
mov    %r12d,%ebx
test   %eax,%eax
je     12e9 <GetUserFileEntryLength+0x1d9>
mov    %r13,%rdi
lea    0xe47(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     12fe <GetUserFileEntryLength+0x1ee>
mov    $0x3,%ebx
mov    %r13,%rdi
lea    0xe2a(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     1135 <GetUserFileEntryLength+0x25>
mov    %r13,%rdi
lea    0xe12(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
mov    $0x7,%ebx
test   %eax,%eax
je     1135 <GetUserFileEntryLength+0x25>
mov    %r13,%rdi
lea    0xdf5(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     1308 <GetUserFileEntryLength+0x1f8>
mov    %r13,%rdi
lea    0xddd(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
mov    0x4(%rsp),%ebx
test   %eax,%eax
je     12e9 <GetUserFileEntryLength+0x1d9>
mov    %r13,%rdi
lea    0xdc1(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
mov    $0x8,%ebx
test   %eax,%eax
je     1135 <GetUserFileEntryLength+0x25>
mov    %r13,%rdi
lea    0xda4(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     1135 <GetUserFileEntryLength+0x25>
mov    %r13,%rdi
lea    0xd8c(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
mov    $0x7,%ebx
test   %eax,%eax
je     1135 <GetUserFileEntryLength+0x25>
mov    %r13,%rdi
lea    0xd6f(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     1308 <GetUserFileEntryLength+0x1f8>
mov    %r13,%rdi
lea    0xd5b(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
mov    $0xc,%ebx
test   %eax,%eax
jne    12f2 <GetUserFileEntryLength+0x1e2>
jmp    1135 <GetUserFileEntryLength+0x25>
cmp    $0xffffffff,%ebx
jne    1135 <GetUserFileEntryLength+0x25>
add    $0x1,%ebp
add    $0x2,%r14
jmp    1160 <GetUserFileEntryLength+0x50>
mov    $0xa,%ebx
jmp    1135 <GetUserFileEntryLength+0x25>
mov    $0xc,%ebx
jmp    1135 <GetUserFileEntryLength+0x25>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"tag\00"
@.str.1 = [4 x i8] c"fnm\00"
@.str.2 = [4 x i8] c"atr\00"
@.str.3 = [4 x i8] c"lct\00"
@.str.4 = [4 x i8] c"fsz\00"
@.str.5 = [4 x i8] c"mot\00"
@.str.6 = [4 x i8] c"lnm\00"
@.str.7 = [4 x i8] c"uid\00"
@.str.8 = [4 x i8] c"gid\00"
@.str.9 = [4 x i8] c"ino\00"
@.str.10 = [4 x i8] c"act\00"
@.str.11 = [4 x i8] c"sct\00"
define i32 @GetUserFileEntryLength(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
store i32 0, i32* %7
%10 = load i8*, i8** %6
store i8* %10, i8** %9
br label %11
11: ; preds = %135, %3
%12 = load i8*, i8** %9
%13 = load i8, i8* %12
%14 = icmp ne i8 %13, 0
br i1 %14, label %15, label %136
15: ; preds = %11
%16 = load i8*, i8** %9
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp eq i32 %18, 37
br i1 %19, label %20, label %130
20: ; preds = %15
%21 = load i8*, i8** %9
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %9
%23 = load i8*, i8** %9
%24 = call i32 @strncmp(i8* %23, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%25 = icmp ne i32 %24, 0
br i1 %25, label %27, label %26
26: ; preds = %20
store i32 1, i32* %8
br label %96
27: ; preds = %20
%28 = load i8*, i8** %9
%29 = call i32 @strncmp(i8* %28, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%30 = icmp ne i32 %29, 0
br i1 %30, label %33, label %31
31: ; preds = %27
%32 = load i32, i32* %4
store i32 %32, i32* %8
br label %95
33: ; preds = %27
%34 = load i8*, i8** %9
%35 = call i32 @strncmp(i8* %34, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 3)
%36 = icmp ne i32 %35, 0
br i1 %36, label %38, label %37
37: ; preds = %33
store i32 10, i32* %8
br label %94
38: ; preds = %33
%39 = load i8*, i8** %9
%40 = call i32 @strncmp(i8* %39, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 3)
%41 = icmp ne i32 %40, 0
br i1 %41, label %43, label %42
42: ; preds = %38
store i32 3, i32* %8
br label %93
43: ; preds = %38
%44 = load i8*, i8** %9
%45 = call i32 @strncmp(i8* %44, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 3)
%46 = icmp ne i32 %45, 0
br i1 %46, label %48, label %47
47: ; preds = %43
store i32 7, i32* %8
br label %92
48: ; preds = %43
%49 = load i8*, i8** %9
%50 = call i32 @strncmp(i8* %49, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 3)
%51 = icmp ne i32 %50, 0
br i1 %51, label %53, label %52
52: ; preds = %48
store i32 12, i32* %8
br label %91
53: ; preds = %48
%54 = load i8*, i8** %9
%55 = call i32 @strncmp(i8* %54, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 3)
%56 = icmp ne i32 %55, 0
br i1 %56, label %59, label %57
57: ; preds = %53
%58 = load i32, i32* %5
store i32 %58, i32* %8
br label %90
59: ; preds = %53
%60 = load i8*, i8** %9
%61 = call i32 @strncmp(i8* %60, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 3)
%62 = icmp ne i32 %61, 0
br i1 %62, label %64, label %63
63: ; preds = %59
store i32 8, i32* %8
br label %89
64: ; preds = %59
%65 = load i8*, i8** %9
%66 = call i32 @strncmp(i8* %65, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32 3)
%67 = icmp ne i32 %66, 0
br i1 %67, label %69, label %68
68: ; preds = %64
store i32 8, i32* %8
br label %88
69: ; preds = %64
%70 = load i8*, i8** %9
%71 = call i32 @strncmp(i8* %70, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 3)
%72 = icmp ne i32 %71, 0
br i1 %72, label %74, label %73
73: ; preds = %69
store i32 7, i32* %8
br label %87
74: ; preds = %69
%75 = load i8*, i8** %9
%76 = call i32 @strncmp(i8* %75, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 3)
%77 = icmp ne i32 %76, 0
br i1 %77, label %79, label %78
78: ; preds = %74
store i32 12, i32* %8
br label %86
79: ; preds = %74
%80 = load i8*, i8** %9
%81 = call i32 @strncmp(i8* %80, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0), i32 3)
%82 = icmp ne i32 %81, 0
br i1 %82, label %84, label %83
83: ; preds = %79
store i32 12, i32* %8
br label %85
84: ; preds = %79
store i32 -1, i32* %8
br label %85
85: ; preds = %84, %83
br label %86
86: ; preds = %85, %78
br label %87
87: ; preds = %86, %73
br label %88
88: ; preds = %87, %68
br label %89
89: ; preds = %88, %63
br label %90
90: ; preds = %89, %57
br label %91
91: ; preds = %90, %52
br label %92
92: ; preds = %91, %47
br label %93
93: ; preds = %92, %42
br label %94
94: ; preds = %93, %37
br label %95
95: ; preds = %94, %31
br label %96
96: ; preds = %95, %26
%97 = load i32, i32* %8
%98 = icmp eq i32 %97, -1
br i1 %98, label %99, label %104
99: ; preds = %96
%100 = load i32, i32* %7
%101 = add nsw i32 %100, 1
store i32 %101, i32* %7
%102 = load i8*, i8** %9
%103 = getelementptr inbounds i8, i8* %102, i32 1
store i8* %103, i8** %9
br label %129
104: ; preds = %96
%105 = load i32, i32* %8
%106 = load i32, i32* %7
%107 = add nsw i32 %106, %105
store i32 %107, i32* %7
%108 = load i8*, i8** %9
%109 = load i8, i8* %108
%110 = icmp ne i8 %109, 0
br i1 %110, label %111, label %114
111: ; preds = %104
%112 = load i8*, i8** %9
%113 = getelementptr inbounds i8, i8* %112, i32 1
store i8* %113, i8** %9
br label %114
114: ; preds = %111, %104
%115 = load i8*, i8** %9
%116 = load i8, i8* %115
%117 = icmp ne i8 %116, 0
br i1 %117, label %118, label %121
118: ; preds = %114
%119 = load i8*, i8** %9
%120 = getelementptr inbounds i8, i8* %119, i32 1
store i8* %120, i8** %9
br label %121
121: ; preds = %118, %114
%122 = load i8*, i8** %9
%123 = load i8, i8* %122
%124 = icmp ne i8 %123, 0
br i1 %124, label %125, label %128
125: ; preds = %121
%126 = load i8*, i8** %9
%127 = getelementptr inbounds i8, i8* %126, i32 1
store i8* %127, i8** %9
br label %128
128: ; preds = %125, %121
br label %129
129: ; preds = %128, %99
br label %135
130: ; preds = %15
%131 = load i8*, i8** %9
%132 = getelementptr inbounds i8, i8* %131, i32 1
store i8* %132, i8** %9
%133 = load i32, i32* %7
%134 = add nsw i32 %133, 1
store i32 %134, i32* %7
br label %135
135: ; preds = %130, %129
br label %11
136: ; preds = %11
%137 = load i32, i32* %7
ret i32 %137
}

LLVM IR (-O2):
@.str = [4 x i8] c"tag\00"
@.str.1 = [4 x i8] c"fnm\00"
@.str.2 = [4 x i8] c"atr\00"
@.str.3 = [4 x i8] c"lct\00"
@.str.4 = [4 x i8] c"fsz\00"
@.str.5 = [4 x i8] c"mot\00"
@.str.6 = [4 x i8] c"lnm\00"
@.str.7 = [4 x i8] c"uid\00"
@.str.8 = [4 x i8] c"gid\00"
@.str.9 = [4 x i8] c"ino\00"
@.str.10 = [4 x i8] c"act\00"
@.str.11 = [4 x i8] c"sct\00"
define i32 @GetUserFileEntryLength(i32 %0, i32 %1, i8* %2) {
br label %4
4: ; preds = %66, %3
%5 = phi i32 [ 0, %3 ], [ %67, %66 ]
%6 = phi i8* [ %2, %3 ], [ %68, %66 ]
%7 = load i8, i8* %6
switch i8 %7, label %69 [
i8 0, label %72
i8 37, label %8
]
8: ; preds = %4
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = tail call i32 @strncmp(i8* %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%11 = icmp eq i32 %10, 0
br i1 %11, label %51, label %12
12: ; preds = %8
%13 = tail call i32 @strncmp(i8* %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%14 = icmp eq i32 %13, 0
br i1 %14, label %45, label %15
15: ; preds = %12
%16 = tail call i32 @strncmp(i8* %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 3)
%17 = icmp eq i32 %16, 0
br i1 %17, label %51, label %18
18: ; preds = %15
%19 = tail call i32 @strncmp(i8* %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 3)
%20 = icmp eq i32 %19, 0
br i1 %20, label %51, label %21
21: ; preds = %18
%22 = tail call i32 @strncmp(i8* %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 3)
%23 = icmp eq i32 %22, 0
br i1 %23, label %51, label %24
24: ; preds = %21
%25 = tail call i32 @strncmp(i8* %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 3)
%26 = icmp eq i32 %25, 0
br i1 %26, label %51, label %27
27: ; preds = %24
%28 = tail call i32 @strncmp(i8* %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 3)
%29 = icmp eq i32 %28, 0
br i1 %29, label %45, label %30
30: ; preds = %27
%31 = tail call i32 @strncmp(i8* %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 3)
%32 = icmp eq i32 %31, 0
br i1 %32, label %51, label %33
33: ; preds = %30
%34 = tail call i32 @strncmp(i8* %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32 3)
%35 = icmp eq i32 %34, 0
br i1 %35, label %51, label %36
36: ; preds = %33
%37 = tail call i32 @strncmp(i8* %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 3)
%38 = icmp eq i32 %37, 0
br i1 %38, label %51, label %39
39: ; preds = %36
%40 = tail call i32 @strncmp(i8* %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 3)
%41 = icmp eq i32 %40, 0
br i1 %41, label %51, label %42
42: ; preds = %39
%43 = tail call i32 @strncmp(i8* %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0), i32 3)
%44 = icmp eq i32 %43, 0
br i1 %44, label %51, label %48
45: ; preds = %27, %12
%46 = phi i32 [ %0, %12 ], [ %1, %27 ]
%47 = icmp eq i32 %46, -1
br i1 %47, label %48, label %51
48: ; preds = %42, %45
%49 = add nsw i32 %5, 1
%50 = getelementptr inbounds i8, i8* %6, i64 2
br label %66
51: ; preds = %42, %39, %36, %33, %30, %24, %21, %18, %15, %8, %45
%52 = phi i32 [ %46, %45 ], [ 12, %39 ], [ 7, %36 ], [ 8, %33 ], [ 8, %30 ], [ 12, %24 ], [ 7, %21 ], [ 3, %18 ], [ 10, %15 ], [ 1, %8 ], [ 12, %42 ]
%53 = add nsw i32 %52, %5
%54 = load i8, i8* %9
%55 = icmp eq i8 %54, 0
%56 = getelementptr inbounds i8, i8* %6, i64 2
%57 = select i1 %55, i8* %9, i8* %56
%58 = load i8, i8* %57
%59 = icmp ne i8 %58, 0
%60 = zext i1 %59 to i64
%61 = getelementptr i8, i8* %57, i64 %60
%62 = load i8, i8* %61
%63 = icmp ne i8 %62, 0
%64 = zext i1 %63 to i64
%65 = getelementptr i8, i8* %61, i64 %64
br label %66
66: ; preds = %51, %48, %69
%67 = phi i32 [ %49, %48 ], [ %71, %69 ], [ %53, %51 ]
%68 = phi i8* [ %50, %48 ], [ %70, %69 ], [ %65, %51 ]
br label %4
69: ; preds = %4
%70 = getelementptr inbounds i8, i8* %6, i64 1
%71 = add nsw i32 %5, 1
br label %66
72: ; preds = %4
ret i32 %5
}