//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
//   using 3Dmigoto v1.2.31 on Wed Mar 02 08:06:32 2016
//
//
// Buffer Definitions: 
//
// cbuffer CViewportShaderParameterProvider
// {
//
//   float4x4 InvProjectionMatrix;      // Offset:    0 Size:    64 [unused]
//   float4x4 InvViewMatrix;            // Offset:   64 Size:    64 [unused]
//   float4x4 ProjectionMatrix;         // Offset:  128 Size:    64 [unused]
//   float4x4 ViewMatrix;               // Offset:  192 Size:    64 [unused]
//   float4x4 ViewProjectionMatrix;     // Offset:  256 Size:    64
//   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 [unused]
//   float4 FogSHB;                     // Offset:  576 Size:    16
//   float4 FogSHG;                     // Offset:  592 Size:    16
//   float4 FogSHR;                     // Offset:  608 Size:    16
//   float4 HeightFogParams;            // Offset:  624 Size:    16
//   float4 ViewportSize;               // Offset:  640 Size:    16 [unused]
//   float3 ViewPoint;                  // Offset:  656 Size:    12 [unused]
//   float3 CameraPosition;             // Offset:  672 Size:    12
//   float3 CameraPosition_Previous;    // Offset:  688 Size:    12 [unused]
//   float3 CameraPositionFractions;    // Offset:  704 Size:    12 [unused]
//   float3 CameraPositionFractions_Previous;// Offset:  720 Size:    12 [unused]
//   float3 CameraRight;                // Offset:  736 Size:    12 [unused]
//   float3 CameraUp;                   // Offset:  752 Size:    12 [unused]
//   float3 CameraDirection;            // Offset:  768 Size:    12 [unused]
//   float3 EnvironmentMapColorOffset;  // Offset:  784 Size:    12 [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 [unused]
//   float UseNormalization;            // Offset:  892 Size:     4 [unused]
//   float FogUndergroundColorScale;    // Offset:  896 Size:     4
//
// }
//
// cbuffer CGlobalShaderParameterProvider
// {
//
//   float4 BurnColor;                  // Offset:    0 Size:    16 [unused]
//   float4 BurnParams;                 // Offset:   16 Size:    16 [unused]
//   float4 BurnParams2;                // Offset:   32 Size:    16 [unused]
//   float4 BurnParams3;                // Offset:   48 Size:    16 [unused]
//   float4 CascadedShadowScaleOffsetTile0;// Offset:   64 Size:    16 [unused]
//   float4 CascadedShadowScaleOffsetTile1;// Offset:   80 Size:    16 [unused]
//   float4 WindSimParamsX;             // Offset:   96 Size:    16 [unused]
//   float4 WindSimParamsY;             // Offset:  112 Size:    16 [unused]
//   float VistaNoiseIntensity;         // Offset:  128 Size:     4 [unused]
//   float Time;                        // Offset:  132 Size:     4
//   float WindFactor;                  // Offset:  136 Size:     4 [unused]
//   float FireGlowEV;                  // Offset:  140 Size:     4 [unused]
//   float BurnSpeedScale;              // Offset:  144 Size:     4 [unused]
//   float BurnlineMaskScale;           // Offset:  148 Size:     4 [unused]
//   float BurnlineMaskInfluence;       // Offset:  152 Size:     4 [unused]
//   float WorldSpaceProgressionMaskScale;// Offset:  156 Size:     4 [unused]
//   float WorldSpaceProgressionMaskInfluence;// Offset:  160 Size:     4 [unused]
//   float MaskTransitionSpeedModifier; // Offset:  164 Size:     4 [unused]
//   float GlowMaskScale;               // Offset:  168 Size:     4 [unused]
//   float FireGlowMaskInfluence;       // Offset:  172 Size:     4 [unused]
//   float CenterBurnlineWidth;         // Offset:  176 Size:     4 [unused]
//   float TransitionToBurnlineWidth;   // Offset:  180 Size:     4 [unused]
//   float DissolveCutoffPoint;         // Offset:  184 Size:     4 [unused]
//   float DissolveBlendDistance;       // Offset:  188 Size:     4 [unused]
//   float EyeGlossinessScale;          // Offset:  192 Size:     4 [unused]
//   float EyeSpecIntensityScale;       // Offset:  196 Size:     4 [unused]
//   float EyeIrisGlossinessScale;      // Offset:  200 Size:     4 [unused]
//   float EyeIrisSpecIntensityScale;   // Offset:  204 Size:     4 [unused]
//   float EyeReflectionBoostScale;     // Offset:  208 Size:     4 [unused]
//   bool EyeReflectionMaskEnable;      // Offset:  212 Size:     4 [unused]
//   float4 BurnParams4;                // Offset:  224 Size:    16 [unused]
//   float4 BurnParams5;                // Offset:  240 Size:    16 [unused]
//
// }
//
// cbuffer 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 ShangrilaOcean
// {
//
//   float4 FoamLayer1Params;           // Offset:    0 Size:    16 [unused]
//   float4 FoamLayer2Params;           // Offset:   16 Size:    16 [unused]
//   float4 FoamParams;                 // Offset:   32 Size:    16 [unused]
//   float4 FoamSettings;               // Offset:   48 Size:    16 [unused]
//   float4 MaterialPickingID;          // Offset:   64 Size:    16 [unused]
//   float4 NormalMapParams1;           // Offset:   80 Size:    16
//   float4 NormalMapParams2;           // Offset:   96 Size:    16
//   float4 NormalMapParams3;           // Offset:  112 Size:    16
//   float4 NormalMapParams4;           // Offset:  128 Size:    16
//   float4 NormalsMaskParams;          // Offset:  144 Size:    16
//   float4 Octave1Params;              // Offset:  160 Size:    16 [unused]
//   float4 Octave2Params;              // Offset:  176 Size:    16 [unused]
//   float4 Octave3Params;              // Offset:  192 Size:    16 [unused]
//   float4 Octave4Params;              // Offset:  208 Size:    16 [unused]
//   float4 Octave5Params;              // Offset:  224 Size:    16 [unused]
//   float4 Octave6Params;              // Offset:  240 Size:    16 [unused]
//   float4 Octave7Params;              // Offset:  256 Size:    16 [unused]
//   float4 Octave8Params;              // Offset:  272 Size:    16 [unused]
//   float4 WavesCrestWeights;          // Offset:  288 Size:    16 [unused]
//   float3 ConstantReflectanceFactor;  // Offset:  304 Size:    12 [unused]
//   float DampingFadeOut;              // Offset:  316 Size:     4 [unused]
//   float3 DisplacementParams;         // Offset:  320 Size:    12
//   float DepthDistanceCff;            // Offset:  332 Size:     4 [unused]
//   float3 NormalIncidenceReflectance; // Offset:  336 Size:    12 [unused]
//   float HighNormalsScale;            // Offset:  348 Size:     4 [unused]
//   float3 OceanColorDeep;             // Offset:  352 Size:    12 [unused]
//   float NormalsScale;                // Offset:  364 Size:     4 [unused]
//   float3 OceanColorShallow;          // Offset:  368 Size:    12 [unused]
//   float RimLightIntensity;           // Offset:  380 Size:     4 [unused]
//   float2 CausticsDepthFade;          // Offset:  384 Size:     8 [unused]
//   float2 CausticsParams;             // Offset:  392 Size:     8 [unused]
//   float2 CausticsRcpDepthFade;       // Offset:  400 Size:     8 [unused]
//   float2 Octave1Dir;                 // Offset:  408 Size:     8 [unused]
//   float2 Octave2Dir;                 // Offset:  416 Size:     8 [unused]
//   float2 Octave3Dir;                 // Offset:  424 Size:     8 [unused]
//   float2 Octave4Dir;                 // Offset:  432 Size:     8 [unused]
//   float2 Octave5Dir;                 // Offset:  440 Size:     8 [unused]
//   float2 Octave6Dir;                 // Offset:  448 Size:     8 [unused]
//   float2 Octave7Dir;                 // Offset:  456 Size:     8 [unused]
//   float2 Octave8Dir;                 // Offset:  464 Size:     8 [unused]
//   float2 Smoothness;                 // Offset:  472 Size:     8 [unused]
//   float2 WavesFade;                  // Offset:  480 Size:     8
//   float2 WavesHiResFade;             // Offset:  488 Size:     8
//   float RimLightWidth;               // Offset:  496 Size:     4 [unused]
//   float ShallowWaterDepth;           // Offset:  500 Size:     4 [unused]
//   float TexGeoWavesBlendCff;         // Offset:  504 Size:     4 [unused]
//
// }
//
// cbuffer COceanParameterProvider
// {
//
//   float4 WavesAmpHDir_ampVDirOverWL[8];// Offset:    0 Size:   128
//   float4 WavesDir_oneOverWL_ampHWL[8];// Offset:  128 Size:   128
//   float4 WavesParameters[8];         // Offset:  256 Size:   128
//   float4 CornerPointsWS[4];          // Offset:  384 Size:    64 [unused]
//   float WavesCrestWeightsNorm[4];    // Offset:  448 Size:    52
//   float4 OceanParameters;            // Offset:  512 Size:    16 [unused]
//   float4 SkyParameters;              // Offset:  528 Size:    16 [unused]
//   float4 VertexAdjustments;          // Offset:  544 Size:    16 [unused]
//   float2 GridSize;                   // Offset:  560 Size:     8 [unused]
//   float OneOverWavesFade;            // Offset:  568 Size:     4
//   float OneOverWavesHiResFade;       // Offset:  572 Size:     4
//   float WaterLevel;                  // Offset:  576 Size:     4
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// SectorHemiMapSamplerStateLinear    sampler      NA          NA    0        1
// DisplacementTexture__SampObj__    sampler      NA          NA    1        1
// SectorOcclusion_HeightTexture__TexObj__    texture  float4          2d    0        1
// DisplacementTexture__TexObj__     texture  float4          2d    1        1
// CViewportShaderParameterProvider    cbuffer      NA          NA    0        1
// CGlobalShaderParameterProvider    cbuffer      NA          NA    1        1
// CSceneTerrainSkyOcclusionAtlasPrivateData    cbuffer      NA          NA    2        1
// CAmbientProvider                  cbuffer      NA          NA    3        1
// ShangrilaOcean                    cbuffer      NA          NA    4        1
// COceanParameterProvider           cbuffer      NA          NA    5        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// position                 0   xyzw        0     NONE   float   xyz 
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float   xyzw
// TEXCOORD                 0   xyz         1     NONE   float   xyz 
// TEXCOORD                 1   xyz         2     NONE   float   xyz 
// TEXCOORD                 2   xyz         3     NONE   float   xyz 
// TEXCOORD                 3   xyz         4     NONE   float   xyz 
// TEXCOORD                 4   xyz         5     NONE   float   xyz 
// TEXCOORD                 5   xyzw        6     NONE   float   xyzw
// TEXCOORD                 6   xyzw        7     NONE   float   xyzw
// TEXCOORD                 7   xyzw        8     NONE   float   xyzw
// TEXCOORD                 8   xy          9     NONE   float   xy  
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[57], immediateIndexed
dcl_constantbuffer cb1[9], immediateIndexed
dcl_constantbuffer cb2[3], immediateIndexed
dcl_constantbuffer cb3[19], immediateIndexed
dcl_constantbuffer cb4[31], immediateIndexed
dcl_constantbuffer cb5[37], dynamicIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t1
dcl_input v0.xyz
dcl_output_siv o0.xyzw, position
dcl_output o1.xyz
dcl_output o2.xyz
dcl_output o3.xyz
dcl_output o4.xyz
dcl_output o5.xyz
dcl_output o6.xyzw
dcl_output o7.xyzw
dcl_output o8.xyzw
dcl_output o9.xy
dcl_temps 9

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

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

lt r0.x, l(0.000000), v0.z
lt r0.y, v0.z, l(0.000000)
iadd r0.x, r0.y, -r0.x
itof r0.x, r0.x
ge r0.x, r0.x, l(0.000000)
and o9.y, r0.x, l(0x3f800000)
mul r0.x, cb1[8].y, cb4[5].y
mul r0.xy, r0.xxxx, cb4[5].zwzz
mad o6.xy, v0.xyxx, cb4[5].xxxx, r0.xyxx
mul r0.x, cb1[8].y, cb4[6].y
mul r0.xy, r0.xxxx, cb4[6].zwzz
mad o6.zw, v0.xxxy, cb4[6].xxxx, r0.xxxy
mul r0.x, cb1[8].y, cb4[7].y
mul r0.xy, r0.xxxx, cb4[7].zwzz
mad o7.xy, v0.xyxx, cb4[7].xxxx, r0.xyxx
mul r0.x, cb1[8].y, cb4[8].y
mul r0.xy, r0.xxxx, cb4[8].zwzz
mad o7.zw, v0.xxxy, cb4[8].xxxx, r0.xxxy
mul r0.x, cb1[8].y, cb4[9].y
mul r0.xy, r0.xxxx, cb4[9].zwzz
mad o8.xy, v0.xyxx, cb4[9].xxxx, r0.xyxx
mov r0.xy, v0.xyxx
mov r0.z, cb5[36].x
add r1.xyz, r0.xyzx, -cb0[42].xyzx
dp3 r0.w, r1.xyzx, r1.xyzx
sqrt r0.w, r0.w
mul r1.xy, r0.wwww, cb5[35].zwzz
max r1.xy, r1.xyxx, l(0.200000, 0.500000, 0.000000, 0.000000)
min r1.xy, r1.xyxx, l(1.000000, 1.000000, 0.000000, 0.000000)
mad r1.x, -r1.x, l(1.250000), l(1.250000)
log r1.x, r1.x
mul r1.x, r1.x, cb4[30].y
exp r1.x, r1.x
mov r3.xy, l(0,0,0,0)
mov r1.zw, l(0,0,0,0)
mov r2.xyzw, l(0,0,0,0)
loop 
  ige r3.w, r2.w, l(4)
  breakc_nz r3.w
  dp2 r3.w, cb5[r2.w + 8].xyxx, v0.xyxx
  mad r3.w, -cb5[r2.w + 16].x, cb1[8].y, r3.w
  sincos r4.x, r5.x, r3.w
  mad r2.xy, -cb5[r2.w + 0].xyxx, r4.xxxx, r2.xyxx
  mad r2.z, cb5[r2.w + 16].z, r5.x, r2.z
  mad r1.w, r5.x, cb5[r2.w + 28].x, r1.w
  mad r3.xy, cb5[r2.w + 0].zwzz, r4.xxxx, r3.xyxx
  mul r3.w, cb5[r2.w + 8].w, cb5[r2.w + 16].z
  mad r1.z, r3.w, r5.x, r1.z
  iadd r2.w, r2.w, l(1)
endloop 
add r3.z, -r1.z, l(1.000000)
add r1.z, r0.w, r0.w
mul r2.w, r1.z, cb5[35].z
mov_sat r2.w, r2.w
add r4.xyz, -r3.xyzx, l(0.000000, 0.000000, 1.000000, 0.000000)
mad r3.xyz, r2.wwww, r4.xyzx, r3.xyzx
mad r1.w, r1.w, l(0.500000), l(0.500000)
mul_sat r1.w, r1.w, |v0.z|
mad r1.y, -r1.y, l(2.000000), l(2.000000)
log r1.y, r1.y
mul r1.y, r1.y, cb4[30].w
exp r1.y, r1.y
mov r4.xy, l(0,0,0,0)
mov r5.xyz, l(0,0,0,0)
mov r2.w, l(4)
loop 
  ige r3.w, r2.w, l(8)
  breakc_nz r3.w
  dp2 r3.w, cb5[r2.w + 8].xyxx, v0.xyxx
  mad r3.w, -cb5[r2.w + 16].x, cb1[8].y, r3.w
  sincos r6.x, r7.x, r3.w
  mad r5.xy, -cb5[r2.w + 0].xyxx, r6.xxxx, r5.xyxx
  mad r5.z, cb5[r2.w + 16].z, r7.x, r5.z
  mad r4.xy, cb5[r2.w + 0].zwzz, r6.xxxx, r4.xyxx
  iadd r2.w, r2.w, l(1)
endloop 
mul r5.xyz, r1.yyyy, r5.xyzx
add r1.y, -r1.w, l(1.000000)
mul r5.xyz, r1.yyyy, r5.xyzx
mad r5.xyz, r5.xyzx, |v0.zzzz|, r0.xyzx
mad_sat r1.y, -r1.z, cb5[35].w, l(1.000000)
mul r1.xzw, r1.xxxx, r2.xxyz
mad r1.xzw, r1.xxzw, |v0.zzzz|, r5.xxyz
mad r3.xy, r1.yyyy, r4.xyxx, r3.xyxx
dp3 r1.y, r3.xyzx, r3.xyzx
rsq r1.y, r1.y
mul o2.xyz, r1.yyyy, r3.xyzx
mul r0.w, r0.w, l(0.001250)
min r0.w, r0.w, l(1.000000)
add r0.w, -r0.w, l(1.000000)
mul r1.y, cb1[8].y, cb4[20].z
mul r2.xyzw, cb4[20].yxxx, l(6.000000, 0.00195312500, 0.000976562500, 0.00390625000)
add r3.xyzw, r1.xzxz, l(0.200000, 0.200000, 0.400000, 0.200000)
mul r4.xyz, r1.yyyy, l(0.050000, -0.005000, 0.025000, 0.000000)
mad r3.xyzw, r3.xyzw, r2.zzyy, r4.xyyx
sample_l_indexable(texture2d)(float,float,float,float) r4.xyw, r3.xyxx, t1.xywz, s1, l(0.000000)
sample_l_indexable(texture2d)(float,float,float,float) r3.xyz, r3.zwzz, t1.xyzw, s1, l(0.000000)
add r2.yz, r1.xxzx, l(0.000000, 0.200000, 0.400000, 0.000000)
mad r2.yz, r2.yyzy, r2.wwww, r4.zzzz
sample_l_indexable(texture2d)(float,float,float,float) r2.yzw, r2.yzyy, t1.wxyz, s1, l(0.000000)
dp3 r1.y, r4.xywx, l(-1.000000, 1.000000, 1.000000, 0.000000)
dp3 r3.x, r3.yxzy, l(-1.000000, 1.000000, 1.000000, 0.000000)
add r1.y, r1.y, r3.x
dp3 r2.y, r2.wzyw, l(-1.000000, 1.000000, 1.000000, 0.000000)
add r1.y, r1.y, r2.y
mul r1.y, r2.x, r1.y
mad r1.y, r1.y, l(0.100000), -cb4[20].y
mul r2.x, r0.w, r1.y
mad r1.xyz, r1.yyyy, r0.wwww, r1.xzwx
mul o8.z, |r2.x|, l(0.250000)
add o3.xyz, -r1.xyzx, cb0[42].xyzx
mov r1.w, l(1.000000)
dp4 r2.x, r1.xyzw, cb0[16].xyzw
dp4 r2.y, r1.xyzw, cb0[17].xyzw
dp4 o0.z, r1.xyzw, cb0[18].xyzw
dp4 r2.w, r1.xyzw, cb0[19].xyzw
lt r3.xy, l(0.000000, 0.000000, 0.000000, 0.000000), cb0[39].zwzz
and r1.w, r3.y, r3.x
if_nz r1.w
  mov o1.xyz, l(0,0,0,0)
else 
  add r3.xyz, r1.yzxy, -cb0[42].yzxy
  dp3 r1.w, r3.xyzx, r3.xyzx
  rsq r1.w, r1.w
  mul r3.yzw, r1.wwww, r3.xxyz
  mov r3.x, l(1.000000)
  dp4 r4.x, cb0[38].xyzw, r3.xyzw
  dp4 r4.y, cb0[37].xyzw, r3.xyzw
  dp4 r4.z, cb0[36].xyzw, r3.xyzw
  max r4.xyz, r4.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
  mad r5.xy, r1.yxyy, cb2[0].yxyy, cb2[0].wzww
  sample_l_indexable(texture2d)(float,float,float,float) r1.w, r5.xyxx, t0.xzwy, s0, l(0.000000)
  mad r1.w, r1.w, cb2[2].x, cb2[2].y
  add r1.z, -r1.w, r1.z
  mul_sat r1.z, -r1.z, cb3[18].x
  sqrt r1.z, r1.z
  add r1.xy, r1.xyxx, -cb0[42].xyxx
  dp2 r1.x, r1.xyxx, r1.xyxx
  mad r1.x, cb2[1].x, r1.x, cb2[1].y
  mul_sat r1.x, r1.x, l(3.000000)
  mul r1.x, r1.z, r1.x
  dp4 r5.x, cb3[15].xyzw, r3.xyzw
  dp4 r5.y, cb3[16].xyzw, r3.xyzw
  dp4 r5.z, cb3[17].xyzw, r3.xyzw
  max r1.yzw, r5.xxyz, l(0.000000, 0.000000, 0.000000, 0.000000)
  mad r1.yzw, r1.yyzw, cb0[56].xxxx, -r4.xxyz
  mad o1.xyz, r1.xxxx, r1.yzwy, r4.xyzx
endif 

// Relocated to here with asmtool.py
mov o0.xyw, r2.xyxw

// Automatic vertex shader halo fix inserted with DarkStarSword's asmtool.py:
// asmtool.py -i --auto-fix-vertex-halo --only-autofixed 28cfff6dc6d893c6-vs.txt
ne r8.w, r2.w, l(1.0)
if_nz r8.w
  add r8.w, r2.w, -r8.y
  mad r2.x, r8.w, r8.x, r2.x
endif

add r1.x, r2.x, r2.w
mul o4.x, r1.x, l(0.500000)
add r1.x, -r2.y, r2.w
mul o4.y, r1.x, l(0.500000)

// mov o0.xyw, r2.xyxw // Relocated from here with asmtool.py

mov o8.w, r0.w
mov o4.z, r2.w
mov o5.xyz, r0.xyzx
mov o9.x, |v0.z|
ret 
// Approximately 158 instruction slots used