int main() {
  int i, x, cateto;
  printf("\nIngrese el tamaño del cateto (minimo 2 | maximo 49) : ");
  scanf("%d", &cateto);
  x = 1;
  for (i = cateto - 1; i > 0; i--) {
    printf("%.*s", i, "                                                 ");
    while (x < cateto + 1) {
      printf("%.*s", x, "*************************************************");
      x = x + 1;
      break;
    }
    printf("\n");
  }
  printf("%.*s", x, "*************************************************");
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef5(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x1,-0xc(%rbp)
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    11cf <main+0xaf>
mov    -0x8(%rbp),%esi
lea    0xec9(%rip),%rdi
lea    0xec7(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    11b3 <main+0x93>
mov    -0xc(%rbp),%esi
lea    0xea0(%rip),%rdi
lea    0xed0(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
lea    0xeeb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    115f <main+0x3f>
mov    -0xc(%rbp),%esi
lea    0xe63(%rip),%rdi
lea    0xe93(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xebd(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee8(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    0xc(%rsp),%ebx
mov    $0x1,%ebp
cmp    $0x2,%ebx
jl     11cc <main+0x9c>
add    $0x1,%ebx
mov    $0x1,%ebp
lea    0xec2(%rip),%r14
lea    0xec0(%rip),%r15
lea    0xeeb(%rip),%r12
jmp    11a2 <main+0x72>
nopw   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
cmp    $0x2,%ebx
jbe    11cc <main+0x9c>
lea    -0x2(%rbx),%esi
mov    %r14,%rdi
mov    %r15,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
cmp    0xc(%rsp),%ebp
jg     1190 <main+0x60>
mov    %r14,%rdi
mov    %ebp,%esi
mov    %r12,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebp
jmp    1190 <main+0x60>
lea    0xe69(%rip),%rdi
lea    0xe99(%rip),%rdx
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [57 x i8] c"\0AIngrese el tama\C3\B1o del cateto (minimo 2 | maximo 49) : \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [5 x i8] c"%.*s\00"
@.str.3 = [50 x i8] c" \00"
@.str.4 = [50 x i8] c"*************************************************\00"
@.str.5 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
%6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
store i32 1, i32* %3
%7 = load i32, i32* %4
%8 = sub nsw i32 %7, 1
store i32 %8, i32* %2
br label %9
9: ; preds = %27, %0
%10 = load i32, i32* %2
%11 = icmp sgt i32 %10, 0
br i1 %11, label %12, label %30
12: ; preds = %9
%13 = load i32, i32* %2
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %13, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.3, i64 0, i64 0))
br label %15
15: ; preds = %12
%16 = load i32, i32* %3
%17 = load i32, i32* %4
%18 = add nsw i32 %17, 1
%19 = icmp slt i32 %16, %18
br i1 %19, label %20, label %25
20: ; preds = %15
%21 = load i32, i32* %3
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %21, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.4, i64 0, i64 0))
%23 = load i32, i32* %3
%24 = add nsw i32 %23, 1
store i32 %24, i32* %3
br label %25
25: ; preds = %20, %15
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %27
27: ; preds = %25
%28 = load i32, i32* %2
%29 = add nsw i32 %28, -1
store i32 %29, i32* %2
br label %9
30: ; preds = %9
%31 = load i32, i32* %3
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %31, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.4, i64 0, i64 0))
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [57 x i8] c"\0AIngrese el tama\C3\B1o del cateto (minimo 2 | maximo 49) : \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [5 x i8] c"%.*s\00"
@.str.3 = [50 x i8] c" \00"
@.str.4 = [50 x i8] c"*************************************************\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = icmp sgt i32 %5, 1
br i1 %6, label %7, label %21
7: ; preds = %0, %17
%8 = phi i32 [ %10, %17 ], [ %5, %0 ]
%9 = phi i32 [ %18, %17 ], [ 1, %0 ]
%10 = add nsw i32 %8, -1
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %10, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.3, i64 0, i64 0))
%12 = load i32, i32* %1
%13 = icmp sgt i32 %9, %12
br i1 %13, label %17, label %14
14: ; preds = %7
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %9, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.4, i64 0, i64 0))
%16 = add nsw i32 %9, 1
br label %17
17: ; preds = %14, %7
%18 = phi i32 [ %16, %14 ], [ %9, %7 ]
%19 = call i32 @putchar(i32 10)
%20 = icmp ugt i32 %8, 2
br i1 %20, label %7, label %21
21: ; preds = %17, %0
%22 = phi i32 [ 1, %0 ], [ %18, %17 ]
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %22, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.4, i64 0, i64 0))
%24 = call i32 @putchar(i32 10)
ret i32 0
}