#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 *, ...);
int /*<<< orphan*/ scanf(char *, int *);
main() {
  int a = 0, b = 1, c;
  int FILAS;
  do {
    printf("Número de filas entre 11 y 20: ");
    scanf("%d", &FILAS);
  } while (FILAS < 11 || FILAS > 20);
  for (c = 1; c < FILAS; c++) {
    int despl, d;
    printf("\n");
    for (despl = 80 / 4 - b; despl >= 0; despl--)
      printf("  ");
    for (d = 1; d <= b; d++) {
      a++;
      if (a > 9)
        a = 0;
      printf("%d ", a);
    }
    for (d = 1; d < b; d++) {
      a--;
      if (a < 0)
        a = 9;
      printf("%d ", a);
    }
    b++;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
mov    $0x1,%al
cmpl   $0xb,-0x14(%rbp)
mov    %al,-0x1d(%rbp)
jl     1174 <main+0x54>
cmpl   $0x14,-0x14(%rbp)
setg   %al
mov    %al,-0x1d(%rbp)
mov    -0x1d(%rbp),%al
test   $0x1,%al
jne    113d <main+0x1d>
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1280 <main+0x160>
lea    0xe8b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x14,%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jl     11d1 <main+0xb1>
lea    0xe6a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
jmp    11ab <main+0x8b>
movl   $0x1,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     121d <main+0xfd>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x9,-0x8(%rbp)
jle    11fe <main+0xde>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe21(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11d8 <main+0xb8>
movl   $0x1,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1269 <main+0x149>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    124a <main+0x12a>
movl   $0x9,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xdd5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1224 <main+0x104>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1186 <main+0x66>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xebb(%rip),%r14
lea    0xed5(%rip),%r15
lea    0xc(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%eax
add    $0xffffffeb,%eax
cmp    $0xfffffff6,%eax
jb     1160 <main+0x30>
mov    $0x1,%r12d
mov    $0xffffffec,%ebp
xor    %r13d,%r13d
lea    0xe8e(%rip),%r14
lea    0xe8a(%rip),%r15
movl   $0x0,0x8(%rsp)
xor    %ebx,%ebx
jmp    11d7 <main+0xa7>
nopl   0x0(%rax)
mov    0x10(%rsp),%r12d
add    $0x1,%r12d
mov    0x14(%rsp),%ebp
add    $0x1,%ebp
addl   $0x1,0x8(%rsp)
cmp    0xc(%rsp),%r12d
lea    0xe53(%rip),%r14
jge    1272 <main+0x142>
mov    $0xa,%edi
call   1030 <putchar@plt>
cmp    $0x15,%r12d
mov    %ebp,0x14(%rsp)
jae    11fe <main+0xce>
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
inc    %ebp
jne    11f0 <main+0xc0>
mov    %r12d,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
cmp    $0x9,%ebx
lea    0x1(%rbx),%eax
mov    %eax,%ebx
cmovge %r13d,%ebx
mov    %r15,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0xffffffff,%ebp
jne    1210 <main+0xe0>
mov    0x8(%rsp),%r14d
mov    %r12d,0x10(%rsp)
cmp    $0x2,%r12d
mov    $0x9,%r12d
jb     11b0 <main+0x80>
nopw   0x0(%rax,%rax,1)
lea    -0x1(%rbx),%ebp
test   %ebx,%ebx
cmovle %r12d,%ebp
mov    %r15,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebp,%ebx
add    $0xffffffff,%r14d
jne    1250 <main+0x120>
jmp    11b0 <main+0x80>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [33 x i8] c"N\C3\BAmero de filas entre 11 y 20: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [3 x i8] c" \00"
@.str.4 = [4 x i8] c"%d \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 1, i32* %3
br label %8
8: ; preds = %17, %0
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %5)
br label %11
11: ; preds = %8
%12 = load i32, i32* %5
%13 = icmp slt i32 %12, 11
br i1 %13, label %17, label %14
14: ; preds = %11
%15 = load i32, i32* %5
%16 = icmp sgt i32 %15, 20
br label %17
17: ; preds = %14, %11
%18 = phi i1 [ true, %11 ], [ %16, %14 ]
br i1 %18, label %8, label %19
19: ; preds = %17
store i32 1, i32* %4
br label %20
20: ; preds = %73, %19
%21 = load i32, i32* %4
%22 = load i32, i32* %5
%23 = icmp slt i32 %21, %22
br i1 %23, label %24, label %76
24: ; preds = %20
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%26 = load i32, i32* %3
%27 = sub nsw i32 20, %26
store i32 %27, i32* %6
br label %28
28: ; preds = %33, %24
%29 = load i32, i32* %6
%30 = icmp sge i32 %29, 0
br i1 %30, label %31, label %36
31: ; preds = %28
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
br label %33
33: ; preds = %31
%34 = load i32, i32* %6
%35 = add nsw i32 %34, -1
store i32 %35, i32* %6
br label %28
36: ; preds = %28
store i32 1, i32* %7
br label %37
37: ; preds = %50, %36
%38 = load i32, i32* %7
%39 = load i32, i32* %3
%40 = icmp sle i32 %38, %39
br i1 %40, label %41, label %53
41: ; preds = %37
%42 = load i32, i32* %2
%43 = add nsw i32 %42, 1
store i32 %43, i32* %2
%44 = load i32, i32* %2
%45 = icmp sgt i32 %44, 9
br i1 %45, label %46, label %47
46: ; preds = %41
store i32 0, i32* %2
br label %47
47: ; preds = %46, %41
%48 = load i32, i32* %2
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 %48)
br label %50
50: ; preds = %47
%51 = load i32, i32* %7
%52 = add nsw i32 %51, 1
store i32 %52, i32* %7
br label %37
53: ; preds = %37
store i32 1, i32* %7
br label %54
54: ; preds = %67, %53
%55 = load i32, i32* %7
%56 = load i32, i32* %3
%57 = icmp slt i32 %55, %56
br i1 %57, label %58, label %70
58: ; preds = %54
%59 = load i32, i32* %2
%60 = add nsw i32 %59, -1
store i32 %60, i32* %2
%61 = load i32, i32* %2
%62 = icmp slt i32 %61, 0
br i1 %62, label %63, label %64
63: ; preds = %58
store i32 9, i32* %2
br label %64
64: ; preds = %63, %58
%65 = load i32, i32* %2
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 %65)
br label %67
67: ; preds = %64
%68 = load i32, i32* %7
%69 = add nsw i32 %68, 1
store i32 %69, i32* %7
br label %54
70: ; preds = %54
%71 = load i32, i32* %3
%72 = add nsw i32 %71, 1
store i32 %72, i32* %3
br label %73
73: ; preds = %70
%74 = load i32, i32* %4
%75 = add nsw i32 %74, 1
store i32 %75, i32* %4
br label %20
76: ; preds = %20
%77 = load i32, i32* %1
ret i32 %77
}

LLVM IR (-O2):
@.str = [33 x i8] c"N\C3\BAmero de filas entre 11 y 20: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.3 = [3 x i8] c" \00"
@.str.4 = [4 x i8] c"%d \00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
br label %3
3: ; preds = %3, %0
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = add i32 %6, -21
%8 = icmp ult i32 %7, -10
br i1 %8, label %3, label %9
9: ; preds = %3, %43
%10 = phi i32 [ %48, %43 ], [ 2, %3 ]
%11 = phi i32 [ %45, %43 ], [ 1, %3 ]
%12 = phi i32 [ %44, %43 ], [ 0, %3 ]
%13 = call i32 @putchar(i32 10)
%14 = icmp ult i32 %11, 21
br i1 %14, label %16, label %15
15: ; preds = %18, %9
br label %25
16: ; preds = %9
%17 = sub nuw nsw i32 20, %11
br label %18
18: ; preds = %16, %18
%19 = phi i32 [ %21, %18 ], [ %17, %16 ]
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%21 = add nsw i32 %19, -1
%22 = icmp eq i32 %19, 0
br i1 %22, label %15, label %18
23: ; preds = %25
%24 = icmp ugt i32 %11, 1
br i1 %24, label %34, label %43
25: ; preds = %15, %25
%26 = phi i32 [ %32, %25 ], [ 1, %15 ]
%27 = phi i32 [ %30, %25 ], [ %12, %15 ]
%28 = add nsw i32 %27, 1
%29 = icmp sgt i32 %27, 8
%30 = select i1 %29, i32 0, i32 %28
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 %30)
%32 = add nuw nsw i32 %26, 1
%33 = icmp eq i32 %32, %10
br i1 %33, label %23, label %25
34: ; preds = %23, %34
%35 = phi i32 [ %41, %34 ], [ 1, %23 ]
%36 = phi i32 [ %39, %34 ], [ %30, %23 ]
%37 = add nsw i32 %36, -1
%38 = icmp slt i32 %36, 1
%39 = select i1 %38, i32 9, i32 %37
%40 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 %39)
%41 = add nuw nsw i32 %35, 1
%42 = icmp eq i32 %41, %11
br i1 %42, label %43, label %34
43: ; preds = %34, %23
%44 = phi i32 [ %30, %23 ], [ %39, %34 ]
%45 = add nuw nsw i32 %11, 1
%46 = load i32, i32* %1
%47 = icmp slt i32 %45, %46
%48 = add nuw i32 %10, 1
br i1 %47, label %9, label %49
49: ; preds = %43
ret i32 0
}