float loadPreset(int preset, int index0, int index1) {
  static float presets[9][4][4] = {
      {{1.0, 3.99, 10.65, -2443},
       {0.9996, 0.9994, 0.9994, 0.999},
       {0.04, 0.01, 0.01, 0.008},
       {0.429688, 0.445312, 0.093750}},
      {{1.0, 2.01, 3.9, 14.37},
       {0.99995, 0.99991, 0.99992, 0.9999},
       {0.025, 0.015, 0.015, 0.015},
       {0.390625, 0.570312, 0.078125}},
      {{1.0, 4.08, 6.669, -3725.0},
       {0.999, 0.999, 0.999, 0.999},
       {0.06, 0.05, 0.03, 0.02},
       {0.609375, 0.359375, 0.140625}},
      {{1.0, 2.777, 7.378, 15.377},
       {0.996, 0.994, 0.994, 0.99},
       {0.04, 0.01, 0.01, 0.008},
       {0.460938, 0.375000, 0.046875}},
      {{1.0, 2.777, 7.378, 15.377},
       {0.99996, 0.99994, 0.99994, 0.9999},
       {0.02, 0.005, 0.005, 0.004},
       {0.453125, 0.250000, 0.101562}},
      {{1.0, 1.777, 2.378, 3.377},
       {0.996, 0.994, 0.994, 0.99},
       {0.04, 0.01, 0.01, 0.008},
       {0.312500, 0.445312, 0.109375}},
      {{1.0, 1.004, 1.013, 2.377},
       {0.9999, 0.9999, 0.9999, 0.999},
       {0.02, 0.005, 0.005, 0.004},
       {0.398438, 0.296875, 0.070312}},
      {{1.0, 4.0, -1320.0, -3960.0},
       {0.9996, 0.999, 0.9994, 0.999},
       {0.04, 0.01, 0.01, 0.008},
       {0.453125, 0.453125, 0.070312}},
      {{1.0, 1.217, 1.475, 1.729},
       {0.999, 0.999, 0.999, 0.999},
       {0.03, 0.03, 0.03, 0.03},
       {0.390625, 0.570312, 0.078125}},
  };
  return presets[preset][index0][index1];
}


x86 assembly (clang, -O0):
<loadPreset>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movslq -0x4(%rbp),%rcx
lea    0x2f18(%rip),%rax
shl    $0x6,%rcx
add    %rcx,%rax
movslq -0x8(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movslq -0xc(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<loadPreset>:
movslq %edi,%rax
movslq %esi,%rcx
movslq %edx,%rdx
shl    $0x6,%rax
lea    0xeec(%rip),%rsi
add    %rax,%rsi
shl    $0x4,%rcx
add    %rsi,%rcx
movss  (%rcx,%rdx,4),%xmm0
ret

LLVM IR (-O0):
@loadPreset.presets = internal global [9 x [4 x [4 x float]]] [[4 x [4 x float]] [[4 x float] [float 1.000000e+00, float 0x400FEB8520000000, float 0x40254CCCC0000000, float -2.443000e+03], [4 x float] [float 0x3FEFFCB920000000, float 0x3FEFFB15C0000000, float 0x3FEFFB15C0000000, float 0x3FEFF7CEE0000000], [4 x float] [float 0x3FA47AE140000000, float 0x3F847AE140000000, float 0x3F847AE140000000, float 0x3F80624DE0000000], [4 x float] [float 0x3FDB800220000000, float 0x3FDC7FFDE0000000, float 9.375000e-02, float 0.000000e+00]], [4 x [4 x float]] [[4 x float] [float 1.000000e+00, float 0x4000147AE0000000, float 0x400F333340000000, float 0x402CBD70A0000000], [4 x float] [float 0x3FEFFF9720000000, float 0x3FEFFF4340000000, float 0x3FEFFF5840000000, float 0x3FEFFF2E40000000], [4 x float] [float 0x3F999999A0000000, float 0x3F8EB851E0000000, float 0x3F8EB851E0000000, float 0x3F8EB851E0000000], [4 x float] [float 3.906250e-01, float 0x3FE23FFF00000000, float 7.812500e-02, float 0.000000e+00]], [4 x [4 x float]] [[4 x float] [float 1.000000e+00, float 0x401051EB80000000, float 0x401AAD0E60000000, float -3.725000e+03], [4 x float] [float 0x3FEFF7CEE0000000, float 0x3FEFF7CEE0000000, float 0x3FEFF7CEE0000000, float 0x3FEFF7CEE0000000], [4 x float] [float 0x3FAEB851E0000000, float 0x3FA99999A0000000, float 0x3F9EB851E0000000, float 0x3F947AE140000000], [4 x float] [float 6.093750e-01, float 3.593750e-01, float 1.406250e-01, float 0.000000e+00]], [4 x [4 x float]] [[4 x float] [float 1.000000e+00, float 0x4006374BC0000000, float 0x401D831260000000, float 0x402EC10620000000], [4 x float] [float 0x3FEFDF3B60000000, float 0x3FEFCED920000000, float 0x3FEFCED920000000, float 0x3FEFAE1480000000], [4 x float] [float 0x3FA47AE140000000, float 0x3F847AE140000000, float 0x3F847AE140000000, float 0x3F80624DE0000000], [4 x float] [float 0x3FDD800220000000, float 3.750000e-01, float 4.687500e-02, float 0.000000e+00]], [4 x [4 x float]] [[4 x float] [float 1.000000e+00, float 0x4006374BC0000000, float 0x401D831260000000, float 0x402EC10620000000], [4 x float] [float 0x3FEFFFAC20000000, float 0x3FEFFF8220000000, float 0x3FEFFF8220000000, float 0x3FEFFF2E40000000], [4 x float] [float 0x3F947AE140000000, float 0x3F747AE140000000, float 0x3F747AE140000000, float 0x3F70624DE0000000], [4 x float] [float 4.531250e-01, float 2.500000e-01, float 0x3FB9FFF7A0000000, float 0.000000e+00]], [4 x [4 x float]] [[4 x float] [float 1.000000e+00, float 0x3FFC6E9780000000, float 0x40030624E0000000, float 0x400B0418A0000000], [4 x float] [float 0x3FEFDF3B60000000, float 0x3FEFCED920000000, float 0x3FEFCED920000000, float 0x3FEFAE1480000000], [4 x float] [float 0x3FA47AE140000000, float 0x3F847AE140000000, float 0x3F847AE140000000, float 0x3F80624DE0000000], [4 x float] [float 3.125000e-01, float 0x3FDC7FFDE0000000, float 1.093750e-01, float 0.000000e+00]], [4 x [4 x float]] [[4 x float] [float 1.000000e+00, float 0x3FF0106240000000, float 0x3FF0353F80000000, float 0x40030418A0000000], [4 x float] [float 0x3FEFFF2E40000000, float 0x3FEFFF2E40000000, float 0x3FEFFF2E40000000, float 0x3FEFF7CEE0000000], [4 x float] [float 0x3F947AE140000000, float 0x3F747AE140000000, float 0x3F747AE140000000, float 0x3F70624DE0000000], [4 x float] [float 0x3FD9800220000000, float 2.968750e-01, float 0x3FB1FFF7A0000000, float 0.000000e+00]], [4 x [4 x float]] [[4 x float] [float 1.000000e+00, float 4.000000e+00, float -1.320000e+03, float -3.960000e+03], [4 x float] [float 0x3FEFFCB920000000, float 0x3FEFF7CEE0000000, float 0x3FEFFB15C0000000, float 0x3FEFF7CEE0000000], [4 x float] [float 0x3FA47AE140000000, float 0x3F847AE140000000, float 0x3F847AE140000000, float 0x3F80624DE0000000], [4 x float] [float 4.531250e-01, float 4.531250e-01, float 0x3FB1FFF7A0000000, float 0.000000e+00]], [4 x [4 x float]] [[4 x float] [float 1.000000e+00, float 0x3FF378D500000000, float 0x3FF79999A0000000, float 0x3FFBA9FBE0000000], [4 x float] [float 0x3FEFF7CEE0000000, float 0x3FEFF7CEE0000000, float 0x3FEFF7CEE0000000, float 0x3FEFF7CEE0000000], [4 x float] [float 0x3F9EB851E0000000, float 0x3F9EB851E0000000, float 0x3F9EB851E0000000, float 0x3F9EB851E0000000], [4 x float] [float 3.906250e-01, float 0x3FE23FFF00000000, float 7.812500e-02, float 0.000000e+00]]]
define float @loadPreset(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [9 x [4 x [4 x float]]], [9 x [4 x [4 x float]]]* @loadPreset.presets, i64 0, i64 %8
%10 = load i32, i32* %5
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [4 x [4 x float]], [4 x [4 x float]]* %9, i64 0, i64 %11
%13 = load i32, i32* %6
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [4 x float], [4 x float]* %12, i64 0, i64 %14
%16 = load float, float* %15
ret float %16
}

LLVM IR (-O2):
@loadPreset.presets = internal unnamed_addr constant [9 x [4 x [4 x float]]] [[4 x [4 x float]] [[4 x float] [float 1.000000e+00, float 0x400FEB8520000000, float 0x40254CCCC0000000, float -2.443000e+03], [4 x float] [float 0x3FEFFCB920000000, float 0x3FEFFB15C0000000, float 0x3FEFFB15C0000000, float 0x3FEFF7CEE0000000], [4 x float] [float 0x3FA47AE140000000, float 0x3F847AE140000000, float 0x3F847AE140000000, float 0x3F80624DE0000000], [4 x float] [float 0x3FDB800220000000, float 0x3FDC7FFDE0000000, float 9.375000e-02, float 0.000000e+00]], [4 x [4 x float]] [[4 x float] [float 1.000000e+00, float 0x4000147AE0000000, float 0x400F333340000000, float 0x402CBD70A0000000], [4 x float] [float 0x3FEFFF9720000000, float 0x3FEFFF4340000000, float 0x3FEFFF5840000000, float 0x3FEFFF2E40000000], [4 x float] [float 0x3F999999A0000000, float 0x3F8EB851E0000000, float 0x3F8EB851E0000000, float 0x3F8EB851E0000000], [4 x float] [float 3.906250e-01, float 0x3FE23FFF00000000, float 7.812500e-02, float 0.000000e+00]], [4 x [4 x float]] [[4 x float] [float 1.000000e+00, float 0x401051EB80000000, float 0x401AAD0E60000000, float -3.725000e+03], [4 x float] [float 0x3FEFF7CEE0000000, float 0x3FEFF7CEE0000000, float 0x3FEFF7CEE0000000, float 0x3FEFF7CEE0000000], [4 x float] [float 0x3FAEB851E0000000, float 0x3FA99999A0000000, float 0x3F9EB851E0000000, float 0x3F947AE140000000], [4 x float] [float 6.093750e-01, float 3.593750e-01, float 1.406250e-01, float 0.000000e+00]], [4 x [4 x float]] [[4 x float] [float 1.000000e+00, float 0x4006374BC0000000, float 0x401D831260000000, float 0x402EC10620000000], [4 x float] [float 0x3FEFDF3B60000000, float 0x3FEFCED920000000, float 0x3FEFCED920000000, float 0x3FEFAE1480000000], [4 x float] [float 0x3FA47AE140000000, float 0x3F847AE140000000, float 0x3F847AE140000000, float 0x3F80624DE0000000], [4 x float] [float 0x3FDD800220000000, float 3.750000e-01, float 4.687500e-02, float 0.000000e+00]], [4 x [4 x float]] [[4 x float] [float 1.000000e+00, float 0x4006374BC0000000, float 0x401D831260000000, float 0x402EC10620000000], [4 x float] [float 0x3FEFFFAC20000000, float 0x3FEFFF8220000000, float 0x3FEFFF8220000000, float 0x3FEFFF2E40000000], [4 x float] [float 0x3F947AE140000000, float 0x3F747AE140000000, float 0x3F747AE140000000, float 0x3F70624DE0000000], [4 x float] [float 4.531250e-01, float 2.500000e-01, float 0x3FB9FFF7A0000000, float 0.000000e+00]], [4 x [4 x float]] [[4 x float] [float 1.000000e+00, float 0x3FFC6E9780000000, float 0x40030624E0000000, float 0x400B0418A0000000], [4 x float] [float 0x3FEFDF3B60000000, float 0x3FEFCED920000000, float 0x3FEFCED920000000, float 0x3FEFAE1480000000], [4 x float] [float 0x3FA47AE140000000, float 0x3F847AE140000000, float 0x3F847AE140000000, float 0x3F80624DE0000000], [4 x float] [float 3.125000e-01, float 0x3FDC7FFDE0000000, float 1.093750e-01, float 0.000000e+00]], [4 x [4 x float]] [[4 x float] [float 1.000000e+00, float 0x3FF0106240000000, float 0x3FF0353F80000000, float 0x40030418A0000000], [4 x float] [float 0x3FEFFF2E40000000, float 0x3FEFFF2E40000000, float 0x3FEFFF2E40000000, float 0x3FEFF7CEE0000000], [4 x float] [float 0x3F947AE140000000, float 0x3F747AE140000000, float 0x3F747AE140000000, float 0x3F70624DE0000000], [4 x float] [float 0x3FD9800220000000, float 2.968750e-01, float 0x3FB1FFF7A0000000, float 0.000000e+00]], [4 x [4 x float]] [[4 x float] [float 1.000000e+00, float 4.000000e+00, float -1.320000e+03, float -3.960000e+03], [4 x float] [float 0x3FEFFCB920000000, float 0x3FEFF7CEE0000000, float 0x3FEFFB15C0000000, float 0x3FEFF7CEE0000000], [4 x float] [float 0x3FA47AE140000000, float 0x3F847AE140000000, float 0x3F847AE140000000, float 0x3F80624DE0000000], [4 x float] [float 4.531250e-01, float 4.531250e-01, float 0x3FB1FFF7A0000000, float 0.000000e+00]], [4 x [4 x float]] [[4 x float] [float 1.000000e+00, float 0x3FF378D500000000, float 0x3FF79999A0000000, float 0x3FFBA9FBE0000000], [4 x float] [float 0x3FEFF7CEE0000000, float 0x3FEFF7CEE0000000, float 0x3FEFF7CEE0000000, float 0x3FEFF7CEE0000000], [4 x float] [float 0x3F9EB851E0000000, float 0x3F9EB851E0000000, float 0x3F9EB851E0000000, float 0x3F9EB851E0000000], [4 x float] [float 3.906250e-01, float 0x3FE23FFF00000000, float 7.812500e-02, float 0.000000e+00]]]
define float @loadPreset(i32 %0, i32 %1, i32 %2) {
%4 = sext i32 %0 to i64
%5 = sext i32 %1 to i64
%6 = sext i32 %2 to i64
%7 = getelementptr inbounds [9 x [4 x [4 x float]]], [9 x [4 x [4 x float]]]* @loadPreset.presets, i64 0, i64 %4, i64 %5, i64 %6
%8 = load float, float* %7
ret float %8
}