// asmtool.py -i --fix-fcprimal-camera-pos 8d06b2686f75f652-ps.txt
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
//   using 3Dmigoto v1.2.31 on Wed Mar 02 08:07:00 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 [unused]
//   float FogUndergroundColorScale;    // Offset:  896 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 [unused]
//   float ReflectionSquareFadeDistance;// Offset:   20 Size:     4 [unused]
//   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 [unused]
//
// }
//
// 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 [unused]
//   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 Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// DepthVPSampler__SampObj__         sampler      NA          NA    0        1
// EnvironmentMapBRDFTexture__SampObj__    sampler      NA          NA    1        1
// SectorHemiMapSamplerStateLinear    sampler      NA          NA    2        1
// WaterWaveTexture__SampObj__       sampler      NA          NA    3        1
// NormalTexture__SampObj__          sampler      NA          NA    4        1
// NormalTexture3__SampObj__         sampler      NA          NA    5        1
// CausticsTexture__SampObj__        sampler      NA          NA    6        1
// ReflectionCubeTexture__SampObj__    sampler      NA          NA    7        1
// ColorClamp3D                      sampler      NA          NA    8        1
// ShadowCmpSampler                sampler_c      NA          NA    9        1
// DepthVPSampler__TexObj__          texture  float4          2d    0        1
// EnvironmentMapBRDFTexture__TexObj__    texture  float4          2d    1        1
// ExposureBuffer                    texture  struct         r/o    2        1
// SHOccGlobalProbe                  texture  struct         r/o    3        1
// SkyParamBuffer                    texture  struct         r/o    4        1
// SectorOcclusion_HeightTexture__TexObj__    texture  float4          2d    5        1
// WaterWaveTexture__TexObj__        texture  float4          2d    6        1
// NormalTexture__TexObj__           texture  float4          2d    7        1
// NormalTexture3__TexObj__          texture  float4          2d    8        1
// CausticsTexture__TexObj__         texture  float4          2d    9        1
// ReflectionCubeTexture__TexObj__    texture  float4        cube   10        1
// VFVolumeTextureRGB                texture  float4          3d   11        1
// VFVolumeTextureAlpha              texture  float4          3d   12        1
// ShadowCmpSampler_TextureObject    texture  float4     2darray   13        1
// DeferredShadowTexture             texture  float4          2d   14        1
// CViewportShaderParameterProvider    cbuffer      NA          NA    0        1
// CSceneTerrainSkyOcclusionAtlasPrivateData    cbuffer      NA          NA    1        1
// CAmbientProvider                  cbuffer      NA          NA    2        1
// CWaterParameterProvider           cbuffer      NA          NA    3        1
// CWaterWaveParameterProvider       cbuffer      NA          NA    4        1
// Water                             cbuffer      NA          NA    5        1
// CVolumetricFogBlendedProvider     cbuffer      NA          NA    6        1
// CTileLightingBlendedParameterProvider    cbuffer      NA          NA    7        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   xy          6     NONE   float   xy  
// SV_IsFrontFace           0   x           7    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[3], immediateIndexed
dcl_constantbuffer cb2[19], immediateIndexed
dcl_constantbuffer cb3[2], immediateIndexed
dcl_constantbuffer cb4[3], immediateIndexed
dcl_constantbuffer cb5[13], immediateIndexed
dcl_constantbuffer cb6[3], immediateIndexed
dcl_constantbuffer cb7[13], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_sampler s2, mode_default
dcl_sampler s3, mode_default
dcl_sampler s4, mode_default
dcl_sampler s5, mode_default
dcl_sampler s6, mode_default
dcl_sampler s7, mode_default
dcl_sampler s8, mode_default
dcl_sampler s9, mode_comparison
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t1
dcl_resource_structured t2, 16 
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_texturecube (float,float,float,float) t10
dcl_resource_texture3d (float,float,float,float) t11
dcl_resource_texture3d (float,float,float,float) t12
dcl_resource_texture2darray (float,float,float,float) t13
dcl_resource_texture2d (float,float,float,float) t14
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.xy
dcl_output o0.xyzw
dcl_temps 24

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

ld_indexable(texture2d)(float,float,float,float) r21.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-camera-pos 8d06b2686f75f652-ps.txt
mul r22.x, r21.x, r21.y
mul r22.x, r22.x, cb0[0].x
mov r22.yzw, l(0.0)
dp4 r23.x, r22.xyzw, cb0[4].xyzw
dp4 r23.y, r22.xyzw, cb0[5].xyzw
dp4 r23.z, r22.xyzw, cb0[6].xyzw
mov r22.xyzw, cb0[42].xyzw
add r22.xyz, r22.xyz, r23.xyz

dp3 r0.x, v3.xyzx, v3.xyzx
sqrt r0.x, r0.x
add r0.yzw, -v4.xxzy, r22.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, t7.xywz, s4
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, cb5[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, t7.xywz, s4
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, cb5[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, v6.yxyy, t8.xywz, s5
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, cb5[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, cb5[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, cb5[11].y, r3.x, r2.x
mov_sat r3.x, cb5[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, cb5[3].x
mul r4.x, r0.x, l(0.010000)
add r3.xz, v4.xxyx, -cb4[0].xxyx
dp2 r3.x, cb4[0].zwzz, r3.xzxx
mul r3.z, cb4[2].z, cb4[2].y
div r3.x, l(1.000000, 1.000000, 1.000000, 1.000000), r3.x
mad r3.x, r3.z, r3.x, -cb4[2].z
add r3.w, -cb4[2].z, cb4[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, -cb4[0].xyxx
dp2 r4.w, cb4[0].zwzz, r5.xyxx
dp2 r5.x, cb4[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, -cb4[2].z
div r6.y, r5.y, r3.w
mul r4.w, r4.w, cb4[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, -cb4[0].xyxy
dp2 r4.w, cb4[0].zwzz, r5.xyxx
dp2 r5.x, cb4[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, -cb4[2].z
div r7.y, r5.y, r3.w
mul r4.w, r4.w, cb4[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, -cb4[0].xxyx
dp2 r4.w, cb4[0].zwzz, r4.yzyy
dp2 r4.y, cb4[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, -cb4[2].z
div r5.y, r4.z, r3.w
mul r4.z, r4.w, cb4[2].x
div r4.y, r4.y, r4.z
mad r5.x, r4.y, l(0.500000), l(0.500000)
dp2 r4.y, cb4[0].zwzz, r5.zwzz
dp2 r4.z, cb4[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, -cb4[2].z
div r8.y, r3.z, r3.w
mul r3.z, r4.y, cb4[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, t6.yzxw, s3
sample_indexable(texture2d)(float,float,float,float) r3.w, r7.xyxx, t6.yzwx, s3
sample_indexable(texture2d)(float,float,float,float) r4.y, r5.xyxx, t6.yxzw, s3
sample_indexable(texture2d)(float,float,float,float) r4.z, r8.xyxx, t6.yzxw, s3
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 r4.xy, r3.wyww, cb5[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 r5.x, r2.w, l(0.968750), l(0.015625)
mad r5.y, r2.x, l(0.968750), l(0.015625)
sample_l_indexable(texture2d)(float,float,float,float) r5.xy, r5.xyxx, t1.xyzw, s1, l(0.000000)
mad_sat r2.y, r2.y, r5.y, r5.x
mov r3.x, l(1.000000)
mul r5.xyzw, r3.xyzw, l(0.282094806, 0.488602519, 0.488602519, 0.488602519)
ld_structured_indexable(structured_buffer, stride=16)(mixed,mixed,mixed,mixed) r6.xyzw, l(0), l(0), t3.xyzw
ld_structured_indexable(structured_buffer, stride=16)(mixed,mixed,mixed,mixed) r7.xyzw, l(1), l(0), t3.xyzw
ld_structured_indexable(structured_buffer, stride=16)(mixed,mixed,mixed,mixed) r8.xyzw, l(2), l(0), t3.xyzw
dp4 r6.x, r6.xyzw, r5.xyzw
dp4 r6.y, r7.xyzw, r5.xyzw
dp4 r6.z, r8.xyzw, r5.xyzw
max r6.xyz, r6.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
ld_structured_indexable(structured_buffer, stride=132)(mixed,mixed,mixed,mixed) r7.xyzw, l(0), l(108), t4.xywz
dp3 r3.x, r7.xywx, l(0.212600, 0.715200, 0.072200, 0.000000)
ld_structured_indexable(structured_buffer, stride=132)(mixed,mixed,mixed,mixed) r7.xy, l(0), l(124), t4.xyxx
dp3 r6.w, r7.zxyz, l(0.212600, 0.715200, 0.072200, 0.000000)
max r3.x, r3.x, r6.w
ld_structured_indexable(structured_buffer, stride=132)(mixed,mixed,mixed,mixed) r6.w, l(0), l(0), t4.xxxx
ld_structured_indexable(structured_buffer, stride=132)(mixed,mixed,mixed,mixed) r7.x, l(0), l(36), t4.xxxx
ld_structured_indexable(structured_buffer, stride=132)(mixed,mixed,mixed,mixed) r7.y, l(0), l(72), t4.xxxx
max r7.x, r7.y, r7.x
max r6.w, r6.w, r7.x
add r3.x, r3.x, r6.w
mul r7.xyz, r3.xxxx, r6.xyzx
dp4 r8.x, cb2[15].xyzw, r5.xyzw
dp4 r8.y, cb2[16].xyzw, r5.xyzw
dp4 r8.z, cb2[17].xyzw, r5.xyzw
max r5.xyz, r8.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
mad r8.xy, v4.yxyy, cb1[0].yxyy, cb1[0].wzww
sample_l_indexable(texture2d)(float,float,float,float) r5.w, r8.xyxx, t5.xzwy, s2, l(0.000000)
mad r5.w, r5.w, cb1[2].x, cb1[2].y
add r5.w, -r5.w, v4.z
mul_sat r5.w, -r5.w, cb2[18].x
sqrt r5.w, r5.w
add r8.xy, v4.xyxx, -r22.xyxx
dp2 r6.w, r8.xyxx, r8.xyxx
mad r6.w, cb1[1].x, r6.w, cb1[1].y
mul_sat r6.w, r6.w, l(3.000000)
mul r5.w, r5.w, r6.w
mad r5.xyz, -r6.xyzx, r3.xxxx, r5.xyzx
mad r5.xyz, r5.wwww, r5.xyzx, r7.xyzx
div r6.xy, v5.xyxx, v5.zzzz
sample_l_indexable(texture2d)(float,float,float,float) r6.z, r6.xyxx, t0.yzxw, s0, l(0.000000)
mov r6.w, l(1.000000)
dp4 r3.x, r6.xyzw, cb0[2].xyzw
dp4 r5.w, r6.xyzw, cb0[3].xyzw
div r3.x, -r3.x, r5.w
mul r3.x, r0.x, -r3.x
div r3.x, r3.x, v3.z
mad r6.xy, -r2.xxxx, l(0.990000, 6.000000, 0.000000, 0.000000), l(1.000000, 6.000000, 0.000000, 0.000000)
mul r2.x, r6.x, r6.x
max r2.x, r2.x, l(0.001000)
ftoi r7.xy, v0.xyxx
mov r7.zw, l(0,0,0,0)
ld_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r5.w, r7.xyzw, t14.yzwx
mov r4.z, v4.z
mov r4.w, l(1.000000)
dp4 r7.x, r4.xyzw, cb7[6].xyzw
dp4 r7.y, r4.xyzw, cb7[7].xyzw
dp4 r7.z, r4.xyzw, cb7[8].xyzw
dp4 r8.x, r4.xyzw, cb7[3].xyzw
dp4 r8.y, r4.xyzw, cb7[4].xyzw
dp4 r8.z, r4.xyzw, cb7[5].xyzw
add r6.xzw, r8.xxyz, l(-0.000000, 0.000000, -0.000000, -0.001000)
ge r9.xyz, r6.xzwx, l(0.000000, 0.000000, 0.000000, 0.000000)
and r9.xyz, r9.xyzx, l(0x3f800000, 0x3f800000, 0x3f800000, 0)
ge r6.xzw, l(1.000000, 0.000000, 1.000000, 1.000000), r6.xxzw
and r6.xzw, r6.xxzw, l(0x3f800000, 0, 0x3f800000, 0x3f800000)
mul r6.xzw, r6.xxzw, r9.xxyz
dp3 r6.x, r6.xzwx, l(1.000000, 1.000000, 1.000000, 0.000000)
ge r6.x, r6.x, l(3.000000)
mov r8.w, l(1.000000)
mov r7.w, l(2.000000)
movc r9.xyzw, r6.xxxx, r8.xyzw, r7.xyzw
dp4 r10.x, r4.xyzw, cb7[0].xyzw
dp4 r10.y, r4.xyzw, cb7[1].xyzw
dp4 r10.z, r4.xyzw, cb7[2].xyzw
add r4.xyz, r10.xyzx, l(-0.000000, -0.000000, -0.001000, 0.000000)
ge r6.xzw, r4.xxyz, l(0.000000, 0.000000, 0.000000, 0.000000)
and r6.xzw, r6.xxzw, l(0x3f800000, 0, 0x3f800000, 0x3f800000)
ge r4.xyz, l(1.000000, 1.000000, 1.000000, 0.000000), r4.xyzx
and r4.xyz, r4.xyzx, l(0x3f800000, 0x3f800000, 0x3f800000, 0)
mul r4.xyz, r4.xyzx, r6.xzwx
dp3 r4.x, r4.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
ge r4.x, r4.x, l(3.000000)
mov r10.w, l(0)
movc r4.xyzw, r4.xxxx, r10.xyzw, r9.xyzw
min r9.z, r4.w, cb0[55].z
eq r4.w, r9.z, cb0[55].z
if_nz r4.w
  mad r6.xz, r7.xxyx, l(2.000000, 0.000000, 2.000000, 0.000000), l(-1.000000, 0.000000, -1.000000, 0.000000)
  add r6.xz, |r6.xxzx|, l(-0.800000, 0.000000, -0.800000, 0.000000)
  mul_sat r6.xz, r6.xxzx, l(5.000000, 0.000000, 5.000000, 0.000000)
  add r6.xz, -r6.xxzx, l(1.000000, 0.000000, 1.000000, 0.000000)
  add r4.w, r7.z, l(-0.500000)
  mad r4.w, -|r4.w|, l(2.000000), l(1.000000)
  max r4.w, r4.w, l(0.000000)
  min r4.w, r4.w, l(0.200000)
  mul r4.w, r4.w, l(5.000000)
  min r6.x, r6.z, r6.x
  min r4.w, r4.w, r6.x
  mad r6.xz, r4.xxyx, cb7[10].xxyx, l(0.500000, 0.000000, 0.500000, 0.000000)
  round_ni r11.xy, r6.xzxx
  add r6.xz, r6.xxzx, -r11.xxyx
  add r11.xy, r11.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
  mad r11.zw, -r6.zzzx, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, 3.000000, 3.000000)
  mad r12.xy, r6.xzxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(1.000000, 1.000000, 0.000000, 0.000000)
  add r12.zw, -r6.xxxz, l(0.000000, 0.000000, 2.000000, 2.000000)
  div r12.zw, r12.zzzw, r11.wwwz
  div r6.xz, r6.xxzx, r12.xxyx
  add r13.zw, r12.zzzw, l(0.000000, 0.000000, -1.000000, -1.000000)
  add r13.xy, r6.xzxx, l(1.000000, 1.000000, 0.000000, 0.000000)
  mul r6.x, r11.z, r11.w
  mul r14.xyzw, r13.zwxw, cb7[10].zwzw
  mad r15.xy, r11.xyxx, cb7[10].zwzz, r14.xyxx
  mov r15.z, cb0[55].z
  sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r6.z, r15.xyzx, t13.xxxx, s9, r4.z
  mul r11.zw, r11.zzzw, r12.xxxy
  mad r14.xy, r11.xyxx, cb7[10].zwzz, r14.zwzz
  mov r14.z, cb0[55].z
  sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r6.w, r14.xyzx, t13.xxxx, s9, r4.z
  mul r6.w, r6.w, r11.z
  mad r6.x, r6.x, r6.z, r6.w
  mul r13.xyzw, r13.zyxy, cb7[10].zwzw
  mad r14.xy, r11.xyxx, cb7[10].zwzz, r13.xyxx
  mov r14.z, cb0[55].z
  sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r6.z, r14.xyzx, t13.xxxx, s9, r4.z
  mad r6.x, r11.w, r6.z, r6.x
  mul r6.z, r12.y, r12.x
  mad r11.xy, r11.xyxx, cb7[10].zwzz, r13.zwzz
  mov r11.z, cb0[55].z
  sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r6.w, r11.xyzx, t13.xxxx, s9, r4.z
  mad r6.x, r6.z, r6.w, r6.x
  mad r6.x, r6.x, l(0.062500), -r5.w
  mad r4.w, r4.w, r6.x, r5.w
else 
  eq r6.x, r9.z, l(1.000000)
  if_nz r6.x
    mad r6.xz, r4.xxyx, cb7[10].xxyx, l(0.500000, 0.000000, 0.500000, 0.000000)
    round_ni r11.xy, r6.xzxx
    add r6.xz, r6.xxzx, -r11.xxyx
    add r11.xy, r11.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
    mul r11.zw, r11.xxxy, cb7[10].zzzw
    mad r12.xy, -r6.zxzz, l(3.000000, 3.000000, 0.000000, 0.000000), l(4.000000, 4.000000, 0.000000, 0.000000)
    mad r12.zw, r6.xxxz, l(0.000000, 0.000000, 3.000000, 3.000000), l(0.000000, 0.000000, 1.000000, 1.000000)
    mad r13.xy, -r6.xzxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(3.000000, 3.000000, 0.000000, 0.000000)
    div r13.xy, r13.xyxx, r12.yxyy
    add r13.zw, r6.xxxz, l(0.000000, 0.000000, 3.000000, 3.000000)
    div r6.xz, r6.xxzx, r12.zzwz
    add r14.xw, r13.xxxy, l(-2.000000, 0.000000, 0.000000, -2.000000)
    mul r14.yz, r13.wwzw, l(0.000000, 0.142857149, 0.142857149, 0.000000)
    add r13.xy, r6.xzxx, l(2.000000, 2.000000, 0.000000, 0.000000)
    mul r6.x, r12.x, r12.y
    mul r15.xyzw, r14.xwzw, cb7[10].zwzw
    mad r16.xy, r11.xyxx, cb7[10].zwzz, r15.xyxx
    mov r16.z, l(1.000000)
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r6.z, r16.xyzx, t13.xxxx, s9, r4.z
    mul r15.xy, r12.xyxx, l(7.000000, 7.000000, 0.000000, 0.000000)
    mad r16.xy, r11.xyxx, cb7[10].zwzz, r15.zwzz
    mov r16.z, l(1.000000)
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r6.w, r16.xyzx, t13.xxxx, s9, r4.z
    mul r6.w, r6.w, r15.x
    mad r6.x, r6.x, r6.z, r6.w
    mul r6.zw, r12.xxxy, r12.zzzw
    mov r13.zw, r14.wwwy
    mul r16.xyzw, r13.xzxw, cb7[10].zwzw
    mad r17.xy, r11.xyxx, cb7[10].zwzz, r16.xyxx
    mov r17.z, l(1.000000)
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r7.w, r17.xyzx, t13.xxxx, s9, r4.z
    mad r6.x, r6.z, r7.w, r6.x
    mul r17.xyzw, r14.xyzy, cb7[10].zwzw
    mad r18.xy, r11.xyxx, cb7[10].zwzz, r17.xyxx
    mov r18.z, l(1.000000)
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r6.z, r18.xyzx, t13.xxxx, s9, r4.z
    mad r6.x, r15.y, r6.z, r6.x
    mad r15.xy, r11.xyxx, cb7[10].zwzz, r17.zwzz
    mov r15.z, l(1.000000)
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r6.z, r15.xyzx, t13.xxxx, s9, r4.z
    mad r6.x, r6.z, l(49.000000), r6.x
    mul r12.xy, r12.zwzz, l(7.000000, 7.000000, 0.000000, 0.000000)
    mad r15.xy, r11.xyxx, cb7[10].zwzz, r16.zwzz
    mov r15.z, l(1.000000)
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r6.z, r15.xyzx, t13.xxxx, s9, r4.z
    mad r6.x, r12.x, r6.z, r6.x
    mov r14.y, r13.y
    mul r14.xyzw, r14.xyzy, cb7[10].zwzw
    mad r15.xy, r11.xyxx, cb7[10].zwzz, r14.xyxx
    mov r15.z, l(1.000000)
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r6.z, r15.xyzx, t13.xxxx, s9, r4.z
    mad r6.x, r6.w, r6.z, r6.x
    mad r14.xy, r11.xyxx, cb7[10].zwzz, r14.zwzz
    mov r14.z, l(1.000000)
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r6.z, r14.xyzx, t13.xxxx, s9, r4.z
    mad r6.x, r12.y, r6.z, r6.x
    mul r6.z, r12.w, r12.z
    mad r11.xy, r13.xyxx, cb7[10].zwzz, r11.zwzz
    mov r11.z, l(1.000000)
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r6.w, r11.xyzx, t13.xxxx, s9, r4.z
    mad r6.x, r6.z, r6.w, r6.x
    mul r4.w, r6.x, l(0.00694444450)
    mad r6.zw, r8.xxxy, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, -1.000000, -1.000000)
    add r6.zw, |r6.zzzw|, l(0.000000, 0.000000, -0.800000, -0.800000)
    mul_sat r6.zw, r6.zzzw, l(0.000000, 0.000000, 5.000000, 5.000000)
    add r6.zw, -r6.zzzw, l(0.000000, 0.000000, 1.000000, 1.000000)
    add r7.w, r8.z, l(-0.500000)
    mad r7.w, -|r7.w|, l(2.000000), l(1.000000)
    max r7.w, r7.w, l(0.000000)
    min r7.w, r7.w, l(0.200000)
    mul r7.w, r7.w, l(5.000000)
    min r6.z, r6.w, r6.z
    min r6.z, r7.w, r6.z
    ne r6.w, r6.z, l(1.000000)
    if_nz r6.w
      mad r7.xy, r7.xyxx, cb7[10].xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
      round_ni r11.xy, r7.xyxx
      add r7.xy, r7.xyxx, -r11.xyxx
      add r11.xy, r11.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
      mad r11.zw, -r7.yyyx, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, 3.000000, 3.000000)
      mad r12.xy, r7.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(1.000000, 1.000000, 0.000000, 0.000000)
      add r12.zw, -r7.xxxy, l(0.000000, 0.000000, 2.000000, 2.000000)
      div r12.zw, r12.zzzw, r11.wwwz
      div r7.xy, r7.xyxx, r12.xyxx
      add r13.zw, r12.zzzw, l(0.000000, 0.000000, -1.000000, -1.000000)
      add r13.xy, r7.xyxx, l(1.000000, 1.000000, 0.000000, 0.000000)
      mul r6.w, r11.z, r11.w
      mul r14.xyzw, r13.zwxw, cb7[10].zwzw
      mad r15.xy, r11.xyxx, cb7[10].zwzz, r14.xyxx
      mov r15.z, l(2.000000)
      sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r7.x, r15.xyzx, t13.xxxx, s9, r7.z
      mul r7.yw, r11.zzzw, r12.xxxy
      mad r14.xy, r11.xyxx, cb7[10].zwzz, r14.zwzz
      mov r14.z, l(2.000000)
      sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r8.w, r14.xyzx, t13.xxxx, s9, r7.z
      mul r7.y, r7.y, r8.w
      mad r6.w, r6.w, r7.x, r7.y
      mul r13.xyzw, r13.zyxy, cb7[10].zwzw
      mad r14.xy, r11.xyxx, cb7[10].zwzz, r13.xyxx
      mov r14.z, l(2.000000)
      sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r7.x, r14.xyzx, t13.xxxx, s9, r7.z
      mad r6.w, r7.w, r7.x, r6.w
      mul r7.x, r12.y, r12.x
      mad r11.xy, r11.xyxx, cb7[10].zwzz, r13.zwzz
      mov r11.z, l(2.000000)
      sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r7.y, r11.xyzx, t13.xxxx, s9, r7.z
      mad r6.w, r7.x, r7.y, r6.w
      mul r6.w, r6.w, l(0.062500)
      mad r6.x, r6.x, l(0.00694444450), -r6.w
      mad r4.w, r6.z, r6.x, r6.w
    endif 
  else 
    mad r4.xy, r4.xyxx, cb7[10].xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
    round_ni r6.xz, r4.xxyx
    add r4.xy, r4.xyxx, -r6.xzxx
    add r6.xz, r6.xxzx, l(-0.500000, 0.000000, -0.500000, 0.000000)
    mul r7.xy, r6.xzxx, cb7[10].zwzz
    mad r11.xyzw, r4.xxxx, l(11.000000, 11.000000, 5.000000, 5.000000), l(-28.000000, 17.000000, -6.000000, 1.000000)
    mad r12.xyz, r4.xxxx, l(4.000000, 4.000000, 7.000000, 0.000000), l(-5.000000, -16.000000, 5.000000, 0.000000)
    div r12.xyz, r12.xyzx, r11.zxyz
    add r12.xyz, r12.yxzy, l(-1.000000, -3.000000, 1.000000, 0.000000)
    div r4.x, r4.x, r11.w
    add r13.x, r4.x, l(3.000000)
    mad r14.xyzw, r4.yyyy, l(11.000000, 11.000000, 5.000000, 5.000000), l(-28.000000, 17.000000, -6.000000, 1.000000)
    mad r15.xyz, r4.yyyy, l(4.000000, 4.000000, 7.000000, 0.000000), l(-5.000000, -16.000000, 5.000000, 0.000000)
    div r15.xyz, r15.xyzx, r14.zxyz
    add r15.xyz, r15.xyzx, l(-3.000000, -1.000000, 1.000000, 0.000000)
    div r4.x, r4.y, r14.w
    add r16.y, r4.x, l(3.000000)
    mul r17.xyzw, r11.zxzx, r14.zzxx
    mov r12.w, r15.x
    mul r18.xyzw, r12.ywxw, cb7[10].zwzw
    mad r9.xy, r6.xzxx, cb7[10].zwzz, r18.xyxx
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r4.x, r9.xyzx, t13.xxxx, s9, r4.z
    mad r9.xy, r6.xzxx, cb7[10].zwzz, r18.zwzz
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r4.y, r9.xyzx, t13.xxxx, s9, r4.z
    mul r4.y, r4.y, r17.y
    mad r4.x, r17.x, r4.x, r4.y
    mul r18.xyzw, -r11.ywyw, r14.zzxx
    mad r9.xy, r12.zwzz, cb7[10].zwzz, r7.xyxx
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r4.y, r9.xyzx, t13.xxxx, s9, r4.z
    mad r4.x, r18.x, r4.y, r4.x
    mov r13.y, r12.w
    mad r9.xy, r13.xyxx, cb7[10].zwzz, r7.xyxx
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r4.y, r9.xyzx, t13.xxxx, s9, r4.z
    mad r4.x, r18.y, r4.y, r4.x
    mov r15.w, r12.y
    mul r19.xyzw, r15.wywz, cb7[10].zwzw
    mad r9.xy, r6.xzxx, cb7[10].zwzz, r19.xyxx
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r4.y, r9.xyzx, t13.xxxx, s9, r4.z
    mad r4.x, r17.z, r4.y, r4.x
    mov r12.yw, r15.yyyz
    mul r20.xyzw, r12.xyzy, cb7[10].zwzw
    mad r9.xy, r6.xzxx, cb7[10].zwzz, r20.xyxx
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r4.y, r9.xyzx, t13.xxxx, s9, r4.z
    mad r4.x, r17.w, r4.y, r4.x
    mad r9.xy, r6.xzxx, cb7[10].zwzz, r20.zwzz
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r4.y, r9.xyzx, t13.xxxx, s9, r4.z
    mad r4.x, r18.z, r4.y, r4.x
    mov r13.zw, r12.yyyw
    mul r17.xyzw, r13.xzxw, cb7[10].zwzw
    mad r9.xy, r6.xzxx, cb7[10].zwzz, r17.xyxx
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r4.y, r9.xyzx, t13.xxxx, s9, r4.z
    mad r4.x, r18.w, r4.y, r4.x
    mul r18.xyzw, r11.zxzx, -r14.yyww
    mad r9.xy, r6.xzxx, cb7[10].zwzz, r19.zwzz
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r4.y, r9.xyzx, t13.xxxx, s9, r4.z
    mad r4.x, r18.x, r4.y, r4.x
    mul r19.xyzw, r12.xwzw, cb7[10].zwzw
    mad r9.xy, r6.xzxx, cb7[10].zwzz, r19.xyxx
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r4.y, r9.xyzx, t13.xxxx, s9, r4.z
    mad r4.x, r18.y, r4.y, r4.x
    mul r11.xyzw, r11.ywyw, r14.yyww
    mad r9.xy, r6.xzxx, cb7[10].zwzz, r19.zwzz
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r4.y, r9.xyzx, t13.xxxx, s9, r4.z
    mad r4.x, r11.x, r4.y, r4.x
    mad r9.xy, r6.xzxx, cb7[10].zwzz, r17.zwzz
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r4.y, r9.xyzx, t13.xxxx, s9, r4.z
    mad r4.x, r11.y, r4.y, r4.x
    mov r16.x, r15.w
    mad r9.xy, r16.xyxx, cb7[10].zwzz, r7.xyxx
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r4.y, r9.xyzx, t13.xxxx, s9, r4.z
    mad r4.x, r18.z, r4.y, r4.x
    mov r16.zw, r12.xxxz
    mul r12.xyzw, r16.zywy, cb7[10].zwzw
    mad r9.xy, r6.xzxx, cb7[10].zwzz, r12.xyxx
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r4.y, r9.xyzx, t13.xxxx, s9, r4.z
    mad r4.x, r18.w, r4.y, r4.x
    mad r9.xy, r6.xzxx, cb7[10].zwzz, r12.zwzz
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r4.y, r9.xyzx, t13.xxxx, s9, r4.z
    mad r4.x, r11.z, r4.y, r4.x
    mov r16.x, r13.x
    mad r9.xy, r16.xyxx, cb7[10].zwzz, r7.xyxx
    sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r4.y, r9.xyzx, t13.xxxx, s9, r4.z
    mad r4.x, r11.w, r4.y, r4.x
    mul r4.w, r4.x, l(0.000369822490)
    mad r4.yz, r10.xxyx, l(0.000000, 2.000000, 2.000000, 0.000000), l(0.000000, -1.000000, -1.000000, 0.000000)
    add r4.yz, |r4.yyzy|, l(0.000000, -0.800000, -0.800000, 0.000000)
    mul_sat r4.yz, r4.yyzy, l(0.000000, 5.000000, 5.000000, 0.000000)
    add r4.yz, -r4.yyzy, l(0.000000, 1.000000, 1.000000, 0.000000)
    add r6.x, r10.z, l(-0.500000)
    mad r6.x, -|r6.x|, l(2.000000), l(1.000000)
    max r6.x, r6.x, l(0.000000)
    min r6.x, r6.x, l(0.200000)
    mul r6.x, r6.x, l(5.000000)
    min r4.y, r4.z, r4.y
    min r4.y, r6.x, r4.y
    ne r4.z, r4.y, l(1.000000)
    if_nz r4.z
      mad r6.xz, r8.xxyx, cb7[10].xxyx, l(0.500000, 0.000000, 0.500000, 0.000000)
      round_ni r7.xy, r6.xzxx
      add r6.xz, r6.xxzx, -r7.xxyx
      add r7.xy, r7.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
      mul r7.zw, r7.xxxy, cb7[10].zzzw
      mad r8.xy, -r6.zxzz, l(3.000000, 3.000000, 0.000000, 0.000000), l(4.000000, 4.000000, 0.000000, 0.000000)
      mad r9.xy, r6.xzxx, l(3.000000, 3.000000, 0.000000, 0.000000), l(1.000000, 1.000000, 0.000000, 0.000000)
      mad r9.zw, -r6.xxxz, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, 3.000000, 3.000000)
      div r9.zw, r9.zzzw, r8.yyyx
      add r10.xy, r6.xzxx, l(3.000000, 3.000000, 0.000000, 0.000000)
      div r6.xz, r6.xxzx, r9.xxyx
      add r11.xw, r9.zzzw, l(-2.000000, 0.000000, 0.000000, -2.000000)
      mul r11.yz, r10.yyxy, l(0.000000, 0.142857149, 0.142857149, 0.000000)
      add r10.xy, r6.xzxx, l(2.000000, 2.000000, 0.000000, 0.000000)
      mul r4.z, r8.x, r8.y
      mul r12.xyzw, r11.xwzw, cb7[10].zwzw
      mad r13.xy, r7.xyxx, cb7[10].zwzz, r12.xyxx
      mov r13.z, l(1.000000)
      sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r6.x, r13.xyzx, t13.xxxx, s9, r8.z
      mul r6.zw, r8.xxxy, l(0.000000, 0.000000, 7.000000, 7.000000)
      mad r12.xy, r7.xyxx, cb7[10].zwzz, r12.zwzz
      mov r12.z, l(1.000000)
      sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r8.w, r12.xyzx, t13.xxxx, s9, r8.z
      mul r6.z, r6.z, r8.w
      mad r4.z, r4.z, r6.x, r6.z
      mul r6.xz, r8.xxyx, r9.xxyx
      mov r10.zw, r11.wwwy
      mul r12.xyzw, r10.xzxw, cb7[10].zwzw
      mad r13.xy, r7.xyxx, cb7[10].zwzz, r12.xyxx
      mov r13.z, l(1.000000)
      sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r8.x, r13.xyzx, t13.xxxx, s9, r8.z
      mad r4.z, r6.x, r8.x, r4.z
      mul r13.xyzw, r11.xyzy, cb7[10].zwzw
      mad r14.xy, r7.xyxx, cb7[10].zwzz, r13.xyxx
      mov r14.z, l(1.000000)
      sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r6.x, r14.xyzx, t13.xxxx, s9, r8.z
      mad r4.z, r6.w, r6.x, r4.z
      mad r13.xy, r7.xyxx, cb7[10].zwzz, r13.zwzz
      mov r13.z, l(1.000000)
      sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r6.x, r13.xyzx, t13.xxxx, s9, r8.z
      mad r4.z, r6.x, l(49.000000), r4.z
      mul r6.xw, r9.xxxy, l(7.000000, 0.000000, 0.000000, 7.000000)
      mad r12.xy, r7.xyxx, cb7[10].zwzz, r12.zwzz
      mov r12.z, l(1.000000)
      sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r8.x, r12.xyzx, t13.xxxx, s9, r8.z
      mad r4.z, r6.x, r8.x, r4.z
      mov r11.y, r10.y
      mul r11.xyzw, r11.xyzy, cb7[10].zwzw
      mad r12.xy, r7.xyxx, cb7[10].zwzz, r11.xyxx
      mov r12.z, l(1.000000)
      sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r6.x, r12.xyzx, t13.xxxx, s9, r8.z
      mad r4.z, r6.z, r6.x, r4.z
      mad r11.xy, r7.xyxx, cb7[10].zwzz, r11.zwzz
      mov r11.z, l(1.000000)
      sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r6.x, r11.xyzx, t13.xxxx, s9, r8.z
      mad r4.z, r6.w, r6.x, r4.z
      mul r6.x, r9.y, r9.x
      mad r7.xy, r10.xyxx, cb7[10].zwzz, r7.zwzz
      mov r7.z, l(1.000000)
      sample_c_lz_aoffimmi_indexable(0,0,0)(texture2darray)(float,float,float,float) r6.z, r7.xyzx, t13.xxxx, s9, r8.z
      mad r4.z, r6.x, r6.z, r4.z
      mul r4.z, r4.z, l(0.00694444450)
      mad r4.x, r4.x, l(0.000369822490), -r4.z
      mad r4.w, r4.y, r4.x, r4.z
    endif 
  endif 
endif 
mul r4.xyz, cb3[1].zzzz, cb7[11].xyzx
mul r4.xyz, r4.wwww, r4.xyzx
mad r0.yzw, r0.yywz, r1.xxxx, -cb7[12].xxyz
dp3 r1.x, r0.yzwy, r0.yzwy
rsq r1.x, r1.x
mul r0.yzw, r0.yyzw, r1.xxxx
dp3 r1.x, r0.ywzy, r1.yzwy
add r1.x, -r1.x, l(1.000000)
mul r4.w, r1.x, r1.x
mul r4.w, r4.w, r4.w
mul r1.x, r1.x, r4.w
mad r1.x, r1.x, l(0.980000), l(0.020000)
dp3_sat r4.w, -cb7[12].yzxy, r3.yzwy
mul r6.x, r2.w, r2.w
mul r6.z, r2.x, r2.x
mad r6.w, -r2.x, r2.x, l(1.000000)
mad r6.x, r6.x, r6.w, r6.z
mul r7.x, r4.w, r4.w
mad r6.z, r7.x, r6.w, r6.z
sqrt r6.xz, r6.xxzx
mul r2.w, r2.w, r6.z
mad r2.w, r4.w, r6.x, r2.w
add r2.w, r2.w, r2.w
max r2.w, r2.w, l(0.000100)
div r2.w, l(1.000000, 1.000000, 1.000000, 1.000000), r2.w
dp3_sat r0.y, r0.zwyz, r3.yzwy
mad r0.z, r2.x, r2.x, l(-1.000000)
mul r0.y, r0.y, r0.y
mad r0.y, r0.y, r0.z, l(1.000000)
div r0.y, r2.x, r0.y
mul r0.y, r0.y, r0.y
mul r0.yzw, r0.yyyy, r4.xxyz
mul r0.yzw, r4.wwww, r0.yyzw
mul r0.yzw, r2.wwww, r0.yyzw
mul r0.yzw, r1.xxxx, r0.yyzw
mad r6.xzw, -r1.yywz, r3.xxxx, r22.xxyz
mul_sat r7.xyz, cb7[11].xyzx, -cb7[12].zzzz
add r1.x, -r6.w, v4.z
max r1.x, r1.x, l(0.000000)
mul r2.xw, r1.xxxx, r3.wwwy
mad r6.xz, r2.xxwx, l(0.500000, 0.000000, 0.500000, 0.000000), r6.xxzx
add r8.xyz, |r3.wyzw|, l(-0.200000, -0.200000, -0.200000, 0.000000)
mul r8.xyz, r8.xyzx, l(7.000000, 7.000000, 7.000000, 0.000000)
max r8.xyz, r8.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
add r2.x, r8.y, r8.x
add r2.x, r8.z, r2.x
div r8.xyz, r8.xyzx, r2.xxxx
mul r9.xyzw, r6.zwwx, cb5[10].yyyy
sample_indexable(texture2d)(float,float,float,float) r10.xyz, r9.xyxx, t9.xyzw, s6
sample_indexable(texture2d)(float,float,float,float) r9.xyz, r9.zwzz, t9.xyzw, s6
mul r2.xw, r6.xxxz, cb5[10].yyyy
sample_indexable(texture2d)(float,float,float,float) r6.xzw, r2.xwxx, t9.xwyz, s6
mul r9.xyz, r8.yyyy, r9.xyzx
mad r8.xyw, r10.xyxz, r8.xxxx, r9.xyxz
mad r6.xzw, r6.xxzw, r8.zzzz, r8.xxyw
mul r6.xzw, r7.xxyz, r6.xxzw
mul r6.xzw, r5.wwww, r6.xxzw
mul r1.x, r1.x, -cb5[0].y
exp r1.x, r1.x
mul r6.xzw, r1.xxxx, r6.xxzw
dp3 r1.x, r5.xyzx, l(0.212600, 0.715200, 0.072200, 0.000000)
add_sat r7.xyz, cb5[5].xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
add r2.x, r2.z, r2.z
mad r1.yzw, r3.wwzy, -r2.xxxx, r1.yyzw
mul r2.xzw, r1.xxxx, r7.xxyz
mov r1.yzw, -r1.yyzw
sample_l_indexable(texturecube)(float,float,float,float) r1.yzw, r1.yzwy, t10.wxyz, s7, r6.y
mul r1.yzw, r1.yyzw, r2.xxzw
mad r1.yzw, r1.yyzw, cb5[12].yyyy, cb5[12].xxxx
add r0.x, -r0.x, r3.x
mul r0.x, r0.x, -cb5[0].x
exp r0.x, r0.x
add r0.x, -r0.x, l(1.000000)
max r0.x, r0.x, l(0.000000)
mad r2.xzw, r4.wwww, r4.xxyz, r5.xxyz
mul r2.xzw, r2.xxzw, l(0.980000, 0.000000, 0.980000, 0.980000)
mad r0.yzw, r1.yyzw, r2.yyyy, r0.yyzw
mul r1.yzw, r7.xxyz, cb5[4].xxyz
mul r1.x, r1.x, cb5[10].x
mul r1.x, r1.x, l(100.000000)
mul r3.xyz, r1.xxxx, r6.xzwx
mul r0.yzw, r0.xxxx, r0.yyzw
mad r0.yzw, r2.xxzw, r1.yyzw, r0.yyzw
mov r1.w, -r0.x
add r2.x, r1.w, l(1.000000)
mad r0.yzw, r3.xxyz, r2.xxxx, r0.yyzw
lt r2.xy, l(0.000000, 0.000000, 0.000000, 0.000000), cb0[39].zwzz
and r2.x, r2.y, r2.x
if_nz r2.x
  ftou r2.xy, v0.xyxx
  add r3.xyz, v4.xyzx, -r22.xyzx
  dp3 r2.z, r3.xyzx, r3.xyzx
  sqrt r2.z, r2.z
  utof r2.xy, r2.xyxx
  mul r3.xy, r2.xyxx, cb0[40].zwzz
  add r2.x, r2.z, -cb6[0].w
  div r2.x, r2.x, cb6[0].z
  log r2.x, r2.x
  mul r2.x, r2.x, l(0.250000)
  ushr r2.y, cb6[2].z, l(1)
  utof r2.y, r2.y
  mul r2.x, r2.y, r2.x
  iadd r2.y, cb6[2].z, l(-1)
  itof r2.y, r2.y
  div r3.z, r2.x, r2.y
  sample_l_indexable(texture3d)(float,float,float,float) r2.xyz, r3.xyzx, t11.xyzw, s8, l(0.000000)
  sample_l_indexable(texture3d)(float,float,float,float) r2.w, r3.xyzx, t12.yzwx, s8, l(0.000000)
  ld_structured_indexable(structured_buffer, stride=16)(mixed,mixed,mixed,mixed) r3.x, l(0), l(12), t2.xxxx
  mul r2.xyz, r2.xyzx, r3.xxxx
else 
  add r3.xyz, v4.xyzx, -r22.xyzx
  dp3 r3.x, r3.xyzx, r3.xyzx
  sqrt r3.x, r3.x
  mad_sat r3.x, r3.x, cb0[35].y, cb0[35].x
  mul r3.y, r3.z, cb0[39].y
  max r3.y, r3.y, l(-125.000000)
  lt r3.z, l(0.000001), |r3.y|
  exp r3.w, -r3.y
  add r3.w, -r3.w, l(1.000000)
  div r3.y, r3.w, r3.y
  movc r3.y, r3.z, r3.y, l(1.000000)
  mad r3.y, r3.y, cb0[39].x, cb0[35].w
  mul r3.x, r3.y, r3.x
  mul r3.x, r3.x, -cb0[35].z
  exp r2.w, r3.x
  mad r2.xyz, -v2.xyzx, r2.wwww, v2.xyzx
endif 
mad r0.yzw, r0.yyzw, r2.wwww, r2.xxyz
mul r1.xyz, r0.xxxx, r0.yzwy
mad r0.xyzw, v2.wwww, r1.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), t2.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 661 instruction slots used