#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)) main1(float *pa) {
  int i;
  for (i = 0; i < 3001; i++) {
    pa[i] = 2.0;
  }
  for (i = 0; i < 3001; i++) {
    if (pa[i] != 2.0)
      abort();
  }
  for (i = 1; i <= 10; i++) {
    pa[i] = 3.0;
  }
  for (i = 1; i <= 10; i++) {
    if (pa[i] != 3.0)
      abort();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xbb9,-0xc(%rbp)
jge    1153 <main1+0x43>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movss  0xed4(%rip),%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <main1+0x13>
movl   $0x0,-0xc(%rbp)
cmpl   $0xbb9,-0xc(%rbp)
jge    11af <main1+0x9f>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe88(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1195 <main1+0x85>
jp     1195 <main1+0x85>
jmp    119c <main1+0x8c>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    11a1 <main1+0x91>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    115a <main1+0x4a>
movl   $0x1,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jg     11e3 <main1+0xd3>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movss  0xe40(%rip),%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11b6 <main1+0xa6>
movl   $0x1,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jg     123c <main1+0x12c>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xdf3(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    1222 <main1+0x112>
jp     1222 <main1+0x112>
jmp    1229 <main1+0x119>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    122e <main1+0x11e>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11ea <main1+0xda>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main1>:
push   %rax
mov    $0x24,%eax
movaps 0xee3(%rip),%xmm0
nopl   (%rax)
movups %xmm0,-0x90(%rdi,%rax,4)
ff
movups %xmm0,-0x80(%rdi,%rax,4)
movups %xmm0,-0x70(%rdi,%rax,4)
movups %xmm0,-0x60(%rdi,%rax,4)
movups %xmm0,-0x50(%rdi,%rax,4)
movups %xmm0,-0x40(%rdi,%rax,4)
movups %xmm0,-0x30(%rdi,%rax,4)
movups %xmm0,-0x20(%rdi,%rax,4)
movups %xmm0,-0x10(%rdi,%rax,4)
movups %xmm0,(%rdi,%rax,4)
add    $0x28,%rax
cmp    $0xbdc,%rax
jne    1120 <main1+0x10>
movl   $0x40000000,0x2ee0(%rdi)
mov    $0x3,%eax
movss  0xea9(%rip),%xmm0
nopw   0x0(%rax,%rax,1)
movss  -0xc(%rdi,%rax,4),%xmm1
ucomiss %xmm0,%xmm1
jne    11e2 <main1+0xd2>
jp     11e2 <main1+0xd2>
cmp    $0xbbb,%rax
je     11c1 <main1+0xb1>
movss  -0x8(%rdi,%rax,4),%xmm1
ucomiss %xmm0,%xmm1
jne    11e2 <main1+0xd2>
jp     11e2 <main1+0xd2>
movss  -0x4(%rdi,%rax,4),%xmm1
ucomiss %xmm0,%xmm1
jne    11e2 <main1+0xd2>
jp     11e2 <main1+0xd2>
movss  (%rdi,%rax,4),%xmm1
ucomiss %xmm0,%xmm1
jne    11e2 <main1+0xd2>
jp     11e2 <main1+0xd2>
add    $0x4,%rax
jmp    1180 <main1+0x70>
movaps 0xe48(%rip),%xmm0
movups %xmm0,0x4(%rdi)
movups %xmm0,0x14(%rdi)
movabs $0x4040000040400000,%rax
mov    %rax,0x24(%rdi)
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define i32 @main1(float* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ 0, %1 ], [ %28, %2 ]
%4 = getelementptr inbounds float, float* %0, i64 %3
%5 = bitcast float* %4 to <4 x float>*
store <4 x float> <float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00>, <4 x float>* %5
%6 = getelementptr inbounds float, float* %4, i64 4
%7 = bitcast float* %6 to <4 x float>*
store <4 x float> <float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00>, <4 x float>* %7
%8 = add nuw nsw i64 %3, 8
%9 = getelementptr inbounds float, float* %0, i64 %8
%10 = bitcast float* %9 to <4 x float>*
store <4 x float> <float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00>, <4 x float>* %10
%11 = getelementptr inbounds float, float* %9, i64 4
%12 = bitcast float* %11 to <4 x float>*
store <4 x float> <float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00>, <4 x float>* %12
%13 = add nuw nsw i64 %3, 16
%14 = getelementptr inbounds float, float* %0, i64 %13
%15 = bitcast float* %14 to <4 x float>*
store <4 x float> <float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00>, <4 x float>* %15
%16 = getelementptr inbounds float, float* %14, i64 4
%17 = bitcast float* %16 to <4 x float>*
store <4 x float> <float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00>, <4 x float>* %17
%18 = add nuw nsw i64 %3, 24
%19 = getelementptr inbounds float, float* %0, i64 %18
%20 = bitcast float* %19 to <4 x float>*
store <4 x float> <float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00>, <4 x float>* %20
%21 = getelementptr inbounds float, float* %19, i64 4
%22 = bitcast float* %21 to <4 x float>*
store <4 x float> <float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00>, <4 x float>* %22
%23 = add nuw nsw i64 %3, 32
%24 = getelementptr inbounds float, float* %0, i64 %23
%25 = bitcast float* %24 to <4 x float>*
store <4 x float> <float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00>, <4 x float>* %25
%26 = getelementptr inbounds float, float* %24, i64 4
%27 = bitcast float* %26 to <4 x float>*
store <4 x float> <float 2.000000e+00, float 2.000000e+00, float 2.000000e+00, float 2.000000e+00>, <4 x float>* %27
%28 = add nuw nsw i64 %3, 40
%29 = icmp eq i64 %28, 3000
br i1 %29, label %30, label %2
30: ; preds = %2
%31 = getelementptr inbounds float, float* %0, i64 3000
store float 2.000000e+00, float* %31
br label %51
32: ; preds = %51
%33 = or i64 %52, 1
%34 = icmp eq i64 %33, 3001
br i1 %34, label %58, label %35
35: ; preds = %32
%36 = getelementptr inbounds float, float* %0, i64 %33
%37 = load float, float* %36
%38 = fcmp une float %37, 2.000000e+00
br i1 %38, label %56, label %39
39: ; preds = %35
%40 = or i64 %52, 2
%41 = getelementptr inbounds float, float* %0, i64 %40
%42 = load float, float* %41
%43 = fcmp une float %42, 2.000000e+00
br i1 %43, label %56, label %44
44: ; preds = %39
%45 = or i64 %52, 3
%46 = getelementptr inbounds float, float* %0, i64 %45
%47 = load float, float* %46
%48 = fcmp une float %47, 2.000000e+00
br i1 %48, label %56, label %49
49: ; preds = %44
%50 = add nuw nsw i64 %52, 4
br label %51
51: ; preds = %49, %30
%52 = phi i64 [ 0, %30 ], [ %50, %49 ]
%53 = getelementptr inbounds float, float* %0, i64 %52
%54 = load float, float* %53
%55 = fcmp une float %54, 2.000000e+00
br i1 %55, label %56, label %32
56: ; preds = %44, %39, %35, %51
%57 = tail call i32 (...) @abort()
unreachable
58: ; preds = %32
%59 = getelementptr inbounds float, float* %0, i64 1
%60 = bitcast float* %59 to <4 x float>*
store <4 x float> <float 3.000000e+00, float 3.000000e+00, float 3.000000e+00, float 3.000000e+00>, <4 x float>* %60
%61 = getelementptr inbounds float, float* %0, i64 5
%62 = bitcast float* %61 to <4 x float>*
store <4 x float> <float 3.000000e+00, float 3.000000e+00, float 3.000000e+00, float 3.000000e+00>, <4 x float>* %62
%63 = getelementptr inbounds float, float* %0, i64 9
store float 3.000000e+00, float* %63
%64 = getelementptr inbounds float, float* %0, i64 10
store float 3.000000e+00, float* %64
ret i32 0
}