#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_1(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_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x80,-0x8(%rbp)
jge    1150 <main_1+0x40>
mov    -0x8(%rbp),%eax
add    -0x4(%rbp),%eax
cltq
movb   $0x5,-0x90(%rbp,%rax,1)
05
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1125 <main_1+0x15>
movl   $0x0,-0x8(%rbp)
cmpl   $0x80,-0x8(%rbp)
jge    1197 <main_1+0x87>
mov    -0x8(%rbp),%eax
add    -0x4(%rbp),%eax
cltq
movsbl -0x90(%rbp,%rax,1),%eax
ff
cmp    $0x5,%eax
je     1184 <main_1+0x74>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    1189 <main_1+0x79>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1157 <main_1+0x47>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main_1>:
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_1+0x82>
cmpb   $0x5,-0x2(%rax,%rcx,1)
jne    1192 <main_1+0x82>
cmpb   $0x5,-0x1(%rax,%rcx,1)
jne    1192 <main_1+0x82>
cmpb   $0x5,(%rax,%rcx,1)
jne    1192 <main_1+0x82>
add    $0x4,%rcx
cmp    $0x80,%rcx
jne    1160 <main_1+0x50>
xor    %eax,%eax
add    $0x88,%rsp
ret
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define i32 @main_1(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
}