#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();
__attribute__((no)) int main1(int *a) {
  int i, j, k;
  int b[16];
  for (i = 0; i < 16; i++) {
    for (j = 0; j < 16; j++) {
      k = i + 16;
      a[j] = k;
    }
    b[i] = k;
  }
  for (j = 0; j < 16; j++)
    if (a[j] != i + 16 - 1)
      abort();
  for (j = 0; j < 16; j++)
    if (b[j] != j + 16)
      abort();
  return 0;
}


x86 assembly (clang, -O0):
<main1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x10,-0xc(%rbp)
jge    117c <main1+0x6c>
movl   $0x0,-0x10(%rbp)
cmpl   $0x10,-0x10(%rbp)
jge    1163 <main1+0x53>
mov    -0xc(%rbp),%eax
add    $0x10,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1134 <main1+0x24>
mov    -0x14(%rbp),%ecx
movslq -0xc(%rbp),%rax
mov    %ecx,-0x60(%rbp,%rax,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <main1+0x13>
movl   $0x0,-0x10(%rbp)
cmpl   $0x10,-0x10(%rbp)
jge    11c3 <main1+0xb3>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0xc(%rbp),%ecx
add    $0x10,%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
je     11b0 <main1+0xa0>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    11b5 <main1+0xa5>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1183 <main1+0x73>
movl   $0x0,-0x10(%rbp)
cmpl   $0x10,-0x10(%rbp)
jge    1204 <main1+0xf4>
movslq -0x10(%rbp),%rax
mov    -0x60(%rbp,%rax,4),%eax
mov    -0x10(%rbp),%ecx
add    $0x10,%ecx
cmp    %ecx,%eax
je     11f1 <main1+0xe1>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    11f6 <main1+0xe6>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    11ca <main1+0xba>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main1>:
sub    $0x48,%rsp
movdqa 0xee4(%rip),%xmm0
movdqa %xmm0,(%rsp)
movdqa 0xee7(%rip),%xmm1
movdqa %xmm1,0x10(%rsp)
movdqa 0xee9(%rip),%xmm2
movdqa %xmm2,0x20(%rsp)
movdqa 0xeeb(%rip),%xmm3
movdqa %xmm3,0x30(%rsp)
movdqa 0xeed(%rip),%xmm4
movdqu %xmm4,(%rdi)
movdqu %xmm4,0x10(%rdi)
movdqu %xmm4,0x20(%rdi)
movdqu %xmm4,0x30(%rdi)
pcmpeqd 0x30(%rsp),%xmm3
pcmpeqd %xmm4,%xmm4
pxor   %xmm4,%xmm3
pcmpeqd 0x20(%rsp),%xmm2
pxor   %xmm4,%xmm2
packssdw %xmm3,%xmm2
pcmpeqd 0x10(%rsp),%xmm1
pxor   %xmm4,%xmm1
pcmpeqd (%rsp),%xmm0
pxor   %xmm4,%xmm0
packssdw %xmm1,%xmm0
packsswb %xmm2,%xmm0
pmovmskb %xmm0,%eax
test   %eax,%eax
jne    11ac <main1+0x9c>
xor    %eax,%eax
add    $0x48,%rsp
ret
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define i32 @main1(i32* nocapture %0) {
%2 = alloca <16 x i32>
%3 = bitcast <16 x i32>* %2 to i8*
%4 = getelementptr inbounds i32, i32* %0, i64 12
%5 = getelementptr inbounds i32, i32* %0, i64 8
%6 = getelementptr inbounds i32, i32* %0, i64 4
%7 = bitcast <16 x i32>* %2 to <4 x i32>*
store <4 x i32> <i32 16, i32 17, i32 18, i32 19>, <4 x i32>* %7
%8 = getelementptr inbounds <16 x i32>, <16 x i32>* %2, i64 0, i64 4
%9 = bitcast i32* %8 to <4 x i32>*
store <4 x i32> <i32 20, i32 21, i32 22, i32 23>, <4 x i32>* %9
%10 = getelementptr inbounds <16 x i32>, <16 x i32>* %2, i64 0, i64 8
%11 = bitcast i32* %10 to <4 x i32>*
store <4 x i32> <i32 24, i32 25, i32 26, i32 27>, <4 x i32>* %11
%12 = getelementptr inbounds <16 x i32>, <16 x i32>* %2, i64 0, i64 12
%13 = bitcast i32* %12 to <4 x i32>*
store <4 x i32> <i32 28, i32 29, i32 30, i32 31>, <4 x i32>* %13
%14 = bitcast i32* %0 to <4 x i32>*
store <4 x i32> <i32 31, i32 31, i32 31, i32 31>, <4 x i32>* %14
%15 = bitcast i32* %6 to <4 x i32>*
store <4 x i32> <i32 31, i32 31, i32 31, i32 31>, <4 x i32>* %15
%16 = bitcast i32* %5 to <4 x i32>*
store <4 x i32> <i32 31, i32 31, i32 31, i32 31>, <4 x i32>* %16
%17 = bitcast i32* %4 to <4 x i32>*
store <4 x i32> <i32 31, i32 31, i32 31, i32 31>, <4 x i32>* %17
%18 = load <16 x i32>, <16 x i32>* %2
%19 = freeze <16 x i32> %18
%20 = icmp ne <16 x i32> %19, <i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31>
%21 = bitcast <16 x i1> %20 to i16
%22 = icmp eq i16 %21, 0
br i1 %22, label %23, label %24
23: ; preds = %1
ret i32 0
24: ; preds = %1
%25 = tail call i32 (...) @abort()
unreachable
}