#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;
  short sb[16] = {0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45};
  int ia[16];
  for (i = 0; i < 16; i++) {
    ia[i] = (int)sb[i];
  }
  for (i = 0; i < 16; i++) {
    if (ia[i] != (int)sb[i])
      abort();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xedb(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed8(%rip),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1174 <main1+0x64>
movslq -0x4(%rbp),%rax
movswl -0x30(%rbp,%rax,2),%ecx
movslq -0x4(%rbp),%rax
mov    %ecx,-0x70(%rbp,%rax,4)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    114b <main1+0x3b>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    11b8 <main1+0xa8>
movslq -0x4(%rbp),%rax
mov    -0x70(%rbp,%rax,4),%eax
movslq -0x4(%rbp),%rcx
movswl -0x30(%rbp,%rcx,2),%ecx
cmp    %ecx,%eax
je     11a5 <main1+0x95>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    11aa <main1+0x9a>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    117b <main1+0x6b>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main1>:
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @main1() {
ret i32 0
}