#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 */
void __assert(char *, int);
int /*<<< orphan*/ printf(char *);
int tokenizeCommand(char *command, int maxTokens, char *tokens[],
                    char *storage) {
  const int quotingCharacter = 0x00000001;
  const int quotingString = 0x00000002;
  const int startedArg = 0x00000004;
  int state = 0;
  int numTokens = 0;
  char c;
  ((maxTokens > 0)
       ? (void)0
       : __assert("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                  "outputs/2022-01-22/02-19-57/repos/ElvisLouis/code/refs/"
                  "heads/master/bin/nachos/test/sh.c",
                  32));
  while ((c = *(command++)) != '\0') {
    if (state & quotingCharacter) {
      switch (c) {
      case 't':
        c = '\t';
        break;
      case 'n':
        c = '\n';
        break;
      }
      *(storage++) = c;
      state &= ~quotingCharacter;
    } else if (state & quotingString) {
      switch (c) {
      case '\\':
        state |= quotingCharacter;
        break;
      case '"':
        state &= ~quotingString;
        break;
      default:
        *(storage++) = c;
        break;
      }
    } else {
      switch (c) {
      case ' ':
      case '\t':
      case '\n':
        if (state & startedArg) {
          *(storage++) = '\0';
          state &= ~startedArg;
        }
        break;
      default:
        if (!(state & startedArg)) {
          if (numTokens == maxTokens) {
            return -1;
          }
          tokens[numTokens++] = storage;
          state |= startedArg;
        }
        switch (c) {
        case '\\':
          state |= quotingCharacter;
          break;
        case '"':
          state |= quotingString;
          break;
        default:
          *(storage++) = c;
          break;
        }
      }
    }
  }
  if (state & quotingCharacter) {
    printf("Unmatched \\.\n");
    return -1;
  }
  if (state & quotingString) {
    printf("Unmatched \".\n");
    return -1;
  }
  if (state & startedArg) {
    *(storage++) = '\0';
  }
  return numTokens;
}


x86 assembly (clang, -O0):
<tokenizeCommand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
movl   $0x1,-0x2c(%rbp)
movl   $0x2,-0x30(%rbp)
movl   $0x4,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
cmpl   $0x0,-0x14(%rbp)
jle    1169 <tokenizeCommand+0x49>
jmp    117a <tokenizeCommand+0x5a>
lea    0xe90(%rip),%rdi
mov    $0x20,%esi
call   1040 <__assert@plt>
jmp    117f <tokenizeCommand+0x5f>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    %al,-0x3d(%rbp)
movsbl %al,%eax
cmp    $0x0,%eax
je     1379 <tokenizeCommand+0x259>
mov    -0x38(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1203 <tokenizeCommand+0xe3>
movsbl -0x3d(%rbp),%eax
mov    %eax,-0x44(%rbp)
sub    $0x6e,%eax
je     11dd <tokenizeCommand+0xbd>
jmp    11c3 <tokenizeCommand+0xa3>
mov    -0x44(%rbp),%eax
sub    $0x74,%eax
jne    11e1 <tokenizeCommand+0xc1>
jmp    11d4 <tokenizeCommand+0xb4>
movb   $0x9,-0x3d(%rbp)
jmp    11e1 <tokenizeCommand+0xc1>
movb   $0xa,-0x3d(%rbp)
mov    -0x3d(%rbp),%cl
mov    -0x28(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x28(%rbp)
mov    %cl,(%rax)
mov    -0x38(%rbp),%eax
and    $0xfffffffe,%eax
mov    %eax,-0x38(%rbp)
jmp    1374 <tokenizeCommand+0x254>
mov    -0x38(%rbp),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     126d <tokenizeCommand+0x14d>
movsbl -0x3d(%rbp),%eax
mov    %eax,-0x48(%rbp)
sub    $0x22,%eax
je     1246 <tokenizeCommand+0x126>
jmp    1227 <tokenizeCommand+0x107>
mov    -0x48(%rbp),%eax
sub    $0x5c,%eax
jne    1254 <tokenizeCommand+0x134>
jmp    1238 <tokenizeCommand+0x118>
mov    -0x38(%rbp),%eax
or     $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1268 <tokenizeCommand+0x148>
mov    -0x38(%rbp),%eax
and    $0xfffffffd,%eax
mov    %eax,-0x38(%rbp)
jmp    1268 <tokenizeCommand+0x148>
mov    -0x3d(%rbp),%cl
mov    -0x28(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x28(%rbp)
mov    %cl,(%rax)
jmp    136f <tokenizeCommand+0x24f>
movsbl -0x3d(%rbp),%eax
mov    %eax,-0x4c(%rbp)
add    $0xfffffff7,%eax
sub    $0x2,%eax
jb     1296 <tokenizeCommand+0x176>
jmp    1285 <tokenizeCommand+0x165>
mov    -0x4c(%rbp),%eax
sub    $0x20,%eax
jne    12c5 <tokenizeCommand+0x1a5>
jmp    1296 <tokenizeCommand+0x176>
mov    -0x38(%rbp),%eax
and    $0x4,%eax
cmp    $0x0,%eax
je     12c0 <tokenizeCommand+0x1a0>
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movb   $0x0,(%rax)
mov    -0x38(%rbp),%eax
and    $0xfffffffb,%eax
mov    %eax,-0x38(%rbp)
jmp    136a <tokenizeCommand+0x24a>
mov    -0x38(%rbp),%eax
and    $0x4,%eax
cmp    $0x0,%eax
jne    130f <tokenizeCommand+0x1ef>
mov    -0x3c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jne    12ec <tokenizeCommand+0x1cc>
movl   $0xffffffff,-0x4(%rbp)
jmp    13ee <tokenizeCommand+0x2ce>
mov    -0x28(%rbp),%rdx
mov    -0x20(%rbp),%rax
mov    -0x3c(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x3c(%rbp)
movslq %ecx,%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
or     $0x4,%eax
mov    %eax,-0x38(%rbp)
movsbl -0x3d(%rbp),%eax
mov    %eax,-0x50(%rbp)
sub    $0x22,%eax
je     1343 <tokenizeCommand+0x223>
jmp    1324 <tokenizeCommand+0x204>
mov    -0x50(%rbp),%eax
sub    $0x5c,%eax
jne    1351 <tokenizeCommand+0x231>
jmp    1335 <tokenizeCommand+0x215>
mov    -0x38(%rbp),%eax
or     $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1365 <tokenizeCommand+0x245>
mov    -0x38(%rbp),%eax
or     $0x2,%eax
mov    %eax,-0x38(%rbp)
jmp    1365 <tokenizeCommand+0x245>
mov    -0x3d(%rbp),%cl
mov    -0x28(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x28(%rbp)
mov    %cl,(%rax)
jmp    136a <tokenizeCommand+0x24a>
jmp    136f <tokenizeCommand+0x24f>
jmp    1374 <tokenizeCommand+0x254>
jmp    117f <tokenizeCommand+0x5f>
mov    -0x38(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     13a0 <tokenizeCommand+0x280>
lea    0xd02(%rip),%rdi
call   1030 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    13ee <tokenizeCommand+0x2ce>
mov    -0x38(%rbp),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     13c7 <tokenizeCommand+0x2a7>
lea    0xce9(%rip),%rdi
call   1030 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    13ee <tokenizeCommand+0x2ce>
mov    -0x38(%rbp),%eax
and    $0x4,%eax
cmp    $0x0,%eax
je     13e8 <tokenizeCommand+0x2c8>
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movb   $0x0,(%rax)
mov    -0x3c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tokenizeCommand>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rcx,%rbx
mov    %rdx,%r14
mov    %esi,%r15d
mov    %rdi,%rbp
test   %esi,%esi
jg     1148 <tokenizeCommand+0x28>
lea    0xec2(%rip),%rdi
mov    $0x20,%esi
call   1040 <__assert@plt>
mov    0x0(%rbp),%dl
test   %dl,%dl
je     121c <tokenizeCommand+0xfc>
add    $0x1,%rbp
xor    %eax,%eax
movabs $0x100000600,%r8
xor    %ecx,%ecx
jmp    1182 <tokenizeCommand+0x62>
mov    $0xa,%dl
mov    %dl,(%rbx)
add    $0x1,%rbx
and    $0xfffffffe,%ecx
movzbl 0x0(%rbp),%edx
add    $0x1,%rbp
test   %dl,%dl
je     1208 <tokenizeCommand+0xe8>
movsbl %dl,%edi
test   $0x1,%cl
jne    11b0 <tokenizeCommand+0x90>
test   $0x2,%cl
jne    11c0 <tokenizeCommand+0xa0>
cmp    $0x20,%edi
ja     11d4 <tokenizeCommand+0xb4>
mov    %edi,%esi
bt     %rsi,%r8
jae    11d4 <tokenizeCommand+0xb4>
test   $0x4,%cl
je     1172 <tokenizeCommand+0x52>
movb   $0x0,(%rbx)
add    $0x1,%rbx
and    $0xfffffffb,%ecx
jmp    1172 <tokenizeCommand+0x52>
nopl   (%rax)
cmp    $0x6e,%edi
je     1167 <tokenizeCommand+0x47>
cmp    $0x74,%edi
jne    1169 <tokenizeCommand+0x49>
mov    $0x9,%dl
jmp    1169 <tokenizeCommand+0x49>
xchg   %ax,%ax
cmp    $0x22,%edi
je     11cf <tokenizeCommand+0xaf>
cmp    $0x5c,%edi
jne    11f5 <tokenizeCommand+0xd5>
or     $0x1,%ecx
jmp    1172 <tokenizeCommand+0x52>
and    $0xfffffffd,%ecx
jmp    1172 <tokenizeCommand+0x52>
test   $0x4,%cl
jne    11eb <tokenizeCommand+0xcb>
cmp    %r15d,%eax
je     1235 <tokenizeCommand+0x115>
movslq %eax,%rsi
add    $0x1,%eax
mov    %rbx,(%r14,%rsi,8)
or     $0x4,%ecx
cmp    $0x22,%edi
je     1200 <tokenizeCommand+0xe0>
cmp    $0x5c,%edi
je     11ca <tokenizeCommand+0xaa>
mov    %dl,(%rbx)
add    $0x1,%rbx
jmp    1172 <tokenizeCommand+0x52>
or     $0x2,%ecx
jmp    1172 <tokenizeCommand+0x52>
test   $0x1,%cl
jne    1220 <tokenizeCommand+0x100>
test   $0x2,%cl
jne    1229 <tokenizeCommand+0x109>
test   $0x4,%cl
je     123a <tokenizeCommand+0x11a>
movb   $0x0,(%rbx)
jmp    123a <tokenizeCommand+0x11a>
xor    %eax,%eax
jmp    123a <tokenizeCommand+0x11a>
lea    0xe77(%rip),%rdi
jmp    1230 <tokenizeCommand+0x110>
lea    0xe61(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [145 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/ElvisLouis/code/refs/heads/master/bin/nachos/test/sh.c\00"
@.str.1 = [14 x i8] c"Unmatched \\.\0A\00"
@.str.2 = [14 x i8] c"Unmatched \22.\0A\00"
define i32 @tokenizeCommand(i8* %0, i32 %1, i8** %2, i8* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8**
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i8
store i8* %0, i8** %6
store i32 %1, i32* %7
store i8** %2, i8*** %8
store i8* %3, i8** %9
store i32 1, i32* %10
store i32 2, i32* %11
store i32 4, i32* %12
store i32 0, i32* %13
store i32 0, i32* %14
%16 = load i32, i32* %7
%17 = icmp sgt i32 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %4
br label %20
19: ; preds = %4
br label %20
20: ; preds = %19, %18
br label %21
21: ; preds = %107, %20
%22 = load i8*, i8** %6
%23 = getelementptr inbounds i8, i8* %22, i32 1
store i8* %23, i8** %6
%24 = load i8, i8* %22
store i8 %24, i8* %15
%25 = sext i8 %24 to i32
%26 = icmp ne i32 %25, 0
br i1 %26, label %27, label %108
27: ; preds = %21
%28 = load i32, i32* %13
%29 = and i32 %28, 1
%30 = icmp ne i32 %29, 0
br i1 %30, label %31, label %42
31: ; preds = %27
%32 = load i8, i8* %15
%33 = sext i8 %32 to i32
switch i32 %33, label %36 [
i32 116, label %34
i32 110, label %35
]
34: ; preds = %31
store i8 9, i8* %15
br label %36
35: ; preds = %31
store i8 10, i8* %15
br label %36
36: ; preds = %31, %35, %34
%37 = load i8, i8* %15
%38 = load i8*, i8** %9
%39 = getelementptr inbounds i8, i8* %38, i32 1
store i8* %39, i8** %9
store i8 %37, i8* %38
%40 = load i32, i32* %13
%41 = and i32 %40, -2
store i32 %41, i32* %13
br label %107
42: ; preds = %27
%43 = load i32, i32* %13
%44 = and i32 %43, 2
%45 = icmp ne i32 %44, 0
br i1 %45, label %46, label %60
46: ; preds = %42
%47 = load i8, i8* %15
%48 = sext i8 %47 to i32
switch i32 %48, label %55 [
i32 92, label %49
i32 34, label %52
]
49: ; preds = %46
%50 = load i32, i32* %13
%51 = or i32 %50, 1
store i32 %51, i32* %13
br label %59
52: ; preds = %46
%53 = load i32, i32* %13
%54 = and i32 %53, -3
store i32 %54, i32* %13
br label %59
55: ; preds = %46
%56 = load i8, i8* %15
%57 = load i8*, i8** %9
%58 = getelementptr inbounds i8, i8* %57, i32 1
store i8* %58, i8** %9
store i8 %56, i8* %57
br label %59
59: ; preds = %55, %52, %49
br label %106
60: ; preds = %42
%61 = load i8, i8* %15
%62 = sext i8 %61 to i32
switch i32 %62, label %73 [
i32 32, label %63
i32 9, label %63
i32 10, label %63
]
63: ; preds = %60, %60, %60
%64 = load i32, i32* %13
%65 = and i32 %64, 4
%66 = icmp ne i32 %65, 0
br i1 %66, label %67, label %72
67: ; preds = %63
%68 = load i8*, i8** %9
%69 = getelementptr inbounds i8, i8* %68, i32 1
store i8* %69, i8** %9
store i8 0, i8* %68
%70 = load i32, i32* %13
%71 = and i32 %70, -5
store i32 %71, i32* %13
br label %72
72: ; preds = %67, %63
br label %105
73: ; preds = %60
%74 = load i32, i32* %13
%75 = and i32 %74, 4
%76 = icmp ne i32 %75, 0
br i1 %76, label %91, label %77
77: ; preds = %73
%78 = load i32, i32* %14
%79 = load i32, i32* %7
%80 = icmp eq i32 %78, %79
br i1 %80, label %81, label %82
81: ; preds = %77
store i32 -1, i32* %5
br label %129
82: ; preds = %77
%83 = load i8*, i8** %9
%84 = load i8**, i8*** %8
%85 = load i32, i32* %14
%86 = add nsw i32 %85, 1
store i32 %86, i32* %14
%87 = sext i32 %85 to i64
%88 = getelementptr inbounds i8*, i8** %84, i64 %87
store i8* %83, i8** %88
%89 = load i32, i32* %13
%90 = or i32 %89, 4
store i32 %90, i32* %13
br label %91
91: ; preds = %82, %73
%92 = load i8, i8* %15
%93 = sext i8 %92 to i32
switch i32 %93, label %100 [
i32 92, label %94
i32 34, label %97
]
94: ; preds = %91
%95 = load i32, i32* %13
%96 = or i32 %95, 1
store i32 %96, i32* %13
br label %104
97: ; preds = %91
%98 = load i32, i32* %13
%99 = or i32 %98, 2
store i32 %99, i32* %13
br label %104
100: ; preds = %91
%101 = load i8, i8* %15
%102 = load i8*, i8** %9
%103 = getelementptr inbounds i8, i8* %102, i32 1
store i8* %103, i8** %9
store i8 %101, i8* %102
br label %104
104: ; preds = %100, %97, %94
br label %105
105: ; preds = %104, %72
br label %106
106: ; preds = %105, %59
br label %107
107: ; preds = %106, %36
br label %21
108: ; preds = %21
%109 = load i32, i32* %13
%110 = and i32 %109, 1
%111 = icmp ne i32 %110, 0
br i1 %111, label %112, label %114
112: ; preds = %108
%113 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %5
br label %129
114: ; preds = %108
%115 = load i32, i32* %13
%116 = and i32 %115, 2
%117 = icmp ne i32 %116, 0
br i1 %117, label %118, label %120
118: ; preds = %114
%119 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
store i32 -1, i32* %5
br label %129
120: ; preds = %114
%121 = load i32, i32* %13
%122 = and i32 %121, 4
%123 = icmp ne i32 %122, 0
br i1 %123, label %124, label %127
124: ; preds = %120
%125 = load i8*, i8** %9
%126 = getelementptr inbounds i8, i8* %125, i32 1
store i8* %126, i8** %9
store i8 0, i8* %125
br label %127
127: ; preds = %124, %120
%128 = load i32, i32* %14
store i32 %128, i32* %5
br label %129
129: ; preds = %127, %118, %112, %81
%130 = load i32, i32* %5
ret i32 %130
}

LLVM IR (-O2):
@.str = [145 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/ElvisLouis/code/refs/heads/master/bin/nachos/test/sh.c\00"
@str = [13 x i8] c"Unmatched \22.\00"
@str.3 = [13 x i8] c"Unmatched \\.\00"
define i32 @tokenizeCommand(i8* nocapture %0, i32 %1, i8** nocapture writeonly %2, i8* %3) {
%5 = icmp sgt i32 %1, 0
br i1 %5, label %7, label %6
6: ; preds = %4
tail call void @__assert(i8* getelementptr inbounds ([145 x i8], [145 x i8]* @.str, i64 0, i64 0), i32 32)
br label %7
7: ; preds = %4, %6
%8 = load i8, i8* %0
%9 = icmp eq i8 %8, 0
br i1 %9, label %83, label %10
10: ; preds = %7, %63
%11 = phi i8 [ %67, %63 ], [ %8, %7 ]
%12 = phi i8* [ %16, %63 ], [ %0, %7 ]
%13 = phi i32 [ %66, %63 ], [ 0, %7 ]
%14 = phi i32 [ %65, %63 ], [ 0, %7 ]
%15 = phi i8* [ %64, %63 ], [ %3, %7 ]
%16 = getelementptr inbounds i8, i8* %12, i64 1
%17 = sext i8 %11 to i32
%18 = and i32 %14, 1
%19 = icmp eq i32 %18, 0
br i1 %19, label %27, label %20
20: ; preds = %10
switch i32 %17, label %23 [
i32 116, label %21
i32 110, label %22
]
21: ; preds = %20
br label %23
22: ; preds = %20
br label %23
23: ; preds = %20, %22, %21
%24 = phi i8 [ %11, %20 ], [ 10, %22 ], [ 9, %21 ]
%25 = getelementptr inbounds i8, i8* %15, i64 1
store i8 %24, i8* %15
%26 = and i32 %14, -2
br label %63
27: ; preds = %10
%28 = and i32 %14, 2
%29 = icmp eq i32 %28, 0
br i1 %29, label %37, label %30
30: ; preds = %27
switch i32 %17, label %35 [
i32 92, label %31
i32 34, label %33
]
31: ; preds = %30
%32 = or i32 %14, 1
br label %63
33: ; preds = %30
%34 = and i32 %14, -3
br label %63
35: ; preds = %30
%36 = getelementptr inbounds i8, i8* %15, i64 1
store i8 %11, i8* %15
br label %63
37: ; preds = %27
switch i32 %17, label %44 [
i32 32, label %38
i32 9, label %38
i32 10, label %38
]
38: ; preds = %37, %37, %37
%39 = and i32 %14, 4
%40 = icmp eq i32 %39, 0
br i1 %40, label %63, label %41
41: ; preds = %38
%42 = getelementptr inbounds i8, i8* %15, i64 1
store i8 0, i8* %15
%43 = and i32 %14, -5
br label %63
44: ; preds = %37
%45 = and i32 %14, 4
%46 = icmp eq i32 %45, 0
br i1 %46, label %47, label %54
47: ; preds = %44
%48 = icmp eq i32 %13, %1
br i1 %48, label %83, label %49
49: ; preds = %47
%50 = add nsw i32 %13, 1
%51 = sext i32 %13 to i64
%52 = getelementptr inbounds i8*, i8** %2, i64 %51
store i8* %15, i8** %52
%53 = or i32 %14, 4
br label %54
54: ; preds = %49, %44
%55 = phi i32 [ %14, %44 ], [ %53, %49 ]
%56 = phi i32 [ %13, %44 ], [ %50, %49 ]
switch i32 %17, label %61 [
i32 92, label %57
i32 34, label %59
]
57: ; preds = %54
%58 = or i32 %55, 1
br label %63
59: ; preds = %54
%60 = or i32 %55, 2
br label %63
61: ; preds = %54
%62 = getelementptr inbounds i8, i8* %15, i64 1
store i8 %11, i8* %15
br label %63
63: ; preds = %35, %33, %31, %57, %59, %61, %38, %41, %23
%64 = phi i8* [ %25, %23 ], [ %36, %35 ], [ %15, %33 ], [ %15, %31 ], [ %62, %61 ], [ %15, %59 ], [ %15, %57 ], [ %42, %41 ], [ %15, %38 ]
%65 = phi i32 [ %26, %23 ], [ %14, %35 ], [ %34, %33 ], [ %32, %31 ], [ %55, %61 ], [ %60, %59 ], [ %58, %57 ], [ %43, %41 ], [ %14, %38 ]
%66 = phi i32 [ %13, %23 ], [ %13, %35 ], [ %13, %33 ], [ %13, %31 ], [ %56, %61 ], [ %56, %59 ], [ %56, %57 ], [ %13, %41 ], [ %13, %38 ]
%67 = load i8, i8* %16
%68 = icmp eq i8 %67, 0
br i1 %68, label %69, label %10
69: ; preds = %63
%70 = and i32 %65, 1
%71 = icmp eq i32 %70, 0
br i1 %71, label %74, label %72
72: ; preds = %69
%73 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.3, i64 0, i64 0))
br label %83
74: ; preds = %69
%75 = and i32 %65, 2
%76 = icmp eq i32 %75, 0
br i1 %76, label %79, label %77
77: ; preds = %74
%78 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
br label %83
79: ; preds = %74
%80 = and i32 %65, 4
%81 = icmp eq i32 %80, 0
br i1 %81, label %83, label %82
82: ; preds = %79
store i8 0, i8* %64
br label %83
83: ; preds = %47, %7, %79, %82, %77, %72
%84 = phi i32 [ -1, %72 ], [ -1, %77 ], [ %66, %82 ], [ %66, %79 ], [ 0, %7 ], [ -1, %47 ]
ret i32 %84
}