#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, ...);
void main() {
  int i;
  int c[10], a[10];
  int b[5] = {2, 5, 7, 11, 24};
  int d[10] = {0};
  c[0] = 1;
  c[1] = 2;
  c[2] = 3;
  c[3] = 4;
  c[4] = 5;
  c[5] = 6;
  c[6] = 7;
  c[7] = 8;
  c[8] = 9;
  c[9] = 10;
  printf("\n%d %d %d %d %d %d %d %d %d %d\n", c[0], c[1], c[2], c[3], c[4],
         c[5], c[6], c[7], c[8], c[9]);
  for (i = 0; i < 10; i += 1) {
    a[i] = i + 1;
    printf("%d ", a[i]);
  }
  for (i = 0; i < 5; i += 1) {
    printf("\n%d", b[i]);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
sub    $0xe0,%rsp
mov    0xecb(%rip),%rax
mov    %rax,-0x90(%rbp)
mov    0xec5(%rip),%rax
mov    %rax,-0x88(%rbp)
mov    0xec0(%rip),%eax
mov    %eax,-0x80(%rbp)
lea    -0xc0(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1040 <memset@plt>
movl   $0x1,-0x40(%rbp)
movl   $0x2,-0x3c(%rbp)
movl   $0x3,-0x38(%rbp)
movl   $0x4,-0x34(%rbp)
movl   $0x5,-0x30(%rbp)
movl   $0x6,-0x2c(%rbp)
movl   $0x7,-0x28(%rbp)
movl   $0x8,-0x24(%rbp)
movl   $0x9,-0x20(%rbp)
movl   $0xa,-0x1c(%rbp)
mov    -0x40(%rbp),%esi
mov    -0x3c(%rbp),%edx
mov    -0x38(%rbp),%ecx
mov    -0x34(%rbp),%r8d
mov    -0x30(%rbp),%r9d
mov    -0x2c(%rbp),%r14d
mov    -0x28(%rbp),%ebx
mov    -0x24(%rbp),%r11d
mov    -0x20(%rbp),%r10d
mov    -0x1c(%rbp),%eax
lea    0xe3e(%rip),%rdi
mov    %r14d,(%rsp)
mov    %ebx,0x8(%rsp)
mov    %r11d,0x10(%rsp)
mov    %r10d,0x18(%rsp)
mov    %eax,0x20(%rsp)
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0xa,-0x14(%rbp)
jge    1236 <main+0x116>
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
movslq -0x14(%rbp),%rax
mov    %ecx,-0x70(%rbp,%rax,4)
movslq -0x14(%rbp),%rax
mov    -0x70(%rbp,%rax,4),%esi
lea    0xe13(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11fa <main+0xda>
movl   $0x0,-0x14(%rbp)
cmpl   $0x5,-0x14(%rbp)
jge    126e <main+0x14e>
movslq -0x14(%rbp),%rax
mov    -0x90(%rbp,%rax,4),%esi
lea    0xddf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    123d <main+0x11d>
add    $0xe0,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x8,%rsp
lea    0xee4(%rip),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
mov    $0x4,%r8d
mov    $0x5,%r9d
xor    %eax,%eax
push   $0xa
push   $0x9
push   $0x8
push   $0x7
push   $0x6
call   1030 <printf@plt>
add    $0x30,%rsp
lea    0xecd(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe34(%rip),%rbx
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xb,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x18,%esi
xor    %eax,%eax
pop    %rbx
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [32 x i8] c"\0A%d %d %d %d %d %d %d %d %d %d\0A\00"
@.str.1 = [4 x i8] c"%d \00"
@.str.2 = [4 x i8] c"\0A%d\00"
define void @main() {
%1 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10)
%2 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 1)
%3 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 2)
%4 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%5 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 4)
%6 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 5)
%7 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 6)
%8 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 7)
%9 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 8)
%10 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 9)
%11 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 10)
%12 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 2)
%13 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 5)
%14 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 7)
%15 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 11)
%16 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 24)
ret void
}