#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 */
scalar_t__ malloc(int);
float *generar_e2() {
  int i;
  float *e2 = (float *)malloc(sizeof(float) * 256);
  for (i = 0; i < 256; i++) {
    if (i < 128) {
      float m = ((1.0 / 128.0) - (1.0 / 512.0)) / (127.0 - 0.0);
      float b = 1.0 / 512.0;
      e2[i] = m * i + b;
    } else {
      float m = ((1.0 / 512.0) - (1.0 / 128.0)) / (255.0 - 128.0);
      float b = -(m * 128.0) + (1.0 / 128.0);
      e2[i] = m * i + b;
    }
  }
  return e2;
}


x86 assembly (clang, -O0):
<generar_e2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x400,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x100,-0x4(%rbp)
jge    120f <generar_e2+0xff>
cmpl   $0x80,-0x4(%rbp)
jge    118a <generar_e2+0x7a>
movss  0xec9(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xeb8(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x14(%rbp),%xmm0
cvtsi2ssl -0x4(%rbp),%xmm2
movss  -0x18(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
jmp    11fc <generar_e2+0xec>
movss  0xe7e(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe60(%rip),%xmm1
mulsd  %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xe35(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x1c(%rbp),%xmm0
cvtsi2ssl -0x4(%rbp),%xmm2
movss  -0x20(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
jmp    1201 <generar_e2+0xf1>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112d <generar_e2+0x1d>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<generar_e2>:
push   %rax
mov    $0x400,%edi
call   1030 <malloc@plt>
movdqa 0xedd(%rip),%xmm7
movdqa 0xee5(%rip),%xmm6
movaps 0xeee(%rip),%xmm2
xor    %ecx,%ecx
movdqa 0xef4(%rip),%xmm3
movdqa 0xefb(%rip),%xmm10
movaps 0xf03(%rip),%xmm8
movaps 0xf0b(%rip),%xmm9
movaps 0xf13(%rip),%xmm11
movaps 0xf1b(%rip),%xmm13
movdqa 0xf22(%rip),%xmm14
movdqa 0xf39(%rip),%xmm15
movdqa 0xf40(%rip),%xmm12
movdqa %xmm6,%xmm1
pxor   %xmm3,%xmm1
movdqa %xmm10,%xmm4
pcmpgtd %xmm1,%xmm4
movdqa %xmm7,%xmm0
pxor   %xmm3,%xmm0
movdqa %xmm10,%xmm5
pcmpgtd %xmm0,%xmm5
pcmpeqd %xmm10,%xmm1
pcmpeqd %xmm10,%xmm0
shufps $0xdd,%xmm0,%xmm1
movdqa %xmm4,%xmm0
shufps $0x88,%xmm5,%xmm0
andps  %xmm0,%xmm1
shufps $0xdd,%xmm5,%xmm4
orps   %xmm1,%xmm4
cvtdq2ps %xmm2,%xmm0
movaps %xmm0,%xmm1
mulps  %xmm8,%xmm1
addps  %xmm9,%xmm1
mulps  %xmm11,%xmm0
addps  %xmm13,%xmm0
andps  %xmm4,%xmm1
andnps %xmm0,%xmm4
orps   %xmm1,%xmm4
movups %xmm4,(%rax,%rcx,4)
movdqa %xmm7,%xmm0
paddq  %xmm14,%xmm0
movdqa %xmm6,%xmm1
paddq  %xmm14,%xmm1
pxor   %xmm3,%xmm1
movdqa %xmm10,%xmm4
pcmpgtd %xmm1,%xmm4
pxor   %xmm3,%xmm0
movdqa %xmm10,%xmm5
pcmpgtd %xmm0,%xmm5
pcmpeqd %xmm10,%xmm1
pcmpeqd %xmm10,%xmm0
shufps $0xdd,%xmm0,%xmm1
movdqa %xmm4,%xmm0
shufps $0x88,%xmm5,%xmm0
andps  %xmm0,%xmm1
shufps $0xdd,%xmm5,%xmm4
movaps %xmm2,%xmm0
paddd  0xe67(%rip),%xmm0
orps   %xmm1,%xmm4
cvtdq2ps %xmm0,%xmm0
movaps %xmm0,%xmm1
mulps  %xmm8,%xmm1
addps  %xmm9,%xmm1
mulps  %xmm11,%xmm0
addps  %xmm13,%xmm0
andps  %xmm4,%xmm1
andnps %xmm0,%xmm4
orps   %xmm1,%xmm4
movups %xmm4,0x10(%rax,%rcx,4)
add    $0x8,%rcx
paddq  %xmm15,%xmm6
paddq  %xmm15,%xmm7
paddd  %xmm12,%xmm2
cmp    $0x100,%rcx
jne    1180 <generar_e2+0x70>
pop    %rcx
ret

LLVM IR (-O0):
define float* @generar_e2() {
%1 = alloca i32
%2 = alloca float*
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = call i64 @malloc(i32 1024)
%8 = inttoptr i64 %7 to float*
store float* %8, float** %2
store i32 0, i32* %1
br label %9
9: ; preds = %42, %0
%10 = load i32, i32* %1
%11 = icmp slt i32 %10, 256
br i1 %11, label %12, label %45
12: ; preds = %9
%13 = load i32, i32* %1
%14 = icmp slt i32 %13, 128
br i1 %14, label %15, label %25
15: ; preds = %12
store float 0x3F083060C0000000, float* %3
store float 0x3F60000000000000, float* %4
%16 = load float, float* %3
%17 = load i32, i32* %1
%18 = sitofp i32 %17 to float
%19 = load float, float* %4
%20 = call float @llvm.fmuladd.f32(float %16, float %18, float %19)
%21 = load float*, float** %2
%22 = load i32, i32* %1
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds float, float* %21, i64 %23
store float %20, float* %24
br label %41
25: ; preds = %12
store float 0xBF083060C0000000, float* %5
%26 = load float, float* %5
%27 = fpext float %26 to double
%28 = fmul double %27, 1.280000e+02
%29 = fneg double %28
%30 = fadd double %29, 7.812500e-03
%31 = fptrunc double %30 to float
store float %31, float* %6
%32 = load float, float* %5
%33 = load i32, i32* %1
%34 = sitofp i32 %33 to float
%35 = load float, float* %6
%36 = call float @llvm.fmuladd.f32(float %32, float %34, float %35)
%37 = load float*, float** %2
%38 = load i32, i32* %1
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds float, float* %37, i64 %39
store float %36, float* %40
br label %41
41: ; preds = %25, %15
br label %42
42: ; preds = %41
%43 = load i32, i32* %1
%44 = add nsw i32 %43, 1
store i32 %44, i32* %1
br label %9
45: ; preds = %9
%46 = load float*, float** %2
ret float* %46
}

LLVM IR (-O2):
define float* @generar_e2() {
%1 = tail call i64 @malloc(i32 1024)
%2 = inttoptr i64 %1 to float*
br label %3
3: ; preds = %3, %0
%4 = phi i64 [ 0, %0 ], [ %24, %3 ]
%5 = phi <4 x i64> [ <i64 0, i64 1, i64 2, i64 3>, %0 ], [ %25, %3 ]
%6 = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %0 ], [ %26, %3 ]
%7 = icmp ult <4 x i64> %5, <i64 128, i64 128, i64 128, i64 128>
%8 = sitofp <4 x i32> %6 to <4 x float>
%9 = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %8, <4 x float> <float 0x3F083060C0000000, float 0x3F083060C0000000, float 0x3F083060C0000000, float 0x3F083060C0000000>, <4 x float> <float 0x3F60000000000000, float 0x3F60000000000000, float 0x3F60000000000000, float 0x3F60000000000000>)
%10 = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %8, <4 x float> <float 0xBF083060C0000000, float 0xBF083060C0000000, float 0xBF083060C0000000, float 0xBF083060C0000000>, <4 x float> <float 0x3F8C183060000000, float 0x3F8C183060000000, float 0x3F8C183060000000, float 0x3F8C183060000000>)
%11 = select <4 x i1> %7, <4 x float> %9, <4 x float> %10
%12 = getelementptr inbounds float, float* %2, i64 %4
%13 = bitcast float* %12 to <4 x float>*
store <4 x float> %11, <4 x float>* %13
%14 = or i64 %4, 4
%15 = add <4 x i64> %5, <i64 4, i64 4, i64 4, i64 4>
%16 = add <4 x i32> %6, <i32 4, i32 4, i32 4, i32 4>
%17 = icmp ult <4 x i64> %15, <i64 128, i64 128, i64 128, i64 128>
%18 = sitofp <4 x i32> %16 to <4 x float>
%19 = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %18, <4 x float> <float 0x3F083060C0000000, float 0x3F083060C0000000, float 0x3F083060C0000000, float 0x3F083060C0000000>, <4 x float> <float 0x3F60000000000000, float 0x3F60000000000000, float 0x3F60000000000000, float 0x3F60000000000000>)
%20 = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %18, <4 x float> <float 0xBF083060C0000000, float 0xBF083060C0000000, float 0xBF083060C0000000, float 0xBF083060C0000000>, <4 x float> <float 0x3F8C183060000000, float 0x3F8C183060000000, float 0x3F8C183060000000, float 0x3F8C183060000000>)
%21 = select <4 x i1> %17, <4 x float> %19, <4 x float> %20
%22 = getelementptr inbounds float, float* %2, i64 %14
%23 = bitcast float* %22 to <4 x float>*
store <4 x float> %21, <4 x float>* %23
%24 = add nuw nsw i64 %4, 8
%25 = add <4 x i64> %5, <i64 8, i64 8, i64 8, i64 8>
%26 = add <4 x i32> %6, <i32 8, i32 8, i32 8, i32 8>
%27 = icmp eq i64 %24, 256
br i1 %27, label %28, label %3
28: ; preds = %3
ret float* %2
}