#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 */
float HUGE_VAL;
int /*<<< orphan*/ assert(int);
float pow(float, float);
void compute_curve_gamma_table_type_parametric(float gamma_table[256],
                                               float parameter[7], int count) {
  size_t X;
  float interval;
  float a, b, c, e, f;
  float y = parameter[0];
  if (count == 0) {
    a = 1;
    b = 0;
    c = 0;
    e = 0;
    f = 0;
    interval = -HUGE_VAL;
  } else if (count == 1) {
    a = parameter[1];
    b = parameter[2];
    c = 0;
    e = 0;
    f = 0;
    interval = -1 * parameter[2] / parameter[1];
  } else if (count == 2) {
    a = parameter[1];
    b = parameter[2];
    c = 0;
    e = parameter[3];
    f = parameter[3];
    interval = -1 * parameter[2] / parameter[1];
  } else if (count == 3) {
    a = parameter[1];
    b = parameter[2];
    c = parameter[3];
    e = -c;
    f = 0;
    interval = parameter[4];
  } else if (count == 4) {
    a = parameter[1];
    b = parameter[2];
    c = parameter[3];
    e = parameter[5] - c;
    f = parameter[6];
    interval = parameter[4];
  } else {
    assert(0 && "invalid parametric function type.");
    a = 1;
    b = 0;
    c = 0;
    e = 0;
    f = 0;
    interval = -HUGE_VAL;
  }
  for (X = 0; X < 256; X++) {
    if (X >= interval) {
      gamma_table[X] = pow(a * X / 255. + b, y) + c + e;
    } else {
      gamma_table[X] = c * X / 255. + f;
    }
  }
}


x86 assembly (clang, -O0):
<compute_curve_gamma_table_type_parametric>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x3c(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1199 <compute_curve_gamma_table_type_parametric+0x79>
movss  0xeae(%rip),%xmm0
movss  %xmm0,-0x28(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x2c(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x34(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x38(%rbp)
mov    0x2e6a(%rip),%rax
movss  (%rax),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x24(%rbp)
jmp    139c <compute_curve_gamma_table_type_parametric+0x27c>
cmpl   $0x1,-0x14(%rbp)
jne    11fb <compute_curve_gamma_table_type_parametric+0xdb>
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
movss  %xmm0,-0x28(%rbp)
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
movss  %xmm0,-0x2c(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x34(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x38(%rbp)
mov    -0x10(%rbp),%rax
movss  0xe21(%rip),%xmm0
mulss  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
divss  0x4(%rax),%xmm0
movss  %xmm0,-0x24(%rbp)
jmp    1397 <compute_curve_gamma_table_type_parametric+0x277>
cmpl   $0x2,-0x14(%rbp)
jne    1269 <compute_curve_gamma_table_type_parametric+0x149>
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
movss  %xmm0,-0x28(%rbp)
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
movss  %xmm0,-0x2c(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x30(%rbp)
mov    -0x10(%rbp),%rax
movss  0xc(%rax),%xmm0
movss  %xmm0,-0x34(%rbp)
mov    -0x10(%rbp),%rax
movss  0xc(%rax),%xmm0
movss  %xmm0,-0x38(%rbp)
mov    -0x10(%rbp),%rax
movss  0xdb3(%rip),%xmm0
mulss  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
divss  0x4(%rax),%xmm0
movss  %xmm0,-0x24(%rbp)
jmp    1392 <compute_curve_gamma_table_type_parametric+0x272>
cmpl   $0x3,-0x14(%rbp)
jne    12cf <compute_curve_gamma_table_type_parametric+0x1af>
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
movss  %xmm0,-0x28(%rbp)
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
movss  %xmm0,-0x2c(%rbp)
mov    -0x10(%rbp),%rax
movss  0xc(%rax),%xmm0
movss  %xmm0,-0x30(%rbp)
movss  -0x30(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x34(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x38(%rbp)
mov    -0x10(%rbp),%rax
movss  0x10(%rax),%xmm0
movss  %xmm0,-0x24(%rbp)
jmp    138d <compute_curve_gamma_table_type_parametric+0x26d>
cmpl   $0x4,-0x14(%rbp)
jne    1337 <compute_curve_gamma_table_type_parametric+0x217>
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
movss  %xmm0,-0x28(%rbp)
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
movss  %xmm0,-0x2c(%rbp)
mov    -0x10(%rbp),%rax
movss  0xc(%rax),%xmm0
movss  %xmm0,-0x30(%rbp)
mov    -0x10(%rbp),%rax
movss  0x14(%rax),%xmm0
subss  -0x30(%rbp),%xmm0
movss  %xmm0,-0x34(%rbp)
mov    -0x10(%rbp),%rax
movss  0x18(%rax),%xmm0
movss  %xmm0,-0x38(%rbp)
mov    -0x10(%rbp),%rax
movss  0x10(%rax),%xmm0
movss  %xmm0,-0x24(%rbp)
jmp    1388 <compute_curve_gamma_table_type_parametric+0x268>
xor    %edi,%edi
call   1030 <assert@plt>
movss  0xcba(%rip),%xmm0
movss  %xmm0,-0x28(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x2c(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x34(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x38(%rbp)
mov    0x2c76(%rip),%rax
movss  (%rax),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x24(%rbp)
jmp    138d <compute_curve_gamma_table_type_parametric+0x26d>
jmp    1392 <compute_curve_gamma_table_type_parametric+0x272>
jmp    1397 <compute_curve_gamma_table_type_parametric+0x277>
jmp    139c <compute_curve_gamma_table_type_parametric+0x27c>
movq   $0x0,-0x20(%rbp)
cmpq   $0x100,-0x20(%rbp)
jae    1533 <compute_curve_gamma_table_type_parametric+0x413>
mov    -0x20(%rbp),%rax
mov    %rax,%rdx
shr    %rdx
mov    %eax,%ecx
and    $0x1,%ecx
or     %rdx,%rcx
cvtsi2ss %rcx,%xmm0
addss  %xmm0,%xmm0
cvtsi2ss %rax,%xmm1
movss  %xmm1,-0x44(%rbp)
test   %rax,%rax
movss  %xmm0,-0x40(%rbp)
js     13ef <compute_curve_gamma_table_type_parametric+0x2cf>
movss  -0x44(%rbp),%xmm0
movss  %xmm0,-0x40(%rbp)
movss  -0x40(%rbp),%xmm0
ucomiss -0x24(%rbp),%xmm0
jb     149a <compute_curve_gamma_table_type_parametric+0x37a>
movss  -0x28(%rbp),%xmm0
movss  %xmm0,-0x50(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rdx
shr    %rdx
mov    %eax,%ecx
and    $0x1,%ecx
or     %rdx,%rcx
cvtsi2ss %rcx,%xmm0
addss  %xmm0,%xmm0
cvtsi2ss %rax,%xmm1
movss  %xmm1,-0x4c(%rbp)
test   %rax,%rax
movss  %xmm0,-0x48(%rbp)
js     1445 <compute_curve_gamma_table_type_parametric+0x325>
movss  -0x4c(%rbp),%xmm0
movss  %xmm0,-0x48(%rbp)
movss  -0x50(%rbp),%xmm0
movss  -0x48(%rbp),%xmm1
mulss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xba9(%rip),%xmm1
divsd  %xmm1,%xmm0
movss  -0x2c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  -0x3c(%rbp),%xmm1
call   1040 <pow@plt>
addss  -0x30(%rbp),%xmm0
addss  -0x34(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
jmp    151d <compute_curve_gamma_table_type_parametric+0x3fd>
movss  -0x30(%rbp),%xmm0
movss  %xmm0,-0x5c(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rdx
shr    %rdx
mov    %eax,%ecx
and    $0x1,%ecx
or     %rdx,%rcx
cvtsi2ss %rcx,%xmm0
addss  %xmm0,%xmm0
cvtsi2ss %rax,%xmm1
movss  %xmm1,-0x58(%rbp)
test   %rax,%rax
movss  %xmm0,-0x54(%rbp)
js     14e1 <compute_curve_gamma_table_type_parametric+0x3c1>
movss  -0x58(%rbp),%xmm0
movss  %xmm0,-0x54(%rbp)
movss  -0x5c(%rbp),%xmm0
movss  -0x54(%rbp),%xmm1
mulss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xb0d(%rip),%xmm1
divsd  %xmm1,%xmm0
movss  -0x38(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
jmp    1522 <compute_curve_gamma_table_type_parametric+0x402>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    13a4 <compute_curve_gamma_table_type_parametric+0x284>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compute_curve_gamma_table_type_parametric>:
push   %r14
push   %rbx
sub    $0x68,%rsp
mov    %rdi,%r14
movss  (%rsi),%xmm0
movss  %xmm0,0xc(%rsp)
cmp    $0x4,%edx
ja     1164 <compute_curve_gamma_table_type_parametric+0x44>
mov    %edx,%eax
lea    0xede(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movsd  0x4(%rsi),%xmm2
movaps %xmm2,%xmm3
shufps $0x55,%xmm2,%xmm3
xorps  0xea2(%rip),%xmm3
divss  %xmm2,%xmm3
jmp    1185 <compute_curve_gamma_table_type_parametric+0x65>
xor    %edi,%edi
call   1030 <assert@plt>
mov    0x2e76(%rip),%rax
movss  (%rax),%xmm3
xorps  0xe83(%rip),%xmm3
movss  0xe8b(%rip),%xmm2
xorps  %xmm4,%xmm4
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
jmp    11d6 <compute_curve_gamma_table_type_parametric+0xb6>
movsd  0x4(%rsi),%xmm2
movaps %xmm2,%xmm3
shufps $0x55,%xmm2,%xmm3
movss  0xc(%rsi),%xmm0
xorps  0xe56(%rip),%xmm3
divss  %xmm2,%xmm3
xorps  %xmm4,%xmm4
movaps %xmm0,0x10(%rsp)
jmp    11fd <compute_curve_gamma_table_type_parametric+0xdd>
movsd  0x4(%rsi),%xmm2
movss  0xc(%rsi),%xmm4
movaps 0xe37(%rip),%xmm0
xorps  %xmm4,%xmm0
movaps %xmm0,0x10(%rsp)
movss  0x10(%rsi),%xmm3
xorps  %xmm0,%xmm0
jmp    11fd <compute_curve_gamma_table_type_parametric+0xdd>
movsd  0x4(%rsi),%xmm2
movss  0xc(%rsi),%xmm4
movss  0x14(%rsi),%xmm0
subss  %xmm4,%xmm0
movaps %xmm0,0x10(%rsp)
movss  0x18(%rsi),%xmm0
movss  0x10(%rsi),%xmm3
movaps %xmm2,%xmm1
shufps $0x55,%xmm2,%xmm1
cvtss2sd %xmm1,%xmm1
movsd  %xmm1,0x28(%rsp)
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0x20(%rsp)
xor    %ebx,%ebx
movsd  0xdf6(%rip),%xmm1
movaps %xmm2,0x50(%rsp)
movaps %xmm3,0x40(%rsp)
movaps %xmm4,0x30(%rsp)
jmp    1269 <compute_curve_gamma_table_type_parametric+0x149>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mulss  %xmm4,%xmm0
cvtss2sd %xmm0,%xmm0
divsd  %xmm1,%xmm0
addsd  0x20(%rsp),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,(%r14,%rbx,4)
add    $0x1,%rbx
cmp    $0x100,%rbx
je     12e6 <compute_curve_gamma_table_type_parametric+0x1c6>
test   %rbx,%rbx
js     1280 <compute_curve_gamma_table_type_parametric+0x160>
xorps  %xmm0,%xmm0
cvtsi2ss %rbx,%xmm0
ucomiss %xmm3,%xmm0
jb     1240 <compute_curve_gamma_table_type_parametric+0x120>
jmp    129f <compute_curve_gamma_table_type_parametric+0x17f>
nopl   (%rax)
mov    %rbx,%rax
shr    %rax
mov    %ebx,%ecx
and    $0x1,%ecx
or     %rax,%rcx
xorps  %xmm0,%xmm0
cvtsi2ss %rcx,%xmm0
addss  %xmm0,%xmm0
ucomiss %xmm3,%xmm0
jb     1240 <compute_curve_gamma_table_type_parametric+0x120>
mulss  %xmm2,%xmm0
cvtss2sd %xmm0,%xmm0
divsd  %xmm1,%xmm0
addsd  0x28(%rsp),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  0xc(%rsp),%xmm1
call   1040 <pow@plt>
movsd  0xd50(%rip),%xmm1
movaps 0x30(%rsp),%xmm4
movaps 0x40(%rsp),%xmm3
movaps 0x50(%rsp),%xmm2
addss  %xmm4,%xmm0
addss  0x10(%rsp),%xmm0
jmp    1256 <compute_curve_gamma_table_type_parametric+0x136>
add    $0x68,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@HUGE_VAL = global float 0.000000e+00
define void @compute_curve_gamma_table_type_parametric(float* %0, float* %1, i32 %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca i32
%7 = alloca i64
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
%13 = alloca float
%14 = alloca float
store float* %0, float** %4
store float* %1, float** %5
store i32 %2, i32* %6
%15 = load float*, float** %5
%16 = getelementptr inbounds float, float* %15, i64 0
%17 = load float, float* %16
store float %17, float* %14
%18 = load i32, i32* %6
%19 = icmp eq i32 %18, 0
br i1 %19, label %20, label %23
20: ; preds = %3
store float 1.000000e+00, float* %9
store float 0.000000e+00, float* %10
store float 0.000000e+00, float* %11
store float 0.000000e+00, float* %12
store float 0.000000e+00, float* %13
%21 = load float, float* @HUGE_VAL
%22 = fneg float %21
store float %22, float* %8
br label %115
23: ; preds = %3
%24 = load i32, i32* %6
%25 = icmp eq i32 %24, 1
br i1 %25, label %26, label %41
26: ; preds = %23
%27 = load float*, float** %5
%28 = getelementptr inbounds float, float* %27, i64 1
%29 = load float, float* %28
store float %29, float* %9
%30 = load float*, float** %5
%31 = getelementptr inbounds float, float* %30, i64 2
%32 = load float, float* %31
store float %32, float* %10
store float 0.000000e+00, float* %11
store float 0.000000e+00, float* %12
store float 0.000000e+00, float* %13
%33 = load float*, float** %5
%34 = getelementptr inbounds float, float* %33, i64 2
%35 = load float, float* %34
%36 = fmul float -1.000000e+00, %35
%37 = load float*, float** %5
%38 = getelementptr inbounds float, float* %37, i64 1
%39 = load float, float* %38
%40 = fdiv float %36, %39
store float %40, float* %8
br label %114
41: ; preds = %23
%42 = load i32, i32* %6
%43 = icmp eq i32 %42, 2
br i1 %43, label %44, label %65
44: ; preds = %41
%45 = load float*, float** %5
%46 = getelementptr inbounds float, float* %45, i64 1
%47 = load float, float* %46
store float %47, float* %9
%48 = load float*, float** %5
%49 = getelementptr inbounds float, float* %48, i64 2
%50 = load float, float* %49
store float %50, float* %10
store float 0.000000e+00, float* %11
%51 = load float*, float** %5
%52 = getelementptr inbounds float, float* %51, i64 3
%53 = load float, float* %52
store float %53, float* %12
%54 = load float*, float** %5
%55 = getelementptr inbounds float, float* %54, i64 3
%56 = load float, float* %55
store float %56, float* %13
%57 = load float*, float** %5
%58 = getelementptr inbounds float, float* %57, i64 2
%59 = load float, float* %58
%60 = fmul float -1.000000e+00, %59
%61 = load float*, float** %5
%62 = getelementptr inbounds float, float* %61, i64 1
%63 = load float, float* %62
%64 = fdiv float %60, %63
store float %64, float* %8
br label %113
65: ; preds = %41
%66 = load i32, i32* %6
%67 = icmp eq i32 %66, 3
br i1 %67, label %68, label %83
68: ; preds = %65
%69 = load float*, float** %5
%70 = getelementptr inbounds float, float* %69, i64 1
%71 = load float, float* %70
store float %71, float* %9
%72 = load float*, float** %5
%73 = getelementptr inbounds float, float* %72, i64 2
%74 = load float, float* %73
store float %74, float* %10
%75 = load float*, float** %5
%76 = getelementptr inbounds float, float* %75, i64 3
%77 = load float, float* %76
store float %77, float* %11
%78 = load float, float* %11
%79 = fneg float %78
store float %79, float* %12
store float 0.000000e+00, float* %13
%80 = load float*, float** %5
%81 = getelementptr inbounds float, float* %80, i64 4
%82 = load float, float* %81
store float %82, float* %8
br label %112
83: ; preds = %65
%84 = load i32, i32* %6
%85 = icmp eq i32 %84, 4
br i1 %85, label %86, label %107
86: ; preds = %83
%87 = load float*, float** %5
%88 = getelementptr inbounds float, float* %87, i64 1
%89 = load float, float* %88
store float %89, float* %9
%90 = load float*, float** %5
%91 = getelementptr inbounds float, float* %90, i64 2
%92 = load float, float* %91
store float %92, float* %10
%93 = load float*, float** %5
%94 = getelementptr inbounds float, float* %93, i64 3
%95 = load float, float* %94
store float %95, float* %11
%96 = load float*, float** %5
%97 = getelementptr inbounds float, float* %96, i64 5
%98 = load float, float* %97
%99 = load float, float* %11
%100 = fsub float %98, %99
store float %100, float* %12
%101 = load float*, float** %5
%102 = getelementptr inbounds float, float* %101, i64 6
%103 = load float, float* %102
store float %103, float* %13
%104 = load float*, float** %5
%105 = getelementptr inbounds float, float* %104, i64 4
%106 = load float, float* %105
store float %106, float* %8
br label %111
107: ; preds = %83
%108 = call i32 @assert(i32 0)
store float 1.000000e+00, float* %9
store float 0.000000e+00, float* %10
store float 0.000000e+00, float* %11
store float 0.000000e+00, float* %12
store float 0.000000e+00, float* %13
%109 = load float, float* @HUGE_VAL
%110 = fneg float %109
store float %110, float* %8
br label %111
111: ; preds = %107, %86
br label %112
112: ; preds = %111, %68
br label %113
113: ; preds = %112, %44
br label %114
114: ; preds = %113, %26
br label %115
115: ; preds = %114, %20
store i64 0, i64* %7
br label %116
116: ; preds = %159, %115
%117 = load i64, i64* %7
%118 = icmp ult i64 %117, 256
br i1 %118, label %119, label %162
119: ; preds = %116
%120 = load i64, i64* %7
%121 = uitofp i64 %120 to float
%122 = load float, float* %8
%123 = fcmp oge float %121, %122
br i1 %123, label %124, label %144
124: ; preds = %119
%125 = load float, float* %9
%126 = load i64, i64* %7
%127 = uitofp i64 %126 to float
%128 = fmul float %125, %127
%129 = fpext float %128 to double
%130 = fdiv double %129, 2.550000e+02
%131 = load float, float* %10
%132 = fpext float %131 to double
%133 = fadd double %130, %132
%134 = fptrunc double %133 to float
%135 = load float, float* %14
%136 = call float @pow(float %134, float %135)
%137 = load float, float* %11
%138 = fadd float %136, %137
%139 = load float, float* %12
%140 = fadd float %138, %139
%141 = load float*, float** %4
%142 = load i64, i64* %7
%143 = getelementptr inbounds float, float* %141, i64 %142
store float %140, float* %143
br label %158
144: ; preds = %119
%145 = load float, float* %11
%146 = load i64, i64* %7
%147 = uitofp i64 %146 to float
%148 = fmul float %145, %147
%149 = fpext float %148 to double
%150 = fdiv double %149, 2.550000e+02
%151 = load float, float* %13
%152 = fpext float %151 to double
%153 = fadd double %150, %152
%154 = fptrunc double %153 to float
%155 = load float*, float** %4
%156 = load i64, i64* %7
%157 = getelementptr inbounds float, float* %155, i64 %156
store float %154, float* %157
br label %158
158: ; preds = %144, %124
br label %159
159: ; preds = %158
%160 = load i64, i64* %7
%161 = add i64 %160, 1
store i64 %161, i64* %7
br label %116
162: ; preds = %116
ret void
}

LLVM IR (-O2):
@HUGE_VAL = global float 0.000000e+00
define void @compute_curve_gamma_table_type_parametric(float* nocapture writeonly %0, float* nocapture %1, i32 %2) {
%4 = load float, float* %1
switch i32 %2, label %48 [
i32 0, label %5
i32 1, label %8
i32 2, label %16
i32 3, label %26
i32 4, label %35
]
5: ; preds = %3
%6 = load float, float* @HUGE_VAL
%7 = fneg float %6
br label %52
8: ; preds = %3
%9 = getelementptr inbounds float, float* %1, i64 1
%10 = bitcast float* %9 to <2 x float>*
%11 = load <2 x float>, <2 x float>* %10
%12 = extractelement <2 x float> %11, i64 1
%13 = fneg float %12
%14 = extractelement <2 x float> %11, i64 0
%15 = fdiv float %13, %14
br label %52
16: ; preds = %3
%17 = getelementptr inbounds float, float* %1, i64 1
%18 = bitcast float* %17 to <2 x float>*
%19 = load <2 x float>, <2 x float>* %18
%20 = getelementptr inbounds float, float* %1, i64 3
%21 = load float, float* %20
%22 = extractelement <2 x float> %19, i64 1
%23 = fneg float %22
%24 = extractelement <2 x float> %19, i64 0
%25 = fdiv float %23, %24
br label %52
26: ; preds = %3
%27 = getelementptr inbounds float, float* %1, i64 1
%28 = bitcast float* %27 to <2 x float>*
%29 = load <2 x float>, <2 x float>* %28
%30 = getelementptr inbounds float, float* %1, i64 3
%31 = load float, float* %30
%32 = fneg float %31
%33 = getelementptr inbounds float, float* %1, i64 4
%34 = load float, float* %33
br label %52
35: ; preds = %3
%36 = getelementptr inbounds float, float* %1, i64 1
%37 = bitcast float* %36 to <2 x float>*
%38 = load <2 x float>, <2 x float>* %37
%39 = getelementptr inbounds float, float* %1, i64 3
%40 = load float, float* %39
%41 = getelementptr inbounds float, float* %1, i64 5
%42 = load float, float* %41
%43 = fsub float %42, %40
%44 = getelementptr inbounds float, float* %1, i64 6
%45 = load float, float* %44
%46 = getelementptr inbounds float, float* %1, i64 4
%47 = load float, float* %46
br label %52
48: ; preds = %3
%49 = tail call i32 @assert(i32 0)
%50 = load float, float* @HUGE_VAL
%51 = fneg float %50
br label %52
52: ; preds = %8, %26, %48, %35, %16, %5
%53 = phi float [ %7, %5 ], [ %15, %8 ], [ %25, %16 ], [ %34, %26 ], [ %47, %35 ], [ %51, %48 ]
%54 = phi float [ 0.000000e+00, %5 ], [ 0.000000e+00, %8 ], [ 0.000000e+00, %16 ], [ %31, %26 ], [ %40, %35 ], [ 0.000000e+00, %48 ]
%55 = phi float [ 0.000000e+00, %5 ], [ 0.000000e+00, %8 ], [ %21, %16 ], [ %32, %26 ], [ %43, %35 ], [ 0.000000e+00, %48 ]
%56 = phi float [ 0.000000e+00, %5 ], [ 0.000000e+00, %8 ], [ %21, %16 ], [ 0.000000e+00, %26 ], [ %45, %35 ], [ 0.000000e+00, %48 ]
%57 = phi <2 x float> [ <float 1.000000e+00, float 0.000000e+00>, %5 ], [ %11, %8 ], [ %19, %16 ], [ %29, %26 ], [ %38, %35 ], [ <float 1.000000e+00, float 0.000000e+00>, %48 ]
%58 = extractelement <2 x float> %57, i64 1
%59 = fpext float %58 to double
%60 = fpext float %56 to double
%61 = extractelement <2 x float> %57, i64 0
br label %62
62: ; preds = %52, %81
%63 = phi i64 [ 0, %52 ], [ %84, %81 ]
%64 = uitofp i64 %63 to float
%65 = fcmp ugt float %53, %64
br i1 %65, label %75, label %66
66: ; preds = %62
%67 = fmul float %61, %64
%68 = fpext float %67 to double
%69 = fdiv double %68, 2.550000e+02
%70 = fadd double %69, %59
%71 = fptrunc double %70 to float
%72 = tail call float @pow(float %71, float %4)
%73 = fadd float %54, %72
%74 = fadd float %55, %73
br label %81
75: ; preds = %62
%76 = fmul float %54, %64
%77 = fpext float %76 to double
%78 = fdiv double %77, 2.550000e+02
%79 = fadd double %78, %60
%80 = fptrunc double %79 to float
br label %81
81: ; preds = %66, %75
%82 = phi float [ %80, %75 ], [ %74, %66 ]
%83 = getelementptr inbounds float, float* %0, i64 %63
store float %82, float* %83
%84 = add nuw nsw i64 %63, 1
%85 = icmp eq i64 %84, 256
br i1 %85, label %86, label %62
86: ; preds = %81
ret void
}