#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*/ putc(char);
void blank_string(int size) {
  int i;
  for (i = 0; i < size; i++)
    putc('\b');
  for (i = 0; i < size; i++)
    putc(' ');
  for (i = 0; i < size; i++)
    putc('\b');
}


x86 assembly (clang, -O0):
<blank_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1146 <blank_string+0x36>
mov    $0x8,%edi
call   1030 <putc@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <blank_string+0x12>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1171 <blank_string+0x61>
mov    $0x20,%edi
call   1030 <putc@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    114d <blank_string+0x3d>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    119c <blank_string+0x8c>
mov    $0x8,%edi
call   1030 <putc@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1178 <blank_string+0x68>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<blank_string>:
push   %rbp
push   %rbx
push   %rax
test   %edi,%edi
jle    116f <blank_string+0x5f>
mov    %edi,%ebx
mov    %edi,%ebp
nopl   0x0(%rax,%rax,1)
mov    $0x8,%edi
call   1030 <putc@plt>
add    $0xffffffff,%ebp
jne    1120 <blank_string+0x10>
test   %ebx,%ebx
jle    116f <blank_string+0x5f>
mov    %ebx,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0x20,%edi
call   1030 <putc@plt>
add    $0xffffffff,%ebp
jne    1140 <blank_string+0x30>
test   %ebx,%ebx
jle    116f <blank_string+0x5f>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x8,%edi
call   1030 <putc@plt>
add    $0xffffffff,%ebx
jne    1160 <blank_string+0x50>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @blank_string(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %10, %1
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = icmp slt i32 %5, %6
br i1 %7, label %8, label %13
8: ; preds = %4
%9 = call i32 @putc(i8 signext 8)
br label %10
10: ; preds = %8
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 1
store i32 %12, i32* %3
br label %4
13: ; preds = %4
store i32 0, i32* %3
br label %14
14: ; preds = %20, %13
%15 = load i32, i32* %3
%16 = load i32, i32* %2
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %23
18: ; preds = %14
%19 = call i32 @putc(i8 signext 32)
br label %20
20: ; preds = %18
%21 = load i32, i32* %3
%22 = add nsw i32 %21, 1
store i32 %22, i32* %3
br label %14
23: ; preds = %14
store i32 0, i32* %3
br label %24
24: ; preds = %30, %23
%25 = load i32, i32* %3
%26 = load i32, i32* %2
%27 = icmp slt i32 %25, %26
br i1 %27, label %28, label %33
28: ; preds = %24
%29 = call i32 @putc(i8 signext 8)
br label %30
30: ; preds = %28
%31 = load i32, i32* %3
%32 = add nsw i32 %31, 1
store i32 %32, i32* %3
br label %24
33: ; preds = %24
ret void
}

LLVM IR (-O2):
define void @blank_string(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %4, label %20
3: ; preds = %4
br i1 %2, label %10, label %20
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ 0, %1 ]
%6 = tail call i32 @putc(i8 signext 8)
%7 = add nuw nsw i32 %5, 1
%8 = icmp eq i32 %7, %0
br i1 %8, label %3, label %4
9: ; preds = %10
br i1 %2, label %15, label %20
10: ; preds = %3, %10
%11 = phi i32 [ %13, %10 ], [ 0, %3 ]
%12 = tail call i32 @putc(i8 signext 32)
%13 = add nuw nsw i32 %11, 1
%14 = icmp eq i32 %13, %0
br i1 %14, label %9, label %10
15: ; preds = %9, %15
%16 = phi i32 [ %18, %15 ], [ 0, %9 ]
%17 = tail call i32 @putc(i8 signext 8)
%18 = add nuw nsw i32 %16, 1
%19 = icmp eq i32 %18, %0
br i1 %19, label %20, label %15
20: ; preds = %15, %1, %3, %9
ret void
}