#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 espacios(int n, char s) {
  if (n < 1000)
    printf(" ");
  if (n < 100)
    printf(" ");
  if (n < 10)
    printf(" ");
  if (n)
    printf("%d%c| ", n, s);
  else
    printf("  | ");
}


x86 assembly (clang, -O0):
<espacios>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
cmpl   $0x3e8,-0x4(%rbp)
jge    113c <espacios+0x2c>
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x64,-0x4(%rbp)
jge    1154 <espacios+0x44>
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0xa,-0x4(%rbp)
jge    116c <espacios+0x5c>
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x4(%rbp)
je     1190 <espacios+0x80>
mov    -0x4(%rbp),%esi
movsbl -0x5(%rbp),%edx
lea    0xe7c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    119e <espacios+0x8e>
lea    0xe70(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<espacios>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %edi,%ebx
cmp    $0x3e7,%edi
jg     115b <espacios+0x3b>
mov    $0x20,%edi
call   1030 <putchar@plt>
cmp    $0x63,%ebx
jg     115b <espacios+0x3b>
mov    $0x20,%edi
call   1030 <putchar@plt>
cmp    $0x9,%ebx
jg     115b <espacios+0x3b>
mov    $0x20,%edi
call   1030 <putchar@plt>
test   %ebx,%ebx
je     1175 <espacios+0x55>
movsbl %bpl,%edx
lea    0xe9a(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <printf@plt>
lea    0xe8b(%rip),%rdi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [2 x i8] c" \00"
@.str.1 = [7 x i8] c"%d%c| \00"
@.str.2 = [5 x i8] c" | \00"
define void @espacios(i32 %0, i8 signext %1) {
%3 = alloca i32
%4 = alloca i8
store i32 %0, i32* %3
store i8 %1, i8* %4
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 1000
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %2
%10 = load i32, i32* %3
%11 = icmp slt i32 %10, 100
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %14
14: ; preds = %12, %9
%15 = load i32, i32* %3
%16 = icmp slt i32 %15, 10
br i1 %16, label %17, label %19
17: ; preds = %14
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %19
19: ; preds = %17, %14
%20 = load i32, i32* %3
%21 = icmp ne i32 %20, 0
br i1 %21, label %22, label %27
22: ; preds = %19
%23 = load i32, i32* %3
%24 = load i8, i8* %4
%25 = sext i8 %24 to i32
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %23, i32 %25)
br label %29
27: ; preds = %19
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %29
29: ; preds = %27, %22
ret void
}

LLVM IR (-O2):
@.str.1 = [7 x i8] c"%d%c| \00"
@.str.2 = [5 x i8] c" | \00"
define void @espacios(i32 %0, i8 signext %1) {
%3 = icmp slt i32 %0, 1000
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = tail call i32 @putchar(i32 32)
%6 = icmp slt i32 %0, 100
br i1 %6, label %7, label %13
7: ; preds = %4
%8 = tail call i32 @putchar(i32 32)
%9 = icmp slt i32 %0, 10
br i1 %9, label %10, label %13
10: ; preds = %7
%11 = tail call i32 @putchar(i32 32)
%12 = icmp eq i32 %0, 0
br i1 %12, label %16, label %13
13: ; preds = %2, %4, %7, %10
%14 = sext i8 %1 to i32
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %0, i32 %14)
br label %18
16: ; preds = %10
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %18
18: ; preds = %16, %13
ret void
}