#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 argc, const char *argv[]) {
  int i, j;
  char input[90];
  char out[90];
  while (gets(input) != NULL) {
    j = 0;
    for (i = 0; input[i] != '\0'; i++) {
      if (input[i] != ' ') {
        out[j] = input[i];
        j++;
      }
    }
    out[j] = '\0';
    printf("%s\n", out);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x80(%rbp),%rdi
call   1040 <gets@plt>
cmp    $0x0,%rax
je     11d1 <main+0xb1>
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
movslq -0x14(%rbp),%rax
movsbl -0x80(%rbp,%rax,1),%eax
cmp    $0x0,%eax
je     11ad <main+0x8d>
movslq -0x14(%rbp),%rax
movsbl -0x80(%rbp,%rax,1),%eax
cmp    $0x20,%eax
je     119a <main+0x7a>
movslq -0x14(%rbp),%rax
mov    -0x80(%rbp,%rax,1),%cl
movslq -0x18(%rbp),%rax
mov    %cl,-0xe0(%rbp,%rax,1)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    119f <main+0x7f>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    115a <main+0x3a>
movslq -0x18(%rbp),%rax
movb   $0x0,-0xe0(%rbp,%rax,1)
lea    -0xe0(%rbp),%rsi
lea    0xe39(%rip),%rdi
call   1030 <printf@plt>
jmp    1139 <main+0x19>
xor    %eax,%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0xc0,%rsp
lea    0x60(%rsp),%rdi
call   1040 <gets@plt>
test   %rax,%rax
je     1196 <main+0x76>
xor    %ecx,%ecx
lea    0xebc(%rip),%r14
mov    %rsp,%r15
lea    0x60(%rsp),%rbx
xor    %edx,%edx
jmp    1154 <main+0x34>
add    $0x1,%rcx
movzbl 0x60(%rsp,%rcx,1),%eax
test   %al,%al
je     1170 <main+0x50>
cmp    $0x20,%al
je     1150 <main+0x30>
movslq %edx,%rsi
mov    %al,(%rsp,%rsi,1)
add    $0x1,%edx
jmp    1150 <main+0x30>
nopl   0x0(%rax)
movslq %edx,%rax
movb   $0x0,(%rsp,%rax,1)
mov    %r14,%rdi
mov    %r15,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1040 <gets@plt>
xor    %ecx,%ecx
mov    $0x0,%edx
test   %rax,%rax
jne    1154 <main+0x34>
xor    %eax,%eax
add    $0xc0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

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