#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, int);
int main() {
  int t[10];
  int tab2[100];
  int i;
  for (i = 0; i < 100; i++) {
    t[i] = i;
  }
  for (i = 0; i < 10; i++) {
    printf("t[%d]=%d\n", i, t[i]);
  }
  for (i = 0; i < 100; i++) {
    printf("t[%d]=%d\n", i, tab2[i]);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1d0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x1c4(%rbp)
cmpl   $0x64,-0x1c4(%rbp)
jge    115e <main+0x4e>
mov    -0x1c4(%rbp),%ecx
movslq -0x1c4(%rbp),%rax
mov    %ecx,-0x30(%rbp,%rax,4)
mov    -0x1c4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c4(%rbp)
jmp    112c <main+0x1c>
movl   $0x0,-0x1c4(%rbp)
cmpl   $0xa,-0x1c4(%rbp)
jge    11a6 <main+0x96>
mov    -0x1c4(%rbp),%esi
movslq -0x1c4(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%edx
lea    0xe73(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c4(%rbp)
jmp    1168 <main+0x58>
movl   $0x0,-0x1c4(%rbp)
cmpl   $0x64,-0x1c4(%rbp)
jge    11f1 <main+0xe1>
mov    -0x1c4(%rbp),%esi
movslq -0x1c4(%rbp),%rax
mov    -0x1c0(%rbp,%rax,4),%edx
lea    0xe28(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c4(%rbp)
jmp    11b0 <main+0xa0>
mov    -0x4(%rbp),%eax
add    $0x1d0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x1c8,%rsp
movaps 0xedf(%rip),%xmm0
movaps %xmm0,(%rsp)
movaps 0xee4(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xee8(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xeec(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xef0(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xef4(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xef8(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xefc(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0xf00(%rip),%xmm0
movaps %xmm0,0x80(%rsp)
movaps 0xf01(%rip),%xmm0
movaps %xmm0,0x90(%rsp)
movaps 0xf02(%rip),%xmm0
movaps %xmm0,0xa0(%rsp)
movaps 0xf03(%rip),%xmm0
movaps %xmm0,0xb0(%rsp)
movaps 0xf04(%rip),%xmm0
movaps %xmm0,0xc0(%rsp)
movaps 0xf05(%rip),%xmm0
movaps %xmm0,0xd0(%rsp)
movaps 0xf06(%rip),%xmm0
movaps %xmm0,0xe0(%rsp)
movaps 0xf07(%rip),%xmm0
movaps %xmm0,0xf0(%rsp)
movaps 0xf08(%rip),%xmm0
movaps %xmm0,0x100(%rsp)
movaps 0xf09(%rip),%xmm0
movaps %xmm0,0x110(%rsp)
movaps 0xf0a(%rip),%xmm0
movaps %xmm0,0x120(%rsp)
movaps 0xf0b(%rip),%xmm0
movaps %xmm0,0x130(%rsp)
movaps 0xf0c(%rip),%xmm0
movaps %xmm0,0x140(%rsp)
movaps 0xf0d(%rip),%xmm0
movaps %xmm0,0x150(%rsp)
movaps 0xf0e(%rip),%xmm0
movaps %xmm0,0x160(%rsp)
movaps 0xf0f(%rip),%xmm0
movaps %xmm0,0x170(%rsp)
movaps 0xf10(%rip),%xmm0
movaps %xmm0,0x180(%rsp)
mov    (%rsp),%edx
lea    0xf0e(%rip),%r14
xor    %ebx,%ebx
mov    %r14,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    0x4(%rsp),%edx
mov    %r14,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    0x8(%rsp),%edx
mov    %r14,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    0xc(%rsp),%edx
mov    %r14,%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
mov    0x10(%rsp),%edx
mov    %r14,%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
mov    0x14(%rsp),%edx
mov    %r14,%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
mov    0x18(%rsp),%edx
mov    %r14,%rdi
mov    $0x6,%esi
call   1030 <printf@plt>
mov    0x1c(%rsp),%edx
mov    %r14,%rdi
mov    $0x7,%esi
call   1030 <printf@plt>
mov    0x20(%rsp),%edx
mov    %r14,%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
mov    0x24(%rsp),%edx
mov    %r14,%rdi
mov    $0x9,%esi
call   1030 <printf@plt>
nopw   0x0(%rax,%rax,1)
mov    0x30(%rsp,%rbx,4),%edx
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    $0x64,%rbx
jne    1330 <main+0x220>
xor    %eax,%eax
add    $0x1c8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"t[%d]=%d\0A\00"
define i32 @main() {
%1 = alloca [10 x i32]
%2 = alloca [100 x i32]
%3 = bitcast [10 x i32]* %1 to i8*
%4 = bitcast [100 x i32]* %2 to i8*
%5 = bitcast [10 x i32]* %1 to <4 x i32>*
store <4 x i32> <i32 0, i32 1, i32 2, i32 3>, <4 x i32>* %5
%6 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 4
%7 = bitcast i32* %6 to <4 x i32>*
store <4 x i32> <i32 4, i32 5, i32 6, i32 7>, <4 x i32>* %7
%8 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 8
%9 = bitcast i32* %8 to <4 x i32>*
store <4 x i32> <i32 8, i32 9, i32 10, i32 11>, <4 x i32>* %9
%10 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 12
%11 = bitcast i32* %10 to <4 x i32>*
store <4 x i32> <i32 12, i32 13, i32 14, i32 15>, <4 x i32>* %11
%12 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 16
%13 = bitcast i32* %12 to <4 x i32>*
store <4 x i32> <i32 16, i32 17, i32 18, i32 19>, <4 x i32>* %13
%14 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 20
%15 = bitcast i32* %14 to <4 x i32>*
store <4 x i32> <i32 20, i32 21, i32 22, i32 23>, <4 x i32>* %15
%16 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 24
%17 = bitcast i32* %16 to <4 x i32>*
store <4 x i32> <i32 24, i32 25, i32 26, i32 27>, <4 x i32>* %17
%18 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 28
%19 = bitcast i32* %18 to <4 x i32>*
store <4 x i32> <i32 28, i32 29, i32 30, i32 31>, <4 x i32>* %19
%20 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 32
%21 = bitcast i32* %20 to <4 x i32>*
store <4 x i32> <i32 32, i32 33, i32 34, i32 35>, <4 x i32>* %21
%22 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 36
%23 = bitcast i32* %22 to <4 x i32>*
store <4 x i32> <i32 36, i32 37, i32 38, i32 39>, <4 x i32>* %23
%24 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 40
%25 = bitcast i32* %24 to <4 x i32>*
store <4 x i32> <i32 40, i32 41, i32 42, i32 43>, <4 x i32>* %25
%26 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 44
%27 = bitcast i32* %26 to <4 x i32>*
store <4 x i32> <i32 44, i32 45, i32 46, i32 47>, <4 x i32>* %27
%28 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 48
%29 = bitcast i32* %28 to <4 x i32>*
store <4 x i32> <i32 48, i32 49, i32 50, i32 51>, <4 x i32>* %29
%30 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 52
%31 = bitcast i32* %30 to <4 x i32>*
store <4 x i32> <i32 52, i32 53, i32 54, i32 55>, <4 x i32>* %31
%32 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 56
%33 = bitcast i32* %32 to <4 x i32>*
store <4 x i32> <i32 56, i32 57, i32 58, i32 59>, <4 x i32>* %33
%34 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 60
%35 = bitcast i32* %34 to <4 x i32>*
store <4 x i32> <i32 60, i32 61, i32 62, i32 63>, <4 x i32>* %35
%36 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 64
%37 = bitcast i32* %36 to <4 x i32>*
store <4 x i32> <i32 64, i32 65, i32 66, i32 67>, <4 x i32>* %37
%38 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 68
%39 = bitcast i32* %38 to <4 x i32>*
store <4 x i32> <i32 68, i32 69, i32 70, i32 71>, <4 x i32>* %39
%40 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 72
%41 = bitcast i32* %40 to <4 x i32>*
store <4 x i32> <i32 72, i32 73, i32 74, i32 75>, <4 x i32>* %41
%42 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 76
%43 = bitcast i32* %42 to <4 x i32>*
store <4 x i32> <i32 76, i32 77, i32 78, i32 79>, <4 x i32>* %43
%44 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 80
%45 = bitcast i32* %44 to <4 x i32>*
store <4 x i32> <i32 80, i32 81, i32 82, i32 83>, <4 x i32>* %45
%46 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 84
%47 = bitcast i32* %46 to <4 x i32>*
store <4 x i32> <i32 84, i32 85, i32 86, i32 87>, <4 x i32>* %47
%48 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 88
%49 = bitcast i32* %48 to <4 x i32>*
store <4 x i32> <i32 88, i32 89, i32 90, i32 91>, <4 x i32>* %49
%50 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 92
%51 = bitcast i32* %50 to <4 x i32>*
store <4 x i32> <i32 92, i32 93, i32 94, i32 95>, <4 x i32>* %51
%52 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 96
%53 = bitcast i32* %52 to <4 x i32>*
store <4 x i32> <i32 96, i32 97, i32 98, i32 99>, <4 x i32>* %53
%54 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%55 = load i32, i32* %54
%56 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 0, i32 %55)
%57 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 1
%58 = load i32, i32* %57
%59 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 1, i32 %58)
%60 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 2
%61 = load i32, i32* %60
%62 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 2, i32 %61)
%63 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 3
%64 = load i32, i32* %63
%65 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 3, i32 %64)
%66 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 4
%67 = load i32, i32* %66
%68 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 4, i32 %67)
%69 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 5
%70 = load i32, i32* %69
%71 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 5, i32 %70)
%72 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 6
%73 = load i32, i32* %72
%74 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 6, i32 %73)
%75 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 7
%76 = load i32, i32* %75
%77 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 7, i32 %76)
%78 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 8
%79 = load i32, i32* %78
%80 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 8, i32 %79)
%81 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 9
%82 = load i32, i32* %81
%83 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 9, i32 %82)
br label %84
84: ; preds = %0, %84
%85 = phi i64 [ 0, %0 ], [ %90, %84 ]
%86 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %85
%87 = load i32, i32* %86
%88 = trunc i64 %85 to i32
%89 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %88, i32 %87)
%90 = add nuw nsw i64 %85, 1
%91 = icmp eq i64 %90, 100
br i1 %91, label %92, label %84
92: ; preds = %84
ret i32 0
}