#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*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdin;
int strlen(char *);
int main() {
  char MESSAGE[101];
  fgets(MESSAGE, 101, stdin);
  int len = strlen(MESSAGE) - 1;
  char seriesOf = -1;
  for (int i = 0; i < len; ++i) {
    for (int j = 6; j >= 0; --j) {
      int bit = (MESSAGE[i] & 1 << j) >> j;
      if (bit != seriesOf) {
        if (seriesOf != -1) {
          printf(" ");
        }
        seriesOf = bit;
        if (bit) {
          printf("0 ");
        } else {
          printf("00 ");
        }
      }
      printf("0");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
mov    0x2e9b(%rip),%rax
mov    (%rax),%edx
mov    $0x65,%esi
call   1050 <fgets@plt>
lea    -0x70(%rbp),%rdi
call   1030 <strlen@plt>
sub    $0x1,%eax
mov    %eax,-0x74(%rbp)
movb   $0xff,-0x75(%rbp)
movl   $0x0,-0x7c(%rbp)
mov    -0x7c(%rbp),%eax
cmp    -0x74(%rbp),%eax
jge    1242 <main+0x112>
movl   $0x6,-0x80(%rbp)
cmpl   $0x0,-0x80(%rbp)
jl     122f <main+0xff>
movslq -0x7c(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
mov    -0x80(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
mov    -0x80(%rbp),%ecx
sar    %cl,%eax
mov    %eax,-0x84(%rbp)
mov    -0x84(%rbp),%eax
movsbl -0x75(%rbp),%ecx
cmp    %ecx,%eax
je     1215 <main+0xe5>
movsbl -0x75(%rbp),%eax
cmp    $0xffffffff,%eax
je     11dd <main+0xad>
lea    0xe2a(%rip),%rdi
call   1040 <printf@plt>
mov    -0x84(%rbp),%eax
mov    %al,-0x75(%rbp)
cmpl   $0x0,-0x84(%rbp)
je     1204 <main+0xd4>
lea    0xe07(%rip),%rdi
call   1040 <printf@plt>
jmp    1210 <main+0xe0>
lea    0xdf5(%rip),%rdi
call   1040 <printf@plt>
jmp    1215 <main+0xe5>
lea    0xde8(%rip),%rdi
call   1040 <printf@plt>
mov    -0x80(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x80(%rbp)
jmp    1186 <main+0x56>
jmp    1234 <main+0x104>
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
jmp    1173 <main+0x43>
xor    %eax,%eax
add    $0x90,%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    0x2e93(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x65,%esi
call   1060 <fgets@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
cmp    $0x2,%eax
jl     13d7 <main+0x297>
mov    %eax,%r14d
add    $0xffffffff,%r14d
mov    $0xff,%bl
xor    %r13d,%r13d
lea    0xe75(%rip),%r15
jmp    11ac <main+0x6c>
nopl   (%rax)
call   1050 <printf@plt>
mov    $0x30,%edi
call   1030 <putchar@plt>
add    $0x1,%r13
cmp    %r13,%r14
je     13d7 <main+0x297>
movzbl (%rsp,%r13,1),%ebp
shr    $0x6,%ebp
and    $0x1,%ebp
movsbl %bl,%eax
cmp    %eax,%ebp
jne    11d0 <main+0x90>
mov    %ebx,%ebp
jmp    11f3 <main+0xb3>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmp    $0xff,%bl
je     11df <main+0x9f>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    %r15,%rdi
test   %bpl,%bpl
je     11ee <main+0xae>
lea    0xe13(%rip),%rdi
call   1050 <printf@plt>
mov    $0x30,%edi
call   1030 <putchar@plt>
movzbl (%rsp,%r13,1),%ebx
shr    $0x5,%ebx
and    $0x1,%ebx
movsbl %bpl,%eax
cmp    %eax,%ebx
jne    1220 <main+0xe0>
mov    %ebp,%ebx
jmp    1243 <main+0x103>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
cmp    $0xff,%bpl
je     1230 <main+0xf0>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    %r15,%rdi
test   %bl,%bl
je     123e <main+0xfe>
lea    0xdc3(%rip),%rdi
call   1050 <printf@plt>
mov    $0x30,%edi
call   1030 <putchar@plt>
movzbl (%rsp,%r13,1),%ebp
shr    $0x4,%ebp
and    $0x1,%ebp
movsbl %bl,%eax
cmp    %eax,%ebp
jne    1270 <main+0x130>
mov    %ebx,%ebp
jmp    1293 <main+0x153>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmp    $0xff,%bl
je     127f <main+0x13f>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    %r15,%rdi
test   %bpl,%bpl
je     128e <main+0x14e>
lea    0xd73(%rip),%rdi
call   1050 <printf@plt>
mov    $0x30,%edi
call   1030 <putchar@plt>
movzbl (%rsp,%r13,1),%ebx
shr    $0x3,%ebx
and    $0x1,%ebx
movsbl %bpl,%eax
cmp    %eax,%ebx
jne    12c0 <main+0x180>
mov    %ebp,%ebx
jmp    12e3 <main+0x1a3>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
cmp    $0xff,%bpl
je     12d0 <main+0x190>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    %r15,%rdi
test   %bl,%bl
je     12de <main+0x19e>
lea    0xd23(%rip),%rdi
call   1050 <printf@plt>
mov    $0x30,%edi
call   1030 <putchar@plt>
movzbl (%rsp,%r13,1),%r12d
shr    $0x2,%r12d
and    $0x1,%r12d
movsbl %bl,%eax
cmp    %eax,%r12d
jne    1310 <main+0x1d0>
mov    %ebx,%r12d
jmp    1333 <main+0x1f3>
nopw   0x0(%rax,%rax,1)
cmp    $0xff,%bl
je     131f <main+0x1df>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    %r15,%rdi
test   %r12b,%r12b
je     132e <main+0x1ee>
lea    0xcd3(%rip),%rdi
call   1050 <printf@plt>
mov    $0x30,%edi
call   1030 <putchar@plt>
movzbl (%rsp,%r13,1),%ebp
shr    %ebp
and    $0x1,%ebp
movsbl %r12b,%eax
cmp    %eax,%ebp
jne    1360 <main+0x220>
mov    %r12d,%ebp
jmp    1384 <main+0x244>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
cmp    $0xff,%r12b
je     1370 <main+0x230>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    %r15,%rdi
test   %bpl,%bpl
je     137f <main+0x23f>
lea    0xc82(%rip),%rdi
call   1050 <printf@plt>
mov    $0x30,%edi
call   1030 <putchar@plt>
movzbl (%rsp,%r13,1),%ebx
and    $0x1,%ebx
movsbl %bpl,%eax
cmp    %eax,%ebx
jne    13b0 <main+0x270>
mov    %ebp,%ebx
jmp    1195 <main+0x55>
cs nopw 0x0(%rax,%rax,1)
nop
cmp    $0xff,%bpl
je     13c0 <main+0x280>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    %r15,%rdi
test   %bl,%bl
je     1190 <main+0x50>
lea    0xc2f(%rip),%rdi
jmp    1190 <main+0x50>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@stdin = global i32 0
@.str.1 = [3 x i8] c"0 \00"
@.str.2 = [4 x i8] c"00 \00"
define i32 @main() {
%1 = alloca [101 x i8]
%2 = getelementptr inbounds [101 x i8], [101 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdin
%4 = call i32 @fgets(i8* %2, i32 101, i32 %3)
%5 = call i32 @strlen(i8* %2)
%6 = icmp sgt i32 %5, 1
br i1 %6, label %7, label %20
7: ; preds = %0
%8 = add nsw i32 %5, -1
%9 = zext i32 %8 to i64
br label %10
10: ; preds = %7, %130
%11 = phi i64 [ 0, %7 ], [ %133, %130 ]
%12 = phi i8 [ -1, %7 ], [ %131, %130 ]
%13 = getelementptr inbounds [101 x i8], [101 x i8]* %1, i64 0, i64 %11
%14 = load i8, i8* %13
%15 = lshr i8 %14, 6
%16 = and i8 %15, 1
%17 = zext i8 %16 to i32
%18 = sext i8 %12 to i32
%19 = icmp eq i32 %17, %18
br i1 %19, label %29, label %21
20: ; preds = %130, %0
ret i32 0
21: ; preds = %10
%22 = icmp eq i8 %12, -1
br i1 %22, label %25, label %23
23: ; preds = %21
%24 = call i32 @putchar(i32 32)
br label %25
25: ; preds = %23, %21
%26 = icmp eq i8 %16, 0
%27 = select i1 %26, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0)
%28 = call i32 @printf(i8* dereferenceable(1) %27)
br label %29
29: ; preds = %25, %10
%30 = phi i8 [ %12, %10 ], [ %16, %25 ]
%31 = call i32 @putchar(i32 48)
%32 = load i8, i8* %13
%33 = lshr i8 %32, 5
%34 = and i8 %33, 1
%35 = zext i8 %34 to i32
%36 = sext i8 %30 to i32
%37 = icmp eq i32 %35, %36
br i1 %37, label %46, label %38
38: ; preds = %29
%39 = icmp eq i8 %30, -1
br i1 %39, label %42, label %40
40: ; preds = %38
%41 = call i32 @putchar(i32 32)
br label %42
42: ; preds = %40, %38
%43 = icmp eq i8 %34, 0
%44 = select i1 %43, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0)
%45 = call i32 @printf(i8* dereferenceable(1) %44)
br label %46
46: ; preds = %42, %29
%47 = phi i8 [ %30, %29 ], [ %34, %42 ]
%48 = call i32 @putchar(i32 48)
%49 = load i8, i8* %13
%50 = lshr i8 %49, 4
%51 = and i8 %50, 1
%52 = zext i8 %51 to i32
%53 = sext i8 %47 to i32
%54 = icmp eq i32 %52, %53
br i1 %54, label %63, label %55
55: ; preds = %46
%56 = icmp eq i8 %47, -1
br i1 %56, label %59, label %57
57: ; preds = %55
%58 = call i32 @putchar(i32 32)
br label %59
59: ; preds = %57, %55
%60 = icmp eq i8 %51, 0
%61 = select i1 %60, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0)
%62 = call i32 @printf(i8* dereferenceable(1) %61)
br label %63
63: ; preds = %59, %46
%64 = phi i8 [ %47, %46 ], [ %51, %59 ]
%65 = call i32 @putchar(i32 48)
%66 = load i8, i8* %13
%67 = lshr i8 %66, 3
%68 = and i8 %67, 1
%69 = zext i8 %68 to i32
%70 = sext i8 %64 to i32
%71 = icmp eq i32 %69, %70
br i1 %71, label %80, label %72
72: ; preds = %63
%73 = icmp eq i8 %64, -1
br i1 %73, label %76, label %74
74: ; preds = %72
%75 = call i32 @putchar(i32 32)
br label %76
76: ; preds = %74, %72
%77 = icmp eq i8 %68, 0
%78 = select i1 %77, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0)
%79 = call i32 @printf(i8* dereferenceable(1) %78)
br label %80
80: ; preds = %76, %63
%81 = phi i8 [ %64, %63 ], [ %68, %76 ]
%82 = call i32 @putchar(i32 48)
%83 = load i8, i8* %13
%84 = lshr i8 %83, 2
%85 = and i8 %84, 1
%86 = zext i8 %85 to i32
%87 = sext i8 %81 to i32
%88 = icmp eq i32 %86, %87
br i1 %88, label %97, label %89
89: ; preds = %80
%90 = icmp eq i8 %81, -1
br i1 %90, label %93, label %91
91: ; preds = %89
%92 = call i32 @putchar(i32 32)
br label %93
93: ; preds = %91, %89
%94 = icmp eq i8 %85, 0
%95 = select i1 %94, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0)
%96 = call i32 @printf(i8* dereferenceable(1) %95)
br label %97
97: ; preds = %93, %80
%98 = phi i8 [ %81, %80 ], [ %85, %93 ]
%99 = call i32 @putchar(i32 48)
%100 = load i8, i8* %13
%101 = lshr i8 %100, 1
%102 = and i8 %101, 1
%103 = zext i8 %102 to i32
%104 = sext i8 %98 to i32
%105 = icmp eq i32 %103, %104
br i1 %105, label %114, label %106
106: ; preds = %97
%107 = icmp eq i8 %98, -1
br i1 %107, label %110, label %108
108: ; preds = %106
%109 = call i32 @putchar(i32 32)
br label %110
110: ; preds = %108, %106
%111 = icmp eq i8 %102, 0
%112 = select i1 %111, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0)
%113 = call i32 @printf(i8* dereferenceable(1) %112)
br label %114
114: ; preds = %110, %97
%115 = phi i8 [ %98, %97 ], [ %102, %110 ]
%116 = call i32 @putchar(i32 48)
%117 = load i8, i8* %13
%118 = and i8 %117, 1
%119 = zext i8 %118 to i32
%120 = sext i8 %115 to i32
%121 = icmp eq i32 %119, %120
br i1 %121, label %130, label %122
122: ; preds = %114
%123 = icmp eq i8 %115, -1
br i1 %123, label %126, label %124
124: ; preds = %122
%125 = call i32 @putchar(i32 32)
br label %126
126: ; preds = %124, %122
%127 = icmp eq i8 %118, 0
%128 = select i1 %127, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0)
%129 = call i32 @printf(i8* dereferenceable(1) %128)
br label %130
130: ; preds = %126, %114
%131 = phi i8 [ %115, %114 ], [ %118, %126 ]
%132 = call i32 @putchar(i32 48)
%133 = add nuw nsw i64 %11, 1
%134 = icmp eq i64 %133, %9
br i1 %134, label %20, label %10
}