// asmtool.py -i --fix-fcprimal-physical-lighting --only-autofixed -f 8f2978698fce1acd-cs.txt
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
//   using 3Dmigoto v1.2.31 on Wed Mar 02 08:07:01 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
//   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 [unused]
//   float4 SunDirection;               // Offset:   64 Size:    16 [unused]
//   float DirectLightOcclusion;        // Offset:   80 Size:     4
//   float LightingDebugLineToUse;      // Offset:   84 Size:     4
//   bool ExposureLocalLights;          // Offset:   88 Size:     4
//   float SunExposureFactor;           // Offset:   92 Size:     4 [unused]
//
// }
//
// 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 bind info for LightsLightingData
// {
//
//   struct LightingData
//   {
//       
//       float4 pos;                    // Offset:    0
//       float4 color;                  // Offset:   16
//       float4 direction;              // Offset:   32
//       float attenuation;             // Offset:   48
//       float2 spotFactors;            // Offset:   52
//       uint flags;                    // Offset:   60
//       float4 clippingInfo;           // Offset:   64
//       float4 clipPlanes[3];          // Offset:   80
//
//   } $Element;                        // Offset:    0 Size:   128
//
// }
//
// Resource bind info for ShadowData
// {
//
//   struct ShadowProjTextureData
//   {
//       
//       float4 shadowMapSize;          // Offset:    0
//       float4x4 shadowProjectionMatrix;// Offset:   16
//       float4 spotScaleOffsetUVs;     // Offset:   80
//
//   } $Element;                        // Offset:    0 Size:    96
//
// }
//
// Resource bind info for LightIndicesPerTile
// {
//
//   uint $Element;                     // Offset:    0 Size:     4
//
// }
//
// Resource bind info for LightOutputPerTile
// {
//
//   uint $Element;                     // Offset:    0 Size:     4
//
// }
//
// Resource bind info for LightOutputPerTileForBlended
// {
//
//   uint $Element;                     // Offset:    0 Size:     4
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// EnvironmentMapTexture__SampObj__    sampler      NA          NA    0        1
// EnvironmentMapBRDFTexture__SampObj__    sampler      NA          NA    1        1
// ProjectedTexture0__SampObj__      sampler      NA          NA    2        1
// SectorHemiMapSamplerStateLinear    sampler      NA          NA    3        1
// SpotShadowSampler               sampler_c      NA          NA    4        1
// SkinDiffusePreIntegrated__SampObj__    sampler      NA          NA    5        1
// EnvironmentMapTexture__TexObj__    texture  float4        cube    0        1
// EnvironmentMapBRDFTexture__TexObj__    texture  float4          2d    1        1
// ProjectedTexture0__TexObj__       texture  float4          2d    2        1
// ExposureBuffer                    texture  struct         r/o    3        1
// SkyParamBuffer                    texture  struct         r/o    4        1
// LightingDebugNumLightsTexture     texture  float4          2d    5        1
// SectorOcclusion_HeightTexture__TexObj__    texture  float4          2d    6        1
// GBufferT0                         texture  float4          2d    7        1
// GBufferT1                         texture  float4          2d    8        1
// GBufferT2                         texture  float4          2d    9        1
// GBufferT3                         texture  float4          2d   10        1
// Depth                             texture   float          2d   11        1
// LightsLightingData                texture  struct         r/o   12        1
// ShadowData                        texture  struct         r/o   13        1
// LightIndicesPerTile               texture  struct         r/o   14        1
// LightOutputPerTile                texture  struct         r/o   15        1
// LightOutputPerTileForBlended      texture  struct         r/o   16        1
// SkinDiffusePreIntegrated__TexObj__    texture  float4          2d   17        1
// DeferredAmbientTexture__TexObj__    texture  float4          2d   18        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[7], 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_sampler s4, mode_comparison
dcl_sampler s5, mode_default
dcl_resource_texturecube (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t1
dcl_resource_texture2d (float,float,float,float) t2
dcl_resource_structured t3, 16 
dcl_resource_structured t4, 132 
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_structured t12, 128 
dcl_resource_structured t13, 96 
dcl_resource_structured t14, 4 
dcl_resource_structured t15, 4 
dcl_resource_structured t16, 4 
dcl_resource_texture2d (float,float,float,float) t17
dcl_resource_texture2d (float,float,float,float) t18
dcl_uav_typed_texture2d (float,float,float,float) u0
dcl_input vThreadGroupID.xy
dcl_input vThreadIDInGroup.xy
dcl_temps 47
dcl_thread_group 8, 8, 1

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

ld_indexable(texture2d)(float,float,float,float) r44.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 8f2978698fce1acd-cs.txt
mul r45.x, r44.x, r44.y
mul r45.x, r45.x, cb0[0].x
mov r45.yzw, l(0.0)
dp4 r46.x, r45.xyzw, cb0[4].xyzw
dp4 r46.y, r45.xyzw, cb0[5].xyzw
dp4 r46.z, r45.xyzw, cb0[6].xyzw
mov r45.xyzw, cb0[42].xyzw
add r45.xyz, r45.xyz, r46.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
  imad r1.x, vThreadGroupID.y, cb2[6].x, vThreadGroupID.x
  mov r0.zw, l(0,0,0,0)

  ld_indexable(texture2d)(float,float,float,float) r2.z, r0.xyww, t11.yzxw

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

  utof r1.yz, r0.xxyx
  add r3.xy, r1.yzyy, l(0.500000, 0.500000, 0.000000, 0.000000)
  mul r3.xy, r3.xyxx, cb2[5].zwzz
  mad r3.xy, r3.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
  mul r2.xy, r3.xyxx, l(1.000000, -1.000000, 0.000000, 0.000000)
  mov r2.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 8f2978698fce1acd-cs.txt
add r44.w, r44.z, -r44.y
div r44.w, r44.w, r44.z
mad r2.x, r44.w, -r44.x, r2.x

  dp4 r3.x, r2.xyzw, cb2[0].xyzw
  dp4 r3.y, r2.xyzw, cb2[1].xyzw
  dp4 r3.z, r2.xyzw, cb2[2].xyzw
  dp4 r1.w, r2.xyzw, cb2[3].xyzw
  div r2.xyz, r3.xyzx, r1.wwww
  ld_indexable(texture2d)(float,float,float,float) r3.xyzw, r0.xyww, t7.xyzw
  ld_indexable(texture2d)(float,float,float,float) r4.xyzw, r0.xyww, t8.xyzw
  ld_indexable(texture2d)(float,float,float,float) r5.xyzw, r0.xyww, t9.xyzw
  ld_indexable(texture2d)(float,float,float,float) r6.xyzw, r0.xyww, t10.yzwx
  iadd r7.xy, r0.xyxx, l(1, 1, 0, 0)
  add r7.zw, cb2[5].xxxy, l(0.000000, 0.000000, -1.000000, -1.000000)
  ftou r7.zw, r7.zzzw
  ult r7.xy, r7.xyxx, r7.zwzz
  if_nz r7.x
    ld_aoffimmi_indexable(1,0,0)(texture2d)(float,float,float,float) r8.xw, r0.xyww, t7.xzwy
    mov r9.w, r8.x
  else 
    mov r9.w, r3.x
    mov r8.w, r3.y
  endif 
  ult r7.xz, l(1, 0, 1, 0), r0.xxyx
  if_nz r7.x
    ld_aoffimmi_indexable(-1,0,0)(texture2d)(float,float,float,float) r8.xz, r0.xyww, t7.xzyw
    mov r9.z, r8.x
  else 
    mov r9.z, r3.x
    mov r8.z, r3.y
  endif 
  if_nz r7.y
    ld_aoffimmi_indexable(0,1,0)(texture2d)(float,float,float,float) r8.xy, r0.xyww, t7.xyzw
    mov r9.y, r8.x
  else 
    mov r9.y, r3.x
    mov r8.y, r3.y
  endif 
  if_nz r7.z
    ld_aoffimmi_indexable(0,-1,0)(texture2d)(float,float,float,float) r7.xy, r0.xyww, t7.xyzw
    mov r9.x, r7.x
    mov r8.x, r7.y
  else 
    mov r9.x, r3.x
    mov r8.x, r3.y
  endif 
  add r7.xyzw, -r3.xxxx, r9.xyzw
  mad r7.xyzw, |r7.xyzw|, l(10.000000, 10.000000, 10.000000, 10.000000), l(0.100000, 0.100000, 0.100000, 0.100000)
  rcp r7.xyzw, r7.xyzw
  dp4 r1.w, r7.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
  rcp r1.w, r1.w
  mul r7.xyzw, r1.wwww, r7.xyzw
  dp4 r7.y, r8.xyzw, r7.xyzw
  ftoi r1.yz, r1.yyzy
  and r1.yz, r1.yyzy, l(0, 1, 1, 0)
  ine r1.y, r1.y, r1.z
  mov r7.xz, r3.xxyx
  movc r7.yz, r1.yyyy, r7.yyzy, r7.zzyz
  add r1.yzw, r7.xxyz, l(0.000000, -0.000000, -0.498039216, -0.498039216)
  add r7.yw, r1.wwwz, r1.yyyy
  add r7.x, -r1.w, r7.w
  add r1.y, -r1.z, r1.y
  add r7.z, -r1.w, r1.y
  mov_sat r7.xyz, r7.xyzx
  mul r1.yzw, r7.xxyz, r7.xxyz
  mul r3.x, r3.w, l(255.000000)
  ftou r3.x, r3.x
  ubfe r3.y, l(1), l(3), r3.x
  utof r3.y, r3.y
  and r3.x, r3.x, l(7)
  mul r3.w, r4.w, l(3.000000)
  ftou r3.w, r3.w
  mad r4.xyz, r4.xyzx, l(1.41421354, 1.41421354, 1.41421354, 0.000000), l(-0.707106769, -0.707106769, -0.707106769, 0.000000)
  dp3 r4.w, r4.xyzx, r4.xyzx
  min r4.w, r4.w, l(1.000000)
  add r4.w, -r4.w, l(1.000000)
  sqrt r4.w, r4.w
  swapc r4.x, r8.x, r3.w, r4.x, r4.w
  ieq r8.yz, r3.wwww, l(0, 1, 2, 0)
  movc r9.xy, r8.yzyy, r4.wwww, r4.yzyy
  movc r3.w, r8.y, r4.y, r4.x
  movc r9.z, r8.z, r4.z, r3.w
  mul r4.xyzw, r9.xxyy, l(-2.000000, 2.000000, -2.000000, 2.000000)
  mov r9.w, r8.x
  mad r8.yzw, r4.xxyy, r9.xxwz, l(0.000000, 1.000000, 0.000000, 0.000000)
  mad r8.yzw, r4.zzzw, r9.yyzw, r8.yyzw
  mad r10.xyz, r4.wzww, r9.xyzx, l(0.000000, 1.000000, 0.000000, 0.000000)
  mul r11.xyz, r8.xxxx, l(2.000000, -2.000000, 2.000000, 0.000000)
  mad r10.xyz, r11.yyzy, r9.zwxz, r10.xyzx
  mad r11.xyz, r11.xyzx, r9.ywzy, l(0.000000, 1.000000, 0.000000, 0.000000)
  mad r4.xyz, r4.xxyx, r9.zxyz, r11.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 r11.xy, r9.zwzz, l(0.0666666701, 0.0158730168, 0.000000, 0.000000)
  mul r9.yw, r9.xxxy, l(0.000000, 0.0666666701, 0.000000, 0.333333343)
  mad r12.xyz, r6.xzyx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
  dp3 r3.w, r12.xyzx, r12.xyzx
  rsq r3.w, r3.w
  mul r12.xyz, r3.wwww, r12.xyzx
  ieq r13.xyzw, r3.xxxx, l(1, 3, 4, 5)
  mov r6.y, r5.w
  mov r6.xz, l(1.000000,0,0,0)
  movc r14.xw, r13.wwww, r6.xxxy, r6.yyyz
  mov r14.yz, l(0,0,0,0)
  movc r14.xyzw, r13.zzzz, r6.yzwz, r14.xyzw
  or r3.w, r13.y, r13.z
  movc r12.xyz, r3.wwww, r12.xyzx, r4.xyzx
  movc r15.yzw, r13.yyyy, l(0,0,0,0), r14.yyzw
  mov r14.y, l(0)
  movc r9.xz, r13.yyyy, r6.yywy, r14.xxyx
  movc r6.xyz, r13.xxxx, r4.xyzx, r12.xyzx
  movc r12.xy, r13.xxxx, l(0,0.150000,0,0), r9.xyxx
  mov r11.z, r9.w
  mov r11.w, l(0)
  mov r9.x, r5.y
  movc r9.xyz, r13.xxxx, r11.yzwy, r9.xxzx
  mov r14.xzw, l(0,0,0,0)
  mov r14.y, r5.x
  mov r15.x, r11.x
  movc r11.xyzw, r13.xxxx, r14.xyzw, r15.xyzw
  add r5.xyw, -r2.xzxy, r45.xzxy
  dp3 r3.w, r5.xywx, r5.xywx
  sqrt r3.w, r3.w
  div r5.xyw, r5.xyxw, r3.wwww
  dp3 r4.w, r4.xyzx, r5.xywx
  mad r12.zw, -r3.zzzz, l(0.000000, 0.000000, 0.990000, 6.000000), l(0.000000, 0.000000, 1.000000, 6.000000)
  mad r6.w, -r12.x, l(0.990000), l(1.000000)
  sqrt r6.w, r6.w
  mul r7.w, r12.z, r12.z
  div r8.x, r7.w, r6.w
  max r8.x, r8.x, l(0.001000)
  mul r6.w, r6.w, r7.w
  max r6.w, r6.w, l(0.001000)
  add r9.w, r11.w, r11.w
  dp3 r14.x, r8.ywzy, r5.xywx
  dp3 r14.y, r10.zxyz, r5.xywx
  mov_sat r10.w, r4.w
  movc r11.w, r13.w, |r4.w|, r10.w
  mul r14.xy, r14.xyxx, r14.xyxx
  mul r12.z, r8.x, r8.x
  mul r13.y, r6.w, r6.w
  mul r14.y, r14.y, r13.y
  mad r14.x, r12.z, r14.x, r14.y
  mad r11.w, r11.w, r11.w, r14.x
  sqrt r11.w, r11.w
  mad r12.y, r12.y, l(0.082000), l(0.018000)
  mad r7.xyz, r7.xyzx, r7.xyzx, -r12.yyyy
  mad r7.xyz, r11.xxxx, r7.xyzx, r12.yyyy
  add r11.x, -r11.x, l(1.000000)
  mul r14.xyz, r1.yzwy, r11.xxxx
  ieq r15.xy, r3.xxxx, l(2, 6, 0, 0)
  if_nz r15.x
    ishl r3.x, r1.x, l(1)
    ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r3.x, r3.x, l(0), t14.xxxx
    countbits r11.x, r3.x
    ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r14.w, r1.x, l(0), t15.xxxx
    and r14.w, r14.w, l(0x60000000)
    ine r14.w, r14.w, l(0)
    add r15.xzw, -r7.xxyz, l(1.000000, 0.000000, 1.000000, 1.000000)
    mul r16.x, r7.w, r7.w
    mad r16.x, r16.x, l(4.000000), l(1.000000)
    div r16.x, l(1.000000, 1.000000, 1.000000, 1.000000), r16.x
    mad r16.y, r7.w, r7.w, l(0.000001)
    mov r2.w, l(1.000000)
    mov r17.xyz, l(0,0,0,0)
    mov r18.xyz, l(0,0,0,0)
    mov r19.xyz, l(0,0,0,0)
    mov r16.z, r3.x
    mov r16.w, l(0)
    loop 
      uge r17.w, r16.w, r11.x
      breakc_nz r17.w
      firstbit_lo r17.w, r16.z
      ishl r18.w, l(1), r17.w
      not r18.w, r18.w
      and r18.w, r16.z, r18.w
      ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r20.xyzw, r17.w, l(0), t12.xyzw
      ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r21.xyz, r17.w, l(32), t12.xyzx
      ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r22.xyzw, r17.w, l(48), t12.xyzw
      and r19.w, r22.w, l(1)
      ult r19.w, l(0), r19.w
      add r20.xyz, -r2.xyzx, r20.xyzx
      dp3 r21.w, r20.xyzx, r20.xyzx
      max r21.w, r21.w, l(0.000010)
      rsq r23.x, r21.w
      div r23.y, l(1.000000, 1.000000, 1.000000, 1.000000), r21.w
      min r20.w, r20.w, r23.y
      mul r23.yzw, r20.xxyz, r23.xxxx
      mul r21.w, r21.w, r21.w
      mad_sat r21.w, -r21.w, r22.x, l(1.000000)
      mul r21.w, r21.w, r21.w
      mul r20.w, r20.w, r21.w
      dp3 r21.x, r23.yzwy, -r21.xyzx
      mad_sat r21.x, r21.x, r22.y, r22.z
      movc r21.x, r19.w, r21.x, l(1.000000)
      mul r21.x, r21.x, r21.x
      mul r21.xyz, r20.wwww, r21.xxxx
      lt r20.w, r21.z, l(0.000100)
      iadd r21.w, r16.w, -r20.w
      mov r16.z, r18.w
      mov r16.w, r21.w
      continuec_nz r20.w
      ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r22.xyz, r17.w, l(16), t12.xyzx
      and r17.w, r22.w, l(2)
      ult r17.w, l(0), r17.w
      and r19.w, r14.w, r19.w
      if_nz r19.w
        and r24.xy, r22.wwww, l(32, 16, 0, 0)
        ult r24.yz, l(0, 0, 0, 0), r24.xxyx
        ushr r19.w, r22.w, l(5)
        and r19.w, r19.w, l(2)
        or r20.w, r24.z, r24.y
        and r20.w, r14.w, r20.w
        if_nz r20.w
          ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r25.xyzw, r19.w, l(0), t13.xyzw
          ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r26.xyzw, r19.w, l(16), t13.xyzw
          ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r27.xyzw, r19.w, l(32), t13.xyzw
          ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r28.xyzw, r19.w, l(48), t13.xyzw
          ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r29.xyzw, r19.w, l(64), t13.xyzw
          ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r30.xyzw, r19.w, l(80), t13.xyzw
        else 
          mov r25.xyzw, l(0,0,0,0)
          mov r26.xyzw, l(0,0,0,0)
          mov r27.xyzw, l(0,0,0,0)
          mov r28.xyzw, l(0,0,0,0)
          mov r29.xyzw, l(0,0,0,0)
          mov r30.xyzw, l(0,0,0,0)
        endif 
        dp4 r26.x, r2.xyzw, r26.xyzw
        dp4 r26.y, r2.xyzw, r27.xyzw
        dp4 r20.w, r2.xyzw, r28.xyzw
        dp4 r21.w, r2.xyzw, r29.xyzw
        max r21.w, r21.w, l(0.000010)
        div r24.yw, r26.xxxy, r21.wwww
        if_z r19.w
          mad r25.xy, r24.ywyy, r25.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
          round_ni r26.xy, r25.xyxx
          add r25.xy, r25.xyxx, -r26.xyxx
          add r26.xy, r26.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
          mul r26.xy, r25.zwzz, r26.xyxx
          mad r27.xyzw, r25.xxxx, l(11.000000, 11.000000, 5.000000, 5.000000), l(-28.000000, 17.000000, -6.000000, 1.000000)
          mad r28.xyz, r25.xxxx, l(4.000000, 4.000000, 7.000000, 0.000000), l(-5.000000, -16.000000, 5.000000, 0.000000)
          div r28.xyz, r28.xyzx, r27.zxyz
          add r28.xyz, r28.yxzy, l(-1.000000, -3.000000, 1.000000, 0.000000)
          div r21.w, r25.x, r27.w
          add r29.x, r21.w, l(3.000000)
          mad r31.xyzw, r25.yyyy, l(11.000000, 11.000000, 5.000000, 5.000000), l(-28.000000, 17.000000, -6.000000, 1.000000)
          mad r32.xyz, r25.yyyy, l(4.000000, 4.000000, 7.000000, 0.000000), l(-5.000000, -16.000000, 5.000000, 0.000000)
          div r32.xyz, r32.xyzx, r31.zxyz
          add r32.xyz, r32.xyzx, l(-3.000000, -1.000000, 1.000000, 0.000000)
          div r21.w, r25.y, r31.w
          add r33.y, r21.w, l(3.000000)
          mul r34.xyzw, r27.zxzx, r31.zzxx
          mov r28.w, r32.x
          mad r35.xyzw, r28.ywxw, r25.zwzw, r26.xyxy
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r21.w, r35.xyxx, t2.xxxx, s4, r20.w
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r22.w, r35.zwzz, t2.xxxx, s4, r20.w
          mul r22.w, r22.w, r34.y
          mad r21.w, r34.x, r21.w, r22.w
          mul r35.xyzw, -r27.ywyw, r31.zzxx
          mad r25.xy, r28.zwzz, r25.zwzz, r26.xyxx
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r22.w, r25.xyxx, t2.xxxx, s4, r20.w
          mad r21.w, r35.x, r22.w, r21.w
          mov r29.y, r28.w
          mad r25.xy, r29.xyxx, r25.zwzz, r26.xyxx
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r22.w, r25.xyxx, t2.xxxx, s4, r20.w
          mad r21.w, r35.y, r22.w, r21.w
          mov r32.w, r28.y
          mad r36.xyzw, r32.wywz, r25.zwzw, r26.xyxy
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r22.w, r36.xyxx, t2.xxxx, s4, r20.w
          mad r21.w, r34.z, r22.w, r21.w
          mov r28.yw, r32.yyyz
          mad r37.xyzw, r28.xyzy, r25.zwzw, r26.xyxy
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r22.w, r37.xyxx, t2.xxxx, s4, r20.w
          mad r21.w, r34.w, r22.w, r21.w
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r22.w, r37.zwzz, t2.xxxx, s4, r20.w
          mad r21.w, r35.z, r22.w, r21.w
          mov r29.zw, r28.yyyw
          mad r34.xyzw, r29.xzxw, r25.zwzw, r26.xyxy
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r22.w, r34.xyxx, t2.xxxx, s4, r20.w
          mad r21.w, r35.w, r22.w, r21.w
          mul r35.xyzw, r27.zxzx, -r31.yyww
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r22.w, r36.zwzz, t2.xxxx, s4, r20.w
          mad r21.w, r35.x, r22.w, r21.w
          mad r36.xyzw, r28.xwzw, r25.zwzw, r26.xyxy
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r22.w, r36.xyxx, t2.xxxx, s4, r20.w
          mad r21.w, r35.y, r22.w, r21.w
          mul r27.xyzw, r27.ywyw, r31.yyww
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r22.w, r36.zwzz, t2.xxxx, s4, r20.w
          mad r21.w, r27.x, r22.w, r21.w
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r22.w, r34.zwzz, t2.xxxx, s4, r20.w
          mad r21.w, r27.y, r22.w, r21.w
          mov r33.x, r32.w
          mad r25.xy, r33.xyxx, r25.zwzz, r26.xyxx
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r22.w, r25.xyxx, t2.xxxx, s4, r20.w
          mad r21.w, r35.z, r22.w, r21.w
          mov r33.zw, r28.xxxz
          mad r28.xyzw, r33.zywy, r25.zwzw, r26.xyxy
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r22.w, r28.xyxx, t2.xxxx, s4, r20.w
          mad r21.w, r35.w, r22.w, r21.w
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r22.w, r28.zwzz, t2.xxxx, s4, r20.w
          mad r21.w, r27.z, r22.w, r21.w
          mov r33.x, r29.x
          mad r25.xy, r33.xyxx, r25.zwzz, r26.xyxx
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r20.w, r25.xyxx, t2.xxxx, s4, r20.w
          mad r20.w, r27.w, r20.w, r21.w
          mul r20.w, r20.w, l(0.000369822490)
        else 
          mov r20.w, l(1.000000)
        endif 
        mul r20.w, r20.w, r21.z
        if_nz r24.x
          if_z r19.w
            mad r24.xy, r24.ywyy, r30.xyxx, r30.zwzz
            sample_l_indexable(texture2d)(float,float,float,float) r24.xyw, r24.xyxx, t2.xywz, s2, l(0.000000)
          else 
            mov r24.xyw, l(1.000000,0,0,1.000000)
          endif 
          mul r24.xyw, r21.zzzz, r24.xyxw
        else 
          mov r24.xyw, r21.zzzz
        endif 
        movc r21.xyz, r24.zzzz, r20.wwww, r24.xywx
      endif 
      mul r21.xyz, r22.xyzx, r21.xyzx
      dp3_sat r19.w, r6.xzyx, r23.yzwy
      mad r17.xyz, r19.wwww, r21.xyzx, r17.xyzx
      mad r20.xyz, r20.xyzx, r23.xxxx, r5.xwyx
      dp3 r20.w, r20.xyzx, r20.xyzx
      rsq r20.w, r20.w
      mul r20.xyz, r20.wwww, r20.xyzx
      dp3 r20.w, r20.xzyx, r5.xywx
      add r20.w, -r20.w, l(1.000000)
      mul r21.w, r20.w, r20.w
      mul r21.w, r21.w, r21.w
      mul r20.w, r20.w, r21.w
      mad r22.xyz, r15.xzwx, r20.wwww, r7.xyzx
      dp3_sat r20.w, r4.xzyx, r23.yzwy
      add r21.w, r10.w, r20.w
      mad r21.w, -r20.w, r10.w, r21.w
      max r21.w, r21.w, l(0.010000)
      div r21.w, l(1.000000, 1.000000, 1.000000, 1.000000), r21.w
      mul r22.xyz, r21.wwww, r22.xyzx
      mul r22.xyz, r20.wwww, r22.xyzx
      dp3_sat r20.x, r20.xzyx, r4.xyzx
      mul r20.x, r20.x, r20.x
      min r20.x, r20.x, l(0.999999)
      add r20.y, -r20.x, l(1.000000)
      div r20.x, r20.x, r20.y
      mul r20.y, r20.y, r20.y
      div r20.x, -r20.x, r16.y
      mul r20.x, r20.x, l(1.442695)
      exp r20.x, r20.x
      mul r20.x, r20.x, l(4.000000)
      div r20.x, r20.x, r20.y
      add r20.x, r20.x, l(1.000000)
      mul r20.x, r16.x, r20.x
      mul r20.xyz, r20.xxxx, r21.xyzx
      mad r18.xyz, r22.xyzx, r20.xyzx, r18.xyzx
      mad r20.xyz, r19.wwww, r21.xyzx, r19.xyzx
      movc r19.xyz, r17.wwww, r20.xyzx, r19.xyzx
      iadd r16.w, r16.w, l(1)
      mov r16.z, r18.w
    endloop 
    bfi r2.w, l(31), l(1), r1.x, l(1)
    ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r2.w, r2.w, l(0), t14.xxxx
    countbits r3.x, r2.w
    mov r20.xyz, r2.xyzx
    mov r20.w, l(1.000000)
    mov r21.xyz, r17.xyzx
    mov r22.xyz, r18.xyzx
    mov r23.xyz, r19.xyzx
    mov r11.x, r2.w
    mov r16.z, l(0)
    loop 
      uge r16.w, r16.z, r3.x
      breakc_nz r16.w
      firstbit_lo r16.w, r11.x
      ishl r17.w, l(1), r16.w
      not r17.w, r17.w
      and r17.w, r11.x, r17.w
      iadd r16.w, l(32), r16.w
      ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r24.xyzw, r16.w, l(0), t12.xyzw
      ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r25.xyz, r16.w, l(32), t12.xyzx
      ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r26.xyzw, r16.w, l(48), t12.xyzw
      and r18.w, r26.w, l(1)
      ult r18.w, l(0), r18.w
      add r24.xyz, -r2.xyzx, r24.xyzx
      dp3 r19.w, r24.xyzx, r24.xyzx
      max r19.w, r19.w, l(0.000010)
      rsq r21.w, r19.w
      div r22.w, l(1.000000, 1.000000, 1.000000, 1.000000), r19.w
      min r22.w, r22.w, r24.w
      mul r27.xyz, r21.wwww, r24.xyzx
      mul r19.w, r19.w, r19.w
      mad_sat r19.w, -r19.w, r26.x, l(1.000000)
      mul r19.w, r19.w, r19.w
      mul r19.w, r19.w, r22.w
      dp3 r22.w, r27.xyzx, -r25.xyzx
      mad_sat r22.w, r22.w, r26.y, r26.z
      movc r22.w, r18.w, r22.w, l(1.000000)
      mul r22.w, r22.w, r22.w
      mul r25.xyz, r19.wwww, r22.wwww
      lt r19.w, r25.z, l(0.000100)
      iadd r22.w, r16.z, -r19.w
      mov r11.x, r17.w
      mov r16.z, r22.w
      continuec_nz r19.w
      ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r26.xyz, r16.w, l(16), t12.xyzx
      and r16.w, r26.w, l(2)
      ult r16.w, l(0), r16.w
      and r18.w, r14.w, r18.w
      if_nz r18.w
        and r28.xy, r26.wwww, l(32, 16, 0, 0)
        ult r28.yz, l(0, 0, 0, 0), r28.xxyx
        ushr r18.w, r26.w, l(5)
        and r18.w, r18.w, l(2)
        or r19.w, r28.z, r28.y
        and r19.w, r14.w, r19.w
        if_nz r19.w
          ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r29.xyzw, r18.w, l(0), t13.xyzw
          ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r30.xyzw, r18.w, l(16), t13.xyzw
          ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r31.xyzw, r18.w, l(32), t13.xyzw
          ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r32.xyzw, r18.w, l(48), t13.xyzw
          ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r33.xyzw, r18.w, l(64), t13.xyzw
          ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r34.xyzw, r18.w, l(80), t13.xyzw
        else 
          mov r29.xyzw, l(0,0,0,0)
          mov r30.xyzw, l(0,0,0,0)
          mov r31.xyzw, l(0,0,0,0)
          mov r32.xyzw, l(0,0,0,0)
          mov r33.xyzw, l(0,0,0,0)
          mov r34.xyzw, l(0,0,0,0)
        endif 
        dp4 r30.x, r20.xyzw, r30.xyzw
        dp4 r30.y, r20.xyzw, r31.xyzw
        dp4 r19.w, r20.xyzw, r32.xyzw
        dp4 r22.w, r20.xyzw, r33.xyzw
        max r22.w, r22.w, l(0.000010)
        div r28.yw, r30.xxxy, r22.wwww
        if_z r18.w
          mad r29.xy, r28.ywyy, r29.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
          round_ni r30.xy, r29.xyxx
          add r29.xy, r29.xyxx, -r30.xyxx
          add r30.xy, r30.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
          mul r30.xy, r29.zwzz, r30.xyxx
          mad r31.xyzw, r29.xxxx, l(11.000000, 11.000000, 5.000000, 5.000000), l(-28.000000, 17.000000, -6.000000, 1.000000)
          mad r32.xyz, r29.xxxx, l(4.000000, 4.000000, 7.000000, 0.000000), l(-5.000000, -16.000000, 5.000000, 0.000000)
          div r32.xyz, r32.xyzx, r31.zxyz
          add r32.xyz, r32.yxzy, l(-1.000000, -3.000000, 1.000000, 0.000000)
          div r22.w, r29.x, r31.w
          add r33.x, r22.w, l(3.000000)
          mad r35.xyzw, r29.yyyy, l(11.000000, 11.000000, 5.000000, 5.000000), l(-28.000000, 17.000000, -6.000000, 1.000000)
          mad r36.xyz, r29.yyyy, l(4.000000, 4.000000, 7.000000, 0.000000), l(-5.000000, -16.000000, 5.000000, 0.000000)
          div r36.xyz, r36.xyzx, r35.zxyz
          add r36.xyz, r36.xyzx, l(-3.000000, -1.000000, 1.000000, 0.000000)
          div r22.w, r29.y, r35.w
          add r37.y, r22.w, l(3.000000)
          mul r38.xyzw, r31.zxzx, r35.zzxx
          mov r32.w, r36.x
          mad r39.xyzw, r32.ywxw, r29.zwzw, r30.xyxy
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r22.w, r39.xyxx, t2.xxxx, s4, r19.w
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r23.w, r39.zwzz, t2.xxxx, s4, r19.w
          mul r23.w, r23.w, r38.y
          mad r22.w, r38.x, r22.w, r23.w
          mul r39.xyzw, -r31.ywyw, r35.zzxx
          mad r29.xy, r32.zwzz, r29.zwzz, r30.xyxx
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r23.w, r29.xyxx, t2.xxxx, s4, r19.w
          mad r22.w, r39.x, r23.w, r22.w
          mov r33.y, r32.w
          mad r29.xy, r33.xyxx, r29.zwzz, r30.xyxx
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r23.w, r29.xyxx, t2.xxxx, s4, r19.w
          mad r22.w, r39.y, r23.w, r22.w
          mov r36.w, r32.y
          mad r40.xyzw, r36.wywz, r29.zwzw, r30.xyxy
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r23.w, r40.xyxx, t2.xxxx, s4, r19.w
          mad r22.w, r38.z, r23.w, r22.w
          mov r32.yw, r36.yyyz
          mad r41.xyzw, r32.xyzy, r29.zwzw, r30.xyxy
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r23.w, r41.xyxx, t2.xxxx, s4, r19.w
          mad r22.w, r38.w, r23.w, r22.w
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r23.w, r41.zwzz, t2.xxxx, s4, r19.w
          mad r22.w, r39.z, r23.w, r22.w
          mov r33.zw, r32.yyyw
          mad r38.xyzw, r33.xzxw, r29.zwzw, r30.xyxy
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r23.w, r38.xyxx, t2.xxxx, s4, r19.w
          mad r22.w, r39.w, r23.w, r22.w
          mul r39.xyzw, r31.zxzx, -r35.yyww
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r23.w, r40.zwzz, t2.xxxx, s4, r19.w
          mad r22.w, r39.x, r23.w, r22.w
          mad r40.xyzw, r32.xwzw, r29.zwzw, r30.xyxy
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r23.w, r40.xyxx, t2.xxxx, s4, r19.w
          mad r22.w, r39.y, r23.w, r22.w
          mul r31.xyzw, r31.ywyw, r35.yyww
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r23.w, r40.zwzz, t2.xxxx, s4, r19.w
          mad r22.w, r31.x, r23.w, r22.w
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r23.w, r38.zwzz, t2.xxxx, s4, r19.w
          mad r22.w, r31.y, r23.w, r22.w
          mov r37.x, r36.w
          mad r29.xy, r37.xyxx, r29.zwzz, r30.xyxx
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r23.w, r29.xyxx, t2.xxxx, s4, r19.w
          mad r22.w, r39.z, r23.w, r22.w
          mov r37.zw, r32.xxxz
          mad r32.xyzw, r37.zywy, r29.zwzw, r30.xyxy
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r23.w, r32.xyxx, t2.xxxx, s4, r19.w
          mad r22.w, r39.w, r23.w, r22.w
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r23.w, r32.zwzz, t2.xxxx, s4, r19.w
          mad r22.w, r31.z, r23.w, r22.w
          mov r37.x, r33.x
          mad r29.xy, r37.xyxx, r29.zwzz, r30.xyxx
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r19.w, r29.xyxx, t2.xxxx, s4, r19.w
          mad r19.w, r31.w, r19.w, r22.w
          mul r19.w, r19.w, l(0.000369822490)
        else 
          mov r19.w, l(1.000000)
        endif 
        mul r19.w, r19.w, r25.z
        if_nz r28.x
          if_z r18.w
            mad r28.xy, r28.ywyy, r34.xyxx, r34.zwzz
            sample_l_indexable(texture2d)(float,float,float,float) r28.xyw, r28.xyxx, t2.xywz, s2, l(0.000000)
          else 
            mov r28.xyw, l(1.000000,0,0,1.000000)
          endif 
          mul r28.xyw, r25.zzzz, r28.xyxw
        else 
          mov r28.xyw, r25.zzzz
        endif 
        movc r25.xyz, r28.zzzz, r19.wwww, r28.xywx
      endif 
      mul r25.xyz, r26.xyzx, r25.xyzx
      dp3_sat r18.w, r6.xzyx, r27.xyzx
      mad r21.xyz, r18.wwww, r25.xyzx, r21.xyzx
      mad r24.xyz, r24.xyzx, r21.wwww, r5.xwyx
      dp3 r19.w, r24.xyzx, r24.xyzx
      rsq r19.w, r19.w
      mul r24.xyz, r19.wwww, r24.xyzx
      dp3 r19.w, r24.xzyx, r5.xywx
      add r19.w, -r19.w, l(1.000000)
      mul r21.w, r19.w, r19.w
      mul r21.w, r21.w, r21.w
      mul r19.w, r19.w, r21.w
      mad r26.xyz, r15.xzwx, r19.wwww, r7.xyzx
      dp3_sat r19.w, r4.xzyx, r27.xyzx
      add r21.w, r10.w, r19.w
      mad r21.w, -r19.w, r10.w, r21.w
      max r21.w, r21.w, l(0.010000)
      div r21.w, l(1.000000, 1.000000, 1.000000, 1.000000), r21.w
      mul r26.xyz, r21.wwww, r26.xyzx
      mul r26.xyz, r19.wwww, r26.xyzx
      dp3_sat r19.w, r24.xzyx, r4.xyzx
      mul r19.w, r19.w, r19.w
      min r19.w, r19.w, l(0.999999)
      add r21.w, -r19.w, l(1.000000)
      div r19.w, r19.w, r21.w
      mul r21.w, r21.w, r21.w
      div r19.w, -r19.w, r16.y
      mul r19.w, r19.w, l(1.442695)
      exp r19.w, r19.w
      mul r19.w, r19.w, l(4.000000)
      div r19.w, r19.w, r21.w
      add r19.w, r19.w, l(1.000000)
      mul r19.w, r16.x, r19.w
      mul r24.xyz, r19.wwww, r25.xyzx
      mad r22.xyz, r26.xyzx, r24.xyzx, r22.xyzx
      mad r24.xyz, r18.wwww, r25.xyzx, r23.xyzx
      movc r23.xyz, r16.wwww, r24.xyzx, r23.xyzx
      iadd r16.z, r16.z, l(1)
      mov r11.x, r17.w
    endloop 
  else 
    if_nz r13.z
      ishl r2.w, r1.x, l(1)
      ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r2.w, r2.w, l(0), t14.xxxx
      countbits r3.x, r2.w
      ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r11.x, r1.x, l(0), t15.xxxx
      and r11.x, r11.x, l(0x60000000)
      ine r11.x, r11.x, l(0)
      add r15.xzw, -r7.xxyz, l(1.000000, 0.000000, 1.000000, 1.000000)
      mul r14.w, r7.w, r7.w
      mad r16.x, -r7.w, r7.w, l(1.000000)
      add r16.yzw, -r4.xxzy, r6.xxzy
      mad r17.xyz, r16.yzwy, l(0.100000, 0.100000, 0.100000, 0.000000), r4.xzyx
      dp3 r17.w, r17.xyzx, r17.xyzx
      rsq r17.w, r17.w
      mul r17.xyz, r17.wwww, r17.xyzx
      mad r16.yzw, r16.yyzw, l(0.000000, 0.300000, 0.300000, 0.300000), r4.xxzy
      dp3 r17.w, r16.yzwy, r16.yzwy
      rsq r17.w, r17.w
      mul r16.yzw, r16.yyzw, r17.wwww
      mad r17.w, r7.w, r7.w, l(-1.000000)
      mov r18.w, r11.z
      mov r19.xyz, r2.xyzx
      mov r19.w, l(1.000000)
      mov r20.xyz, l(0,0,0,0)
      mov r24.xyz, l(0,0,0,0)
      mov r25.xyz, l(0,0,0,0)
      mov r20.w, r2.w
      mov r21.w, l(0)
      loop 
        uge r22.w, r21.w, r3.x
        breakc_nz r22.w
        firstbit_lo r22.w, r20.w
        ishl r23.w, l(1), r22.w
        not r23.w, r23.w
        and r23.w, r20.w, r23.w
        ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r26.xyzw, r22.w, l(0), t12.xyzw
        ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r27.xyz, r22.w, l(32), t12.xyzx
        ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r28.xyzw, r22.w, l(48), t12.xyzw
        and r24.w, r28.w, l(1)
        ult r24.w, l(0), r24.w
        add r26.xyz, -r2.xyzx, r26.xyzx
        dp3 r25.w, r26.xyzx, r26.xyzx
        max r25.w, r25.w, l(0.000010)
        rsq r27.w, r25.w
        div r29.x, l(1.000000, 1.000000, 1.000000, 1.000000), r25.w
        min r26.w, r26.w, r29.x
        mul r29.xyz, r26.xyzx, r27.wwww
        mul r25.w, r25.w, r25.w
        mad_sat r25.w, -r25.w, r28.x, l(1.000000)
        mul r25.w, r25.w, r25.w
        mul r25.w, r25.w, r26.w
        dp3 r26.w, r29.xyzx, -r27.xyzx
        mad_sat r26.w, r26.w, r28.y, r28.z
        movc r26.w, r24.w, r26.w, l(1.000000)
        mul r26.w, r26.w, r26.w
        mul r27.xyz, r25.wwww, r26.wwww
        lt r25.w, r27.z, l(0.000100)
        iadd r26.w, r21.w, -r25.w
        mov r20.w, r23.w
        mov r21.w, r26.w
        continuec_nz r25.w
        ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r28.xyz, r22.w, l(16), t12.xyzx
        and r22.w, r28.w, l(2)
        ult r22.w, l(0), r22.w
        and r24.w, r11.x, r24.w
        if_nz r24.w
          and r30.xy, r28.wwww, l(32, 16, 0, 0)
          ult r30.yz, l(0, 0, 0, 0), r30.xxyx
          ushr r24.w, r28.w, l(5)
          and r24.w, r24.w, l(2)
          or r25.w, r30.z, r30.y
          and r25.w, r11.x, r25.w
          if_nz r25.w
            ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r31.xyzw, r24.w, l(0), t13.xyzw
            ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r32.xyzw, r24.w, l(16), t13.xyzw
            ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r33.xyzw, r24.w, l(32), t13.xyzw
            ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r34.xyzw, r24.w, l(48), t13.xyzw
            ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r35.xyzw, r24.w, l(64), t13.xyzw
            ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r36.xyzw, r24.w, l(80), t13.xyzw
          else 
            mov r31.xyzw, l(0,0,0,0)
            mov r32.xyzw, l(0,0,0,0)
            mov r33.xyzw, l(0,0,0,0)
            mov r34.xyzw, l(0,0,0,0)
            mov r35.xyzw, l(0,0,0,0)
            mov r36.xyzw, l(0,0,0,0)
          endif 
          dp4 r32.x, r19.xyzw, r32.xyzw
          dp4 r32.y, r19.xyzw, r33.xyzw
          dp4 r25.w, r19.xyzw, r34.xyzw
          dp4 r26.w, r19.xyzw, r35.xyzw
          max r26.w, r26.w, l(0.000010)
          div r30.yw, r32.xxxy, r26.wwww
          if_z r24.w
            mad r31.xy, r30.ywyy, r31.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
            round_ni r32.xy, r31.xyxx
            add r31.xy, r31.xyxx, -r32.xyxx
            add r32.xy, r32.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
            mul r32.xy, r31.zwzz, r32.xyxx
            mad r33.xyzw, r31.xxxx, l(11.000000, 11.000000, 5.000000, 5.000000), l(-28.000000, 17.000000, -6.000000, 1.000000)
            mad r34.xyz, r31.xxxx, l(4.000000, 4.000000, 7.000000, 0.000000), l(-5.000000, -16.000000, 5.000000, 0.000000)
            div r34.xyz, r34.xyzx, r33.zxyz
            add r34.xyz, r34.yxzy, l(-1.000000, -3.000000, 1.000000, 0.000000)
            div r26.w, r31.x, r33.w
            add r35.x, r26.w, l(3.000000)
            mad r37.xyzw, r31.yyyy, l(11.000000, 11.000000, 5.000000, 5.000000), l(-28.000000, 17.000000, -6.000000, 1.000000)
            mad r38.xyz, r31.yyyy, l(4.000000, 4.000000, 7.000000, 0.000000), l(-5.000000, -16.000000, 5.000000, 0.000000)
            div r38.xyz, r38.xyzx, r37.zxyz
            add r38.xyz, r38.xyzx, l(-3.000000, -1.000000, 1.000000, 0.000000)
            div r26.w, r31.y, r37.w
            add r39.y, r26.w, l(3.000000)
            mul r40.xyzw, r33.zxzx, r37.zzxx
            mov r34.w, r38.x
            mad r41.xyzw, r34.ywxw, r31.zwzw, r32.xyxy
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r26.w, r41.xyxx, t2.xxxx, s4, r25.w
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r28.w, r41.zwzz, t2.xxxx, s4, r25.w
            mul r28.w, r28.w, r40.y
            mad r26.w, r40.x, r26.w, r28.w
            mul r41.xyzw, -r33.ywyw, r37.zzxx
            mad r31.xy, r34.zwzz, r31.zwzz, r32.xyxx
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r28.w, r31.xyxx, t2.xxxx, s4, r25.w
            mad r26.w, r41.x, r28.w, r26.w
            mov r35.y, r34.w
            mad r31.xy, r35.xyxx, r31.zwzz, r32.xyxx
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r28.w, r31.xyxx, t2.xxxx, s4, r25.w
            mad r26.w, r41.y, r28.w, r26.w
            mov r38.w, r34.y
            mad r42.xyzw, r38.wywz, r31.zwzw, r32.xyxy
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r28.w, r42.xyxx, t2.xxxx, s4, r25.w
            mad r26.w, r40.z, r28.w, r26.w
            mov r34.yw, r38.yyyz
            mad r43.xyzw, r34.xyzy, r31.zwzw, r32.xyxy
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r28.w, r43.xyxx, t2.xxxx, s4, r25.w
            mad r26.w, r40.w, r28.w, r26.w
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r28.w, r43.zwzz, t2.xxxx, s4, r25.w
            mad r26.w, r41.z, r28.w, r26.w
            mov r35.zw, r34.yyyw
            mad r40.xyzw, r35.xzxw, r31.zwzw, r32.xyxy
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r28.w, r40.xyxx, t2.xxxx, s4, r25.w
            mad r26.w, r41.w, r28.w, r26.w
            mul r41.xyzw, r33.zxzx, -r37.yyww
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r28.w, r42.zwzz, t2.xxxx, s4, r25.w
            mad r26.w, r41.x, r28.w, r26.w
            mad r42.xyzw, r34.xwzw, r31.zwzw, r32.xyxy
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r28.w, r42.xyxx, t2.xxxx, s4, r25.w
            mad r26.w, r41.y, r28.w, r26.w
            mul r33.xyzw, r33.ywyw, r37.yyww
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r28.w, r42.zwzz, t2.xxxx, s4, r25.w
            mad r26.w, r33.x, r28.w, r26.w
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r28.w, r40.zwzz, t2.xxxx, s4, r25.w
            mad r26.w, r33.y, r28.w, r26.w
            mov r39.x, r38.w
            mad r31.xy, r39.xyxx, r31.zwzz, r32.xyxx
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r28.w, r31.xyxx, t2.xxxx, s4, r25.w
            mad r26.w, r41.z, r28.w, r26.w
            mov r39.zw, r34.xxxz
            mad r34.xyzw, r39.zywy, r31.zwzw, r32.xyxy
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r28.w, r34.xyxx, t2.xxxx, s4, r25.w
            mad r26.w, r41.w, r28.w, r26.w
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r28.w, r34.zwzz, t2.xxxx, s4, r25.w
            mad r26.w, r33.z, r28.w, r26.w
            mov r39.x, r35.x
            mad r31.xy, r39.xyxx, r31.zwzz, r32.xyxx
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r25.w, r31.xyxx, t2.xxxx, s4, r25.w
            mad r25.w, r33.w, r25.w, r26.w
            mul r25.w, r25.w, l(0.000369822490)
          else 
            mov r25.w, l(1.000000)
          endif 
          mul r25.w, r25.w, r27.z
          if_nz r30.x
            if_z r24.w
              mad r30.xy, r30.ywyy, r36.xyxx, r36.zwzz
              sample_l_indexable(texture2d)(float,float,float,float) r30.xyw, r30.xyxx, t2.xywz, s2, l(0.000000)
            else 
              mov r30.xyw, l(1.000000,0,0,1.000000)
            endif 
            mul r30.xyw, r27.zzzz, r30.xyxw
          else 
            mov r30.xyw, r27.zzzz
          endif 
          movc r27.xyz, r30.zzzz, r25.wwww, r30.xywx
        endif 
        mad r26.xyz, r26.xyzx, r27.wwww, r5.xwyx
        dp3 r24.w, r26.xyzx, r26.xyzx
        rsq r24.w, r24.w
        mul r26.xyz, r24.wwww, r26.xyzx
        dp3 r24.w, r26.xzyx, r5.xywx
        add r24.w, -r24.w, l(1.000000)
        mul r25.w, r24.w, r24.w
        mul r25.w, r25.w, r25.w
        mul r24.w, r24.w, r25.w
        mad r30.xyz, r15.xzwx, r24.wwww, r7.xyzx
        dp3_sat r24.w, r6.xzyx, r29.xyzx
        mul r25.w, r24.w, r24.w
        mad r25.w, r25.w, r16.x, r14.w
        sqrt r25.w, r25.w
        mul r25.w, r10.w, r25.w
        mad r25.w, r24.w, r11.w, r25.w
        add r25.w, r25.w, r25.w
        max r25.w, r25.w, l(0.000100)
        div r25.w, l(1.000000, 1.000000, 1.000000, 1.000000), r25.w
        dp3 r26.w, r4.xzyx, r29.xyzx
        dp3 r27.w, r17.xyzx, r29.xyzx
        dp3 r28.w, r16.yzwy, r29.xyzx
        mad r18.z, r26.w, l(0.500000), l(0.500000)
        mad r29.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) r29.x, r29.xyxx, t17.xyzw, s5, l(0.000000)
        mad r18.y, r27.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) r29.y, r18.yzyy, t17.xyzw, s5, l(0.000000)
        mad r18.x, r28.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) r29.z, r18.xyxx, t17.xyzw, s5, l(0.000000)
        mul r18.xyz, r27.xyzx, r28.xyzx
        mad r20.xyz, r18.xyzx, r29.xyzx, r20.xyzx
        mul r27.xyz, r25.wwww, r30.xyzx
        mul r27.xyz, r24.wwww, r27.xyzx
        dp3_sat r24.w, r26.xzyx, r6.xyzx
        mul r24.w, r24.w, r24.w
        mad r24.w, r24.w, r17.w, l(1.000000)
        div r24.w, r7.w, r24.w
        mul r24.w, r24.w, r24.w
        mul r26.xyz, r18.xyzx, r24.wwww
        mad r24.xyz, r27.xyzx, r26.xyzx, r24.xyzx
        mad r18.xyz, r18.xyzx, r29.xyzx, r25.xyzx
        movc r25.xyz, r22.wwww, r18.xyzx, r25.xyzx
        iadd r21.w, r21.w, l(1)
        mov r20.w, r23.w
      endloop 
      bfi r2.w, l(31), l(1), r1.x, l(1)
      ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r2.w, r2.w, l(0), t14.xxxx
      countbits r3.x, r2.w
      mov r18.w, r11.z
      mov r19.xyz, r2.xyzx
      mov r19.w, l(1.000000)
      mov r21.xyz, r20.xyzx
      mov r22.xyz, r24.xyzx
      mov r23.xyz, r25.xyzx
      mov r11.z, r2.w
      mov r20.w, l(0)
      loop 
        uge r21.w, r20.w, r3.x
        breakc_nz r21.w
        firstbit_lo r21.w, r11.z
        ishl r22.w, l(1), r21.w
        not r22.w, r22.w
        and r22.w, r11.z, r22.w
        iadd r21.w, l(32), r21.w
        ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r26.xyzw, r21.w, l(0), t12.xyzw
        ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r27.xyz, r21.w, l(32), t12.xyzx
        ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r28.xyzw, r21.w, l(48), t12.xyzw
        and r23.w, r28.w, l(1)
        ult r23.w, l(0), r23.w
        add r26.xyz, -r2.xyzx, r26.xyzx
        dp3 r24.w, r26.xyzx, r26.xyzx
        max r24.w, r24.w, l(0.000010)
        rsq r25.w, r24.w
        div r27.w, l(1.000000, 1.000000, 1.000000, 1.000000), r24.w
        min r26.w, r26.w, r27.w
        mul r29.xyz, r25.wwww, r26.xyzx
        mul r24.w, r24.w, r24.w
        mad_sat r24.w, -r24.w, r28.x, l(1.000000)
        mul r24.w, r24.w, r24.w
        mul r24.w, r24.w, r26.w
        dp3 r26.w, r29.xyzx, -r27.xyzx
        mad_sat r26.w, r26.w, r28.y, r28.z
        movc r26.w, r23.w, r26.w, l(1.000000)
        mul r26.w, r26.w, r26.w
        mul r27.xyz, r24.wwww, r26.wwww
        lt r24.w, r27.z, l(0.000100)
        iadd r26.w, r20.w, -r24.w
        mov r11.z, r22.w
        mov r20.w, r26.w
        continuec_nz r24.w
        ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r28.xyz, r21.w, l(16), t12.xyzx
        and r21.w, r28.w, l(2)
        ult r21.w, l(0), r21.w
        and r23.w, r11.x, r23.w
        if_nz r23.w
          and r30.xy, r28.wwww, l(32, 16, 0, 0)
          ult r30.yz, l(0, 0, 0, 0), r30.xxyx
          ushr r23.w, r28.w, l(5)
          and r23.w, r23.w, l(2)
          or r24.w, r30.z, r30.y
          and r24.w, r11.x, r24.w
          if_nz r24.w
            ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r31.xyzw, r23.w, l(0), t13.xyzw
            ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r32.xyzw, r23.w, l(16), t13.xyzw
            ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r33.xyzw, r23.w, l(32), t13.xyzw
            ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r34.xyzw, r23.w, l(48), t13.xyzw
            ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r35.xyzw, r23.w, l(64), t13.xyzw
            ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r36.xyzw, r23.w, l(80), t13.xyzw
          else 
            mov r31.xyzw, l(0,0,0,0)
            mov r32.xyzw, l(0,0,0,0)
            mov r33.xyzw, l(0,0,0,0)
            mov r34.xyzw, l(0,0,0,0)
            mov r35.xyzw, l(0,0,0,0)
            mov r36.xyzw, l(0,0,0,0)
          endif 
          dp4 r32.x, r19.xyzw, r32.xyzw
          dp4 r32.y, r19.xyzw, r33.xyzw
          dp4 r24.w, r19.xyzw, r34.xyzw
          dp4 r26.w, r19.xyzw, r35.xyzw
          max r26.w, r26.w, l(0.000010)
          div r30.yw, r32.xxxy, r26.wwww
          if_z r23.w
            mad r31.xy, r30.ywyy, r31.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
            round_ni r32.xy, r31.xyxx
            add r31.xy, r31.xyxx, -r32.xyxx
            add r32.xy, r32.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
            mul r32.xy, r31.zwzz, r32.xyxx
            mad r33.xyzw, r31.xxxx, l(11.000000, 11.000000, 5.000000, 5.000000), l(-28.000000, 17.000000, -6.000000, 1.000000)
            mad r34.xyz, r31.xxxx, l(4.000000, 4.000000, 7.000000, 0.000000), l(-5.000000, -16.000000, 5.000000, 0.000000)
            div r34.xyz, r34.xyzx, r33.zxyz
            add r34.xyz, r34.yxzy, l(-1.000000, -3.000000, 1.000000, 0.000000)
            div r26.w, r31.x, r33.w
            add r35.x, r26.w, l(3.000000)
            mad r37.xyzw, r31.yyyy, l(11.000000, 11.000000, 5.000000, 5.000000), l(-28.000000, 17.000000, -6.000000, 1.000000)
            mad r38.xyz, r31.yyyy, l(4.000000, 4.000000, 7.000000, 0.000000), l(-5.000000, -16.000000, 5.000000, 0.000000)
            div r38.xyz, r38.xyzx, r37.zxyz
            add r38.xyz, r38.xyzx, l(-3.000000, -1.000000, 1.000000, 0.000000)
            div r26.w, r31.y, r37.w
            add r39.y, r26.w, l(3.000000)
            mul r40.xyzw, r33.zxzx, r37.zzxx
            mov r34.w, r38.x
            mad r41.xyzw, r34.ywxw, r31.zwzw, r32.xyxy
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r26.w, r41.xyxx, t2.xxxx, s4, r24.w
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r27.w, r41.zwzz, t2.xxxx, s4, r24.w
            mul r27.w, r27.w, r40.y
            mad r26.w, r40.x, r26.w, r27.w
            mul r41.xyzw, -r33.ywyw, r37.zzxx
            mad r31.xy, r34.zwzz, r31.zwzz, r32.xyxx
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r27.w, r31.xyxx, t2.xxxx, s4, r24.w
            mad r26.w, r41.x, r27.w, r26.w
            mov r35.y, r34.w
            mad r31.xy, r35.xyxx, r31.zwzz, r32.xyxx
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r27.w, r31.xyxx, t2.xxxx, s4, r24.w
            mad r26.w, r41.y, r27.w, r26.w
            mov r38.w, r34.y
            mad r42.xyzw, r38.wywz, r31.zwzw, r32.xyxy
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r27.w, r42.xyxx, t2.xxxx, s4, r24.w
            mad r26.w, r40.z, r27.w, r26.w
            mov r34.yw, r38.yyyz
            mad r43.xyzw, r34.xyzy, r31.zwzw, r32.xyxy
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r27.w, r43.xyxx, t2.xxxx, s4, r24.w
            mad r26.w, r40.w, r27.w, r26.w
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r27.w, r43.zwzz, t2.xxxx, s4, r24.w
            mad r26.w, r41.z, r27.w, r26.w
            mov r35.zw, r34.yyyw
            mad r40.xyzw, r35.xzxw, r31.zwzw, r32.xyxy
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r27.w, r40.xyxx, t2.xxxx, s4, r24.w
            mad r26.w, r41.w, r27.w, r26.w
            mul r41.xyzw, r33.zxzx, -r37.yyww
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r27.w, r42.zwzz, t2.xxxx, s4, r24.w
            mad r26.w, r41.x, r27.w, r26.w
            mad r42.xyzw, r34.xwzw, r31.zwzw, r32.xyxy
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r27.w, r42.xyxx, t2.xxxx, s4, r24.w
            mad r26.w, r41.y, r27.w, r26.w
            mul r33.xyzw, r33.ywyw, r37.yyww
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r27.w, r42.zwzz, t2.xxxx, s4, r24.w
            mad r26.w, r33.x, r27.w, r26.w
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r27.w, r40.zwzz, t2.xxxx, s4, r24.w
            mad r26.w, r33.y, r27.w, r26.w
            mov r39.x, r38.w
            mad r31.xy, r39.xyxx, r31.zwzz, r32.xyxx
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r27.w, r31.xyxx, t2.xxxx, s4, r24.w
            mad r26.w, r41.z, r27.w, r26.w
            mov r39.zw, r34.xxxz
            mad r34.xyzw, r39.zywy, r31.zwzw, r32.xyxy
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r27.w, r34.xyxx, t2.xxxx, s4, r24.w
            mad r26.w, r41.w, r27.w, r26.w
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r27.w, r34.zwzz, t2.xxxx, s4, r24.w
            mad r26.w, r33.z, r27.w, r26.w
            mov r39.x, r35.x
            mad r31.xy, r39.xyxx, r31.zwzz, r32.xyxx
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r24.w, r31.xyxx, t2.xxxx, s4, r24.w
            mad r24.w, r33.w, r24.w, r26.w
            mul r24.w, r24.w, l(0.000369822490)
          else 
            mov r24.w, l(1.000000)
          endif 
          mul r24.w, r24.w, r27.z
          if_nz r30.x
            if_z r23.w
              mad r30.xy, r30.ywyy, r36.xyxx, r36.zwzz
              sample_l_indexable(texture2d)(float,float,float,float) r30.xyw, r30.xyxx, t2.xywz, s2, l(0.000000)
            else 
              mov r30.xyw, l(1.000000,0,0,1.000000)
            endif 
            mul r30.xyw, r27.zzzz, r30.xyxw
          else 
            mov r30.xyw, r27.zzzz
          endif 
          movc r27.xyz, r30.zzzz, r24.wwww, r30.xywx
        endif 
        mad r26.xyz, r26.xyzx, r25.wwww, r5.xwyx
        dp3 r23.w, r26.xyzx, r26.xyzx
        rsq r23.w, r23.w
        mul r26.xyz, r23.wwww, r26.xyzx
        dp3 r23.w, r26.xzyx, r5.xywx
        add r23.w, -r23.w, l(1.000000)
        mul r24.w, r23.w, r23.w
        mul r24.w, r24.w, r24.w
        mul r23.w, r23.w, r24.w
        mad r30.xyz, r15.xzwx, r23.wwww, r7.xyzx
        dp3_sat r23.w, r6.xzyx, r29.xyzx
        mul r24.w, r23.w, r23.w
        mad r24.w, r24.w, r16.x, r14.w
        sqrt r24.w, r24.w
        mul r24.w, r10.w, r24.w
        mad r24.w, r23.w, r11.w, r24.w
        add r24.w, r24.w, r24.w
        max r24.w, r24.w, l(0.000100)
        div r24.w, l(1.000000, 1.000000, 1.000000, 1.000000), r24.w
        dp3 r25.w, r4.xzyx, r29.xyzx
        dp3 r26.w, r17.xyzx, r29.xyzx
        dp3 r27.w, r16.yzwy, r29.xyzx
        mad r18.z, r25.w, l(0.500000), l(0.500000)
        mad r29.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) r29.x, r29.xyxx, t17.xyzw, s5, l(0.000000)
        mad r18.y, r26.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) r29.y, r18.yzyy, t17.xyzw, s5, l(0.000000)
        mad r18.x, r27.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) r29.z, r18.xyxx, t17.xyzw, s5, l(0.000000)
        mul r18.xyz, r27.xyzx, r28.xyzx
        mad r21.xyz, r18.xyzx, r29.xyzx, r21.xyzx
        mul r27.xyz, r24.wwww, r30.xyzx
        mul r27.xyz, r23.wwww, r27.xyzx
        dp3_sat r23.w, r26.xzyx, r6.xyzx
        mul r23.w, r23.w, r23.w
        mad r23.w, r23.w, r17.w, l(1.000000)
        div r23.w, r7.w, r23.w
        mul r23.w, r23.w, r23.w
        mul r26.xyz, r18.xyzx, r23.wwww
        mad r22.xyz, r27.xyzx, r26.xyzx, r22.xyzx
        mad r18.xyz, r18.xyzx, r29.xyzx, r23.xyzx
        movc r23.xyz, r21.wwww, r18.xyzx, r23.xyzx
        iadd r20.w, r20.w, l(1)
        mov r11.z, r22.w
      endloop 
    else 
      if_nz r13.w
        ishl r2.w, r1.x, l(1)
        ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r2.w, r2.w, l(0), t14.xxxx
        countbits r3.x, r2.w
        ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r7.w, r1.x, l(0), t15.xxxx
        and r7.w, r7.w, l(0x60000000)
        ine r7.w, r7.w, l(0)
        add r15.xzw, -r7.xxyz, l(1.000000, 0.000000, 1.000000, 1.000000)
        mul r11.x, r6.w, r8.x
        mul r16.xyz, r9.wwww, r10.zyxz
        mul r16.xyz, r16.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
        mul r17.xyz, r1.yzwy, r12.yyyy
        mad r1.yzw, -r12.yyyy, r1.yyzw, l(0.000000, 1.000000, 1.000000, 1.000000)
        add r9.w, r8.x, r8.x
        add r11.z, r6.w, r6.w
        mul r13.w, r9.w, r9.w
        mul r14.w, r11.z, r11.z
        mul r9.w, r9.w, r11.z
        mov r18.xyz, r2.xyzx
        mov r18.w, l(1.000000)
        mov r19.xyz, l(0,0,0,0)
        mov r20.xyz, l(0,0,0,0)
        mov r24.xyz, l(0,0,0,0)
        mov r11.z, r2.w
        mov r16.w, l(0)
        loop 
          uge r17.w, r16.w, r3.x
          breakc_nz r17.w
          firstbit_lo r17.w, r11.z
          ishl r19.w, l(1), r17.w
          not r19.w, r19.w
          and r19.w, r11.z, r19.w
          ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r25.xyzw, r17.w, l(0), t12.xyzw
          ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r26.xyz, r17.w, l(32), t12.xyzx
          ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r27.xyzw, r17.w, l(48), t12.xyzw
          and r20.w, r27.w, l(1)
          ult r20.w, l(0), r20.w
          add r25.xyz, -r2.xyzx, r25.xyzx
          dp3 r21.w, r25.xyzx, r25.xyzx
          max r21.w, r21.w, l(0.000010)
          rsq r22.w, r21.w
          div r23.w, l(1.000000, 1.000000, 1.000000, 1.000000), r21.w
          min r23.w, r23.w, r25.w
          mul r28.xyz, r22.wwww, r25.xyzx
          mul r21.w, r21.w, r21.w
          mad_sat r21.w, -r21.w, r27.x, l(1.000000)
          mul r21.w, r21.w, r21.w
          mul r21.w, r21.w, r23.w
          dp3 r23.w, r28.xyzx, -r26.xyzx
          mad_sat r23.w, r23.w, r27.y, r27.z
          movc r23.w, r20.w, r23.w, l(1.000000)
          mul r23.w, r23.w, r23.w
          mul r26.xyz, r21.wwww, r23.wwww
          lt r21.w, r26.z, l(0.000100)
          iadd r23.w, r16.w, -r21.w
          mov r11.z, r19.w
          mov r16.w, r23.w
          continuec_nz r21.w
          ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r27.xyz, r17.w, l(16), t12.xyzx
          and r17.w, r27.w, l(2)
          ult r17.w, l(0), r17.w
          and r20.w, r7.w, r20.w
          if_nz r20.w
            and r29.xy, r27.wwww, l(32, 16, 0, 0)
            ult r29.yz, l(0, 0, 0, 0), r29.xxyx
            ushr r20.w, r27.w, l(5)
            and r20.w, r20.w, l(2)
            or r21.w, r29.z, r29.y
            and r21.w, r7.w, r21.w
            if_nz r21.w
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r30.xyzw, r20.w, l(0), t13.xyzw
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r31.xyzw, r20.w, l(16), t13.xyzw
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r32.xyzw, r20.w, l(32), t13.xyzw
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r33.xyzw, r20.w, l(48), t13.xyzw
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r34.xyzw, r20.w, l(64), t13.xyzw
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r35.xyzw, r20.w, l(80), t13.xyzw
            else 
              mov r30.xyzw, l(0,0,0,0)
              mov r31.xyzw, l(0,0,0,0)
              mov r32.xyzw, l(0,0,0,0)
              mov r33.xyzw, l(0,0,0,0)
              mov r34.xyzw, l(0,0,0,0)
              mov r35.xyzw, l(0,0,0,0)
            endif 
            dp4 r31.x, r18.xyzw, r31.xyzw
            dp4 r31.y, r18.xyzw, r32.xyzw
            dp4 r21.w, r18.xyzw, r33.xyzw
            dp4 r23.w, r18.xyzw, r34.xyzw
            max r23.w, r23.w, l(0.000010)
            div r29.yw, r31.xxxy, r23.wwww
            if_z r20.w
              mad r30.xy, r29.ywyy, r30.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
              round_ni r31.xy, r30.xyxx
              add r30.xy, r30.xyxx, -r31.xyxx
              add r31.xy, r31.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
              mul r31.xy, r30.zwzz, r31.xyxx
              mad r32.xyzw, r30.xxxx, l(11.000000, 11.000000, 5.000000, 5.000000), l(-28.000000, 17.000000, -6.000000, 1.000000)
              mad r33.xyz, r30.xxxx, l(4.000000, 4.000000, 7.000000, 0.000000), l(-5.000000, -16.000000, 5.000000, 0.000000)
              div r33.xyz, r33.xyzx, r32.zxyz
              add r33.xyz, r33.yxzy, l(-1.000000, -3.000000, 1.000000, 0.000000)
              div r23.w, r30.x, r32.w
              add r34.x, r23.w, l(3.000000)
              mad r36.xyzw, r30.yyyy, l(11.000000, 11.000000, 5.000000, 5.000000), l(-28.000000, 17.000000, -6.000000, 1.000000)
              mad r37.xyz, r30.yyyy, l(4.000000, 4.000000, 7.000000, 0.000000), l(-5.000000, -16.000000, 5.000000, 0.000000)
              div r37.xyz, r37.xyzx, r36.zxyz
              add r37.xyz, r37.xyzx, l(-3.000000, -1.000000, 1.000000, 0.000000)
              div r23.w, r30.y, r36.w
              add r38.y, r23.w, l(3.000000)
              mul r39.xyzw, r32.zxzx, r36.zzxx
              mov r33.w, r37.x
              mad r40.xyzw, r33.ywxw, r30.zwzw, r31.xyxy
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r23.w, r40.xyxx, t2.xxxx, s4, r21.w
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r24.w, r40.zwzz, t2.xxxx, s4, r21.w
              mul r24.w, r24.w, r39.y
              mad r23.w, r39.x, r23.w, r24.w
              mul r40.xyzw, -r32.ywyw, r36.zzxx
              mad r30.xy, r33.zwzz, r30.zwzz, r31.xyxx
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r24.w, r30.xyxx, t2.xxxx, s4, r21.w
              mad r23.w, r40.x, r24.w, r23.w
              mov r34.y, r33.w
              mad r30.xy, r34.xyxx, r30.zwzz, r31.xyxx
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r24.w, r30.xyxx, t2.xxxx, s4, r21.w
              mad r23.w, r40.y, r24.w, r23.w
              mov r37.w, r33.y
              mad r41.xyzw, r37.wywz, r30.zwzw, r31.xyxy
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r24.w, r41.xyxx, t2.xxxx, s4, r21.w
              mad r23.w, r39.z, r24.w, r23.w
              mov r33.yw, r37.yyyz
              mad r42.xyzw, r33.xyzy, r30.zwzw, r31.xyxy
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r24.w, r42.xyxx, t2.xxxx, s4, r21.w
              mad r23.w, r39.w, r24.w, r23.w
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r24.w, r42.zwzz, t2.xxxx, s4, r21.w
              mad r23.w, r40.z, r24.w, r23.w
              mov r34.zw, r33.yyyw
              mad r39.xyzw, r34.xzxw, r30.zwzw, r31.xyxy
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r24.w, r39.xyxx, t2.xxxx, s4, r21.w
              mad r23.w, r40.w, r24.w, r23.w
              mul r40.xyzw, r32.zxzx, -r36.yyww
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r24.w, r41.zwzz, t2.xxxx, s4, r21.w
              mad r23.w, r40.x, r24.w, r23.w
              mad r41.xyzw, r33.xwzw, r30.zwzw, r31.xyxy
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r24.w, r41.xyxx, t2.xxxx, s4, r21.w
              mad r23.w, r40.y, r24.w, r23.w
              mul r32.xyzw, r32.ywyw, r36.yyww
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r24.w, r41.zwzz, t2.xxxx, s4, r21.w
              mad r23.w, r32.x, r24.w, r23.w
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r24.w, r39.zwzz, t2.xxxx, s4, r21.w
              mad r23.w, r32.y, r24.w, r23.w
              mov r38.x, r37.w
              mad r30.xy, r38.xyxx, r30.zwzz, r31.xyxx
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r24.w, r30.xyxx, t2.xxxx, s4, r21.w
              mad r23.w, r40.z, r24.w, r23.w
              mov r38.zw, r33.xxxz
              mad r33.xyzw, r38.zywy, r30.zwzw, r31.xyxy
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r24.w, r33.xyxx, t2.xxxx, s4, r21.w
              mad r23.w, r40.w, r24.w, r23.w
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r24.w, r33.zwzz, t2.xxxx, s4, r21.w
              mad r23.w, r32.z, r24.w, r23.w
              mov r38.x, r34.x
              mad r30.xy, r38.xyxx, r30.zwzz, r31.xyxx
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r21.w, r30.xyxx, t2.xxxx, s4, r21.w
              mad r21.w, r32.w, r21.w, r23.w
              mul r21.w, r21.w, l(0.000369822490)
            else 
              mov r21.w, l(1.000000)
            endif 
            mul r21.w, r21.w, r26.z
            if_nz r29.x
              if_z r20.w
                mad r29.xy, r29.ywyy, r35.xyxx, r35.zwzz
                sample_l_indexable(texture2d)(float,float,float,float) r29.xyw, r29.xyxx, t2.xywz, s2, l(0.000000)
              else 
                mov r29.xyw, l(1.000000,0,0,1.000000)
              endif 
              mul r29.xyw, r26.zzzz, r29.xyxw
            else 
              mov r29.xyw, r26.zzzz
            endif 
            movc r26.xyz, r29.zzzz, r21.wwww, r29.xywx
          endif 
          mul r26.xyz, r27.xyzx, r26.xyzx
          dp3 r20.w, r6.xzyx, r28.xyzx
          mov_sat r21.w, r20.w
          mad r19.xyz, r21.wwww, r26.xyzx, r19.xyzx
          mad r27.xyz, r25.xyzx, r22.wwww, r5.xwyx
          dp3 r23.w, r27.xyzx, r27.xyzx
          rsq r23.w, r23.w
          mul r27.xyz, r23.wwww, r27.xyzx
          dp3 r23.w, r27.xzyx, r5.xywx
          add r23.w, -r23.w, l(1.000000)
          mul r24.w, r23.w, r23.w
          mul r24.w, r24.w, r24.w
          mul r23.w, r23.w, r24.w
          mad r29.xyz, r15.xzwx, r23.wwww, r7.xyzx
          dp3 r30.x, r8.yzwy, r28.xyzx
          dp3 r30.y, r10.zyxz, r28.xyzx
          mov r20.w, |r20.w|
          mul r28.xy, r30.xyxx, r30.xyxx
          mul r23.w, r13.y, r28.y
          mad r23.w, r12.z, r28.x, r23.w
          mad r23.w, r20.w, r20.w, r23.w
          sqrt r23.w, r23.w
          mul r23.w, |r4.w|, r23.w
          mad r20.w, r20.w, r11.w, r23.w
          add r20.w, r20.w, r20.w
          max r20.w, r20.w, l(0.000100)
          div r20.w, l(1.000000, 1.000000, 1.000000, 1.000000), r20.w
          mul r28.xyz, r20.wwww, r29.xyzx
          mul r28.xyz, r21.wwww, r28.xyzx
          dp3 r29.x, r27.xyzx, r8.yzwy
          dp3 r29.y, r27.zyxz, r10.xyzx
          dp3 r23.w, r27.xzyx, r4.xyzx
          mul r27.xy, r29.xyxx, r29.xyxx
          div r24.w, r27.x, r12.z
          mad r24.w, r23.w, r23.w, r24.w
          div r25.w, r27.y, r13.y
          add r24.w, r24.w, r25.w
          mul r24.w, r24.w, r24.w
          mul r24.w, r11.x, r24.w
          div r24.w, l(1.000000, 1.000000, 1.000000, 1.000000), r24.w
          mul r29.xyz, r24.wwww, r26.xyzx
          mul r28.xyz, r28.xyzx, r29.xyzx
          mad r25.xyz, r25.xyzx, r22.wwww, r16.xyzx
          dp3 r22.w, r25.xyzx, r25.xyzx
          rsq r22.w, r22.w
          mad r25.xyz, r25.xyzx, r22.wwww, r5.xwyx
          dp3 r22.w, r25.xyzx, r25.xyzx
          rsq r22.w, r22.w
          mul r25.xyz, r22.wwww, r25.xyzx
          dp3 r22.w, r25.xzyx, r5.xywx
          add r22.w, -r22.w, l(1.000000)
          mul r24.w, r22.w, r22.w
          mul r24.w, r24.w, r24.w
          mul r22.w, r22.w, r24.w
          mad r25.xyz, r1.yzwy, r22.wwww, r17.xyzx
          add r29.xyz, -r25.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
          mul r25.xyz, r20.wwww, r25.xyzx
          mul r25.xyz, r21.wwww, r25.xyzx
          div r20.w, r27.x, r13.w
          mad r20.w, r23.w, r23.w, r20.w
          div r22.w, r27.y, r14.w
          add r20.w, r20.w, r22.w
          mul r20.w, r20.w, r20.w
          mul r20.w, r9.w, r20.w
          div r20.w, l(1.000000, 1.000000, 1.000000, 1.000000), r20.w
          mul r27.xyz, r20.wwww, r26.xyzx
          mul r25.xyz, r25.xyzx, r27.xyzx
          mad r25.xyz, r28.xyzx, r29.xyzx, r25.xyzx
          add r20.xyz, r20.xyzx, r25.xyzx
          mad r25.xyz, r21.wwww, r26.xyzx, r24.xyzx
          movc r24.xyz, r17.wwww, r25.xyzx, r24.xyzx
          iadd r16.w, r16.w, l(1)
          mov r11.z, r19.w
        endloop 
        bfi r2.w, l(31), l(1), r1.x, l(1)
        ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r2.w, r2.w, l(0), t14.xxxx
        countbits r3.x, r2.w
        mov r18.xyz, r2.xyzx
        mov r18.w, l(1.000000)
        mov r21.xyz, r19.xyzx
        mov r22.xyz, r20.xyzx
        mov r23.xyz, r24.xyzx
        mov r11.z, r2.w
        mov r16.w, l(0)
        loop 
          uge r17.w, r16.w, r3.x
          breakc_nz r17.w
          firstbit_lo r17.w, r11.z
          ishl r19.w, l(1), r17.w
          not r19.w, r19.w
          and r19.w, r11.z, r19.w
          iadd r17.w, l(32), r17.w
          ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r25.xyzw, r17.w, l(0), t12.xyzw
          ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r26.xyz, r17.w, l(32), t12.xyzx
          ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r27.xyzw, r17.w, l(48), t12.xyzw
          and r20.w, r27.w, l(1)
          ult r20.w, l(0), r20.w
          add r25.xyz, -r2.xyzx, r25.xyzx
          dp3 r21.w, r25.xyzx, r25.xyzx
          max r21.w, r21.w, l(0.000010)
          rsq r22.w, r21.w
          div r23.w, l(1.000000, 1.000000, 1.000000, 1.000000), r21.w
          min r23.w, r23.w, r25.w
          mul r28.xyz, r22.wwww, r25.xyzx
          mul r21.w, r21.w, r21.w
          mad_sat r21.w, -r21.w, r27.x, l(1.000000)
          mul r21.w, r21.w, r21.w
          mul r21.w, r21.w, r23.w
          dp3 r23.w, r28.xyzx, -r26.xyzx
          mad_sat r23.w, r23.w, r27.y, r27.z
          movc r23.w, r20.w, r23.w, l(1.000000)
          mul r23.w, r23.w, r23.w
          mul r26.xyz, r21.wwww, r23.wwww
          lt r21.w, r26.z, l(0.000100)
          iadd r23.w, r16.w, -r21.w
          mov r11.z, r19.w
          mov r16.w, r23.w
          continuec_nz r21.w
          ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r27.xyz, r17.w, l(16), t12.xyzx
          and r17.w, r27.w, l(2)
          ult r17.w, l(0), r17.w
          and r20.w, r7.w, r20.w
          if_nz r20.w
            and r29.xy, r27.wwww, l(32, 16, 0, 0)
            ult r29.yz, l(0, 0, 0, 0), r29.xxyx
            ushr r20.w, r27.w, l(5)
            and r20.w, r20.w, l(2)
            or r21.w, r29.z, r29.y
            and r21.w, r7.w, r21.w
            if_nz r21.w
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r30.xyzw, r20.w, l(0), t13.xyzw
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r31.xyzw, r20.w, l(16), t13.xyzw
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r32.xyzw, r20.w, l(32), t13.xyzw
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r33.xyzw, r20.w, l(48), t13.xyzw
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r34.xyzw, r20.w, l(64), t13.xyzw
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r35.xyzw, r20.w, l(80), t13.xyzw
            else 
              mov r30.xyzw, l(0,0,0,0)
              mov r31.xyzw, l(0,0,0,0)
              mov r32.xyzw, l(0,0,0,0)
              mov r33.xyzw, l(0,0,0,0)
              mov r34.xyzw, l(0,0,0,0)
              mov r35.xyzw, l(0,0,0,0)
            endif 
            dp4 r31.x, r18.xyzw, r31.xyzw
            dp4 r31.y, r18.xyzw, r32.xyzw
            dp4 r21.w, r18.xyzw, r33.xyzw
            dp4 r23.w, r18.xyzw, r34.xyzw
            max r23.w, r23.w, l(0.000010)
            div r29.yw, r31.xxxy, r23.wwww
            if_z r20.w
              mad r30.xy, r29.ywyy, r30.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
              round_ni r31.xy, r30.xyxx
              add r30.xy, r30.xyxx, -r31.xyxx
              add r31.xy, r31.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
              mul r31.xy, r30.zwzz, r31.xyxx
              mad r32.xyzw, r30.xxxx, l(11.000000, 11.000000, 5.000000, 5.000000), l(-28.000000, 17.000000, -6.000000, 1.000000)
              mad r33.xyz, r30.xxxx, l(4.000000, 4.000000, 7.000000, 0.000000), l(-5.000000, -16.000000, 5.000000, 0.000000)
              div r33.xyz, r33.xyzx, r32.zxyz
              add r33.xyz, r33.yxzy, l(-1.000000, -3.000000, 1.000000, 0.000000)
              div r23.w, r30.x, r32.w
              add r34.x, r23.w, l(3.000000)
              mad r36.xyzw, r30.yyyy, l(11.000000, 11.000000, 5.000000, 5.000000), l(-28.000000, 17.000000, -6.000000, 1.000000)
              mad r37.xyz, r30.yyyy, l(4.000000, 4.000000, 7.000000, 0.000000), l(-5.000000, -16.000000, 5.000000, 0.000000)
              div r37.xyz, r37.xyzx, r36.zxyz
              add r37.xyz, r37.xyzx, l(-3.000000, -1.000000, 1.000000, 0.000000)
              div r23.w, r30.y, r36.w
              add r38.y, r23.w, l(3.000000)
              mul r39.xyzw, r32.zxzx, r36.zzxx
              mov r33.w, r37.x
              mad r40.xyzw, r33.ywxw, r30.zwzw, r31.xyxy
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r23.w, r40.xyxx, t2.xxxx, s4, r21.w
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r24.w, r40.zwzz, t2.xxxx, s4, r21.w
              mul r24.w, r24.w, r39.y
              mad r23.w, r39.x, r23.w, r24.w
              mul r40.xyzw, -r32.ywyw, r36.zzxx
              mad r30.xy, r33.zwzz, r30.zwzz, r31.xyxx
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r24.w, r30.xyxx, t2.xxxx, s4, r21.w
              mad r23.w, r40.x, r24.w, r23.w
              mov r34.y, r33.w
              mad r30.xy, r34.xyxx, r30.zwzz, r31.xyxx
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r24.w, r30.xyxx, t2.xxxx, s4, r21.w
              mad r23.w, r40.y, r24.w, r23.w
              mov r37.w, r33.y
              mad r41.xyzw, r37.wywz, r30.zwzw, r31.xyxy
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r24.w, r41.xyxx, t2.xxxx, s4, r21.w
              mad r23.w, r39.z, r24.w, r23.w
              mov r33.yw, r37.yyyz
              mad r42.xyzw, r33.xyzy, r30.zwzw, r31.xyxy
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r24.w, r42.xyxx, t2.xxxx, s4, r21.w
              mad r23.w, r39.w, r24.w, r23.w
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r24.w, r42.zwzz, t2.xxxx, s4, r21.w
              mad r23.w, r40.z, r24.w, r23.w
              mov r34.zw, r33.yyyw
              mad r39.xyzw, r34.xzxw, r30.zwzw, r31.xyxy
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r24.w, r39.xyxx, t2.xxxx, s4, r21.w
              mad r23.w, r40.w, r24.w, r23.w
              mul r40.xyzw, r32.zxzx, -r36.yyww
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r24.w, r41.zwzz, t2.xxxx, s4, r21.w
              mad r23.w, r40.x, r24.w, r23.w
              mad r41.xyzw, r33.xwzw, r30.zwzw, r31.xyxy
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r24.w, r41.xyxx, t2.xxxx, s4, r21.w
              mad r23.w, r40.y, r24.w, r23.w
              mul r32.xyzw, r32.ywyw, r36.yyww
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r24.w, r41.zwzz, t2.xxxx, s4, r21.w
              mad r23.w, r32.x, r24.w, r23.w
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r24.w, r39.zwzz, t2.xxxx, s4, r21.w
              mad r23.w, r32.y, r24.w, r23.w
              mov r38.x, r37.w
              mad r30.xy, r38.xyxx, r30.zwzz, r31.xyxx
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r24.w, r30.xyxx, t2.xxxx, s4, r21.w
              mad r23.w, r40.z, r24.w, r23.w
              mov r38.zw, r33.xxxz
              mad r33.xyzw, r38.zywy, r30.zwzw, r31.xyxy
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r24.w, r33.xyxx, t2.xxxx, s4, r21.w
              mad r23.w, r40.w, r24.w, r23.w
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r24.w, r33.zwzz, t2.xxxx, s4, r21.w
              mad r23.w, r32.z, r24.w, r23.w
              mov r38.x, r34.x
              mad r30.xy, r38.xyxx, r30.zwzz, r31.xyxx
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r21.w, r30.xyxx, t2.xxxx, s4, r21.w
              mad r21.w, r32.w, r21.w, r23.w
              mul r21.w, r21.w, l(0.000369822490)
            else 
              mov r21.w, l(1.000000)
            endif 
            mul r21.w, r21.w, r26.z
            if_nz r29.x
              if_z r20.w
                mad r29.xy, r29.ywyy, r35.xyxx, r35.zwzz
                sample_l_indexable(texture2d)(float,float,float,float) r29.xyw, r29.xyxx, t2.xywz, s2, l(0.000000)
              else 
                mov r29.xyw, l(1.000000,0,0,1.000000)
              endif 
              mul r29.xyw, r26.zzzz, r29.xyxw
            else 
              mov r29.xyw, r26.zzzz
            endif 
            movc r26.xyz, r29.zzzz, r21.wwww, r29.xywx
          endif 
          mul r26.xyz, r27.xyzx, r26.xyzx
          dp3 r20.w, r6.xzyx, r28.xyzx
          mov_sat r21.w, r20.w
          mad r21.xyz, r21.wwww, r26.xyzx, r21.xyzx
          mad r27.xyz, r25.xyzx, r22.wwww, r5.xwyx
          dp3 r23.w, r27.xyzx, r27.xyzx
          rsq r23.w, r23.w
          mul r27.xyz, r23.wwww, r27.xyzx
          dp3 r23.w, r27.xzyx, r5.xywx
          add r23.w, -r23.w, l(1.000000)
          mul r24.w, r23.w, r23.w
          mul r24.w, r24.w, r24.w
          mul r23.w, r23.w, r24.w
          mad r29.xyz, r15.xzwx, r23.wwww, r7.xyzx
          dp3 r30.x, r8.yzwy, r28.xyzx
          dp3 r30.y, r10.zyxz, r28.xyzx
          mov r20.w, |r20.w|
          mul r28.xy, r30.xyxx, r30.xyxx
          mul r23.w, r13.y, r28.y
          mad r23.w, r12.z, r28.x, r23.w
          mad r23.w, r20.w, r20.w, r23.w
          sqrt r23.w, r23.w
          mul r23.w, |r4.w|, r23.w
          mad r20.w, r20.w, r11.w, r23.w
          add r20.w, r20.w, r20.w
          max r20.w, r20.w, l(0.000100)
          div r20.w, l(1.000000, 1.000000, 1.000000, 1.000000), r20.w
          mul r28.xyz, r20.wwww, r29.xyzx
          mul r28.xyz, r21.wwww, r28.xyzx
          dp3 r29.x, r27.xyzx, r8.yzwy
          dp3 r29.y, r27.zyxz, r10.xyzx
          dp3 r23.w, r27.xzyx, r4.xyzx
          mul r27.xy, r29.xyxx, r29.xyxx
          div r24.w, r27.x, r12.z
          mad r24.w, r23.w, r23.w, r24.w
          div r25.w, r27.y, r13.y
          add r24.w, r24.w, r25.w
          mul r24.w, r24.w, r24.w
          mul r24.w, r11.x, r24.w
          div r24.w, l(1.000000, 1.000000, 1.000000, 1.000000), r24.w
          mul r29.xyz, r24.wwww, r26.xyzx
          mul r28.xyz, r28.xyzx, r29.xyzx
          mad r25.xyz, r25.xyzx, r22.wwww, r16.xyzx
          dp3 r22.w, r25.xyzx, r25.xyzx
          rsq r22.w, r22.w
          mad r25.xyz, r25.xyzx, r22.wwww, r5.xwyx
          dp3 r22.w, r25.xyzx, r25.xyzx
          rsq r22.w, r22.w
          mul r25.xyz, r22.wwww, r25.xyzx
          dp3 r22.w, r25.xzyx, r5.xywx
          add r22.w, -r22.w, l(1.000000)
          mul r24.w, r22.w, r22.w
          mul r24.w, r24.w, r24.w
          mul r22.w, r22.w, r24.w
          mad r25.xyz, r1.yzwy, r22.wwww, r17.xyzx
          add r29.xyz, -r25.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
          mul r25.xyz, r20.wwww, r25.xyzx
          mul r25.xyz, r21.wwww, r25.xyzx
          div r20.w, r27.x, r13.w
          mad r20.w, r23.w, r23.w, r20.w
          div r22.w, r27.y, r14.w
          add r20.w, r20.w, r22.w
          mul r20.w, r20.w, r20.w
          mul r20.w, r9.w, r20.w
          div r20.w, l(1.000000, 1.000000, 1.000000, 1.000000), r20.w
          mul r27.xyz, r20.wwww, r26.xyzx
          mul r25.xyz, r25.xyzx, r27.xyzx
          mad r25.xyz, r28.xyzx, r29.xyzx, r25.xyzx
          add r22.xyz, r22.xyzx, r25.xyzx
          mad r25.xyz, r21.wwww, r26.xyzx, r23.xyzx
          movc r23.xyz, r17.wwww, r25.xyzx, r23.xyzx
          iadd r16.w, r16.w, l(1)
          mov r11.z, r19.w
        endloop 
      else 
        ishl r1.y, r1.x, l(1)
        ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r1.y, r1.y, l(0), t14.xxxx
        countbits r1.z, r1.y
        ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r1.w, r1.x, l(0), t15.xxxx
        and r1.w, r1.w, l(0x60000000)
        ine r1.w, r1.w, l(0)
        add r15.xzw, -r7.xxyz, l(1.000000, 0.000000, 1.000000, 1.000000)
        mul r2.w, r6.w, r8.x
        mov r16.xyz, r2.xyzx
        mov r16.w, l(1.000000)
        mov r17.xyz, l(0,0,0,0)
        mov r18.xyz, l(0,0,0,0)
        mov r19.xyz, l(0,0,0,0)
        mov r3.x, r1.y
        mov r6.w, l(0)
        loop 
          uge r7.w, r6.w, r1.z
          breakc_nz r7.w
          firstbit_lo r7.w, r3.x
          ishl r8.x, l(1), r7.w
          not r8.x, r8.x
          and r8.x, r3.x, r8.x
          ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r20.xyzw, r7.w, l(0), t12.xyzw
          ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r24.xyz, r7.w, l(32), t12.xyzx
          ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r25.xyzw, r7.w, l(48), t12.xyzw
          and r9.w, r25.w, l(1)
          ult r9.w, l(0), r9.w
          add r20.xyz, -r2.xyzx, r20.xyzx
          dp3 r11.x, r20.xyzx, r20.xyzx
          max r11.x, r11.x, l(0.000010)
          rsq r11.z, r11.x
          div r13.w, l(1.000000, 1.000000, 1.000000, 1.000000), r11.x
          min r13.w, r13.w, r20.w
          mul r26.xyz, r11.zzzz, r20.xyzx
          mul r11.x, r11.x, r11.x
          mad_sat r11.x, -r11.x, r25.x, l(1.000000)
          mul r11.x, r11.x, r11.x
          mul r11.x, r11.x, r13.w
          dp3 r13.w, r26.xyzx, -r24.xyzx
          mad_sat r13.w, r13.w, r25.y, r25.z
          movc r13.w, r9.w, r13.w, l(1.000000)
          mul r13.w, r13.w, r13.w
          mul r24.xyz, r11.xxxx, r13.wwww
          lt r11.x, r24.z, l(0.000100)
          iadd r13.w, r6.w, -r11.x
          mov r3.x, r8.x
          mov r6.w, r13.w
          continuec_nz r11.x
          ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r25.xyz, r7.w, l(16), t12.xyzx
          and r7.w, r25.w, l(2)
          ult r7.w, l(0), r7.w
          and r9.w, r1.w, r9.w
          if_nz r9.w
            and r27.xy, r25.wwww, l(32, 16, 0, 0)
            ult r27.yz, l(0, 0, 0, 0), r27.xxyx
            ushr r9.w, r25.w, l(5)
            and r9.w, r9.w, l(2)
            or r11.x, r27.z, r27.y
            and r11.x, r1.w, r11.x
            if_nz r11.x
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r28.xyzw, r9.w, l(0), t13.xyzw
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r29.xyzw, r9.w, l(16), t13.xyzw
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r30.xyzw, r9.w, l(32), t13.xyzw
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r31.xyzw, r9.w, l(48), t13.xyzw
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r32.xyzw, r9.w, l(64), t13.xyzw
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r33.xyzw, r9.w, l(80), t13.xyzw
            else 
              mov r28.xyzw, l(0,0,0,0)
              mov r29.xyzw, l(0,0,0,0)
              mov r30.xyzw, l(0,0,0,0)
              mov r31.xyzw, l(0,0,0,0)
              mov r32.xyzw, l(0,0,0,0)
              mov r33.xyzw, l(0,0,0,0)
            endif 
            dp4 r29.x, r16.xyzw, r29.xyzw
            dp4 r29.y, r16.xyzw, r30.xyzw
            dp4 r11.x, r16.xyzw, r31.xyzw
            dp4 r13.w, r16.xyzw, r32.xyzw
            max r13.w, r13.w, l(0.000010)
            div r27.yw, r29.xxxy, r13.wwww
            if_z r9.w
              mad r28.xy, r27.ywyy, r28.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
              round_ni r29.xy, r28.xyxx
              add r28.xy, r28.xyxx, -r29.xyxx
              add r29.xy, r29.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
              mul r29.xy, r28.zwzz, r29.xyxx
              mad r30.xyzw, r28.xxxx, l(11.000000, 11.000000, 5.000000, 5.000000), l(-28.000000, 17.000000, -6.000000, 1.000000)
              mad r31.xyz, r28.xxxx, l(4.000000, 4.000000, 7.000000, 0.000000), l(-5.000000, -16.000000, 5.000000, 0.000000)
              div r31.xyz, r31.xyzx, r30.zxyz
              add r31.xyz, r31.yxzy, l(-1.000000, -3.000000, 1.000000, 0.000000)
              div r13.w, r28.x, r30.w
              add r32.x, r13.w, l(3.000000)
              mad r34.xyzw, r28.yyyy, l(11.000000, 11.000000, 5.000000, 5.000000), l(-28.000000, 17.000000, -6.000000, 1.000000)
              mad r35.xyz, r28.yyyy, l(4.000000, 4.000000, 7.000000, 0.000000), l(-5.000000, -16.000000, 5.000000, 0.000000)
              div r35.xyz, r35.xyzx, r34.zxyz
              add r35.xyz, r35.xyzx, l(-3.000000, -1.000000, 1.000000, 0.000000)
              div r13.w, r28.y, r34.w
              add r36.y, r13.w, l(3.000000)
              mul r37.xyzw, r30.zxzx, r34.zzxx
              mov r31.w, r35.x
              mad r38.xyzw, r31.ywxw, r28.zwzw, r29.xyxy
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r13.w, r38.xyxx, t2.xxxx, s4, r11.x
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.w, r38.zwzz, t2.xxxx, s4, r11.x
              mul r14.w, r14.w, r37.y
              mad r13.w, r37.x, r13.w, r14.w
              mul r38.xyzw, -r30.ywyw, r34.zzxx
              mad r28.xy, r31.zwzz, r28.zwzz, r29.xyxx
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.w, r28.xyxx, t2.xxxx, s4, r11.x
              mad r13.w, r38.x, r14.w, r13.w
              mov r32.y, r31.w
              mad r28.xy, r32.xyxx, r28.zwzz, r29.xyxx
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.w, r28.xyxx, t2.xxxx, s4, r11.x
              mad r13.w, r38.y, r14.w, r13.w
              mov r35.w, r31.y
              mad r39.xyzw, r35.wywz, r28.zwzw, r29.xyxy
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.w, r39.xyxx, t2.xxxx, s4, r11.x
              mad r13.w, r37.z, r14.w, r13.w
              mov r31.yw, r35.yyyz
              mad r40.xyzw, r31.xyzy, r28.zwzw, r29.xyxy
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.w, r40.xyxx, t2.xxxx, s4, r11.x
              mad r13.w, r37.w, r14.w, r13.w
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.w, r40.zwzz, t2.xxxx, s4, r11.x
              mad r13.w, r38.z, r14.w, r13.w
              mov r32.zw, r31.yyyw
              mad r37.xyzw, r32.xzxw, r28.zwzw, r29.xyxy
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.w, r37.xyxx, t2.xxxx, s4, r11.x
              mad r13.w, r38.w, r14.w, r13.w
              mul r38.xyzw, r30.zxzx, -r34.yyww
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.w, r39.zwzz, t2.xxxx, s4, r11.x
              mad r13.w, r38.x, r14.w, r13.w
              mad r39.xyzw, r31.xwzw, r28.zwzw, r29.xyxy
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.w, r39.xyxx, t2.xxxx, s4, r11.x
              mad r13.w, r38.y, r14.w, r13.w
              mul r30.xyzw, r30.ywyw, r34.yyww
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.w, r39.zwzz, t2.xxxx, s4, r11.x
              mad r13.w, r30.x, r14.w, r13.w
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.w, r37.zwzz, t2.xxxx, s4, r11.x
              mad r13.w, r30.y, r14.w, r13.w
              mov r36.x, r35.w
              mad r28.xy, r36.xyxx, r28.zwzz, r29.xyxx
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.w, r28.xyxx, t2.xxxx, s4, r11.x
              mad r13.w, r38.z, r14.w, r13.w
              mov r36.zw, r31.xxxz
              mad r31.xyzw, r36.zywy, r28.zwzw, r29.xyxy
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.w, r31.xyxx, t2.xxxx, s4, r11.x
              mad r13.w, r38.w, r14.w, r13.w
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.w, r31.zwzz, t2.xxxx, s4, r11.x
              mad r13.w, r30.z, r14.w, r13.w
              mov r36.x, r32.x
              mad r28.xy, r36.xyxx, r28.zwzz, r29.xyxx
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r11.x, r28.xyxx, t2.xxxx, s4, r11.x
              mad r11.x, r30.w, r11.x, r13.w
              mul r11.x, r11.x, l(0.000369822490)
            else 
              mov r11.x, l(1.000000)
            endif 
            mul r11.x, r11.x, r24.z
            if_nz r27.x
              if_z r9.w
                mad r27.xy, r27.ywyy, r33.xyxx, r33.zwzz
                sample_l_indexable(texture2d)(float,float,float,float) r27.xyw, r27.xyxx, t2.xywz, s2, l(0.000000)
              else 
                mov r27.xyw, l(1.000000,0,0,1.000000)
              endif 
              mul r27.xyw, r24.zzzz, r27.xyxw
            else 
              mov r27.xyw, r24.zzzz
            endif 
            movc r24.xyz, r27.zzzz, r11.xxxx, r27.xywx
          endif 
          mul r24.xyz, r25.xyzx, r24.xyzx
          dp3_sat r9.w, r6.xzyx, r26.xyzx
          mad r17.xyz, r9.wwww, r24.xyzx, r17.xyzx
          mad r20.xyz, r20.xyzx, r11.zzzz, r5.xwyx
          dp3 r11.x, r20.xyzx, r20.xyzx
          rsq r11.x, r11.x
          mul r20.xyz, r11.xxxx, r20.xyzx
          dp3 r11.x, r20.xzyx, r5.xywx
          add r11.x, -r11.x, l(1.000000)
          mul r11.z, r11.x, r11.x
          mul r11.z, r11.z, r11.z
          mul r11.x, r11.x, r11.z
          mad r25.xyz, r15.xzwx, r11.xxxx, r7.xyzx
          dp3_sat r11.x, r4.xzyx, r26.xyzx
          dp3 r27.x, r8.yzwy, r26.xyzx
          dp3 r27.y, r10.zyxz, r26.xyzx
          mul r26.xy, r27.xyxx, r27.xyxx
          mul r11.z, r13.y, r26.y
          mad r11.z, r12.z, r26.x, r11.z
          mad r11.z, r11.x, r11.x, r11.z
          sqrt r11.z, r11.z
          mul r11.z, r10.w, r11.z
          mad r11.z, r11.x, r11.w, r11.z
          add r11.z, r11.z, r11.z
          max r11.z, r11.z, l(0.000100)
          div r11.z, l(1.000000, 1.000000, 1.000000, 1.000000), r11.z
          mul r25.xyz, r11.zzzz, r25.xyzx
          mul r25.xyz, r11.xxxx, r25.xyzx
          dp3 r26.x, r20.xyzx, r8.yzwy
          dp3 r26.y, r20.zyxz, r10.xyzx
          dp3 r11.x, r20.xzyx, r4.xyzx
          mul r20.xy, r26.xyxx, r26.xyxx
          div r11.z, r20.x, r12.z
          mad r11.x, r11.x, r11.x, r11.z
          div r11.z, r20.y, r13.y
          add r11.x, r11.z, r11.x
          mul r11.x, r11.x, r11.x
          mul r11.x, r2.w, r11.x
          div r11.x, l(1.000000, 1.000000, 1.000000, 1.000000), r11.x
          mul r20.xyz, r11.xxxx, r24.xyzx
          mad r18.xyz, r25.xyzx, r20.xyzx, r18.xyzx
          mad r20.xyz, r9.wwww, r24.xyzx, r19.xyzx
          movc r19.xyz, r7.wwww, r20.xyzx, r19.xyzx
          iadd r6.w, r6.w, l(1)
          mov r3.x, r8.x
        endloop 
        bfi r1.y, l(31), l(1), r1.x, l(1)
        ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r1.y, r1.y, l(0), t14.xxxx
        countbits r1.z, r1.y
        mov r16.xyz, r2.xyzx
        mov r16.w, l(1.000000)
        mov r21.xyz, r17.xyzx
        mov r22.xyz, r18.xyzx
        mov r23.xyz, r19.xyzx
        mov r3.x, r1.y
        mov r6.w, l(0)
        loop 
          uge r7.w, r6.w, r1.z
          breakc_nz r7.w
          firstbit_lo r7.w, r3.x
          ishl r8.x, l(1), r7.w
          not r8.x, r8.x
          and r8.x, r3.x, r8.x
          iadd r7.w, l(32), r7.w
          ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r20.xyzw, r7.w, l(0), t12.xyzw
          ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r24.xyz, r7.w, l(32), t12.xyzx
          ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r25.xyzw, r7.w, l(48), t12.xyzw
          and r9.w, r25.w, l(1)
          ult r9.w, l(0), r9.w
          add r20.xyz, -r2.xyzx, r20.xyzx
          dp3 r11.x, r20.xyzx, r20.xyzx
          max r11.x, r11.x, l(0.000010)
          rsq r11.z, r11.x
          div r13.w, l(1.000000, 1.000000, 1.000000, 1.000000), r11.x
          min r13.w, r13.w, r20.w
          mul r26.xyz, r11.zzzz, r20.xyzx
          mul r11.x, r11.x, r11.x
          mad_sat r11.x, -r11.x, r25.x, l(1.000000)
          mul r11.x, r11.x, r11.x
          mul r11.x, r11.x, r13.w
          dp3 r13.w, r26.xyzx, -r24.xyzx
          mad_sat r13.w, r13.w, r25.y, r25.z
          movc r13.w, r9.w, r13.w, l(1.000000)
          mul r13.w, r13.w, r13.w
          mul r24.xyz, r11.xxxx, r13.wwww
          lt r11.x, r24.z, l(0.000100)
          iadd r13.w, r6.w, -r11.x
          mov r3.x, r8.x
          mov r6.w, r13.w
          continuec_nz r11.x
          ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r25.xyz, r7.w, l(16), t12.xyzx
          and r7.w, r25.w, l(2)
          ult r7.w, l(0), r7.w
          and r9.w, r1.w, r9.w
          if_nz r9.w
            and r27.xy, r25.wwww, l(32, 16, 0, 0)
            ult r27.yz, l(0, 0, 0, 0), r27.xxyx
            ushr r9.w, r25.w, l(5)
            and r9.w, r9.w, l(2)
            or r11.x, r27.z, r27.y
            and r11.x, r1.w, r11.x
            if_nz r11.x
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r28.xyzw, r9.w, l(0), t13.xyzw
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r29.xyzw, r9.w, l(16), t13.xyzw
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r30.xyzw, r9.w, l(32), t13.xyzw
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r31.xyzw, r9.w, l(48), t13.xyzw
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r32.xyzw, r9.w, l(64), t13.xyzw
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r33.xyzw, r9.w, l(80), t13.xyzw
            else 
              mov r28.xyzw, l(0,0,0,0)
              mov r29.xyzw, l(0,0,0,0)
              mov r30.xyzw, l(0,0,0,0)
              mov r31.xyzw, l(0,0,0,0)
              mov r32.xyzw, l(0,0,0,0)
              mov r33.xyzw, l(0,0,0,0)
            endif 
            dp4 r29.x, r16.xyzw, r29.xyzw
            dp4 r29.y, r16.xyzw, r30.xyzw
            dp4 r11.x, r16.xyzw, r31.xyzw
            dp4 r13.w, r16.xyzw, r32.xyzw
            max r13.w, r13.w, l(0.000010)
            div r27.yw, r29.xxxy, r13.wwww
            if_z r9.w
              mad r28.xy, r27.ywyy, r28.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
              round_ni r29.xy, r28.xyxx
              add r28.xy, r28.xyxx, -r29.xyxx
              add r29.xy, r29.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
              mul r29.xy, r28.zwzz, r29.xyxx
              mad r30.xyzw, r28.xxxx, l(11.000000, 11.000000, 5.000000, 5.000000), l(-28.000000, 17.000000, -6.000000, 1.000000)
              mad r31.xyz, r28.xxxx, l(4.000000, 4.000000, 7.000000, 0.000000), l(-5.000000, -16.000000, 5.000000, 0.000000)
              div r31.xyz, r31.xyzx, r30.zxyz
              add r31.xyz, r31.yxzy, l(-1.000000, -3.000000, 1.000000, 0.000000)
              div r13.w, r28.x, r30.w
              add r32.x, r13.w, l(3.000000)
              mad r34.xyzw, r28.yyyy, l(11.000000, 11.000000, 5.000000, 5.000000), l(-28.000000, 17.000000, -6.000000, 1.000000)
              mad r35.xyz, r28.yyyy, l(4.000000, 4.000000, 7.000000, 0.000000), l(-5.000000, -16.000000, 5.000000, 0.000000)
              div r35.xyz, r35.xyzx, r34.zxyz
              add r35.xyz, r35.xyzx, l(-3.000000, -1.000000, 1.000000, 0.000000)
              div r13.w, r28.y, r34.w
              add r36.y, r13.w, l(3.000000)
              mul r37.xyzw, r30.zxzx, r34.zzxx
              mov r31.w, r35.x
              mad r38.xyzw, r31.ywxw, r28.zwzw, r29.xyxy
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r13.w, r38.xyxx, t2.xxxx, s4, r11.x
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.w, r38.zwzz, t2.xxxx, s4, r11.x
              mul r14.w, r14.w, r37.y
              mad r13.w, r37.x, r13.w, r14.w
              mul r38.xyzw, -r30.ywyw, r34.zzxx
              mad r28.xy, r31.zwzz, r28.zwzz, r29.xyxx
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.w, r28.xyxx, t2.xxxx, s4, r11.x
              mad r13.w, r38.x, r14.w, r13.w
              mov r32.y, r31.w
              mad r28.xy, r32.xyxx, r28.zwzz, r29.xyxx
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.w, r28.xyxx, t2.xxxx, s4, r11.x
              mad r13.w, r38.y, r14.w, r13.w
              mov r35.w, r31.y
              mad r39.xyzw, r35.wywz, r28.zwzw, r29.xyxy
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.w, r39.xyxx, t2.xxxx, s4, r11.x
              mad r13.w, r37.z, r14.w, r13.w
              mov r31.yw, r35.yyyz
              mad r40.xyzw, r31.xyzy, r28.zwzw, r29.xyxy
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.w, r40.xyxx, t2.xxxx, s4, r11.x
              mad r13.w, r37.w, r14.w, r13.w
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.w, r40.zwzz, t2.xxxx, s4, r11.x
              mad r13.w, r38.z, r14.w, r13.w
              mov r32.zw, r31.yyyw
              mad r37.xyzw, r32.xzxw, r28.zwzw, r29.xyxy
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.w, r37.xyxx, t2.xxxx, s4, r11.x
              mad r13.w, r38.w, r14.w, r13.w
              mul r38.xyzw, r30.zxzx, -r34.yyww
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.w, r39.zwzz, t2.xxxx, s4, r11.x
              mad r13.w, r38.x, r14.w, r13.w
              mad r39.xyzw, r31.xwzw, r28.zwzw, r29.xyxy
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.w, r39.xyxx, t2.xxxx, s4, r11.x
              mad r13.w, r38.y, r14.w, r13.w
              mul r30.xyzw, r30.ywyw, r34.yyww
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.w, r39.zwzz, t2.xxxx, s4, r11.x
              mad r13.w, r30.x, r14.w, r13.w
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.w, r37.zwzz, t2.xxxx, s4, r11.x
              mad r13.w, r30.y, r14.w, r13.w
              mov r36.x, r35.w
              mad r28.xy, r36.xyxx, r28.zwzz, r29.xyxx
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.w, r28.xyxx, t2.xxxx, s4, r11.x
              mad r13.w, r38.z, r14.w, r13.w
              mov r36.zw, r31.xxxz
              mad r31.xyzw, r36.zywy, r28.zwzw, r29.xyxy
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.w, r31.xyxx, t2.xxxx, s4, r11.x
              mad r13.w, r38.w, r14.w, r13.w
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.w, r31.zwzz, t2.xxxx, s4, r11.x
              mad r13.w, r30.z, r14.w, r13.w
              mov r36.x, r32.x
              mad r28.xy, r36.xyxx, r28.zwzz, r29.xyxx
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r11.x, r28.xyxx, t2.xxxx, s4, r11.x
              mad r11.x, r30.w, r11.x, r13.w
              mul r11.x, r11.x, l(0.000369822490)
            else 
              mov r11.x, l(1.000000)
            endif 
            mul r11.x, r11.x, r24.z
            if_nz r27.x
              if_z r9.w
                mad r27.xy, r27.ywyy, r33.xyxx, r33.zwzz
                sample_l_indexable(texture2d)(float,float,float,float) r27.xyw, r27.xyxx, t2.xywz, s2, l(0.000000)
              else 
                mov r27.xyw, l(1.000000,0,0,1.000000)
              endif 
              mul r27.xyw, r24.zzzz, r27.xyxw
            else 
              mov r27.xyw, r24.zzzz
            endif 
            movc r24.xyz, r27.zzzz, r11.xxxx, r27.xywx
          endif 
          mul r24.xyz, r25.xyzx, r24.xyzx
          dp3_sat r9.w, r6.xzyx, r26.xyzx
          mad r21.xyz, r9.wwww, r24.xyzx, r21.xyzx
          mad r20.xyz, r20.xyzx, r11.zzzz, r5.xwyx
          dp3 r11.x, r20.xyzx, r20.xyzx
          rsq r11.x, r11.x
          mul r20.xyz, r11.xxxx, r20.xyzx
          dp3 r11.x, r20.xzyx, r5.xywx
          add r11.x, -r11.x, l(1.000000)
          mul r11.z, r11.x, r11.x
          mul r11.z, r11.z, r11.z
          mul r11.x, r11.x, r11.z
          mad r25.xyz, r15.xzwx, r11.xxxx, r7.xyzx
          dp3_sat r11.x, r4.xzyx, r26.xyzx
          dp3 r27.x, r8.yzwy, r26.xyzx
          dp3 r27.y, r10.zyxz, r26.xyzx
          mul r26.xy, r27.xyxx, r27.xyxx
          mul r11.z, r13.y, r26.y
          mad r11.z, r12.z, r26.x, r11.z
          mad r11.z, r11.x, r11.x, r11.z
          sqrt r11.z, r11.z
          mul r11.z, r10.w, r11.z
          mad r11.z, r11.x, r11.w, r11.z
          add r11.z, r11.z, r11.z
          max r11.z, r11.z, l(0.000100)
          div r11.z, l(1.000000, 1.000000, 1.000000, 1.000000), r11.z
          mul r25.xyz, r11.zzzz, r25.xyzx
          mul r25.xyz, r11.xxxx, r25.xyzx
          dp3 r26.x, r20.xyzx, r8.yzwy
          dp3 r26.y, r20.zyxz, r10.xyzx
          dp3 r11.x, r20.xzyx, r4.xyzx
          mul r20.xy, r26.xyxx, r26.xyxx
          div r11.z, r20.x, r12.z
          mad r11.x, r11.x, r11.x, r11.z
          div r11.z, r20.y, r13.y
          add r11.x, r11.z, r11.x
          mul r11.x, r11.x, r11.x
          mul r11.x, r2.w, r11.x
          div r11.x, l(1.000000, 1.000000, 1.000000, 1.000000), r11.x
          mul r20.xyz, r11.xxxx, r24.xyzx
          mad r22.xyz, r25.xyzx, r20.xyzx, r22.xyzx
          mad r20.xyz, r9.wwww, r24.xyzx, r23.xyzx
          movc r23.xyz, r7.wwww, r20.xyzx, r23.xyzx
          iadd r6.w, r6.w, l(1)
          mov r3.x, r8.x
        endloop 
      endif 
    endif 
  endif 
  ld_indexable(texture2d)(float,float,float,float) r2.xyzw, r0.xyzw, t18.xyzw
  ld_structured_indexable(structured_buffer, stride=16)(mixed,mixed,mixed,mixed) r0.z, l(0), l(12), t3.xxxx
  mul r1.yzw, r0.zzzz, r2.xxyz
  mad_sat r0.z, r3.w, cb3[0].x, cb3[0].y
  mul r0.z, r0.z, cb3[0].z
  mul r0.z, r3.y, r0.z
  mad r1.yzw, r1.zzzz, r0.zzzz, r1.yyzw
  and r0.z, r13.x, l(0x3e800000)
  mov r8.yzw, -r5.wwyx
  mul r2.xyz, r3.wwww, r8.wyzw
  mad r11.xzw, r8.wwyz, r3.wwww, r45.xxyz
  mov r8.x, l(1.000000)
  dp4 r16.x, cb0[38].xyzw, r8.xyzw
  dp4 r16.y, cb0[37].xyzw, r8.xyzw
  dp4 r16.z, cb0[36].xyzw, r8.xyzw
  max r15.xzw, r16.xxyz, l(0.000000, 0.000000, 0.000000, 0.000000)
  mad r3.xy, r11.zxzz, cb4[0].yxyy, cb4[0].wzww
  sample_l_indexable(texture2d)(float,float,float,float) r0.w, r3.xyxx, t6.xzwy, s3, l(0.000000)
  mad r0.w, r0.w, cb4[2].x, cb4[2].y
  add r0.w, -r0.w, r11.w
  mul_sat r0.w, -r0.w, cb5[18].x
  sqrt r0.w, r0.w
  dp2 r2.x, r2.xyxx, r2.xyxx
  mad r2.x, cb4[1].x, r2.x, cb4[1].y
  mul_sat r2.x, r2.x, l(3.000000)
  mul r0.w, r0.w, r2.x
  dp4 r16.x, cb5[15].xyzw, r8.xyzw
  dp4 r16.y, cb5[16].xyzw, r8.xyzw
  dp4 r16.z, cb5[17].xyzw, r8.xyzw
  max r8.xyz, r16.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
  mad r8.xyz, r8.xyzx, cb0[56].xxxx, -r15.xzwx
  mad r8.xyz, r0.wwww, r8.xyzx, r15.xzwx
  mad_sat r0.w, r3.w, cb0[35].y, cb0[35].x
  mul r2.x, r2.z, cb0[39].y
  max r2.x, r2.x, l(-125.000000)
  lt r2.y, l(0.000001), |r2.x|
  exp r2.z, -r2.x
  add r2.z, -r2.z, l(1.000000)
  div r2.x, r2.z, r2.x
  movc r2.x, r2.y, r2.x, l(1.000000)
  mad r2.x, r2.x, cb0[39].x, cb0[35].w
  mul r0.w, r0.w, r2.x
  mul r0.w, r0.w, -cb0[35].z
  exp r0.w, r0.w
  mad r2.xyz, -r8.xyzx, r0.wwww, r8.xyzx
  movc r3.xyw, r13.zzzz, r6.xyxz, r4.xyxz
  mul r4.xyz, r10.xyzx, r5.xywx
  mad r4.xyz, r5.ywxy, r10.zxyz, -r4.xyzx
  mul r6.xyz, r4.xyzx, r10.xyzx
  mad r4.xyz, r10.yzxy, r4.zxyz, -r6.xyzx
  add r4.xyz, -r3.xywx, r4.xyzx
  mad r3.xyw, r12.xxxx, r4.xyxz, r3.xyxw
  dp3 r4.x, r3.xywx, r3.xywx
  rsq r4.x, r4.x
  mul r3.xyw, r3.xyxw, r4.xxxx
  dp3 r4.x, r3.xywx, r5.xywx
  add r4.x, r4.x, r4.x
  mad r3.xyw, -r4.xxxx, r3.xyxw, r5.xyxw
  mov r3.xyw, -r3.xyxw
  sample_l_indexable(texturecube)(float,float,float,float) r3.xyw, r3.xywx, t0.xywz, s0, r12.w
  ld_structured_indexable(structured_buffer, stride=132)(mixed,mixed,mixed,mixed) r6.xyzw, l(0), l(108), t4.xywz
  dp3 r4.x, r6.xywx, l(0.212600, 0.715200, 0.072200, 0.000000)
  ld_structured_indexable(structured_buffer, stride=132)(mixed,mixed,mixed,mixed) r6.xy, l(0), l(124), t4.xyxx
  dp3 r4.y, r6.zxyz, l(0.212600, 0.715200, 0.072200, 0.000000)
  max r4.x, r4.y, r4.x
  ld_structured_indexable(structured_buffer, stride=132)(mixed,mixed,mixed,mixed) r4.y, l(0), l(0), t4.xxxx
  ld_structured_indexable(structured_buffer, stride=132)(mixed,mixed,mixed,mixed) r4.z, l(0), l(36), t4.xxxx
  ld_structured_indexable(structured_buffer, stride=132)(mixed,mixed,mixed,mixed) r5.x, l(0), l(72), t4.xxxx
  max r4.z, r4.z, r5.x
  max r4.y, r4.z, r4.y
  add r4.x, r4.y, r4.x
  add r4.x, r4.x, l(-1.000000)
  mad r4.x, cb0[55].w, r4.x, l(1.000000)
  mul r3.xyw, r3.xyxw, r4.xxxx
  mad r3.xyw, r3.xyxw, cb0[50].xyxz, cb0[49].xyxz
  mad r4.x, |r4.w|, 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 r3.xyz, r3.xywx, r4.xyzx
  movc r3.w, r13.x, l(0.750000), l(1.000000)
  mad_sat r0.z, r2.w, r3.w, r0.z
  mul r2.w, r0.z, r5.z
  movc r3.w, r15.y, l(1.200000), cb3[5].x
  add r4.x, r0.z, l(-1.000000)
  mad_sat r3.w, r3.w, r4.x, l(1.000000)
  mul r4.xyz, r1.yzwy, r2.wwww
  mad r5.xyz, r21.xyzx, r3.wwww, r4.xyzx
  mad r4.xyz, r23.xyzx, r3.wwww, r4.xyzx
  dp3 r2.w, r4.xyzx, l(0.212600, 0.715200, 0.072200, 0.000000)
  mul r4.xyz, r9.xxxx, r22.xyzx
  dp3 r1.y, r1.yzwy, l(0.212600, 0.715200, 0.072200, 0.000000)
  mul r1.yzw, r1.yyyy, r3.xxyz
  mul r1.yzw, r9.yyyy, r1.yyzw
  mul r1.yzw, r0.zzzz, r1.yyzw
  mad r0.z, r9.z, l(256.000000), l(1.000000)
  mul r1.yzw, r0.zzzz, r1.yyzw
  add r0.z, -r12.y, l(1.000000)
  mul r3.xyz, r5.xyzx, r14.xyzx
  mul r3.xyz, r0.zzzz, r3.xyzx
  mad r1.yzw, r4.xxyz, r3.wwww, r1.yyzw
  mad r0.z, cb1[8].w, r11.y, cb0[55].y
  exp r0.z, r0.z
  mul r0.z, r0.z, l(0.000183015567)
  mad r3.xyz, r14.xyzx, r0.zzzz, r3.xyzx
  add r1.yzw, r1.yyzw, r3.xxyz
  mad r1.yzw, r1.yyzw, r0.wwww, r2.xxyz
  ld_structured_indexable(structured_buffer, stride=16)(mixed,mixed,mixed,mixed) r0.z, l(0), l(0), t3.xxxx
  mul r1.yzw, r0.zzzz, r1.yyzw
  max r1.yzw, r1.yyzw, l(0.000000, 0.0000610351999, 0.0000610351999, 0.0000610351999)
  min r1.yzw, r1.yyzw, l(0.000000, 8192.000000, 8192.000000, 8192.000000)
  lt r0.w, l(0.500000), cb3[1].x
  movc r3.xyz, r0.wwww, r14.xyzx, r1.yzwy
  dp3 r0.w, r5.xyzx, l(0.212600, 0.715200, 0.072200, 0.000000)
  movc r0.w, cb3[5].z, r0.w, r2.w
  mul r0.z, r0.z, r0.w
  max r0.z, r0.z, l(0.0000610351999)
  min r3.w, r0.z, l(8192.000000)
  ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r0.z, r1.x, l(0), t15.xxxx
  and r0.z, r0.z, l(0x0000ffff)
  ult r0.w, r0.z, l(64)
  and r0.z, r0.z, r0.w
  ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r0.w, r1.x, l(0), t16.xxxx
  and r0.w, r0.w, l(0x0000ffff)
  ult r1.x, r0.w, l(64)
  and r0.w, r0.w, r1.x
  ftou r1.x, cb3[5].y
  umin r1.x, r1.x, l(3)
  uge r1.y, r1.x, l(2)
  movc r0.z, r1.y, r0.w, r0.z
  umin r0.z, r0.z, l(32)
  if_nz r0.z
    ishl r0.z, r0.z, l(5)
    iadd r0.z, r0.z, l(-32)
    ishl r0.w, r1.x, l(5)
    resinfo_indexable(texture2d)(float,float,float,float)_uint r1.xy, l(0), t5.xyzw
    iadd r1.xy, r1.xyxx, l(-1, -1, 0, 0)
    imin r2.xy, r0.zwzz, r1.xyxx
    mov r2.zw, l(0,0,0,0)
    ld_indexable(texture2d)(float,float,float,float) r1.xyz, r2.xyzw, t5.xyzw
  else 
    mov r1.xyz, l(0,0,0,0)
  endif 
  mov r1.w, l(0)
  add r1.xyzw, r1.xyzw, r3.xyzw
  store_uav_typed u0.xyzw, r0.xyyy, r1.xyzw
endif 
ret 
// Approximately 2104 instruction slots used