#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 *);
int main() {
  int g, t;
  printf("t?");
  scanf("%d", &t);
  int niz[t];
  for (g = 0; g < t; g++)
    scanf("%d", &niz[g]);
  for (g = 0; g < t; g++) {
    int i;
    for (i = 0; i < niz[g]; i++) {
      int j;
      for (j = 0; j < (niz[g] - i - 1); j++)
        printf(" ");
      for (j = 0; j < ((i * 2) + 1); j++)
        printf("*");
      printf("\n");
    }
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
lea    0xec1(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x18(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x30(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11ae <main+0x8e>
mov    -0x30(%rbp),%rsi
movslq -0x8(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe68(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1179 <main+0x59>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1282 <main+0x162>
movl   $0x0,-0x24(%rbp)
mov    -0x30(%rbp),%rcx
mov    -0x24(%rbp),%eax
movslq -0x8(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jge    1268 <main+0x148>
movl   $0x0,-0x28(%rbp)
mov    -0x30(%rbp),%rcx
mov    -0x28(%rbp),%eax
movslq -0x8(%rbp),%rdx
mov    (%rcx,%rdx,4),%ecx
sub    -0x24(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1219 <main+0xf9>
lea    0xe00(%rip),%rdi
call   1030 <printf@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    11e3 <main+0xc3>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    -0x24(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    124e <main+0x12e>
lea    0xdcd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1220 <main+0x100>
lea    0xdb5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11c8 <main+0xa8>
lea    0xd9b(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11b5 <main+0x95>
movl   $0x0,-0x4(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xeb8(%rip),%rdi
call   1040 <printf@plt>
lea    0xeaf(%rip),%rdi
lea    -0x2c(%rbp),%rsi
call   1050 <scanf@plt>
mov    %rsp,-0x38(%rbp)
mov    -0x2c(%rbp),%eax
mov    %rsp,%r13
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r13
mov    %r13,%rsp
cmpl   $0x0,-0x2c(%rbp)
jle    1266 <main+0x136>
xor    %ebx,%ebx
lea    0xe77(%rip),%r14
mov    %r13,%r12
nop
mov    %r14,%rdi
mov    %r12,%rsi
call   1050 <scanf@plt>
add    $0x1,%rbx
movslq -0x2c(%rbp),%rax
add    $0x4,%r12
cmp    %rax,%rbx
jl     1190 <main+0x60>
test   %eax,%eax
jle    1266 <main+0x136>
xor    %r15d,%r15d
jmp    11db <main+0xab>
nopl   0x0(%rax)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r15
movslq -0x2c(%rbp),%rax
cmp    %rax,%r15
jge    1266 <main+0x136>
mov    0x0(%r13,%r15,4),%eax
test   %eax,%eax
jle    11c0 <main+0x90>
xor    %r14d,%r14d
mov    $0x1,%ebx
nopl   0x0(%rax)
mov    %r14d,-0x30(%rbp)
not    %r14d
add    %r14d,%eax
test   %eax,%eax
jle    122b <main+0xfb>
xor    %r12d,%r12d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0x1,%r12d
mov    0x0(%r13,%r15,4),%eax
add    %r14d,%eax
cmp    %eax,%r12d
jl     1210 <main+0xe0>
mov    %ebx,%r12d
xchg   %ax,%ax
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1230 <main+0x100>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0x30(%rbp),%r14d
add    $0x1,%r14d
mov    0x0(%r13,%r15,4),%eax
mov    %r12d,%ebx
add    $0x2,%ebx
cmp    %eax,%r14d
jl     11f0 <main+0xc0>
jmp    11c0 <main+0x90>
mov    -0x38(%rbp),%rsp
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"t?\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = zext i32 %5 to i64
%7 = call i8* @llvm.stacksave()
%8 = alloca i32, i64 %6
%9 = load i32, i32* %1
%10 = icmp sgt i32 %9, 0
br i1 %10, label %13, label %58
11: ; preds = %13
%12 = icmp sgt i32 %18, 0
br i1 %12, label %21, label %58
13: ; preds = %0, %13
%14 = phi i64 [ %17, %13 ], [ 0, %0 ]
%15 = getelementptr inbounds i32, i32* %8, i64 %14
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %15)
%17 = add nuw nsw i64 %14, 1
%18 = load i32, i32* %1
%19 = sext i32 %18 to i64
%20 = icmp slt i64 %17, %19
br i1 %20, label %13, label %11
21: ; preds = %11, %52
%22 = phi i64 [ %54, %52 ], [ 0, %11 ]
%23 = getelementptr inbounds i32, i32* %8, i64 %22
%24 = load i32, i32* %23
%25 = icmp sgt i32 %24, 0
br i1 %25, label %26, label %52
26: ; preds = %21, %46
%27 = phi i32 [ %49, %46 ], [ %24, %21 ]
%28 = phi i32 [ %51, %46 ], [ 1, %21 ]
%29 = phi i32 [ %48, %46 ], [ 0, %21 ]
%30 = xor i32 %29, -1
%31 = add i32 %27, %30
%32 = icmp sgt i32 %31, 0
br i1 %32, label %33, label %40
33: ; preds = %26, %33
%34 = phi i32 [ %36, %33 ], [ 0, %26 ]
%35 = call i32 @putchar(i32 32)
%36 = add nuw nsw i32 %34, 1
%37 = load i32, i32* %23
%38 = add i32 %37, %30
%39 = icmp slt i32 %36, %38
br i1 %39, label %33, label %40
40: ; preds = %33, %26
br label %41
41: ; preds = %40, %41
%42 = phi i32 [ %44, %41 ], [ 0, %40 ]
%43 = call i32 @putchar(i32 42)
%44 = add nuw i32 %42, 1
%45 = icmp eq i32 %44, %28
br i1 %45, label %46, label %41
46: ; preds = %41
%47 = call i32 @putchar(i32 10)
%48 = add nuw nsw i32 %29, 1
%49 = load i32, i32* %23
%50 = icmp slt i32 %48, %49
%51 = add nuw i32 %28, 2
br i1 %50, label %26, label %52
52: ; preds = %46, %21
%53 = call i32 @putchar(i32 10)
%54 = add nuw nsw i64 %22, 1
%55 = load i32, i32* %1
%56 = sext i32 %55 to i64
%57 = icmp slt i64 %54, %56
br i1 %57, label %21, label %58
58: ; preds = %52, %0, %11
ret i32 0
}