// asmtool.py -i --fix-fcprimal-reflection --only-autofixed -fq 0c1abd00e90f6697-ps.txt
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
//   using 3Dmigoto v1.2.31 on Wed Mar 02 08:06:24 2016
//
//
// Buffer Definitions: 
//
// cbuffer CViewportShaderParameterProvider
// {
//
//   float4x4 InvProjectionMatrix;      // Offset:    0 Size:    64
//   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 [unused]
//   float4 FogSHG;                     // Offset:  592 Size:    16 [unused]
//   float4 FogSHR;                     // Offset:  608 Size:    16 [unused]
//   float4 HeightFogParams;            // Offset:  624 Size:    16
//   float4 ViewportSize;               // Offset:  640 Size:    16
//   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
//   float3 EnvironmentMapColorOffset;  // Offset:  784 Size:    12 [unused]
//   float3 EnvironmentMapColorScale;   // Offset:  800 Size:    12 [unused]
//   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 [unused]
//   float ShadowCSMLastSliceIndex;     // Offset:  888 Size:     4
//   float UseNormalization;            // Offset:  892 Size:     4
//   float FogUndergroundColorScale;    // Offset:  896 Size:     4 [unused]
//
// }
//
// cbuffer CWaterReflectionParameterProvider
// {
//
//   float4x4 WaterReflectionTransform; // Offset:    0 Size:    64
//   float4 WaterReflectionPlane;       // Offset:   64 Size:    16 [unused]
//   float4 WaterReflectionTexCoordRange;// Offset:   80 Size:    16 [unused]
//   float WaterLevelAdjustment;        // Offset:   96 Size:     4 [unused]
//
// }
//
// cbuffer CSceneTerrainSkyOcclusionAtlasPrivateData
// {
//
//   float4 SectorOcclusion_OffsetScale;// Offset:    0 Size:    16
//   float3 SectorOcclusion_DistanceFade;// Offset:   16 Size:    12
//   float2 SectorOcclusion_HeightOffsetScale;// Offset:   32 Size:     8
//
// }
//
// cbuffer CAmbientProvider
// {
//
//   float4 CascadeDistanceScales[5];   // Offset:    0 Size:    80 [unused]
//   float4 CascadeNearFarSnappedOffsetCamera[5];// Offset:   80 Size:    80 [unused]
//   float4 CascadeNearFarRcpUVSize[5]; // Offset:  160 Size:    80 [unused]
//   float4 UndergroundSHR;             // Offset:  240 Size:    16
//   float4 UndergroundSHG;             // Offset:  256 Size:    16
//   float4 UndergroundSHB;             // Offset:  272 Size:    16
//   float InvUndergroundBlendEndHeight;// Offset:  288 Size:     4
//   float IndirectLightingScale;       // Offset:  292 Size:     4 [unused]
//
// }
//
// cbuffer CWaterParameterProvider
// {
//
//   float4 BorderAlphaMask;            // Offset:    0 Size:    16 [unused]
//   float ReflectionInvSquareFadeDistance;// Offset:   16 Size:     4
//   float ReflectionSquareFadeDistance;// Offset:   20 Size:     4
//   float SunLightScale;               // Offset:   24 Size:     4
//
// }
//
// cbuffer CWaterWaveParameterProvider
// {
//
//   float4 WaterWave_CameraCenter_FrontVector;// Offset:    0 Size:    16
//   float4 WaterWave_CameraRightVector_;// Offset:   16 Size:    16
//   float4 WaterWave_CameraTanFOVx_2_Near_Far;// Offset:   32 Size:    16
//
// }
//
// cbuffer Water
// {
//
//   float4 Extinctions;                // Offset:    0 Size:    16
//   float4 MaterialPickingID;          // Offset:   16 Size:    16 [unused]
//   float4 RefractionWaveInfo;         // Offset:   32 Size:    16 [unused]
//   float4 Specular;                   // Offset:   48 Size:    16
//   float4 WaterColor;                 // Offset:   64 Size:    16
//   float4 WaterColorModulation;       // Offset:   80 Size:    16
//   float2 BaseTiling;                 // Offset:   96 Size:     8 [unused]
//   float2 DiffuseTiling;              // Offset:  104 Size:     8 [unused]
//   float2 Dir1;                       // Offset:  112 Size:     8 [unused]
//   float2 Dir2;                       // Offset:  120 Size:     8 [unused]
//   float2 Dir3;                       // Offset:  128 Size:     8 [unused]
//   float2 Tiling1;                    // Offset:  136 Size:     8 [unused]
//   float2 Tiling2;                    // Offset:  144 Size:     8 [unused]
//   float2 Tiling3;                    // Offset:  152 Size:     8 [unused]
//   float CausticsIntensity;           // Offset:  160 Size:     4
//   float CausticsScale;               // Offset:  164 Size:     4
//   float DiffuseSpeedFactor;          // Offset:  168 Size:     4 [unused]
//   float NormalModifier;              // Offset:  172 Size:     4
//   float NormalOffsetScale;           // Offset:  176 Size:     4
//   float NormalTexture3Blend;         // Offset:  180 Size:     4
//   float ReflectionAnisotropicDistanceOffset;// Offset:  184 Size:     4 [unused]
//   float ReflectionAnisotropicDistanceScale;// Offset:  188 Size:     4 [unused]
//   float ReflectionColorOffset;       // Offset:  192 Size:     4
//   float ReflectionColorScale;        // Offset:  196 Size:     4
//   float ReflectionNormalOffsetScale; // Offset:  200 Size:     4
//
// }
//
// cbuffer CVolumetricFogBlendedProvider
// {
//
//   float4 VFDepthDistribution;        // Offset:    0 Size:    16
//   float4 VFDepthParams;              // Offset:   16 Size:    16 [unused]
//   int4 VFCellParams;                 // Offset:   32 Size:    16
//
// }
//
// cbuffer CTileLightingBlendedParameterProvider
// {
//
//   float4 CSMSlice0_0;                // Offset:    0 Size:    16
//   float4 CSMSlice0_1;                // Offset:   16 Size:    16
//   float4 CSMSlice0_2;                // Offset:   32 Size:    16
//   float4 CSMSlice1_0;                // Offset:   48 Size:    16
//   float4 CSMSlice1_1;                // Offset:   64 Size:    16
//   float4 CSMSlice1_2;                // Offset:   80 Size:    16
//   float4 CSMSlice2_0;                // Offset:   96 Size:    16
//   float4 CSMSlice2_1;                // Offset:  112 Size:    16
//   float4 CSMSlice2_2;                // Offset:  128 Size:    16
//   float4 CSMSliceFade;               // Offset:  144 Size:    16 [unused]
//   float4 ShadowMapSize;              // Offset:  160 Size:    16
//   float4 SunColor;                   // Offset:  176 Size:    16
//   float4 SunDirection;               // Offset:  192 Size:    16
//   int2 NumTiles;                     // Offset:  208 Size:     8
//   int LightCount;                    // Offset:  216 Size:     4 [unused]
//   int ParticlesSmallBufferFactor;    // Offset:  220 Size:     4 [unused]
//
// }
//
// Resource bind info for ExposureBuffer
// {
//
//   float4 $Element;                   // Offset:    0 Size:    16
//
// }
//
// Resource bind info for SHOccGlobalProbe
// {
//
//   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 LightIndicesPerTileForBlended
// {
//
//   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
// ------------------------------ ---------- ------- ----------- ---- --------
// DepthVPSampler__SampObj__         sampler      NA          NA    0        1
// EnvironmentMapTexture__SampObj__    sampler      NA          NA    1        1
// EnvironmentMapBRDFTexture__SampObj__    sampler      NA          NA    2        1
// SectorHemiMapSamplerStateLinear    sampler      NA          NA    3        1
// WaterWaveTexture__SampObj__       sampler      NA          NA    4        1
// NormalTexture__SampObj__          sampler      NA          NA    5        1
// NormalTexture3__SampObj__         sampler      NA          NA    6        1
// CausticsTexture__SampObj__        sampler      NA          NA    7        1
// DiffuseTexture__SampObj__         sampler      NA          NA    8        1
// ColorClamp3D                      sampler      NA          NA    9        1
// ShadowCmpSampler                sampler_c      NA          NA   10        1
// ProjectedTexture0__SampObj__      sampler      NA          NA   11        1
// ReflectionRealTexture__SampObj__    sampler      NA          NA   12        1
// DepthVPSampler__TexObj__          texture  float4          2d    0        1
// EnvironmentMapTexture__TexObj__    texture  float4        cube    1        1
// EnvironmentMapBRDFTexture__TexObj__    texture  float4          2d    2        1
// ExposureBuffer                    texture  struct         r/o    3        1
// SHOccGlobalProbe                  texture  struct         r/o    4        1
// SkyParamBuffer                    texture  struct         r/o    5        1
// SectorOcclusion_HeightTexture__TexObj__    texture  float4          2d    6        1
// WaterWaveTexture__TexObj__        texture  float4          2d    7        1
// NormalTexture__TexObj__           texture  float4          2d    8        1
// NormalTexture3__TexObj__          texture  float4          2d    9        1
// CausticsTexture__TexObj__         texture  float4          2d   10        1
// DiffuseTexture__TexObj__          texture  float4          2d   11        1
// VFVolumeTextureRGB                texture  float4          3d   12        1
// VFVolumeTextureAlpha              texture  float4          3d   13        1
// ShadowCmpSampler_TextureObject    texture  float4     2darray   14        1
// ProjectedTexture0__TexObj__       texture  float4          2d   15        1
// DeferredShadowTexture             texture  float4          2d   16        1
// ReflectionRealTexture__TexObj__    texture  float4          2d   17        1
// LightsLightingData                texture  struct         r/o   18        1
// ShadowData                        texture  struct         r/o   19        1
// LightIndicesPerTileForBlended     texture  struct         r/o   20        1
// LightOutputPerTileForBlended      texture  struct         r/o   21        1
// CViewportShaderParameterProvider    cbuffer      NA          NA    0        1
// CWaterReflectionParameterProvider    cbuffer      NA          NA    1        1
// CSceneTerrainSkyOcclusionAtlasPrivateData    cbuffer      NA          NA    2        1
// CAmbientProvider                  cbuffer      NA          NA    3        1
// CWaterParameterProvider           cbuffer      NA          NA    4        1
// CWaterWaveParameterProvider       cbuffer      NA          NA    5        1
// Water                             cbuffer      NA          NA    6        1
// CVolumetricFogBlendedProvider     cbuffer      NA          NA    7        1
// CTileLightingBlendedParameterProvider    cbuffer      NA          NA    8        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float   xy  
// TEXCOORD                 0   xyzw        1     NONE   float   xyzw
// TEXCOORD                 1   xyzw        2     NONE   float   xyzw
// TEXCOORD                 2   xyz         3     NONE   float   xyz 
// TEXCOORD                 3   xyz         4     NONE   float   xyz 
// TEXCOORD                 4   xyz         5     NONE   float   xyz 
// TEXCOORD                 5   xyz         6     NONE   float   xyz 
// TEXCOORD                 6   xyzw        7     NONE   float   xyzw
// SV_IsFrontFace           0   x           8    FFACE    uint       
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[56], immediateIndexed
dcl_constantbuffer cb1[4], immediateIndexed
dcl_constantbuffer cb2[3], immediateIndexed
dcl_constantbuffer cb3[19], immediateIndexed
dcl_constantbuffer cb4[2], immediateIndexed
dcl_constantbuffer cb5[3], immediateIndexed
dcl_constantbuffer cb6[13], immediateIndexed
dcl_constantbuffer cb7[3], immediateIndexed
dcl_constantbuffer cb8[14], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_sampler s2, mode_default
dcl_sampler s3, mode_default
dcl_sampler s4, mode_default
dcl_sampler s5, mode_default
dcl_sampler s6, mode_default
dcl_sampler s7, mode_default
dcl_sampler s8, mode_default
dcl_sampler s9, mode_default
dcl_sampler s10, mode_comparison
dcl_sampler s11, mode_default
dcl_sampler s12, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texturecube (float,float,float,float) t1
dcl_resource_texture2d (float,float,float,float) t2
dcl_resource_structured t3, 16 
dcl_resource_structured t4, 16 
dcl_resource_structured t5, 132 
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_texture3d (float,float,float,float) t12
dcl_resource_texture3d (float,float,float,float) t13
dcl_resource_texture2darray (float,float,float,float) t14
dcl_resource_texture2d (float,float,float,float) t15
dcl_resource_texture2d (float,float,float,float) t16
dcl_resource_texture2d (float,float,float,float) t17
dcl_resource_structured t18, 128 
dcl_resource_structured t19, 96 
dcl_resource_structured t20, 4 
dcl_resource_structured t21, 4 
dcl_input_ps_siv linear noperspective centroid v0.xy, position
dcl_input_ps linear v1.xyzw
dcl_input_ps linear centroid v2.xyzw
dcl_input_ps linear v3.xyz
dcl_input_ps linear v4.xyz
dcl_input_ps linear v5.xyz
dcl_input_ps linear v6.xyz
dcl_input_ps linear v7.xyzw
dcl_output o0.xyzw
dcl_temps 28

// 3DMigoto StereoParams:
dcl_resource_texture2d (float,float,float,float) t125
// stereo2mono copy of t17:
dcl_resource_texture2d (float,float,float,float) t100

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

dp3 r0.x, v3.xyzx, v3.xyzx
sqrt r0.x, r0.x
add r0.yzw, -v4.xxzy, cb0[42].xxzy
dp3 r1.x, r0.yzwy, r0.yzwy
rsq r1.x, r1.x
mul r1.yzw, r0.yyzw, r1.xxxx
sample_indexable(texture2d)(float,float,float,float) r2.xyz, v1.yxyy, t8.xywz, s5
mad r2.yz, r2.zzyz, l(0.000000, 2.007874, 2.007874, 0.000000), l(0.000000, -1.000000, -1.000000, 0.000000)
mul r2.yw, r2.yyyz, cb6[10].wwww
dp2 r3.x, r2.ywyy, r2.ywyy
min r3.x, r3.x, l(1.000000)
mad r3.x, -r3.x, l(0.999000), l(1.000000)
sqrt r2.z, r3.x
sample_indexable(texture2d)(float,float,float,float) r3.xyz, v1.wzww, t8.xywz, s5
mul r3.x, r3.x, l(0.500000)
mad r3.yz, r3.zzyz, l(0.000000, 2.007874, 2.007874, 0.000000), l(0.000000, -1.000000, -1.000000, 0.000000)
mul r3.yw, r3.yyyz, cb6[10].wwww
dp2 r4.x, r3.ywyy, r3.ywyy
min r4.x, r4.x, l(1.000000)
mad r4.x, -r4.x, l(0.999000), l(1.000000)
sqrt r3.z, r4.x
sample_indexable(texture2d)(float,float,float,float) r4.xyz, v7.yxyy, t9.xywz, s6
mad r4.yz, r4.zzyz, l(0.000000, 2.007874, 2.007874, 0.000000), l(0.000000, -1.000000, -1.000000, 0.000000)
mul r4.yw, r4.yyyz, cb6[10].wwww
dp2 r5.x, r4.ywyy, r4.ywyy
min r5.x, r5.x, l(1.000000)
mad r5.x, -r5.x, l(0.999000), l(1.000000)
sqrt r4.z, r5.x
add r2.yzw, r2.yyzw, r3.yyzw
add r3.yzw, -r2.yyzw, r4.yyzw
mad r2.yzw, cb6[11].yyyy, r3.yyzw, r2.yyzw
dp3 r3.y, r2.yzwy, r2.yzwy
rsq r3.y, r3.y
mad r2.x, r2.x, l(0.500000), r3.x
add r3.x, -r2.x, r4.x
mad r2.x, cb6[11].y, r3.x, r2.x
mov_sat r3.x, cb6[10].w
add r2.x, r2.x, l(-1.000000)
mad r2.x, r3.x, r2.x, l(1.000000)
mul r2.x, r2.x, cb6[3].x
mul r4.x, r0.x, l(0.010000)
add r3.xz, v4.xxyx, -cb5[0].xxyx
dp2 r3.x, cb5[0].zwzz, r3.xzxx
mul r3.z, cb5[2].z, cb5[2].y
div r3.x, l(1.000000, 1.000000, 1.000000, 1.000000), r3.x
mad r3.x, r3.z, r3.x, -cb5[2].z
add r3.w, -cb5[2].z, cb5[2].y
div r3.x, r3.x, r3.w
mov r5.x, -r4.x
mov r5.y, l(0)
add r5.xy, r5.xyxx, v4.xyxx
add r5.xy, r5.xyxx, -cb5[0].xyxx
dp2 r4.w, cb5[0].zwzz, r5.xyxx
dp2 r5.x, cb5[1].xyxx, r5.xyxx
div r5.y, l(1.000000, 1.000000, 1.000000, 1.000000), r4.w
mad r5.y, r3.z, r5.y, -cb5[2].z
div r6.y, r5.y, r3.w
mul r4.w, r4.w, cb5[2].x
div r4.w, r5.x, r4.w
mad r6.x, r4.w, l(0.500000), l(0.500000)
mov r4.y, l(0)
add r5.xyzw, r4.xyyx, v4.xyxy
add r5.xyzw, r5.xyzw, -cb5[0].xyxy
dp2 r4.w, cb5[0].zwzz, r5.xyxx
dp2 r5.x, cb5[1].xyxx, r5.xyxx
div r5.y, l(1.000000, 1.000000, 1.000000, 1.000000), r4.w
mad r5.y, r3.z, r5.y, -cb5[2].z
div r7.y, r5.y, r3.w
mul r4.w, r4.w, cb5[2].x
div r4.w, r5.x, r4.w
mad r7.x, r4.w, l(0.500000), l(0.500000)
mov r4.z, -r4.x
add r4.yz, r4.yyzy, v4.xxyx
add r4.yz, r4.yyzy, -cb5[0].xxyx
dp2 r4.w, cb5[0].zwzz, r4.yzyy
dp2 r4.y, cb5[1].xyxx, r4.yzyy
div r4.z, l(1.000000, 1.000000, 1.000000, 1.000000), r4.w
mad r4.z, r3.z, r4.z, -cb5[2].z
div r5.y, r4.z, r3.w
mul r4.z, r4.w, cb5[2].x
div r4.y, r4.y, r4.z
mad r5.x, r4.y, l(0.500000), l(0.500000)
dp2 r4.y, cb5[0].zwzz, r5.zwzz
dp2 r4.z, cb5[1].xyxx, r5.zwzz
div r4.w, l(1.000000, 1.000000, 1.000000, 1.000000), r4.y
mad r3.z, r3.z, r4.w, -cb5[2].z
div r8.y, r3.z, r3.w
mul r3.z, r4.y, cb5[2].x
div r3.z, r4.z, r3.z
mad r8.x, r3.z, l(0.500000), l(0.500000)
sample_indexable(texture2d)(float,float,float,float) r3.z, r6.xyxx, t7.yzxw, s4
sample_indexable(texture2d)(float,float,float,float) r3.w, r7.xyxx, t7.yzwx, s4
sample_indexable(texture2d)(float,float,float,float) r4.y, r5.xyxx, t7.yxzw, s4
sample_indexable(texture2d)(float,float,float,float) r4.z, r8.xyxx, t7.yzxw, s4
add r5.w, -r3.z, r3.w
add r5.y, -r4.y, r4.z
div r3.zw, r5.yyyw, r4.xxxx
add r3.x, r3.x, l(-0.900000)
mul_sat r3.x, r3.x, l(10.000000)
mad r3.x, r3.x, l(-0.050000), l(0.050000)
mul r4.yw, r3.xxxx, r3.zzzw
mov r4.z, l(0)
mad r2.yzw, r2.yyzw, r3.yyyy, r4.yyzw
dp3 r3.x, r2.yzwy, r2.yzwy
rsq r3.x, r3.x
mul r3.yzw, r2.yyzw, r3.xxxx
mad r2.yz, r3.wwyw, cb6[11].xxxx, v7.zzwz
sample_indexable(texture2d)(float,float,float,float) r4.xyzw, r2.yzyy, t11.xyzw, s8
mad r5.xy, r3.wyww, cb6[11].xxxx, v4.xyxx
mul r2.y, |cb0[48].z|, l(0.100000)
dp3 r2.z, r3.wzyw, r1.yzwy
mov_sat r2.w, r2.z
mad r6.x, r2.w, l(0.968750), l(0.015625)
mad r6.y, r2.x, l(0.968750), l(0.015625)
sample_l_indexable(texture2d)(float,float,float,float) r6.xy, r6.xyxx, t2.xyzw, s2, l(0.000000)
mad_sat r2.y, r2.y, r6.y, r6.x
mov r3.x, l(1.000000)
mul r6.xyzw, r3.xyzw, l(0.282094806, 0.488602519, 0.488602519, 0.488602519)
ld_structured_indexable(structured_buffer, stride=16)(mixed,mixed,mixed,mixed) r7.xyzw, l(0), l(0), t4.xyzw
ld_structured_indexable(structured_buffer, stride=16)(mixed,mixed,mixed,mixed) r8.xyzw, l(1), l(0), t4.xyzw
ld_structured_indexable(structured_buffer, stride=16)(mixed,mixed,mixed,mixed) r9.xyzw, l(2), l(0), t4.xyzw
dp4 r7.x, r7.xyzw, r6.xyzw
dp4 r7.y, r8.xyzw, r6.xyzw
dp4 r7.z, r9.xyzw, r6.xyzw
max r7.xyz, r7.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
ld_structured_indexable(structured_buffer, stride=132)(mixed,mixed,mixed,mixed) r8.xyzw, l(0), l(108), t5.yzxw
dp3 r3.x, r8.zxyz, l(0.212600, 0.715200, 0.072200, 0.000000)
ld_structured_indexable(structured_buffer, stride=132)(mixed,mixed,mixed,mixed) r8.xyz, l(0), l(120), t5.yzxx
dp3 r7.w, r8.wxyw, l(0.212600, 0.715200, 0.072200, 0.000000)
max r3.x, r3.x, r7.w
ld_structured_indexable(structured_buffer, stride=132)(mixed,mixed,mixed,mixed) r7.w, l(0), l(0), t5.xxxx
ld_structured_indexable(structured_buffer, stride=132)(mixed,mixed,mixed,mixed) r8.w, l(0), l(36), t5.xxxx
ld_structured_indexable(structured_buffer, stride=132)(mixed,mixed,mixed,mixed) r9.x, l(0), l(72), t5.xxxx
max r8.w, r8.w, r9.x
max r7.w, r7.w, r8.w
add r3.x, r3.x, r7.w
mul r9.xyz, r3.xxxx, r7.xyzx
dp4 r10.x, cb3[15].xyzw, r6.xyzw
dp4 r10.y, cb3[16].xyzw, r6.xyzw
dp4 r10.z, cb3[17].xyzw, r6.xyzw
max r6.xyz, r10.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
mad r10.xy, v4.yxyy, cb2[0].yxyy, cb2[0].wzww
sample_l_indexable(texture2d)(float,float,float,float) r6.w, r10.xyxx, t6.xzwy, s3, l(0.000000)
mad r6.w, r6.w, cb2[2].x, cb2[2].y
add r6.w, -r6.w, v4.z
mul_sat r6.w, -r6.w, cb3[18].x
sqrt r6.w, r6.w
add r10.xy, v4.xyxx, -cb0[42].xyxx
dp2 r8.w, r10.xyxx, r10.xyxx
mad r9.w, cb2[1].x, r8.w, cb2[1].y
mul_sat r9.w, r9.w, l(3.000000)
mul r6.w, r6.w, r9.w
mad r6.xyz, -r7.xyzx, r3.xxxx, r6.xyzx
mad r6.xyz, r6.wwww, r6.xyzx, r9.xyzx
div r9.xy, v6.xyxx, v6.zzzz
sample_l_indexable(texture2d)(float,float,float,float) r9.z, r9.xyxx, t0.yzxw, s0, l(0.000000)
mov r9.w, l(1.000000)
dp4 r3.x, r9.xyzw, cb0[2].xyzw
dp4 r6.w, r9.xyzw, cb0[3].xyzw
div r3.x, -r3.x, r6.w
mul r3.x, r0.x, -r3.x
div r3.x, r3.x, v3.z
mad r7.xyz, -r2.xxxx, l(0.990000, 5.000000, 6.000000, 0.000000), l(1.000000, 5.000000, 6.000000, 0.000000)
mul r2.x, r7.x, r7.x
max r2.x, r2.x, l(0.001000)
ftou r9.xy, v0.xyxx
ushr r9.zw, r9.xxxy, l(0, 0, 3, 3)
imad r6.w, r9.w, cb8[13].x, r9.z
ftoi r10.xy, v0.xyxx
mov r10.zw, l(0,0,0,0)
ld_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r7.x, r10.xyzw, t16.xyzw
mov r5.z, v4.z
mov r5.w, l(1.000000)
dp4 r10.x, r5.xyzw, cb8[6].xyzw
dp4 r10.y, r5.xyzw, cb8[7].xyzw
dp4 r10.z, r5.xyzw, cb8[8].xyzw
dp4 r11.x, r5.xyzw, cb8[3].xyzw
dp4 r11.y, r5.xyzw, cb8[4].xyzw
dp4 r11.z, r5.xyzw, cb8[5].xyzw
add r12.xyz, r11.xyzx, l(-0.000000, -0.000000, -0.001000, 0.000000)
ge r13.xyz, r12.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
and r13.xyz, r13.xyzx, l(0x3f800000, 0x3f800000, 0x3f800000, 0)
ge r12.xyz, l(1.000000, 1.000000, 1.000000, 0.000000), r12.xyzx
and r12.xyz, r12.xyzx, l(0x3f800000, 0x3f800000, 0x3f800000, 0)
mul r12.xyz, r12.xyzx, r13.xyzx
dp3 r9.z, r12.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
ge r9.z, r9.z, l(3.000000)
mov r11.w, l(1.000000)
mov r10.w, l(2.000000)
movc r12.xyzw, r9.zzzz, r11.xyzw, r10.xyzw
dp4 r13.x, r5.xyzw, cb8[0].xyzw
dp4 r13.y, r5.xyzw, cb8[1].xyzw
dp4 r13.z, r5.xyzw, cb8[2].xyzw
add r14.xyz, r13.xyzx, l(-0.000000, -0.000000, -0.001000, 0.000000)
ge r15.xyz, r14.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
and r15.xyz, r15.xyzx, l(0x3f800000, 0x3f800000, 0x3f800000, 0)
ge r14.xyz, l(1.000000, 1.000000, 1.000000, 0.000000), r14.xyzx
and r14.xyz, r14.xyzx, l(0x3f800000, 0x3f800000, 0x3f800000, 0)
mul r14.xyz, r14.xyzx, r15.xyzx
dp3 r9.z, r14.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
ge r9.z, r9.z, l(3.000000)
mov r13.w, l(0)
movc r12.xyzw, r9.zzzz, r13.xyzw, r12.xyzw
min r14.z, r12.w, cb0[55].z
eq r9.z, r14.z, cb0[55].z
if_nz r9.z
  mad r9.zw, r10.xxxy, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, -1.000000, -1.000000)
  add r9.zw, |r9.zzzw|, l(0.000000, 0.000000, -0.800000, -0.800000)
  mul_sat r9.zw, r9.zzzw, l(0.000000, 0.000000, 5.000000, 5.000000)
  add r9.zw, -r9.zzzw, l(0.000000, 0.000000, 1.000000, 1.000000)
  add r10.w, r10.z, l(-0.500000)
  mad r10.w, -|r10.w|, l(2.000000), l(1.000000)
  max r10.w, r10.w, l(0.000000)
  min r10.w, r10.w, l(0.200000)
  mul r10.w, r10.w, l(5.000000)
  min r9.z, r9.w, r9.z
  min r9.z, r10.w, r9.z
  mad r15.xy, r12.xyxx, cb8[10].xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
  round_ni r15.zw, r15.xxxy
  add r15.xy, -r15.zwzz, r15.xyxx
  add r15.zw, r15.zzzw, l(0.000000, 0.000000, -0.500000, -0.500000)
  mad r16.xy, -r15.yxyy, l(2.000000, 2.000000, 0.000000, 0.000000), l(3.000000, 3.000000, 0.000000, 0.000000)
  mad r16.zw, r15.xxxy, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, 1.000000, 1.000000)
  add r17.xy, -r15.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000)
  div r17.xy, r17.xyxx, r16.yxyy
  div r15.xy, r15.xyxx, r16.zwzz
  add r17.zw, r17.xxxy, l(0.000000, 0.000000, -1.000000, -1.000000)
  add r17.xy, r15.xyxx, l(1.000000, 1.000000, 0.000000, 0.000000)
  mul r9.w, r16.x, r16.y
  mul r18.xyzw, r17.zwxw, cb8[10].zwzw
  mad r19.xy, r15.zwzz, cb8[10].zwzz, r18.xyxx
  mov r19.z, cb0[55].z
  sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r10.w, r19.xyzx, t14.xxxx, s10, r12.z
  mul r15.xy, r16.xyxx, r16.zwzz
  mad r18.xy, r15.zwzz, cb8[10].zwzz, r18.zwzz
  mov r18.z, cb0[55].z
  sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r11.w, r18.xyzx, t14.xxxx, s10, r12.z
  mul r11.w, r11.w, r15.x
  mad r9.w, r9.w, r10.w, r11.w
  mul r17.xyzw, r17.zyxy, cb8[10].zwzw
  mad r18.xy, r15.zwzz, cb8[10].zwzz, r17.xyxx
  mov r18.z, cb0[55].z
  sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r10.w, r18.xyzx, t14.xxxx, s10, r12.z
  mad r9.w, r15.y, r10.w, r9.w
  mul r10.w, r16.w, r16.z
  mad r15.xy, r15.zwzz, cb8[10].zwzz, r17.zwzz
  mov r15.z, cb0[55].z
  sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r11.w, r15.xyzx, t14.xxxx, s10, r12.z
  mad r9.w, r10.w, r11.w, r9.w
  mad r9.w, r9.w, l(0.062500), -r7.x
  mad r9.z, r9.z, r9.w, r7.x
else 
  eq r9.w, r14.z, l(1.000000)
  if_nz r9.w
    mad r15.xy, r12.xyxx, cb8[10].xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
    round_ni r15.zw, r15.xxxy
    add r15.xy, -r15.zwzz, r15.xyxx
    add r15.zw, r15.zzzw, l(0.000000, 0.000000, -0.500000, -0.500000)
    mul r16.xy, r15.zwzz, cb8[10].zwzz
    mad r16.zw, -r15.yyyx, l(0.000000, 0.000000, 3.000000, 3.000000), l(0.000000, 0.000000, 4.000000, 4.000000)
    mad r17.xy, r15.xyxx, l(3.000000, 3.000000, 0.000000, 0.000000), l(1.000000, 1.000000, 0.000000, 0.000000)
    mad r17.zw, -r15.xxxy, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, 3.000000, 3.000000)
    div r17.zw, r17.zzzw, r16.wwwz
    add r18.xy, r15.xyxx, l(3.000000, 3.000000, 0.000000, 0.000000)
    div r15.xy, r15.xyxx, r17.xyxx
    add r19.xw, r17.zzzw, l(-2.000000, 0.000000, 0.000000, -2.000000)
    mul r19.yz, r18.yyxy, l(0.000000, 0.142857149, 0.142857149, 0.000000)
    add r18.xy, r15.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000)
    mul r9.w, r16.z, r16.w
    mul r20.xyzw, r19.xwzw, cb8[10].zwzw
    mad r21.xy, r15.zwzz, cb8[10].zwzz, r20.xyxx
    mov r21.z, l(1.000000)
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r10.w, r21.xyzx, t14.xxxx, s10, r12.z
    mul r15.xy, r16.zwzz, l(7.000000, 7.000000, 0.000000, 0.000000)
    mad r20.xy, r15.zwzz, cb8[10].zwzz, r20.zwzz
    mov r20.z, l(1.000000)
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r11.w, r20.xyzx, t14.xxxx, s10, r12.z
    mul r11.w, r11.w, r15.x
    mad r9.w, r9.w, r10.w, r11.w
    mul r16.zw, r16.zzzw, r17.xxxy
    mov r18.zw, r19.wwwy
    mul r20.xyzw, r18.xzxw, cb8[10].zwzw
    mad r21.xy, r15.zwzz, cb8[10].zwzz, r20.xyxx
    mov r21.z, l(1.000000)
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r10.w, r21.xyzx, t14.xxxx, s10, r12.z
    mad r9.w, r16.z, r10.w, r9.w
    mul r21.xyzw, r19.xyzy, cb8[10].zwzw
    mad r22.xy, r15.zwzz, cb8[10].zwzz, r21.xyxx
    mov r22.z, l(1.000000)
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r10.w, r22.xyzx, t14.xxxx, s10, r12.z
    mad r9.w, r15.y, r10.w, r9.w
    mad r21.xy, r15.zwzz, cb8[10].zwzz, r21.zwzz
    mov r21.z, l(1.000000)
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r10.w, r21.xyzx, t14.xxxx, s10, r12.z
    mad r9.w, r10.w, l(49.000000), r9.w
    mul r15.xy, r17.xyxx, l(7.000000, 7.000000, 0.000000, 0.000000)
    mad r20.xy, r15.zwzz, cb8[10].zwzz, r20.zwzz
    mov r20.z, l(1.000000)
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r10.w, r20.xyzx, t14.xxxx, s10, r12.z
    mad r9.w, r15.x, r10.w, r9.w
    mov r19.y, r18.y
    mul r19.xyzw, r19.xyzy, cb8[10].zwzw
    mad r20.xy, r15.zwzz, cb8[10].zwzz, r19.xyxx
    mov r20.z, l(1.000000)
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r10.w, r20.xyzx, t14.xxxx, s10, r12.z
    mad r9.w, r16.w, r10.w, r9.w
    mad r19.xy, r15.zwzz, cb8[10].zwzz, r19.zwzz
    mov r19.z, l(1.000000)
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r10.w, r19.xyzx, t14.xxxx, s10, r12.z
    mad r9.w, r15.y, r10.w, r9.w
    mul r10.w, r17.y, r17.x
    mad r15.xy, r18.xyxx, cb8[10].zwzz, r16.xyxx
    mov r15.z, l(1.000000)
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r11.w, r15.xyzx, t14.xxxx, s10, r12.z
    mad r9.w, r10.w, r11.w, r9.w
    mul r9.z, r9.w, l(0.00694444450)
    mad r15.xy, r11.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
    add r15.xy, |r15.xyxx|, l(-0.800000, -0.800000, 0.000000, 0.000000)
    mul_sat r15.xy, r15.xyxx, l(5.000000, 5.000000, 0.000000, 0.000000)
    add r15.xy, -r15.xyxx, l(1.000000, 1.000000, 0.000000, 0.000000)
    add r10.w, r11.z, l(-0.500000)
    mad r10.w, -|r10.w|, l(2.000000), l(1.000000)
    max r10.w, r10.w, l(0.000000)
    min r10.w, r10.w, l(0.200000)
    mul r10.w, r10.w, l(5.000000)
    min r11.w, r15.y, r15.x
    min r10.w, r10.w, r11.w
    ne r11.w, r10.w, l(1.000000)
    if_nz r11.w
      mad r10.xy, r10.xyxx, cb8[10].xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
      round_ni r15.xy, r10.xyxx
      add r10.xy, r10.xyxx, -r15.xyxx
      add r15.xy, r15.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
      mad r15.zw, -r10.yyyx, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, 3.000000, 3.000000)
      mad r16.xy, r10.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(1.000000, 1.000000, 0.000000, 0.000000)
      add r16.zw, -r10.xxxy, l(0.000000, 0.000000, 2.000000, 2.000000)
      div r16.zw, r16.zzzw, r15.wwwz
      div r10.xy, r10.xyxx, r16.xyxx
      add r17.zw, r16.zzzw, l(0.000000, 0.000000, -1.000000, -1.000000)
      add r17.xy, r10.xyxx, l(1.000000, 1.000000, 0.000000, 0.000000)
      mul r10.x, r15.z, r15.w
      mul r18.xyzw, r17.zwxw, cb8[10].zwzw
      mad r19.xy, r15.xyxx, cb8[10].zwzz, r18.xyxx
      mov r19.z, l(2.000000)
      sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r10.y, r19.xyzx, t14.xxxx, s10, r10.z
      mul r15.zw, r15.zzzw, r16.xxxy
      mad r18.xy, r15.xyxx, cb8[10].zwzz, r18.zwzz
      mov r18.z, l(2.000000)
      sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r11.w, r18.xyzx, t14.xxxx, s10, r10.z
      mul r11.w, r11.w, r15.z
      mad r10.x, r10.x, r10.y, r11.w
      mul r17.xyzw, r17.zyxy, cb8[10].zwzw
      mad r18.xy, r15.xyxx, cb8[10].zwzz, r17.xyxx
      mov r18.z, l(2.000000)
      sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r10.y, r18.xyzx, t14.xxxx, s10, r10.z
      mad r10.x, r15.w, r10.y, r10.x
      mul r10.y, r16.y, r16.x
      mad r15.xy, r15.xyxx, cb8[10].zwzz, r17.zwzz
      mov r15.z, l(2.000000)
      sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r10.z, r15.xyzx, t14.xxxx, s10, r10.z
      mad r10.x, r10.y, r10.z, r10.x
      mul r10.x, r10.x, l(0.062500)
      mad r9.w, r9.w, l(0.00694444450), -r10.x
      mad r9.z, r10.w, r9.w, r10.x
    endif 
  else 
    mad r10.xy, r12.xyxx, cb8[10].xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
    round_ni r10.zw, r10.xxxy
    add r10.xy, -r10.zwzz, r10.xyxx
    add r10.zw, r10.zzzw, l(0.000000, 0.000000, -0.500000, -0.500000)
    mul r12.xy, r10.zwzz, cb8[10].zwzz
    mad r15.xyzw, r10.xxxx, l(11.000000, 11.000000, 5.000000, 5.000000), l(-28.000000, 17.000000, -6.000000, 1.000000)
    mad r16.xyz, r10.xxxx, l(4.000000, 4.000000, 7.000000, 0.000000), l(-5.000000, -16.000000, 5.000000, 0.000000)
    div r16.xyz, r16.xyzx, r15.zxyz
    add r16.xyz, r16.yxzy, l(-1.000000, -3.000000, 1.000000, 0.000000)
    div r9.w, r10.x, r15.w
    add r17.x, r9.w, l(3.000000)
    mad r18.xyzw, r10.yyyy, l(11.000000, 11.000000, 5.000000, 5.000000), l(-28.000000, 17.000000, -6.000000, 1.000000)
    mad r19.xyz, r10.yyyy, l(4.000000, 4.000000, 7.000000, 0.000000), l(-5.000000, -16.000000, 5.000000, 0.000000)
    div r19.xyz, r19.xyzx, r18.zxyz
    add r19.xyz, r19.xyzx, l(-3.000000, -1.000000, 1.000000, 0.000000)
    div r9.w, r10.y, r18.w
    add r20.y, r9.w, l(3.000000)
    mul r21.xyzw, r15.zxzx, r18.zzxx
    mov r16.w, r19.x
    mul r22.xyzw, r16.ywxw, cb8[10].zwzw
    mad r14.xy, r10.zwzz, cb8[10].zwzz, r22.xyxx
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r9.w, r14.xyzx, t14.xxxx, s10, r12.z
    mad r14.xy, r10.zwzz, cb8[10].zwzz, r22.zwzz
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r10.x, r14.xyzx, t14.xxxx, s10, r12.z
    mul r10.x, r10.x, r21.y
    mad r9.w, r21.x, r9.w, r10.x
    mul r22.xyzw, -r15.ywyw, r18.zzxx
    mad r14.xy, r16.zwzz, cb8[10].zwzz, r12.xyxx
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r10.x, r14.xyzx, t14.xxxx, s10, r12.z
    mad r9.w, r22.x, r10.x, r9.w
    mov r17.y, r16.w
    mad r14.xy, r17.xyxx, cb8[10].zwzz, r12.xyxx
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r10.x, r14.xyzx, t14.xxxx, s10, r12.z
    mad r9.w, r22.y, r10.x, r9.w
    mov r19.w, r16.y
    mul r23.xyzw, r19.wywz, cb8[10].zwzw
    mad r14.xy, r10.zwzz, cb8[10].zwzz, r23.xyxx
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r10.x, r14.xyzx, t14.xxxx, s10, r12.z
    mad r9.w, r21.z, r10.x, r9.w
    mov r16.yw, r19.yyyz
    mul r24.xyzw, r16.xyzy, cb8[10].zwzw
    mad r14.xy, r10.zwzz, cb8[10].zwzz, r24.xyxx
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r10.x, r14.xyzx, t14.xxxx, s10, r12.z
    mad r9.w, r21.w, r10.x, r9.w
    mad r14.xy, r10.zwzz, cb8[10].zwzz, r24.zwzz
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r10.x, r14.xyzx, t14.xxxx, s10, r12.z
    mad r9.w, r22.z, r10.x, r9.w
    mov r17.zw, r16.yyyw
    mul r21.xyzw, r17.xzxw, cb8[10].zwzw
    mad r14.xy, r10.zwzz, cb8[10].zwzz, r21.xyxx
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r10.x, r14.xyzx, t14.xxxx, s10, r12.z
    mad r9.w, r22.w, r10.x, r9.w
    mul r22.xyzw, r15.zxzx, -r18.yyww
    mad r14.xy, r10.zwzz, cb8[10].zwzz, r23.zwzz
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r10.x, r14.xyzx, t14.xxxx, s10, r12.z
    mad r9.w, r22.x, r10.x, r9.w
    mul r23.xyzw, r16.xwzw, cb8[10].zwzw
    mad r14.xy, r10.zwzz, cb8[10].zwzz, r23.xyxx
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r10.x, r14.xyzx, t14.xxxx, s10, r12.z
    mad r9.w, r22.y, r10.x, r9.w
    mul r15.xyzw, r15.ywyw, r18.yyww
    mad r14.xy, r10.zwzz, cb8[10].zwzz, r23.zwzz
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r10.x, r14.xyzx, t14.xxxx, s10, r12.z
    mad r9.w, r15.x, r10.x, r9.w
    mad r14.xy, r10.zwzz, cb8[10].zwzz, r21.zwzz
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r10.x, r14.xyzx, t14.xxxx, s10, r12.z
    mad r9.w, r15.y, r10.x, r9.w
    mov r20.x, r19.w
    mad r14.xy, r20.xyxx, cb8[10].zwzz, r12.xyxx
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r10.x, r14.xyzx, t14.xxxx, s10, r12.z
    mad r9.w, r22.z, r10.x, r9.w
    mov r20.zw, r16.xxxz
    mul r16.xyzw, r20.zywy, cb8[10].zwzw
    mad r14.xy, r10.zwzz, cb8[10].zwzz, r16.xyxx
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r10.x, r14.xyzx, t14.xxxx, s10, r12.z
    mad r9.w, r22.w, r10.x, r9.w
    mad r14.xy, r10.zwzz, cb8[10].zwzz, r16.zwzz
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r10.x, r14.xyzx, t14.xxxx, s10, r12.z
    mad r9.w, r15.z, r10.x, r9.w
    mov r20.x, r17.x
    mad r14.xy, r20.xyxx, cb8[10].zwzz, r12.xyxx
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r10.x, r14.xyzx, t14.xxxx, s10, r12.z
    mad r9.w, r15.w, r10.x, r9.w
    mul r9.z, r9.w, l(0.000369822490)
    mad r10.xy, r13.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
    add r10.xy, |r10.xyxx|, l(-0.800000, -0.800000, 0.000000, 0.000000)
    mul_sat r10.xy, r10.xyxx, l(5.000000, 5.000000, 0.000000, 0.000000)
    add r10.xy, -r10.xyxx, l(1.000000, 1.000000, 0.000000, 0.000000)
    add r10.z, r13.z, l(-0.500000)
    mad r10.z, -|r10.z|, l(2.000000), l(1.000000)
    max r10.z, r10.z, l(0.000000)
    min r10.z, r10.z, l(0.200000)
    mul r10.z, r10.z, l(5.000000)
    min r10.x, r10.y, r10.x
    min r10.x, r10.z, r10.x
    ne r10.y, r10.x, l(1.000000)
    if_nz r10.y
      mad r10.yz, r11.xxyx, cb8[10].xxyx, l(0.000000, 0.500000, 0.500000, 0.000000)
      round_ni r11.xy, r10.yzyy
      add r10.yz, r10.yyzy, -r11.xxyx
      add r11.xy, r11.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
      mul r12.xy, r11.xyxx, cb8[10].zwzz
      mad r12.zw, -r10.zzzy, l(0.000000, 0.000000, 3.000000, 3.000000), l(0.000000, 0.000000, 4.000000, 4.000000)
      mad r13.xy, r10.yzyy, l(3.000000, 3.000000, 0.000000, 0.000000), l(1.000000, 1.000000, 0.000000, 0.000000)
      mad r13.zw, -r10.yyyz, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, 3.000000, 3.000000)
      div r13.zw, r13.zzzw, r12.wwwz
      add r14.xy, r10.yzyy, l(3.000000, 3.000000, 0.000000, 0.000000)
      div r10.yz, r10.yyzy, r13.xxyx
      add r15.xw, r13.zzzw, l(-2.000000, 0.000000, 0.000000, -2.000000)
      mul r15.yz, r14.yyxy, l(0.000000, 0.142857149, 0.142857149, 0.000000)
      add r14.xy, r10.yzyy, l(2.000000, 2.000000, 0.000000, 0.000000)
      mul r10.y, r12.z, r12.w
      mul r16.xyzw, r15.xwzw, cb8[10].zwzw
      mad r17.xy, r11.xyxx, cb8[10].zwzz, r16.xyxx
      mov r17.z, l(1.000000)
      sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r10.z, r17.xyzx, t14.xxxx, s10, r11.z
      mul r13.zw, r12.zzzw, l(0.000000, 0.000000, 7.000000, 7.000000)
      mad r16.xy, r11.xyxx, cb8[10].zwzz, r16.zwzz
      mov r16.z, l(1.000000)
      sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r10.w, r16.xyzx, t14.xxxx, s10, r11.z
      mul r10.w, r10.w, r13.z
      mad r10.y, r10.y, r10.z, r10.w
      mul r10.zw, r12.zzzw, r13.xxxy
      mov r14.zw, r15.wwwy
      mul r16.xyzw, r14.xzxw, cb8[10].zwzw
      mad r17.xy, r11.xyxx, cb8[10].zwzz, r16.xyxx
      mov r17.z, l(1.000000)
      sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r11.w, r17.xyzx, t14.xxxx, s10, r11.z
      mad r10.y, r10.z, r11.w, r10.y
      mul r17.xyzw, r15.xyzy, cb8[10].zwzw
      mad r18.xy, r11.xyxx, cb8[10].zwzz, r17.xyxx
      mov r18.z, l(1.000000)
      sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r10.z, r18.xyzx, t14.xxxx, s10, r11.z
      mad r10.y, r13.w, r10.z, r10.y
      mad r17.xy, r11.xyxx, cb8[10].zwzz, r17.zwzz
      mov r17.z, l(1.000000)
      sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r10.z, r17.xyzx, t14.xxxx, s10, r11.z
      mad r10.y, r10.z, l(49.000000), r10.y
      mul r12.zw, r13.xxxy, l(0.000000, 0.000000, 7.000000, 7.000000)
      mad r16.xy, r11.xyxx, cb8[10].zwzz, r16.zwzz
      mov r16.z, l(1.000000)
      sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r10.z, r16.xyzx, t14.xxxx, s10, r11.z
      mad r10.y, r12.z, r10.z, r10.y
      mov r15.y, r14.y
      mul r15.xyzw, r15.xyzy, cb8[10].zwzw
      mad r16.xy, r11.xyxx, cb8[10].zwzz, r15.xyxx
      mov r16.z, l(1.000000)
      sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r10.z, r16.xyzx, t14.xxxx, s10, r11.z
      mad r10.y, r10.w, r10.z, r10.y
      mad r15.xy, r11.xyxx, cb8[10].zwzz, r15.zwzz
      mov r15.z, l(1.000000)
      sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r10.z, r15.xyzx, t14.xxxx, s10, r11.z
      mad r10.y, r12.w, r10.z, r10.y
      mul r10.z, r13.y, r13.x
      mad r12.xy, r14.xyxx, cb8[10].zwzz, r12.xyxx
      mov r12.z, l(1.000000)
      sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r10.w, r12.xyzx, t14.xxxx, s10, r11.z
      mad r10.y, r10.z, r10.w, r10.y
      mul r10.y, r10.y, l(0.00694444450)
      mad r9.w, r9.w, l(0.000369822490), -r10.y
      mad r9.z, r10.x, r9.w, r10.y
    endif 
  endif 
endif 
mul r10.xyz, cb4[1].zzzz, cb8[11].xyzx
mul r10.xyz, r9.zzzz, r10.xyzx
mad r11.xyz, r0.ywzy, r1.xxxx, -cb8[12].xyzx
dp3 r9.z, r11.xyzx, r11.xyzx
rsq r9.z, r9.z
mul r11.xyz, r9.zzzz, r11.xyzx
dp3 r9.z, r11.xzyx, r1.yzwy
add r9.z, -r9.z, l(1.000000)
mul r9.w, r9.z, r9.z
mul r9.w, r9.w, r9.w
mul r9.z, r9.z, r9.w
mad r9.z, r9.z, l(0.980000), l(0.020000)
dp3_sat r9.w, -cb8[12].yzxy, r3.yzwy
mul r10.w, r2.w, r2.w
mul r11.w, r2.x, r2.x
mad r12.x, -r2.x, r2.x, l(1.000000)
mad r10.w, r10.w, r12.x, r11.w
sqrt r10.w, r10.w
mul r12.y, r9.w, r9.w
mad r12.y, r12.y, r12.x, r11.w
sqrt r12.y, r12.y
mul r12.y, r2.w, r12.y
mad r12.y, r9.w, r10.w, r12.y
add r12.y, r12.y, r12.y
max r12.y, r12.y, l(0.000100)
div r12.y, l(1.000000, 1.000000, 1.000000, 1.000000), r12.y
dp3_sat r11.x, r11.yzxy, r3.yzwy
mad r11.y, r2.x, r2.x, l(-1.000000)
mul r11.x, r11.x, r11.x
mad r11.x, r11.x, r11.y, l(1.000000)
div r11.x, r2.x, r11.x
mul r11.x, r11.x, r11.x
mul r13.xyz, r10.xyzx, r11.xxxx
mul r13.xyz, r9.wwww, r13.xyzx
mul r12.yzw, r12.yyyy, r13.xxyz
mul r12.yzw, r9.zzzz, r12.yyzw
mul r10.xyz, r10.xyzx, r9.wwww
mad r13.xyz, -r1.ywzy, r3.xxxx, cb0[42].xyzx
mul_sat r14.xyz, cb8[11].xyzx, -cb8[12].zzzz
add r9.z, -r13.z, v4.z
max r9.z, r9.z, l(0.000000)
mul r11.xz, r3.wwyw, r9.zzzz
mad r13.xy, r11.xzxx, l(0.500000, 0.500000, 0.000000, 0.000000), r13.xyxx
add r15.xyz, |r3.wyzw|, l(-0.200000, -0.200000, -0.200000, 0.000000)
mul r15.xyz, r15.xyzx, l(7.000000, 7.000000, 7.000000, 0.000000)
max r15.xyz, r15.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
add r9.w, r15.y, r15.x
add r9.w, r15.z, r9.w
div r15.xyz, r15.xyzx, r9.wwww
mul r16.xyzw, r13.yzzx, cb6[10].yyyy
sample_indexable(texture2d)(float,float,float,float) r17.xyz, r16.xyxx, t10.xyzw, s7
sample_indexable(texture2d)(float,float,float,float) r16.xyz, r16.zwzz, t10.xyzw, s7
mul r11.xz, r13.xxyx, cb6[10].yyyy
sample_indexable(texture2d)(float,float,float,float) r13.xyz, r11.xzxx, t10.xyzw, s7
mul r16.xyz, r15.yyyy, r16.xyzx
mad r15.xyw, r17.xyxz, r15.xxxx, r16.xyxz
mad r13.xyz, r13.xyzx, r15.zzzz, r15.xywx
mul r13.xyz, r14.xyzx, r13.xyzx
mul r13.xyz, r7.xxxx, r13.xyzx
mul r7.x, r9.z, -cb6[0].y
exp r7.x, r7.x
mul r13.xyz, r7.xxxx, r13.xyzx
ishl r7.x, r6.w, l(1)
ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r7.x, r7.x, l(0), t20.xxxx
countbits r9.z, r7.x
ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r9.w, r6.w, l(0), t21.xxxx
and r9.w, r9.w, l(0x60000000)
ine r9.w, r9.w, l(0)
mov r14.xyz, r10.xyzx
mov r15.xyz, r12.yzwy
mov r11.x, r7.x
mov r11.z, l(0)
loop 
  uge r13.w, r11.z, r9.z
  breakc_nz r13.w
  firstbit_lo r13.w, r11.x
  ishl r14.w, l(1), r13.w
  not r14.w, r14.w
  and r11.x, r11.x, r14.w
  ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r16.xyzw, r13.w, l(0), t18.xyzw
  ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r17.xyz, r13.w, l(16), t18.xyzx
  ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r18.xyz, r13.w, l(32), t18.xyzx
  ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r19.xyzw, r13.w, l(48), t18.xyzw
  and r20.xyzw, r19.wwww, l(32, 16, 1, 4)
  ult r20.xyzw, l(0, 0, 0, 0), r20.xyzw
  ushr r13.w, r19.w, l(5)
  and r13.w, r13.w, l(2)
  or r14.w, r20.y, r20.x
  and r14.w, r9.w, r14.w
  if_nz r14.w
    ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r21.xyzw, r13.w, l(16), t19.xyzw
    ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r22.xyzw, r13.w, l(32), t19.xyzw
  else 
    mov r21.xyzw, l(0,0,0,0)
    mov r22.xyzw, l(0,0,0,0)
  endif 
  add r16.xyz, -r16.xyzx, v4.xyzx
  dp3 r14.w, r16.xyzx, r16.xyzx
  max r15.w, r14.w, l(0.000010)
  div r17.w, l(1.000000, 1.000000, 1.000000, 1.000000), r15.w
  min r16.w, r16.w, r17.w
  mul r15.w, r15.w, r15.w
  mad_sat r15.w, -r15.w, r19.x, l(1.000000)
  mul r15.w, r15.w, r15.w
  mul r15.w, r15.w, r16.w
  mul r17.xyz, r15.wwww, r17.xyzx
  rsq r14.w, r14.w
  mul r23.xyz, r14.wwww, r16.xyzx
  dp3 r14.w, r23.xyzx, r18.xyzx
  mad_sat r14.w, r14.w, r19.y, r19.z
  mul r14.w, r14.w, r14.w
  mul r18.xyz, r17.xyzx, r14.wwww
  movc r17.xyz, r20.zzzz, r18.xyzx, r17.xyzx
  mad r18.xyz, r0.ywzy, r1.xxxx, -r16.xyzx
  dp3 r14.w, r18.xyzx, r18.xyzx
  rsq r14.w, r14.w
  mul r18.xyz, r14.wwww, r18.xyzx
  dp3 r14.w, r18.xzyx, r1.yzwy
  add r14.w, -r14.w, l(1.000000)
  mul r15.w, r14.w, r14.w
  mul r15.w, r15.w, r15.w
  mul r14.w, r14.w, r15.w
  mad r14.w, r14.w, l(0.980000), l(0.020000)
  and r15.w, r20.x, r20.z
  if_z r13.w
    dp4 r19.x, r5.xyzw, r21.xyzw
    dp4 r19.y, r5.xyzw, r22.xyzw
    sample_l_indexable(texture2d)(float,float,float,float) r19.xyz, r19.xyxx, t15.xyzw, s11, l(0.000000)
    mul r19.xyz, r17.xyzx, r19.xyzx
  else 
    mov r19.xyz, r17.xyzx
  endif 
  movc r17.xyz, r15.wwww, r19.xyzx, r17.xyzx
  dp3_sat r13.w, -r16.yzxy, r3.yzwy
  mul r15.w, r13.w, r13.w
  mad r15.w, r15.w, r12.x, r11.w
  sqrt r15.w, r15.w
  mul r15.w, r2.w, r15.w
  mad r15.w, r13.w, r10.w, r15.w
  add r15.w, r15.w, r15.w
  max r15.w, r15.w, l(0.000100)
  div r15.w, l(1.000000, 1.000000, 1.000000, 1.000000), r15.w
  movc r16.x, r20.w, l(0.001500), l(0.050000)
  dp3_sat r16.y, r18.yzxy, r3.yzwy
  mul r16.y, r16.y, r16.y
  mad r16.y, r16.y, r11.y, l(1.000000)
  div r16.y, r2.x, r16.y
  mul r16.y, r16.y, r16.y
  mul r16.yzw, r16.yyyy, r17.xxyz
  mul r16.yzw, r13.wwww, r16.yyzw
  mul r16.yzw, r15.wwww, r16.yyzw
  mul r16.xyz, r16.xxxx, r16.yzwy
  mad r15.xyz, r16.xyzx, r14.wwww, r15.xyzx
  mad r14.xyz, r13.wwww, r17.xyzx, r14.xyzx
  iadd r11.z, r11.z, l(1)
endloop 
bfi r6.w, l(31), l(1), r6.w, l(1)
ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r6.w, r6.w, l(0), t20.xxxx
countbits r7.x, r6.w
mov r10.xyz, r14.xyzx
mov r12.yzw, r15.xxyz
mov r9.z, r6.w
mov r11.x, l(0)
loop 
  uge r11.z, r11.x, r7.x
  breakc_nz r11.z
  firstbit_lo r11.z, r9.z
  ishl r13.w, l(1), r11.z
  not r13.w, r13.w
  and r9.z, r9.z, r13.w
  iadd r11.z, l(32), r11.z
  ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r16.xyzw, r11.z, l(0), t18.xyzw
  ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r17.xyz, r11.z, l(16), t18.xyzx
  ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r18.xyz, r11.z, l(32), t18.xyzx
  ld_structured_indexable(structured_buffer, stride=128)(mixed,mixed,mixed,mixed) r19.xyzw, r11.z, l(48), t18.xyzw
  and r20.xyzw, r19.wwww, l(32, 16, 1, 4)
  ult r20.xyzw, l(0, 0, 0, 0), r20.xyzw
  ushr r11.z, r19.w, l(5)
  and r11.z, r11.z, l(2)
  or r13.w, r20.y, r20.x
  and r13.w, r9.w, r13.w
  if_nz r13.w
    ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r21.xyzw, r11.z, l(16), t19.xyzw
    ld_structured_indexable(structured_buffer, stride=96)(mixed,mixed,mixed,mixed) r22.xyzw, r11.z, l(32), t19.xyzw
  else 
    mov r21.xyzw, l(0,0,0,0)
    mov r22.xyzw, l(0,0,0,0)
  endif 
  add r16.xyz, -r16.xyzx, v4.xyzx
  dp3 r13.w, r16.xyzx, r16.xyzx
  max r14.w, r13.w, l(0.000010)
  div r15.w, l(1.000000, 1.000000, 1.000000, 1.000000), r14.w
  min r15.w, r15.w, r16.w
  mul r14.w, r14.w, r14.w
  mad_sat r14.w, -r14.w, r19.x, l(1.000000)
  mul r14.w, r14.w, r14.w
  mul r14.w, r14.w, r15.w
  mul r17.xyz, r14.wwww, r17.xyzx
  rsq r13.w, r13.w
  mul r23.xyz, r13.wwww, r16.xyzx
  dp3 r13.w, r23.xyzx, r18.xyzx
  mad_sat r13.w, r13.w, r19.y, r19.z
  mul r13.w, r13.w, r13.w
  mul r18.xyz, r17.xyzx, r13.wwww
  movc r17.xyz, r20.zzzz, r18.xyzx, r17.xyzx
  mad r18.xyz, r0.ywzy, r1.xxxx, -r16.xyzx
  dp3 r13.w, r18.xyzx, r18.xyzx
  rsq r13.w, r13.w
  mul r18.xyz, r13.wwww, r18.xyzx
  dp3 r13.w, r18.xzyx, r1.yzwy
  add r13.w, -r13.w, l(1.000000)
  mul r14.w, r13.w, r13.w
  mul r14.w, r14.w, r14.w
  mul r13.w, r13.w, r14.w
  mad r13.w, r13.w, l(0.980000), l(0.020000)
  and r14.w, r20.x, r20.z
  if_z r11.z
    dp4 r19.x, r5.xyzw, r21.xyzw
    dp4 r19.y, r5.xyzw, r22.xyzw
    sample_l_indexable(texture2d)(float,float,float,float) r19.xyz, r19.xyxx, t15.xyzw, s11, l(0.000000)
    mul r19.xyz, r17.xyzx, r19.xyzx
  else 
    mov r19.xyz, r17.xyzx
  endif 
  movc r17.xyz, r14.wwww, r19.xyzx, r17.xyzx
  dp3_sat r11.z, -r16.yzxy, r3.yzwy
  mul r14.w, r11.z, r11.z
  mad r14.w, r14.w, r12.x, r11.w
  sqrt r14.w, r14.w
  mul r14.w, r2.w, r14.w
  mad r14.w, r11.z, r10.w, r14.w
  add r14.w, r14.w, r14.w
  max r14.w, r14.w, l(0.000100)
  div r14.w, l(1.000000, 1.000000, 1.000000, 1.000000), r14.w
  movc r15.w, r20.w, l(0.001500), l(0.050000)
  dp3_sat r16.x, r18.yzxy, r3.yzwy
  mul r16.x, r16.x, r16.x
  mad r16.x, r16.x, r11.y, l(1.000000)
  div r16.x, r2.x, r16.x
  mul r16.x, r16.x, r16.x
  mul r16.xyz, r16.xxxx, r17.xyzx
  mul r16.xyz, r11.zzzz, r16.xyzx
  mul r16.xyz, r14.wwww, r16.xyzx
  mul r16.xyz, r15.wwww, r16.xyzx
  mad r12.yzw, r16.xxyz, r13.wwww, r12.yyzw
  mad r10.xyz, r11.zzzz, r17.xyzx, r10.xyzx
  iadd r11.x, r11.x, l(1)
endloop 
dp3 r0.y, r6.xyzx, l(0.212600, 0.715200, 0.072200, 0.000000)
add_sat r5.xyz, cb6[5].xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
mul r11.xy, v0.xyxx, cb0[40].zwzz
mad r0.zw, r11.xxxy, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, -1.000000, -1.000000)
mad r0.zw, -|r0.zzzw|, |r0.zzzw|, l(0.000000, 0.000000, 1.000000, 1.000000)
mul r2.xw, r3.wwwy, cb6[12].zzzz
mad r14.xy, r2.xwxx, r0.xxxx, v5.xyxx
mov r14.z, v5.z
mov r14.w, l(1.000000)

// Far Cry Primal Reflection Fix inserted with DarkStarSword's asmtool.py:
// asmtool.py -i --fix-fcprimal-reflection --only-autofixed -fq 0c1abd00e90f6697-ps.txt

// ViewProjectionMatrix:
dp4 r25.w, r14.xyzw, cb0[19].xyzw
// Stereo Correction:
add r25.w, r25.w, -r25.y
mul r26.x, r25.w, r25.x
mov r26.yzw, l(0.0)
// InvProjectionMatrix:
dp4 r27.x, r26.xyzw, cb0[0].xyzw
dp4 r27.y, r26.xyzw, cb0[1].xyzw
dp4 r27.z, r26.xyzw, cb0[2].xyzw
dp4 r27.w, r26.xyzw, cb0[3].xyzw
// InvViewMatrix:
dp4 r26.x, r27.xyzw, cb0[4].xyzw
dp4 r26.y, r27.xyzw, cb0[5].xyzw
// Negate Z to fix alignment when camera is tilted:
dp4 r26.z, -r27.xyzw, cb0[6].xyzw
// Adjust Coord:
add r14.xyz, r14.xyz, r26.xyzw

dp4 r15.x, r14.xyzw, cb1[0].xyzw
dp4 r15.y, r14.xyzw, cb1[1].xyzw
dp4 r1.x, r14.xyzw, cb1[3].xyzw
div r2.xw, r15.xxxy, r1.xxxx
mad r11.zw, -v0.xxxx, cb0[40].zzzz, l(0.000000, 0.000000, 1.000000, 1.000000)
add r2.xw, -r11.zzzy, r2.xxxw
mad_sat r0.zw, r2.xxxw, r0.zzzw, r11.wwwy

// Swap reflection eyes from stereo2mono reflection copy.
// Mip-maps disabled as the reverse stereo blit only copies them in one eye
mov r26.xyzw, r0.xyzw
mul r26.z, r26.z, l(0.5)
eq r25.w, r25.z, l(-1.0)
if_nz r25.w
  add r26.z, r26.z, l(0.5)
endif

// sample_l_indexable(texture2d)(float,float,float,float) r11.xyz, r0.zwzz, t17.xyzw, s12, r7.y
sample_l_indexable(texture2d)(float,float,float,float) r11.xyz, r26.zwzz, t100.xyzw, s12, l(0.0)

min r11.xyz, r11.xyzx, l(16.000000, 16.000000, 16.000000, 0.000000)
ld_structured_indexable(structured_buffer, stride=16)(mixed,mixed,mixed,mixed) r0.z, l(0), l(12), t3.xxxx
mul r11.xyz, r0.zzzz, r11.xyzx
mad_sat r0.w, r8.w, cb4[1].x, cb4[1].y
mul r14.xyz, r5.xyzx, r6.xyzx
add r1.x, r2.z, r2.z
mad r1.xyz, r3.wzyw, -r1.xxxx, r1.yzwy
mov r1.xyz, -r1.xyzx
sample_l_indexable(texturecube)(float,float,float,float) r1.xyz, r1.xyzx, t1.xyzw, s1, r7.z
ld_structured_indexable(structured_buffer, stride=132)(mixed,mixed,mixed,mixed) r2.xzw, l(0), l(108), t5.xxyz
dp3 r1.w, r2.xzwx, 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), t5.xyxx
dp3 r2.x, r8.zxyz, l(0.212600, 0.715200, 0.072200, 0.000000)
max r1.w, r1.w, r2.x
add r1.w, r7.w, r1.w
add r1.w, r1.w, l(-1.000000)
mad r1.w, cb0[55].w, r1.w, l(1.000000)
mul r1.xyz, r1.wwww, r1.xyzx
mad r1.xyz, r1.xyzx, cb6[12].yyyy, cb6[12].xxxx
mad r1.xyz, r14.xyzx, r1.xyzx, -r11.xyzx
mad r1.xyz, r0.wwww, r1.xyzx, r11.xyzx
add r0.x, -r0.x, r3.x
mul r0.x, r0.x, -cb6[0].x
exp r0.x, r0.x
add r0.x, -r0.x, l(1.000000)
max r0.x, r0.x, l(0.000000)
add r2.xzw, r6.xxyz, r10.xxyz
mul r2.xzw, r2.xxzw, l(0.980000, 0.000000, 0.980000, 0.980000)
mad r1.xyz, r1.xyzx, r2.yyyy, r12.yzwy
add r3.xyz, r4.xyzx, -cb6[4].xyzx
mad r3.xyz, r4.wwww, r3.xyzx, cb6[4].xyzx
mul r3.xyz, r5.xyzx, r3.xyzx
mul r0.y, r0.y, cb6[10].x
mul r0.y, r0.y, l(100.000000)
mul r4.xyz, r0.yyyy, r13.xyzx
mul r1.xyz, r0.xxxx, r1.xyzx
mad r1.xyz, r2.xzwx, r3.xyzx, r1.xyzx
mov r2.w, -r0.x
add r0.y, r2.w, l(1.000000)
mad r1.xyz, r4.xyzx, r0.yyyy, r1.xyzx
lt r0.yw, l(0.000000, 0.000000, 0.000000, 0.000000), cb0[39].zzzw
and r0.y, r0.w, r0.y
if_nz r0.y
  add r3.xyz, v4.xyzx, -cb0[42].xyzx
  dp3 r0.y, r3.xyzx, r3.xyzx
  sqrt r0.y, r0.y
  utof r3.xy, r9.xyxx
  mul r3.xy, r3.xyxx, cb0[40].zwzz
  add r0.y, r0.y, -cb7[0].w
  div r0.y, r0.y, cb7[0].z
  log r0.y, r0.y
  mul r0.y, r0.y, l(0.250000)
  ushr r0.w, cb7[2].z, l(1)
  utof r0.w, r0.w
  mul r0.y, r0.w, r0.y
  iadd r0.w, cb7[2].z, l(-1)
  itof r0.w, r0.w
  div r3.z, r0.y, r0.w
  sample_l_indexable(texture3d)(float,float,float,float) r4.xyz, r3.xyzx, t12.xyzw, s9, l(0.000000)
  sample_l_indexable(texture3d)(float,float,float,float) r0.y, r3.xyzx, t13.yxzw, s9, l(0.000000)
  mul r3.xyz, r0.zzzz, r4.xyzx
else 
  add r4.xyz, v4.xyzx, -cb0[42].xyzx
  dp3 r0.z, r4.xyzx, r4.xyzx
  sqrt r0.z, r0.z
  mad_sat r0.z, r0.z, cb0[35].y, cb0[35].x
  mul r0.w, r4.z, cb0[39].y
  max r0.w, r0.w, l(-125.000000)
  lt r1.w, l(0.000001), |r0.w|
  exp r3.w, -r0.w
  add r3.w, -r3.w, l(1.000000)
  div r0.w, r3.w, r0.w
  movc r0.w, r1.w, r0.w, l(1.000000)
  mad r0.w, r0.w, cb0[39].x, cb0[35].w
  mul r0.z, r0.w, r0.z
  mul r0.z, r0.z, -cb0[35].z
  exp r0.y, r0.z
  mad r3.xyz, -v2.xyzx, r0.yyyy, v2.xyzx
endif 
mad r0.yzw, r1.xxyz, r0.yyyy, r3.xxyz
mul r2.xyz, r0.xxxx, r0.yzwy
mad r0.xyzw, v2.wwww, r2.xyzw, l(0.000000, 0.000000, 0.000000, 1.000000)
ld_structured_indexable(structured_buffer, stride=16)(mixed,mixed,mixed,mixed) r1.x, l(0), l(0), t3.xxxx
mul r0.xyz, r0.xyzx, r1.xxxx
max r0.xyz, r0.xyzx, l(0.0000610351999, 0.0000610351999, 0.0000610351999, 0.000000)
min o0.xyz, r0.xyzx, l(8192.000000, 8192.000000, 8192.000000, 0.000000)
mov o0.w, r0.w
ret 
// Approximately 883 instruction slots used