#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*/ printf(char *);
void replicatespace(int count) {
  while (count >= 64) {
    printf(" "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " ");
    count -= 64;
  }
  if (count & 32)
    printf(" "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " ");
  if (count & 16)
    printf(" "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " "
           " ");
  if (count & 8)
    printf(" "
           " "
           " "
           " "
           " "
           " "
           " "
           " ");
  if (count & 4)
    printf(" "
           " "
           " "
           " ");
  if (count & 2)
    printf(" "
           " ");
  if (count & 1)
    printf(" ");
}


x86 assembly (clang, -O0):
<replicatespace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x40,-0x4(%rbp)
jl     113f <replicatespace+0x2f>
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
sub    $0x40,%eax
mov    %eax,-0x4(%rbp)
jmp    111b <replicatespace+0xb>
mov    -0x4(%rbp),%eax
and    $0x20,%eax
cmp    $0x0,%eax
je     115a <replicatespace+0x4a>
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
and    $0x10,%eax
cmp    $0x0,%eax
je     1175 <replicatespace+0x65>
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
and    $0x8,%eax
cmp    $0x0,%eax
je     1190 <replicatespace+0x80>
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
and    $0x4,%eax
cmp    $0x0,%eax
je     11ab <replicatespace+0x9b>
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     11c6 <replicatespace+0xb6>
lea    0xe7d(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     11e1 <replicatespace+0xd1>
lea    0xe63(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<replicatespace>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebx
cmp    $0x40,%edi
jl     117b <replicatespace+0x5b>
lea    0xece(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
call   1040 <printf@plt>
lea    -0x40(%rbx),%ebp
cmp    $0x7f,%ebx
mov    %ebp,%ebx
ja     1140 <replicatespace+0x20>
test   $0x20,%bpl
jne    1183 <replicatespace+0x63>
test   $0x10,%bpl
jne    1195 <replicatespace+0x75>
test   $0x8,%bpl
jne    11a7 <replicatespace+0x87>
test   $0x4,%bpl
jne    11b9 <replicatespace+0x99>
test   $0x2,%bpl
jne    11cb <replicatespace+0xab>
test   $0x1,%bpl
jne    11dd <replicatespace+0xbd>
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    %ebx,%ebp
test   $0x20,%bpl
je     1158 <replicatespace+0x38>
lea    0xe96(%rip),%rdi
call   1040 <printf@plt>
test   $0x10,%bpl
je     115e <replicatespace+0x3e>
lea    0xe94(%rip),%rdi
call   1040 <printf@plt>
test   $0x8,%bpl
je     1164 <replicatespace+0x44>
lea    0xe8a(%rip),%rdi
call   1040 <printf@plt>
test   $0x4,%bpl
je     116a <replicatespace+0x4a>
lea    0xe7c(%rip),%rdi
call   1040 <printf@plt>
test   $0x2,%bpl
je     1170 <replicatespace+0x50>
lea    0xe6c(%rip),%rdi
call   1040 <printf@plt>
test   $0x1,%bpl
je     1176 <replicatespace+0x56>
mov    $0x20,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [65 x i8] c" \00"
@.str.1 = [33 x i8] c" \00"
@.str.2 = [17 x i8] c" \00"
@.str.3 = [9 x i8] c" \00"
@.str.4 = [5 x i8] c" \00"
@.str.5 = [3 x i8] c" \00"
define void @replicatespace(i32 %0) {
%2 = icmp sgt i32 %0, 63
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ %0, %1 ]
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0))
%6 = add nsw i32 %4, -64
%7 = icmp ugt i32 %4, 127
br i1 %7, label %3, label %8
8: ; preds = %3, %1
%9 = phi i32 [ %0, %1 ], [ %6, %3 ]
%10 = and i32 %9, 32
%11 = icmp eq i32 %10, 0
br i1 %11, label %14, label %12
12: ; preds = %8
%13 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
br label %14
14: ; preds = %12, %8
%15 = and i32 %9, 16
%16 = icmp eq i32 %15, 0
br i1 %16, label %19, label %17
17: ; preds = %14
%18 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
br label %19
19: ; preds = %17, %14
%20 = and i32 %9, 8
%21 = icmp eq i32 %20, 0
br i1 %21, label %24, label %22
22: ; preds = %19
%23 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
br label %24
24: ; preds = %22, %19
%25 = and i32 %9, 4
%26 = icmp eq i32 %25, 0
br i1 %26, label %29, label %27
27: ; preds = %24
%28 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
br label %29
29: ; preds = %27, %24
%30 = and i32 %9, 2
%31 = icmp eq i32 %30, 0
br i1 %31, label %34, label %32
32: ; preds = %29
%33 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
br label %34
34: ; preds = %32, %29
%35 = and i32 %9, 1
%36 = icmp eq i32 %35, 0
br i1 %36, label %39, label %37
37: ; preds = %34
%38 = tail call i32 @putchar(i32 32)
br label %39
39: ; preds = %37, %34
ret void
}