// asmtool.py -i --fix-fcprimal-physical-lighting --only-autofixed -f 89d9cb3e7678ac50-cs.txt
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
//   using 3Dmigoto v1.2.31 on Wed Mar 02 08:06:59 2016
//
//
// Buffer Definitions: 
//
// cbuffer CViewportShaderParameterProvider
// {
//
//   float4x4 InvProjectionMatrix;      // Offset:    0 Size:    64 [unused]
//   float4x4 InvViewMatrix;            // Offset:   64 Size:    64 [unused]
//   float4x4 ProjectionMatrix;         // Offset:  128 Size:    64 [unused]
//   float4x4 ViewMatrix;               // Offset:  192 Size:    64 [unused]
//   float4x4 ViewProjectionMatrix;     // Offset:  256 Size:    64 [unused]
//   float4x4 ViewRotProjectionMatrix;  // Offset:  320 Size:    64 [unused]
//   float4x4 ViewRotProjectionMatrix_Previous;// Offset:  384 Size:    64 [unused]
//   float4 AmbientSHR;                 // Offset:  448 Size:    16 [unused]
//   float4 AmbientSHG;                 // Offset:  464 Size:    16 [unused]
//   float4 AmbientSHB;                 // Offset:  480 Size:    16 [unused]
//   float4 CameraDistances;            // Offset:  496 Size:    16 [unused]
//   float4 CameraNearPlaneSize;        // Offset:  512 Size:    16 [unused]
//   float4 DepthScale;                 // Offset:  528 Size:    16 [unused]
//   float4 DepthTextureScaleOffset;    // Offset:  544 Size:    16 [unused]
//   float4 FogParams;                  // Offset:  560 Size:    16
//   float4 FogSHB;                     // Offset:  576 Size:    16
//   float4 FogSHG;                     // Offset:  592 Size:    16
//   float4 FogSHR;                     // Offset:  608 Size:    16
//   float4 HeightFogParams;            // Offset:  624 Size:    16
//   float4 ViewportSize;               // Offset:  640 Size:    16 [unused]
//   float3 ViewPoint;                  // Offset:  656 Size:    12 [unused]
//   float3 CameraPosition;             // Offset:  672 Size:    12
//   float3 CameraPosition_Previous;    // Offset:  688 Size:    12 [unused]
//   float3 CameraPositionFractions;    // Offset:  704 Size:    12 [unused]
//   float3 CameraPositionFractions_Previous;// Offset:  720 Size:    12 [unused]
//   float3 CameraRight;                // Offset:  736 Size:    12 [unused]
//   float3 CameraUp;                   // Offset:  752 Size:    12 [unused]
//   float3 CameraDirection;            // Offset:  768 Size:    12 [unused]
//   float3 EnvironmentMapColorOffset;  // Offset:  784 Size:    12
//   float3 EnvironmentMapColorScale;   // Offset:  800 Size:    12
//   float3 AmbientOcclusionRanges;     // Offset:  816 Size:    12 [unused]
//   float3 DepthTextureRcpSize;        // Offset:  832 Size:    12 [unused]
//   float2 MotionVectorOffsets;        // Offset:  848 Size:     8 [unused]
//   float2 DepthRangeCompression;      // Offset:  856 Size:     8 [unused]
//   float ShadowProjDepthMinValue;     // Offset:  864 Size:     4 [unused]
//   float DistanceScale;               // Offset:  868 Size:     4 [unused]
//   float WorldSpaceZOffset;           // Offset:  872 Size:     4 [unused]
//   float WorldSpaceZOffset_Previous;  // Offset:  876 Size:     4 [unused]
//   float CameraFOVDeg;                // Offset:  880 Size:     4 [unused]
//   float EffectsEmissiveEVBias;       // Offset:  884 Size:     4
//   float ShadowCSMLastSliceIndex;     // Offset:  888 Size:     4 [unused]
//   float UseNormalization;            // Offset:  892 Size:     4
//   float FogUndergroundColorScale;    // Offset:  896 Size:     4
//
// }
//
// cbuffer CGlobalShaderParameterProvider
// {
//
//   float4 BurnColor;                  // Offset:    0 Size:    16 [unused]
//   float4 BurnParams;                 // Offset:   16 Size:    16 [unused]
//   float4 BurnParams2;                // Offset:   32 Size:    16 [unused]
//   float4 BurnParams3;                // Offset:   48 Size:    16 [unused]
//   float4 CascadedShadowScaleOffsetTile0;// Offset:   64 Size:    16 [unused]
//   float4 CascadedShadowScaleOffsetTile1;// Offset:   80 Size:    16 [unused]
//   float4 WindSimParamsX;             // Offset:   96 Size:    16 [unused]
//   float4 WindSimParamsY;             // Offset:  112 Size:    16 [unused]
//   float VistaNoiseIntensity;         // Offset:  128 Size:     4 [unused]
//   float Time;                        // Offset:  132 Size:     4 [unused]
//   float WindFactor;                  // Offset:  136 Size:     4 [unused]
//   float FireGlowEV;                  // Offset:  140 Size:     4
//   float BurnSpeedScale;              // Offset:  144 Size:     4 [unused]
//   float BurnlineMaskScale;           // Offset:  148 Size:     4 [unused]
//   float BurnlineMaskInfluence;       // Offset:  152 Size:     4 [unused]
//   float WorldSpaceProgressionMaskScale;// Offset:  156 Size:     4 [unused]
//   float WorldSpaceProgressionMaskInfluence;// Offset:  160 Size:     4 [unused]
//   float MaskTransitionSpeedModifier; // Offset:  164 Size:     4 [unused]
//   float GlowMaskScale;               // Offset:  168 Size:     4 [unused]
//   float FireGlowMaskInfluence;       // Offset:  172 Size:     4 [unused]
//   float CenterBurnlineWidth;         // Offset:  176 Size:     4 [unused]
//   float TransitionToBurnlineWidth;   // Offset:  180 Size:     4 [unused]
//   float DissolveCutoffPoint;         // Offset:  184 Size:     4 [unused]
//   float DissolveBlendDistance;       // Offset:  188 Size:     4 [unused]
//   float EyeGlossinessScale;          // Offset:  192 Size:     4 [unused]
//   float EyeSpecIntensityScale;       // Offset:  196 Size:     4 [unused]
//   float EyeIrisGlossinessScale;      // Offset:  200 Size:     4 [unused]
//   float EyeIrisSpecIntensityScale;   // Offset:  204 Size:     4 [unused]
//   float EyeReflectionBoostScale;     // Offset:  208 Size:     4 [unused]
//   bool EyeReflectionMaskEnable;      // Offset:  212 Size:     4 [unused]
//   float4 BurnParams4;                // Offset:  224 Size:    16 [unused]
//   float4 BurnParams5;                // Offset:  240 Size:    16 [unused]
//
// }
//
// cbuffer CTileLightCullingParameterProvider
// {
//
//   float4x4 InvViewProjection;        // Offset:    0 Size:    64
//   float4 DepthValueScale;            // Offset:   64 Size:    16 [unused]
//   float4 OutputTextureSize;          // Offset:   80 Size:    16
//   int4 NumTiles;                     // Offset:   96 Size:    16 [unused]
//   int LightCount;                    // Offset:  112 Size:     4 [unused]
//
// }
//
// cbuffer CTileLightingParameterProvider
// {
//
//   float4 DistanceBoostParameters;    // Offset:    0 Size:    16
//   float4 ForceAlbedoOnlyDisableShadows;// Offset:   16 Size:    16
//   float4 LightingOutputTextureSize;  // Offset:   32 Size:    16 [unused]
//   float4 SunColor;                   // Offset:   48 Size:    16
//   float4 SunDirection;               // Offset:   64 Size:    16
//   float DirectLightOcclusion;        // Offset:   80 Size:     4
//   float LightingDebugLineToUse;      // Offset:   84 Size:     4 [unused]
//   bool ExposureLocalLights;          // Offset:   88 Size:     4
//   float SunExposureFactor;           // Offset:   92 Size:     4
//
// }
//
// cbuffer CSceneTerrainSkyOcclusionAtlasPrivateData
// {
//
//   float4 SectorOcclusion_OffsetScale;// Offset:    0 Size:    16
//   float3 SectorOcclusion_DistanceFade;// Offset:   16 Size:    12
//   float2 SectorOcclusion_HeightOffsetScale;// Offset:   32 Size:     8
//
// }
//
// cbuffer CAmbientProvider
// {
//
//   float4 CascadeDistanceScales[5];   // Offset:    0 Size:    80 [unused]
//   float4 CascadeNearFarSnappedOffsetCamera[5];// Offset:   80 Size:    80 [unused]
//   float4 CascadeNearFarRcpUVSize[5]; // Offset:  160 Size:    80 [unused]
//   float4 UndergroundSHR;             // Offset:  240 Size:    16
//   float4 UndergroundSHG;             // Offset:  256 Size:    16
//   float4 UndergroundSHB;             // Offset:  272 Size:    16
//   float InvUndergroundBlendEndHeight;// Offset:  288 Size:     4
//   float IndirectLightingScale;       // Offset:  292 Size:     4 [unused]
//
// }
//
// Resource bind info for ExposureBuffer
// {
//
//   float4 $Element;                   // Offset:    0 Size:    16
//
// }
//
// Resource bind info for SkyParamBuffer
// {
//
//   struct ComputedSkyParameters
//   {
//       
//       float r[9];                    // Offset:    0
//       float g[9];                    // Offset:   36
//       float b[9];                    // Offset:   72
//       float3 sunColor;               // Offset:  108
//       float3 moonColor;              // Offset:  120
//
//   } $Element;                        // Offset:    0 Size:   132
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// EnvironmentMapTexture__SampObj__    sampler      NA          NA    0        1
// EnvironmentMapBRDFTexture__SampObj__    sampler      NA          NA    1        1
// SectorHemiMapSamplerStateLinear    sampler      NA          NA    2        1
// SkinDiffusePreIntegrated__SampObj__    sampler      NA          NA    3        1
// EnvironmentMapTexture__TexObj__    texture  float4        cube    0        1
// EnvironmentMapBRDFTexture__TexObj__    texture  float4          2d    1        1
// ExposureBuffer                    texture  struct         r/o    2        1
// SkyParamBuffer                    texture  struct         r/o    3        1
// DeferredLighting_DeferredShadowTexture    texture  float4          2d    4        1
// SectorOcclusion_HeightTexture__TexObj__    texture  float4          2d    5        1
// GBufferT0                         texture  float4          2d    6        1
// GBufferT1                         texture  float4          2d    7        1
// GBufferT2                         texture  float4          2d    8        1
// GBufferT3                         texture  float4          2d    9        1
// Depth                             texture   float          2d   10        1
// SkinDiffusePreIntegrated__TexObj__    texture  float4          2d   11        1
// DeferredAmbientTexture__TexObj__    texture  float4          2d   12        1
// OutputTexture                         UAV  float4          2d    0        1
// CViewportShaderParameterProvider    cbuffer      NA          NA    0        1
// CGlobalShaderParameterProvider    cbuffer      NA          NA    1        1
// CTileLightCullingParameterProvider    cbuffer      NA          NA    2        1
// CTileLightingParameterProvider    cbuffer      NA          NA    3        1
// CSceneTerrainSkyOcclusionAtlasPrivateData    cbuffer      NA          NA    4        1
// CAmbientProvider                  cbuffer      NA          NA    5        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// no Input
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// no Output
cs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[57], immediateIndexed
dcl_constantbuffer cb1[9], immediateIndexed
dcl_constantbuffer cb2[6], immediateIndexed
dcl_constantbuffer cb3[6], immediateIndexed
dcl_constantbuffer cb4[3], immediateIndexed
dcl_constantbuffer cb5[19], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_sampler s2, mode_default
dcl_sampler s3, mode_default
dcl_resource_texturecube (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t1
dcl_resource_structured t2, 16 
dcl_resource_structured t3, 132 
dcl_resource_texture2d (float,float,float,float) t4
dcl_resource_texture2d (float,float,float,float) t5
dcl_resource_texture2d (float,float,float,float) t6
dcl_resource_texture2d (float,float,float,float) t7
dcl_resource_texture2d (float,float,float,float) t8
dcl_resource_texture2d (float,float,float,float) t9
dcl_resource_texture2d (float,float,float,float) t10
dcl_resource_texture2d (float,float,float,float) t11
dcl_resource_texture2d (float,float,float,float) t12
dcl_uav_typed_texture2d (float,float,float,float) u0
dcl_input vThreadGroupID.xy
dcl_input vThreadIDInGroup.xy
dcl_temps 25
dcl_thread_group 8, 8, 1

// 3DMigoto StereoParams:
dcl_resource_texture2d (float,float,float,float) t125

ld_indexable(texture2d)(float,float,float,float) r22.xyzw, l(0, 0, 0, 0), t125.xyzw


// Camera Position (environment reflections, etc) adjustment inserted with DarkStarSword's asmtool.py:
// asmtool.py -i --fix-fcprimal-physical-lighting --only-autofixed -f 89d9cb3e7678ac50-cs.txt
mul r23.x, r22.x, r22.y
mul r23.x, r23.x, cb0[0].x
mov r23.yzw, l(0.0)
dp4 r24.x, r23.xyzw, cb0[4].xyzw
dp4 r24.y, r23.xyzw, cb0[5].xyzw
dp4 r24.z, r23.xyzw, cb0[6].xyzw
mov r23.xyzw, cb0[42].xyzw
add r23.xyz, r23.xyz, r24.xyz

imad r0.xy, vThreadGroupID.xyxx, l(8, 8, 0, 0), vThreadIDInGroup.xyxx
ftou r1.xy, cb2[5].xyxx
ult r1.xy, r0.xyxx, r1.xyxx
and r1.x, r1.y, r1.x
if_nz r1.x
  mov r0.zw, l(0,0,0,0)

  ld_indexable(texture2d)(float,float,float,float) r1.z, r0.xyww, t10.yzxw

// Use DepthScale & CameraDistances.z to get world Z:
mad r22.z, r1.z, cb0[33].y, cb0[33].x
div r22.z, l(1.0), r22.z
mul r22.z, r22.z, cb0[31].z

  utof r2.xy, r0.xyxx
  add r2.zw, r2.xxxy, l(0.000000, 0.000000, 0.500000, 0.500000)
  mul r2.zw, r2.zzzw, cb2[5].zzzw
  mad r2.zw, r2.zzzw, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, -1.000000, -1.000000)
  mul r1.xy, r2.zwzz, l(1.000000, -1.000000, 0.000000, 0.000000)
  mov r1.w, l(1.000000)

// Far Cry Primal Physical Lighting Fix inserted with DarkStarSword's asmtool.py:
// asmtool.py -i --fix-fcprimal-physical-lighting --only-autofixed -f 89d9cb3e7678ac50-cs.txt
add r22.w, r22.z, -r22.y
div r22.w, r22.w, r22.z
mad r1.x, r22.w, -r22.x, r1.x

  dp4 r3.x, r1.xyzw, cb2[0].xyzw
  dp4 r3.z, r1.xyzw, cb2[1].xyzw
  dp4 r3.y, r1.xyzw, cb2[2].xyzw
  dp4 r1.x, r1.xyzw, cb2[3].xyzw
  div r1.xyz, r3.xyzx, r1.xxxx
  ld_indexable(texture2d)(float,float,float,float) r3.xyzw, r0.xyww, t6.xyzw
  ld_indexable(texture2d)(float,float,float,float) r4.xyzw, r0.xyww, t7.xyzw
  ld_indexable(texture2d)(float,float,float,float) r5.xyzw, r0.xyww, t8.xyzw
  ld_indexable(texture2d)(float,float,float,float) r6.xyzw, r0.xyww, t9.ywzx
  iadd r2.zw, r0.xxxy, l(0, 0, 1, 1)
  add r7.xy, cb2[5].xyxx, l(-1.000000, -1.000000, 0.000000, 0.000000)
  ftou r7.xy, r7.xyxx
  ult r2.zw, r2.zzzw, r7.xxxy
  if_nz r2.z
    ld_aoffimmi_indexable(1,0,0)(texture2d)(float,float,float,float) r7.xw, r0.xyww, t6.xzwy
    mov r8.w, r7.x
  else 
    mov r8.w, r3.x
    mov r7.w, r3.y
  endif 
  ult r9.xy, l(1, 1, 0, 0), r0.xyxx
  if_nz r9.x
    ld_aoffimmi_indexable(-1,0,0)(texture2d)(float,float,float,float) r7.xz, r0.xyww, t6.xzyw
    mov r8.z, r7.x
  else 
    mov r8.z, r3.x
    mov r7.z, r3.y
  endif 
  if_nz r2.w
    ld_aoffimmi_indexable(0,1,0)(texture2d)(float,float,float,float) r7.xy, r0.xyww, t6.xyzw
    mov r8.y, r7.x
  else 
    mov r8.y, r3.x
    mov r7.y, r3.y
  endif 
  if_nz r9.y
    ld_aoffimmi_indexable(0,-1,0)(texture2d)(float,float,float,float) r2.zw, r0.xyww, t6.zwxy
    mov r8.x, r2.z
    mov r7.x, r2.w
  else 
    mov r8.x, r3.x
    mov r7.x, r3.y
  endif 
  add r8.xyzw, -r3.xxxx, r8.xyzw
  mad r8.xyzw, |r8.xyzw|, l(10.000000, 10.000000, 10.000000, 10.000000), l(0.100000, 0.100000, 0.100000, 0.100000)
  rcp r8.xyzw, r8.xyzw
  dp4 r1.w, r8.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  rcp r1.w, r1.w
  mul r8.xyzw, r1.wwww, r8.xyzw
  dp4 r7.y, r7.xyzw, r8.xyzw
  ftoi r2.xy, r2.xyxx
  and r2.xy, r2.xyxx, l(1, 1, 0, 0)
  ine r1.w, r2.x, r2.y
  mov r7.z, r3.y
  movc r2.yz, r1.wwww, r7.yyzy, r7.zzyz
  mov r2.x, r3.x
  add r2.xyz, r2.xyzx, l(-0.000000, -0.498039216, -0.498039216, 0.000000)
  add r7.yw, r2.zzzy, r2.xxxx
  add r7.x, -r2.z, r7.w
  add r1.w, -r2.y, r2.x
  add r7.z, -r2.z, r1.w
  mov_sat r7.xyz, r7.xyzx
  mul r2.xyz, r7.xyzx, r7.xyzx
  mul r1.w, r3.w, l(255.000000)
  ftou r1.w, r1.w
  ubfe r2.w, l(1), l(3), r1.w
  utof r2.w, r2.w
  and r1.w, r1.w, l(7)
  mul r3.x, r4.w, l(3.000000)
  ftou r3.x, r3.x
  mad r4.xyz, r4.xyzx, l(1.41421354, 1.41421354, 1.41421354, 0.000000), l(-0.707106769, -0.707106769, -0.707106769, 0.000000)
  dp3 r3.y, r4.xyzx, r4.xyzx
  min r3.y, r3.y, l(1.000000)
  add r3.y, -r3.y, l(1.000000)
  sqrt r3.y, r3.y
  swapc r4.x, r8.x, r3.x, r4.x, r3.y
  ieq r3.xw, r3.xxxx, l(1, 0, 0, 2)
  movc r9.xy, r3.xwxx, r3.yyyy, r4.yzyy
  movc r3.x, r3.x, r4.y, r4.x
  movc r9.z, r3.w, r4.z, r3.x
  mul r4.xyzw, r9.xxyy, l(-2.000000, 2.000000, -2.000000, 2.000000)
  mov r9.w, r8.x
  mad r3.xyw, r4.xyxy, r9.xwxz, l(1.000000, 0.000000, 0.000000, 0.000000)
  mad r3.xyw, r4.zzzw, r9.yzyw, r3.xyxw
  mad r8.yzw, r4.wwzw, r9.xxyz, l(0.000000, 0.000000, 1.000000, 0.000000)
  mul r10.xyz, r8.xxxx, l(2.000000, -2.000000, 2.000000, 0.000000)
  mad r8.xyz, r10.yyzy, r9.zwxz, r8.yzwy
  mad r10.xyz, r10.xyzx, r9.ywzy, l(0.000000, 1.000000, 0.000000, 0.000000)
  mad r4.xyz, r4.xxyx, r9.zxyz, r10.xyzx
  mul r9.xy, r5.xyxx, l(255.000000, 255.000000, 0.000000, 0.000000)
  ftou r9.xy, r9.xyxx
  ushr r9.zw, r9.xxxy, l(0, 0, 4, 2)
  and r9.xy, r9.xyxx, l(15, 3, 0, 0)
  utof r9.xyzw, r9.xyzw
  mul r10.xy, r9.zwzz, l(0.0666666701, 0.0158730168, 0.000000, 0.000000)
  mul r9.xy, r9.xyxx, l(0.0666666701, 0.333333343, 0.000000, 0.000000)
  mad r11.xyz, r6.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
  dp3 r4.w, r11.xyzx, r11.xyzx
  rsq r4.w, r4.w
  mul r11.xyz, r4.wwww, r11.xyzx
  ieq r12.xyzw, r1.wwww, l(1, 3, 4, 5)
  mov r6.z, r5.w
  mov r6.xy, l(1.000000,0,0,0)
  movc r13.xw, r12.wwww, r6.xxxz, r6.zzzy
  mov r13.yz, l(0,0,0,0)
  movc r13.xyzw, r12.zzzz, r6.zywy, r13.xyzw
  or r4.w, r12.y, r12.z
  movc r11.xyz, r4.wwww, r11.xyzx, r4.xyzx
  movc r14.yzw, r12.yyyy, l(0,0,0,0), r13.yyzw
  mov r13.yw, l(0,0,0,1.000000)
  movc r13.xz, r12.yyyy, r6.zzwz, r13.xxyx
  movc r11.xyz, r12.xxxx, r4.xyzx, r11.xyzx
  mov r6.xy, l(0,0.150000,0,0)
  mov r13.y, r9.x
  movc r6.xyz, r12.xxxx, r6.xyzx, r13.xywx
  mov r10.z, r9.y
  mov r10.w, l(0)
  mov r13.xy, r5.yxyy
  movc r9.xyz, r12.xxxx, r10.yzwy, r13.xxzx
  mov r13.xzw, l(0,0,0,0)
  mov r14.x, r10.x
  movc r10.xyzw, r12.xxxx, r13.xyzw, r14.xyzw
  add r1.xyz, -r1.xyzx, r23.xzyx
  dp3 r4.w, r1.xyzx, r1.xyzx
  sqrt r4.w, r4.w
  div r1.xyz, r1.xyzx, r4.wwww
  dp3 r5.x, r4.xyzx, r1.xyzx
  mad r5.yw, -r3.zzzz, l(0.000000, 0.990000, 0.000000, 6.000000), l(0.000000, 1.000000, 0.000000, 6.000000)
  mul r6.w, r6.z, l(255.000000)
  mad r7.w, -r6.x, l(0.990000), l(1.000000)
  sqrt r7.w, r7.w
  mul r5.y, r5.y, r5.y
  div r8.w, r5.y, r7.w
  max r8.w, r8.w, l(0.001000)
  mul r7.w, r7.w, r5.y
  max r7.w, r7.w, l(0.001000)
  add r9.w, r10.w, r10.w
  dp3 r13.x, r3.xwyx, r1.xyzx
  dp3 r13.y, r8.zxyz, r1.xyzx
  mov_sat r10.w, r5.x
  movc r11.w, r12.w, |r5.x|, r10.w
  mul r13.xy, r13.xyxx, r13.xyxx
  mul r12.y, r8.w, r8.w
  mul r13.z, r7.w, r7.w
  mul r13.y, r13.y, r13.z
  mad r13.x, r12.y, r13.x, r13.y
  mad r11.w, r11.w, r11.w, r13.x
  sqrt r11.w, r11.w
  mad r6.y, r6.y, l(0.082000), l(0.018000)
  mad r7.xyz, r7.xyzx, r7.xyzx, -r6.yyyy
  mad r7.xyz, r10.xxxx, r7.xyzx, r6.yyyy
  add r10.x, -r10.x, l(1.000000)
  mul r13.xyw, r2.xyxz, r10.xxxx
  ieq r14.xy, r1.wwww, l(2, 6, 0, 0)
  if_nz r14.x
    ld_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r1.w, r0.xyww, t4.yzwx
    max r1.w, r1.w, cb3[1].y
    dp3_sat r10.x, -r4.xzyx, cb3[4].xyzx
    add r14.x, r10.w, r10.x
    mad r14.x, -r10.x, r10.w, r14.x
    max r14.x, r14.x, l(0.010000)
    div r14.x, l(1.000000, 1.000000, 1.000000, 1.000000), r14.x
    add r15.xyz, r1.xzyx, -cb3[4].xyzx
    dp3 r14.z, r15.xyzx, r15.xyzx
    rsq r14.z, r14.z
    mul r15.xyz, r14.zzzz, r15.xyzx
    dp3 r14.z, r15.xzyx, r1.xyzx
    add r14.z, -r14.z, l(1.000000)
    mul r14.w, r14.z, r14.z
    mul r14.w, r14.w, r14.w
    mul r14.z, r14.z, r14.w
    add r16.xyz, -r7.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
    mad r16.xyz, r16.xyzx, r14.zzzz, r7.xyzx
    dp3_sat r14.z, r4.xzyx, -cb3[4].xyzx
    mul r17.xyz, r14.zzzz, cb3[3].xyzx
    mul r17.xyz, r1.wwww, r17.xyzx
    mul r16.xyz, r1.wwww, r16.xyzx
    mul r16.xyz, r10.xxxx, r16.xyzx
    mul r14.xzw, r14.xxxx, r16.xxyz
    dp3_sat r1.w, r15.xzyx, r4.xyzx
    mul r1.w, r1.w, r1.w
    min r1.w, r1.w, l(0.999999)
    add r10.x, -r1.w, l(1.000000)
    div r1.w, r1.w, r10.x
    mul r10.x, r10.x, r10.x
    mul r15.x, r5.y, r5.y
    mad r15.x, r15.x, l(4.000000), l(1.000000)
    div r15.x, l(1.000000, 1.000000, 1.000000, 1.000000), r15.x
    mad r15.y, r5.y, r5.y, l(0.000001)
    div r1.w, -r1.w, r15.y
    mul r1.w, r1.w, l(1.442695)
    exp r1.w, r1.w
    mul r1.w, r1.w, l(4.000000)
    div r1.w, r1.w, r10.x
    add r1.w, r1.w, l(1.000000)
    mul r1.w, r1.w, r15.x
    mul r15.xyz, r1.wwww, cb3[3].xyzx
    mul r14.xzw, r14.xxzw, r15.xxyz
    mul r15.xyz, r17.xyzx, cb3[5].wwww
    mov r16.xyz, l(0,0,0,0)
  else 
    if_nz r12.z
      ld_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r1.w, r0.xyww, t4.yzwx
      max r1.w, r1.w, cb3[1].y
      dp3_sat r10.x, r11.xzyx, -cb3[4].xyzx
      add r18.xyz, -r4.xzyx, r11.xzyx
      mad r19.xyz, r18.xyzx, l(0.100000, 0.100000, 0.100000, 0.000000), r4.xzyx
      dp3 r15.w, r19.xyzx, r19.xyzx
      rsq r15.w, r15.w
      mul r19.xyz, r15.wwww, r19.xyzx
      mad r18.xyz, r18.xyzx, l(0.300000, 0.300000, 0.300000, 0.000000), r4.xzyx
      dp3 r15.w, r18.xyzx, r18.xyzx
      rsq r15.w, r15.w
      mul r18.xyz, r15.wwww, r18.xyzx
      dp3 r15.w, r4.xzyx, -cb3[4].xyzx
      dp3 r16.w, r19.xyzx, -cb3[4].xyzx
      dp3 r17.w, r18.xyzx, -cb3[4].xyzx
      mad r18.z, r15.w, l(0.500000), l(0.500000)
      mov r18.w, r10.z
      mad r19.xy, r18.zwzz, l(0.984375, 0.984375, 0.000000, 0.000000), l(0.00781250000, 0.00781250000, 0.000000, 0.000000)
      sample_l_indexable(texture2d)(float,float,float,float) r19.x, r19.xyxx, t11.xyzw, s3, l(0.000000)
      mad r18.y, r16.w, l(0.500000), l(0.500000)
      mad r18.yz, r18.yywy, l(0.000000, 0.984375, 0.984375, 0.000000), l(0.000000, 0.00781250000, 0.00781250000, 0.000000)
      sample_l_indexable(texture2d)(float,float,float,float) r19.y, r18.yzyy, t11.xyzw, s3, l(0.000000)
      mad r18.x, r17.w, l(0.500000), l(0.500000)
      mad r18.xy, r18.xwxx, l(0.984375, 0.984375, 0.000000, 0.000000), l(0.00781250000, 0.00781250000, 0.000000, 0.000000)
      sample_l_indexable(texture2d)(float,float,float,float) r19.z, r18.xyxx, t11.xyzw, s3, l(0.000000)
      add r18.xyz, r1.xzyx, -cb3[4].xyzx
      dp3 r10.z, r18.xyzx, r18.xyzx
      rsq r10.z, r10.z
      mul r18.xyz, r10.zzzz, r18.xyzx
      dp3 r10.z, r18.xzyx, r1.xyzx
      add r10.z, -r10.z, l(1.000000)
      mul r15.w, r10.z, r10.z
      mul r15.w, r15.w, r15.w
      mul r10.z, r10.z, r15.w
      add r20.xyz, -r7.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
      mad r20.xyz, r20.xyzx, r10.zzzz, r7.xyzx
      mul r10.z, r10.x, r10.x
      mul r15.w, r5.y, r5.y
      mad r16.w, -r5.y, r5.y, l(1.000000)
      mad r10.z, r10.z, r16.w, r15.w
      sqrt r10.z, r10.z
      mul r10.z, r10.z, r10.w
      mad r10.z, r10.x, r11.w, r10.z
      add r10.z, r10.z, r10.z
      max r10.z, r10.z, l(0.000100)
      div r10.z, l(1.000000, 1.000000, 1.000000, 1.000000), r10.z
      mul r21.xyz, r1.wwww, cb3[3].xyzx
      mul r17.xyz, r19.xyzx, r21.xyzx
      mul r19.xyz, r1.wwww, r20.xyzx
      mul r19.xyz, r10.xxxx, r19.xyzx
      mul r19.xyz, r10.zzzz, r19.xyzx
      dp3_sat r1.w, r18.xzyx, r11.xyzx
      mad r10.x, r5.y, r5.y, l(-1.000000)
      mul r1.w, r1.w, r1.w
      mad r1.w, r1.w, r10.x, l(1.000000)
      div r1.w, r5.y, r1.w
      mul r1.w, r1.w, r1.w
      mul r18.xyz, r1.wwww, cb3[3].xyzx
      mul r14.xzw, r18.xxyz, r19.xxyz
      mul r15.xyz, r17.xyzx, cb3[5].wwww
      mov r16.xyz, l(0,0,0,0)
    else 
      if_nz r12.w
        ld_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r1.w, r0.xyww, t4.yzwx
        max r1.w, r1.w, cb3[1].y
        dp3_sat r5.y, r11.xzyx, -cb3[4].xyzx
        mul r18.xyz, r5.yyyy, cb3[3].xyzx
        mul r17.xyz, r1.wwww, r18.xyzx
        dp3 r5.y, r4.xzyx, -cb3[4].xyzx
        add r18.xyz, r1.xzyx, -cb3[4].xyzx
        dp3 r10.x, r18.xyzx, r18.xyzx
        rsq r10.x, r10.x
        mul r18.xyz, r10.xxxx, r18.xyzx
        dp3 r10.x, r18.xzyx, r1.xyzx
        add r10.x, -r10.x, l(1.000000)
        mul r10.z, r10.x, r10.x
        mul r10.z, r10.z, r10.z
        mul r10.x, r10.x, r10.z
        add r19.xyz, -r7.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
        mad r19.xyz, r19.xyzx, r10.xxxx, r7.xyzx
        dp3 r20.x, r3.xywx, -cb3[4].xyzx
        dp3 r20.y, r8.zyxz, -cb3[4].xyzx
        mov r10.x, |r5.y|
        mul r20.xy, r20.xyxx, r20.xyxx
        mul r10.z, r13.z, r20.y
        mad r10.z, r12.y, r20.x, r10.z
        mad r10.z, r10.x, r10.x, r10.z
        sqrt r10.z, r10.z
        mul r10.z, |r5.x|, r10.z
        mad r10.x, r10.x, r11.w, r10.z
        add r10.x, r10.x, r10.x
        max r10.x, r10.x, l(0.000100)
        div r10.x, l(1.000000, 1.000000, 1.000000, 1.000000), r10.x
        mul r19.xyz, r1.wwww, r19.xyzx
        mov_sat r5.y, r5.y
        mul r19.xyz, r5.yyyy, r19.xyzx
        mul r19.xyz, r10.xxxx, r19.xyzx
        dp3 r20.x, r18.xyzx, r3.xywx
        dp3 r20.y, r18.zyxz, r8.xyzx
        dp3 r10.z, r18.xzyx, r4.xyzx
        mul r18.xy, r20.xyxx, r20.xyxx
        div r12.w, r18.x, r12.y
        mad r10.z, r10.z, r10.z, r12.w
        div r12.w, r18.y, r13.z
        add r10.z, r10.z, r12.w
        mul r12.w, r7.w, r8.w
        mul r10.z, r10.z, r10.z
        mul r10.z, r12.w, r10.z
        div r10.z, l(1.000000, 1.000000, 1.000000, 1.000000), r10.z
        mul r18.xyz, r10.zzzz, cb3[3].xyzx
        mul r18.xyz, r18.xyzx, r19.xyzx
        mul r19.xyz, r8.zyxz, r9.wwww
        mad r19.xyz, r19.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), -cb3[4].xyzx
        dp3 r9.w, r19.xyzx, r19.xyzx
        rsq r9.w, r9.w
        mad r19.xyz, r19.xyzx, r9.wwww, r1.xzyx
        dp3 r9.w, r19.xyzx, r19.xyzx
        rsq r9.w, r9.w
        mul r19.xyz, r9.wwww, r19.xyzx
        mul r20.xyz, r2.xyzx, r6.yyyy
        dp3 r9.w, r19.xzyx, r1.xyzx
        add r9.w, -r9.w, l(1.000000)
        mul r10.z, r9.w, r9.w
        mul r10.z, r10.z, r10.z
        mul r9.w, r9.w, r10.z
        mad r2.xyz, -r6.yyyy, r2.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
        mad r2.xyz, r2.xyzx, r9.wwww, r20.xyzx
        add r20.xyz, -r2.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
        mul r2.xyz, r1.wwww, r2.xyzx
        mul r2.xyz, r5.yyyy, r2.xyzx
        mul r2.xyz, r10.xxxx, r2.xyzx
        add r1.w, r8.w, r8.w
        add r5.y, r7.w, r7.w
        dp3 r21.x, r19.xyzx, r3.xywx
        dp3 r21.y, r19.zyxz, r8.xyzx
        dp3 r9.w, r19.xzyx, r4.xyzx
        mul r10.xz, r21.xxyx, r21.xxyx
        mul r12.w, r1.w, r1.w
        div r10.x, r10.x, r12.w
        mad r9.w, r9.w, r9.w, r10.x
        mul r10.x, r5.y, r5.y
        div r10.x, r10.z, r10.x
        add r9.w, r9.w, r10.x
        mul r1.w, r1.w, r5.y
        mul r5.y, r9.w, r9.w
        mul r1.w, r1.w, r5.y
        div r1.w, l(1.000000, 1.000000, 1.000000, 1.000000), r1.w
        mul r19.xyz, r1.wwww, cb3[3].xyzx
        mul r2.xyz, r2.xyzx, r19.xyzx
        mad r14.xzw, r18.xxyz, r20.xxyz, r2.xxyz
        mul r15.xyz, r17.xyzx, cb3[5].wwww
        mov r16.xyz, l(0,0,0,0)
      else 
        ld_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r1.w, r0.xyww, t4.yzwx
        max r1.w, r1.w, cb3[1].y
        dp3 r2.z, r4.xzyx, cb3[4].xyzx
        mov_sat r2.z, -r2.z
        add r18.xyz, r1.xzyx, -cb3[4].xyzx
        dp3 r2.x, r18.xyzx, r18.xyzx
        rsq r2.x, r2.x
        mul r18.xyz, r2.xxxx, r18.xyzx
        dp3 r2.x, r18.xzyx, r1.xyzx
        add r2.x, -r2.x, l(1.000000)
        mul r2.y, r2.x, r2.x
        mul r2.y, r2.y, r2.y
        mul r2.x, r2.x, r2.y
        add r19.xyz, -r7.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
        mad r19.xyz, r19.xyzx, r2.xxxx, r7.xyzx
        dp3 r2.x, r3.xywx, -cb3[4].xyzx
        dp3 r2.y, r8.zyxz, -cb3[4].xyzx
        mul r2.xy, r2.xyxx, r2.xyxx
        mul r2.y, r2.y, r13.z
        mad r2.x, r12.y, r2.x, r2.y
        mad r2.x, r2.z, r2.z, r2.x
        sqrt r2.x, r2.x
        mul r2.x, r2.x, r10.w
        mad r2.x, r2.z, r11.w, r2.x
        add r2.x, r2.x, r2.x
        max r2.x, r2.x, l(0.000100)
        div r2.x, l(1.000000, 1.000000, 1.000000, 1.000000), r2.x
        mul r10.xzw, r1.wwww, r19.xxyz
        mul r10.xzw, r2.zzzz, r10.xxzw
        mul r2.xyz, r2.xxxx, r10.xzwx
        dp3 r3.x, r18.xyzx, r3.xywx
        dp3 r3.y, r18.zyxz, r8.xyzx
        dp3 r3.w, r18.xzyx, r4.xyzx
        mul r3.xy, r3.xyxx, r3.xyxx
        div r3.x, r3.x, r12.y
        mad r3.x, r3.w, r3.w, r3.x
        div r3.y, r3.y, r13.z
        add r3.x, r3.y, r3.x
        mul r3.y, r7.w, r8.w
        mul r3.x, r3.x, r3.x
        mul r3.x, r3.y, r3.x
        div r3.x, l(1.000000, 1.000000, 1.000000, 1.000000), r3.x
        mul r3.xyw, r3.xxxx, cb3[3].xyxz
        mul r14.xzw, r2.xxyz, r3.xxyw
        dp3 r2.x, r11.xzyx, -cb3[4].xyzx
        mul r3.xyw, r1.wwww, cb3[3].xyxz
        mov_sat r1.w, r2.x
        mul r17.xyz, r1.wwww, r3.xywx
        mov_sat r2.x, -r2.x
        mul r2.xyz, r2.xxxx, r3.xywx
        and r16.xyz, r2.xyzx, r12.xxxx
        mul r15.xyz, r17.xyzx, cb3[5].wwww
      endif 
    endif 
  endif 
  ld_indexable(texture2d)(float,float,float,float) r18.xyzw, r0.xyzw, t12.xyzw
  ld_structured_indexable(structured_buffer, stride=16)(mixed,mixed,mixed,mixed) r0.z, l(0), l(12), t2.xxxx
  mul r2.xyz, r0.zzzz, r18.xyzx
  mad_sat r0.z, r4.w, cb3[0].x, cb3[0].y
  mul r0.z, r0.z, cb3[0].z
  mul r0.z, r2.w, r0.z
  mad r2.xyz, r2.yyyy, r0.zzzz, r2.xyzx
  and r0.z, r12.x, l(0x3e800000)
  mov r19.yzw, -r1.zzyx
  mul r3.xyw, r4.wwww, r19.wywz
  mad r10.xzw, r19.wwyz, r4.wwww, r23.xxyz
  mov r19.x, l(1.000000)
  dp4 r18.x, cb0[38].xyzw, r19.xyzw
  dp4 r18.y, cb0[37].xyzw, r19.xyzw
  dp4 r18.z, cb0[36].xyzw, r19.xyzw
  max r18.xyz, r18.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
  mad r10.xz, r10.zzxz, cb4[0].yyxy, cb4[0].wwzw
  sample_l_indexable(texture2d)(float,float,float,float) r0.w, r10.xzxx, t5.xzwy, s2, l(0.000000)
  mad r0.w, r0.w, cb4[2].x, cb4[2].y
  add r0.w, -r0.w, r10.w
  mul_sat r0.w, -r0.w, cb5[18].x
  sqrt r0.w, r0.w
  dp2 r1.w, r3.xyxx, r3.xyxx
  mad r1.w, cb4[1].x, r1.w, cb4[1].y
  mul_sat r1.w, r1.w, l(3.000000)
  mul r0.w, r0.w, r1.w
  dp4 r20.x, cb5[15].xyzw, r19.xyzw
  dp4 r20.y, cb5[16].xyzw, r19.xyzw
  dp4 r20.z, cb5[17].xyzw, r19.xyzw
  max r10.xzw, r20.xxyz, l(0.000000, 0.000000, 0.000000, 0.000000)
  mad r10.xzw, r10.xxzw, cb0[56].xxxx, -r18.xxyz
  mad r10.xzw, r0.wwww, r10.xxzw, r18.xxyz
  mad_sat r0.w, r4.w, cb0[35].y, cb0[35].x
  mul r1.w, r3.w, cb0[39].y
  max r1.w, r1.w, l(-125.000000)
  lt r2.w, l(0.000001), |r1.w|
  exp r3.x, -r1.w
  add r3.x, -r3.x, l(1.000000)
  div r1.w, r3.x, r1.w
  movc r1.w, r2.w, r1.w, l(1.000000)
  mad r1.w, r1.w, cb0[39].x, cb0[35].w
  mul r0.w, r0.w, r1.w
  mul r0.w, r0.w, -cb0[35].z
  exp r0.w, r0.w
  mad r3.xyw, -r10.xzxw, r0.wwww, r10.xzxw
  movc r4.xyz, r12.zzzz, r11.xyzx, r4.xyzx
  mul r10.xzw, r8.xxyz, r1.xxyz
  mad r10.xzw, r1.yyzx, r8.zzxy, -r10.xxzw
  mul r11.xyz, r8.xyzx, r10.xzwx
  mad r8.xyz, r8.yzxy, r10.wxzw, -r11.xyzx
  add r8.xyz, -r4.xyzx, r8.xyzx
  mad r4.xyz, r6.xxxx, r8.xyzx, r4.xyzx
  dp3 r1.w, r4.xyzx, r4.xyzx
  rsq r1.w, r1.w
  mul r4.xyz, r1.wwww, r4.xyzx
  dp3 r1.w, r4.xyzx, r1.xyzx
  add r1.w, r1.w, r1.w
  mad r1.xyz, -r1.wwww, r4.xyzx, r1.xyzx
  mov r1.xyz, -r1.xyzx
  sample_l_indexable(texturecube)(float,float,float,float) r1.xyz, r1.xyzx, t0.xyzw, s0, r5.w
  ld_structured_indexable(structured_buffer, stride=132)(mixed,mixed,mixed,mixed) r4.xyzw, l(0), l(108), t3.xywz
  dp3 r1.w, r4.xywx, l(0.212600, 0.715200, 0.072200, 0.000000)
  ld_structured_indexable(structured_buffer, stride=132)(mixed,mixed,mixed,mixed) r4.xy, l(0), l(124), t3.xyxx
  dp3 r2.w, r4.zxyz, l(0.212600, 0.715200, 0.072200, 0.000000)
  max r1.w, r1.w, r2.w
  ld_structured_indexable(structured_buffer, stride=132)(mixed,mixed,mixed,mixed) r2.w, l(0), l(0), t3.xxxx
  ld_structured_indexable(structured_buffer, stride=132)(mixed,mixed,mixed,mixed) r4.x, l(0), l(36), t3.xxxx
  ld_structured_indexable(structured_buffer, stride=132)(mixed,mixed,mixed,mixed) r4.y, l(0), l(72), t3.xxxx
  max r4.x, r4.y, r4.x
  max r2.w, r2.w, r4.x
  add r1.w, r1.w, r2.w
  add r1.w, r1.w, l(-1.000000)
  mad r1.w, cb0[55].w, r1.w, l(1.000000)
  mul r1.xyz, r1.wwww, r1.xyzx
  mad r1.xyz, r1.xyzx, cb0[50].xyzx, cb0[49].xyzx
  mad r4.x, |r5.x|, l(0.968750), l(0.015625)
  mad r4.y, r3.z, l(0.968750), l(0.015625)
  sample_l_indexable(texture2d)(float,float,float,float) r4.xy, r4.xyxx, t1.xyzw, s1, l(0.000000)
  mad_sat r4.xyz, r7.xyzx, r4.yyyy, r4.xxxx
  mul r1.xyz, r1.xyzx, r4.xyzx
  movc r1.w, r12.x, l(0.750000), l(1.000000)
  mad_sat r0.z, r18.w, r1.w, r0.z
  mul r1.w, r0.z, r5.z
  movc r2.w, r14.y, l(1.200000), cb3[5].x
  add r3.z, r0.z, l(-1.000000)
  mad_sat r2.w, r2.w, r3.z, l(1.000000)
  mad r4.xyz, r17.xyzx, r2.wwww, r16.xyzx
  mul r5.xyz, r1.wwww, r2.xyzx
  mad r4.xyz, r2.xyzx, r1.wwww, r4.xyzx
  mad r7.xyz, r15.xyzx, r2.wwww, r5.xyzx
  dp3 r1.w, r7.xyzx, l(0.212600, 0.715200, 0.072200, 0.000000)
  mul r7.xyz, r9.xxxx, r14.xzwx
  dp3 r2.x, r2.xyzx, l(0.212600, 0.715200, 0.072200, 0.000000)
  mul r1.xyz, r1.xyzx, r2.xxxx
  mul r1.xyz, r9.yyyy, r1.xyzx
  mul r1.xyz, r0.zzzz, r1.xyzx
  mad r0.z, r9.z, l(256.000000), l(1.000000)
  mul r1.xyz, r0.zzzz, r1.xyzx
  add r0.z, -r6.y, l(1.000000)
  add r2.x, -r6.z, l(1.000000)
  ftou r2.y, r6.w
  and r2.y, r2.y, l(1)
  utof r2.y, r2.y
  mad r6.xyz, r2.yyyy, l(-0.500000, -0.300000, -0.800000, 0.000000), l(1.000000, 1.000000, 1.000000, 0.000000)
  mul r2.xyz, r2.xxxx, r6.xyzx
  mul r2.xyz, r2.xyzx, r13.xywx
  mad r5.xyz, r17.xyzx, r2.wwww, r5.xyzx
  mul r5.xyz, r5.xyzx, r13.xywx
  mul r2.xyz, r16.xyzx, r2.xyzx
  mul r2.xyz, r0.zzzz, r2.xyzx
  mad r2.xyz, r5.xyzx, r0.zzzz, r2.xyzx
  mad r1.xyz, r7.xyzx, r2.wwww, r1.xyzx
  mad r0.z, cb1[8].w, r10.y, cb0[55].y
  exp r0.z, r0.z
  mul r0.z, r0.z, l(0.000183015567)
  mad r2.xyz, r13.xywx, r0.zzzz, r2.xyzx
  add r1.xyz, r1.xyzx, r2.xyzx
  mad r1.xyz, r1.xyzx, r0.wwww, r3.xywx
  ld_structured_indexable(structured_buffer, stride=16)(mixed,mixed,mixed,mixed) r0.z, l(0), l(0), t2.xxxx
  mul r1.xyz, r0.zzzz, r1.xyzx
  max r1.xyz, r1.xyzx, l(0.0000610351999, 0.0000610351999, 0.0000610351999, 0.000000)
  min r1.xyz, r1.xyzx, l(8192.000000, 8192.000000, 8192.000000, 0.000000)
  lt r0.w, l(0.500000), cb3[1].x
  movc r2.xyz, r0.wwww, r13.xywx, r1.xyzx
  dp3 r0.w, r4.xyzx, l(0.212600, 0.715200, 0.072200, 0.000000)
  movc r0.w, cb3[5].z, r0.w, r1.w
  mul r0.z, r0.z, r0.w
  max r0.z, r0.z, l(0.0000610351999)
  min r2.w, r0.z, l(8192.000000)
  store_uav_typed u0.xyzw, r0.xyyy, r2.xyzw
endif 
ret 
// Approximately 555 instruction slots used