#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 scalar_t__ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int PATH_MAX;
int /*<<< orphan*/ close(int);
int open(char const *, int /*<<< orphan*/);
scalar_t__ read(int, char *, int);
char *strdup(char *);
char *compute_smack_mount_point(const char *mountfile) {
  int file, state, pos;
  ssize_t readen;
  char buffer[16384], *iter, *end, mount[PATH_MAX];
  file = open(mountfile, O_RDONLY);
  if (file < 0)
    return NULL;
  pos = 0;
  state = 0;
  for (;;) {
    readen = read(file, buffer, sizeof buffer);
    if (readen <= 0) {
      close(file);
      return NULL;
    }
    for (iter = buffer, end = buffer + readen; iter != end; iter++) {
      switch (state) {
      case 0:
        state = (*iter == 's') ? 2 : 1;
        break;
      case 1:
        if (*iter == '\n')
          state = 0;
        break;
      case 2:
        state = (*iter == 'm') ? 3 : 1;
        break;
      case 3:
        state = (*iter == 'a') ? 4 : 1;
        break;
      case 4:
        state = (*iter == 'c') ? 5 : 1;
        break;
      case 5:
        state = (*iter == 'k') ? 6 : 1;
        break;
      case 6:
        state = (*iter == 'f') ? 7 : 1;
        break;
      case 7:
        state = (*iter == 's') ? 8 : 1;
        break;
      case 8:
        state = (*iter == ' ') ? 9 : 1;
        break;
      case 9:
        if (*iter == ' ')
          break;
        else
          state = 10;
      case 10:
        if (pos >= sizeof mount) {
          close(file);
          return NULL;
        }
        if (*iter == ' ' || *iter == '\n') {
          mount[pos] = 0;
          close(file);
          return strdup(mount);
        }
        mount[pos++] = *iter;
        break;
      }
    }
  }
}


x86 assembly (clang, -O0):
<compute_smack_mount_point>:
push   %rbp
mov    %rsp,%rbp
sub    $0x4070,%rsp
mov    %rdi,-0x10(%rbp)
mov    0x2e9a(%rip),%rax
mov    (%rax),%eax
mov    %rax,-0x4068(%rbp)
mov    %rsp,%rcx
mov    %rcx,-0x4048(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x4060(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x4050(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2e4a(%rip),%rax
mov    (%rax),%esi
call   1050 <open@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    11c1 <compute_smack_mount_point+0x81>
movq   $0x0,-0x8(%rbp)
movl   $0x1,-0x4054(%rbp)
jmp    1494 <compute_smack_mount_point+0x354>
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x14(%rbp),%edi
lea    -0x4030(%rbp),%rsi
mov    $0x4000,%edx
call   1040 <read@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jg     1211 <compute_smack_mount_point+0xd1>
mov    -0x14(%rbp),%edi
call   1030 <close@plt>
movq   $0x0,-0x8(%rbp)
movl   $0x1,-0x4054(%rbp)
jmp    1494 <compute_smack_mount_point+0x354>
lea    -0x4030(%rbp),%rax
mov    %rax,-0x4038(%rbp)
lea    -0x4030(%rbp),%rax
add    -0x28(%rbp),%rax
mov    %rax,-0x4040(%rbp)
mov    -0x4038(%rbp),%rax
cmp    -0x4040(%rbp),%rax
je     148f <compute_smack_mount_point+0x34f>
mov    -0x18(%rbp),%eax
mov    %rax,-0x4070(%rbp)
sub    $0xa,%rax
ja     1473 <compute_smack_mount_point+0x333>
mov    -0x4070(%rbp),%rax
lea    0xd99(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x4038(%rbp),%rax
movsbl (%rax),%edx
mov    $0x1,%eax
mov    $0x2,%ecx
cmp    $0x73,%edx
cmove  %ecx,%eax
mov    %eax,-0x18(%rbp)
jmp    1473 <compute_smack_mount_point+0x333>
mov    -0x4038(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
jne    12ac <compute_smack_mount_point+0x16c>
movl   $0x0,-0x18(%rbp)
jmp    1473 <compute_smack_mount_point+0x333>
mov    -0x4038(%rbp),%rax
movsbl (%rax),%edx
mov    $0x1,%eax
mov    $0x3,%ecx
cmp    $0x6d,%edx
cmove  %ecx,%eax
mov    %eax,-0x18(%rbp)
jmp    1473 <compute_smack_mount_point+0x333>
mov    -0x4038(%rbp),%rax
movsbl (%rax),%edx
mov    $0x1,%eax
mov    $0x4,%ecx
cmp    $0x61,%edx
cmove  %ecx,%eax
mov    %eax,-0x18(%rbp)
jmp    1473 <compute_smack_mount_point+0x333>
mov    -0x4038(%rbp),%rax
movsbl (%rax),%edx
mov    $0x1,%eax
mov    $0x5,%ecx
cmp    $0x63,%edx
cmove  %ecx,%eax
mov    %eax,-0x18(%rbp)
jmp    1473 <compute_smack_mount_point+0x333>
mov    -0x4038(%rbp),%rax
movsbl (%rax),%edx
mov    $0x1,%eax
mov    $0x6,%ecx
cmp    $0x6b,%edx
cmove  %ecx,%eax
mov    %eax,-0x18(%rbp)
jmp    1473 <compute_smack_mount_point+0x333>
mov    -0x4038(%rbp),%rax
movsbl (%rax),%edx
mov    $0x1,%eax
mov    $0x7,%ecx
cmp    $0x66,%edx
cmove  %ecx,%eax
mov    %eax,-0x18(%rbp)
jmp    1473 <compute_smack_mount_point+0x333>
mov    -0x4038(%rbp),%rax
movsbl (%rax),%edx
mov    $0x1,%eax
mov    $0x8,%ecx
cmp    $0x73,%edx
cmove  %ecx,%eax
mov    %eax,-0x18(%rbp)
jmp    1473 <compute_smack_mount_point+0x333>
mov    -0x4038(%rbp),%rax
movsbl (%rax),%edx
mov    $0x1,%eax
mov    $0x9,%ecx
cmp    $0x20,%edx
cmove  %ecx,%eax
mov    %eax,-0x18(%rbp)
jmp    1473 <compute_smack_mount_point+0x333>
mov    -0x4038(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jne    13b7 <compute_smack_mount_point+0x277>
jmp    1473 <compute_smack_mount_point+0x333>
movl   $0xa,-0x18(%rbp)
jmp    13c3 <compute_smack_mount_point+0x283>
mov    -0x4068(%rbp),%rcx
movslq -0x1c(%rbp),%rax
cmp    %rcx,%rax
jb     13f6 <compute_smack_mount_point+0x2b6>
mov    -0x14(%rbp),%edi
call   1030 <close@plt>
movq   $0x0,-0x8(%rbp)
movl   $0x1,-0x4054(%rbp)
jmp    1494 <compute_smack_mount_point+0x354>
mov    -0x4038(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
je     141c <compute_smack_mount_point+0x2dc>
mov    -0x4038(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
jne    1452 <compute_smack_mount_point+0x312>
mov    -0x4060(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x14(%rbp),%edi
call   1030 <close@plt>
mov    -0x4060(%rbp),%rdi
call   1060 <strdup@plt>
mov    %rax,-0x8(%rbp)
movl   $0x1,-0x4054(%rbp)
jmp    1494 <compute_smack_mount_point+0x354>
mov    -0x4060(%rbp),%rax
mov    -0x4038(%rbp),%rcx
mov    (%rcx),%dl
mov    -0x1c(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x1c(%rbp)
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
jmp    1478 <compute_smack_mount_point+0x338>
mov    -0x4038(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x4038(%rbp)
jmp    1231 <compute_smack_mount_point+0xf1>
jmp    11cf <compute_smack_mount_point+0x8f>
mov    -0x4048(%rbp),%rax
mov    %rax,%rsp
mov    -0x8(%rbp),%rax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compute_smack_mount_point>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x4018,%rsp
mov    %rsp,%rbx
mov    0x2e92(%rip),%rax
mov    (%rax),%eax
mov    %rsp,%r13
mov    %rax,-0x40(%rbp)
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r13
mov    %r13,%rsp
mov    0x2e64(%rip),%rax
mov    (%rax),%esi
call   1050 <open@plt>
test   %eax,%eax
js     1333 <compute_smack_mount_point+0x1f3>
mov    %rbx,-0x38(%rbp)
lea    -0x4040(%rbp),%rsi
mov    %eax,-0x2c(%rbp)
mov    %eax,%edi
mov    $0x4000,%edx
call   1040 <read@plt>
test   %rax,%rax
jle    1337 <compute_smack_mount_point+0x1f7>
xor    %r14d,%r14d
lea    0xe48(%rip),%r15
mov    $0x7,%r8d
mov    $0x8,%r9d
xor    %r12d,%r12d
jmp    11f6 <compute_smack_mount_point+0xb6>
nopl   0x0(%rax)
lea    -0x4040(%rbp),%rsi
mov    $0x4000,%edx
call   1040 <read@plt>
mov    $0x8,%r9d
mov    $0x7,%r8d
test   %rax,%rax
jle    1337 <compute_smack_mount_point+0x1f7>
xor    %ecx,%ecx
mov    -0x40(%rbp),%rsi
mov    -0x2c(%rbp),%edi
jmp    1229 <compute_smack_mount_point+0xe9>
xor    %edx,%edx
cmpb   $0x20,-0x4040(%rbp,%rcx,1)
20
sete   %dl
lea    0x1(,%rdx,8),%r14d
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%rcx
cmp    %rcx,%rax
je     11d0 <compute_smack_mount_point+0x90>
cmp    $0xa,%r14d
ja     1220 <compute_smack_mount_point+0xe0>
mov    %r14d,%edx
movslq (%r15,%rdx,4),%rdx
add    %r15,%rdx
jmp    *%rdx
xor    %r14d,%r14d
cmpb   $0x73,-0x4040(%rbp,%rcx,1)
73
sete   %r14b
add    $0x1,%r14d
jmp    1220 <compute_smack_mount_point+0xe0>
xor    %r14d,%r14d
cmpb   $0xa,-0x4040(%rbp,%rcx,1)
0a
setne  %r14b
jmp    1220 <compute_smack_mount_point+0xe0>
xor    %edx,%edx
cmpb   $0x6d,-0x4040(%rbp,%rcx,1)
6d
sete   %dl
lea    (%rdx,%rdx,1),%r14d
add    $0x1,%r14d
jmp    1220 <compute_smack_mount_point+0xe0>
xor    %edx,%edx
cmpb   $0x61,-0x4040(%rbp,%rcx,1)
61
sete   %dl
lea    (%rdx,%rdx,2),%r14d
add    $0x1,%r14d
jmp    1220 <compute_smack_mount_point+0xe0>
xor    %edx,%edx
cmpb   $0x63,-0x4040(%rbp,%rcx,1)
63
sete   %dl
lea    0x1(,%rdx,4),%r14d
jmp    1220 <compute_smack_mount_point+0xe0>
xor    %edx,%edx
cmpb   $0x6b,-0x4040(%rbp,%rcx,1)
6b
sete   %dl
lea    (%rdx,%rdx,4),%r14d
add    $0x1,%r14d
jmp    1220 <compute_smack_mount_point+0xe0>
cmpb   $0x66,-0x4040(%rbp,%rcx,1)
66
mov    $0x1,%r14d
cmove  %r8d,%r14d
jmp    1220 <compute_smack_mount_point+0xe0>
cmpb   $0x73,-0x4040(%rbp,%rcx,1)
73
mov    $0x1,%r14d
cmove  %r9d,%r14d
jmp    1220 <compute_smack_mount_point+0xe0>
mov    $0x9,%r14d
cmpb   $0x20,-0x4040(%rbp,%rcx,1)
20
je     1220 <compute_smack_mount_point+0xe0>
movslq %r12d,%rdx
cmp    %rsi,%rdx
jae    133a <compute_smack_mount_point+0x1fa>
movzbl -0x4040(%rbp,%rcx,1),%ebx
ff
cmp    $0x20,%bl
je     1343 <compute_smack_mount_point+0x203>
cmp    $0xa,%bl
je     1343 <compute_smack_mount_point+0x203>
lea    0x1(%rdx),%r12d
mov    %bl,0x0(%r13,%rdx,1)
mov    $0xa,%r14d
jmp    1220 <compute_smack_mount_point+0xe0>
xor    %eax,%eax
jmp    135a <compute_smack_mount_point+0x21a>
mov    -0x2c(%rbp),%edi
call   1030 <close@plt>
xor    %eax,%eax
jmp    1356 <compute_smack_mount_point+0x216>
movb   $0x0,0x0(%r13,%rdx,1)
call   1030 <close@plt>
mov    %r13,%rdi
call   1060 <strdup@plt>
mov    -0x38(%rbp),%rbx
mov    %rbx,%rsp
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@PATH_MAX = global i32 0
@O_RDONLY = global i32 0
define i8* @compute_smack_mount_point(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i64
%8 = alloca [16384 x i8]
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i64
%13 = alloca i32
store i8* %0, i8** %3
%14 = load i32, i32* @PATH_MAX
%15 = zext i32 %14 to i64
%16 = call i8* @llvm.stacksave()
store i8* %16, i8** %11
%17 = alloca i8, i64 %15
store i64 %15, i64* %12
%18 = load i8*, i8** %3
%19 = load i32, i32* @O_RDONLY
%20 = call i32 @open(i8* %18, i32 %19)
store i32 %20, i32* %4
%21 = load i32, i32* %4
%22 = icmp slt i32 %21, 0
br i1 %22, label %23, label %24
23: ; preds = %1
store i8* null, i8** %2
store i32 1, i32* %13
br label %152
24: ; preds = %1
store i32 0, i32* %6
store i32 0, i32* %5
br label %25
25: ; preds = %151, %24
%26 = load i32, i32* %4
%27 = getelementptr inbounds [16384 x i8], [16384 x i8]* %8, i64 0, i64 0
%28 = call i64 @read(i32 %26, i8* %27, i32 16384)
store i64 %28, i64* %7
%29 = load i64, i64* %7
%30 = icmp sle i64 %29, 0
br i1 %30, label %31, label %34
31: ; preds = %25
%32 = load i32, i32* %4
%33 = call i32 @close(i32 %32)
store i8* null, i8** %2
store i32 1, i32* %13
br label %152
34: ; preds = %25
%35 = getelementptr inbounds [16384 x i8], [16384 x i8]* %8, i64 0, i64 0
store i8* %35, i8** %9
%36 = getelementptr inbounds [16384 x i8], [16384 x i8]* %8, i64 0, i64 0
%37 = load i64, i64* %7
%38 = getelementptr inbounds i8, i8* %36, i64 %37
store i8* %38, i8** %10
br label %39
39: ; preds = %148, %34
%40 = load i8*, i8** %9
%41 = load i8*, i8** %10
%42 = icmp ne i8* %40, %41
br i1 %42, label %43, label %151
43: ; preds = %39
%44 = load i32, i32* %5
switch i32 %44, label %147 [
i32 0, label %45
i32 1, label %52
i32 2, label %59
i32 3, label %66
i32 4, label %73
i32 5, label %80
i32 6, label %87
i32 7, label %94
i32 8, label %101
i32 9, label %108
i32 10, label %116
]
45: ; preds = %43
%46 = load i8*, i8** %9
%47 = load i8, i8* %46
%48 = sext i8 %47 to i32
%49 = icmp eq i32 %48, 115
%50 = zext i1 %49 to i64
%51 = select i1 %49, i32 2, i32 1
store i32 %51, i32* %5
br label %147
52: ; preds = %43
%53 = load i8*, i8** %9
%54 = load i8, i8* %53
%55 = sext i8 %54 to i32
%56 = icmp eq i32 %55, 10
br i1 %56, label %57, label %58
57: ; preds = %52
store i32 0, i32* %5
br label %58
58: ; preds = %57, %52
br label %147
59: ; preds = %43
%60 = load i8*, i8** %9
%61 = load i8, i8* %60
%62 = sext i8 %61 to i32
%63 = icmp eq i32 %62, 109
%64 = zext i1 %63 to i64
%65 = select i1 %63, i32 3, i32 1
store i32 %65, i32* %5
br label %147
66: ; preds = %43
%67 = load i8*, i8** %9
%68 = load i8, i8* %67
%69 = sext i8 %68 to i32
%70 = icmp eq i32 %69, 97
%71 = zext i1 %70 to i64
%72 = select i1 %70, i32 4, i32 1
store i32 %72, i32* %5
br label %147
73: ; preds = %43
%74 = load i8*, i8** %9
%75 = load i8, i8* %74
%76 = sext i8 %75 to i32
%77 = icmp eq i32 %76, 99
%78 = zext i1 %77 to i64
%79 = select i1 %77, i32 5, i32 1
store i32 %79, i32* %5
br label %147
80: ; preds = %43
%81 = load i8*, i8** %9
%82 = load i8, i8* %81
%83 = sext i8 %82 to i32
%84 = icmp eq i32 %83, 107
%85 = zext i1 %84 to i64
%86 = select i1 %84, i32 6, i32 1
store i32 %86, i32* %5
br label %147
87: ; preds = %43
%88 = load i8*, i8** %9
%89 = load i8, i8* %88
%90 = sext i8 %89 to i32
%91 = icmp eq i32 %90, 102
%92 = zext i1 %91 to i64
%93 = select i1 %91, i32 7, i32 1
store i32 %93, i32* %5
br label %147
94: ; preds = %43
%95 = load i8*, i8** %9
%96 = load i8, i8* %95
%97 = sext i8 %96 to i32
%98 = icmp eq i32 %97, 115
%99 = zext i1 %98 to i64
%100 = select i1 %98, i32 8, i32 1
store i32 %100, i32* %5
br label %147
101: ; preds = %43
%102 = load i8*, i8** %9
%103 = load i8, i8* %102
%104 = sext i8 %103 to i32
%105 = icmp eq i32 %104, 32
%106 = zext i1 %105 to i64
%107 = select i1 %105, i32 9, i32 1
store i32 %107, i32* %5
br label %147
108: ; preds = %43
%109 = load i8*, i8** %9
%110 = load i8, i8* %109
%111 = sext i8 %110 to i32
%112 = icmp eq i32 %111, 32
br i1 %112, label %113, label %114
113: ; preds = %108
br label %147
114: ; preds = %108
store i32 10, i32* %5
br label %115
115: ; preds = %114
br label %116
116: ; preds = %43, %115
%117 = load i32, i32* %6
%118 = sext i32 %117 to i64
%119 = icmp uge i64 %118, %15
br i1 %119, label %120, label %123
120: ; preds = %116
%121 = load i32, i32* %4
%122 = call i32 @close(i32 %121)
store i8* null, i8** %2
store i32 1, i32* %13
br label %152
123: ; preds = %116
%124 = load i8*, i8** %9
%125 = load i8, i8* %124
%126 = sext i8 %125 to i32
%127 = icmp eq i32 %126, 32
br i1 %127, label %133, label %128
128: ; preds = %123
%129 = load i8*, i8** %9
%130 = load i8, i8* %129
%131 = sext i8 %130 to i32
%132 = icmp eq i32 %131, 10
br i1 %132, label %133, label %140
133: ; preds = %128, %123
%134 = load i32, i32* %6
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds i8, i8* %17, i64 %135
store i8 0, i8* %136
%137 = load i32, i32* %4
%138 = call i32 @close(i32 %137)
%139 = call i8* @strdup(i8* %17)
store i8* %139, i8** %2
store i32 1, i32* %13
br label %152
140: ; preds = %128
%141 = load i8*, i8** %9
%142 = load i8, i8* %141
%143 = load i32, i32* %6
%144 = add nsw i32 %143, 1
store i32 %144, i32* %6
%145 = sext i32 %143 to i64
%146 = getelementptr inbounds i8, i8* %17, i64 %145
store i8 %142, i8* %146
br label %147
147: ; preds = %43, %140, %113, %101, %94, %87, %80, %73, %66, %59, %58, %45
br label %148
148: ; preds = %147
%149 = load i8*, i8** %9
%150 = getelementptr inbounds i8, i8* %149, i32 1
store i8* %150, i8** %9
br label %39
151: ; preds = %39
br label %25
152: ; preds = %133, %120, %31, %23
%153 = load i8*, i8** %11
%154 = load i8*, i8** %2
ret i8* %154
}

LLVM IR (-O2):
@PATH_MAX = global i32 0
@O_RDONLY = global i32 0
define noalias i8* @compute_smack_mount_point(i8* nocapture %0) {
%2 = alloca [16384 x i8]
%3 = getelementptr inbounds [16384 x i8], [16384 x i8]* %2, i64 0, i64 0
%4 = load i32, i32* @PATH_MAX
%5 = zext i32 %4 to i64
%6 = tail call i8* @llvm.stacksave()
%7 = alloca i8, i64 %5
%8 = load i32, i32* @O_RDONLY
%9 = tail call i32 @open(i8* %0, i32 %8)
%10 = icmp slt i32 %9, 0
br i1 %10, label %86, label %11
11: ; preds = %1
%12 = call i64 @read(i32 %9, i8* %3, i32 16384)
%13 = icmp slt i64 %12, 1
br i1 %13, label %17, label %19
14: ; preds = %81
%15 = call i64 @read(i32 %9, i8* %3, i32 16384)
%16 = icmp slt i64 %15, 1
br i1 %16, label %17, label %19
17: ; preds = %14, %11
%18 = call i32 @close(i32 %9)
br label %86
19: ; preds = %11, %14
%20 = phi i64 [ %15, %14 ], [ %12, %11 ]
%21 = phi i32 [ %83, %14 ], [ 0, %11 ]
%22 = phi i32 [ %82, %14 ], [ 0, %11 ]
%23 = getelementptr inbounds [16384 x i8], [16384 x i8]* %2, i64 0, i64 %20
br label %24
24: ; preds = %19, %81
%25 = phi i32 [ %83, %81 ], [ %21, %19 ]
%26 = phi i32 [ %82, %81 ], [ %22, %19 ]
%27 = phi i8* [ %84, %81 ], [ %3, %19 ]
switch i32 %25, label %81 [
i32 0, label %28
i32 1, label %32
i32 2, label %36
i32 3, label %40
i32 4, label %44
i32 5, label %48
i32 6, label %52
i32 7, label %56
i32 8, label %60
i32 9, label %64
i32 10, label %67
]
28: ; preds = %24
%29 = load i8, i8* %27
%30 = icmp eq i8 %29, 115
%31 = select i1 %30, i32 2, i32 1
br label %81
32: ; preds = %24
%33 = load i8, i8* %27
%34 = icmp ne i8 %33, 10
%35 = zext i1 %34 to i32
br label %81
36: ; preds = %24
%37 = load i8, i8* %27
%38 = icmp eq i8 %37, 109
%39 = select i1 %38, i32 3, i32 1
br label %81
40: ; preds = %24
%41 = load i8, i8* %27
%42 = icmp eq i8 %41, 97
%43 = select i1 %42, i32 4, i32 1
br label %81
44: ; preds = %24
%45 = load i8, i8* %27
%46 = icmp eq i8 %45, 99
%47 = select i1 %46, i32 5, i32 1
br label %81
48: ; preds = %24
%49 = load i8, i8* %27
%50 = icmp eq i8 %49, 107
%51 = select i1 %50, i32 6, i32 1
br label %81
52: ; preds = %24
%53 = load i8, i8* %27
%54 = icmp eq i8 %53, 102
%55 = select i1 %54, i32 7, i32 1
br label %81
56: ; preds = %24
%57 = load i8, i8* %27
%58 = icmp eq i8 %57, 115
%59 = select i1 %58, i32 8, i32 1
br label %81
60: ; preds = %24
%61 = load i8, i8* %27
%62 = icmp eq i8 %61, 32
%63 = select i1 %62, i32 9, i32 1
br label %81
64: ; preds = %24
%65 = load i8, i8* %27
%66 = icmp eq i8 %65, 32
br i1 %66, label %81, label %67
67: ; preds = %64, %24
%68 = sext i32 %26 to i64
%69 = icmp ult i64 %68, %5
br i1 %69, label %72, label %70
70: ; preds = %67
%71 = call i32 @close(i32 %9)
br label %86
72: ; preds = %67
%73 = load i8, i8* %27
switch i8 %73, label %78 [
i8 32, label %74
i8 10, label %74
]
74: ; preds = %72, %72
%75 = getelementptr inbounds i8, i8* %7, i64 %68
store i8 0, i8* %75
%76 = call i32 @close(i32 %9)
%77 = call i8* @strdup(i8* %7)
br label %86
78: ; preds = %72
%79 = add nsw i32 %26, 1
%80 = getelementptr inbounds i8, i8* %7, i64 %68
store i8 %73, i8* %80
br label %81
81: ; preds = %32, %28, %36, %40, %44, %48, %52, %56, %60, %78, %24, %64
%82 = phi i32 [ %26, %24 ], [ %79, %78 ], [ %26, %64 ], [ %26, %60 ], [ %26, %56 ], [ %26, %52 ], [ %26, %48 ], [ %26, %44 ], [ %26, %40 ], [ %26, %36 ], [ %26, %28 ], [ %26, %32 ]
%83 = phi i32 [ %25, %24 ], [ 10, %78 ], [ 9, %64 ], [ %63, %60 ], [ %59, %56 ], [ %55, %52 ], [ %51, %48 ], [ %47, %44 ], [ %43, %40 ], [ %39, %36 ], [ %31, %28 ], [ %35, %32 ]
%84 = getelementptr inbounds i8, i8* %27, i64 1
%85 = icmp eq i8* %84, %23
br i1 %85, label %14, label %24
86: ; preds = %1, %74, %70, %17
%87 = phi i8* [ null, %17 ], [ null, %70 ], [ %77, %74 ], [ null, %1 ]
ret i8* %87
}