#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*/ fscanf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ printf(char *, char, ...);
int /*<<< orphan*/ stdin;
int main() {
  int i, len = 0;
  char str[100];
  fscanf(stdin, "%[^\n]", str);
  for (i = 0; str[i] != '\0'; i++) {
    len++;
  }
  for (i = 0; i < len; i++) {
    if (str[i] != ' ' && str[i + 1] == ' ') {
      printf("%c%c", str[i], str[i + 1]);
    } else if (str[i] == ' ' && str[i] == ' ')
      continue;
    else if (str[i] != ' ')
      printf("%c", str[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
lea    -0x70(%rbp),%rdx
lea    0xeb6(%rip),%rsi
call   1040 <fscanf@plt>
movl   $0x0,-0x8(%rbp)
movslq -0x8(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
cmp    $0x0,%eax
je     117f <main+0x5f>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1156 <main+0x36>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1255 <main+0x135>
movslq -0x8(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
cmp    $0x20,%eax
je     11e6 <main+0xc6>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
cltq
movsbl -0x70(%rbp,%rax,1),%eax
cmp    $0x20,%eax
jne    11e6 <main+0xc6>
movslq -0x8(%rbp),%rax
mov    -0x70(%rbp,%rax,1),%al
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsbl -0x70(%rbp,%rcx,1),%edx
lea    0xe2f(%rip),%rdi
movsbl %al,%esi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1242 <main+0x122>
movslq -0x8(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
cmp    $0x20,%eax
jne    120f <main+0xef>
movslq -0x8(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
cmp    $0x20,%eax
jne    120f <main+0xef>
jmp    1247 <main+0x127>
movslq -0x8(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
cmp    $0x20,%eax
je     1238 <main+0x118>
movslq -0x8(%rbp),%rax
lea    0xddc(%rip),%rdi
movsbl -0x70(%rbp,%rax,1),%esi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    123d <main+0x11d>
jmp    1242 <main+0x122>
jmp    1247 <main+0x127>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1186 <main+0x66>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
mov    %rsp,%rdx
call   1040 <fscanf@plt>
mov    (%rsp),%al
test   %al,%al
je     11c2 <main+0xa2>
xor    %ecx,%ecx
nopl   0x0(%rax)
cmpb   $0x0,0x1(%rsp,%rcx,1)
lea    0x1(%rcx),%rcx
jne    1150 <main+0x30>
test   %ecx,%ecx
je     11c2 <main+0xa2>
mov    %ecx,%r12d
mov    $0x1,%ebx
lea    0xe98(%rip),%r14
lea    0xe93(%rip),%r15
cmp    $0x20,%al
je     1198 <main+0x78>
nopl   0x0(%rax)
cmpb   $0x20,(%rsp,%rbx,1)
jne    11b0 <main+0x90>
movsbl %al,%esi
mov    %r14,%rdi
mov    $0x20,%edx
xor    %eax,%eax
call   1030 <printf@plt>
cmp    %rbx,%r12
je     11c2 <main+0xa2>
mov    (%rsp,%rbx,1),%al
add    $0x1,%rbx
cmp    $0x20,%al
jne    1180 <main+0x60>
jmp    1198 <main+0x78>
nopw   0x0(%rax,%rax,1)
movsbl %al,%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
cmp    %rbx,%r12
jne    119d <main+0x7d>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [6 x i8] c"%[^\0A]\00"
@.str.1 = [5 x i8] c"%c%c\00"
@.str.2 = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [100 x i8]
store i32 0, i32* %1
store i32 0, i32* %3
%5 = load i32, i32* @stdin
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%7 = call i32 @fscanf(i32 %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %6)
store i32 0, i32* %2
br label %8
8: ; preds = %18, %0
%9 = load i32, i32* %2
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 %10
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %21
15: ; preds = %8
%16 = load i32, i32* %3
%17 = add nsw i32 %16, 1
store i32 %17, i32* %3
br label %18
18: ; preds = %15
%19 = load i32, i32* %2
%20 = add nsw i32 %19, 1
store i32 %20, i32* %2
br label %8
21: ; preds = %8
store i32 0, i32* %2
br label %22
22: ; preds = %84, %21
%23 = load i32, i32* %2
%24 = load i32, i32* %3
%25 = icmp slt i32 %23, %24
br i1 %25, label %26, label %87
26: ; preds = %22
%27 = load i32, i32* %2
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 %28
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
%32 = icmp ne i32 %31, 32
br i1 %32, label %33, label %53
33: ; preds = %26
%34 = load i32, i32* %2
%35 = add nsw i32 %34, 1
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 %36
%38 = load i8, i8* %37
%39 = sext i8 %38 to i32
%40 = icmp eq i32 %39, 32
br i1 %40, label %41, label %53
41: ; preds = %33
%42 = load i32, i32* %2
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 %43
%45 = load i8, i8* %44
%46 = load i32, i32* %2
%47 = add nsw i32 %46, 1
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 %48
%50 = load i8, i8* %49
%51 = sext i8 %50 to i32
%52 = call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8 signext %45, i32 %51)
br label %83
53: ; preds = %33, %26
%54 = load i32, i32* %2
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 %55
%57 = load i8, i8* %56
%58 = sext i8 %57 to i32
%59 = icmp eq i32 %58, 32
br i1 %59, label %60, label %68
60: ; preds = %53
%61 = load i32, i32* %2
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 %62
%64 = load i8, i8* %63
%65 = sext i8 %64 to i32
%66 = icmp eq i32 %65, 32
br i1 %66, label %67, label %68
67: ; preds = %60
br label %84
68: ; preds = %60, %53
%69 = load i32, i32* %2
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 %70
%72 = load i8, i8* %71
%73 = sext i8 %72 to i32
%74 = icmp ne i32 %73, 32
br i1 %74, label %75, label %81
75: ; preds = %68
%76 = load i32, i32* %2
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 %77
%79 = load i8, i8* %78
%80 = call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8 signext %79)
br label %81
81: ; preds = %75, %68
br label %82
82: ; preds = %81
br label %83
83: ; preds = %82, %41
br label %84
84: ; preds = %83, %67
%85 = load i32, i32* %2
%86 = add nsw i32 %85, 1
store i32 %86, i32* %2
br label %22
87: ; preds = %22
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [6 x i8] c"%[^\0A]\00"
@.str.1 = [5 x i8] c"%c%c\00"
@.str.2 = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdin
%4 = call i32 @fscanf(i32 %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %2)
%5 = load i8, i8* %2
%6 = icmp eq i8 %5, 0
br i1 %6, label %36, label %12
7: ; preds = %12
%8 = trunc i64 %14 to i32
%9 = icmp eq i32 %8, 0
br i1 %9, label %36, label %10
10: ; preds = %7
%11 = and i64 %14, 4294967295
br label %18
12: ; preds = %0, %12
%13 = phi i64 [ %14, %12 ], [ 0, %0 ]
%14 = add nuw nsw i64 %13, 1
%15 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %14
%16 = load i8, i8* %15
%17 = icmp eq i8 %16, 0
br i1 %17, label %7, label %12
18: ; preds = %33, %10
%19 = phi i8 [ %5, %10 ], [ %35, %33 ]
%20 = phi i64 [ 0, %10 ], [ %22, %33 ]
%21 = icmp eq i8 %19, 32
%22 = add nuw nsw i64 %20, 1
br i1 %21, label %31, label %23
23: ; preds = %18
%24 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %22
%25 = load i8, i8* %24
%26 = icmp eq i8 %25, 32
br i1 %26, label %27, label %29
27: ; preds = %23
%28 = call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8 signext %19, i32 32)
br label %31
29: ; preds = %23
%30 = call i32 (i8*, i8, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8 signext %19)
br label %31
31: ; preds = %18, %27, %29
%32 = icmp eq i64 %22, %11
br i1 %32, label %36, label %33
33: ; preds = %31
%34 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %22
%35 = load i8, i8* %34
br label %18
36: ; preds = %31, %0, %7
ret i32 0
}