#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*/ putch(char);
main() {
  char input[] = "SSSWILTECH1\1\1";
  int i, c;
  for (i = 2; (c = input[i]) != '\0'; i++) {
    switch (c) {
    case 'a':
      putch('i');
      continue;
    case '1':
      break;
    case 1:
      while ((c = input[++i]) != '\1' && c != '\0')
        ;
    case 9:
      putch('S');
    case 'E':
    case 'L':
      continue;
    default:
      putch(c);
      continue;
    }
    putch(' ');
  }
  putch('\n');
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x12(%rbp)
mov    0xed8(%rip),%eax
mov    %eax,-0xa(%rbp)
mov    0xed2(%rip),%ax
mov    %ax,-0x6(%rbp)
movl   $0x2,-0x18(%rbp)
movslq -0x18(%rbp),%rax
movsbl -0x12(%rbp,%rax,1),%eax
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
je     1258 <main+0x148>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x20(%rbp)
sub    $0x1,%eax
je     11d7 <main+0xc7>
jmp    116e <main+0x5e>
mov    -0x20(%rbp),%eax
sub    $0x9,%eax
je     1221 <main+0x111>
jmp    117f <main+0x6f>
mov    -0x20(%rbp),%eax
sub    $0x31,%eax
je     11d2 <main+0xc2>
jmp    1190 <main+0x80>
mov    -0x20(%rbp),%eax
sub    $0x45,%eax
je     122b <main+0x11b>
jmp    11a1 <main+0x91>
mov    -0x20(%rbp),%eax
sub    $0x4c,%eax
je     122b <main+0x11b>
jmp    11b2 <main+0xa2>
mov    -0x20(%rbp),%eax
sub    $0x61,%eax
jne    1230 <main+0x120>
jmp    11c3 <main+0xb3>
mov    $0x69,%edi
call   1030 <putch@plt>
jmp    124a <main+0x13a>
jmp    1240 <main+0x130>
jmp    11dc <main+0xcc>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
cltq
movsbl -0x12(%rbp,%rax,1),%ecx
mov    %ecx,-0x1c(%rbp)
xor    %eax,%eax
cmp    $0x1,%ecx
mov    %al,-0x21(%rbp)
je     1207 <main+0xf7>
cmpl   $0x0,-0x1c(%rbp)
setne  %al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
test   $0x1,%al
jne    1217 <main+0x107>
jmp    121c <main+0x10c>
jmp    11dc <main+0xcc>
jmp    1221 <main+0x111>
mov    $0x53,%edi
call   1030 <putch@plt>
jmp    124a <main+0x13a>
mov    -0x1c(%rbp),%eax
movsbl %al,%edi
call   1030 <putch@plt>
jmp    124a <main+0x13a>
mov    $0x20,%edi
call   1030 <putch@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1145 <main+0x35>
mov    $0xa,%edi
call   1030 <putch@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
mov    $0x2,%ebx
mov    $0x53,%al
mov    $0xfffffffe,%r14d
lea    0xed8(%rip),%rbp
jmp    116a <main+0x5a>
lea    -0xc(%rbx),%eax
cmp    $0xffffffff,%eax
cmovb  %r14d,%eax
sub    %ebx,%eax
add    $0xc,%eax
mov    $0xc,%ecx
sub    %ebx,%ecx
cmp    %eax,%ecx
cmovae %eax,%ecx
test   %eax,%eax
cmove  %eax,%ecx
add    %ecx,%ebx
add    $0x1,%ebx
mov    $0x53,%al
movsbl %al,%edi
call   1030 <putch@plt>
movslq %ebx,%rbx
movzbl 0x1(%rbx,%rbp,1),%eax
add    $0x1,%rbx
cmp    $0xd,%ebx
je     11a3 <main+0x93>
movsbl %al,%ecx
cmp    $0x44,%ecx
jg     1190 <main+0x80>
cmp    $0x1,%ecx
je     112a <main+0x1a>
cmp    $0x9,%ecx
je     114f <main+0x3f>
cmp    $0x31,%ecx
jne    1151 <main+0x41>
mov    $0x20,%al
jmp    1151 <main+0x41>
cs nopw 0x0(%rax,%rax,1)
nop
cmp    $0x45,%ecx
je     1159 <main+0x49>
cmp    $0x4c,%ecx
je     1159 <main+0x49>
cmp    $0x61,%ecx
jne    1151 <main+0x41>
mov    $0x69,%al
jmp    1151 <main+0x41>
mov    $0xa,%edi
call   1030 <putch@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.input = [14 x i8] c"SSSWILTECH1\01\01\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [14 x i8]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast [14 x i8]* %2 to i8*
store i32 2, i32* %3
br label %6
6: ; preds = %43, %0
%7 = load i32, i32* %3
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [14 x i8], [14 x i8]* %2, i64 0, i64 %8
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
store i32 %11, i32* %4
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %46
13: ; preds = %6
%14 = load i32, i32* %4
switch i32 %14, label %37 [
i32 97, label %15
i32 49, label %17
i32 1, label %18
i32 9, label %34
i32 69, label %36
i32 76, label %36
]
15: ; preds = %13
%16 = call i32 @putch(i8 signext 105)
br label %43
17: ; preds = %13
br label %41
18: ; preds = %13
br label %19
19: ; preds = %32, %18
%20 = load i32, i32* %3
%21 = add nsw i32 %20, 1
store i32 %21, i32* %3
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [14 x i8], [14 x i8]* %2, i64 0, i64 %22
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
store i32 %25, i32* %4
%26 = icmp ne i32 %25, 1
br i1 %26, label %27, label %30
27: ; preds = %19
%28 = load i32, i32* %4
%29 = icmp ne i32 %28, 0
br label %30
30: ; preds = %27, %19
%31 = phi i1 [ false, %19 ], [ %29, %27 ]
br i1 %31, label %32, label %33
32: ; preds = %30
br label %19
33: ; preds = %30
br label %34
34: ; preds = %13, %33
%35 = call i32 @putch(i8 signext 83)
br label %36
36: ; preds = %13, %13, %34
br label %43
37: ; preds = %13
%38 = load i32, i32* %4
%39 = trunc i32 %38 to i8
%40 = call i32 @putch(i8 signext %39)
br label %43
41: ; preds = %17
%42 = call i32 @putch(i8 signext 32)
br label %43
43: ; preds = %41, %37, %36, %15
%44 = load i32, i32* %3
%45 = add nsw i32 %44, 1
store i32 %45, i32* %3
br label %6
46: ; preds = %6
%47 = call i32 @putch(i8 signext 10)
%48 = load i32, i32* %1
ret i32 %48
}

LLVM IR (-O2):
@__const.main.input = [14 x i8] c"SSSWILTECH1\01\01\00"
define i32 @main() {
br label %1
1: ; preds = %0, %24
%2 = phi i8 [ 83, %0 ], [ %29, %24 ]
%3 = phi i32 [ 2, %0 ], [ %26, %24 ]
%4 = sext i8 %2 to i32
switch i32 %4, label %18 [
i32 97, label %20
i32 49, label %19
i32 1, label %5
i32 9, label %16
i32 69, label %24
i32 76, label %24
]
5: ; preds = %1
%6 = add i32 %3, -12
%7 = call i32 @llvm.umax.i32(i32 %6, i32 -2)
%8 = add nsw i32 %7, 12
%9 = sub i32 %8, %3
%10 = sub i32 12, %3
%11 = icmp eq i32 %9, 0
%12 = call i32 @llvm.umin.i32(i32 %10, i32 %9)
%13 = select i1 %11, i32 0, i32 %12
%14 = add i32 %3, 1
%15 = add i32 %14, %13
br label %16
16: ; preds = %5, %1
%17 = phi i32 [ %3, %1 ], [ %15, %5 ]
br label %20
18: ; preds = %1
br label %20
19: ; preds = %1
br label %20
20: ; preds = %1, %18, %19, %16
%21 = phi i8 [ 83, %16 ], [ 32, %19 ], [ %2, %18 ], [ 105, %1 ]
%22 = phi i32 [ %17, %16 ], [ %3, %19 ], [ %3, %18 ], [ %3, %1 ]
%23 = tail call i32 @putch(i8 signext %21)
br label %24
24: ; preds = %20, %1, %1
%25 = phi i32 [ %3, %1 ], [ %3, %1 ], [ %22, %20 ]
%26 = add nsw i32 %25, 1
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [14 x i8], [14 x i8]* @__const.main.input, i64 0, i64 %27
%29 = load i8, i8* %28
%30 = icmp eq i32 %26, 13
br i1 %30, label %31, label %1
31: ; preds = %24
%32 = tail call i32 @putch(i8 signext 10)
ret i32 0
}