// ???
//
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
//
//   using 3Dmigoto v1.3.16 on Sat May 18 07:57:18 2019
//
//
// Buffer Definitions:
//
// cbuffer CBufferGlobalConstant_Z
// {
//
//   struct StructGlobalConstant_Z
//   {
//
//       float4 c[90];                  // Offset:    0
//
//   } Global;                          // Offset:    0 Size:  1440
//
// }
//
// cbuffer CBufferScatteringConstant_Z
// {
//
//   struct StructScatteringConstant_Z
//   {
//
//       float4 c[36];                  // Offset:    0
//
//   } Scattering;                      // Offset:    0 Size:   576
//
// }
//
// cbuffer CBufferLightConstant_Z
// {
//
//   struct StructLightConstant_Z
//   {
//
//       float4 c[3];                   // Offset:    0
//
//   } Light;                           // Offset:    0 Size:    48
//
// }
//
// cbuffer CBufferRefProbeConstant_Z
// {
//
//   struct StructRefProbeConstant_Z
//   {
//
//       struct ShaderRefProbe_Z
//       {
//
//           float4 Pos;                // Offset:    0
//           float4 Value0;             // Offset:   16
//           float4 Value1;             // Offset:   32
//           float4x4 LocalToWorldMat;  // Offset:   48
//           float4x4 WorldToLocalMat;  // Offset:  112
//
//       } Elt[5];                      // Offset:    0
//
//   } RefProbeArray;                   // Offset:    0 Size:   880
//
// }
//
// cbuffer CBufferObjectConstant_Z
// {
//
//   struct StructObjectConstant_Z
//   {
//
//       float4 c[32];                  // Offset:    0
//
//   } Object;                          // Offset:    0 Size:   512
//
// }
//
// cbuffer CBufferShadowReceiveConstant_Z
// {
//
//   struct StructShadowReceiveConstant_Z
//   {
//
//       struct ShadowMatrix
//       {
//
//           float4x4 Mat;              // Offset:    0
//           float4 NormalBias;         // Offset:   64
//
//       } Slices[4];                   // Offset:    0
//       float4 TextureSize;            // Offset:  320
//       float4 FadeParams;             // Offset:  336
//       float4 SliceDistMin;           // Offset:  352
//       float4 SliceDistMax;           // Offset:  368
//
//   } Shadow;                          // Offset:    0 Size:   384
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// sMaterialSampler                  sampler      NA          NA    0        1
// sZBufferSampler                   sampler      NA          NA    1        1
// sLastFrameColorBufferSampler      sampler      NA          NA    2        1
// sLastFrameHiZBufferSampler        sampler      NA          NA    3        1
// sReflectionProbe0Sampler          sampler      NA          NA    4        1
// sReflectionProbe1Sampler          sampler      NA          NA    5        1
// sReflectionProbe2Sampler          sampler      NA          NA    6        1
// sReflectionProbe3Sampler          sampler      NA          NA    7        1
// sReflectionProbe4Sampler          sampler      NA          NA    8        1
// sShadowMapSampler               sampler_c      NA          NA    9        1
// sRenderTargetSampler              sampler      NA          NA   10        1
// sFogOcclusionSampler              sampler      NA          NA   11        1
// sMipFog0Sampler                   sampler      NA          NA   12        1
// sDiffuse                          texture  float4          2d    0        1
// sNormalRoughMetal                 texture  float4          2d    1        1
// sZBuffer                          texture  float4          2d    2        1
// sLastFrameColorBuffer             texture  float4          2d    3        1
// sLastFrameHiZBuffer               texture  float4          2d    4        1
// sReflectionProbe0                 texture  float4        cube    5        1
// sReflectionProbe1                 texture  float4        cube    6        1
// sReflectionProbe2                 texture  float4        cube    7        1
// sReflectionProbe3                 texture  float4        cube    8        1
// sReflectionProbe4                 texture  float4        cube    9        1
// sShadowMap                        texture  float4     2darray   10        1
// sBlueNoiseR8                      texture  float4     2darray   11        1
// sRenderTarget                     texture  float4          2d   12        1
// sFogOcclusion                     texture  float4          2d   13        1
// sMipFog0                          texture  float4          2d   14        1
// sMipFog1                          texture  float4          2d   15        1
// VelocityBufferXY                      UAV    uint          2d    1        1
// VelocityBufferZ                       UAV   float          2d    2        1
// CBufferGlobalConstant_Z           cbuffer      NA          NA    0        1
// CBufferScatteringConstant_Z       cbuffer      NA          NA    1        1
// CBufferLightConstant_Z            cbuffer      NA          NA    2        1
// CBufferRefProbeConstant_Z         cbuffer      NA          NA    3        1
// CBufferObjectConstant_Z           cbuffer      NA          NA    4        1
// CBufferShadowReceiveConstant_Z    cbuffer      NA          NA    5        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float   xy
// PREVIOUS_POSITION        0   xyzw        1     NONE   float
// COLOR                    0   xyzw        2     NONE   float   xyzw
// TEXCOORD                 0   xyzw        3     NONE   float   xy
// TEXSPACE_MAT             0   xyzw        4     NONE   float   xyzw
// TEXSPACE_MAT             1   xyzw        5     NONE   float   xyzw
// TEXSPACE_MAT             2   xyzw        6     NONE   float   xyzw
// SHADOW_TCPROJ            0   xyzw        7     NONE   float   xyz
// INSTANCE_COLOR           0   x           8     NONE   float
// INSTANCE_INDEXES         0   xy          9     NONE    uint
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[69], immediateIndexed
dcl_constantbuffer cb1[27], immediateIndexed
dcl_constantbuffer cb2[3], immediateIndexed
dcl_constantbuffer cb3[54], immediateIndexed
dcl_constantbuffer cb4[26], immediateIndexed
dcl_constantbuffer cb5[22], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_sampler s2, mode_default
dcl_sampler s3, mode_default
dcl_sampler s4, mode_default
dcl_sampler s5, mode_default
dcl_sampler s6, mode_default
dcl_sampler s7, mode_default
dcl_sampler s8, mode_default
dcl_sampler s9, mode_comparison
dcl_sampler s10, mode_default
dcl_sampler s11, mode_default
dcl_sampler s12, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t1
dcl_resource_texture2d (float,float,float,float) t2
dcl_resource_texture2d (float,float,float,float) t3
dcl_resource_texture2d (float,float,float,float) t4
dcl_resource_texturecube (float,float,float,float) t5
dcl_resource_texturecube (float,float,float,float) t6
dcl_resource_texturecube (float,float,float,float) t7
dcl_resource_texturecube (float,float,float,float) t8
dcl_resource_texturecube (float,float,float,float) t9
dcl_resource_texture2darray (float,float,float,float) t10
dcl_resource_texture2darray (float,float,float,float) t11
dcl_resource_texture2d (float,float,float,float) t12
dcl_resource_texture2d (float,float,float,float) t13
dcl_resource_texture2d (float,float,float,float) t14
dcl_resource_texture2d (float,float,float,float) t15
dcl_uav_typed_texture2d (uint,uint,uint,uint) u1
dcl_uav_typed_texture2d (float,float,float,float) u2
dcl_input_ps_siv linear noperspective v0.xy, position
dcl_input_ps linear v2.xyzw
dcl_input_ps linear v3.xy
dcl_input_ps linear v4.xyzw
dcl_input_ps linear v5.xyzw
dcl_input_ps linear v6.xyzw
dcl_input_ps linear v7.xyz
dcl_output o0.xyzw
//dcl_temps 18
dcl_temps 23
dcl_resource_texture2d (float,float,float,float) t125

mov r0.x, v4.w
mov r0.y, v5.w
mov r0.z, v6.w
add r1.xyz, -r0.zxyz, cb0[2].zxyz
dp3 r1.w, r1.xyzx, r1.xyzx
rsq r1.w, r1.w
mul r2.xyz, r1.wwww, r1.xyzx
sample_indexable(texture2d)(float,float,float,float) r3.xyzw, v3.xyxx, t0.xyzw, s0
mul r4.xyz, r3.xyzx, cb4[20].xyzx
mul r5.xyzw, r3.wxyz, cb4[21].wxyz
mul r2.w, r5.x, v2.w
sample_indexable(texture2d)(float,float,float,float) r6.xyzw, v3.xyxx, t1.xyzw, s0
mul r3.xy, r6.zxzz, cb4[23].yxyy
mad r6.yw, r6.yyyw, l(0.000000, 2.000000, 0.000000, 2.000000), l(0.000000, -1.000000, 0.000000, -1.000000)
mul r6.yw, r6.yyyw, cb4[23].zzzz
dp2 r3.z, r6.ywyy, r6.ywyy
add r3.z, -r3.z, l(1.000000)
max r3.z, r3.z, l(0.000000)
sqrt r3.z, r3.z
mul r7.xyz, r6.wwww, v5.xyzx
mad r7.xyz, r6.yyyy, v4.xyzx, r7.xyzx
mad r7.xyz, r3.zzzz, v6.xyzx, r7.xyzx
dp3 r3.z, r7.xyzx, r7.xyzx
rsq r3.z, r3.z
mul r8.xyz, r3.zzzz, r7.xyzx
mul r9.xyz, v2.xyzx, cb4[18].xyzx
mul r4.xyz, r4.xyzx, r9.xyzx
mul r5.yzw, r5.yyzw, r9.xxyz
mad r3.w, v2.w, r3.w, l(-1.000000)
mad r3.w, cb4[25].z, r3.w, l(1.000000)
mul r3.w, r3.w, cb4[18].w
ne r4.w, l(0.000000, 0.000000, 0.000000, 0.000000), cb0[12].z
if_nz r4.w
  mad r4.w, r8.z, l(0.050000), v6.y
  mad_sat r4.w, r4.w, l(3.000000), l(-1.000000)
  mad r3.y, -r3.y, l(0.900000), l(1.000000)
  mul r3.y, r3.y, r3.x
  add r9.xyz, cb0[12].zzzz, l(-0.010000, -0.200000, -0.450000, 0.000000)
  mul_sat r6.yw, r9.xxxy, l(0.000000, 2.94117641, 0.000000, 1.250000)
  mul r3.y, r3.y, r6.y
  mad r9.xyw, r4.xyxz, r4.xyxz, -r4.xyxz
  mad r4.xyz, r3.yyyy, r9.xywx, r4.xyzx
  mul r3.y, r3.x, r3.x
  mul r3.y, r3.x, r3.y
  mul r6.y, r3.y, l(0.150000)
  mad r3.y, -r3.y, l(0.150000), l(0.050000)
  mad r3.y, r4.w, r3.y, r6.y
  mad r3.y, -cb4[23].y, r6.z, r3.y
  mad r3.x, r6.w, r3.y, r3.x
  mad r6.yzw, -r7.xxyz, r3.zzzz, v6.xxyz
  mul r6.yzw, r4.wwww, r6.yyzw
  add_sat r3.y, r9.z, r9.z
  mad r8.xyz, r3.yyyy, r6.yzwy, r8.xyzx
endif
dp3 r3.y, r8.xyzx, r8.xyzx
rsq r3.y, r3.y
mul r6.yzw, r3.yyyy, r8.xxyz
dp3 r3.y, r6.wyzw, r2.xyzx
mad r3.z, -cb4[23].x, r6.x, l(1.000000)
mul r4.xyz, r3.zzzz, r4.xyzx
mov_sat r3.z, r3.y
mad r7.xyzw, r3.xxxx, l(-1.000000, -0.027500, -0.572000, 0.022000), l(1.000000, 0.042500, 1.040000, -0.040000)
mul r4.w, r7.x, r7.x
mul r3.z, r3.z, l(-9.280000)
exp r3.z, r3.z
min r3.z, r3.z, r4.w
mad r3.z, r3.z, r7.x, r7.y
mad r7.xy, r3.zzzz, l(-1.040000, 1.040000, 0.000000, 0.000000), r7.zwzz
mad r3.z, r7.x, l(0.050000), r7.y
mul r7.xyz, cb2[1].xyzx, cb4[19].yyyy
dp3 r4.w, r6.yzwy, cb2[0].xyzx
dp3 r8.x, r6.yzwy, cb0[31].xyzx
dp3 r8.y, r6.yzwy, cb0[32].xyzx
dp3 r8.z, r6.yzwy, cb0[33].xyzx
lt r6.x, l(0.000000), cb5[21].w
if_nz r6.x
  mad r9.xyz, r8.xyzx, cb5[4].xyzx, v7.xyzx
  dp3 r6.x, r9.xyzx, cb5[0].xyzx
  dp3 r7.w, r9.xyzx, cb5[1].xyzx
  dp3 r8.w, r9.xyzx, cb5[2].xyzx
  add r9.x, r6.x, cb5[0].w
  add r9.y, r7.w, cb5[1].w
  add r9.z, r8.w, cb5[2].w
  mad r10.xyz, r8.xyzx, cb5[9].xyzx, v7.xyzx
  dp3 r6.x, r10.xyzx, cb5[5].xyzx
  dp3 r7.w, r10.xyzx, cb5[6].xyzx
  dp3 r8.w, r10.xyzx, cb5[7].xyzx
  add r10.x, r6.x, cb5[5].w
  add r10.y, r7.w, cb5[6].w
  add r10.z, r8.w, cb5[7].w
  mad r11.xyz, r8.xyzx, cb5[14].xyzx, v7.xyzx
  dp3 r6.x, r11.xyzx, cb5[10].xyzx
  dp3 r7.w, r11.xyzx, cb5[11].xyzx
  dp3 r8.w, r11.xyzx, cb5[12].xyzx
  add r11.x, r6.x, cb5[10].w
  add r11.y, r7.w, cb5[11].w
  add r11.z, r8.w, cb5[12].w
  mad r12.xyz, r8.xyzx, cb5[19].xyzx, v7.xyzx
  dp3 r6.x, r12.xyzx, cb5[15].xyzx
  dp3 r7.w, r12.xyzx, cb5[16].xyzx
  dp3 r8.w, r12.xyzx, cb5[17].xyzx
  add r12.x, r6.x, cb5[15].w
  add r12.y, r7.w, cb5[16].w
  add r12.z, r8.w, cb5[17].w
  eq r6.x, cb0[49].z, l(0.000000)
  ftou r13.xy, v0.xyxx
  ftou r7.w, cb0[1].w
  movc r14.z, r6.x, l(0), r7.w
  and r14.xy, r13.xyxx, l(63, 63, 0, 0)
  mov r14.w, l(0)
  ld_indexable(texture2darray)(float,float,float,float) r6.x, r14.xyzw, t11.xyzw
  eq r13.xyzw, cb5[21].wwww, l(1.000000, 2.000000, 3.000000, 4.000000)
  movc r13.xyzw, r13.xyzw, cb5[21].xxxx, cb5[21].zzzz
  mad r13.xyzw, r6.xxxx, r13.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  add r14.xy, r9.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
  mul r14.xy, r13.xxxx, |r14.xyxx|
  lt r14.xy, r14.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
  and r6.x, r14.y, r14.x
  add r14.xy, r10.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
  mul r13.xy, r13.yyyy, |r14.xyxx|
  lt r13.xy, r13.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
  and r7.w, r13.y, r13.x
  add r13.xy, r11.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
  mul r13.xy, r13.zzzz, |r13.xyxx|
  lt r13.xy, r13.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
  and r8.w, r13.y, r13.x
  add r13.xy, r12.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
  mul r13.xy, r13.wwww, |r13.xyxx|
  lt r13.xy, r13.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
  and r13.x, r13.y, r13.x
  mov r12.w, l(3.000000)
  movc r12.xyzw, r13.xxxx, r12.xyzw, l(42.000000,42.000000,42.000000,42.000000)
  mov r11.w, l(2.000000)
  movc r11.xyzw, r8.wwww, r11.xyzw, r12.xyzw
  mov r10.w, l(1.000000)
  movc r10.xyzw, r7.wwww, r10.xyzw, r11.xyzw
  mov r9.w, l(0)
  movc r9.xyzw, r6.xxxx, r9.xyzw, r10.xyzw
  lt r6.x, l(0.000000), r9.z
  movc r9.xyzw, r6.xxxx, r9.xywz, l(42.000000,42.000000,42.000000,42.000000)
  ftou r6.x, r9.z
  ftou r7.w, cb5[21].w
  ult r6.x, r6.x, r7.w
  if_nz r6.x
    add r6.x, r9.w, l(2.384185791E-007)
    mad r10.xy, r9.xyxx, cb5[20].xxxx, l(0.500000, 0.500000, 0.000000, 0.000000)
    round_ni r10.zw, r10.xxxy
    add r10.xy, -r10.zwzz, r10.xyxx
    mad r11.xy, -r10.yxyy, l(3.000000, 3.000000, 0.000000, 0.000000), l(4.000000, 4.000000, 0.000000, 0.000000)
    mad r11.zw, r10.xxxy, l(0.000000, 0.000000, 3.000000, 3.000000), l(0.000000, 0.000000, 1.000000, 1.000000)
    mad r12.xy, -r10.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(3.000000, 3.000000, 0.000000, 0.000000)
    div r12.xy, r12.xyxx, r11.yxyy
    add r12.zw, r10.xxxy, l(0.000000, 0.000000, 3.000000, 3.000000)
    div r10.xy, r10.xyxx, r11.zwzz
    add r12.xy, r12.xyxx, l(-2.000000, -2.000000, 0.000000, 0.000000)
    mul r12.zw, r12.zzzw, cb5[20].yyyy
    add r10.xyzw, r10.xyzw, l(2.000000, 2.000000, -0.500000, -0.500000)
    mul r13.xw, r12.xxxy, cb5[20].yyyy
    mul r13.yz, r12.wwzw, l(0.000000, 0.142857149, 0.142857149, 0.000000)
    mul r12.xy, r10.xyxx, cb5[20].yyyy
    mul r7.w, r11.x, r11.y
    mad r9.xy, r10.zwzz, cb5[20].yyyy, r13.xwxx
    sample_c_lz_indexable(texture2darray)(float,float,float,float) r8.w, r9.xyzx, t10.xxxx, s9, r6.x
    mul r10.xy, r11.xyxx, l(7.000000, 7.000000, 0.000000, 0.000000)
    mad r9.xy, r10.zwzz, cb5[20].yyyy, r13.zwzz
    sample_c_lz_indexable(texture2darray)(float,float,float,float) r9.w, r9.xyzx, t10.xxxx, s9, r6.x
    mul r9.w, r9.w, r10.x
    mad r7.w, r7.w, r8.w, r9.w
    mul r11.xy, r11.xyxx, r11.zwzz
    mov r12.zw, r13.wwwy
    mad r9.xy, r10.zwzz, cb5[20].yyyy, r12.xzxx
    sample_c_lz_indexable(texture2darray)(float,float,float,float) r8.w, r9.xyzx, t10.xxxx, s9, r6.x
    mad r7.w, r11.x, r8.w, r7.w
    mad r9.xy, r10.zwzz, cb5[20].yyyy, r13.xyxx
    sample_c_lz_indexable(texture2darray)(float,float,float,float) r8.w, r9.xyzx, t10.xxxx, s9, r6.x
    mad r7.w, r10.y, r8.w, r7.w
    mad r9.xy, r10.zwzz, cb5[20].yyyy, r13.zyzz
    sample_c_lz_indexable(texture2darray)(float,float,float,float) r8.w, r9.xyzx, t10.xxxx, s9, r6.x
    mad r7.w, r8.w, l(49.000000), r7.w
    mul r10.xy, r11.zwzz, l(7.000000, 7.000000, 0.000000, 0.000000)
    mad r9.xy, r10.zwzz, cb5[20].yyyy, r12.xwxx
    sample_c_lz_indexable(texture2darray)(float,float,float,float) r8.w, r9.xyzx, t10.xxxx, s9, r6.x
    mad r7.w, r10.x, r8.w, r7.w
    mov r13.y, r12.y
    mad r9.xy, r10.zwzz, cb5[20].yyyy, r13.xyxx
    sample_c_lz_indexable(texture2darray)(float,float,float,float) r8.w, r9.xyzx, t10.xxxx, s9, r6.x
    mad r7.w, r11.y, r8.w, r7.w
    mad r9.xy, r10.zwzz, cb5[20].yyyy, r13.zyzz
    sample_c_lz_indexable(texture2darray)(float,float,float,float) r8.w, r9.xyzx, t10.xxxx, s9, r6.x
    mad r7.w, r10.y, r8.w, r7.w
    mul r8.w, r11.w, r11.z
    mad r9.xy, r10.zwzz, cb5[20].yyyy, r12.xyxx
    sample_c_lz_indexable(texture2darray)(float,float,float,float) r6.x, r9.xyzx, t10.xxxx, s9, r6.x
    mad r6.x, r8.w, r6.x, r7.w
    mul r6.x, r6.x, l(0.00694444450)
    mul r6.x, r6.x, r6.x
  else
    mov r6.x, cb5[21].y
  endif
else
  mov r6.x, cb5[21].y
endif
mul r7.xyz, r6.xxxx, r7.xyzx
dp3 r6.x, -r2.yzxy, r6.yzwy
add r6.x, r6.x, r6.x
mad r9.xyz, r6.yzwy, -r6.xxxx, -r2.yzxy
dp3 r6.x, cb2[0].xyzx, r9.xyzx
mad r10.xyz, -r6.xxxx, cb2[0].xyzx, r9.xyzx
lt r6.x, r6.x, l(0.999988675)
dp3 r7.w, r10.xyzx, r10.xyzx
rsq r7.w, r7.w
mul r10.xyz, r7.wwww, r10.xyzx
mul r10.xyz, r10.xyzx, l(0.00475598220, 0.00475598220, 0.00475598220, 0.000000)
mad r10.xyz, cb2[0].xyzx, l(0.999988675, 0.999988675, 0.999988675, 0.000000), r10.xyzx
dp3 r7.w, r10.xyzx, r10.xyzx
rsq r7.w, r7.w
mul r10.xyz, r7.wwww, r10.xyzx
movc r10.xyz, r6.xxxx, r10.xyzx, r9.xyzx
max r6.x, r3.x, cb2[1].w
max r6.x, r6.x, l(0.080000)
mad r1.xyz, r1.yzxy, r1.wwww, r10.xyzx
dp3 r1.w, r1.xyzx, r1.xyzx
rsq r1.w, r1.w
mul r1.xyz, r1.wwww, r1.xyzx
dp3_sat r1.w, r1.xyzx, r10.xyzx
dp3_sat r1.x, r6.yzwy, r1.xyzx
dp3_sat r1.y, r6.yzwy, r10.xyzx
add r1.z, -r1.w, l(1.000000)
mul r7.w, r1.z, r1.z
mul r7.w, r7.w, r7.w
mul r1.z, r1.z, r7.w
mad r1.z, r1.z, l(0.950000), l(0.050000)
mul r7.w, r6.x, r6.x
mul r7.w, r7.w, r7.w
mad r8.w, r1.x, r7.w, -r1.x
mad r1.x, r8.w, r1.x, l(1.000000)
mul r1.x, r1.x, r1.x
div r1.x, r7.w, r1.x
mad r10.xy, r6.xxxx, l(0.500000, -0.337748349, 0.000000, 0.000000), l(0.500000, 1.000000, 0.000000, 0.000000)
mul r7.w, r10.x, r10.x
mad r8.w, -r10.x, r10.x, l(1.000000)
mad r9.w, |r3.y|, r8.w, r7.w
mad r7.w, r1.y, r8.w, r7.w
mul r7.w, |r3.y|, r7.w
mad r7.w, r1.y, r9.w, r7.w
add r7.w, r7.w, l(0.000010)
rcp r7.w, r7.w
mul r7.w, r7.w, l(0.500000)
mul r1.x, r1.x, r1.z
mul r1.x, r7.w, r1.x
mul r1.z, r1.w, r1.w
dp2 r1.z, r1.zzzz, r6.xxxx
mad r1.z, r6.x, l(0.500000), r1.z
add r1.z, r1.z, l(-1.000000)
add r1.w, -r1.y, l(1.000000)
mul r6.x, r1.w, r1.w
mul r6.x, r6.x, r6.x
mul r1.w, r1.w, r6.x
mad r1.w, r1.z, r1.w, l(1.000000)
add r3.y, -|r3.y|, l(1.000000)
mul r6.x, r3.y, r3.y
mul r6.x, r6.x, r6.x
mul r3.y, r3.y, r6.x
mad r1.z, r1.z, r3.y, l(1.000000)
mul r1.z, r1.z, r1.w
mul r1.z, r10.y, r1.z
mul r10.xyz, r7.xyzx, r1.zzzz
mov_sat r1.z, r4.w
mul r7.xyz, r7.xyzx, r1.xxxx
add r1.x, -r3.z, l(1.000000)
add r1.w, r4.w, l(-1.000000)
mad r1.w, r1.w, cb2[2].w, l(1.000000)
mad r3.y, r6.z, l(0.500000), l(0.500000)
mad r4.w, -r6.z, l(0.500000), l(0.500000)
mul r3.y, r3.y, r3.y
mul r4.w, r4.w, r4.w
mul r11.xyz, r4.wwww, cb1[26].xyzx
mad r11.xyz, r3.yyyy, cb1[25].xyzx, r11.xyzx
mad r11.xyz, cb2[2].xyzx, r1.wwww, r11.xyzx
dp3_sat r1.w, r6.yzwy, cb1[24].xyzx
mad r11.xyz, cb1[23].xyzx, r1.wwww, r11.xyzx
mul r11.xyz, r1.xxxx, r11.xyzx
mad r10.xyz, r10.xyzx, r1.zzzz, r11.xyzx
mad r5.yzw, r10.xxyz, r4.xxyz, r5.yyzw
eq r1.z, cb3[0].w, l(1.000000)
if_nz r1.z
  add r10.xyz, r0.xyzx, -cb3[0].xyzx
  dp3 r1.z, r10.xyzx, r10.xyzx
  sqrt r1.w, r1.z
  mul_sat r1.w, r1.w, cb3[1].y
  dp3 r3.y, r9.xyzx, r10.xyzx
  add r4.w, r3.y, r3.y
  add r1.z, r1.z, -cb3[1].x
  mul r1.z, r1.z, l(4.000000)
  mad r1.z, r4.w, r4.w, -r1.z
  ge r4.w, r1.z, l(0.000000)
  if_nz r4.w
    sqrt r1.z, r1.z
    mad r1.z, -r3.y, l(2.000000), r1.z
    mul r1.z, r1.z, l(0.500000)
    mad r10.xyz, r1.zzzz, r9.xyzx, r0.xyzx
    add r10.xyz, r10.xyzx, -cb3[0].xyzx
    add r1.z, r1.w, l(-0.700000)
    mul r1.z, r1.z, l(3.33333325)
    max r1.z, r1.z, l(0.000000)
    mad r1.w, r1.z, l(-2.000000), l(3.000000)
    mul r1.z, r1.z, r1.z
    mad r11.w, -r1.w, r1.z, l(1.000000)
    log r1.z, r3.x
    mad r1.z, -r1.z, l(1.800000), l(1.000000)
    add r1.z, -r1.z, l(8.000000)
    mov r10.w, -r10.z
    sample_l_indexable(texturecube)(float,float,float,float) r10.xyz, r10.xywx, t5.xyzw, s4, r1.z
    mul r11.xyz, r11.wwww, r10.xyzx
  else
    mov r11.xyzw, l(0,0,0,0)
  endif
else
  eq r1.z, cb3[0].w, l(2.000000)
  if_nz r1.z
    mov r0.w, l(1.000000)
    dp4 r10.x, r0.xyzw, cb3[7].xyzw
    dp4 r10.y, r0.xyzw, cb3[8].xyzw
    dp4 r10.z, r0.xyzw, cb3[9].xyzw
    add r12.xyz, r10.xyzx, r10.xyzx
    mad_sat r13.xyz, |r12.xyzx|, cb3[1].xyzx, cb3[2].xyzx
    mul r1.z, r13.y, r13.x
    mul r11.w, r13.z, r1.z
    dp3 r13.x, r9.xyzx, cb3[7].xyzx
    dp3 r13.y, r9.xyzx, cb3[8].xyzx
    dp3 r13.z, r9.xyzx, cb3[9].xyzx
    mad r14.xyz, -r10.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(1.000000, 1.000000, 1.000000, 0.000000)
    div r14.xyz, r14.xyzx, r13.xyzx
    mad r10.xyz, -r10.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
    div r10.xyz, r10.xyzx, r13.xyzx
    max r10.xyz, r10.xyzx, r14.xyzx
    min r1.z, r10.z, r10.y
    min r1.z, r1.z, r10.x
    mad r10.xyz, r13.xyzx, r1.zzzz, r12.xyzx
    add r10.xyz, r10.xyzx, -cb3[0].xyzx
    dp3 r12.x, r10.xyzx, cb3[3].xyzx
    dp3 r12.y, r10.xyzx, cb3[4].xyzx
    dp3 r1.z, r10.xyzx, cb3[5].xyzx
    log r1.w, r3.x
    mad r1.w, -r1.w, l(1.800000), l(1.000000)
    add r1.w, -r1.w, l(8.000000)
    mov r12.z, -r1.z
    sample_l_indexable(texturecube)(float,float,float,float) r10.xyz, r12.xyzx, t5.xyzw, s4, r1.w
    mul r11.xyz, r11.wwww, r10.xyzx
  else
    mov r11.xyzw, l(0,0,0,0)
  endif
endif
eq r1.z, cb3[11].w, l(1.000000)
lt r1.w, r11.w, l(1.000000)
and r1.z, r1.w, r1.z
if_nz r1.z
  add r1.z, -r11.w, l(1.000000)
  add r10.xyz, r0.xyzx, -cb3[11].xyzx
  dp3 r3.y, r10.xyzx, r10.xyzx
  sqrt r4.w, r3.y
  mul_sat r4.w, r4.w, cb3[12].y
  dp3 r6.x, r9.xyzx, r10.xyzx
  add r7.w, r6.x, r6.x
  add r3.y, r3.y, -cb3[12].x
  mul r3.y, r3.y, l(4.000000)
  mad r3.y, r7.w, r7.w, -r3.y
  ge r7.w, r3.y, l(0.000000)
  if_nz r7.w
    sqrt r3.y, r3.y
    mad r3.y, -r6.x, l(2.000000), r3.y
    mul r3.y, r3.y, l(0.500000)
    mad r10.xyz, r3.yyyy, r9.xyzx, r0.xyzx
    add r10.xyz, r10.xyzx, -cb3[11].xyzx
    add r3.y, r4.w, l(-0.700000)
    mul r3.y, r3.y, l(3.33333325)
    max r3.y, r3.y, l(0.000000)
    mad r4.w, r3.y, l(-2.000000), l(3.000000)
    mul r3.y, r3.y, r3.y
    mad r12.w, -r4.w, r3.y, l(1.000000)
    log r3.y, r3.x
    mad r3.y, -r3.y, l(1.800000), l(1.000000)
    add r3.y, -r3.y, l(8.000000)
    mov r10.w, -r10.z
    sample_l_indexable(texturecube)(float,float,float,float) r10.xyz, r10.xywx, t6.xyzw, s5, r3.y
    mul r12.xyz, r12.wwww, r10.xyzx
  else
    mov r12.xyzw, l(0,0,0,0)
  endif
  mad r11.xyzw, r1.zzzz, r12.xyzw, r11.xyzw
else
  eq r1.z, cb3[11].w, l(2.000000)
  and r1.z, r1.w, r1.z
  if_nz r1.z
    add r1.z, -r11.w, l(1.000000)
    mov r0.w, l(1.000000)
    dp4 r10.x, r0.xyzw, cb3[18].xyzw
    dp4 r10.y, r0.xyzw, cb3[19].xyzw
    dp4 r10.z, r0.xyzw, cb3[20].xyzw
    add r12.xyz, r10.xyzx, r10.xyzx
    mad_sat r13.xyz, |r12.xyzx|, cb3[12].xyzx, cb3[13].xyzx
    mul r1.w, r13.y, r13.x
    mul r13.w, r13.z, r1.w
    dp3 r14.x, r9.xyzx, cb3[18].xyzx
    dp3 r14.y, r9.xyzx, cb3[19].xyzx
    dp3 r14.z, r9.xyzx, cb3[20].xyzx
    mad r15.xyz, -r10.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(1.000000, 1.000000, 1.000000, 0.000000)
    div r15.xyz, r15.xyzx, r14.xyzx
    mad r10.xyz, -r10.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
    div r10.xyz, r10.xyzx, r14.xyzx
    max r10.xyz, r10.xyzx, r15.xyzx
    min r1.w, r10.z, r10.y
    min r1.w, r1.w, r10.x
    mad r10.xyz, r14.xyzx, r1.wwww, r12.xyzx
    add r10.xyz, r10.xyzx, -cb3[11].xyzx
    dp3 r12.x, r10.xyzx, cb3[14].xyzx
    dp3 r12.y, r10.xyzx, cb3[15].xyzx
    dp3 r1.w, r10.xyzx, cb3[16].xyzx
    log r3.y, r3.x
    mad r3.y, -r3.y, l(1.800000), l(1.000000)
    add r3.y, -r3.y, l(8.000000)
    mov r12.z, -r1.w
    sample_l_indexable(texturecube)(float,float,float,float) r10.xyz, r12.xyzx, t6.xyzw, s5, r3.y
    mul r13.xyz, r13.wwww, r10.xyzx
    mad r11.xyzw, r1.zzzz, r13.xyzw, r11.xyzw
  endif
endif
eq r1.z, cb3[22].w, l(1.000000)
lt r1.w, r11.w, l(1.000000)
and r1.z, r1.w, r1.z
if_nz r1.z
  add r1.z, -r11.w, l(1.000000)
  add r10.xyz, r0.xyzx, -cb3[22].xyzx
  dp3 r3.y, r10.xyzx, r10.xyzx
  sqrt r4.w, r3.y
  mul_sat r4.w, r4.w, cb3[23].y
  dp3 r6.x, r9.xyzx, r10.xyzx
  add r7.w, r6.x, r6.x
  add r3.y, r3.y, -cb3[23].x
  mul r3.y, r3.y, l(4.000000)
  mad r3.y, r7.w, r7.w, -r3.y
  ge r7.w, r3.y, l(0.000000)
  if_nz r7.w
    sqrt r3.y, r3.y
    mad r3.y, -r6.x, l(2.000000), r3.y
    mul r3.y, r3.y, l(0.500000)
    mad r10.xyz, r3.yyyy, r9.xyzx, r0.xyzx
    add r10.xyz, r10.xyzx, -cb3[22].xyzx
    add r3.y, r4.w, l(-0.700000)
    mul r3.y, r3.y, l(3.33333325)
    max r3.y, r3.y, l(0.000000)
    mad r4.w, r3.y, l(-2.000000), l(3.000000)
    mul r3.y, r3.y, r3.y
    mad r12.w, -r4.w, r3.y, l(1.000000)
    log r3.y, r3.x
    mad r3.y, -r3.y, l(1.800000), l(1.000000)
    add r3.y, -r3.y, l(8.000000)
    mov r10.w, -r10.z
    sample_l_indexable(texturecube)(float,float,float,float) r10.xyz, r10.xywx, t7.xyzw, s6, r3.y
    mul r12.xyz, r12.wwww, r10.xyzx
  else
    mov r12.xyzw, l(0,0,0,0)
  endif
  mad r11.xyzw, r1.zzzz, r12.xyzw, r11.xyzw
else
  eq r1.z, cb3[22].w, l(2.000000)
  and r1.z, r1.w, r1.z
  if_nz r1.z
    add r1.z, -r11.w, l(1.000000)
    mov r0.w, l(1.000000)
    dp4 r10.x, r0.xyzw, cb3[29].xyzw
    dp4 r10.y, r0.xyzw, cb3[30].xyzw
    dp4 r10.z, r0.xyzw, cb3[31].xyzw
    add r12.xyz, r10.xyzx, r10.xyzx
    mad_sat r13.xyz, |r12.xyzx|, cb3[23].xyzx, cb3[24].xyzx
    mul r1.w, r13.y, r13.x
    mul r13.w, r13.z, r1.w
    dp3 r14.x, r9.xyzx, cb3[29].xyzx
    dp3 r14.y, r9.xyzx, cb3[30].xyzx
    dp3 r14.z, r9.xyzx, cb3[31].xyzx
    mad r15.xyz, -r10.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(1.000000, 1.000000, 1.000000, 0.000000)
    div r15.xyz, r15.xyzx, r14.xyzx
    mad r10.xyz, -r10.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
    div r10.xyz, r10.xyzx, r14.xyzx
    max r10.xyz, r10.xyzx, r15.xyzx
    min r1.w, r10.z, r10.y
    min r1.w, r1.w, r10.x
    mad r10.xyz, r14.xyzx, r1.wwww, r12.xyzx
    add r10.xyz, r10.xyzx, -cb3[22].xyzx
    dp3 r12.x, r10.xyzx, cb3[25].xyzx
    dp3 r12.y, r10.xyzx, cb3[26].xyzx
    dp3 r1.w, r10.xyzx, cb3[27].xyzx
    log r3.y, r3.x
    mad r3.y, -r3.y, l(1.800000), l(1.000000)
    add r3.y, -r3.y, l(8.000000)
    mov r12.z, -r1.w
    sample_l_indexable(texturecube)(float,float,float,float) r10.xyz, r12.xyzx, t7.xyzw, s6, r3.y
    mul r13.xyz, r13.wwww, r10.xyzx
    mad r11.xyzw, r1.zzzz, r13.xyzw, r11.xyzw
  endif
endif
eq r1.z, cb3[33].w, l(1.000000)
lt r1.w, r11.w, l(1.000000)
and r1.z, r1.w, r1.z
if_nz r1.z
  add r1.z, -r11.w, l(1.000000)
  add r10.xyz, r0.xyzx, -cb3[33].xyzx
  dp3 r3.y, r10.xyzx, r10.xyzx
  sqrt r4.w, r3.y
  mul_sat r4.w, r4.w, cb3[34].y
  dp3 r6.x, r9.xyzx, r10.xyzx
  add r7.w, r6.x, r6.x
  add r3.y, r3.y, -cb3[34].x
  mul r3.y, r3.y, l(4.000000)
  mad r3.y, r7.w, r7.w, -r3.y
  ge r7.w, r3.y, l(0.000000)
  if_nz r7.w
    sqrt r3.y, r3.y
    mad r3.y, -r6.x, l(2.000000), r3.y
    mul r3.y, r3.y, l(0.500000)
    mad r10.xyz, r3.yyyy, r9.xyzx, r0.xyzx
    add r10.xyz, r10.xyzx, -cb3[33].xyzx
    add r3.y, r4.w, l(-0.700000)
    mul r3.y, r3.y, l(3.33333325)
    max r3.y, r3.y, l(0.000000)
    mad r4.w, r3.y, l(-2.000000), l(3.000000)
    mul r3.y, r3.y, r3.y
    mad r12.w, -r4.w, r3.y, l(1.000000)
    log r3.y, r3.x
    mad r3.y, -r3.y, l(1.800000), l(1.000000)
    add r3.y, -r3.y, l(8.000000)
    mov r10.w, -r10.z
    sample_l_indexable(texturecube)(float,float,float,float) r10.xyz, r10.xywx, t8.xyzw, s7, r3.y
    mul r12.xyz, r12.wwww, r10.xyzx
  else
    mov r12.xyzw, l(0,0,0,0)
  endif
  mad r11.xyzw, r1.zzzz, r12.xyzw, r11.xyzw
else
  eq r1.z, cb3[33].w, l(2.000000)
  and r1.z, r1.w, r1.z
  if_nz r1.z
    add r1.z, -r11.w, l(1.000000)
    mov r0.w, l(1.000000)
    dp4 r10.x, r0.xyzw, cb3[40].xyzw
    dp4 r10.y, r0.xyzw, cb3[41].xyzw
    dp4 r10.z, r0.xyzw, cb3[42].xyzw
    add r12.xyz, r10.xyzx, r10.xyzx
    mad_sat r13.xyz, |r12.xyzx|, cb3[34].xyzx, cb3[35].xyzx
    mul r1.w, r13.y, r13.x
    mul r13.w, r13.z, r1.w
    dp3 r14.x, r9.xyzx, cb3[40].xyzx
    dp3 r14.y, r9.xyzx, cb3[41].xyzx
    dp3 r14.z, r9.xyzx, cb3[42].xyzx
    mad r15.xyz, -r10.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(1.000000, 1.000000, 1.000000, 0.000000)
    div r15.xyz, r15.xyzx, r14.xyzx
    mad r10.xyz, -r10.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
    div r10.xyz, r10.xyzx, r14.xyzx
    max r10.xyz, r10.xyzx, r15.xyzx
    min r1.w, r10.z, r10.y
    min r1.w, r1.w, r10.x
    mad r10.xyz, r14.xyzx, r1.wwww, r12.xyzx
    add r10.xyz, r10.xyzx, -cb3[33].xyzx
    dp3 r12.x, r10.xyzx, cb3[36].xyzx
    dp3 r12.y, r10.xyzx, cb3[37].xyzx
    dp3 r1.w, r10.xyzx, cb3[38].xyzx
    log r3.y, r3.x
    mad r3.y, -r3.y, l(1.800000), l(1.000000)
    add r3.y, -r3.y, l(8.000000)
    mov r12.z, -r1.w
    sample_l_indexable(texturecube)(float,float,float,float) r10.xyz, r12.xyzx, t8.xyzw, s7, r3.y
    mul r13.xyz, r13.wwww, r10.xyzx
    mad r11.xyzw, r1.zzzz, r13.xyzw, r11.xyzw
  endif
endif
eq r1.z, cb3[44].w, l(1.000000)
lt r1.w, r11.w, l(1.000000)
and r1.z, r1.w, r1.z
if_nz r1.z
  add r1.z, -r11.w, l(1.000000)
  add r10.xyz, r0.xyzx, -cb3[44].xyzx
  dp3 r3.y, r10.xyzx, r10.xyzx
  sqrt r4.w, r3.y
  mul_sat r4.w, r4.w, cb3[45].y
  dp3 r6.x, r9.xyzx, r10.xyzx
  add r7.w, r6.x, r6.x
  add r3.y, r3.y, -cb3[45].x
  mul r3.y, r3.y, l(4.000000)
  mad r3.y, r7.w, r7.w, -r3.y
  ge r7.w, r3.y, l(0.000000)
  if_nz r7.w
    sqrt r3.y, r3.y
    mad r3.y, -r6.x, l(2.000000), r3.y
    mul r3.y, r3.y, l(0.500000)
    mad r10.xyz, r3.yyyy, r9.xyzx, r0.xyzx
    add r10.xyz, r10.xyzx, -cb3[44].xyzx
    add r3.y, r4.w, l(-0.700000)
    mul r3.y, r3.y, l(3.33333325)
    max r3.y, r3.y, l(0.000000)
    mad r4.w, r3.y, l(-2.000000), l(3.000000)
    mul r3.y, r3.y, r3.y
    mad r3.y, -r4.w, r3.y, l(1.000000)
    log r4.w, r3.x
    mad r4.w, -r4.w, l(1.800000), l(1.000000)
    add r4.w, -r4.w, l(8.000000)
    mov r10.w, -r10.z
    sample_l_indexable(texturecube)(float,float,float,float) r10.xyz, r10.xywx, t9.xyzw, s8, r4.w
    mul r10.xyz, r3.yyyy, r10.xyzx
  else
    mov r10.xyz, l(0,0,0,0)
  endif
  mad r11.xyz, r1.zzzz, r10.xyzx, r11.xyzx
else
  eq r1.z, cb3[44].w, l(2.000000)
  and r1.z, r1.w, r1.z
  if_nz r1.z
    add r1.z, -r11.w, l(1.000000)
    mov r0.w, l(1.000000)
    dp4 r10.x, r0.xyzw, cb3[51].xyzw
    dp4 r10.y, r0.xyzw, cb3[52].xyzw
    dp4 r10.z, r0.xyzw, cb3[53].xyzw
    add r12.xyz, r10.xyzx, r10.xyzx
    mad_sat r13.xyz, |r12.xyzx|, cb3[45].xyzx, cb3[46].xyzx
    mul r1.w, r13.y, r13.x
    mul r1.w, r13.z, r1.w
    dp3 r13.x, r9.xyzx, cb3[51].xyzx
    dp3 r13.y, r9.xyzx, cb3[52].xyzx
    dp3 r13.z, r9.xyzx, cb3[53].xyzx
    mad r9.xyz, -r10.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(1.000000, 1.000000, 1.000000, 0.000000)
    div r9.xyz, r9.xyzx, r13.xyzx
    mad r10.xyz, -r10.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
    div r10.xyz, r10.xyzx, r13.xyzx
    max r9.xyz, r9.xyzx, r10.xyzx
    min r3.y, r9.z, r9.y
    min r3.y, r3.y, r9.x
    mad r9.xyz, r13.xyzx, r3.yyyy, r12.xyzx
    add r9.xyz, r9.xyzx, -cb3[44].xyzx
    dp3 r10.x, r9.xyzx, cb3[47].xyzx
    dp3 r10.y, r9.xyzx, cb3[48].xyzx
    dp3 r3.y, r9.xyzx, cb3[49].xyzx
    log r4.w, r3.x
    mad r4.w, -r4.w, l(1.800000), l(1.000000)
    add r4.w, -r4.w, l(8.000000)
    mov r10.z, -r3.y
    sample_l_indexable(texturecube)(float,float,float,float) r9.xyz, r10.xyzx, t9.xyzw, s8, r4.w
    mul r9.xyz, r1.wwww, r9.xyzx
    mad r11.xyz, r1.zzzz, r9.xyzx, r11.xyzx
  endif
endif
mov r0.w, l(1.000000)
add r9.xyzw, r0.xyzw, -cb0[35].xyzw
dp4 r10.x, r9.xyzw, cb0[31].xyzw
dp4 r10.y, r9.xyzw, cb0[32].xyzw
dp4 r10.z, r9.xyzw, cb0[33].xyzw
ftou r1.zw, v0.xxxy
lt r0.w, l(0.200000), r3.x
if_nz r0.w
  mov r9.xyz, l(0,0,0,0)
  mov r3.y, l(0)
endif
if_z r0.w
  dp3 r0.w, r10.xyzx, r10.xyzx
  rsq r0.w, r0.w
  mul r12.xyz, r0.wwww, r10.xyzx
  dp3 r0.w, r12.xyzx, r8.xyzx
  add r0.w, r0.w, r0.w
  mad r13.xyz, r8.xyzx, -r0.wwww, r12.xyzx
  dp3 r4.w, r13.xyzx, r13.xyzx
  rsq r4.w, r4.w
  mad r6.x, -r3.x, r3.x, l(1.000000)
  sqrt r7.w, r6.x
  mad r7.w, r3.x, r3.x, r7.w
  mul r6.x, r6.x, r7.w
  mad r13.xyz, r13.xyzx, r4.wwww, -r8.xyzx
  mad r8.xyz, r6.xxxx, r13.xyzx, r8.xyzx
  dp3 r4.w, r8.xyzx, r8.xyzx
  rsq r4.w, r4.w
  mul r8.xyz, r4.wwww, r8.xyzx
  dp3 r4.w, r8.xyzx, r12.xyzx
  mul_sat r4.w, r4.w, l(2.857143)
  mad r6.x, r4.w, l(-2.000000), l(3.000000)
  mul r4.w, r4.w, r4.w
  mul r4.w, r4.w, r6.x
  ge r6.x, l(0.000000), r4.w
  if_nz r6.x
    mov r9.xyz, l(0,0,0,0)
    mov r3.y, l(0)
  endif
  if_z r6.x
    eq r6.x, cb0[49].z, l(0.000000)
    ftou r7.w, cb0[1].w
    movc r12.z, r6.x, l(0), r7.w
    and r12.xy, r1.zwzz, l(63, 63, 0, 0)
    mov r12.w, l(0)
    ld_indexable(texture2darray)(float,float,float,float) r6.x, r12.xyzw, t11.xyzw
    mad r12.xyz, r8.xyzx, l(500000.000000, 500000.000000, 500000.000000, 0.000000), r10.xyzx

    mov r10.w, l(1.000000)



	
    dp4 r13.x, r10.xyzw, cb0[49].xyzw
    dp4 r13.y, r10.xyzw, cb0[50].xyzw
    dp4 r13.z, r10.xyzw, cb0[51].xyzw
    dp4 r7.w, r10.xyzw, cb0[52].xyzw
    mov r12.w, l(1.000000)
	

	
    dp4 r14.x, r12.xyzw, cb0[49].xyzw
    dp4 r14.y, r12.xyzw, cb0[50].xyzw
    dp4 r14.z, r12.xyzw, cb0[51].xyzw
    dp4 r8.w, r12.xyzw, cb0[52].xyzw
    div r12.xyz, r13.xyzx, r7.wwww
    div r13.xyz, r14.xyzx, r8.wwww
    lt r14.xy, l(1.000000, 1.000000, 0.000000, 0.000000), r13.yxyy
    lt r14.zw, r13.yyyx, l(0.000000, 0.000000, -1.000000, -1.000000)
    or r14.zw, r14.zzzw, r14.xxxy
    movc r14.xy, r14.xyxx, l(-1.000000,-1.000000,0,0), l(1.000000,1.000000,0,0)
    add r14.xy, r13.yxyy, r14.xyxx
    add r15.xy, -r12.yxyy, r13.yxyy
    div r14.xy, r14.xyxx, r15.xyxx
    and r7.w, r14.x, r14.z
    max r8.w, r14.y, r7.w
    movc r7.w, r14.w, r8.w, r7.w
    add r14.xyz, r12.xyzx, -r13.xyzx
    mad r13.xyz, r7.wwww, r14.xyzx, r13.xyzx
    add r13.xyz, -r12.xyzx, r13.xyzx
    mul r7.w, |r13.z|, l(0.0833333358)
    mul r8.w, r6.x, l(0.0833333358)
    mad r9.w, r6.x, l(0.0833333358), l(0.0833333358)
    mul r13.xyw, r13.xyxz, l(0.500000, -0.500000, 0.000000, 1.000000)
    mad r12.xyz, r12.xyzx, l(0.500000, -0.500000, 1.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)
    mad r14.xyz, r13.xywx, r9.wwww, r12.xyzx
    sample_l_indexable(texture2d)(float,float,float,float) r10.w, r14.xyxx, t2.yzwx, s1, l(0.000000)
    add r10.w, -r14.z, r10.w
    mad r11.w, -|r13.z|, l(0.0833333358), r10.w
    ge r11.w, r7.w, |r11.w|
    if_nz r11.w
      min r8.w, r8.w, l(1.000000)
    else
      mov r8.w, l(1.000000)
    endif
    movc r10.w, r11.w, l(0), r10.w
    if_z r11.w
      mad r9.w, r6.x, l(0.0833333358), l(0.166666672)
      if_z r11.w
        mad r14.xyz, r13.xywx, r9.wwww, r12.xyzx
        mul r11.w, r3.x, l(0.333333343)
        sample_l_indexable(texture2d)(float,float,float,float) r11.w, r14.xyxx, t2.yzwx, s1, r11.w
        add r11.w, -r14.z, r11.w
        mad r12.w, -|r13.z|, l(0.0833333358), r11.w
        ge r12.w, r7.w, |r12.w|
        if_nz r12.w
          add r14.x, r10.w, -r11.w
          div_sat r14.x, r10.w, r14.x
          mad r14.x, r14.x, l(0.0833333358), r9.w
          add r14.x, r14.x, l(-0.0833333358)
          min r8.w, r8.w, r14.x
        endif
        movc r10.w, r12.w, r10.w, r11.w
      else
        mov r12.w, l(-1)
      endif
    else
      mov r12.w, l(-1)
    endif
    if_z r12.w
      add r9.w, r9.w, l(0.0833333358)
      mad r14.xyz, r13.xywx, r9.wwww, r12.xyzx
      mul r11.w, r3.x, l(0.666666687)
      sample_l_indexable(texture2d)(float,float,float,float) r11.w, r14.xyxx, t2.yzwx, s1, r11.w
      add r11.w, -r14.z, r11.w
      mad r12.w, -|r13.z|, l(0.0833333358), r11.w
      ge r12.w, r7.w, |r12.w|
      if_nz r12.w
        add r14.x, r10.w, -r11.w
        div_sat r14.x, r10.w, r14.x
        mad r14.x, r14.x, l(0.0833333358), r9.w
        add r14.x, r14.x, l(-0.0833333358)
        min r8.w, r8.w, r14.x
      endif
      movc r10.w, r12.w, r10.w, r11.w
    else
      mov r12.w, l(-1)
    endif
    if_z r12.w
      add r9.w, r9.w, l(0.0833333358)
      mad r14.xyz, r13.xywx, r9.wwww, r12.xyzx
      sample_l_indexable(texture2d)(float,float,float,float) r11.w, r14.xyxx, t2.yzwx, s1, r3.x
      add r11.w, -r14.z, r11.w
      mad r12.w, -|r13.z|, l(0.0833333358), r11.w
      ge r12.w, r7.w, |r12.w|
      if_nz r12.w
        add r14.x, r10.w, -r11.w
        div_sat r14.x, r10.w, r14.x
        mad r14.x, r14.x, l(0.0833333358), r9.w
        add r14.x, r14.x, l(-0.0833333358)
        min r8.w, r8.w, r14.x
      endif
      movc r10.w, r12.w, r10.w, r11.w
    else
      mov r12.w, l(-1)
    endif
    if_z r12.w
      add r9.w, r9.w, l(0.0833333358)
      mad r14.xyz, r13.xywx, r9.wwww, r12.xyzx
      mul r11.w, r3.x, l(1.33333337)
      sample_l_indexable(texture2d)(float,float,float,float) r11.w, r14.xyxx, t2.yzwx, s1, r11.w
      add r11.w, -r14.z, r11.w
      mad r12.w, -|r13.z|, l(0.0833333358), r11.w
      ge r12.w, r7.w, |r12.w|
      if_nz r12.w
        add r14.x, r10.w, -r11.w
        div_sat r14.x, r10.w, r14.x
        mad r14.x, r14.x, l(0.0833333358), r9.w
        add r14.x, r14.x, l(-0.0833333358)
        min r8.w, r8.w, r14.x
      endif
      movc r10.w, r12.w, r10.w, r11.w
    else
      mov r12.w, l(-1)
    endif
    if_z r12.w
      add r9.w, r9.w, l(0.0833333358)
      mad r14.xyz, r13.xywx, r9.wwww, r12.xyzx
      mul r11.w, r3.x, l(1.66666663)
      sample_l_indexable(texture2d)(float,float,float,float) r11.w, r14.xyxx, t2.yzwx, s1, r11.w
      add r11.w, -r14.z, r11.w
      mad r12.w, -|r13.z|, l(0.0833333358), r11.w
      ge r12.w, r7.w, |r12.w|
      if_nz r12.w
        add r14.x, r10.w, -r11.w
        div_sat r14.x, r10.w, r14.x
        mad r14.x, r14.x, l(0.0833333358), r9.w
        add r14.x, r14.x, l(-0.0833333358)
        min r8.w, r8.w, r14.x
      endif
      movc r10.w, r12.w, r10.w, r11.w
    else
      mov r12.w, l(-1)
    endif
    if_z r12.w
      add r9.w, r9.w, l(0.0833333358)
      mad r14.xyz, r13.xywx, r9.wwww, r12.xyzx
      add r11.w, r3.x, r3.x
      sample_l_indexable(texture2d)(float,float,float,float) r11.w, r14.xyxx, t2.yzwx, s1, r11.w
      add r11.w, -r14.z, r11.w
      mad r12.w, -|r13.z|, l(0.0833333358), r11.w
      ge r12.w, r7.w, |r12.w|
      if_nz r12.w
        add r14.x, r10.w, -r11.w
        div_sat r14.x, r10.w, r14.x
        mad r14.x, r14.x, l(0.0833333358), r9.w
        add r14.x, r14.x, l(-0.0833333358)
        min r8.w, r8.w, r14.x
      endif
      movc r10.w, r12.w, r10.w, r11.w
    else
      mov r12.w, l(-1)
    endif
    if_z r12.w
      add r9.w, r9.w, l(0.0833333358)
      mad r14.xyz, r13.xywx, r9.wwww, r12.xyzx
      mul r11.w, r3.x, l(2.33333325)
      sample_l_indexable(texture2d)(float,float,float,float) r11.w, r14.xyxx, t2.yzwx, s1, r11.w
      add r11.w, -r14.z, r11.w
      mad r12.w, -|r13.z|, l(0.0833333358), r11.w
      ge r12.w, r7.w, |r12.w|
      if_nz r12.w
        add r14.x, r10.w, -r11.w
        div_sat r14.x, r10.w, r14.x
        mad r14.x, r14.x, l(0.0833333358), r9.w
        add r14.x, r14.x, l(-0.0833333358)
        min r8.w, r8.w, r14.x
      endif
      movc r10.w, r12.w, r10.w, r11.w
    else
      mov r12.w, l(-1)
    endif
    if_z r12.w
      add r9.w, r9.w, l(0.0833333358)
      mad r14.xyz, r13.xywx, r9.wwww, r12.xyzx
      mul r11.w, r3.x, l(2.66666675)
      sample_l_indexable(texture2d)(float,float,float,float) r11.w, r14.xyxx, t2.yzwx, s1, r11.w
      add r11.w, -r14.z, r11.w
      mad r12.w, -|r13.z|, l(0.0833333358), r11.w
      ge r12.w, r7.w, |r12.w|
      if_nz r12.w
        add r14.x, r10.w, -r11.w
        div_sat r14.x, r10.w, r14.x
        mad r14.x, r14.x, l(0.0833333358), r9.w
        add r14.x, r14.x, l(-0.0833333358)
        min r8.w, r8.w, r14.x
      endif
      movc r10.w, r12.w, r10.w, r11.w
    else
      mov r12.w, l(-1)
    endif
    if_z r12.w
      add r9.w, r9.w, l(0.0833333358)
      mad r14.xyz, r13.xywx, r9.wwww, r12.xyzx
      mul r11.w, r3.x, l(3.000000)
      sample_l_indexable(texture2d)(float,float,float,float) r11.w, r14.xyxx, t2.yzwx, s1, r11.w
      add r11.w, -r14.z, r11.w
      mad r12.w, -|r13.z|, l(0.0833333358), r11.w
      ge r12.w, r7.w, |r12.w|
      if_nz r12.w
        add r14.x, r10.w, -r11.w
        div_sat r14.x, r10.w, r14.x
        mad r14.x, r14.x, l(0.0833333358), r9.w
        add r14.x, r14.x, l(-0.0833333358)
        min r8.w, r8.w, r14.x
      endif
      movc r10.w, r12.w, r10.w, r11.w
    else
      mov r12.w, l(-1)
    endif
    if_z r12.w
      add r9.w, r9.w, l(0.0833333358)
      mad r14.xyz, r13.xywx, r9.wwww, r12.xyzx
      mul r11.w, r3.x, l(3.33333325)
      sample_l_indexable(texture2d)(float,float,float,float) r11.w, r14.xyxx, t2.yzwx, s1, r11.w
      add r11.w, -r14.z, r11.w
      mad r12.w, -|r13.z|, l(0.0833333358), r11.w
      ge r12.w, r7.w, |r12.w|
      if_nz r12.w
        add r14.x, r10.w, -r11.w
        div_sat r14.x, r10.w, r14.x
        mad r14.x, r14.x, l(0.0833333358), r9.w
        add r14.x, r14.x, l(-0.0833333358)
        min r8.w, r8.w, r14.x
      endif
      movc r10.w, r12.w, r10.w, r11.w
    else
      mov r12.w, l(-1)
    endif
    if_z r12.w
      add r9.w, r9.w, l(0.0833333358)
      mad r14.xyz, r13.xywx, r9.wwww, r12.xyzx
      mul r11.w, r3.x, l(3.66666675)
      sample_l_indexable(texture2d)(float,float,float,float) r11.w, r14.xyxx, t2.yzwx, s1, r11.w
      add r11.w, -r14.z, r11.w
      mad r12.w, -|r13.z|, l(0.0833333358), r11.w
      ge r7.w, r7.w, |r12.w|
      if_nz r7.w
        add r7.w, r10.w, -r11.w
        div_sat r7.w, r10.w, r7.w
        mad r7.w, r7.w, l(0.0833333358), r9.w
        add r7.w, r7.w, l(-0.0833333358)
        min r8.w, r7.w, r8.w
      endif
    endif
    mad r12.xyz, r13.xywx, r8.wwww, r12.xyzx
    lt r7.w, r8.w, l(1.000000)
    add r13.xy, r12.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
    ge r13.xy, l(0.500000, 0.500000, 0.000000, 0.000000), |r13.xyxx|
    and r8.w, r13.y, r13.x
    and r7.w, r7.w, r8.w
    if_nz r7.w
      mul r13.xyzw, r12.xyyy, cb0[18].xyyy
      ftoi r13.xyzw, r13.xyzw
      ld_uav_typed_indexable(texture2d)(uint,uint,uint,uint) r7.w, r13.xwww, u1.yzwx
      ld_uav_typed_indexable(texture2d)(float,float,float,float) r8.w, r13.xyzw, u2.yzwx
      and r9.w, r7.w, l(0x0000ffff)
      f16tof32 r13.x, r9.w
      ushr r7.w, r7.w, l(16)
      f16tof32 r13.y, r7.w
      add r13.xy, r12.xyxx, -r13.xyxx
      sample_l_indexable(texture2d)(float,float,float,float) r7.w, r13.xyxx, t4.yzwx, s3, l(0.000000)
      add r7.w, -|r8.w|, r7.w
      ge r7.w, l(0.010000), r7.w
      mov_sat r13.zw, r13.xxxy
      add r13.zw, -r13.zzzw, r13.xxxy
      dp2 r8.w, r13.zwzz, r13.zwzz
      eq r8.w, r8.w, l(0.000000)
      and r7.w, r7.w, r8.w
      if_nz r7.w
        add r7.w, -r3.x, l(1.000000)
        mad r7.w, r7.w, l(10.000000), l(1.000000)
        exp r7.w, r7.w
        add r7.w, r7.w, l(1.000000)
        div r7.w, l(1.000000, 1.000000, 1.000000, 1.000000), r7.w
        mul r7.w, r7.w, l(-2.03504682)
        exp r7.w, r7.w
        add r8.w, -r7.w, l(1.000000)
        sqrt r8.w, r8.w
        mad r9.w, r7.w, l(-0.0187292993), l(0.074261)
        mad r9.w, r9.w, r7.w, l(-0.212114394)
        mad r7.w, r9.w, r7.w, l(1.57072878)
        mul r7.w, r8.w, r7.w
        mul r7.w, r7.w, l(0.500000)
        sincos r14.x, r15.x, r7.w
        div r7.w, r14.x, r15.x
        mov_sat r0.w, r0.w
        sqrt r8.w, r3.x
        add r9.w, -r0.w, l(1.000000)
        mad r0.w, r8.w, r9.w, r0.w
        mul r0.w, r0.w, r7.w
        mad r13.zw, -v0.xxxy, cb0[18].zzzw, r12.xxxy
        dp2 r7.w, r13.zwzz, r13.zwzz
        sqrt r7.w, r7.w
        mul r0.w, r0.w, r7.w
        max r7.w, cb0[18].y, cb0[18].x
        dp2 r0.w, r7.wwww, r0.wwww
        log r0.w, r0.w
        max r0.w, r0.w, l(0.000000)
        min r0.w, r0.w, l(7.000000)
        lt r7.w, l(0.000000), r3.x
        and r7.w, r7.w, l(0x3f800000)
        mul r0.w, r0.w, r7.w
        mul r6.x, r6.x, l(0.200000)
        sample_l_indexable(texture2d)(float,float,float,float) r14.xyz, r13.xyxx, t3.xyzw, s2, r0.w
        mad r15.xyz, r12.xyzx, l(2.000000, -2.000000, 1.000000, 0.000000), l(-1.000000, 1.000000, 0.000000, 0.000000)
        mov r15.w, l(1.000000)
		
		
		
        dp4 r16.x, r15.xyzw, cb0[65].xyzw
        dp4 r16.y, r15.xyzw, cb0[66].xyzw
        dp4 r16.z, r15.xyzw, cb0[67].xyzw
        dp4 r0.w, r15.xyzw, cb0[68].xyzw
        div r15.xyz, r16.xyzx, r0.wwww
        dp3 r0.w, r15.xyzx, r15.xyzx
        sqrt r0.w, r0.w
        mul r16.xyz, r15.yyyy, cb0[37].zxyz
        mad r16.xyz, r15.xxxx, cb0[36].zxyz, r16.xyzx
        mad r16.xyz, r15.zzzz, cb0[38].zxyz, r16.xyzx
        dp3 r7.w, r16.xyzx, r16.xyzx
        rsq r7.w, r7.w
        mul r16.xyz, r7.wwww, r16.xyzx
        sample_l_indexable(texture2d)(float,float,float,float) r7.w, r12.xyxx, t13.yzwx, s11, l(0.000000)
        add r8.w, r0.w, -cb1[19].y
        div_sat r8.w, r8.w, cb1[19].z
        mad r8.w, -r8.w, r7.w, l(1.000000)
        mul r9.w, r8.w, cb1[19].w
        min r10.w, |r16.y|, |r16.x|
        max r11.w, |r16.y|, |r16.x|
        div r11.w, l(1.000000, 1.000000, 1.000000, 1.000000), r11.w
        mul r10.w, r10.w, r11.w
        mul r11.w, r10.w, r10.w
        mad r12.x, r11.w, l(0.0208350997), l(-0.085133)
        mad r12.x, r11.w, r12.x, l(0.180141)
        mad r12.x, r11.w, r12.x, l(-0.330299497)
        mad r11.w, r11.w, r12.x, l(0.999866)
        mul r12.x, r10.w, r11.w
        lt r12.y, |r16.y|, |r16.x|
        mad r12.x, r12.x, l(-2.000000), l(1.57079637)
        and r12.x, r12.y, r12.x
        mad r10.w, r10.w, r11.w, r12.x
        lt r12.xy, r16.yzyy, -r16.yzyy
        and r11.w, r12.x, l(0xc0490fdb)
        add r10.w, r10.w, r11.w
        min r11.w, r16.y, r16.x
        max r12.x, r16.y, r16.x
        lt r11.w, r11.w, -r11.w
        ge r12.x, r12.x, -r12.x
        and r11.w, r11.w, r12.x
        movc r10.w, r11.w, -r10.w, r10.w
        mad r16.x, r10.w, l(0.159154937), l(0.500000)
        add r10.w, -|r16.z|, l(1.000000)
        sqrt r10.w, r10.w
        mad r11.w, |r16.z|, l(-0.0187292993), l(0.074261)
        mad r11.w, r11.w, |r16.z|, l(-0.212114394)
        mad r11.w, r11.w, |r16.z|, l(1.57072878)
        mul r12.x, r10.w, r11.w
        mad r12.x, r12.x, l(-2.000000), l(3.14159274)
        and r12.x, r12.y, r12.x
        mad r10.w, r11.w, r10.w, r12.x
        mul r16.y, r10.w, l(0.318309873)
        sample_l_indexable(texture2d)(float,float,float,float) r12.xyzw, r16.xyxx, t14.xyzw, s12, r9.w
        lt r10.w, l(0.000000), cb1[22].w
        if_nz r10.w
          sample_l_indexable(texture2d)(float,float,float,float) r16.xyzw, r16.xyxx, t15.xyzw, s12, r9.w
          add r16.xyzw, -r12.xyzw, r16.xyzw
          mad r12.xyzw, cb1[22].wwww, r16.xyzw, r12.xyzw
        endif
        mad r16.xyz, r12.xyzx, cb1[20].wwww, cb1[20].xyzx
        add r16.xyz, -r12.xyzx, r16.xyzx
        mad r12.xyz, r8.wwww, r16.xyzx, r12.xyzx
        add r16.xyz, -cb1[21].xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
        mad r16.xyz, r7.wwww, r16.xyzx, cb1[21].xyzx
        mul r12.xyz, r12.xyzx, r16.xyzx
        mul r12.xyz, r12.xyzx, cb1[21].wwww
        mul r0.w, -r0.w, cb1[19].x
        mul r0.w, r0.w, l(1.442695)
        exp r0.w, r0.w
        add r0.w, -r0.w, l(1.000000)
        mul r8.w, r0.w, r12.w
        mad r12.xyz, r12.xyzx, r8.wwww, -r14.xyzx
        mad r0.w, r12.w, r0.w, l(-1.000000)
        div r12.xyz, r12.xyzx, r0.wwww
        add r14.xyz, -r10.xyzx, r15.xyzx
        dp3 r0.w, r14.xyzx, r14.xyzx
        sqrt r0.w, r0.w
        mul r14.xyz, r8.yyyy, cb0[32].zxyz
        mad r8.xyw, r8.xxxx, cb0[31].zxzy, r14.xyxz
        mad r8.xyz, r8.zzzz, cb0[33].zxyz, r8.xywx
        add r8.w, r0.w, -cb1[19].y
        div_sat r8.w, r8.w, cb1[19].z
        mad r7.w, -r8.w, r7.w, l(1.000000)
        mul r8.w, r7.w, cb1[19].w
        min r9.w, |r8.y|, |r8.x|
        max r11.w, |r8.y|, |r8.x|
        div r11.w, l(1.000000, 1.000000, 1.000000, 1.000000), r11.w
        mul r9.w, r9.w, r11.w
        mul r11.w, r9.w, r9.w
        mad r12.w, r11.w, l(0.0208350997), l(-0.085133)
        mad r12.w, r11.w, r12.w, l(0.180141)
        mad r12.w, r11.w, r12.w, l(-0.330299497)
        mad r11.w, r11.w, r12.w, l(0.999866)
        mul r12.w, r9.w, r11.w
        lt r13.z, |r8.y|, |r8.x|
        mad r12.w, r12.w, l(-2.000000), l(1.57079637)
        and r12.w, r13.z, r12.w
        mad r9.w, r9.w, r11.w, r12.w
        lt r13.zw, r8.yyyz, -r8.yyyz
        and r11.w, r13.z, l(0xc0490fdb)
        add r9.w, r9.w, r11.w
        min r11.w, r8.y, r8.x
        max r8.x, r8.y, r8.x
        lt r8.y, r11.w, -r11.w
        ge r8.x, r8.x, -r8.x
        and r8.x, r8.x, r8.y
        movc r8.x, r8.x, -r9.w, r9.w
        mad r8.x, r8.x, l(0.159154937), l(0.500000)
        add r9.w, -|r8.z|, l(1.000000)
        sqrt r9.w, r9.w
        mad r11.w, |r8.z|, l(-0.0187292993), l(0.074261)
        mad r11.w, r11.w, |r8.z|, l(-0.212114394)
        mad r8.z, r11.w, |r8.z|, l(1.57072878)
        mul r11.w, r9.w, r8.z
        mad r11.w, r11.w, l(-2.000000), l(3.14159274)
        and r11.w, r13.w, r11.w
        mad r8.z, r8.z, r9.w, r11.w
        mul r8.y, r8.z, l(0.318309873)
        sample_l_indexable(texture2d)(float,float,float,float) r14.xyzw, r8.xyxx, t14.xyzw, s12, r8.w
        if_nz r10.w
          sample_l_indexable(texture2d)(float,float,float,float) r8.xyzw, r8.xyxx, t15.xyzw, s12, r8.w
          add r8.xyzw, -r14.xyzw, r8.xyzw
          mad r14.xyzw, cb1[22].wwww, r8.xyzw, r14.xyzw
        endif
        mad r8.xyz, r14.xyzx, cb1[20].wwww, cb1[20].xyzx
        add r8.xyz, -r14.xyzx, r8.xyzx
        mad r8.xyz, r7.wwww, r8.xyzx, r14.xyzx
        mul r8.xyz, r16.xyzx, r8.xyzx
        mul r0.w, -r0.w, cb1[19].x
        mul r0.w, r0.w, l(1.442695)
        exp r0.w, r0.w
        add r0.w, -r0.w, l(1.000000)
        mul r0.w, r0.w, r14.w
        mad r8.xyz, r8.xyzx, cb1[21].wwww, -r12.xyzx
        mad r8.xyz, r0.wwww, r8.xyzx, r12.xyzx
        mad r12.xy, r13.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
        add r12.xy, -|r12.xyxx|, l(1.000000, 1.000000, 0.000000, 0.000000)
        min r0.w, r12.y, r12.x
        div_sat r0.w, r0.w, r6.x
        min r9.xyz, -r8.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
        mov r9.xyz, -r9.xyzx
      else
        mov r9.xyz, l(0,0,0,0)
        mov r0.w, l(0)
      endif
    else
      mov r9.xyz, l(0,0,0,0)
      mov r0.w, l(0)
    endif
    mul r0.w, r4.w, r0.w
    add r3.x, r3.x, l(-0.200000)
    mul_sat r3.x, r3.x, l(-10.000000)
    mul r3.y, r0.w, r3.x
  endif
endif
eq r0.w, cb0[49].z, l(0.000000)
ftou r3.x, cb0[1].w
movc r8.z, r0.w, l(0), r3.x
and r8.xy, r1.zwzz, l(63, 63, 0, 0)
mov r8.w, l(0)
ld_indexable(texture2darray)(float,float,float,float) r0.w, r8.xyzw, t11.yzwx
lt r1.z, r3.y, l(1.000000)
mul r0.w, r0.w, l(0.500000)
and r0.w, r0.w, r1.z
add_sat r0.w, -r0.w, r3.y
and r1.z, cb0[19].z, l(1)
add r9.xyz, -r11.xyzx, r9.xyzx
mad r9.xyz, r0.wwww, r9.xyzx, r11.xyzx
movc r9.xyz, r1.zzzz, r9.xyzx, r11.xyzx
mul r9.xyz, r3.zzzz, r9.xyzx
mad r1.yzw, r7.xxyz, r1.yyyy, r9.xxyz
mad r1.yzw, r2.wwww, r5.yyzw, r1.yyzw
mul r0.w, r1.x, r1.x
mul r5.yzw, r9.xxyz, r0.wwww
mad r1.x, -r5.x, v2.w, l(1.000000)
mul r4.xyz, r4.xyzx, r1.xxxx
mul r7.xyz, r4.xyzx, r4.xyzx
mad r1.xyz, r5.yzwy, r7.xyzx, r1.yzwy
mad r3.xy, v0.xyxx, cb0[20].xyxx, cb0[20].zwzz
dp3 r1.w, r10.xyzx, r10.xyzx
sqrt r1.w, r1.w
sample_l_indexable(texture2d)(float,float,float,float) r2.w, r3.xyxx, t13.yzwx, s11, l(0.000000)
add r3.x, r1.w, -cb1[19].y
div_sat r3.x, r3.x, cb1[19].z
mad r3.x, -r3.x, r2.w, l(1.000000)
mul r3.y, r3.x, cb1[19].w
min r4.w, |r2.y|, |r2.x|
max r5.x, |r2.y|, |r2.x|
div r5.x, l(1.000000, 1.000000, 1.000000, 1.000000), r5.x
mul r4.w, r4.w, r5.x
mul r5.x, r4.w, r4.w
mad r5.y, r5.x, l(0.0208350997), l(-0.085133)
mad r5.y, r5.x, r5.y, l(0.180141)
mad r5.y, r5.x, r5.y, l(-0.330299497)
mad r5.x, r5.x, r5.y, l(0.999866)
mul r5.y, r4.w, r5.x
lt r5.z, |r2.y|, |r2.x|
mad r5.y, r5.y, l(-2.000000), l(1.57079637)
and r5.y, r5.z, r5.y
mad r4.w, r4.w, r5.x, r5.y
lt r5.xy, -r2.yzyy, r2.yzyy
and r5.x, r5.x, l(0xc0490fdb)
add r4.w, r4.w, r5.x
min r5.x, -r2.y, -r2.x
max r2.x, -r2.y, -r2.x
lt r2.y, r5.x, -r5.x
ge r2.x, r2.x, -r2.x
and r2.x, r2.x, r2.y
movc r2.x, r2.x, -r4.w, r4.w
mad r2.x, r2.x, l(0.159154937), l(0.500000)
add r4.w, -|r2.z|, l(1.000000)
sqrt r4.w, r4.w
mad r5.x, |r2.z|, l(-0.0187292993), l(0.074261)
mad r5.x, r5.x, |r2.z|, l(-0.212114394)
mad r2.z, r5.x, |r2.z|, l(1.57072878)
mul r5.x, r4.w, r2.z
mad r5.x, r5.x, l(-2.000000), l(3.14159274)
and r5.x, r5.y, r5.x
mad r2.z, r2.z, r4.w, r5.x
mul r2.y, r2.z, l(0.318309873)
sample_l_indexable(texture2d)(float,float,float,float) r5.xyzw, r2.xyxx, t14.xyzw, s12, r3.y
lt r2.z, l(0.000000), cb1[22].w
if_nz r2.z
  sample_l_indexable(texture2d)(float,float,float,float) r7.xyzw, r2.xyxx, t15.xyzw, s12, r3.y
  add r7.xyzw, -r5.xyzw, r7.xyzw
  mad r5.xyzw, cb1[22].wwww, r7.xyzw, r5.xyzw
endif
mad r2.xyz, r5.xyzx, cb1[20].wwww, cb1[20].xyzx
add r2.xyz, -r5.xyzx, r2.xyzx
mad r2.xyz, r3.xxxx, r2.xyzx, r5.xyzx
add r5.xyz, -cb1[21].xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
mad r5.xyz, r2.wwww, r5.xyzx, cb1[21].xyzx
mul r2.xyz, r2.xyzx, r5.xyzx
mul r2.xyz, r2.xyzx, cb1[21].wwww
mul r1.w, -r1.w, cb1[19].x
mul r1.w, r1.w, l(1.442695)
exp r1.w, r1.w
add r1.w, -r1.w, l(1.000000)
mul r1.w, r1.w, r5.w
mad r2.xyz, r2.xyzx, cb4[20].wwww, -r1.xyzx
mad r1.xyz, r1.wwww, r2.xyzx, r1.xyzx
mul r1.w, r3.w, cb4[25].y
mad r0.xyz, r1.wwww, -r6.yzwy, r0.xyzx
add r2.xyz, r0.xyzx, -cb0[35].xyzx
mov r2.w, l(1.000000)
dp4 r5.x, r2.xyzw, cb0[31].xyzw
dp4 r5.y, r2.xyzw, cb0[32].xyzw
dp4 r5.z, r2.xyzw, cb0[33].xyzw
mov r5.w, l(1.000000)

// Pattern Fix for Shadows, Lights and Reflections 1:
//ld_indexable(texture2d)(float,float,float,float) r17.xyzw, l(0, 0, 0, 0), t125.xyzw
//dp4 r19.z, r5.xyzw, cb0[52].xyzw
//mul r18.x r17.y, r19.z
//add r18.x, r18.x, l(-1.0)
//mul r18.x, r17.x, r18.x
//add r5.x, r5.x, r18.x

dp3 r0.x, r5.xywx, cb0[49].xywx
dp3 r0.y, r5.xywx, cb0[50].xywx
dp4 r0.z, r5.xyzw, cb0[52].xyzw
div r0.xy, r0.xyxx, r0.zzzz



mad r0.xy, r0.xyxx, l(0.500000, -0.500000, 0.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)
sample_indexable(texture2d)(float,float,float,float) r0.xyz, r0.xyxx, t12.xyzw, s10
mul r2.xyz, r4.xyzx, r0.xyzx
mad r0.w, r0.w, r3.z, r3.z
add r0.w, -r0.w, l(1.000000)
mad r1.xyz, r2.xyzx, r0.wwww, r1.xyzx
add r1.xyz, -r0.xyzx, r1.xyzx
mad r0.xyz, r3.wwww, r1.xyzx, r0.xyzx
ubfe r0.w, l(3), l(2), cb0[1].x
uge r0.w, r0.w, l(5)
if_nz r0.w
  and r0.w, cb0[1].x, l(1)
  if_nz r0.w
    log r1.xyz, r0.xyzx
    round_ni r1.xyz, r1.xyzx
    add r1.xyz, r1.xyzx, l(-6.000000, -6.000000, -5.000000, 0.000000)
    exp r1.xyz, r1.xyzx
    ld_indexable(texture2darray)(float,float,float,float) r2.x, r8.xyww, t11.xyzw
    mov r2.yz, l(0,1.000000,-1.000000,0)
    mul r3.xyz, r1.xyzx, r2.xyyx
    mul r1.xyz, r1.xyzx, l(1.000000, 0.000000, 0.000000, 0.000000)
    lt r4.xyz, l(0.000000, 0.000000, 0.000000, 0.000000), r0.xyzx
    and r4.xyz, r4.xyzx, l(0x3f800000, 0x3f800000, 0x3f800000, 0)
    mad r1.xyz, r2.zxxz, r3.xyzx, r1.xyzx
    mad r0.xyz, r4.xyzx, r1.xyzx, r0.xyzx
  else
    ld_indexable(texture2darray)(float,float,float,float) r0.w, r8.xyww, t11.yzwx
    lt r1.xyz, l(0.000000, 0.000000, 0.000000, 0.000000), r0.xyzx
    and r1.xyz, r1.xyzx, l(0x3f800000, 0x3f800000, 0x3f800000, 0)
    mad r2.xyz, r0.wwww, l(-0.00392156886, 0.00392156886, 0.00392156886, 0.000000), l(0.00392156886, 0.000000, 0.000000, 0.000000)
    mad r0.xyz, r1.xyzx, r2.xyzx, r0.xyzx
  endif
endif
mov o0.xyz, r0.xyzx
mov o0.w, l(1.000000)
ret
// Approximately 1297 instruction slots used
