#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*/ *gets(char *);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  int copying = 0;
  char line[100];
  while (gets(line) != NULL) {
    char *p = line;
    if (*p == '#') {
      if (p[1] == '{')
        copying = 1;
      if (p[1] == '}')
        copying = 0;
      continue;
    }
    if (copying)
      continue;
    while (*p == '\t' || *p == ' ' || *p == '\r')
      p++;
    if (*p == 0)
      continue;
    printf("%s\n", line);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    -0x70(%rbp),%rdi
call   1040 <gets@plt>
cmp    $0x0,%rax
je     1232 <main+0x112>
lea    -0x70(%rbp),%rax
mov    %rax,-0x78(%rbp)
mov    -0x78(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
jne    1199 <main+0x79>
mov    -0x78(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x7b,%eax
jne    117c <main+0x5c>
movl   $0x1,-0x8(%rbp)
mov    -0x78(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x7d,%eax
jne    1194 <main+0x74>
movl   $0x0,-0x8(%rbp)
jmp    1139 <main+0x19>
cmpl   $0x0,-0x8(%rbp)
je     11a8 <main+0x88>
jmp    1139 <main+0x19>
jmp    11ad <main+0x8d>
mov    -0x78(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x9,%ecx
mov    %al,-0x79(%rbp)
je     11e7 <main+0xc7>
mov    -0x78(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x79(%rbp)
je     11e7 <main+0xc7>
mov    -0x78(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xd,%eax
sete   %al
mov    %al,-0x79(%rbp)
mov    -0x79(%rbp),%al
test   $0x1,%al
jne    11f7 <main+0xd7>
jmp    1208 <main+0xe8>
mov    -0x78(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x78(%rbp)
jmp    11ad <main+0x8d>
mov    -0x78(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    121d <main+0xfd>
jmp    1139 <main+0x19>
lea    -0x70(%rbp),%rsi
lea    0xdd8(%rip),%rdi
call   1030 <printf@plt>
jmp    1139 <main+0x19>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %rsp,%rdi
call   1040 <gets@plt>
test   %rax,%rax
je     11cc <main+0xac>
xor    %r12d,%r12d
lea    0x1(%rsp),%r15
mov    $0x1,%r13d
mov    %rsp,%rbx
lea    0xea9(%rip),%rbp
xor    %r14d,%r14d
jmp    117d <main+0x5d>
nopl   0x0(%rax)
mov    0x1(%rsp),%al
cmp    $0x7b,%al
cmove  %r13d,%r14d
cmp    $0x7d,%al
cmove  %r12d,%r14d
mov    %rbx,%rdi
call   1040 <gets@plt>
test   %rax,%rax
je     11cc <main+0xac>
mov    (%rsp),%al
cmp    $0x23,%al
je     1160 <main+0x40>
test   %r14d,%r14d
mov    $0x1,%r14d
jne    1170 <main+0x50>
mov    %r15,%rcx
cmp    $0x20,%al
ja     11b8 <main+0x98>
cs nopw 0x0(%rax,%rax,1)
movzbl %al,%eax
movslq 0x0(%rbp,%rax,4),%rax
add    %rbp,%rax
jmp    *%rax
movzbl (%rcx),%eax
add    $0x1,%rcx
cmp    $0x20,%al
jbe    11a0 <main+0x80>
lea    0xec5(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %r14d,%r14d
jmp    1170 <main+0x50>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [100 x i8]
%4 = alloca i8*
store i32 0, i32* %1
store i32 0, i32* %2
br label %5
5: ; preds = %61, %60, %33, %29, %0
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%7 = call i32* @gets(i8* %6)
%8 = icmp ne i32* %7, null
br i1 %8, label %9, label %64
9: ; preds = %5
%10 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
store i8* %10, i8** %4
%11 = load i8*, i8** %4
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 35
br i1 %14, label %15, label %30
15: ; preds = %9
%16 = load i8*, i8** %4
%17 = getelementptr inbounds i8, i8* %16, i64 1
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = icmp eq i32 %19, 123
br i1 %20, label %21, label %22
21: ; preds = %15
store i32 1, i32* %2
br label %22
22: ; preds = %21, %15
%23 = load i8*, i8** %4
%24 = getelementptr inbounds i8, i8* %23, i64 1
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = icmp eq i32 %26, 125
br i1 %27, label %28, label %29
28: ; preds = %22
store i32 0, i32* %2
br label %29
29: ; preds = %28, %22
br label %5
30: ; preds = %9
%31 = load i32, i32* %2
%32 = icmp ne i32 %31, 0
br i1 %32, label %33, label %34
33: ; preds = %30
br label %5
34: ; preds = %30
br label %35
35: ; preds = %52, %34
%36 = load i8*, i8** %4
%37 = load i8, i8* %36
%38 = sext i8 %37 to i32
%39 = icmp eq i32 %38, 9
br i1 %39, label %50, label %40
40: ; preds = %35
%41 = load i8*, i8** %4
%42 = load i8, i8* %41
%43 = sext i8 %42 to i32
%44 = icmp eq i32 %43, 32
br i1 %44, label %50, label %45
45: ; preds = %40
%46 = load i8*, i8** %4
%47 = load i8, i8* %46
%48 = sext i8 %47 to i32
%49 = icmp eq i32 %48, 13
br label %50
50: ; preds = %45, %40, %35
%51 = phi i1 [ true, %40 ], [ true, %35 ], [ %49, %45 ]
br i1 %51, label %52, label %55
52: ; preds = %50
%53 = load i8*, i8** %4
%54 = getelementptr inbounds i8, i8* %53, i32 1
store i8* %54, i8** %4
br label %35
55: ; preds = %50
%56 = load i8*, i8** %4
%57 = load i8, i8* %56
%58 = sext i8 %57 to i32
%59 = icmp eq i32 %58, 0
br i1 %59, label %60, label %61
60: ; preds = %55
br label %5
61: ; preds = %55
%62 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%63 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %62)
br label %5
64: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i32* @gets(i8* %2)
%4 = icmp eq i32* %3, null
br i1 %4, label %31, label %5
5: ; preds = %0
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 1
br label %7
7: ; preds = %5, %27
%8 = phi i32 [ 0, %5 ], [ %28, %27 ]
%9 = load i8, i8* %2
%10 = icmp eq i8 %9, 35
br i1 %10, label %11, label %17
11: ; preds = %7
%12 = load i8, i8* %6
%13 = icmp eq i8 %12, 123
%14 = select i1 %13, i32 1, i32 %8
%15 = icmp eq i8 %12, 125
%16 = select i1 %15, i32 0, i32 %14
br label %27
17: ; preds = %7
%18 = icmp eq i32 %8, 0
br i1 %18, label %19, label %27
19: ; preds = %17, %22
%20 = phi i8 [ %24, %22 ], [ %9, %17 ]
%21 = phi i8* [ %23, %22 ], [ %2, %17 ]
switch i8 %20, label %25 [
i8 9, label %22
i8 32, label %22
i8 13, label %22
i8 0, label %27
]
22: ; preds = %19, %19, %19
%23 = getelementptr inbounds i8, i8* %21, i64 1
%24 = load i8, i8* %23
br label %19
25: ; preds = %19
%26 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
br label %27
27: ; preds = %19, %17, %25, %11
%28 = phi i32 [ %16, %11 ], [ 0, %25 ], [ 1, %17 ], [ 0, %19 ]
%29 = call i32* @gets(i8* %2)
%30 = icmp eq i32* %29, null
br i1 %30, label %31, label %7
31: ; preds = %27, %0
ret i32 0
}