#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 abs(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char, ...);
scalar_t__ islower(int);
scalar_t__ isupper(int);
int /*<<< orphan*/ stderr;
int VerifyKHS(char *ss) {
  int symcount[27];
  int i;
  int pos;
  int status = 1;
  for (i = 0; i < 27; i++)
    symcount[i] = 0;
  for (pos = 0; ss[pos] != '\0'; pos++) {
    if (ss[pos] > 127) {
      status = 0;
      fprintf(stderr,
              "  structure has garbage symbol (val %d) at position %d\n",
              (int)ss[pos], pos);
    } else if (ss[pos] == '>')
      symcount[0]++;
    else if (ss[pos] == '<')
      symcount[0]--;
    else if (isupper((int)ss[pos]))
      symcount[ss[pos] - 'A' + 1]++;
    else if (islower((int)ss[pos]))
      symcount[ss[pos] - 'a' + 1]--;
    else if (ss[pos] != '.') {
      status = 0;
      fprintf(stderr, "  structure has invalid symbol %c at position %d\n",
              ss[pos], pos);
    }
  }
  if (symcount[0] != 0) {
    status = 0;
    fprintf(stderr, "  structure has extra paired bases: %d on %s\n",
            abs(symcount[0]), (symcount[0] > 0) ? "left" : "right");
  }
  for (i = 1; i < 27; i++)
    if (symcount[i] != 0) {
      status = 0;
      fprintf(
          stderr,
          "  structure has extra paired bases for pseudoknot %c: %d on %s\n",
          (char)(i + 'A' - 1), abs(symcount[i]),
          (symcount[i] > 0) ? "left" : "right");
    }
  return status;
}


x86 assembly (clang, -O0):
<VerifyKHS>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0x8c(%rbp)
movl   $0x0,-0x84(%rbp)
cmpl   $0x1b,-0x84(%rbp)
jge    1193 <VerifyKHS+0x53>
movslq -0x84(%rbp),%rax
movl   $0x0,-0x80(%rbp,%rax,4)
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    1163 <VerifyKHS+0x23>
movl   $0x0,-0x88(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x88(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1363 <VerifyKHS+0x223>
mov    -0x8(%rbp),%rax
movslq -0x88(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x7f,%eax
jle    120b <VerifyKHS+0xcb>
movl   $0x0,-0x8c(%rbp)
mov    0x2e02(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rax
movslq -0x88(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x88(%rbp),%ecx
lea    0xe04(%rip),%rsi
movsbl %al,%edx
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    134a <VerifyKHS+0x20a>
mov    -0x8(%rbp),%rax
movslq -0x88(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x3e,%eax
jne    1231 <VerifyKHS+0xf1>
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
jmp    1345 <VerifyKHS+0x205>
mov    -0x8(%rbp),%rax
movslq -0x88(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x3c,%eax
jne    1257 <VerifyKHS+0x117>
mov    -0x80(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x80(%rbp)
jmp    1340 <VerifyKHS+0x200>
mov    -0x8(%rbp),%rax
movslq -0x88(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1060 <isupper@plt>
cmp    $0x0,%rax
je     129c <VerifyKHS+0x15c>
mov    -0x8(%rbp),%rax
movslq -0x88(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
sub    $0x41,%eax
add    $0x1,%eax
cltq
mov    -0x80(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x80(%rbp,%rax,4)
jmp    133b <VerifyKHS+0x1fb>
mov    -0x8(%rbp),%rax
movslq -0x88(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
je     12e1 <VerifyKHS+0x1a1>
mov    -0x8(%rbp),%rax
movslq -0x88(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
sub    $0x61,%eax
add    $0x1,%eax
cltq
mov    -0x80(%rbp,%rax,4),%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x80(%rbp,%rax,4)
jmp    1336 <VerifyKHS+0x1f6>
mov    -0x8(%rbp),%rax
movslq -0x88(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2e,%eax
je     1331 <VerifyKHS+0x1f1>
movl   $0x0,-0x8c(%rbp)
mov    0x2cd6(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rax
movslq -0x88(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    -0x88(%rbp),%ecx
lea    0xd11(%rip),%rsi
movsbl %al,%edx
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    1336 <VerifyKHS+0x1f6>
jmp    133b <VerifyKHS+0x1fb>
jmp    1340 <VerifyKHS+0x200>
jmp    1345 <VerifyKHS+0x205>
jmp    134a <VerifyKHS+0x20a>
jmp    134f <VerifyKHS+0x20f>
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
jmp    119d <VerifyKHS+0x5d>
cmpl   $0x0,-0x80(%rbp)
je     13bd <VerifyKHS+0x27d>
movl   $0x0,-0x8c(%rbp)
mov    0x2c62(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x90(%rbp)
mov    -0x80(%rbp),%edi
call   1040 <abs@plt>
mov    -0x90(%rbp),%edi
mov    -0x80(%rbp),%esi
lea    0xcff(%rip),%rcx
lea    0xcf3(%rip),%rdx
cmp    $0x0,%esi
cmovg  %rdx,%rcx
lea    0xcb7(%rip),%rsi
movsbl %al,%edx
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x1,-0x84(%rbp)
cmpl   $0x1b,-0x84(%rbp)
jge    1479 <VerifyKHS+0x339>
movslq -0x84(%rbp),%rax
cmpl   $0x0,-0x80(%rbp,%rax,4)
je     1460 <VerifyKHS+0x320>
movl   $0x0,-0x8c(%rbp)
mov    0x2be9(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x98(%rbp)
mov    -0x84(%rbp),%eax
add    $0x41,%eax
sub    $0x1,%eax
mov    %al,-0x91(%rbp)
movslq -0x84(%rbp),%rax
mov    -0x80(%rbp,%rax,4),%edi
call   1040 <abs@plt>
mov    -0x98(%rbp),%edi
mov    %eax,%ecx
mov    -0x91(%rbp),%al
movslq -0x84(%rbp),%rdx
mov    -0x80(%rbp,%rdx,4),%esi
lea    0xc5c(%rip),%r8
lea    0xc50(%rip),%rdx
cmp    $0x0,%esi
cmovg  %rdx,%r8
lea    0xc4d(%rip),%rsi
movsbl %al,%edx
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    1465 <VerifyKHS+0x325>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    13c7 <VerifyKHS+0x287>
mov    -0x8c(%rbp),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VerifyKHS>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %rdi,%rbx
xorps  %xmm0,%xmm0
movups %xmm0,0x5c(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
mov    $0x1,%r14d
xor    %ebp,%ebp
mov    0x2e6b(%rip),%r12
lea    0xe84(%rip),%r15
jmp    1188 <VerifyKHS+0x58>
xchg   %ax,%ax
addl   $0x1,(%rsp)
add    $0x1,%rbp
movsbl (%rbx,%rbp,1),%edi
cmp    $0x3c,%edi
je     11c0 <VerifyKHS+0x90>
cmp    $0x3e,%dil
je     1180 <VerifyKHS+0x50>
test   %dil,%dil
je     1205 <VerifyKHS+0xd5>
call   1050 <isupper@plt>
movsbq (%rbx,%rbp,1),%rdi
test   %rax,%rax
je     11ca <VerifyKHS+0x9a>
addl   $0x1,-0x100(%rsp,%rdi,4)
01
add    $0x1,%rbp
jmp    1188 <VerifyKHS+0x58>
nopl   0x0(%rax)
addl   $0xffffffff,(%rsp)
add    $0x1,%rbp
jmp    1188 <VerifyKHS+0x58>
call   1030 <islower@plt>
movsbq (%rbx,%rbp,1),%rdx
test   %rax,%rax
je     11e7 <VerifyKHS+0xb7>
addl   $0xffffffff,-0x180(%rsp,%rdx,4)
ff
add    $0x1,%rbp
jmp    1188 <VerifyKHS+0x58>
cmp    $0x2e,%dl
je     11ff <VerifyKHS+0xcf>
mov    (%r12),%edi
xor    %r14d,%r14d
mov    %r15,%rsi
mov    %ebp,%ecx
xor    %eax,%eax
call   1040 <fprintf@plt>
add    $0x1,%rbp
jmp    1188 <VerifyKHS+0x58>
mov    (%rsp),%eax
test   %eax,%eax
je     123f <VerifyKHS+0x10f>
mov    (%r12),%edi
mov    %eax,%edx
neg    %edx
cmovs  %eax,%edx
test   %eax,%eax
lea    0xe40(%rip),%rax
lea    0xe3e(%rip),%rcx
cmovg  %rax,%rcx
movsbl %dl,%edx
lea    0xdfd(%rip),%rsi
xor    %r14d,%r14d
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    $0x1,%ebp
lea    0xe15(%rip),%r15
lea    0xe13(%rip),%r13
lea    0xe12(%rip),%rbx
jmp    126a <VerifyKHS+0x13a>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbp
cmp    $0x1b,%rbp
je     129a <VerifyKHS+0x16a>
mov    (%rsp,%rbp,4),%eax
test   %eax,%eax
je     1260 <VerifyKHS+0x130>
mov    (%r12),%edi
mov    %eax,%ecx
neg    %ecx
cmovs  %eax,%ecx
lea    0x40(%rbp),%edx
test   %eax,%eax
mov    %r13,%r8
cmovg  %r15,%r8
movsbl %dl,%edx
xor    %r14d,%r14d
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
jmp    1260 <VerifyKHS+0x130>
mov    %r14d,%eax
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [56 x i8] c" structure has garbage symbol (val %d) at position %d\0A\00"
@.str.1 = [50 x i8] c" structure has invalid symbol %c at position %d\0A\00"
@.str.2 = [46 x i8] c" structure has extra paired bases: %d on %s\0A\00"
@.str.3 = [5 x i8] c"left\00"
@.str.4 = [6 x i8] c"right\00"
@.str.5 = [64 x i8] c" structure has extra paired bases for pseudoknot %c: %d on %s\0A\00"
define i32 @VerifyKHS(i8* %0) {
%2 = alloca i8*
%3 = alloca [27 x i32]
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %2
store i32 1, i32* %6
store i32 0, i32* %4
br label %7
7: ; preds = %14, %1
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 27
br i1 %9, label %10, label %17
10: ; preds = %7
%11 = load i32, i32* %4
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [27 x i32], [27 x i32]* %3, i64 0, i64 %12
store i32 0, i32* %13
br label %14
14: ; preds = %10
%15 = load i32, i32* %4
%16 = add nsw i32 %15, 1
store i32 %16, i32* %4
br label %7
17: ; preds = %7
store i32 0, i32* %5
br label %18
18: ; preds = %136, %17
%19 = load i8*, i8** %2
%20 = load i32, i32* %5
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i8, i8* %19, i64 %21
%23 = load i8, i8* %22
%24 = sext i8 %23 to i32
%25 = icmp ne i32 %24, 0
br i1 %25, label %26, label %139
26: ; preds = %18
%27 = load i8*, i8** %2
%28 = load i32, i32* %5
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds i8, i8* %27, i64 %29
%31 = load i8, i8* %30
%32 = sext i8 %31 to i32
%33 = icmp sgt i32 %32, 127
br i1 %33, label %34, label %45
34: ; preds = %26
store i32 0, i32* %6
%35 = load i32, i32* @stderr
%36 = load i8*, i8** %2
%37 = load i32, i32* %5
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds i8, i8* %36, i64 %38
%40 = load i8, i8* %39
%41 = sext i8 %40 to i32
%42 = trunc i32 %41 to i8
%43 = load i32, i32* %5
%44 = call i32 (i32, i8*, i8, ...) @fprintf(i32 %35, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i8 signext %42, i32 %43)
br label %135
45: ; preds = %26
%46 = load i8*, i8** %2
%47 = load i32, i32* %5
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds i8, i8* %46, i64 %48
%50 = load i8, i8* %49
%51 = sext i8 %50 to i32
%52 = icmp eq i32 %51, 62
br i1 %52, label %53, label %57
53: ; preds = %45
%54 = getelementptr inbounds [27 x i32], [27 x i32]* %3, i64 0, i64 0
%55 = load i32, i32* %54
%56 = add nsw i32 %55, 1
store i32 %56, i32* %54
br label %134
57: ; preds = %45
%58 = load i8*, i8** %2
%59 = load i32, i32* %5
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds i8, i8* %58, i64 %60
%62 = load i8, i8* %61
%63 = sext i8 %62 to i32
%64 = icmp eq i32 %63, 60
br i1 %64, label %65, label %69
65: ; preds = %57
%66 = getelementptr inbounds [27 x i32], [27 x i32]* %3, i64 0, i64 0
%67 = load i32, i32* %66
%68 = add nsw i32 %67, -1
store i32 %68, i32* %66
br label %133
69: ; preds = %57
%70 = load i8*, i8** %2
%71 = load i32, i32* %5
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds i8, i8* %70, i64 %72
%74 = load i8, i8* %73
%75 = sext i8 %74 to i32
%76 = call i64 @isupper(i32 %75)
%77 = icmp ne i64 %76, 0
br i1 %77, label %78, label %91
78: ; preds = %69
%79 = load i8*, i8** %2
%80 = load i32, i32* %5
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds i8, i8* %79, i64 %81
%83 = load i8, i8* %82
%84 = sext i8 %83 to i32
%85 = sub nsw i32 %84, 65
%86 = add nsw i32 %85, 1
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds [27 x i32], [27 x i32]* %3, i64 0, i64 %87
%89 = load i32, i32* %88
%90 = add nsw i32 %89, 1
store i32 %90, i32* %88
br label %132
91: ; preds = %69
%92 = load i8*, i8** %2
%93 = load i32, i32* %5
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds i8, i8* %92, i64 %94
%96 = load i8, i8* %95
%97 = sext i8 %96 to i32
%98 = call i64 @islower(i32 %97)
%99 = icmp ne i64 %98, 0
br i1 %99, label %100, label %113
100: ; preds = %91
%101 = load i8*, i8** %2
%102 = load i32, i32* %5
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds i8, i8* %101, i64 %103
%105 = load i8, i8* %104
%106 = sext i8 %105 to i32
%107 = sub nsw i32 %106, 97
%108 = add nsw i32 %107, 1
%109 = sext i32 %108 to i64
%110 = getelementptr inbounds [27 x i32], [27 x i32]* %3, i64 0, i64 %109
%111 = load i32, i32* %110
%112 = add nsw i32 %111, -1
store i32 %112, i32* %110
br label %131
113: ; preds = %91
%114 = load i8*, i8** %2
%115 = load i32, i32* %5
%116 = sext i32 %115 to i64
%117 = getelementptr inbounds i8, i8* %114, i64 %116
%118 = load i8, i8* %117
%119 = sext i8 %118 to i32
%120 = icmp ne i32 %119, 46
br i1 %120, label %121, label %130
121: ; preds = %113
store i32 0, i32* %6
%122 = load i32, i32* @stderr
%123 = load i8*, i8** %2
%124 = load i32, i32* %5
%125 = sext i32 %124 to i64
%126 = getelementptr inbounds i8, i8* %123, i64 %125
%127 = load i8, i8* %126
%128 = load i32, i32* %5
%129 = call i32 (i32, i8*, i8, ...) @fprintf(i32 %122, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0), i8 signext %127, i32 %128)
br label %130
130: ; preds = %121, %113
br label %131
131: ; preds = %130, %100
br label %132
132: ; preds = %131, %78
br label %133
133: ; preds = %132, %65
br label %134
134: ; preds = %133, %53
br label %135
135: ; preds = %134, %34
br label %136
136: ; preds = %135
%137 = load i32, i32* %5
%138 = add nsw i32 %137, 1
store i32 %138, i32* %5
br label %18
139: ; preds = %18
%140 = getelementptr inbounds [27 x i32], [27 x i32]* %3, i64 0, i64 0
%141 = load i32, i32* %140
%142 = icmp ne i32 %141, 0
br i1 %142, label %143, label %155
143: ; preds = %139
store i32 0, i32* %6
%144 = load i32, i32* @stderr
%145 = getelementptr inbounds [27 x i32], [27 x i32]* %3, i64 0, i64 0
%146 = load i32, i32* %145
%147 = call i32 @abs(i32 %146)
%148 = trunc i32 %147 to i8
%149 = getelementptr inbounds [27 x i32], [27 x i32]* %3, i64 0, i64 0
%150 = load i32, i32* %149
%151 = icmp sgt i32 %150, 0
%152 = zext i1 %151 to i64
%153 = select i1 %151, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0)
%154 = call i32 (i32, i8*, i8, ...) @fprintf(i32 %144, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0), i8 signext %148, i8* %153)
br label %155
155: ; preds = %143, %139
store i32 1, i32* %4
br label %156
156: ; preds = %185, %155
%157 = load i32, i32* %4
%158 = icmp slt i32 %157, 27
br i1 %158, label %159, label %188
159: ; preds = %156
%160 = load i32, i32* %4
%161 = sext i32 %160 to i64
%162 = getelementptr inbounds [27 x i32], [27 x i32]* %3, i64 0, i64 %161
%163 = load i32, i32* %162
%164 = icmp ne i32 %163, 0
br i1 %164, label %165, label %184
165: ; preds = %159
store i32 0, i32* %6
%166 = load i32, i32* @stderr
%167 = load i32, i32* %4
%168 = add nsw i32 %167, 65
%169 = sub nsw i32 %168, 1
%170 = trunc i32 %169 to i8
%171 = load i32, i32* %4
%172 = sext i32 %171 to i64
%173 = getelementptr inbounds [27 x i32], [27 x i32]* %3, i64 0, i64 %172
%174 = load i32, i32* %173
%175 = call i32 @abs(i32 %174)
%176 = load i32, i32* %4
%177 = sext i32 %176 to i64
%178 = getelementptr inbounds [27 x i32], [27 x i32]* %3, i64 0, i64 %177
%179 = load i32, i32* %178
%180 = icmp sgt i32 %179, 0
%181 = zext i1 %180 to i64
%182 = select i1 %180, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0)
%183 = call i32 (i32, i8*, i8, ...) @fprintf(i32 %166, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.5, i64 0, i64 0), i8 signext %170, i32 %175, i8* %182)
br label %184
184: ; preds = %165, %159
br label %185
185: ; preds = %184
%186 = load i32, i32* %4
%187 = add nsw i32 %186, 1
store i32 %187, i32* %4
br label %156
188: ; preds = %156
%189 = load i32, i32* %6
ret i32 %189
}

LLVM IR (-O2):
@stderr = global i32 0
@.str.1 = [50 x i8] c" structure has invalid symbol %c at position %d\0A\00"
@.str.2 = [46 x i8] c" structure has extra paired bases: %d on %s\0A\00"
@.str.3 = [5 x i8] c"left\00"
@.str.4 = [6 x i8] c"right\00"
@.str.5 = [64 x i8] c" structure has extra paired bases for pseudoknot %c: %d on %s\0A\00"
define i32 @VerifyKHS(i8* nocapture %0) {
%2 = alloca [27 x i32]
%3 = bitcast [27 x i32]* %2 to i8*
%4 = getelementptr inbounds [27 x i32], [27 x i32]* %2, i64 0, i64 0
br label %5
5: ; preds = %1, %44
%6 = phi i64 [ 0, %1 ], [ %46, %44 ]
%7 = phi i32 [ 1, %1 ], [ %45, %44 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %6
%9 = load i8, i8* %8
switch i8 %9, label %16 [
i8 0, label %47
i8 62, label %10
i8 60, label %13
]
10: ; preds = %5
%11 = load i32, i32* %4
%12 = add nsw i32 %11, 1
store i32 %12, i32* %4
br label %44
13: ; preds = %5
%14 = load i32, i32* %4
%15 = add nsw i32 %14, -1
store i32 %15, i32* %4
br label %44
16: ; preds = %5
%17 = sext i8 %9 to i32
%18 = tail call i64 @isupper(i32 %17)
%19 = icmp eq i64 %18, 0
%20 = load i8, i8* %8
br i1 %19, label %27, label %21
21: ; preds = %16
%22 = sext i8 %20 to i64
%23 = add nsw i64 %22, -64
%24 = getelementptr inbounds [27 x i32], [27 x i32]* %2, i64 0, i64 %23
%25 = load i32, i32* %24
%26 = add nsw i32 %25, 1
store i32 %26, i32* %24
br label %44
27: ; preds = %16
%28 = sext i8 %20 to i32
%29 = tail call i64 @islower(i32 %28)
%30 = icmp eq i64 %29, 0
%31 = load i8, i8* %8
br i1 %30, label %38, label %32
32: ; preds = %27
%33 = sext i8 %31 to i64
%34 = add nsw i64 %33, -96
%35 = getelementptr inbounds [27 x i32], [27 x i32]* %2, i64 0, i64 %34
%36 = load i32, i32* %35
%37 = add nsw i32 %36, -1
store i32 %37, i32* %35
br label %44
38: ; preds = %27
%39 = icmp eq i8 %31, 46
br i1 %39, label %44, label %40
40: ; preds = %38
%41 = load i32, i32* @stderr
%42 = trunc i64 %6 to i32
%43 = tail call i32 (i32, i8*, i8, ...) @fprintf(i32 %41, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0), i8 signext %31, i32 %42)
br label %44
44: ; preds = %13, %32, %40, %38, %21, %10
%45 = phi i32 [ %7, %10 ], [ %7, %13 ], [ %7, %21 ], [ %7, %32 ], [ 0, %40 ], [ %7, %38 ]
%46 = add nuw i64 %6, 1
br label %5
47: ; preds = %5
%48 = load i32, i32* %4
%49 = icmp eq i32 %48, 0
br i1 %49, label %57, label %50
50: ; preds = %47
%51 = load i32, i32* @stderr
%52 = tail call i32 @llvm.abs.i32(i32 %48, i1 true)
%53 = trunc i32 %52 to i8
%54 = icmp sgt i32 %48, 0
%55 = select i1 %54, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0)
%56 = tail call i32 (i32, i8*, i8, ...) @fprintf(i32 %51, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0), i8 signext %53, i8* %55)
br label %57
57: ; preds = %50, %47
%58 = phi i32 [ %7, %47 ], [ 0, %50 ]
br label %59
59: ; preds = %57, %73
%60 = phi i64 [ %75, %73 ], [ 1, %57 ]
%61 = phi i32 [ %74, %73 ], [ %58, %57 ]
%62 = getelementptr inbounds [27 x i32], [27 x i32]* %2, i64 0, i64 %60
%63 = load i32, i32* %62
%64 = icmp eq i32 %63, 0
br i1 %64, label %73, label %65
65: ; preds = %59
%66 = load i32, i32* @stderr
%67 = trunc i64 %60 to i8
%68 = add nuw nsw i8 %67, 64
%69 = tail call i32 @llvm.abs.i32(i32 %63, i1 true)
%70 = icmp sgt i32 %63, 0
%71 = select i1 %70, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0)
%72 = tail call i32 (i32, i8*, i8, ...) @fprintf(i32 %66, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.5, i64 0, i64 0), i8 signext %68, i32 %69, i8* %71)
br label %73
73: ; preds = %59, %65
%74 = phi i32 [ 0, %65 ], [ %61, %59 ]
%75 = add nuw nsw i64 %60, 1
%76 = icmp eq i64 %75, 27
br i1 %76, label %77, label %59
77: ; preds = %73
ret i32 %74
}