#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*/ buf;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
scalar_t__ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
char *strdup(char *);
int strlen(char *);
char *read_and_fix_line(char *file_name, FILE *f, char *old) {
  char buf[1000];
  int i, j;
  if (fgets(buf, sizeof(buf), f)) {
    buf[strlen(buf) - 1] = 0;
    i = 0;
    for (j = 0; j < sizeof(buf) && buf[j] != '\n' && buf[j]; j++) {
      switch (buf[j]) {
      case ' ':
      case '\t':
        break;
      case '\\':
        j++;
        switch (buf[j]) {
        case 's':
          buf[i++] = ' ';
          break;
        case 'n':
          buf[i++] = '\n';
          break;
        case 'r':
          buf[i++] = '\r';
          break;
        case 't':
          buf[i++] = '\t';
          break;
        case 'f':
          buf[i++] = '\f';
          break;
        case '\\':
          buf[i++] = '\\';
          break;
        case 'c':
          j++;
          if (buf[j] == '-') {
            j++;
            buf[i++] = buf[j] & 0x1f;
          } else {
            fprintf(stderr, "bad control character (\\%c%c%c)\n", buf[j - 1],
                    buf[j], buf[j + 1]);
            exit(1);
          }
          break;
        default:
          fprintf(stderr, "bad escape char. (\\%c) in configuration file\n",
                  buf[j]);
          exit(1);
        }
        break;
      default:
        buf[i++] = buf[j];
        break;
      }
    }
    if (j == sizeof(buf)) {
      fprintf(stderr, "fwords: *very* long configuration line in file %s\n",
              file_name);
      exit(1);
    }
    buf[i] = 0;
    return strdup(buf);
  } else {
    return old;
  }
}


x86 assembly (clang, -O0):
<read_and_fix_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x430,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
lea    -0x410(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    $0x3e8,%esi
call   1040 <fgets@plt>
cmp    $0x0,%rax
je     150e <read_and_fix_line+0x3be>
lea    -0x410(%rbp),%rdi
call   1030 <strlen@plt>
sub    $0x1,%eax
cltq
movb   $0x0,-0x410(%rbp,%rax,1)
movl   $0x0,-0x414(%rbp)
movl   $0x0,-0x418(%rbp)
movslq -0x418(%rbp),%rcx
xor    %eax,%eax
cmp    $0x3e8,%rcx
mov    %al,-0x419(%rbp)
jae    120a <read_and_fix_line+0xba>
movslq -0x418(%rbp),%rax
movsbl -0x410(%rbp,%rax,1),%ecx
ff
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x419(%rbp)
je     120a <read_and_fix_line+0xba>
movslq -0x418(%rbp),%rax
movsbl -0x410(%rbp,%rax,1),%eax
ff
cmp    $0x0,%eax
setne  %al
mov    %al,-0x419(%rbp)
mov    -0x419(%rbp),%al
test   $0x1,%al
jne    121d <read_and_fix_line+0xcd>
jmp    14b2 <read_and_fix_line+0x362>
movslq -0x418(%rbp),%rax
movsbl -0x410(%rbp,%rax,1),%eax
ff
mov    %eax,-0x420(%rbp)
sub    $0x9,%eax
je     1268 <read_and_fix_line+0x118>
jmp    1240 <read_and_fix_line+0xf0>
mov    -0x420(%rbp),%eax
sub    $0x20,%eax
je     1268 <read_and_fix_line+0x118>
jmp    1254 <read_and_fix_line+0x104>
mov    -0x420(%rbp),%eax
sub    $0x5c,%eax
je     126d <read_and_fix_line+0x11d>
jmp    1471 <read_and_fix_line+0x321>
jmp    1499 <read_and_fix_line+0x349>
mov    -0x418(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x418(%rbp)
movslq -0x418(%rbp),%rax
movsbl -0x410(%rbp,%rax,1),%eax
ff
add    $0xffffffa4,%eax
mov    %eax,%ecx
mov    %rcx,-0x428(%rbp)
sub    $0x18,%eax
ja     143c <read_and_fix_line+0x2ec>
mov    -0x428(%rbp),%rax
lea    0xd52(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x414(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x414(%rbp)
cltq
movb   $0x20,-0x410(%rbp,%rax,1)
20
jmp    146c <read_and_fix_line+0x31c>
mov    -0x414(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x414(%rbp)
cltq
movb   $0xa,-0x410(%rbp,%rax,1)
0a
jmp    146c <read_and_fix_line+0x31c>
mov    -0x414(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x414(%rbp)
cltq
movb   $0xd,-0x410(%rbp,%rax,1)
0d
jmp    146c <read_and_fix_line+0x31c>
mov    -0x414(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x414(%rbp)
cltq
movb   $0x9,-0x410(%rbp,%rax,1)
09
jmp    146c <read_and_fix_line+0x31c>
mov    -0x414(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x414(%rbp)
cltq
movb   $0xc,-0x410(%rbp,%rax,1)
0c
jmp    146c <read_and_fix_line+0x31c>
mov    -0x414(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x414(%rbp)
cltq
movb   $0x5c,-0x410(%rbp,%rax,1)
5c
jmp    146c <read_and_fix_line+0x31c>
mov    -0x418(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x418(%rbp)
movslq -0x418(%rbp),%rax
movsbl -0x410(%rbp,%rax,1),%eax
ff
cmp    $0x2d,%eax
jne    13e0 <read_and_fix_line+0x290>
mov    -0x418(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x418(%rbp)
movslq -0x418(%rbp),%rax
movsbl -0x410(%rbp,%rax,1),%eax
ff
and    $0x1f,%eax
mov    %al,%cl
mov    -0x414(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x414(%rbp)
cltq
mov    %cl,-0x410(%rbp,%rax,1)
jmp    1437 <read_and_fix_line+0x2e7>
mov    0x2bf9(%rip),%rax
mov    (%rax),%edi
mov    -0x418(%rbp),%eax
sub    $0x1,%eax
cltq
movsbl -0x410(%rbp,%rax,1),%edx
ff
movslq -0x418(%rbp),%rax
movsbl -0x410(%rbp,%rax,1),%ecx
ff
mov    -0x418(%rbp),%eax
add    $0x1,%eax
cltq
movsbl -0x410(%rbp,%rax,1),%r8d
ff ff
lea    0xc3e(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
jmp    146c <read_and_fix_line+0x31c>
mov    0x2b9d(%rip),%rax
mov    (%rax),%edi
movslq -0x418(%rbp),%rax
movsbl -0x410(%rbp,%rax,1),%edx
ff
lea    0xc2a(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
jmp    1499 <read_and_fix_line+0x349>
movslq -0x418(%rbp),%rax
mov    -0x410(%rbp,%rax,1),%cl
mov    -0x414(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x414(%rbp)
cltq
mov    %cl,-0x410(%rbp,%rax,1)
jmp    149e <read_and_fix_line+0x34e>
mov    -0x418(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x418(%rbp)
jmp    11b3 <read_and_fix_line+0x63>
movslq -0x418(%rbp),%rax
cmp    $0x3e8,%rax
jne    14ea <read_and_fix_line+0x39a>
mov    0x2b14(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xbda(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
movslq -0x414(%rbp),%rax
movb   $0x0,-0x410(%rbp,%rax,1)
lea    -0x410(%rbp),%rdi
call   1070 <strdup@plt>
mov    %rax,-0x8(%rbp)
jmp    1516 <read_and_fix_line+0x3c6>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x430,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_and_fix_line>:
push   %r15
push   %r14
push   %rbx
sub    $0x3f0,%rsp
mov    %rdx,%rbx
mov    %rsi,%rdx
mov    %rdi,%r14
mov    %rsp,%r15
mov    %r15,%rdi
mov    $0x3e8,%esi
call   1040 <fgets@plt>
test   %rax,%rax
je     123f <read_and_fix_line+0xef>
mov    %r15,%rdi
call   1030 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%r15,1)
xor    %ecx,%ecx
lea    0xe69(%rip),%r8
xor    %eax,%eax
jmp    11b7 <read_and_fix_line+0x67>
mov    $0xa,%dil
xchg   %ax,%ax
movslq %eax,%rdx
add    $0x1,%eax
mov    %dil,(%rsp,%rdx,1)
mov    %ecx,%edx
lea    0x1(%rdx),%ecx
cmp    $0x3e7,%edx
jae    1226 <read_and_fix_line+0xd6>
mov    %ecx,%ebx
movsbl (%rsp,%rbx,1),%edi
test   %edi,%edi
je     122e <read_and_fix_line+0xde>
cmp    $0xa,%dil
je     122e <read_and_fix_line+0xde>
cmp    $0x9,%edi
je     11aa <read_and_fix_line+0x5a>
cmp    $0x20,%edi
je     11aa <read_and_fix_line+0x5a>
cmp    $0x5c,%edi
jne    11a0 <read_and_fix_line+0x50>
movsbl 0x1(%rsp,%rbx,1),%edx
lea    -0x5c(%rdx),%esi
cmp    $0x18,%esi
ja     124f <read_and_fix_line+0xff>
lea    0x1(%rbx),%rcx
mov    $0x20,%dil
movslq (%r8,%rsi,4),%rsi
add    %r8,%rsi
jmp    *%rsi
mov    $0x5c,%dil
jmp    11a0 <read_and_fix_line+0x50>
movsbl 0x2(%rbx,%r15,1),%ecx
cmp    $0x2d,%ecx
jne    1270 <read_and_fix_line+0x120>
movzbl 0x3(%rsp,%rbx,1),%edi
add    $0x3,%rbx
and    $0x1f,%dil
mov    %ebx,%ecx
jmp    11a0 <read_and_fix_line+0x50>
mov    $0xc,%dil
jmp    11a0 <read_and_fix_line+0x50>
mov    $0xd,%dil
jmp    11a0 <read_and_fix_line+0x50>
mov    $0x9,%dil
jmp    11a0 <read_and_fix_line+0x50>
cmp    $0x3e8,%ecx
je     129c <read_and_fix_line+0x14c>
cltq
movb   $0x0,(%rsp,%rax,1)
mov    %rsp,%rdi
call   1070 <strdup@plt>
mov    %rax,%rbx
mov    %rbx,%rax
add    $0x3f0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret
mov    0x2d8a(%rip),%rax
mov    (%rax),%edi
lea    0xe26(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
mov    0x2d69(%rip),%rax
mov    (%rax),%edi
movsbl 0x3(%rbx,%r15,1),%r8d
lea    0xdde(%rip),%rsi
mov    $0x63,%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
mov    0x2d3d(%rip),%rax
mov    (%rax),%edi
lea    0xe07(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [33 x i8] c"bad control character (\\%c%c%c)\0A\00"
@.str.1 = [46 x i8] c"bad escape char. (\\%c) in configuration file\0A\00"
@.str.2 = [51 x i8] c"fwords: *very* long configuration line in file %s\0A\00"
define i8* @read_and_fix_line(i8* %0, i32* nocapture %1, i8* readnone %2) {
%4 = alloca [1000 x i8]
%5 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 0
%6 = call i64 @fgets(i8* %5, i32 1000, i32* %1)
%7 = icmp eq i64 %6, 0
br i1 %7, label %81, label %8
8: ; preds = %3
%9 = call i32 @strlen(i8* %5)
%10 = add nsw i32 %9, -1
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 %11
store i8 0, i8* %12
br label %13
13: ; preds = %8, %65
%14 = phi i32 [ 0, %8 ], [ %68, %65 ]
%15 = phi i32 [ 0, %8 ], [ %66, %65 ]
%16 = zext i32 %14 to i64
%17 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 %16
%18 = load i8, i8* %17
switch i8 %18, label %19 [
i8 10, label %76
i8 0, label %76
]
19: ; preds = %13
%20 = sext i8 %18 to i32
switch i32 %20, label %59 [
i32 32, label %65
i32 9, label %65
i32 92, label %21
]
21: ; preds = %19
%22 = add nuw nsw i32 %14, 1
%23 = zext i32 %22 to i64
%24 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 %23
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
switch i32 %26, label %54 [
i32 115, label %59
i32 110, label %27
i32 114, label %28
i32 116, label %29
i32 102, label %30
i32 92, label %31
i32 99, label %32
]
27: ; preds = %21
br label %59
28: ; preds = %21
br label %59
29: ; preds = %21
br label %59
30: ; preds = %21
br label %59
31: ; preds = %21
br label %59
32: ; preds = %21
%33 = add nuw nsw i32 %14, 2
%34 = zext i32 %33 to i64
%35 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 %34
%36 = load i8, i8* %35
%37 = icmp eq i8 %36, 45
br i1 %37, label %38, label %44
38: ; preds = %32
%39 = add nuw nsw i32 %14, 3
%40 = zext i32 %39 to i64
%41 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 %40
%42 = load i8, i8* %41
%43 = and i8 %42, 31
br label %59
44: ; preds = %32
%45 = sext i8 %36 to i32
%46 = load i32, i32* @stderr
%47 = add nuw nsw i32 %14, 3
%48 = zext i32 %47 to i64
%49 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 %48
%50 = load i8, i8* %49
%51 = sext i8 %50 to i32
%52 = call i32 (i32, i8*, ...) @fprintf(i32 %46, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 99, i32 %45, i32 %51)
%53 = call i32 @exit(i32 1)
unreachable
54: ; preds = %21
%55 = sext i8 %25 to i32
%56 = load i32, i32* @stderr
%57 = call i32 (i32, i8*, ...) @fprintf(i32 %56, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0), i32 %55)
%58 = call i32 @exit(i32 1)
unreachable
59: ; preds = %19, %21, %27, %28, %29, %30, %31, %38
%60 = phi i8 [ %43, %38 ], [ 92, %31 ], [ 12, %30 ], [ 9, %29 ], [ 13, %28 ], [ 10, %27 ], [ 32, %21 ], [ %18, %19 ]
%61 = phi i32 [ %39, %38 ], [ %22, %31 ], [ %22, %30 ], [ %22, %29 ], [ %22, %28 ], [ %22, %27 ], [ %22, %21 ], [ %14, %19 ]
%62 = add nsw i32 %15, 1
%63 = sext i32 %15 to i64
%64 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 %63
store i8 %60, i8* %64
br label %65
65: ; preds = %59, %19, %19
%66 = phi i32 [ %15, %19 ], [ %15, %19 ], [ %62, %59 ]
%67 = phi i32 [ %14, %19 ], [ %14, %19 ], [ %61, %59 ]
%68 = add nuw nsw i32 %67, 1
%69 = icmp ult i32 %67, 999
br i1 %69, label %13, label %70
70: ; preds = %65
%71 = icmp eq i32 %68, 1000
br i1 %71, label %72, label %76
72: ; preds = %70
%73 = load i32, i32* @stderr
%74 = call i32 (i32, i8*, ...) @fprintf(i32 %73, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0), i8* %0)
%75 = call i32 @exit(i32 1)
unreachable
76: ; preds = %13, %13, %70
%77 = phi i32 [ %66, %70 ], [ %15, %13 ], [ %15, %13 ]
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 %78
store i8 0, i8* %79
%80 = call i8* @strdup(i8* %5)
br label %81
81: ; preds = %3, %76
%82 = phi i8* [ %80, %76 ], [ %2, %3 ]
ret i8* %82
}