#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 main(void) {
  int i, j, list[10];
  for (i = 0; i < 10; i++) {
    list[i] = 2 * i + 3;
    for (j = 0; j <= i; j++)
      printf("%d   ", list[j]);
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1194 <main+0x84>
mov    -0x8(%rbp),%ecx
shl    $0x1,%ecx
add    $0x3,%ecx
movslq -0x8(%rbp),%rax
mov    %ecx,-0x40(%rbp,%rax,4)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1178 <main+0x68>
movslq -0xc(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%esi
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1148 <main+0x38>
lea    0xe87(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    $0x1,%r12d
lea    0xec8(%rip),%r14
xor    %r15d,%r15d
nopl   0x0(%rax,%rax,1)
lea    (%r15,%r15,1),%eax
add    $0x3,%eax
mov    %eax,(%rsp,%r15,4)
xor    %ebx,%ebx
nopl   (%rax)
mov    (%rsp,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1150 <main+0x30>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r15
add    $0x1,%r12
cmp    $0xa,%r15
jne    1140 <main+0x20>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%d \00"
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
br label %3
3: ; preds = %0, %17
%4 = phi i64 [ 0, %0 ], [ %19, %17 ]
%5 = phi i64 [ 1, %0 ], [ %20, %17 ]
%6 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 %4
%7 = trunc i64 %4 to i32
%8 = shl i32 %7, 1
%9 = add i32 %8, 3
store i32 %9, i32* %6
br label %10
10: ; preds = %3, %10
%11 = phi i64 [ 0, %3 ], [ %15, %10 ]
%12 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 %11
%13 = load i32, i32* %12
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %13)
%15 = add nuw nsw i64 %11, 1
%16 = icmp eq i64 %15, %5
br i1 %16, label %17, label %10
17: ; preds = %10
%18 = tail call i32 @putchar(i32 10)
%19 = add nuw nsw i64 %4, 1
%20 = add nuw nsw i64 %5, 1
%21 = icmp eq i64 %19, 10
br i1 %21, label %22, label %3
22: ; preds = %17
ret i32 0
}