// asmtool.py -i --fix-fcprimal-physical-lighting --only-autofixed -f bcfaa5a4c5c59664-cs.txt
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
//   using 3Dmigoto v1.2.31 on Wed Mar 02 08:07:13 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
//   float4 SunDirection;               // Offset:   64 Size:    16
//   float DirectLightOcclusion;        // Offset:   80 Size:     4
//   float LightingDebugLineToUse;      // Offset:   84 Size:     4
//   bool ExposureLocalLights;          // Offset:   88 Size:     4
//   float SunExposureFactor;           // Offset:   92 Size:     4
//
// }
//
// cbuffer CSceneTerrainSkyOcclusionAtlasPrivateData
// {
//
//   float4 SectorOcclusion_OffsetScale;// Offset:    0 Size:    16
//   float3 SectorOcclusion_DistanceFade;// Offset:   16 Size:    12
//   float2 SectorOcclusion_HeightOffsetScale;// Offset:   32 Size:     8
//
// }
//
// cbuffer CAmbientProvider
// {
//
//   float4 CascadeDistanceScales[5];   // Offset:    0 Size:    80 [unused]
//   float4 CascadeNearFarSnappedOffsetCamera[5];// Offset:   80 Size:    80 [unused]
//   float4 CascadeNearFarRcpUVSize[5]; // Offset:  160 Size:    80 [unused]
//   float4 UndergroundSHR;             // Offset:  240 Size:    16
//   float4 UndergroundSHG;             // Offset:  256 Size:    16
//   float4 UndergroundSHB;             // Offset:  272 Size:    16
//   float InvUndergroundBlendEndHeight;// Offset:  288 Size:     4
//   float IndirectLightingScale;       // Offset:  292 Size:     4 [unused]
//
// }
//
// Resource bind info for ExposureBuffer
// {
//
//   float4 $Element;                   // Offset:    0 Size:    16
//
// }
//
// Resource bind info for SkyParamBuffer
// {
//
//   struct ComputedSkyParameters
//   {
//       
//       float r[9];                    // Offset:    0
//       float g[9];                    // Offset:   36
//       float b[9];                    // Offset:   72
//       float3 sunColor;               // Offset:  108
//       float3 moonColor;              // Offset:  120
//
//   } $Element;                        // Offset:    0 Size:   132
//
// }
//
// Resource 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
// DeferredLighting_DeferredShadowTexture    texture  float4          2d    5        1
// LightingDebugNumLightsTexture     texture  float4          2d    6        1
// SectorOcclusion_HeightTexture__TexObj__    texture  float4          2d    7        1
// GBufferT0                         texture  float4          2d    8        1
// GBufferT1                         texture  float4          2d    9        1
// GBufferT2                         texture  float4          2d   10        1
// GBufferT3                         texture  float4          2d   11        1
// Depth                             texture   float          2d   12        1
// LightsLightingData                texture  struct         r/o   13        1
// ShadowData                        texture  struct         r/o   14        1
// LightIndicesPerTile               texture  struct         r/o   15        1
// LightOutputPerTile                texture  struct         r/o   16        1
// LightOutputPerTileForBlended      texture  struct         r/o   17        1
// SkinDiffusePreIntegrated__TexObj__    texture  float4          2d   18        1
// DeferredAmbientTexture__TexObj__    texture  float4          2d   19        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_texture2d (float,float,float,float) t12
dcl_resource_structured t13, 128 
dcl_resource_structured t14, 96 
dcl_resource_structured t15, 4 
dcl_resource_structured t16, 4 
dcl_resource_structured t17, 4 
dcl_resource_texture2d (float,float,float,float) t18
dcl_resource_texture2d (float,float,float,float) t19
dcl_uav_typed_texture2d (float,float,float,float) u0
dcl_input vThreadGroupID.xy
dcl_input vThreadIDInGroup.xy
dcl_temps 52
dcl_thread_group 8, 8, 1

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

ld_indexable(texture2d)(float,float,float,float) r49.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 bcfaa5a4c5c59664-cs.txt
mul r50.x, r49.x, r49.y
mul r50.x, r50.x, cb0[0].x
mov r50.yzw, l(0.0)
dp4 r51.x, r50.xyzw, cb0[4].xyzw
dp4 r51.y, r50.xyzw, cb0[5].xyzw
dp4 r51.z, r50.xyzw, cb0[6].xyzw
mov r50.xyzw, cb0[42].xyzw
add r50.xyz, r50.xyz, r51.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, t12.yzxw

// Use DepthScale & CameraDistances.z to get world Z:
mad r49.z, r2.z, cb0[33].y, cb0[33].x
div r49.z, l(1.0), r49.z
mul r49.z, r49.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 bcfaa5a4c5c59664-cs.txt
add r49.w, r49.z, -r49.y
div r49.w, r49.w, r49.z
mad r2.x, r49.w, -r49.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, t8.xyzw
  ld_indexable(texture2d)(float,float,float,float) r4.xyzw, r0.xyww, t9.xyzw
  ld_indexable(texture2d)(float,float,float,float) r5.xyzw, r0.xyww, t10.xyzw
  ld_indexable(texture2d)(float,float,float,float) r6.xyzw, r0.xyww, t11.ywzx
  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, t8.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, t8.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, t8.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, t8.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_sat r4.w, r4.xyzx, r4.xyzx
  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.xy, r9.xyxx, l(0.0666666701, 0.333333343, 0.000000, 0.000000)
  mad r12.xyz, r6.xyzx, 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.z, r5.w
  mov r6.xy, l(1.000000,0,0,0)
  movc r14.xw, r13.wwww, r6.xxxz, r6.zzzy
  mov r14.yz, l(0,0,0,0)
  movc r14.xyzw, r13.zzzz, r6.zywy, 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.yw, l(0,0,0,1.000000)
  movc r14.xz, r13.yyyy, r6.zzwz, r14.xxyx
  movc r12.xyz, r13.xxxx, r4.xyzx, r12.xyzx
  mov r6.xy, l(0,0.150000,0,0)
  mov r14.y, r9.x
  movc r6.xyz, r13.xxxx, r6.xyzx, r14.xywx
  mov r11.z, r9.y
  mov r11.w, l(0)
  mov r14.xy, r5.yxyy
  movc r9.xyz, r13.xxxx, r11.yzwy, r14.xxzx
  mov r14.xzw, l(0,0,0,0)
  mov r15.x, r11.x
  movc r11.xyzw, r13.xxxx, r14.xyzw, r15.xyzw
  add r5.xyw, -r2.xzxy, r50.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 r14.xy, -r3.zzzz, l(0.990000, 6.000000, 0.000000, 0.000000), l(1.000000, 6.000000, 0.000000, 0.000000)
  mul r6.w, r6.z, l(255.000000)
  mad r7.w, -r6.x, l(0.990000), l(1.000000)
  sqrt r7.w, r7.w
  mul r8.x, r14.x, r14.x
  div r9.w, r8.x, r7.w
  max r9.w, r9.w, l(0.001000)
  mul r7.w, r7.w, r8.x
  max r7.w, r7.w, l(0.001000)
  add r10.w, r11.w, r11.w
  dp3 r15.x, r8.ywzy, r5.xywx
  dp3 r15.y, r10.zxyz, r5.xywx
  mov_sat r11.w, r4.w
  movc r12.w, r13.w, |r4.w|, r11.w
  mul r14.xz, r15.xxyx, r15.xxyx
  mul r13.y, r9.w, r9.w
  mul r14.w, r7.w, r7.w
  mul r14.z, r14.z, r14.w
  mad r14.x, r13.y, r14.x, r14.z
  mad r12.w, r12.w, r12.w, r14.x
  sqrt r12.w, r12.w
  mad r6.y, r6.y, l(0.082000), l(0.018000)
  mad r7.xyz, r7.xyzx, r7.xyzx, -r6.yyyy
  mad r7.xyz, r11.xxxx, r7.xyzx, r6.yyyy
  add r11.x, -r11.x, l(1.000000)
  mul r15.xyz, r1.yzwy, r11.xxxx
  ieq r14.xz, r3.xxxx, l(2, 0, 6, 0)
  if_nz r14.x
    ld_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r3.x, r0.xyww, t5.xyzw
    max r3.x, r3.x, cb3[1].y
    dp3_sat r11.x, -r4.xzyx, cb3[4].xyzx
    add r14.x, r11.w, r11.x
    mad r14.x, -r11.x, r11.w, r14.x
    max r14.x, r14.x, l(0.010000)
    div r14.x, l(1.000000, 1.000000, 1.000000, 1.000000), r14.x
    add r16.xyz, r5.xwyx, -cb3[4].xyzx
    dp3 r15.w, r16.xyzx, r16.xyzx
    rsq r15.w, r15.w
    mul r16.xyz, r15.wwww, r16.xyzx
    dp3 r15.w, r16.xzyx, r5.xywx
    add r15.w, -r15.w, l(1.000000)
    mul r16.w, r15.w, r15.w
    mul r16.w, r16.w, r16.w
    mul r15.w, r15.w, r16.w
    add r17.xyz, -r7.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
    mad r18.xyz, r17.xyzx, r15.wwww, r7.xyzx
    dp3_sat r15.w, r4.xzyx, -cb3[4].xyzx
    mul r19.xyz, r15.wwww, cb3[3].xyzx
    mul r19.xyz, r3.xxxx, r19.xyzx
    mul r18.xyz, r3.xxxx, r18.xyzx
    mul r18.xyz, r11.xxxx, r18.xyzx
    mul r18.xyz, r14.xxxx, r18.xyzx
    dp3_sat r3.x, r16.xzyx, r4.xyzx
    mul r3.x, r3.x, r3.x
    min r3.x, r3.x, l(0.999999)
    add r11.x, -r3.x, l(1.000000)
    div r3.x, r3.x, r11.x
    mul r11.x, r11.x, r11.x
    mul r14.x, r8.x, r8.x
    mad r14.x, r14.x, l(4.000000), l(1.000000)
    div r14.x, l(1.000000, 1.000000, 1.000000, 1.000000), r14.x
    mad r15.w, r8.x, r8.x, l(0.000001)
    div r3.x, -r3.x, r15.w
    mul r3.x, r3.x, l(1.442695)
    exp r3.x, r3.x
    mul r3.x, r3.x, l(4.000000)
    div r3.x, r3.x, r11.x
    add r3.x, r3.x, l(1.000000)
    mul r3.x, r3.x, r14.x
    mul r16.xyz, r3.xxxx, cb3[3].xyzx
    mul r16.xyz, r16.xyzx, r18.xyzx
    mul r18.xyz, r19.xyzx, cb3[5].wwww
    ishl r3.x, r1.x, l(1)
    ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r3.x, r3.x, l(0), t15.xxxx
    countbits r11.x, r3.x
    ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r16.w, r1.x, l(0), t16.xxxx
    and r16.w, r16.w, l(0x60000000)
    ine r16.w, r16.w, l(0)
    mov r2.w, l(1.000000)
    mov r20.xyz, r19.xyzx
    mov r21.xyz, r16.xyzx
    mov r22.xyz, r18.xyzx
    mov r17.w, r3.x
    mov r18.w, l(0)
    loop 
      uge r19.w, r18.w, r11.x
      breakc_nz r19.w
      firstbit_lo r19.w, r17.w
      ishl r20.w, l(1), r19.w
      not r20.w, r20.w
      and r20.w, r17.w, r20.w
      ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r23.xyzw, r19.w, l(0), t13.xyzw
      ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r24.xyz, r19.w, l(32), t13.xyzx
      ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r25.xyzw, r19.w, l(48), t13.xyzw
      and r21.w, r25.w, l(1)
      ult r21.w, l(0), r21.w
      add r23.xyz, -r2.xyzx, r23.xyzx
      dp3 r22.w, r23.xyzx, r23.xyzx
      max r22.w, r22.w, l(0.000010)
      rsq r24.w, r22.w
      div r26.x, l(1.000000, 1.000000, 1.000000, 1.000000), r22.w
      min r23.w, r23.w, r26.x
      mul r26.xyz, r23.xyzx, r24.wwww
      mul r22.w, r22.w, r22.w
      mad_sat r22.w, -r22.w, r25.x, l(1.000000)
      mul r22.w, r22.w, r22.w
      mul r22.w, r22.w, r23.w
      dp3 r23.w, r26.xyzx, -r24.xyzx
      mad_sat r23.w, r23.w, r25.y, r25.z
      movc r23.w, r21.w, r23.w, l(1.000000)
      mul r23.w, r23.w, r23.w
      mul r24.xyz, r22.wwww, r23.wwww
      lt r22.w, r24.z, l(0.000100)
      iadd r23.w, r18.w, -r22.w
      mov r17.w, r20.w
      mov r18.w, r23.w
      continuec_nz r22.w
      ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r25.xyz, r19.w, l(16), t13.xyzx
      and r19.w, r25.w, l(2)
      ult r19.w, l(0), r19.w
      and r21.w, r16.w, r21.w
      if_nz r21.w
        and r27.xy, r25.wwww, l(32, 16, 0, 0)
        ult r27.yz, l(0, 0, 0, 0), r27.xxyx
        ushr r21.w, r25.w, l(5)
        and r21.w, r21.w, l(2)
        or r22.w, r27.z, r27.y
        and r22.w, r16.w, r22.w
        if_nz r22.w
          ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r28.xyzw, r21.w, l(0), t14.xyzw
          ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r29.xyzw, r21.w, l(16), t14.xyzw
          ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r30.xyzw, r21.w, l(32), t14.xyzw
          ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r31.xyzw, r21.w, l(48), t14.xyzw
          ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r32.xyzw, r21.w, l(64), t14.xyzw
          ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r33.xyzw, r21.w, l(80), t14.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, r2.xyzw, r29.xyzw
        dp4 r29.y, r2.xyzw, r30.xyzw
        dp4 r22.w, r2.xyzw, r31.xyzw
        dp4 r23.w, r2.xyzw, r32.xyzw
        max r23.w, r23.w, l(0.000010)
        div r27.yw, r29.xxxy, r23.wwww
        if_z r21.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 r23.w, r28.x, r30.w
          add r32.x, r23.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 r23.w, r28.y, r34.w
          add r36.y, r23.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) r23.w, r38.xyxx, t2.xxxx, s4, r22.w
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r25.w, r38.zwzz, t2.xxxx, s4, r22.w
          mul r25.w, r25.w, r37.y
          mad r23.w, r37.x, r23.w, r25.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) r25.w, r28.xyxx, t2.xxxx, s4, r22.w
          mad r23.w, r38.x, r25.w, r23.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) r25.w, r28.xyxx, t2.xxxx, s4, r22.w
          mad r23.w, r38.y, r25.w, r23.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) r25.w, r39.xyxx, t2.xxxx, s4, r22.w
          mad r23.w, r37.z, r25.w, r23.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) r25.w, r40.xyxx, t2.xxxx, s4, r22.w
          mad r23.w, r37.w, r25.w, r23.w
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r25.w, r40.zwzz, t2.xxxx, s4, r22.w
          mad r23.w, r38.z, r25.w, r23.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) r25.w, r37.xyxx, t2.xxxx, s4, r22.w
          mad r23.w, r38.w, r25.w, r23.w
          mul r38.xyzw, r30.zxzx, -r34.yyww
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r25.w, r39.zwzz, t2.xxxx, s4, r22.w
          mad r23.w, r38.x, r25.w, r23.w
          mad r39.xyzw, r31.xwzw, r28.zwzw, r29.xyxy
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r25.w, r39.xyxx, t2.xxxx, s4, r22.w
          mad r23.w, r38.y, r25.w, r23.w
          mul r30.xyzw, r30.ywyw, r34.yyww
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r25.w, r39.zwzz, t2.xxxx, s4, r22.w
          mad r23.w, r30.x, r25.w, r23.w
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r25.w, r37.zwzz, t2.xxxx, s4, r22.w
          mad r23.w, r30.y, r25.w, r23.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) r25.w, r28.xyxx, t2.xxxx, s4, r22.w
          mad r23.w, r38.z, r25.w, r23.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) r25.w, r31.xyxx, t2.xxxx, s4, r22.w
          mad r23.w, r38.w, r25.w, r23.w
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r25.w, r31.zwzz, t2.xxxx, s4, r22.w
          mad r23.w, r30.z, r25.w, r23.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) r22.w, r28.xyxx, t2.xxxx, s4, r22.w
          mad r22.w, r30.w, r22.w, r23.w
          mul r22.w, r22.w, l(0.000369822490)
        else 
          mov r22.w, l(1.000000)
        endif 
        mul r22.w, r22.w, r24.z
        if_nz r27.x
          if_z r21.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, r22.wwww, r27.xywx
      endif 
      mul r24.xyz, r25.xyzx, r24.xyzx
      dp3_sat r21.w, r12.xzyx, r26.xyzx
      mad r20.xyz, r21.wwww, r24.xyzx, r20.xyzx
      mad r23.xyz, r23.xyzx, r24.wwww, r5.xwyx
      dp3 r22.w, r23.xyzx, r23.xyzx
      rsq r22.w, r22.w
      mul r23.xyz, r22.wwww, r23.xyzx
      dp3 r22.w, r23.xzyx, r5.xywx
      add r22.w, -r22.w, l(1.000000)
      mul r23.w, r22.w, r22.w
      mul r23.w, r23.w, r23.w
      mul r22.w, r22.w, r23.w
      mad r25.xyz, r17.xyzx, r22.wwww, r7.xyzx
      dp3_sat r22.w, r4.xzyx, r26.xyzx
      add r23.w, r11.w, r22.w
      mad r23.w, -r22.w, r11.w, r23.w
      max r23.w, r23.w, l(0.010000)
      div r23.w, l(1.000000, 1.000000, 1.000000, 1.000000), r23.w
      mul r25.xyz, r23.wwww, r25.xyzx
      mul r25.xyz, r22.wwww, r25.xyzx
      dp3_sat r22.w, r23.xzyx, r4.xyzx
      mul r22.w, r22.w, r22.w
      min r22.w, r22.w, l(0.999999)
      add r23.x, -r22.w, l(1.000000)
      div r22.w, r22.w, r23.x
      mul r23.x, r23.x, r23.x
      div r22.w, -r22.w, r15.w
      mul r22.w, r22.w, l(1.442695)
      exp r22.w, r22.w
      mul r22.w, r22.w, l(4.000000)
      div r22.w, r22.w, r23.x
      add r22.w, r22.w, l(1.000000)
      mul r22.w, r14.x, r22.w
      mul r23.xyz, r22.wwww, r24.xyzx
      mad r21.xyz, r25.xyzx, r23.xyzx, r21.xyzx
      mad r23.xyz, r21.wwww, r24.xyzx, r22.xyzx
      movc r22.xyz, r19.wwww, r23.xyzx, r22.xyzx
      iadd r18.w, r18.w, l(1)
      mov r17.w, r20.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), t15.xxxx
    countbits r3.x, r2.w
    mov r18.xyz, r2.xyzx
    mov r18.w, l(1.000000)
    mov r16.xyz, r20.xyzx
    mov r19.xyz, r21.xyzx
    mov r23.xyz, r22.xyzx
    mov r11.x, r2.w
    mov r17.w, l(0)
    loop 
      uge r19.w, r17.w, r3.x
      breakc_nz r19.w
      firstbit_lo r19.w, r11.x
      ishl r20.w, l(1), r19.w
      not r20.w, r20.w
      and r20.w, r11.x, r20.w
      iadd r19.w, l(32), r19.w
      ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r24.xyzw, r19.w, l(0), t13.xyzw
      ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r25.xyz, r19.w, l(32), t13.xyzx
      ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r26.xyzw, r19.w, l(48), t13.xyzw
      and r21.w, r26.w, l(1)
      ult r21.w, l(0), r21.w
      add r24.xyz, -r2.xyzx, r24.xyzx
      dp3 r22.w, r24.xyzx, r24.xyzx
      max r22.w, r22.w, l(0.000010)
      rsq r23.w, r22.w
      div r25.w, l(1.000000, 1.000000, 1.000000, 1.000000), r22.w
      min r24.w, r24.w, r25.w
      mul r27.xyz, r23.wwww, r24.xyzx
      mul r22.w, r22.w, r22.w
      mad_sat r22.w, -r22.w, r26.x, l(1.000000)
      mul r22.w, r22.w, r22.w
      mul r22.w, r22.w, r24.w
      dp3 r24.w, r27.xyzx, -r25.xyzx
      mad_sat r24.w, r24.w, r26.y, r26.z
      movc r24.w, r21.w, r24.w, l(1.000000)
      mul r24.w, r24.w, r24.w
      mul r25.xyz, r22.wwww, r24.wwww
      lt r22.w, r25.z, l(0.000100)
      iadd r24.w, r17.w, -r22.w
      mov r11.x, r20.w
      mov r17.w, r24.w
      continuec_nz r22.w
      ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r26.xyz, r19.w, l(16), t13.xyzx
      and r19.w, r26.w, l(2)
      ult r19.w, l(0), r19.w
      and r21.w, r16.w, r21.w
      if_nz r21.w
        and r28.xy, r26.wwww, l(32, 16, 0, 0)
        ult r28.yz, l(0, 0, 0, 0), r28.xxyx
        ushr r21.w, r26.w, l(5)
        and r21.w, r21.w, l(2)
        or r22.w, r28.z, r28.y
        and r22.w, r16.w, r22.w
        if_nz r22.w
          ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r29.xyzw, r21.w, l(0), t14.xyzw
          ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r30.xyzw, r21.w, l(16), t14.xyzw
          ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r31.xyzw, r21.w, l(32), t14.xyzw
          ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r32.xyzw, r21.w, l(48), t14.xyzw
          ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r33.xyzw, r21.w, l(64), t14.xyzw
          ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r34.xyzw, r21.w, l(80), t14.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, r18.xyzw, r30.xyzw
        dp4 r30.y, r18.xyzw, r31.xyzw
        dp4 r22.w, r18.xyzw, r32.xyzw
        dp4 r24.w, r18.xyzw, r33.xyzw
        max r24.w, r24.w, l(0.000010)
        div r28.yw, r30.xxxy, r24.wwww
        if_z r21.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 r24.w, r29.x, r31.w
          add r33.x, r24.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 r24.w, r29.y, r35.w
          add r37.y, r24.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) r24.w, r39.xyxx, t2.xxxx, s4, r22.w
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r25.w, r39.zwzz, t2.xxxx, s4, r22.w
          mul r25.w, r25.w, r38.y
          mad r24.w, r38.x, r24.w, r25.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) r25.w, r29.xyxx, t2.xxxx, s4, r22.w
          mad r24.w, r39.x, r25.w, r24.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) r25.w, r29.xyxx, t2.xxxx, s4, r22.w
          mad r24.w, r39.y, r25.w, r24.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) r25.w, r40.xyxx, t2.xxxx, s4, r22.w
          mad r24.w, r38.z, r25.w, r24.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) r25.w, r41.xyxx, t2.xxxx, s4, r22.w
          mad r24.w, r38.w, r25.w, r24.w
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r25.w, r41.zwzz, t2.xxxx, s4, r22.w
          mad r24.w, r39.z, r25.w, r24.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) r25.w, r38.xyxx, t2.xxxx, s4, r22.w
          mad r24.w, r39.w, r25.w, r24.w
          mul r39.xyzw, r31.zxzx, -r35.yyww
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r25.w, r40.zwzz, t2.xxxx, s4, r22.w
          mad r24.w, r39.x, r25.w, r24.w
          mad r40.xyzw, r32.xwzw, r29.zwzw, r30.xyxy
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r25.w, r40.xyxx, t2.xxxx, s4, r22.w
          mad r24.w, r39.y, r25.w, r24.w
          mul r31.xyzw, r31.ywyw, r35.yyww
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r25.w, r40.zwzz, t2.xxxx, s4, r22.w
          mad r24.w, r31.x, r25.w, r24.w
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r25.w, r38.zwzz, t2.xxxx, s4, r22.w
          mad r24.w, r31.y, r25.w, r24.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) r25.w, r29.xyxx, t2.xxxx, s4, r22.w
          mad r24.w, r39.z, r25.w, r24.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) r25.w, r32.xyxx, t2.xxxx, s4, r22.w
          mad r24.w, r39.w, r25.w, r24.w
          sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r25.w, r32.zwzz, t2.xxxx, s4, r22.w
          mad r24.w, r31.z, r25.w, r24.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) r22.w, r29.xyxx, t2.xxxx, s4, r22.w
          mad r22.w, r31.w, r22.w, r24.w
          mul r22.w, r22.w, l(0.000369822490)
        else 
          mov r22.w, l(1.000000)
        endif 
        mul r22.w, r22.w, r25.z
        if_nz r28.x
          if_z r21.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, r22.wwww, r28.xywx
      endif 
      mul r25.xyz, r26.xyzx, r25.xyzx
      dp3_sat r21.w, r12.xzyx, r27.xyzx
      mad r16.xyz, r21.wwww, r25.xyzx, r16.xyzx
      mad r24.xyz, r24.xyzx, r23.wwww, r5.xwyx
      dp3 r22.w, r24.xyzx, r24.xyzx
      rsq r22.w, r22.w
      mul r24.xyz, r22.wwww, r24.xyzx
      dp3 r22.w, r24.xzyx, r5.xywx
      add r22.w, -r22.w, l(1.000000)
      mul r23.w, r22.w, r22.w
      mul r23.w, r23.w, r23.w
      mul r22.w, r22.w, r23.w
      mad r26.xyz, r17.xyzx, r22.wwww, r7.xyzx
      dp3_sat r22.w, r4.xzyx, r27.xyzx
      add r23.w, r11.w, r22.w
      mad r23.w, -r22.w, r11.w, r23.w
      max r23.w, r23.w, l(0.010000)
      div r23.w, l(1.000000, 1.000000, 1.000000, 1.000000), r23.w
      mul r26.xyz, r23.wwww, r26.xyzx
      mul r26.xyz, r22.wwww, r26.xyzx
      dp3_sat r22.w, r24.xzyx, r4.xyzx
      mul r22.w, r22.w, r22.w
      min r22.w, r22.w, l(0.999999)
      add r23.w, -r22.w, l(1.000000)
      div r22.w, r22.w, r23.w
      mul r23.w, r23.w, r23.w
      div r22.w, -r22.w, r15.w
      mul r22.w, r22.w, l(1.442695)
      exp r22.w, r22.w
      mul r22.w, r22.w, l(4.000000)
      div r22.w, r22.w, r23.w
      add r22.w, r22.w, l(1.000000)
      mul r22.w, r14.x, r22.w
      mul r24.xyz, r22.wwww, r25.xyzx
      mad r19.xyz, r26.xyzx, r24.xyzx, r19.xyzx
      mad r24.xyz, r21.wwww, r25.xyzx, r23.xyzx
      movc r23.xyz, r19.wwww, r24.xyzx, r23.xyzx
      iadd r17.w, r17.w, l(1)
      mov r11.x, r20.w
    endloop 
    mov r17.xyz, l(0,0,0,0)
  else 
    if_nz r13.z
      ld_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r2.w, r0.xyww, t5.yzwx
      max r2.w, r2.w, cb3[1].y
      dp3_sat r3.x, r12.xzyx, -cb3[4].xyzx
      add r18.xyz, -r4.xzyx, r12.xzyx
      mad r20.xyz, r18.xyzx, l(0.100000, 0.100000, 0.100000, 0.000000), r4.xzyx
      dp3 r11.x, r20.xyzx, r20.xyzx
      rsq r11.x, r11.x
      mul r20.xyz, r11.xxxx, r20.xyzx
      mad r18.xyz, r18.xyzx, l(0.300000, 0.300000, 0.300000, 0.000000), r4.xzyx
      dp3 r11.x, r18.xyzx, r18.xyzx
      rsq r11.x, r11.x
      mul r18.xyz, r11.xxxx, r18.xyzx
      dp3 r11.x, r4.xzyx, -cb3[4].xyzx
      dp3 r14.x, r20.xyzx, -cb3[4].xyzx
      dp3 r15.w, r18.xyzx, -cb3[4].xyzx
      mad r21.z, r11.x, l(0.500000), l(0.500000)
      mov r21.w, r11.z
      mad r11.xz, r21.zzwz, l(0.984375, 0.000000, 0.984375, 0.000000), l(0.00781250000, 0.000000, 0.00781250000, 0.000000)
      sample_l_indexable(texture2d)(float,float,float,float) r22.x, r11.xzxx, t18.xyzw, s5, l(0.000000)
      mad r21.y, r14.x, l(0.500000), l(0.500000)
      mad r11.xz, r21.yywy, l(0.984375, 0.000000, 0.984375, 0.000000), l(0.00781250000, 0.000000, 0.00781250000, 0.000000)
      sample_l_indexable(texture2d)(float,float,float,float) r22.y, r11.xzxx, t18.xyzw, s5, l(0.000000)
      mad r21.x, r15.w, l(0.500000), l(0.500000)
      mad r11.xz, r21.xxwx, l(0.984375, 0.000000, 0.984375, 0.000000), l(0.00781250000, 0.000000, 0.00781250000, 0.000000)
      sample_l_indexable(texture2d)(float,float,float,float) r22.z, r11.xzxx, t18.xyzw, s5, l(0.000000)
      add r24.xyz, r5.xwyx, -cb3[4].xyzx
      dp3 r11.x, r24.xyzx, r24.xyzx
      rsq r11.x, r11.x
      mul r24.xyz, r11.xxxx, r24.xyzx
      dp3 r11.x, r24.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
      add r25.xyz, -r7.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
      mad r26.xyz, r25.xyzx, r11.xxxx, r7.xyzx
      mul r11.x, r3.x, r3.x
      mul r11.z, r8.x, r8.x
      mad r14.x, -r8.x, r8.x, l(1.000000)
      mad r11.x, r11.x, r14.x, r11.z
      sqrt r11.x, r11.x
      mul r11.x, r11.x, r11.w
      mad r11.x, r3.x, r12.w, r11.x
      add r11.x, r11.x, r11.x
      max r11.x, r11.x, l(0.000100)
      div r11.x, l(1.000000, 1.000000, 1.000000, 1.000000), r11.x
      mul r27.xyz, r2.wwww, cb3[3].xyzx
      mul r22.xyz, r22.xyzx, r27.xyzx
      mul r26.xyz, r2.wwww, r26.xyzx
      mul r26.xyz, r3.xxxx, r26.xyzx
      mul r26.xyz, r11.xxxx, r26.xyzx
      dp3_sat r2.w, r24.xzyx, r12.xyzx
      mad r3.x, r8.x, r8.x, l(-1.000000)
      mul r2.w, r2.w, r2.w
      mad r2.w, r2.w, r3.x, l(1.000000)
      div r2.w, r8.x, r2.w
      mul r2.w, r2.w, r2.w
      mul r24.xyz, r2.wwww, cb3[3].xyzx
      mul r24.xyz, r24.xyzx, r26.xyzx
      mul r26.xyz, r22.xyzx, cb3[5].wwww
      ishl r2.w, r1.x, l(1)
      ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r2.w, r2.w, l(0), t15.xxxx
      countbits r11.x, r2.w
      ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r15.w, r1.x, l(0), t16.xxxx
      and r15.w, r15.w, l(0x60000000)
      ine r15.w, r15.w, l(0)
      mov r27.xyz, r2.xyzx
      mov r27.w, l(1.000000)
      mov r28.xyz, r22.xyzx
      mov r29.xyz, r24.xyzx
      mov r30.xyz, r26.xyzx
      mov r16.w, r2.w
      mov r17.w, l(0)
      loop 
        uge r18.w, r17.w, r11.x
        breakc_nz r18.w
        firstbit_lo r18.w, r16.w
        ishl r19.w, l(1), r18.w
        not r19.w, r19.w
        and r19.w, r16.w, r19.w
        ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r31.xyzw, r18.w, l(0), t13.xyzw
        ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r32.xyz, r18.w, l(32), t13.xyzx
        ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r33.xyzw, r18.w, l(48), t13.xyzw
        and r20.w, r33.w, l(1)
        ult r20.w, l(0), r20.w
        add r31.xyz, -r2.xyzx, r31.xyzx
        dp3 r22.w, r31.xyzx, r31.xyzx
        max r22.w, r22.w, l(0.000010)
        rsq r23.w, r22.w
        div r24.w, l(1.000000, 1.000000, 1.000000, 1.000000), r22.w
        min r24.w, r24.w, r31.w
        mul r34.xyz, r23.wwww, r31.xyzx
        mul r22.w, r22.w, r22.w
        mad_sat r22.w, -r22.w, r33.x, l(1.000000)
        mul r22.w, r22.w, r22.w
        mul r22.w, r22.w, r24.w
        dp3 r24.w, r34.xyzx, -r32.xyzx
        mad_sat r24.w, r24.w, r33.y, r33.z
        movc r24.w, r20.w, r24.w, l(1.000000)
        mul r24.w, r24.w, r24.w
        mul r32.xyz, r22.wwww, r24.wwww
        lt r22.w, r32.z, l(0.000100)
        iadd r24.w, r17.w, -r22.w
        mov r16.w, r19.w
        mov r17.w, r24.w
        continuec_nz r22.w
        ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r33.xyz, r18.w, l(16), t13.xyzx
        and r18.w, r33.w, l(2)
        ult r18.w, l(0), r18.w
        and r20.w, r15.w, r20.w
        if_nz r20.w
          and r35.xy, r33.wwww, l(32, 16, 0, 0)
          ult r35.yz, l(0, 0, 0, 0), r35.xxyx
          ushr r20.w, r33.w, l(5)
          and r20.w, r20.w, l(2)
          or r22.w, r35.z, r35.y
          and r22.w, r15.w, r22.w
          if_nz r22.w
            ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r36.xyzw, r20.w, l(0), t14.xyzw
            ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r37.xyzw, r20.w, l(16), t14.xyzw
            ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r38.xyzw, r20.w, l(32), t14.xyzw
            ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r39.xyzw, r20.w, l(48), t14.xyzw
            ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r40.xyzw, r20.w, l(64), t14.xyzw
            ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r41.xyzw, r20.w, l(80), t14.xyzw
          else 
            mov r36.xyzw, l(0,0,0,0)
            mov r37.xyzw, l(0,0,0,0)
            mov r38.xyzw, l(0,0,0,0)
            mov r39.xyzw, l(0,0,0,0)
            mov r40.xyzw, l(0,0,0,0)
            mov r41.xyzw, l(0,0,0,0)
          endif 
          dp4 r37.x, r27.xyzw, r37.xyzw
          dp4 r37.y, r27.xyzw, r38.xyzw
          dp4 r22.w, r27.xyzw, r39.xyzw
          dp4 r24.w, r27.xyzw, r40.xyzw
          max r24.w, r24.w, l(0.000010)
          div r35.yw, r37.xxxy, r24.wwww
          if_z r20.w
            mad r36.xy, r35.ywyy, r36.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
            round_ni r37.xy, r36.xyxx
            add r36.xy, r36.xyxx, -r37.xyxx
            add r37.xy, r37.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
            mul r37.xy, r36.zwzz, r37.xyxx
            mad r38.xyzw, r36.xxxx, l(11.000000, 11.000000, 5.000000, 5.000000), l(-28.000000, 17.000000, -6.000000, 1.000000)
            mad r39.xyz, r36.xxxx, l(4.000000, 4.000000, 7.000000, 0.000000), l(-5.000000, -16.000000, 5.000000, 0.000000)
            div r39.xyz, r39.xyzx, r38.zxyz
            add r39.xyz, r39.yxzy, l(-1.000000, -3.000000, 1.000000, 0.000000)
            div r24.w, r36.x, r38.w
            add r40.x, r24.w, l(3.000000)
            mad r42.xyzw, r36.yyyy, l(11.000000, 11.000000, 5.000000, 5.000000), l(-28.000000, 17.000000, -6.000000, 1.000000)
            mad r43.xyz, r36.yyyy, l(4.000000, 4.000000, 7.000000, 0.000000), l(-5.000000, -16.000000, 5.000000, 0.000000)
            div r43.xyz, r43.xyzx, r42.zxyz
            add r43.xyz, r43.xyzx, l(-3.000000, -1.000000, 1.000000, 0.000000)
            div r24.w, r36.y, r42.w
            add r44.y, r24.w, l(3.000000)
            mul r45.xyzw, r38.zxzx, r42.zzxx
            mov r39.w, r43.x
            mad r46.xyzw, r39.ywxw, r36.zwzw, r37.xyxy
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r24.w, r46.xyxx, t2.xxxx, s4, r22.w
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r25.w, r46.zwzz, t2.xxxx, s4, r22.w
            mul r25.w, r25.w, r45.y
            mad r24.w, r45.x, r24.w, r25.w
            mul r46.xyzw, -r38.ywyw, r42.zzxx
            mad r36.xy, r39.zwzz, r36.zwzz, r37.xyxx
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r25.w, r36.xyxx, t2.xxxx, s4, r22.w
            mad r24.w, r46.x, r25.w, r24.w
            mov r40.y, r39.w
            mad r36.xy, r40.xyxx, r36.zwzz, r37.xyxx
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r25.w, r36.xyxx, t2.xxxx, s4, r22.w
            mad r24.w, r46.y, r25.w, r24.w
            mov r43.w, r39.y
            mad r47.xyzw, r43.wywz, r36.zwzw, r37.xyxy
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r25.w, r47.xyxx, t2.xxxx, s4, r22.w
            mad r24.w, r45.z, r25.w, r24.w
            mov r39.yw, r43.yyyz
            mad r48.xyzw, r39.xyzy, r36.zwzw, r37.xyxy
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r25.w, r48.xyxx, t2.xxxx, s4, r22.w
            mad r24.w, r45.w, r25.w, r24.w
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r25.w, r48.zwzz, t2.xxxx, s4, r22.w
            mad r24.w, r46.z, r25.w, r24.w
            mov r40.zw, r39.yyyw
            mad r45.xyzw, r40.xzxw, r36.zwzw, r37.xyxy
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r25.w, r45.xyxx, t2.xxxx, s4, r22.w
            mad r24.w, r46.w, r25.w, r24.w
            mul r46.xyzw, r38.zxzx, -r42.yyww
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r25.w, r47.zwzz, t2.xxxx, s4, r22.w
            mad r24.w, r46.x, r25.w, r24.w
            mad r47.xyzw, r39.xwzw, r36.zwzw, r37.xyxy
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r25.w, r47.xyxx, t2.xxxx, s4, r22.w
            mad r24.w, r46.y, r25.w, r24.w
            mul r38.xyzw, r38.ywyw, r42.yyww
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r25.w, r47.zwzz, t2.xxxx, s4, r22.w
            mad r24.w, r38.x, r25.w, r24.w
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r25.w, r45.zwzz, t2.xxxx, s4, r22.w
            mad r24.w, r38.y, r25.w, r24.w
            mov r44.x, r43.w
            mad r36.xy, r44.xyxx, r36.zwzz, r37.xyxx
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r25.w, r36.xyxx, t2.xxxx, s4, r22.w
            mad r24.w, r46.z, r25.w, r24.w
            mov r44.zw, r39.xxxz
            mad r39.xyzw, r44.zywy, r36.zwzw, r37.xyxy
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r25.w, r39.xyxx, t2.xxxx, s4, r22.w
            mad r24.w, r46.w, r25.w, r24.w
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r25.w, r39.zwzz, t2.xxxx, s4, r22.w
            mad r24.w, r38.z, r25.w, r24.w
            mov r44.x, r40.x
            mad r36.xy, r44.xyxx, r36.zwzz, r37.xyxx
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r22.w, r36.xyxx, t2.xxxx, s4, r22.w
            mad r22.w, r38.w, r22.w, r24.w
            mul r22.w, r22.w, l(0.000369822490)
          else 
            mov r22.w, l(1.000000)
          endif 
          mul r22.w, r22.w, r32.z
          if_nz r35.x
            if_z r20.w
              mad r35.xy, r35.ywyy, r41.xyxx, r41.zwzz
              sample_l_indexable(texture2d)(float,float,float,float) r35.xyw, r35.xyxx, t2.xywz, s2, l(0.000000)
            else 
              mov r35.xyw, l(1.000000,0,0,1.000000)
            endif 
            mul r35.xyw, r32.zzzz, r35.xyxw
          else 
            mov r35.xyw, r32.zzzz
          endif 
          movc r32.xyz, r35.zzzz, r22.wwww, r35.xywx
        endif 
        mad r31.xyz, r31.xyzx, r23.wwww, r5.xwyx
        dp3 r20.w, r31.xyzx, r31.xyzx
        rsq r20.w, r20.w
        mul r31.xyz, r20.wwww, r31.xyzx
        dp3 r20.w, r31.xzyx, r5.xywx
        add r20.w, -r20.w, l(1.000000)
        mul r22.w, r20.w, r20.w
        mul r22.w, r22.w, r22.w
        mul r20.w, r20.w, r22.w
        mad r35.xyz, r25.xyzx, r20.wwww, r7.xyzx
        dp3_sat r20.w, r12.xzyx, r34.xyzx
        mul r22.w, r20.w, r20.w
        mad r22.w, r22.w, r14.x, r11.z
        sqrt r22.w, r22.w
        mul r22.w, r11.w, r22.w
        mad r22.w, r20.w, r12.w, r22.w
        add r22.w, r22.w, r22.w
        max r22.w, r22.w, l(0.000100)
        div r22.w, l(1.000000, 1.000000, 1.000000, 1.000000), r22.w
        dp3 r23.w, r4.xzyx, r34.xyzx
        dp3 r24.w, r20.xyzx, r34.xyzx
        dp3 r25.w, r18.xyzx, r34.xyzx
        mad r21.z, r23.w, l(0.500000), l(0.500000)
        mad r34.xy, r21.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) r34.x, r34.xyxx, t18.xyzw, s5, l(0.000000)
        mad r21.y, r24.w, l(0.500000), l(0.500000)
        mad r36.xy, r21.ywyy, 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) r34.y, r36.xyxx, t18.xyzw, s5, l(0.000000)
        mad r21.x, r25.w, l(0.500000), l(0.500000)
        mad r36.xy, r21.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) r34.z, r36.xyxx, t18.xyzw, s5, l(0.000000)
        mul r32.xyz, r32.xyzx, r33.xyzx
        mad r28.xyz, r32.xyzx, r34.xyzx, r28.xyzx
        mul r33.xyz, r22.wwww, r35.xyzx
        mul r33.xyz, r20.wwww, r33.xyzx
        dp3_sat r20.w, r31.xzyx, r12.xyzx
        mul r20.w, r20.w, r20.w
        mad r20.w, r20.w, r3.x, l(1.000000)
        div r20.w, r8.x, r20.w
        mul r20.w, r20.w, r20.w
        mul r31.xyz, r20.wwww, r32.xyzx
        mad r29.xyz, r33.xyzx, r31.xyzx, r29.xyzx
        mad r31.xyz, r32.xyzx, r34.xyzx, r30.xyzx
        movc r30.xyz, r18.wwww, r31.xyzx, r30.xyzx
        iadd r17.w, r17.w, l(1)
        mov r16.w, 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), t15.xxxx
      countbits r11.x, r2.w
      mov r22.xyz, r2.xyzx
      mov r22.w, l(1.000000)
      mov r16.xyz, r28.xyzx
      mov r19.xyz, r29.xyzx
      mov r23.xyz, r30.xyzx
      mov r16.w, r2.w
      mov r17.w, l(0)
      loop 
        uge r18.w, r17.w, r11.x
        breakc_nz r18.w
        firstbit_lo r18.w, r16.w
        ishl r19.w, l(1), r18.w
        not r19.w, r19.w
        and r19.w, r16.w, r19.w
        iadd r18.w, l(32), r18.w
        ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r24.xyzw, r18.w, l(0), t13.xyzw
        ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r26.xyz, r18.w, l(32), t13.xyzx
        ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r27.xyzw, r18.w, l(48), t13.xyzw
        and r20.w, r27.w, l(1)
        ult r20.w, l(0), r20.w
        add r24.xyz, -r2.xyzx, r24.xyzx
        dp3 r23.w, r24.xyzx, r24.xyzx
        max r23.w, r23.w, l(0.000010)
        rsq r25.w, r23.w
        div r26.w, l(1.000000, 1.000000, 1.000000, 1.000000), r23.w
        min r24.w, r24.w, r26.w
        mul r31.xyz, r24.xyzx, r25.wwww
        mul r23.w, r23.w, r23.w
        mad_sat r23.w, -r23.w, r27.x, l(1.000000)
        mul r23.w, r23.w, r23.w
        mul r23.w, r23.w, r24.w
        dp3 r24.w, r31.xyzx, -r26.xyzx
        mad_sat r24.w, r24.w, r27.y, r27.z
        movc r24.w, r20.w, r24.w, l(1.000000)
        mul r24.w, r24.w, r24.w
        mul r26.xyz, r23.wwww, r24.wwww
        lt r23.w, r26.z, l(0.000100)
        iadd r24.w, r17.w, -r23.w
        mov r16.w, r19.w
        mov r17.w, r24.w
        continuec_nz r23.w
        ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r27.xyz, r18.w, l(16), t13.xyzx
        and r18.w, r27.w, l(2)
        ult r18.w, l(0), r18.w
        and r20.w, r15.w, r20.w
        if_nz r20.w
          and r32.xy, r27.wwww, l(32, 16, 0, 0)
          ult r32.yz, l(0, 0, 0, 0), r32.xxyx
          ushr r20.w, r27.w, l(5)
          and r20.w, r20.w, l(2)
          or r23.w, r32.z, r32.y
          and r23.w, r15.w, r23.w
          if_nz r23.w
            ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r33.xyzw, r20.w, l(0), t14.xyzw
            ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r34.xyzw, r20.w, l(16), t14.xyzw
            ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r35.xyzw, r20.w, l(32), t14.xyzw
            ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r36.xyzw, r20.w, l(48), t14.xyzw
            ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r37.xyzw, r20.w, l(64), t14.xyzw
            ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r38.xyzw, r20.w, l(80), t14.xyzw
          else 
            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)
            mov r37.xyzw, l(0,0,0,0)
            mov r38.xyzw, l(0,0,0,0)
          endif 
          dp4 r34.x, r22.xyzw, r34.xyzw
          dp4 r34.y, r22.xyzw, r35.xyzw
          dp4 r23.w, r22.xyzw, r36.xyzw
          dp4 r24.w, r22.xyzw, r37.xyzw
          max r24.w, r24.w, l(0.000010)
          div r32.yw, r34.xxxy, r24.wwww
          if_z r20.w
            mad r33.xy, r32.ywyy, r33.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
            round_ni r34.xy, r33.xyxx
            add r33.xy, r33.xyxx, -r34.xyxx
            add r34.xy, r34.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
            mul r34.xy, r33.zwzz, r34.xyxx
            mad r35.xyzw, r33.xxxx, l(11.000000, 11.000000, 5.000000, 5.000000), l(-28.000000, 17.000000, -6.000000, 1.000000)
            mad r36.xyz, r33.xxxx, 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.yxzy, l(-1.000000, -3.000000, 1.000000, 0.000000)
            div r24.w, r33.x, r35.w
            add r37.x, r24.w, l(3.000000)
            mad r39.xyzw, r33.yyyy, l(11.000000, 11.000000, 5.000000, 5.000000), l(-28.000000, 17.000000, -6.000000, 1.000000)
            mad r40.xyz, r33.yyyy, l(4.000000, 4.000000, 7.000000, 0.000000), l(-5.000000, -16.000000, 5.000000, 0.000000)
            div r40.xyz, r40.xyzx, r39.zxyz
            add r40.xyz, r40.xyzx, l(-3.000000, -1.000000, 1.000000, 0.000000)
            div r24.w, r33.y, r39.w
            add r41.y, r24.w, l(3.000000)
            mul r42.xyzw, r35.zxzx, r39.zzxx
            mov r36.w, r40.x
            mad r43.xyzw, r36.ywxw, r33.zwzw, r34.xyxy
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r24.w, r43.xyxx, t2.xxxx, s4, r23.w
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r26.w, r43.zwzz, t2.xxxx, s4, r23.w
            mul r26.w, r26.w, r42.y
            mad r24.w, r42.x, r24.w, r26.w
            mul r43.xyzw, -r35.ywyw, r39.zzxx
            mad r33.xy, r36.zwzz, r33.zwzz, r34.xyxx
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r26.w, r33.xyxx, t2.xxxx, s4, r23.w
            mad r24.w, r43.x, r26.w, r24.w
            mov r37.y, r36.w
            mad r33.xy, r37.xyxx, r33.zwzz, r34.xyxx
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r26.w, r33.xyxx, t2.xxxx, s4, r23.w
            mad r24.w, r43.y, r26.w, r24.w
            mov r40.w, r36.y
            mad r44.xyzw, r40.wywz, r33.zwzw, r34.xyxy
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r26.w, r44.xyxx, t2.xxxx, s4, r23.w
            mad r24.w, r42.z, r26.w, r24.w
            mov r36.yw, r40.yyyz
            mad r45.xyzw, r36.xyzy, r33.zwzw, r34.xyxy
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r26.w, r45.xyxx, t2.xxxx, s4, r23.w
            mad r24.w, r42.w, r26.w, r24.w
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r26.w, r45.zwzz, t2.xxxx, s4, r23.w
            mad r24.w, r43.z, r26.w, r24.w
            mov r37.zw, r36.yyyw
            mad r42.xyzw, r37.xzxw, r33.zwzw, r34.xyxy
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r26.w, r42.xyxx, t2.xxxx, s4, r23.w
            mad r24.w, r43.w, r26.w, r24.w
            mul r43.xyzw, r35.zxzx, -r39.yyww
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r26.w, r44.zwzz, t2.xxxx, s4, r23.w
            mad r24.w, r43.x, r26.w, r24.w
            mad r44.xyzw, r36.xwzw, r33.zwzw, r34.xyxy
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r26.w, r44.xyxx, t2.xxxx, s4, r23.w
            mad r24.w, r43.y, r26.w, r24.w
            mul r35.xyzw, r35.ywyw, r39.yyww
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r26.w, r44.zwzz, t2.xxxx, s4, r23.w
            mad r24.w, r35.x, r26.w, r24.w
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r26.w, r42.zwzz, t2.xxxx, s4, r23.w
            mad r24.w, r35.y, r26.w, r24.w
            mov r41.x, r40.w
            mad r33.xy, r41.xyxx, r33.zwzz, r34.xyxx
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r26.w, r33.xyxx, t2.xxxx, s4, r23.w
            mad r24.w, r43.z, r26.w, r24.w
            mov r41.zw, r36.xxxz
            mad r36.xyzw, r41.zywy, r33.zwzw, r34.xyxy
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r26.w, r36.xyxx, t2.xxxx, s4, r23.w
            mad r24.w, r43.w, r26.w, r24.w
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r26.w, r36.zwzz, t2.xxxx, s4, r23.w
            mad r24.w, r35.z, r26.w, r24.w
            mov r41.x, r37.x
            mad r33.xy, r41.xyxx, r33.zwzz, r34.xyxx
            sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r23.w, r33.xyxx, t2.xxxx, s4, r23.w
            mad r23.w, r35.w, r23.w, r24.w
            mul r23.w, r23.w, l(0.000369822490)
          else 
            mov r23.w, l(1.000000)
          endif 
          mul r23.w, r23.w, r26.z
          if_nz r32.x
            if_z r20.w
              mad r32.xy, r32.ywyy, r38.xyxx, r38.zwzz
              sample_l_indexable(texture2d)(float,float,float,float) r32.xyw, r32.xyxx, t2.xywz, s2, l(0.000000)
            else 
              mov r32.xyw, l(1.000000,0,0,1.000000)
            endif 
            mul r32.xyw, r26.zzzz, r32.xyxw
          else 
            mov r32.xyw, r26.zzzz
          endif 
          movc r26.xyz, r32.zzzz, r23.wwww, r32.xywx
        endif 
        mad r24.xyz, r24.xyzx, r25.wwww, r5.xwyx
        dp3 r20.w, r24.xyzx, r24.xyzx
        rsq r20.w, r20.w
        mul r24.xyz, r20.wwww, r24.xyzx
        dp3 r20.w, r24.xzyx, r5.xywx
        add r20.w, -r20.w, l(1.000000)
        mul r23.w, r20.w, r20.w
        mul r23.w, r23.w, r23.w
        mul r20.w, r20.w, r23.w
        mad r32.xyz, r25.xyzx, r20.wwww, r7.xyzx
        dp3_sat r20.w, r12.xzyx, r31.xyzx
        mul r23.w, r20.w, r20.w
        mad r23.w, r23.w, r14.x, r11.z
        sqrt r23.w, r23.w
        mul r23.w, r11.w, r23.w
        mad r23.w, r20.w, r12.w, r23.w
        add r23.w, r23.w, r23.w
        max r23.w, r23.w, l(0.000100)
        div r23.w, l(1.000000, 1.000000, 1.000000, 1.000000), r23.w
        dp3 r24.w, r4.xzyx, r31.xyzx
        dp3 r25.w, r20.xyzx, r31.xyzx
        dp3 r26.w, r18.xyzx, r31.xyzx
        mad r21.z, r24.w, l(0.500000), l(0.500000)
        mad r31.xy, r21.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) r31.x, r31.xyxx, t18.xyzw, s5, l(0.000000)
        mad r21.y, r25.w, l(0.500000), l(0.500000)
        mad r21.yz, r21.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) r31.y, r21.yzyy, t18.xyzw, s5, l(0.000000)
        mad r21.x, r26.w, l(0.500000), l(0.500000)
        mad r21.xy, r21.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) r31.z, r21.xyxx, t18.xyzw, s5, l(0.000000)
        mul r21.xyz, r26.xyzx, r27.xyzx
        mad r16.xyz, r21.xyzx, r31.xyzx, r16.xyzx
        mul r26.xyz, r23.wwww, r32.xyzx
        mul r26.xyz, r20.wwww, r26.xyzx
        dp3_sat r20.w, r24.xzyx, r12.xyzx
        mul r20.w, r20.w, r20.w
        mad r20.w, r20.w, r3.x, l(1.000000)
        div r20.w, r8.x, r20.w
        mul r20.w, r20.w, r20.w
        mul r24.xyz, r20.wwww, r21.xyzx
        mad r19.xyz, r26.xyzx, r24.xyzx, r19.xyzx
        mad r21.xyz, r21.xyzx, r31.xyzx, r23.xyzx
        movc r23.xyz, r18.wwww, r21.xyzx, r23.xyzx
        iadd r17.w, r17.w, l(1)
        mov r16.w, r19.w
      endloop 
      mov r17.xyz, l(0,0,0,0)
    else 
      if_nz r13.w
        ld_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r2.w, r0.xyww, t5.yzwx
        max r2.w, r2.w, cb3[1].y
        dp3_sat r3.x, r12.xzyx, -cb3[4].xyzx
        mul r18.xyz, r3.xxxx, cb3[3].xyzx
        mul r18.xyz, r2.wwww, r18.xyzx
        dp3 r3.x, r4.xzyx, -cb3[4].xyzx
        add r20.xyz, r5.xwyx, -cb3[4].xyzx
        dp3 r8.x, r20.xyzx, r20.xyzx
        rsq r8.x, r8.x
        mul r20.xyz, r8.xxxx, r20.xyzx
        dp3 r8.x, r20.xzyx, r5.xywx
        add r8.x, -r8.x, l(1.000000)
        mul r11.x, r8.x, r8.x
        mul r11.x, r11.x, r11.x
        mul r8.x, r8.x, r11.x
        add r21.xyz, -r7.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
        mad r22.xyz, r21.xyzx, r8.xxxx, r7.xyzx
        dp3 r24.x, r8.yzwy, -cb3[4].xyzx
        dp3 r24.y, r10.zyxz, -cb3[4].xyzx
        mov r8.x, |r3.x|
        mul r11.xz, r24.xxyx, r24.xxyx
        mul r11.z, r11.z, r14.w
        mad r11.x, r13.y, r11.x, r11.z
        mad r11.x, r8.x, r8.x, r11.x
        sqrt r11.x, r11.x
        mul r11.x, |r4.w|, r11.x
        mad r8.x, r8.x, r12.w, r11.x
        add r8.x, r8.x, r8.x
        max r8.x, r8.x, l(0.000100)
        div r8.x, l(1.000000, 1.000000, 1.000000, 1.000000), r8.x
        mul r22.xyz, r2.wwww, r22.xyzx
        mov_sat r3.x, r3.x
        mul r22.xyz, r3.xxxx, r22.xyzx
        mul r22.xyz, r8.xxxx, r22.xyzx
        dp3 r24.x, r20.xyzx, r8.yzwy
        dp3 r24.y, r20.zyxz, r10.xyzx
        dp3 r11.x, r20.xzyx, r4.xyzx
        mul r20.xy, r24.xyxx, r24.xyxx
        div r11.z, r20.x, r13.y
        mad r11.x, r11.x, r11.x, r11.z
        div r11.z, r20.y, r14.w
        add r11.x, r11.z, r11.x
        mul r11.z, r7.w, r9.w
        mul r11.x, r11.x, r11.x
        mul r11.x, r11.z, r11.x
        div r11.x, l(1.000000, 1.000000, 1.000000, 1.000000), r11.x
        mul r20.xyz, r11.xxxx, cb3[3].xyzx
        mul r20.xyz, r20.xyzx, r22.xyzx
        mul r22.xyz, r10.wwww, r10.zyxz
        mul r24.xyz, r22.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
        mad r22.xyz, r22.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), -cb3[4].xyzx
        dp3 r10.w, r22.xyzx, r22.xyzx
        rsq r10.w, r10.w
        mad r22.xyz, r22.xyzx, r10.wwww, r5.xwyx
        dp3 r10.w, r22.xyzx, r22.xyzx
        rsq r10.w, r10.w
        mul r22.xyz, r10.wwww, r22.xyzx
        mul r25.xyz, r1.yzwy, r6.yyyy
        dp3 r10.w, r22.xzyx, r5.xywx
        add r10.w, -r10.w, l(1.000000)
        mul r11.x, r10.w, r10.w
        mul r11.x, r11.x, r11.x
        mul r10.w, r10.w, r11.x
        mad r1.yzw, -r6.yyyy, r1.yyzw, l(0.000000, 1.000000, 1.000000, 1.000000)
        mad r26.xyz, r1.yzwy, r10.wwww, r25.xyzx
        add r27.xyz, -r26.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
        mul r26.xyz, r2.wwww, r26.xyzx
        mul r26.xyz, r3.xxxx, r26.xyzx
        mul r26.xyz, r8.xxxx, r26.xyzx
        add r2.w, r9.w, r9.w
        add r3.x, r7.w, r7.w
        dp3 r28.x, r22.xyzx, r8.yzwy
        dp3 r28.y, r22.zyxz, r10.xyzx
        dp3 r8.x, r22.xzyx, r4.xyzx
        mul r22.xy, r28.xyxx, r28.xyxx
        mul r10.w, r2.w, r2.w
        div r11.x, r22.x, r10.w
        mad r8.x, r8.x, r8.x, r11.x
        mul r11.x, r3.x, r3.x
        div r13.w, r22.y, r11.x
        add r8.x, r8.x, r13.w
        mul r2.w, r2.w, r3.x
        mul r3.x, r8.x, r8.x
        mul r3.x, r2.w, r3.x
        div r3.x, l(1.000000, 1.000000, 1.000000, 1.000000), r3.x
        mul r22.xyz, r3.xxxx, cb3[3].xyzx
        mul r22.xyz, r22.xyzx, r26.xyzx
        mad r20.xyz, r20.xyzx, r27.xyzx, r22.xyzx
        mul r22.xyz, r18.xyzx, cb3[5].wwww
        ishl r3.x, r1.x, l(1)
        ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r3.x, r3.x, l(0), t15.xxxx
        countbits r8.x, r3.x
        ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r13.w, r1.x, l(0), t16.xxxx
        and r13.w, r13.w, l(0x60000000)
        ine r13.w, r13.w, l(0)
        mov r26.xyz, r2.xyzx
        mov r26.w, l(1.000000)
        mov r27.xyz, r18.xyzx
        mov r28.xyz, r20.xyzx
        mov r29.xyz, r22.xyzx
        mov r14.x, r3.x
        mov r15.w, l(0)
        loop 
          uge r16.w, r15.w, r8.x
          breakc_nz r16.w
          firstbit_lo r16.w, r14.x
          ishl r17.w, l(1), r16.w
          not r17.w, r17.w
          and r17.w, r14.x, r17.w
          ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r30.xyzw, r16.w, l(0), t13.xyzw
          ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r31.xyz, r16.w, l(32), t13.xyzx
          ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r32.xyzw, r16.w, l(48), t13.xyzw
          and r18.w, r32.w, l(1)
          ult r18.w, l(0), r18.w
          add r30.xyz, -r2.xyzx, r30.xyzx
          dp3 r19.w, r30.xyzx, r30.xyzx
          max r19.w, r19.w, l(0.000010)
          rsq r20.w, r19.w
          div r21.w, l(1.000000, 1.000000, 1.000000, 1.000000), r19.w
          min r21.w, r21.w, r30.w
          mul r33.xyz, r20.wwww, r30.xyzx
          mul r19.w, r19.w, r19.w
          mad_sat r19.w, -r19.w, r32.x, l(1.000000)
          mul r19.w, r19.w, r19.w
          mul r19.w, r19.w, r21.w
          dp3 r21.w, r33.xyzx, -r31.xyzx
          mad_sat r21.w, r21.w, r32.y, r32.z
          movc r21.w, r18.w, r21.w, l(1.000000)
          mul r21.w, r21.w, r21.w
          mul r31.xyz, r19.wwww, r21.wwww
          lt r19.w, r31.z, l(0.000100)
          iadd r21.w, r15.w, -r19.w
          mov r14.x, r17.w
          mov r15.w, r21.w
          continuec_nz r19.w
          ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r32.xyz, r16.w, l(16), t13.xyzx
          and r16.w, r32.w, l(2)
          ult r16.w, l(0), r16.w
          and r18.w, r13.w, r18.w
          if_nz r18.w
            and r34.xy, r32.wwww, l(32, 16, 0, 0)
            ult r34.yz, l(0, 0, 0, 0), r34.xxyx
            ushr r18.w, r32.w, l(5)
            and r18.w, r18.w, l(2)
            or r19.w, r34.z, r34.y
            and r19.w, r13.w, r19.w
            if_nz r19.w
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r35.xyzw, r18.w, l(0), t14.xyzw
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r36.xyzw, r18.w, l(16), t14.xyzw
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r37.xyzw, r18.w, l(32), t14.xyzw
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r38.xyzw, r18.w, l(48), t14.xyzw
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r39.xyzw, r18.w, l(64), t14.xyzw
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r40.xyzw, r18.w, l(80), t14.xyzw
            else 
              mov r35.xyzw, l(0,0,0,0)
              mov r36.xyzw, l(0,0,0,0)
              mov r37.xyzw, l(0,0,0,0)
              mov r38.xyzw, l(0,0,0,0)
              mov r39.xyzw, l(0,0,0,0)
              mov r40.xyzw, l(0,0,0,0)
            endif 
            dp4 r36.x, r26.xyzw, r36.xyzw
            dp4 r36.y, r26.xyzw, r37.xyzw
            dp4 r19.w, r26.xyzw, r38.xyzw
            dp4 r21.w, r26.xyzw, r39.xyzw
            max r21.w, r21.w, l(0.000010)
            div r34.yw, r36.xxxy, r21.wwww
            if_z r18.w
              mad r35.xy, r34.ywyy, r35.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
              round_ni r36.xy, r35.xyxx
              add r35.xy, r35.xyxx, -r36.xyxx
              add r36.xy, r36.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
              mul r36.xy, r35.zwzz, r36.xyxx
              mad r37.xyzw, r35.xxxx, l(11.000000, 11.000000, 5.000000, 5.000000), l(-28.000000, 17.000000, -6.000000, 1.000000)
              mad r38.xyz, r35.xxxx, 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.yxzy, l(-1.000000, -3.000000, 1.000000, 0.000000)
              div r21.w, r35.x, r37.w
              add r39.x, r21.w, l(3.000000)
              mad r41.xyzw, r35.yyyy, l(11.000000, 11.000000, 5.000000, 5.000000), l(-28.000000, 17.000000, -6.000000, 1.000000)
              mad r42.xyz, r35.yyyy, l(4.000000, 4.000000, 7.000000, 0.000000), l(-5.000000, -16.000000, 5.000000, 0.000000)
              div r42.xyz, r42.xyzx, r41.zxyz
              add r42.xyz, r42.xyzx, l(-3.000000, -1.000000, 1.000000, 0.000000)
              div r21.w, r35.y, r41.w
              add r43.y, r21.w, l(3.000000)
              mul r44.xyzw, r37.zxzx, r41.zzxx
              mov r38.w, r42.x
              mad r45.xyzw, r38.ywxw, r35.zwzw, r36.xyxy
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r21.w, r45.xyxx, t2.xxxx, s4, r19.w
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r22.w, r45.zwzz, t2.xxxx, s4, r19.w
              mul r22.w, r22.w, r44.y
              mad r21.w, r44.x, r21.w, r22.w
              mul r45.xyzw, -r37.ywyw, r41.zzxx
              mad r35.xy, r38.zwzz, r35.zwzz, r36.xyxx
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r22.w, r35.xyxx, t2.xxxx, s4, r19.w
              mad r21.w, r45.x, r22.w, r21.w
              mov r39.y, r38.w
              mad r35.xy, r39.xyxx, r35.zwzz, r36.xyxx
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r22.w, r35.xyxx, t2.xxxx, s4, r19.w
              mad r21.w, r45.y, r22.w, r21.w
              mov r42.w, r38.y
              mad r46.xyzw, r42.wywz, r35.zwzw, r36.xyxy
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r22.w, r46.xyxx, t2.xxxx, s4, r19.w
              mad r21.w, r44.z, r22.w, r21.w
              mov r38.yw, r42.yyyz
              mad r47.xyzw, r38.xyzy, r35.zwzw, r36.xyxy
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r22.w, r47.xyxx, t2.xxxx, s4, r19.w
              mad r21.w, r44.w, r22.w, r21.w
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r22.w, r47.zwzz, t2.xxxx, s4, r19.w
              mad r21.w, r45.z, r22.w, r21.w
              mov r39.zw, r38.yyyw
              mad r44.xyzw, r39.xzxw, r35.zwzw, r36.xyxy
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r22.w, r44.xyxx, t2.xxxx, s4, r19.w
              mad r21.w, r45.w, r22.w, r21.w
              mul r45.xyzw, r37.zxzx, -r41.yyww
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r22.w, r46.zwzz, t2.xxxx, s4, r19.w
              mad r21.w, r45.x, r22.w, r21.w
              mad r46.xyzw, r38.xwzw, r35.zwzw, r36.xyxy
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r22.w, r46.xyxx, t2.xxxx, s4, r19.w
              mad r21.w, r45.y, r22.w, r21.w
              mul r37.xyzw, r37.ywyw, r41.yyww
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r22.w, r46.zwzz, t2.xxxx, s4, r19.w
              mad r21.w, r37.x, r22.w, r21.w
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r22.w, r44.zwzz, t2.xxxx, s4, r19.w
              mad r21.w, r37.y, r22.w, r21.w
              mov r43.x, r42.w
              mad r35.xy, r43.xyxx, r35.zwzz, r36.xyxx
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r22.w, r35.xyxx, t2.xxxx, s4, r19.w
              mad r21.w, r45.z, r22.w, r21.w
              mov r43.zw, r38.xxxz
              mad r38.xyzw, r43.zywy, r35.zwzw, r36.xyxy
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r22.w, r38.xyxx, t2.xxxx, s4, r19.w
              mad r21.w, r45.w, r22.w, r21.w
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r22.w, r38.zwzz, t2.xxxx, s4, r19.w
              mad r21.w, r37.z, r22.w, r21.w
              mov r43.x, r39.x
              mad r35.xy, r43.xyxx, r35.zwzz, r36.xyxx
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r19.w, r35.xyxx, t2.xxxx, s4, r19.w
              mad r19.w, r37.w, r19.w, r21.w
              mul r19.w, r19.w, l(0.000369822490)
            else 
              mov r19.w, l(1.000000)
            endif 
            mul r19.w, r19.w, r31.z
            if_nz r34.x
              if_z r18.w
                mad r34.xy, r34.ywyy, r40.xyxx, r40.zwzz
                sample_l_indexable(texture2d)(float,float,float,float) r34.xyw, r34.xyxx, t2.xywz, s2, l(0.000000)
              else 
                mov r34.xyw, l(1.000000,0,0,1.000000)
              endif 
              mul r34.xyw, r31.zzzz, r34.xyxw
            else 
              mov r34.xyw, r31.zzzz
            endif 
            movc r31.xyz, r34.zzzz, r19.wwww, r34.xywx
          endif 
          mul r31.xyz, r32.xyzx, r31.xyzx
          dp3 r18.w, r12.xzyx, r33.xyzx
          mov_sat r19.w, r18.w
          mad r27.xyz, r19.wwww, r31.xyzx, r27.xyzx
          mad r32.xyz, r30.xyzx, r20.wwww, r5.xwyx
          dp3 r21.w, r32.xyzx, r32.xyzx
          rsq r21.w, r21.w
          mul r32.xyz, r21.wwww, r32.xyzx
          dp3 r21.w, r32.xzyx, r5.xywx
          add r21.w, -r21.w, l(1.000000)
          mul r22.w, r21.w, r21.w
          mul r22.w, r22.w, r22.w
          mul r21.w, r21.w, r22.w
          mad r34.xyz, r21.xyzx, r21.wwww, r7.xyzx
          dp3 r35.x, r8.yzwy, r33.xyzx
          dp3 r35.y, r10.zyxz, r33.xyzx
          mov r18.w, |r18.w|
          mul r33.xy, r35.xyxx, r35.xyxx
          mul r21.w, r14.w, r33.y
          mad r21.w, r13.y, r33.x, r21.w
          mad r21.w, r18.w, r18.w, r21.w
          sqrt r21.w, r21.w
          mul r21.w, |r4.w|, r21.w
          mad r18.w, r18.w, r12.w, r21.w
          add r18.w, r18.w, r18.w
          max r18.w, r18.w, l(0.000100)
          div r18.w, l(1.000000, 1.000000, 1.000000, 1.000000), r18.w
          mul r33.xyz, r18.wwww, r34.xyzx
          mul r33.xyz, r19.wwww, r33.xyzx
          dp3 r34.x, r32.xyzx, r8.yzwy
          dp3 r34.y, r32.zyxz, r10.xyzx
          dp3 r21.w, r32.xzyx, r4.xyzx
          mul r32.xy, r34.xyxx, r34.xyxx
          div r22.w, r32.x, r13.y
          mad r22.w, r21.w, r21.w, r22.w
          div r23.w, r32.y, r14.w
          add r22.w, r22.w, r23.w
          mul r22.w, r22.w, r22.w
          mul r22.w, r11.z, r22.w
          div r22.w, l(1.000000, 1.000000, 1.000000, 1.000000), r22.w
          mul r34.xyz, r22.wwww, r31.xyzx
          mul r33.xyz, r33.xyzx, r34.xyzx
          mad r30.xyz, r30.xyzx, r20.wwww, r24.xyzx
          dp3 r20.w, r30.xyzx, r30.xyzx
          rsq r20.w, r20.w
          mad r30.xyz, r30.xyzx, r20.wwww, r5.xwyx
          dp3 r20.w, r30.xyzx, r30.xyzx
          rsq r20.w, r20.w
          mul r30.xyz, r20.wwww, r30.xyzx
          dp3 r20.w, r30.xzyx, r5.xywx
          add r20.w, -r20.w, l(1.000000)
          mul r22.w, r20.w, r20.w
          mul r22.w, r22.w, r22.w
          mul r20.w, r20.w, r22.w
          mad r30.xyz, r1.yzwy, r20.wwww, r25.xyzx
          add r34.xyz, -r30.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
          mul r30.xyz, r18.wwww, r30.xyzx
          mul r30.xyz, r19.wwww, r30.xyzx
          div r18.w, r32.x, r10.w
          mad r18.w, r21.w, r21.w, r18.w
          div r20.w, r32.y, r11.x
          add r18.w, r18.w, r20.w
          mul r18.w, r18.w, r18.w
          mul r18.w, r2.w, r18.w
          div r18.w, l(1.000000, 1.000000, 1.000000, 1.000000), r18.w
          mul r32.xyz, r18.wwww, r31.xyzx
          mul r30.xyz, r30.xyzx, r32.xyzx
          mad r30.xyz, r33.xyzx, r34.xyzx, r30.xyzx
          add r28.xyz, r28.xyzx, r30.xyzx
          mad r30.xyz, r19.wwww, r31.xyzx, r29.xyzx
          movc r29.xyz, r16.wwww, r30.xyzx, r29.xyzx
          iadd r15.w, r15.w, l(1)
          mov r14.x, r17.w
        endloop 
        bfi r3.x, l(31), l(1), r1.x, l(1)
        ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r3.x, r3.x, l(0), t15.xxxx
        countbits r8.x, r3.x
        mov r18.xyz, r2.xyzx
        mov r18.w, l(1.000000)
        mov r16.xyz, r27.xyzx
        mov r19.xyz, r28.xyzx
        mov r23.xyz, r29.xyzx
        mov r14.x, r3.x
        mov r15.w, l(0)
        loop 
          uge r16.w, r15.w, r8.x
          breakc_nz r16.w
          firstbit_lo r16.w, r14.x
          ishl r17.w, l(1), r16.w
          not r17.w, r17.w
          and r17.w, r14.x, r17.w
          iadd r16.w, l(32), r16.w
          ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r20.xyzw, r16.w, l(0), t13.xyzw
          ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r22.xyz, r16.w, l(32), t13.xyzx
          ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r26.xyzw, r16.w, l(48), t13.xyzw
          and r19.w, r26.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 r22.w, r21.w
          div r23.w, l(1.000000, 1.000000, 1.000000, 1.000000), r21.w
          min r20.w, r20.w, r23.w
          mul r30.xyz, r20.xyzx, r22.wwww
          mul r21.w, r21.w, r21.w
          mad_sat r21.w, -r21.w, r26.x, l(1.000000)
          mul r21.w, r21.w, r21.w
          mul r20.w, r20.w, r21.w
          dp3 r21.w, r30.xyzx, -r22.xyzx
          mad_sat r21.w, r21.w, r26.y, r26.z
          movc r21.w, r19.w, r21.w, l(1.000000)
          mul r21.w, r21.w, r21.w
          mul r22.xyz, r20.wwww, r21.wwww
          lt r20.w, r22.z, l(0.000100)
          iadd r21.w, r15.w, -r20.w
          mov r14.x, r17.w
          mov r15.w, r21.w
          continuec_nz r20.w
          ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r26.xyz, r16.w, l(16), t13.xyzx
          and r16.w, r26.w, l(2)
          ult r16.w, l(0), r16.w
          and r19.w, r13.w, r19.w
          if_nz r19.w
            and r31.xy, r26.wwww, l(32, 16, 0, 0)
            ult r31.yz, l(0, 0, 0, 0), r31.xxyx
            ushr r19.w, r26.w, l(5)
            and r19.w, r19.w, l(2)
            or r20.w, r31.z, r31.y
            and r20.w, r13.w, r20.w
            if_nz r20.w
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r32.xyzw, r19.w, l(0), t14.xyzw
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r33.xyzw, r19.w, l(16), t14.xyzw
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r34.xyzw, r19.w, l(32), t14.xyzw
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r35.xyzw, r19.w, l(48), t14.xyzw
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r36.xyzw, r19.w, l(64), t14.xyzw
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r37.xyzw, r19.w, l(80), t14.xyzw
            else 
              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)
              mov r37.xyzw, l(0,0,0,0)
            endif 
            dp4 r33.x, r18.xyzw, r33.xyzw
            dp4 r33.y, r18.xyzw, r34.xyzw
            dp4 r20.w, r18.xyzw, r35.xyzw
            dp4 r21.w, r18.xyzw, r36.xyzw
            max r21.w, r21.w, l(0.000010)
            div r31.yw, r33.xxxy, r21.wwww
            if_z r19.w
              mad r32.xy, r31.ywyy, r32.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
              round_ni r33.xy, r32.xyxx
              add r32.xy, r32.xyxx, -r33.xyxx
              add r33.xy, r33.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
              mul r33.xy, r32.zwzz, r33.xyxx
              mad r34.xyzw, r32.xxxx, l(11.000000, 11.000000, 5.000000, 5.000000), l(-28.000000, 17.000000, -6.000000, 1.000000)
              mad r35.xyz, r32.xxxx, 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.yxzy, l(-1.000000, -3.000000, 1.000000, 0.000000)
              div r21.w, r32.x, r34.w
              add r36.x, r21.w, l(3.000000)
              mad r38.xyzw, r32.yyyy, l(11.000000, 11.000000, 5.000000, 5.000000), l(-28.000000, 17.000000, -6.000000, 1.000000)
              mad r39.xyz, r32.yyyy, l(4.000000, 4.000000, 7.000000, 0.000000), l(-5.000000, -16.000000, 5.000000, 0.000000)
              div r39.xyz, r39.xyzx, r38.zxyz
              add r39.xyz, r39.xyzx, l(-3.000000, -1.000000, 1.000000, 0.000000)
              div r21.w, r32.y, r38.w
              add r40.y, r21.w, l(3.000000)
              mul r41.xyzw, r34.zxzx, r38.zzxx
              mov r35.w, r39.x
              mad r42.xyzw, r35.ywxw, r32.zwzw, r33.xyxy
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r21.w, r42.xyxx, t2.xxxx, s4, r20.w
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r23.w, r42.zwzz, t2.xxxx, s4, r20.w
              mul r23.w, r23.w, r41.y
              mad r21.w, r41.x, r21.w, r23.w
              mul r42.xyzw, -r34.ywyw, r38.zzxx
              mad r32.xy, r35.zwzz, r32.zwzz, r33.xyxx
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r23.w, r32.xyxx, t2.xxxx, s4, r20.w
              mad r21.w, r42.x, r23.w, r21.w
              mov r36.y, r35.w
              mad r32.xy, r36.xyxx, r32.zwzz, r33.xyxx
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r23.w, r32.xyxx, t2.xxxx, s4, r20.w
              mad r21.w, r42.y, r23.w, r21.w
              mov r39.w, r35.y
              mad r43.xyzw, r39.wywz, r32.zwzw, r33.xyxy
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r23.w, r43.xyxx, t2.xxxx, s4, r20.w
              mad r21.w, r41.z, r23.w, r21.w
              mov r35.yw, r39.yyyz
              mad r44.xyzw, r35.xyzy, r32.zwzw, r33.xyxy
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r23.w, r44.xyxx, t2.xxxx, s4, r20.w
              mad r21.w, r41.w, r23.w, r21.w
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r23.w, r44.zwzz, t2.xxxx, s4, r20.w
              mad r21.w, r42.z, r23.w, r21.w
              mov r36.zw, r35.yyyw
              mad r41.xyzw, r36.xzxw, r32.zwzw, r33.xyxy
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r23.w, r41.xyxx, t2.xxxx, s4, r20.w
              mad r21.w, r42.w, r23.w, r21.w
              mul r42.xyzw, r34.zxzx, -r38.yyww
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r23.w, r43.zwzz, t2.xxxx, s4, r20.w
              mad r21.w, r42.x, r23.w, r21.w
              mad r43.xyzw, r35.xwzw, r32.zwzw, r33.xyxy
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r23.w, r43.xyxx, t2.xxxx, s4, r20.w
              mad r21.w, r42.y, r23.w, r21.w
              mul r34.xyzw, r34.ywyw, r38.yyww
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r23.w, r43.zwzz, t2.xxxx, s4, r20.w
              mad r21.w, r34.x, r23.w, r21.w
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r23.w, r41.zwzz, t2.xxxx, s4, r20.w
              mad r21.w, r34.y, r23.w, r21.w
              mov r40.x, r39.w
              mad r32.xy, r40.xyxx, r32.zwzz, r33.xyxx
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r23.w, r32.xyxx, t2.xxxx, s4, r20.w
              mad r21.w, r42.z, r23.w, r21.w
              mov r40.zw, r35.xxxz
              mad r35.xyzw, r40.zywy, r32.zwzw, r33.xyxy
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r23.w, r35.xyxx, t2.xxxx, s4, r20.w
              mad r21.w, r42.w, r23.w, r21.w
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r23.w, r35.zwzz, t2.xxxx, s4, r20.w
              mad r21.w, r34.z, r23.w, r21.w
              mov r40.x, r36.x
              mad r32.xy, r40.xyxx, r32.zwzz, r33.xyxx
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r20.w, r32.xyxx, t2.xxxx, s4, r20.w
              mad r20.w, r34.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, r22.z
            if_nz r31.x
              if_z r19.w
                mad r31.xy, r31.ywyy, r37.xyxx, r37.zwzz
                sample_l_indexable(texture2d)(float,float,float,float) r31.xyw, r31.xyxx, t2.xywz, s2, l(0.000000)
              else 
                mov r31.xyw, l(1.000000,0,0,1.000000)
              endif 
              mul r31.xyw, r22.zzzz, r31.xyxw
            else 
              mov r31.xyw, r22.zzzz
            endif 
            movc r22.xyz, r31.zzzz, r20.wwww, r31.xywx
          endif 
          mul r22.xyz, r26.xyzx, r22.xyzx
          dp3 r19.w, r12.xzyx, r30.xyzx
          mov_sat r20.w, r19.w
          mad r16.xyz, r20.wwww, r22.xyzx, r16.xyzx
          mad r26.xyz, r20.xyzx, r22.wwww, r5.xwyx
          dp3 r21.w, r26.xyzx, r26.xyzx
          rsq r21.w, r21.w
          mul r26.xyz, r21.wwww, r26.xyzx
          dp3 r21.w, r26.xzyx, r5.xywx
          add r21.w, -r21.w, l(1.000000)
          mul r23.w, r21.w, r21.w
          mul r23.w, r23.w, r23.w
          mul r21.w, r21.w, r23.w
          mad r31.xyz, r21.xyzx, r21.wwww, r7.xyzx
          dp3 r32.x, r8.yzwy, r30.xyzx
          dp3 r32.y, r10.zyxz, r30.xyzx
          mov r19.w, |r19.w|
          mul r30.xy, r32.xyxx, r32.xyxx
          mul r21.w, r14.w, r30.y
          mad r21.w, r13.y, r30.x, r21.w
          mad r21.w, r19.w, r19.w, r21.w
          sqrt r21.w, r21.w
          mul r21.w, |r4.w|, r21.w
          mad r19.w, r19.w, r12.w, r21.w
          add r19.w, r19.w, r19.w
          max r19.w, r19.w, l(0.000100)
          div r19.w, l(1.000000, 1.000000, 1.000000, 1.000000), r19.w
          mul r30.xyz, r19.wwww, r31.xyzx
          mul r30.xyz, r20.wwww, r30.xyzx
          dp3 r31.x, r26.xyzx, r8.yzwy
          dp3 r31.y, r26.zyxz, r10.xyzx
          dp3 r21.w, r26.xzyx, r4.xyzx
          mul r26.xy, r31.xyxx, r31.xyxx
          div r23.w, r26.x, r13.y
          mad r23.w, r21.w, r21.w, r23.w
          div r24.w, r26.y, r14.w
          add r23.w, r23.w, r24.w
          mul r23.w, r23.w, r23.w
          mul r23.w, r11.z, r23.w
          div r23.w, l(1.000000, 1.000000, 1.000000, 1.000000), r23.w
          mul r31.xyz, r22.xyzx, r23.wwww
          mul r30.xyz, r30.xyzx, r31.xyzx
          mad r20.xyz, r20.xyzx, r22.wwww, r24.xyzx
          dp3 r22.w, r20.xyzx, r20.xyzx
          rsq r22.w, r22.w
          mad r20.xyz, r20.xyzx, r22.wwww, r5.xwyx
          dp3 r22.w, r20.xyzx, r20.xyzx
          rsq r22.w, r22.w
          mul r20.xyz, r20.xyzx, r22.wwww
          dp3 r20.x, r20.xzyx, r5.xywx
          add r20.x, -r20.x, l(1.000000)
          mul r20.y, r20.x, r20.x
          mul r20.y, r20.y, r20.y
          mul r20.x, r20.x, r20.y
          mad r20.xyz, r1.yzwy, r20.xxxx, r25.xyzx
          add r31.xyz, -r20.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
          mul r20.xyz, r19.wwww, r20.xyzx
          mul r20.xyz, r20.wwww, r20.xyzx
          div r19.w, r26.x, r10.w
          mad r19.w, r21.w, r21.w, r19.w
          div r21.w, r26.y, r11.x
          add r19.w, r19.w, r21.w
          mul r19.w, r19.w, r19.w
          mul r19.w, r2.w, r19.w
          div r19.w, l(1.000000, 1.000000, 1.000000, 1.000000), r19.w
          mul r26.xyz, r19.wwww, r22.xyzx
          mul r20.xyz, r20.xyzx, r26.xyzx
          mad r20.xyz, r30.xyzx, r31.xyzx, r20.xyzx
          add r19.xyz, r19.xyzx, r20.xyzx
          mad r20.xyz, r20.wwww, r22.xyzx, r23.xyzx
          movc r23.xyz, r16.wwww, r20.xyzx, r23.xyzx
          iadd r15.w, r15.w, l(1)
          mov r14.x, r17.w
        endloop 
        mov r17.xyz, l(0,0,0,0)
      else 
        ld_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r1.y, r0.xyww, t5.yxzw
        max r1.y, r1.y, cb3[1].y
        dp3 r1.z, r4.xzyx, cb3[4].xyzx
        mov_sat r1.z, -r1.z
        add r18.xyz, r5.xwyx, -cb3[4].xyzx
        dp3 r1.w, r18.xyzx, r18.xyzx
        rsq r1.w, r1.w
        mul r18.xyz, r1.wwww, r18.xyzx
        dp3 r1.w, r18.xzyx, r5.xywx
        add r1.w, -r1.w, l(1.000000)
        mul r2.w, r1.w, r1.w
        mul r2.w, r2.w, r2.w
        mul r1.w, r1.w, r2.w
        add r20.xyz, -r7.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
        mad r21.xyz, r20.xyzx, r1.wwww, r7.xyzx
        dp3 r22.x, r8.yzwy, -cb3[4].xyzx
        dp3 r22.y, r10.zyxz, -cb3[4].xyzx
        mul r11.xz, r22.xxyx, r22.xxyx
        mul r1.w, r11.z, r14.w
        mad r1.w, r13.y, r11.x, r1.w
        mad r1.w, r1.z, r1.z, r1.w
        sqrt r1.w, r1.w
        mul r1.w, r1.w, r11.w
        mad r1.w, r1.z, r12.w, r1.w
        add r1.w, r1.w, r1.w
        max r1.w, r1.w, l(0.000100)
        div r1.w, l(1.000000, 1.000000, 1.000000, 1.000000), r1.w
        mul r21.xyz, r1.yyyy, r21.xyzx
        mul r21.xyz, r1.zzzz, r21.xyzx
        mul r21.xyz, r1.wwww, r21.xyzx
        dp3 r22.x, r18.xyzx, r8.yzwy
        dp3 r22.y, r18.zyxz, r10.xyzx
        dp3 r1.z, r18.xzyx, r4.xyzx
        mul r11.xz, r22.xxyx, r22.xxyx
        div r1.w, r11.x, r13.y
        mad r1.z, r1.z, r1.z, r1.w
        div r1.w, r11.z, r14.w
        add r1.z, r1.w, r1.z
        mul r1.w, r7.w, r9.w
        mul r1.z, r1.z, r1.z
        mul r1.z, r1.w, r1.z
        div r1.z, l(1.000000, 1.000000, 1.000000, 1.000000), r1.z
        mul r18.xyz, r1.zzzz, cb3[3].xyzx
        mul r18.xyz, r18.xyzx, r21.xyzx
        dp3 r1.z, r12.xzyx, -cb3[4].xyzx
        mul r21.xyz, r1.yyyy, cb3[3].xyzx
        mov_sat r1.y, r1.z
        mul r22.xyz, r1.yyyy, r21.xyzx
        mov_sat r1.z, -r1.z
        mul r21.xyz, r1.zzzz, r21.xyzx
        and r21.xyz, r13.xxxx, r21.xyzx
        mul r24.xyz, r22.xyzx, cb3[5].wwww
        ishl r1.y, r1.x, l(1)
        ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r1.y, r1.y, l(0), t15.xxxx
        countbits r1.z, r1.y
        ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r2.w, r1.x, l(0), t16.xxxx
        and r2.w, r2.w, l(0x60000000)
        ine r2.w, r2.w, l(0)
        mov r25.xyz, r2.xyzx
        mov r25.w, l(1.000000)
        mov r26.xyz, r22.xyzx
        mov r27.xyz, r18.xyzx
        mov r28.xyz, r21.xyzx
        mov r29.xyz, r24.xyzx
        mov r3.x, r1.y
        mov r7.w, l(0)
        loop 
          uge r8.x, r7.w, r1.z
          breakc_nz r8.x
          firstbit_lo r8.x, r3.x
          ishl r9.w, l(1), r8.x
          not r9.w, r9.w
          and r9.w, r3.x, r9.w
          ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r30.xyzw, r8.x, l(0), t13.xyzw
          ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r31.xyz, r8.x, l(32), t13.xyzx
          ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r32.xyzw, r8.x, l(48), t13.xyzw
          and r10.w, r32.w, l(1)
          ult r10.w, l(0), r10.w
          add r30.xyz, -r2.xyzx, r30.xyzx
          dp3 r11.x, r30.xyzx, r30.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, r30.w
          mul r33.xyz, r11.zzzz, r30.xyzx
          mul r11.x, r11.x, r11.x
          mad_sat r11.x, -r11.x, r32.x, l(1.000000)
          mul r11.x, r11.x, r11.x
          mul r11.x, r11.x, r13.w
          dp3 r13.w, r33.xyzx, -r31.xyzx
          mad_sat r13.w, r13.w, r32.y, r32.z
          movc r13.w, r10.w, r13.w, l(1.000000)
          mul r13.w, r13.w, r13.w
          mul r31.xyz, r11.xxxx, r13.wwww
          lt r11.x, r31.z, l(0.000100)
          iadd r13.w, r7.w, -r11.x
          mov r3.x, r9.w
          mov r7.w, r13.w
          continuec_nz r11.x
          ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r32.xyz, r8.x, l(16), t13.xyzx
          and r8.x, r32.w, l(2)
          ult r8.x, l(0), r8.x
          and r10.w, r2.w, r10.w
          if_nz r10.w
            and r34.xy, r32.wwww, l(32, 16, 0, 0)
            ult r34.yz, l(0, 0, 0, 0), r34.xxyx
            ushr r10.w, r32.w, l(5)
            and r10.w, r10.w, l(2)
            or r11.x, r34.z, r34.y
            and r11.x, r2.w, r11.x
            if_nz r11.x
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r35.xyzw, r10.w, l(0), t14.xyzw
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r36.xyzw, r10.w, l(16), t14.xyzw
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r37.xyzw, r10.w, l(32), t14.xyzw
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r38.xyzw, r10.w, l(48), t14.xyzw
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r39.xyzw, r10.w, l(64), t14.xyzw
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r40.xyzw, r10.w, l(80), t14.xyzw
            else 
              mov r35.xyzw, l(0,0,0,0)
              mov r36.xyzw, l(0,0,0,0)
              mov r37.xyzw, l(0,0,0,0)
              mov r38.xyzw, l(0,0,0,0)
              mov r39.xyzw, l(0,0,0,0)
              mov r40.xyzw, l(0,0,0,0)
            endif 
            dp4 r36.x, r25.xyzw, r36.xyzw
            dp4 r36.y, r25.xyzw, r37.xyzw
            dp4 r11.x, r25.xyzw, r38.xyzw
            dp4 r13.w, r25.xyzw, r39.xyzw
            max r13.w, r13.w, l(0.000010)
            div r34.yw, r36.xxxy, r13.wwww
            if_z r10.w
              mad r35.xy, r34.ywyy, r35.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
              round_ni r36.xy, r35.xyxx
              add r35.xy, r35.xyxx, -r36.xyxx
              add r36.xy, r36.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
              mul r36.xy, r35.zwzz, r36.xyxx
              mad r37.xyzw, r35.xxxx, l(11.000000, 11.000000, 5.000000, 5.000000), l(-28.000000, 17.000000, -6.000000, 1.000000)
              mad r38.xyz, r35.xxxx, 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.yxzy, l(-1.000000, -3.000000, 1.000000, 0.000000)
              div r13.w, r35.x, r37.w
              add r39.x, r13.w, l(3.000000)
              mad r41.xyzw, r35.yyyy, l(11.000000, 11.000000, 5.000000, 5.000000), l(-28.000000, 17.000000, -6.000000, 1.000000)
              mad r42.xyz, r35.yyyy, l(4.000000, 4.000000, 7.000000, 0.000000), l(-5.000000, -16.000000, 5.000000, 0.000000)
              div r42.xyz, r42.xyzx, r41.zxyz
              add r42.xyz, r42.xyzx, l(-3.000000, -1.000000, 1.000000, 0.000000)
              div r13.w, r35.y, r41.w
              add r43.y, r13.w, l(3.000000)
              mul r44.xyzw, r37.zxzx, r41.zzxx
              mov r38.w, r42.x
              mad r45.xyzw, r38.ywxw, r35.zwzw, r36.xyxy
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r13.w, r45.xyxx, t2.xxxx, s4, r11.x
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.x, r45.zwzz, t2.xxxx, s4, r11.x
              mul r14.x, r14.x, r44.y
              mad r13.w, r44.x, r13.w, r14.x
              mul r45.xyzw, -r37.ywyw, r41.zzxx
              mad r35.xy, r38.zwzz, r35.zwzz, r36.xyxx
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.x, r35.xyxx, t2.xxxx, s4, r11.x
              mad r13.w, r45.x, r14.x, r13.w
              mov r39.y, r38.w
              mad r35.xy, r39.xyxx, r35.zwzz, r36.xyxx
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.x, r35.xyxx, t2.xxxx, s4, r11.x
              mad r13.w, r45.y, r14.x, r13.w
              mov r42.w, r38.y
              mad r46.xyzw, r42.wywz, r35.zwzw, r36.xyxy
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.x, r46.xyxx, t2.xxxx, s4, r11.x
              mad r13.w, r44.z, r14.x, r13.w
              mov r38.yw, r42.yyyz
              mad r47.xyzw, r38.xyzy, r35.zwzw, r36.xyxy
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.x, r47.xyxx, t2.xxxx, s4, r11.x
              mad r13.w, r44.w, r14.x, r13.w
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.x, r47.zwzz, t2.xxxx, s4, r11.x
              mad r13.w, r45.z, r14.x, r13.w
              mov r39.zw, r38.yyyw
              mad r44.xyzw, r39.xzxw, r35.zwzw, r36.xyxy
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.x, r44.xyxx, t2.xxxx, s4, r11.x
              mad r13.w, r45.w, r14.x, r13.w
              mul r45.xyzw, r37.zxzx, -r41.yyww
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.x, r46.zwzz, t2.xxxx, s4, r11.x
              mad r13.w, r45.x, r14.x, r13.w
              mad r46.xyzw, r38.xwzw, r35.zwzw, r36.xyxy
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.x, r46.xyxx, t2.xxxx, s4, r11.x
              mad r13.w, r45.y, r14.x, r13.w
              mul r37.xyzw, r37.ywyw, r41.yyww
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.x, r46.zwzz, t2.xxxx, s4, r11.x
              mad r13.w, r37.x, r14.x, r13.w
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.x, r44.zwzz, t2.xxxx, s4, r11.x
              mad r13.w, r37.y, r14.x, r13.w
              mov r43.x, r42.w
              mad r35.xy, r43.xyxx, r35.zwzz, r36.xyxx
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.x, r35.xyxx, t2.xxxx, s4, r11.x
              mad r13.w, r45.z, r14.x, r13.w
              mov r43.zw, r38.xxxz
              mad r38.xyzw, r43.zywy, r35.zwzw, r36.xyxy
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.x, r38.xyxx, t2.xxxx, s4, r11.x
              mad r13.w, r45.w, r14.x, r13.w
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.x, r38.zwzz, t2.xxxx, s4, r11.x
              mad r13.w, r37.z, r14.x, r13.w
              mov r43.x, r39.x
              mad r35.xy, r43.xyxx, r35.zwzz, r36.xyxx
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r11.x, r35.xyxx, t2.xxxx, s4, r11.x
              mad r11.x, r37.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, r31.z
            if_nz r34.x
              if_z r10.w
                mad r34.xy, r34.ywyy, r40.xyxx, r40.zwzz
                sample_l_indexable(texture2d)(float,float,float,float) r34.xyw, r34.xyxx, t2.xywz, s2, l(0.000000)
              else 
                mov r34.xyw, l(1.000000,0,0,1.000000)
              endif 
              mul r34.xyw, r31.zzzz, r34.xyxw
            else 
              mov r34.xyw, r31.zzzz
            endif 
            movc r31.xyz, r34.zzzz, r11.xxxx, r34.xywx
          endif 
          mul r31.xyz, r32.xyzx, r31.xyzx
          dp3_sat r10.w, r12.xzyx, r33.xyzx
          mad r26.xyz, r10.wwww, r31.xyzx, r26.xyzx
          mad r30.xyz, r30.xyzx, r11.zzzz, r5.xwyx
          dp3 r11.x, r30.xyzx, r30.xyzx
          rsq r11.x, r11.x
          mul r30.xyz, r11.xxxx, r30.xyzx
          dp3 r11.x, r30.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 r32.xyz, r20.xyzx, r11.xxxx, r7.xyzx
          dp3_sat r11.x, r4.xzyx, r33.xyzx
          dp3 r34.x, r8.yzwy, r33.xyzx
          dp3 r34.y, r10.zyxz, r33.xyzx
          mul r33.xy, r34.xyxx, r34.xyxx
          mul r11.z, r14.w, r33.y
          mad r11.z, r13.y, r33.x, r11.z
          mad r11.z, r11.x, r11.x, r11.z
          sqrt r11.z, r11.z
          mul r11.z, r11.z, r11.w
          mad r11.z, r11.x, r12.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 r32.xyz, r11.zzzz, r32.xyzx
          mul r32.xyz, r11.xxxx, r32.xyzx
          dp3 r33.x, r30.xyzx, r8.yzwy
          dp3 r33.y, r30.zyxz, r10.xyzx
          dp3 r11.x, r30.xzyx, r4.xyzx
          mul r30.xy, r33.xyxx, r33.xyxx
          div r11.z, r30.x, r13.y
          mad r11.x, r11.x, r11.x, r11.z
          div r11.z, r30.y, r14.w
          add r11.x, r11.z, r11.x
          mul r11.x, r11.x, r11.x
          mul r11.x, r1.w, r11.x
          div r11.x, l(1.000000, 1.000000, 1.000000, 1.000000), r11.x
          mul r30.xyz, r11.xxxx, r31.xyzx
          mad r27.xyz, r32.xyzx, r30.xyzx, r27.xyzx
          mad r30.xyz, r10.wwww, r31.xyzx, r29.xyzx
          movc r29.xyz, r8.xxxx, r30.xyzx, r29.xyzx
          iadd r7.w, r7.w, l(1)
          mov r3.x, r9.w
        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), t15.xxxx
        countbits r1.z, r1.y
        mov r18.xyz, r2.xyzx
        mov r18.w, l(1.000000)
        mov r16.xyz, r26.xyzx
        mov r19.xyz, r27.xyzx
        mov r17.xyz, r28.xyzx
        mov r23.xyz, r29.xyzx
        mov r3.x, r1.y
        mov r7.w, l(0)
        loop 
          uge r8.x, r7.w, r1.z
          breakc_nz r8.x
          firstbit_lo r8.x, r3.x
          ishl r9.w, l(1), r8.x
          not r9.w, r9.w
          and r9.w, r3.x, r9.w
          iadd r8.x, l(32), r8.x
          ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r21.xyzw, r8.x, l(0), t13.xyzw
          ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r22.xyz, r8.x, l(32), t13.xyzx
          ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r24.xyzw, r8.x, l(48), t13.xyzw
          and r10.w, r24.w, l(1)
          ult r10.w, l(0), r10.w
          add r21.xyz, -r2.xyzx, r21.xyzx
          dp3 r11.x, r21.xyzx, r21.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, r21.w
          mul r25.xyz, r11.zzzz, r21.xyzx
          mul r11.x, r11.x, r11.x
          mad_sat r11.x, -r11.x, r24.x, l(1.000000)
          mul r11.x, r11.x, r11.x
          mul r11.x, r11.x, r13.w
          dp3 r13.w, r25.xyzx, -r22.xyzx
          mad_sat r13.w, r13.w, r24.y, r24.z
          movc r13.w, r10.w, r13.w, l(1.000000)
          mul r13.w, r13.w, r13.w
          mul r22.xyz, r11.xxxx, r13.wwww
          lt r11.x, r22.z, l(0.000100)
          iadd r13.w, r7.w, -r11.x
          mov r3.x, r9.w
          mov r7.w, r13.w
          continuec_nz r11.x
          ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r24.xyz, r8.x, l(16), t13.xyzx
          and r8.x, r24.w, l(2)
          ult r8.x, l(0), r8.x
          and r10.w, r2.w, r10.w
          if_nz r10.w
            and r30.xy, r24.wwww, l(32, 16, 0, 0)
            ult r30.yz, l(0, 0, 0, 0), r30.xxyx
            ushr r10.w, r24.w, l(5)
            and r10.w, r10.w, l(2)
            or r11.x, r30.z, r30.y
            and r11.x, r2.w, r11.x
            if_nz r11.x
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r31.xyzw, r10.w, l(0), t14.xyzw
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r32.xyzw, r10.w, l(16), t14.xyzw
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r33.xyzw, r10.w, l(32), t14.xyzw
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r34.xyzw, r10.w, l(48), t14.xyzw
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r35.xyzw, r10.w, l(64), t14.xyzw
              ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r36.xyzw, r10.w, l(80), t14.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, r18.xyzw, r32.xyzw
            dp4 r32.y, r18.xyzw, r33.xyzw
            dp4 r11.x, r18.xyzw, r34.xyzw
            dp4 r13.w, r18.xyzw, r35.xyzw
            max r13.w, r13.w, l(0.000010)
            div r30.yw, r32.xxxy, r13.wwww
            if_z r10.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 r13.w, r31.x, r33.w
              add r35.x, r13.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 r13.w, r31.y, r37.w
              add r39.y, r13.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) r13.w, r41.xyxx, t2.xxxx, s4, r11.x
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.x, r41.zwzz, t2.xxxx, s4, r11.x
              mul r14.x, r14.x, r40.y
              mad r13.w, r40.x, r13.w, r14.x
              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) r14.x, r31.xyxx, t2.xxxx, s4, r11.x
              mad r13.w, r41.x, r14.x, r13.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) r14.x, r31.xyxx, t2.xxxx, s4, r11.x
              mad r13.w, r41.y, r14.x, r13.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) r14.x, r42.xyxx, t2.xxxx, s4, r11.x
              mad r13.w, r40.z, r14.x, r13.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) r14.x, r43.xyxx, t2.xxxx, s4, r11.x
              mad r13.w, r40.w, r14.x, r13.w
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.x, r43.zwzz, t2.xxxx, s4, r11.x
              mad r13.w, r41.z, r14.x, r13.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) r14.x, r40.xyxx, t2.xxxx, s4, r11.x
              mad r13.w, r41.w, r14.x, r13.w
              mul r41.xyzw, r33.zxzx, -r37.yyww
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.x, r42.zwzz, t2.xxxx, s4, r11.x
              mad r13.w, r41.x, r14.x, r13.w
              mad r42.xyzw, r34.xwzw, r31.zwzw, r32.xyxy
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.x, r42.xyxx, t2.xxxx, s4, r11.x
              mad r13.w, r41.y, r14.x, r13.w
              mul r33.xyzw, r33.ywyw, r37.yyww
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.x, r42.zwzz, t2.xxxx, s4, r11.x
              mad r13.w, r33.x, r14.x, r13.w
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.x, r40.zwzz, t2.xxxx, s4, r11.x
              mad r13.w, r33.y, r14.x, r13.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) r14.x, r31.xyxx, t2.xxxx, s4, r11.x
              mad r13.w, r41.z, r14.x, r13.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) r14.x, r34.xyxx, t2.xxxx, s4, r11.x
              mad r13.w, r41.w, r14.x, r13.w
              sample_c_lz_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r14.x, r34.zwzz, t2.xxxx, s4, r11.x
              mad r13.w, r33.z, r14.x, r13.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) r11.x, r31.xyxx, t2.xxxx, s4, r11.x
              mad r11.x, r33.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, r22.z
            if_nz r30.x
              if_z r10.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, r22.zzzz, r30.xyxw
            else 
              mov r30.xyw, r22.zzzz
            endif 
            movc r22.xyz, r30.zzzz, r11.xxxx, r30.xywx
          endif 
          mul r22.xyz, r24.xyzx, r22.xyzx
          dp3_sat r10.w, r12.xzyx, r25.xyzx
          mad r16.xyz, r10.wwww, r22.xyzx, r16.xyzx
          mad r21.xyz, r21.xyzx, r11.zzzz, r5.xwyx
          dp3 r11.x, r21.xyzx, r21.xyzx
          rsq r11.x, r11.x
          mul r21.xyz, r11.xxxx, r21.xyzx
          dp3 r11.x, r21.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 r24.xyz, r20.xyzx, r11.xxxx, r7.xyzx
          dp3_sat r11.x, r4.xzyx, r25.xyzx
          dp3 r30.x, r8.yzwy, r25.xyzx
          dp3 r30.y, r10.zyxz, r25.xyzx
          mul r25.xy, r30.xyxx, r30.xyxx
          mul r11.z, r14.w, r25.y
          mad r11.z, r13.y, r25.x, r11.z
          mad r11.z, r11.x, r11.x, r11.z
          sqrt r11.z, r11.z
          mul r11.z, r11.z, r11.w
          mad r11.z, r11.x, r12.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 r24.xyz, r11.zzzz, r24.xyzx
          mul r24.xyz, r11.xxxx, r24.xyzx
          dp3 r25.x, r21.xyzx, r8.yzwy
          dp3 r25.y, r21.zyxz, r10.xyzx
          dp3 r11.x, r21.xzyx, r4.xyzx
          mul r21.xy, r25.xyxx, r25.xyxx
          div r11.z, r21.x, r13.y
          mad r11.x, r11.x, r11.x, r11.z
          div r11.z, r21.y, r14.w
          add r11.x, r11.z, r11.x
          mul r11.x, r11.x, r11.x
          mul r11.x, r1.w, r11.x
          div r11.x, l(1.000000, 1.000000, 1.000000, 1.000000), r11.x
          mul r21.xyz, r11.xxxx, r22.xyzx
          mad r19.xyz, r24.xyzx, r21.xyzx, r19.xyzx
          mad r21.xyz, r10.wwww, r22.xyzx, r23.xyzx
          movc r23.xyz, r8.xxxx, r21.xyzx, r23.xyzx
          iadd r7.w, r7.w, l(1)
          mov r3.x, r9.w
        endloop 
      endif 
    endif 
  endif 
  ld_indexable(texture2d)(float,float,float,float) r2.xyzw, r0.xyzw, t19.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, r50.xxyz
  mov r8.x, l(1.000000)
  dp4 r18.x, cb0[38].xyzw, r8.xyzw
  dp4 r18.y, cb0[37].xyzw, r8.xyzw
  dp4 r18.z, cb0[36].xyzw, r8.xyzw
  max r18.xyz, r18.xyzx, 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, t7.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 r20.x, cb5[15].xyzw, r8.xyzw
  dp4 r20.y, cb5[16].xyzw, r8.xyzw
  dp4 r20.z, cb5[17].xyzw, r8.xyzw
  max r8.xyz, r20.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
  mad r8.xyz, r8.xyzx, cb0[56].xxxx, -r18.xyzx
  mad r8.xyz, r0.wwww, r8.xyzx, r18.xyzx
  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, r12.xyxz, r4.xyxz
  mul r4.xyz, r10.xyzx, r5.xywx
  mad r4.xyz, r5.ywxy, r10.zxyz, -r4.xyzx
  mul r8.xyz, r4.xyzx, r10.xyzx
  mad r4.xyz, r10.yzxy, r4.zxyz, -r8.xyzx
  add r4.xyz, -r3.xywx, r4.xyzx
  mad r3.xyw, r6.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, r14.y
  ld_structured_indexable(structured_buffer, stride=132)(mixed,mixed,mixed,mixed) r8.xyzw, l(0), l(108), t4.xywz
  dp3 r4.x, r8.xywx, l(0.212600, 0.715200, 0.072200, 0.000000)
  ld_structured_indexable(structured_buffer, stride=132)(mixed,mixed,mixed,mixed) r8.xy, l(0), l(124), t4.xyxx
  dp3 r4.y, r8.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, r14.z, 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)
  mad r4.xyz, r16.xyzx, r3.wwww, r17.xyzx
  mul r5.xyz, r1.yzwy, r2.wwww
  mad r4.xyz, r1.yzwy, r2.wwww, r4.xyzx
  mad r7.xyz, r23.xyzx, r3.wwww, r5.xyzx
  dp3 r2.w, r7.xyzx, l(0.212600, 0.715200, 0.072200, 0.000000)
  mul r7.xyz, r9.xxxx, r19.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, -r6.y, l(1.000000)
  add r3.x, -r6.z, l(1.000000)
  ftou r3.y, r6.w
  and r3.y, r3.y, l(1)
  utof r3.y, r3.y
  mad r6.xyz, r3.yyyy, l(-0.500000, -0.300000, -0.800000, 0.000000), l(1.000000, 1.000000, 1.000000, 0.000000)
  mul r3.xyz, r3.xxxx, r6.xyzx
  mul r3.xyz, r3.xyzx, r15.xyzx
  mad r5.xyz, r16.xyzx, r3.wwww, r5.xyzx
  mul r5.xyz, r5.xyzx, r15.xyzx
  mul r3.xyz, r17.xyzx, r3.xyzx
  mul r3.xyz, r0.zzzz, r3.xyzx
  mad r3.xyz, r5.xyzx, r0.zzzz, r3.xyzx
  mad r1.yzw, r7.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, r15.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, r15.xyzx, r1.yzwy
  dp3 r0.w, r4.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), t16.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), t17.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), t6.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, t6.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 2333 instruction slots used