#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 */
double cos(double);
double exp(double);
double sin(double);
float F(float x, float y, int Ind) {
  float f, Y, X;
  if (Ind == 1) {
    if (y < 0.0)
      Y = 0.0;
    else if (y > 1.0)
      Y = 1.0;
    else
      Y = y;
    f = 2.0 - 0.5 * (cos(3.141592 * (Y - 0.5)) * cos(3.141592 * (Y - 0.5)));
  } else if (Ind == 2) {
    if (y < 0.0)
      Y = 0.0;
    else if (y > 1.0)
      Y = 1.0;
    else
      Y = y;
    f = 2.0 - 0.5 * (sin(3.141592 * (Y - 0.5)) * sin(3.141592 * (Y - 0.5)));
  } else if (Ind == 10) {
    if (x < 0.0)
      X = 0.0;
    else if (x > 1.0)
      X = 1.0;
    else
      X = x;
    f = 2.0 - 0.5 * (cos(3.141592 * (X - 0.5)) * cos(3.141592 * (X - 0.5)));
  } else if (Ind == 3) {
    f = 2.5 - 0.4 * y;
    f = f - 0.8 * exp(-10.0 * (y - 0.3) * (y - 0.3)) *
                exp(-20.0 * (x - 0.25) * (x - 0.25));
  } else if (Ind == 4) {
    f = 2.5 - 0.4 * y;
    f = f - 0.8 * exp(-10.0 * (y - 0.9) * (y - 0.9)) *
                exp(-20.0 * (x - 0.55) * (x - 0.55));
  } else
    f = 1.0;
  return (f);
}


x86 assembly (clang, -O0):
<F>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    1231 <F+0x101>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    1172 <F+0x42>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    11ae <F+0x7e>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xecd(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    119f <F+0x6f>
movss  0xe6b(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    11a9 <F+0x79>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    11ae <F+0x7e>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xeb1(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xe9d(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1050 <cos@plt>
movsd  %xmm0,-0x20(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe86(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xe72(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1050 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xe45(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe41(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    1646 <F+0x516>
cmpl   $0x2,-0xc(%rbp)
jne    131d <F+0x1ed>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    125e <F+0x12e>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    129a <F+0x16a>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xde1(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    128b <F+0x15b>
movss  0xd7f(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1295 <F+0x165>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    129a <F+0x16a>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xdc5(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xdb1(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1030 <sin@plt>
movsd  %xmm0,-0x28(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xd9a(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xd86(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1030 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xd59(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd55(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    1641 <F+0x511>
cmpl   $0xa,-0xc(%rbp)
jne    1409 <F+0x2d9>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    134a <F+0x21a>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
jmp    1386 <F+0x256>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xcf5(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1377 <F+0x247>
movss  0xc93(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
jmp    1381 <F+0x251>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
jmp    1386 <F+0x256>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xcd9(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xcc5(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1050 <cos@plt>
movsd  %xmm0,-0x30(%rbp)
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xcae(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xc9a(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1050 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xc6d(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc69(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    163c <F+0x50c>
cmpl   $0x3,-0xc(%rbp)
jne    1517 <F+0x3e7>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xc0c(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc08(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xbec(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xbc0(%rip),%xmm0
mulsd  %xmm1,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xbcb(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
call   1040 <exp@plt>
movaps %xmm0,%xmm1
movsd  0xb83(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xb91(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xb55(%rip),%xmm0
mulsd  %xmm1,%xmm0
movss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xb70(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
call   1040 <exp@plt>
movsd  -0x40(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x38(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    1637 <F+0x507>
cmpl   $0x4,-0xc(%rbp)
jne    1625 <F+0x4f5>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xafe(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xafa(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xab6(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xab2(%rip),%xmm0
mulsd  %xmm1,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xa95(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
call   1040 <exp@plt>
movaps %xmm0,%xmm1
movsd  0xa75(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xa4b(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xa47(%rip),%xmm0
mulsd  %xmm1,%xmm0
movss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xa2a(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
call   1040 <exp@plt>
movsd  -0x50(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x48(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    1632 <F+0x502>
movss  0x9d3(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    1637 <F+0x507>
jmp    163c <F+0x50c>
jmp    1641 <F+0x511>
jmp    1646 <F+0x516>
movss  -0x10(%rbp),%xmm0
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<F>:
sub    $0x18,%rsp
movaps %xmm0,%xmm2
movss  0xec1(%rip),%xmm0
add    $0xffffffff,%edi
cmp    $0x9,%edi
ja     128b <F+0x15b>
lea    0xf26(%rip),%rax
movslq (%rax,%rdi,4),%rcx
add    %rax,%rcx
jmp    *%rcx
xorps  %xmm0,%xmm0
ucomiss %xmm1,%xmm0
ja     1298 <F+0x168>
ucomiss 0xe92(%rip),%xmm1
ja     12be <F+0x18e>
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
jmp    1304 <F+0x1d4>
xorps  %xmm0,%xmm0
ucomiss %xmm1,%xmm0
jbe    12a2 <F+0x172>
movsd  0xebc(%rip),%xmm0
jmp    12df <F+0x1af>
cvtss2sd %xmm1,%xmm1
movsd  0xe63(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xe5f(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
addsd  0xe83(%rip),%xmm1
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0xe51(%rip),%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
movss  %xmm2,0x8(%rsp)
call   1040 <exp@plt>
movss  0x8(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
addsd  0xe54(%rip),%xmm1
jmp    1251 <F+0x121>
cvtss2sd %xmm1,%xmm1
movsd  0xe06(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xe02(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
addsd  0xdfe(%rip),%xmm1
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0xdf4(%rip),%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
movss  %xmm2,0x8(%rsp)
call   1040 <exp@plt>
movss  0x8(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
addsd  0xdd7(%rip),%xmm1
movsd  %xmm0,0x8(%rsp)
movsd  0xdd1(%rip),%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
call   1040 <exp@plt>
movsd  0x8(%rsp),%xmm1
mulsd  0xdbe(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x10(%rsp),%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
add    $0x18,%rsp
ret
xorps  %xmm0,%xmm0
ucomiss %xmm2,%xmm0
jbe    12b5 <F+0x185>
movsd  0xdb0(%rip),%xmm0
jmp    1314 <F+0x1e4>
ucomiss 0xd57(%rip),%xmm1
jbe    12c8 <F+0x198>
movsd  0xda5(%rip),%xmm0
jmp    12df <F+0x1af>
ucomiss 0xd44(%rip),%xmm2
jbe    12fd <F+0x1cd>
movsd  0xd92(%rip),%xmm0
jmp    1314 <F+0x1e4>
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
addsd  0xd89(%rip),%xmm0
mulsd  0xd89(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
call   1030 <sin@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
call   1030 <sin@plt>
jmp    1330 <F+0x200>
xorps  %xmm0,%xmm0
cvtss2sd %xmm2,%xmm0
addsd  0xd54(%rip),%xmm0
mulsd  0xd54(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
call   1050 <cos@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
call   1050 <cos@plt>
mulsd  0x8(%rsp),%xmm0
mulsd  0xd22(%rip),%xmm0
addsd  0xd2a(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define float @F(float %0, float %1, i32 %2) {
switch i32 %2, label %83 [
i32 1, label %4
i32 2, label %19
i32 10, label %34
i32 3, label %49
i32 4, label %66
]
4: ; preds = %3
%5 = fcmp olt float %1, 0.000000e+00
br i1 %5, label %12, label %6
6: ; preds = %4
%7 = fcmp ogt float %1, 1.000000e+00
br i1 %7, label %12, label %8
8: ; preds = %6
%9 = fpext float %1 to double
%10 = fadd double %9, -5.000000e-01
%11 = fmul double %10, 0x400921FAFC8B007A
br label %12
12: ; preds = %6, %4, %8
%13 = phi double [ %11, %8 ], [ 0xBFF921FAFC8B007A, %4 ], [ 0x3FF921FAFC8B007A, %6 ]
%14 = tail call double @cos(double %13)
%15 = tail call double @cos(double %13)
%16 = fmul double %14, %15
%17 = tail call double @llvm.fmuladd.f64(double %16, double -5.000000e-01, double 2.000000e+00)
%18 = fptrunc double %17 to float
br label %83
19: ; preds = %3
%20 = fcmp olt float %1, 0.000000e+00
br i1 %20, label %27, label %21
21: ; preds = %19
%22 = fcmp ogt float %1, 1.000000e+00
br i1 %22, label %27, label %23
23: ; preds = %21
%24 = fpext float %1 to double
%25 = fadd double %24, -5.000000e-01
%26 = fmul double %25, 0x400921FAFC8B007A
br label %27
27: ; preds = %21, %19, %23
%28 = phi double [ %26, %23 ], [ 0xBFF921FAFC8B007A, %19 ], [ 0x3FF921FAFC8B007A, %21 ]
%29 = tail call double @sin(double %28)
%30 = tail call double @sin(double %28)
%31 = fmul double %29, %30
%32 = tail call double @llvm.fmuladd.f64(double %31, double -5.000000e-01, double 2.000000e+00)
%33 = fptrunc double %32 to float
br label %83
34: ; preds = %3
%35 = fcmp olt float %0, 0.000000e+00
br i1 %35, label %42, label %36
36: ; preds = %34
%37 = fcmp ogt float %0, 1.000000e+00
br i1 %37, label %42, label %38
38: ; preds = %36
%39 = fpext float %0 to double
%40 = fadd double %39, -5.000000e-01
%41 = fmul double %40, 0x400921FAFC8B007A
br label %42
42: ; preds = %36, %34, %38
%43 = phi double [ %41, %38 ], [ 0xBFF921FAFC8B007A, %34 ], [ 0x3FF921FAFC8B007A, %36 ]
%44 = tail call double @cos(double %43)
%45 = tail call double @cos(double %43)
%46 = fmul double %44, %45
%47 = tail call double @llvm.fmuladd.f64(double %46, double -5.000000e-01, double 2.000000e+00)
%48 = fptrunc double %47 to float
br label %83
49: ; preds = %3
%50 = fpext float %1 to double
%51 = tail call double @llvm.fmuladd.f64(double %50, double -4.000000e-01, double 2.500000e+00)
%52 = fptrunc double %51 to float
%53 = fpext float %52 to double
%54 = fadd double %50, -3.000000e-01
%55 = fmul double %54, -1.000000e+01
%56 = fmul double %54, %55
%57 = tail call double @exp(double %56)
%58 = fpext float %0 to double
%59 = fadd double %58, -2.500000e-01
%60 = fmul double %59, -2.000000e+01
%61 = fmul double %59, %60
%62 = tail call double @exp(double %61)
%63 = fmul double %57, -8.000000e-01
%64 = tail call double @llvm.fmuladd.f64(double %63, double %62, double %53)
%65 = fptrunc double %64 to float
br label %83
66: ; preds = %3
%67 = fpext float %1 to double
%68 = tail call double @llvm.fmuladd.f64(double %67, double -4.000000e-01, double 2.500000e+00)
%69 = fptrunc double %68 to float
%70 = fpext float %69 to double
%71 = fadd double %67, -9.000000e-01
%72 = fmul double %71, -1.000000e+01
%73 = fmul double %71, %72
%74 = tail call double @exp(double %73)
%75 = fpext float %0 to double
%76 = fadd double %75, -5.500000e-01
%77 = fmul double %76, -2.000000e+01
%78 = fmul double %76, %77
%79 = tail call double @exp(double %78)
%80 = fmul double %74, -8.000000e-01
%81 = tail call double @llvm.fmuladd.f64(double %80, double %79, double %70)
%82 = fptrunc double %81 to float
br label %83
83: ; preds = %3, %27, %49, %66, %42, %12
%84 = phi float [ %18, %12 ], [ %33, %27 ], [ %48, %42 ], [ %65, %49 ], [ %82, %66 ], [ 1.000000e+00, %3 ]
ret float %84
}