#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*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int main(void) {
  int i;
  float result = 0;
  float in1[2311];
  int in2[2311];
  char in3[2311];
  float out1[2311];
  float out2[2311];
  for (i = 0; i < 2311; i++) {
    in1[i] = -0.34 * i;
    in2[i] = i * 3;
    in3[i] = i % 100;
  }
#pragma scop
#pragma species kernel in3[0 : SIZE - 1] |                                     \
                           element ^                                           \
                               in2[0 : SIZE - 1] |                             \
                                   element ^                                   \
                                       in1[0 : SIZE - 1] |                     \
                                           element->out1[0 : SIZE - 1] |       \
                                                         element ^             \
                                                             out2[0 : SIZE -   \
                                                                      1] |     \
                                                                  element
  for (i = 0; i < 2311; i++) {
    if (in3[i] > 50) {
      result = in2[i] / in1[i];
    } else {
      result = in2[i] * in1[i];
    }
    out1[i] = result;
    out2[i] = in3[i] / 255.0;
  }
#pragma species endkernel example5
#pragma endscop
  fflush(stdout);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x99a0,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x907,-0x8(%rbp)
jge    1195 <main+0x85>
cvtsi2sdl -0x8(%rbp),%xmm1
movsd  0xebd(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movslq -0x8(%rbp),%rax
movss  %xmm0,-0x2430(%rbp,%rax,4)
ff ff
imul   $0x3,-0x8(%rbp),%ecx
movslq -0x8(%rbp),%rax
mov    %ecx,-0x4850(%rbp,%rax,4)
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %dl,%cl
movslq -0x8(%rbp),%rax
mov    %cl,-0x5160(%rbp,%rax,1)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1131 <main+0x21>
movl   $0x0,-0x8(%rbp)
cmpl   $0x907,-0x8(%rbp)
jge    124e <main+0x13e>
movslq -0x8(%rbp),%rax
movsbl -0x5160(%rbp,%rax,1),%eax
ff
cmp    $0x32,%eax
jle    11e2 <main+0xd2>
movslq -0x8(%rbp),%rax
cvtsi2ssl -0x4850(%rbp,%rax,4),%xmm0
ff ff
movslq -0x8(%rbp),%rax
divss  -0x2430(%rbp,%rax,4),%xmm0
ff ff
movss  %xmm0,-0xc(%rbp)
jmp    1201 <main+0xf1>
movslq -0x8(%rbp),%rax
cvtsi2ssl -0x4850(%rbp,%rax,4),%xmm0
ff ff
movslq -0x8(%rbp),%rax
mulss  -0x2430(%rbp,%rax,4),%xmm0
ff ff
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movslq -0x8(%rbp),%rax
movss  %xmm0,-0x7580(%rbp,%rax,4)
ff ff
movslq -0x8(%rbp),%rax
movsbl -0x5160(%rbp,%rax,1),%eax
ff
cvtsi2sd %eax,%xmm0
movsd  0xdd5(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movslq -0x8(%rbp),%rax
movss  %xmm0,-0x99a0(%rbp,%rax,4)
ff ff
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    119c <main+0x8c>
mov    0x2d8b(%rip),%rax
mov    (%rax),%edi
call   1030 <fflush@plt>
xor    %eax,%eax
add    $0x99a0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
call   1030 <fflush@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdout = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
%4 = alloca [2311 x float]
%5 = alloca [2311 x i32]
%6 = alloca [2311 x i8]
%7 = alloca [2311 x float]
%8 = alloca [2311 x float]
store i32 0, i32* %1
store float 0.000000e+00, float* %3
store i32 0, i32* %2
br label %9
9: ; preds = %31, %0
%10 = load i32, i32* %2
%11 = icmp slt i32 %10, 2311
br i1 %11, label %12, label %34
12: ; preds = %9
%13 = load i32, i32* %2
%14 = sitofp i32 %13 to double
%15 = fmul double -3.400000e-01, %14
%16 = fptrunc double %15 to float
%17 = load i32, i32* %2
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [2311 x float], [2311 x float]* %4, i64 0, i64 %18
store float %16, float* %19
%20 = load i32, i32* %2
%21 = mul nsw i32 %20, 3
%22 = load i32, i32* %2
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [2311 x i32], [2311 x i32]* %5, i64 0, i64 %23
store i32 %21, i32* %24
%25 = load i32, i32* %2
%26 = srem i32 %25, 100
%27 = trunc i32 %26 to i8
%28 = load i32, i32* %2
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [2311 x i8], [2311 x i8]* %6, i64 0, i64 %29
store i8 %27, i8* %30
br label %31
31: ; preds = %12
%32 = load i32, i32* %2
%33 = add nsw i32 %32, 1
store i32 %33, i32* %2
br label %9
34: ; preds = %9
store i32 0, i32* %2
br label %35
35: ; preds = %83, %34
%36 = load i32, i32* %2
%37 = icmp slt i32 %36, 2311
br i1 %37, label %38, label %86
38: ; preds = %35
%39 = load i32, i32* %2
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds [2311 x i8], [2311 x i8]* %6, i64 0, i64 %40
%42 = load i8, i8* %41
%43 = sext i8 %42 to i32
%44 = icmp sgt i32 %43, 50
br i1 %44, label %45, label %56
45: ; preds = %38
%46 = load i32, i32* %2
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [2311 x i32], [2311 x i32]* %5, i64 0, i64 %47
%49 = load i32, i32* %48
%50 = sitofp i32 %49 to float
%51 = load i32, i32* %2
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds [2311 x float], [2311 x float]* %4, i64 0, i64 %52
%54 = load float, float* %53
%55 = fdiv float %50, %54
store float %55, float* %3
br label %67
56: ; preds = %38
%57 = load i32, i32* %2
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds [2311 x i32], [2311 x i32]* %5, i64 0, i64 %58
%60 = load i32, i32* %59
%61 = sitofp i32 %60 to float
%62 = load i32, i32* %2
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds [2311 x float], [2311 x float]* %4, i64 0, i64 %63
%65 = load float, float* %64
%66 = fmul float %61, %65
store float %66, float* %3
br label %67
67: ; preds = %56, %45
%68 = load float, float* %3
%69 = load i32, i32* %2
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds [2311 x float], [2311 x float]* %7, i64 0, i64 %70
store float %68, float* %71
%72 = load i32, i32* %2
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds [2311 x i8], [2311 x i8]* %6, i64 0, i64 %73
%75 = load i8, i8* %74
%76 = sext i8 %75 to i32
%77 = sitofp i32 %76 to double
%78 = fdiv double %77, 2.550000e+02
%79 = fptrunc double %78 to float
%80 = load i32, i32* %2
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds [2311 x float], [2311 x float]* %8, i64 0, i64 %81
store float %79, float* %82
br label %83
83: ; preds = %67
%84 = load i32, i32* %2
%85 = add nsw i32 %84, 1
store i32 %85, i32* %2
br label %35
86: ; preds = %35
%87 = load i32, i32* @stdout
%88 = call i32 @fflush(i32 %87)
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
define i32 @main() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fflush(i32 %1)
ret i32 0
}