#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*/ abort();
int main() {
  int i;
  char ia[128 + 1];
  for (i = 1; i <= 128; i++) {
    ia[i] = 5;
  }
  for (i = 1; i <= 128; i++) {
    if (ia[i] != 5)
      abort();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x80,-0x8(%rbp)
jg     1150 <main+0x40>
movslq -0x8(%rbp),%rax
movb   $0x5,-0x90(%rbp,%rax,1)
05
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <main+0x19>
movl   $0x1,-0x8(%rbp)
cmpl   $0x80,-0x8(%rbp)
jg     1193 <main+0x83>
movslq -0x8(%rbp),%rax
movsbl -0x90(%rbp,%rax,1),%eax
ff
cmp    $0x5,%eax
je     1180 <main+0x70>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    1185 <main+0x75>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1157 <main+0x47>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x88,%rsp
movaps 0xee2(%rip),%xmm0
movups %xmm0,0x71(%rsp)
movups %xmm0,0x61(%rsp)
movups %xmm0,0x51(%rsp)
movups %xmm0,0x41(%rsp)
movups %xmm0,0x31(%rsp)
movups %xmm0,0x21(%rsp)
movups %xmm0,0x11(%rsp)
movups %xmm0,0x1(%rsp)
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
cmpb   $0x5,0x2(%rsp,%rax,1)
jne    1176 <main+0x66>
cmpb   $0x5,0x3(%rsp,%rax,1)
jne    1176 <main+0x66>
cmpb   $0x5,0x4(%rsp,%rax,1)
jne    1176 <main+0x66>
cmp    $0x7c,%rax
je     117d <main+0x6d>
cmpb   $0x5,0x5(%rsp,%rax,1)
lea    0x4(%rax),%rax
je     1150 <main+0x40>
xor    %eax,%eax
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x88,%rsp
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [129 x i8]
%2 = getelementptr inbounds [129 x i8], [129 x i8]* %1, i64 0, i64 0
%3 = getelementptr inbounds [129 x i8], [129 x i8]* %1, i64 0, i64 1
br label %4
4: ; preds = %23, %0
%5 = phi i64 [ 1, %0 ], [ %21, %23 ]
%6 = add nuw nsw i64 %5, 1
%7 = getelementptr inbounds [129 x i8], [129 x i8]* %1, i64 0, i64 %6
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 5
br i1 %9, label %10, label %27
10: ; preds = %4
%11 = add nuw nsw i64 %5, 2
%12 = getelementptr inbounds [129 x i8], [129 x i8]* %1, i64 0, i64 %11
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 5
br i1 %14, label %15, label %27
15: ; preds = %10
%16 = add nuw nsw i64 %5, 3
%17 = getelementptr inbounds [129 x i8], [129 x i8]* %1, i64 0, i64 %16
%18 = load i8, i8* %17
%19 = icmp eq i8 %18, 5
br i1 %19, label %20, label %27
20: ; preds = %15
%21 = add nuw nsw i64 %5, 4
%22 = icmp eq i64 %21, 129
br i1 %22, label %29, label %23
23: ; preds = %20
%24 = getelementptr inbounds [129 x i8], [129 x i8]* %1, i64 0, i64 %21
%25 = load i8, i8* %24
%26 = icmp eq i8 %25, 5
br i1 %26, label %4, label %27
27: ; preds = %23, %15, %10, %4
%28 = tail call i32 (...) @abort()
unreachable
29: ; preds = %20
ret i32 0
}