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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x80,-0xc(%rbp)
jge    1157 <main+0x47>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
cltq
movb   $0x5,-0x90(%rbp,%rax,1)
05
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112c <main+0x1c>
movl   $0x0,-0xc(%rbp)
cmpl   $0x80,-0xc(%rbp)
jge    119e <main+0x8e>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
cltq
movsbl -0x90(%rbp,%rax,1),%eax
ff
cmp    $0x5,%eax
je     118b <main+0x7b>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    1190 <main+0x80>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    115e <main+0x4e>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x88,%rsp
movslq %edi,%rax
movaps 0xedf(%rip),%xmm0
movups %xmm0,(%rsp,%rax,1)
movups %xmm0,0x10(%rsp,%rax,1)
movups %xmm0,0x20(%rsp,%rax,1)
movups %xmm0,0x30(%rsp,%rax,1)
movups %xmm0,0x40(%rsp,%rax,1)
movups %xmm0,0x50(%rsp,%rax,1)
movups %xmm0,0x60(%rsp,%rax,1)
movups %xmm0,0x70(%rsp,%rax,1)
add    %rsp,%rax
add    $0x3,%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
cmpb   $0x5,-0x3(%rax,%rcx,1)
jne    1192 <main+0x82>
cmpb   $0x5,-0x2(%rax,%rcx,1)
jne    1192 <main+0x82>
cmpb   $0x5,-0x1(%rax,%rcx,1)
jne    1192 <main+0x82>
cmpb   $0x5,(%rax,%rcx,1)
jne    1192 <main+0x82>
add    $0x4,%rcx
cmp    $0x80,%rcx
jne    1160 <main+0x50>
xor    %eax,%eax
add    $0x88,%rsp
ret
xor    %eax,%eax
call   1030 <abort@plt>

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

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