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


x86 assembly (clang, -O0):
<main1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x81,-0x4(%rbp)
jge    114d <main1+0x3d>
mov    -0x4(%rbp),%eax
mov    %al,%cl
movslq -0x4(%rbp),%rax
mov    %cl,-0x120(%rbp,%rax,1)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1122 <main1+0x12>
movl   $0x1,-0x4(%rbp)
cmpl   $0x81,-0x4(%rbp)
jge    1189 <main1+0x79>
movslq -0x4(%rbp),%rax
mov    -0x120(%rbp,%rax,1),%cl
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
cltq
mov    %cl,-0x90(%rbp,%rax,1)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1154 <main1+0x44>
movl   $0x1,-0x4(%rbp)
cmpl   $0x80,-0x4(%rbp)
jg     11db <main1+0xcb>
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
cltq
movsbl -0x90(%rbp,%rax,1),%eax
ff
movslq -0x4(%rbp),%rcx
movsbl -0x120(%rbp,%rcx,1),%ecx
ff
cmp    %ecx,%eax
je     11c8 <main1+0xb8>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    11cd <main1+0xbd>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1190 <main1+0x80>
xor    %eax,%eax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main1>:
sub    $0x118,%rsp
movaps 0xee2(%rip),%xmm0
movaps %xmm0,(%rsp)
movaps 0xee7(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeeb(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xeef(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xef3(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xef7(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xefb(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xeff(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movb   $0x80,0x80(%rsp)
80
movups 0x1(%rsp),%xmm0
movaps %xmm0,0x90(%rsp)
movups 0x11(%rsp),%xmm0
movaps %xmm0,0xa0(%rsp)
movups 0x21(%rsp),%xmm0
movaps %xmm0,0xb0(%rsp)
movups 0x31(%rsp),%xmm0
movaps %xmm0,0xc0(%rsp)
movups 0x41(%rsp),%xmm0
movaps %xmm0,0xd0(%rsp)
movups 0x51(%rsp),%xmm0
movaps %xmm0,0xe0(%rsp)
movups 0x61(%rsp),%xmm0
movaps %xmm0,0xf0(%rsp)
mov    0x71(%rsp),%rax
mov    %rax,0x100(%rsp)
mov    0x79(%rsp),%eax
mov    %eax,0x108(%rsp)
movzwl 0x7d(%rsp),%eax
mov    %ax,0x10c(%rsp)
mov    0x7f(%rsp),%al
mov    %al,0x10e(%rsp)
mov    0x80(%rsp),%al
mov    %al,0x10f(%rsp)
xor    %eax,%eax
nopl   0x0(%rax)
movzbl 0x90(%rsp,%rax,1),%ecx
cmp    0x1(%rsp,%rax,1),%cl
jne    126e <main1+0x15e>
movzbl 0x91(%rsp,%rax,1),%ecx
cmp    0x2(%rsp,%rax,1),%cl
jne    126e <main1+0x15e>
movzbl 0x92(%rsp,%rax,1),%ecx
cmp    0x3(%rsp,%rax,1),%cl
jne    126e <main1+0x15e>
movzbl 0x93(%rsp,%rax,1),%ecx
cmp    0x4(%rsp,%rax,1),%cl
jne    126e <main1+0x15e>
add    $0x4,%rax
cmp    $0x80,%rax
jne    1220 <main1+0x110>
xor    %eax,%eax
add    $0x118,%rsp
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main1() {
%1 = alloca i32
%2 = alloca [128 x i8]
%3 = alloca [129 x i8]
store i32 0, i32* %1
br label %4
4: ; preds = %13, %0
%5 = load i32, i32* %1
%6 = icmp slt i32 %5, 129
br i1 %6, label %7, label %16
7: ; preds = %4
%8 = load i32, i32* %1
%9 = trunc i32 %8 to i8
%10 = load i32, i32* %1
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [129 x i8], [129 x i8]* %3, i64 0, i64 %11
store i8 %9, i8* %12
br label %13
13: ; preds = %7
%14 = load i32, i32* %1
%15 = add nsw i32 %14, 1
store i32 %15, i32* %1
br label %4
16: ; preds = %4
store i32 1, i32* %1
br label %17
17: ; preds = %29, %16
%18 = load i32, i32* %1
%19 = icmp slt i32 %18, 129
br i1 %19, label %20, label %32
20: ; preds = %17
%21 = load i32, i32* %1
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [129 x i8], [129 x i8]* %3, i64 0, i64 %22
%24 = load i8, i8* %23
%25 = load i32, i32* %1
%26 = sub nsw i32 %25, 1
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 %27
store i8 %24, i8* %28
br label %29
29: ; preds = %20
%30 = load i32, i32* %1
%31 = add nsw i32 %30, 1
store i32 %31, i32* %1
br label %17
32: ; preds = %17
store i32 1, i32* %1
br label %33
33: ; preds = %52, %32
%34 = load i32, i32* %1
%35 = icmp sle i32 %34, 128
br i1 %35, label %36, label %55
36: ; preds = %33
%37 = load i32, i32* %1
%38 = sub nsw i32 %37, 1
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 %39
%41 = load i8, i8* %40
%42 = sext i8 %41 to i32
%43 = load i32, i32* %1
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [129 x i8], [129 x i8]* %3, i64 0, i64 %44
%46 = load i8, i8* %45
%47 = sext i8 %46 to i32
%48 = icmp ne i32 %42, %47
br i1 %48, label %49, label %51
49: ; preds = %36
%50 = call i32 (...) @abort()
unreachable
51: ; preds = %36
br label %52
52: ; preds = %51
%53 = load i32, i32* %1
%54 = add nsw i32 %53, 1
store i32 %54, i32* %1
br label %33
55: ; preds = %33
ret i32 0
}

LLVM IR (-O2):
define i32 @main1() {
%1 = alloca [128 x i8]
%2 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%3 = alloca [129 x i8]
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [129 x i8], [129 x i8]* %3, i64 0, i64 0
%6 = bitcast [129 x i8]* %3 to <16 x i8>*
store <16 x i8> <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8, i8 9, i8 10, i8 11, i8 12, i8 13, i8 14, i8 15>, <16 x i8>* %6
%7 = getelementptr inbounds [129 x i8], [129 x i8]* %3, i64 0, i64 16
%8 = bitcast i8* %7 to <16 x i8>*
store <16 x i8> <i8 16, i8 17, i8 18, i8 19, i8 20, i8 21, i8 22, i8 23, i8 24, i8 25, i8 26, i8 27, i8 28, i8 29, i8 30, i8 31>, <16 x i8>* %8
%9 = getelementptr inbounds [129 x i8], [129 x i8]* %3, i64 0, i64 32
%10 = bitcast i8* %9 to <16 x i8>*
store <16 x i8> <i8 32, i8 33, i8 34, i8 35, i8 36, i8 37, i8 38, i8 39, i8 40, i8 41, i8 42, i8 43, i8 44, i8 45, i8 46, i8 47>, <16 x i8>* %10
%11 = getelementptr inbounds [129 x i8], [129 x i8]* %3, i64 0, i64 48
%12 = bitcast i8* %11 to <16 x i8>*
store <16 x i8> <i8 48, i8 49, i8 50, i8 51, i8 52, i8 53, i8 54, i8 55, i8 56, i8 57, i8 58, i8 59, i8 60, i8 61, i8 62, i8 63>, <16 x i8>* %12
%13 = getelementptr inbounds [129 x i8], [129 x i8]* %3, i64 0, i64 64
%14 = bitcast i8* %13 to <16 x i8>*
store <16 x i8> <i8 64, i8 65, i8 66, i8 67, i8 68, i8 69, i8 70, i8 71, i8 72, i8 73, i8 74, i8 75, i8 76, i8 77, i8 78, i8 79>, <16 x i8>* %14
%15 = getelementptr inbounds [129 x i8], [129 x i8]* %3, i64 0, i64 80
%16 = bitcast i8* %15 to <16 x i8>*
store <16 x i8> <i8 80, i8 81, i8 82, i8 83, i8 84, i8 85, i8 86, i8 87, i8 88, i8 89, i8 90, i8 91, i8 92, i8 93, i8 94, i8 95>, <16 x i8>* %16
%17 = getelementptr inbounds [129 x i8], [129 x i8]* %3, i64 0, i64 96
%18 = bitcast i8* %17 to <16 x i8>*
store <16 x i8> <i8 96, i8 97, i8 98, i8 99, i8 100, i8 101, i8 102, i8 103, i8 104, i8 105, i8 106, i8 107, i8 108, i8 109, i8 110, i8 111>, <16 x i8>* %18
%19 = getelementptr inbounds [129 x i8], [129 x i8]* %3, i64 0, i64 112
%20 = bitcast i8* %19 to <16 x i8>*
store <16 x i8> <i8 112, i8 113, i8 114, i8 115, i8 116, i8 117, i8 118, i8 119, i8 120, i8 121, i8 122, i8 123, i8 124, i8 125, i8 126, i8 127>, <16 x i8>* %20
%21 = getelementptr inbounds [129 x i8], [129 x i8]* %3, i64 0, i64 128
store i8 -128, i8* %21
%22 = getelementptr inbounds [129 x i8], [129 x i8]* %3, i64 0, i64 1
br label %47
23: ; preds = %47
%24 = add nuw nsw i64 %48, 1
%25 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 %48
%26 = load i8, i8* %25
%27 = getelementptr inbounds [129 x i8], [129 x i8]* %3, i64 0, i64 %24
%28 = load i8, i8* %27
%29 = icmp eq i8 %26, %28
br i1 %29, label %30, label %55
30: ; preds = %23
%31 = add nuw nsw i64 %48, 2
%32 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 %24
%33 = load i8, i8* %32
%34 = getelementptr inbounds [129 x i8], [129 x i8]* %3, i64 0, i64 %31
%35 = load i8, i8* %34
%36 = icmp eq i8 %33, %35
br i1 %36, label %37, label %55
37: ; preds = %30
%38 = add nuw nsw i64 %48, 3
%39 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 %31
%40 = load i8, i8* %39
%41 = getelementptr inbounds [129 x i8], [129 x i8]* %3, i64 0, i64 %38
%42 = load i8, i8* %41
%43 = icmp eq i8 %40, %42
br i1 %43, label %44, label %55
44: ; preds = %37
%45 = add nuw nsw i64 %48, 4
%46 = icmp eq i64 %45, 129
br i1 %46, label %57, label %47
47: ; preds = %44, %0
%48 = phi i64 [ 1, %0 ], [ %45, %44 ]
%49 = add nsw i64 %48, -1
%50 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 %49
%51 = load i8, i8* %50
%52 = getelementptr inbounds [129 x i8], [129 x i8]* %3, i64 0, i64 %48
%53 = load i8, i8* %52
%54 = icmp eq i8 %51, %53
br i1 %54, label %23, label %55
55: ; preds = %37, %30, %23, %47
%56 = tail call i32 (...) @abort()
unreachable
57: ; preds = %44
ret i32 0
}