#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 */
typedef int /*<<< orphan*/ ages;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int ages[50] = {192, 34, 465, 76, 68, 8, 97};
  ages[1] = 32;
  for (int i = 0; i < sizeof(ages); i++) {
    printf("ages[%d]=%d\n", i, ages[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xd0(%rbp),%rdi
lea    0xec0(%rip),%rsi
mov    $0xc8,%edx
call   1040 <memcpy@plt>
movl   $0x20,-0xcc(%rbp)
movl   $0x0,-0xd4(%rbp)
movslq -0xd4(%rbp),%rax
cmp    $0xc8,%rax
jae    11a5 <main+0x85>
mov    -0xd4(%rbp),%esi
movslq -0xd4(%rbp),%rax
mov    -0xd0(%rbp,%rax,4),%edx
lea    0xf3c(%rip),%rdi
call   1030 <printf@plt>
mov    -0xd4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd4(%rbp)
jmp    115e <main+0x3e>
xor    %eax,%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0xc8,%rsp
lea    0xecf(%rip),%rsi
mov    %rsp,%rdi
mov    $0xc8,%edx
call   1040 <memcpy@plt>
movl   $0x20,0x4(%rsp)
xor    %ebx,%ebx
lea    0xf79(%rip),%r14
nop
mov    (%rsp,%rbx,4),%edx
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    $0xc8,%rbx
jne    1150 <main+0x30>
xor    %eax,%eax
add    $0xc8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.ages = <{ i32, i32, i32, i32, i32, i32, i32, [43 x i32] }> <{ i32 192, i32 34, i32 465, i32 76, i32 68, i32 8, i32 97, [43 x i32] zeroinitializer }>
@.str = [13 x i8] c"ages[%d]=%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [50 x i32]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [50 x i32]* %2 to i8*
%5 = getelementptr inbounds [50 x i32], [50 x i32]* %2, i64 0, i64 1
store i32 32, i32* %5
store i32 0, i32* %3
br label %6
6: ; preds = %17, %0
%7 = load i32, i32* %3
%8 = sext i32 %7 to i64
%9 = icmp ult i64 %8, 200
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i32, i32* %3
%12 = load i32, i32* %3
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [50 x i32], [50 x i32]* %2, i64 0, i64 %13
%15 = load i32, i32* %14
%16 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 1
store i32 %19, i32* %3
br label %6
20: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
@__const.main.ages = <{ i32, i32, i32, i32, i32, i32, i32, [43 x i32] }> <{ i32 192, i32 34, i32 465, i32 76, i32 68, i32 8, i32 97, [43 x i32] zeroinitializer }>
@.str = [13 x i8] c"ages[%d]=%d\0A\00"
define i32 @main() {
%1 = alloca [50 x i32]
%2 = bitcast [50 x i32]* %1 to i8*
%3 = getelementptr inbounds [50 x i32], [50 x i32]* %1, i64 0, i64 1
store i32 32, i32* %3
br label %5
4: ; preds = %5
ret i32 0
5: ; preds = %0, %5
%6 = phi i64 [ 0, %0 ], [ %11, %5 ]
%7 = getelementptr inbounds [50 x i32], [50 x i32]* %1, i64 0, i64 %6
%8 = load i32, i32* %7
%9 = trunc i64 %6 to i32
%10 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %8)
%11 = add nuw nsw i64 %6, 1
%12 = icmp eq i64 %11, 200
br i1 %12, label %4, label %5
}