// ---- Created with 3Dmigoto v1.2.35 on Tue Apr 26 22:30:27 2016

cbuffer cbSceneParam : register(b8)
{
  float4 FC_FarClipInfo : packoffset(c0);
  float4 FC_ScreenSize : packoffset(c1);
  float4 FC_DepthComputeParam : packoffset(c2);
  float4 SC_CameraPos : packoffset(c3);
  float4 VC_ClipPlane : packoffset(c4);
  float4x3 FC_MatrixView : packoffset(c5);
  float4x4 FC_MatrixInvViewProj : packoffset(c8);
  float4x4 FC_MatrixInvProj : packoffset(c12);
  float4x4 FC_MatrixProj : packoffset(c16);
  float4x4 FC_MatrixInvView : packoffset(c20);
  float4x4 VC_MatrixViewProj : packoffset(c24);
  float4 FC_ShadowMapParam : packoffset(c28);
  float4 FC_ShadowColor : packoffset(c29);
  float4 FC_ShadowDir : packoffset(c30);
  float4x4 VC_ShadowMapMatrix : packoffset(c31);
  float FC_ShadowDepthRate : packoffset(c35);
  float FC_ShadowDepthScale : packoffset(c35.y);
  float FC_ShadowKernelScale : packoffset(c35.z);
  float FC_ShadowRandTexInvScale : packoffset(c35.w);
  float FC_ShadowTexInvScaleX : packoffset(c36);
  float FC_ShadowTexInvScaleY : packoffset(c36.y);
  float FC_ShadowDepthOffsetScale : packoffset(c36.z);
  float4 FC_ShadowViewKernelScale : packoffset(c37);
  float4x4 FC_ProjSpaceToShadowMatrix[4] : packoffset(c38);
  float4 FC_CascadeSelectDist : packoffset(c54);
  float FC_FrustumNear : packoffset(c55);
  float FC_FrustumSliceScale : packoffset(c55.y);
  float FC_FrustumSliceBias : packoffset(c55.z);
  uint FC_LightTile_Width : packoffset(c56);
  uint FC_LightTile_NumCellX : packoffset(c56.y);
  float4 FC_CloudShadowParam0 : packoffset(c57);
  float4 FC_CloudShadowParam1 : packoffset(c58);
  float FC_ShadowScale0 : packoffset(c59);
  float FC_ShadowScale1 : packoffset(c59.y);
}

cbuffer cbSSS : register(b1)
{

  struct
  {
    float sssWidth;
    float4 kernel[17];
  } g_profileArray[2] : packoffset(c0);

}

SamplerState SS_ClampPoint_s : register(s7);
SamplerState SS_ClampLinear_s : register(s9);
Texture2D<float4> g_DepthTexture : register(t1);
Texture2D<float4> g_SSSStrengthTexture : register(t3);
Texture2D<float4> g_LightAccTexture : register(t36);


// 3Dmigoto declarations
#define cmp -
Texture1D<float4> IniParams : register(t120);
Texture2D<float4> StereoParams : register(t125);


void main( 
  float4 v0 : SV_POSITION0,
  float4 v1 : TEXCOORD0,
  float4 v2 : TEXCOORD1,
  out float4 o0 : SV_TARGET0)
{
  float4 r0,r1,r2,r3,r4;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.y = 1;
  r0.z = g_DepthTexture.Sample(SS_ClampPoint_s, v1.xy).x;
  r0.z = FC_DepthComputeParam.x + -r0.z;
  r0.z = -FC_DepthComputeParam.z / r0.z;
  r0.w = 1 / r0.z;
  r1.x = g_SSSStrengthTexture.Sample(SS_ClampPoint_s, v1.xy).w;
  r1.x = 255 * r1.x;
  r1.x = (int)r1.x;
  r1.x = (int)r1.x * 18;
  r0.w = g_profileArray[r1.x].sssWidth * r0.w;
  r2.xyzw = g_LightAccTexture.Sample(SS_ClampPoint_s, v1.xy).xyzw;
  r0.x = r2.w;
  r3.xy = r0.ww * r0.xy;
  o0.w = r0.x;
  r3.z = r3.y * r2.w;
  r0.xy = float2(0,0.333333343) * r3.xz;
  r1.yz = g_profileArray[r1.x].kernel[1].ww * r0.xy + v1.xy;
  r0.w = g_DepthTexture.Sample(SS_ClampPoint_s, r1.yz).x;
  r1.yzw = g_LightAccTexture.Sample(SS_ClampLinear_s, r1.yz).xyz;
  r0.w = FC_DepthComputeParam.x + -r0.w;
  r0.w = -FC_DepthComputeParam.z / r0.w;
  r0.w = r0.z + -r0.w;
  r2.w = g_profileArray[r1.x].sssWidth * 300;
  r0.w = saturate(r2.w * abs(r0.w));
  r3.xyz = r2.xyz + -r1.yzw;
  r1.yzw = r0.www * r3.xyz + r1.yzw;
  r1.yzw = g_profileArray[r1.x].kernel[1].xyz * r1.yzw;
  r1.yzw = r2.xyz * g_profileArray[r1.x].kernel[0].xyz + r1.yzw;
  r3.xy = g_profileArray[r1.x].kernel[2].ww * r0.xy + v1.xy;
  r0.w = g_DepthTexture.Sample(SS_ClampPoint_s, r3.xy).x;
  r3.xyz = g_LightAccTexture.Sample(SS_ClampLinear_s, r3.xy).xyz;
  r0.w = FC_DepthComputeParam.x + -r0.w;
  r0.w = -FC_DepthComputeParam.z / r0.w;
  r0.w = r0.z + -r0.w;
  r0.w = saturate(r2.w * abs(r0.w));
  r4.xyz = -r3.xyz + r2.xyz;
  r3.xyz = r0.www * r4.xyz + r3.xyz;
  r1.yzw = g_profileArray[r1.x].kernel[2].xyz * r3.xyz + r1.yzw;
  r3.xy = g_profileArray[r1.x].kernel[3].ww * r0.xy + v1.xy;
  r0.w = g_DepthTexture.Sample(SS_ClampPoint_s, r3.xy).x;
  r3.xyz = g_LightAccTexture.Sample(SS_ClampLinear_s, r3.xy).xyz;
  r0.w = FC_DepthComputeParam.x + -r0.w;
  r0.w = -FC_DepthComputeParam.z / r0.w;
  r0.w = r0.z + -r0.w;
  r0.w = saturate(r2.w * abs(r0.w));
  r4.xyz = -r3.xyz + r2.xyz;
  r3.xyz = r0.www * r4.xyz + r3.xyz;
  r1.yzw = g_profileArray[r1.x].kernel[3].xyz * r3.xyz + r1.yzw;
  r3.xy = g_profileArray[r1.x].kernel[4].ww * r0.xy + v1.xy;
  r0.w = g_DepthTexture.Sample(SS_ClampPoint_s, r3.xy).x;
  r3.xyz = g_LightAccTexture.Sample(SS_ClampLinear_s, r3.xy).xyz;
  r0.w = FC_DepthComputeParam.x + -r0.w;
  r0.w = -FC_DepthComputeParam.z / r0.w;
  r0.w = r0.z + -r0.w;
  r0.w = saturate(r2.w * abs(r0.w));
  r4.xyz = -r3.xyz + r2.xyz;
  r3.xyz = r0.www * r4.xyz + r3.xyz;
  r1.yzw = g_profileArray[r1.x].kernel[4].xyz * r3.xyz + r1.yzw;
  r3.xy = g_profileArray[r1.x].kernel[5].ww * r0.xy + v1.xy;
  r0.w = g_DepthTexture.Sample(SS_ClampPoint_s, r3.xy).x;
  r3.xyz = g_LightAccTexture.Sample(SS_ClampLinear_s, r3.xy).xyz;
  r0.w = FC_DepthComputeParam.x + -r0.w;
  r0.w = -FC_DepthComputeParam.z / r0.w;
  r0.w = r0.z + -r0.w;
  r0.w = saturate(r2.w * abs(r0.w));
  r4.xyz = -r3.xyz + r2.xyz;
  r3.xyz = r0.www * r4.xyz + r3.xyz;
  r1.yzw = g_profileArray[r1.x].kernel[5].xyz * r3.xyz + r1.yzw;
  r3.xy = g_profileArray[r1.x].kernel[6].ww * r0.xy + v1.xy;
  r0.w = g_DepthTexture.Sample(SS_ClampPoint_s, r3.xy).x;
  r3.xyz = g_LightAccTexture.Sample(SS_ClampLinear_s, r3.xy).xyz;
  r0.w = FC_DepthComputeParam.x + -r0.w;
  r0.w = -FC_DepthComputeParam.z / r0.w;
  r0.w = r0.z + -r0.w;
  r0.w = saturate(r2.w * abs(r0.w));
  r4.xyz = -r3.xyz + r2.xyz;
  r3.xyz = r0.www * r4.xyz + r3.xyz;
  r1.yzw = g_profileArray[r1.x].kernel[6].xyz * r3.xyz + r1.yzw;
  r3.xy = g_profileArray[r1.x].kernel[7].ww * r0.xy + v1.xy;
  r0.w = g_DepthTexture.Sample(SS_ClampPoint_s, r3.xy).x;
  r3.xyz = g_LightAccTexture.Sample(SS_ClampLinear_s, r3.xy).xyz;
  r0.w = FC_DepthComputeParam.x + -r0.w;
  r0.w = -FC_DepthComputeParam.z / r0.w;
  r0.w = r0.z + -r0.w;
  r0.w = saturate(r2.w * abs(r0.w));
  r4.xyz = -r3.xyz + r2.xyz;
  r3.xyz = r0.www * r4.xyz + r3.xyz;
  r1.yzw = g_profileArray[r1.x].kernel[7].xyz * r3.xyz + r1.yzw;
  r3.xy = g_profileArray[r1.x].kernel[8].ww * r0.xy + v1.xy;
  r0.w = g_DepthTexture.Sample(SS_ClampPoint_s, r3.xy).x;
  r3.xyz = g_LightAccTexture.Sample(SS_ClampLinear_s, r3.xy).xyz;
  r0.w = FC_DepthComputeParam.x + -r0.w;
  r0.w = -FC_DepthComputeParam.z / r0.w;
  r0.w = r0.z + -r0.w;
  r0.w = saturate(r2.w * abs(r0.w));
  r4.xyz = -r3.xyz + r2.xyz;
  r3.xyz = r0.www * r4.xyz + r3.xyz;
  r1.yzw = g_profileArray[r1.x].kernel[8].xyz * r3.xyz + r1.yzw;
  r3.xy = g_profileArray[r1.x].kernel[9].ww * r0.xy + v1.xy;
  r0.w = g_DepthTexture.Sample(SS_ClampPoint_s, r3.xy).x;
  r3.xyz = g_LightAccTexture.Sample(SS_ClampLinear_s, r3.xy).xyz;
  r0.w = FC_DepthComputeParam.x + -r0.w;
  r0.w = -FC_DepthComputeParam.z / r0.w;
  r0.w = r0.z + -r0.w;
  r0.w = saturate(r2.w * abs(r0.w));
  r4.xyz = -r3.xyz + r2.xyz;
  r3.xyz = r0.www * r4.xyz + r3.xyz;
  r1.yzw = g_profileArray[r1.x].kernel[9].xyz * r3.xyz + r1.yzw;
  r3.xy = g_profileArray[r1.x].kernel[10].ww * r0.xy + v1.xy;
  r0.w = g_DepthTexture.Sample(SS_ClampPoint_s, r3.xy).x;
  r3.xyz = g_LightAccTexture.Sample(SS_ClampLinear_s, r3.xy).xyz;
  r0.w = FC_DepthComputeParam.x + -r0.w;
  r0.w = -FC_DepthComputeParam.z / r0.w;
  r0.w = r0.z + -r0.w;
  r0.w = saturate(r2.w * abs(r0.w));
  r4.xyz = -r3.xyz + r2.xyz;
  r3.xyz = r0.www * r4.xyz + r3.xyz;
  r1.yzw = g_profileArray[r1.x].kernel[10].xyz * r3.xyz + r1.yzw;
  r3.xy = g_profileArray[r1.x].kernel[11].ww * r0.xy + v1.xy;
  r0.w = g_DepthTexture.Sample(SS_ClampPoint_s, r3.xy).x;
  r3.xyz = g_LightAccTexture.Sample(SS_ClampLinear_s, r3.xy).xyz;
  r0.w = FC_DepthComputeParam.x + -r0.w;
  r0.w = -FC_DepthComputeParam.z / r0.w;
  r0.w = r0.z + -r0.w;
  r0.w = saturate(r2.w * abs(r0.w));
  r4.xyz = -r3.xyz + r2.xyz;
  r3.xyz = r0.www * r4.xyz + r3.xyz;
  r1.yzw = g_profileArray[r1.x].kernel[11].xyz * r3.xyz + r1.yzw;
  r3.xy = g_profileArray[r1.x].kernel[12].ww * r0.xy + v1.xy;
  r0.w = g_DepthTexture.Sample(SS_ClampPoint_s, r3.xy).x;
  r3.xyz = g_LightAccTexture.Sample(SS_ClampLinear_s, r3.xy).xyz;
  r0.w = FC_DepthComputeParam.x + -r0.w;
  r0.w = -FC_DepthComputeParam.z / r0.w;
  r0.w = r0.z + -r0.w;
  r0.w = saturate(r2.w * abs(r0.w));
  r4.xyz = -r3.xyz + r2.xyz;
  r3.xyz = r0.www * r4.xyz + r3.xyz;
  r1.yzw = g_profileArray[r1.x].kernel[12].xyz * r3.xyz + r1.yzw;
  r3.xy = g_profileArray[r1.x].kernel[13].ww * r0.xy + v1.xy;
  r0.w = g_DepthTexture.Sample(SS_ClampPoint_s, r3.xy).x;
  r3.xyz = g_LightAccTexture.Sample(SS_ClampLinear_s, r3.xy).xyz;
  r0.w = FC_DepthComputeParam.x + -r0.w;
  r0.w = -FC_DepthComputeParam.z / r0.w;
  r0.w = r0.z + -r0.w;
  r0.w = saturate(r2.w * abs(r0.w));
  r4.xyz = -r3.xyz + r2.xyz;
  r3.xyz = r0.www * r4.xyz + r3.xyz;
  r1.yzw = g_profileArray[r1.x].kernel[13].xyz * r3.xyz + r1.yzw;
  r3.xy = g_profileArray[r1.x].kernel[14].ww * r0.xy + v1.xy;
  r0.w = g_DepthTexture.Sample(SS_ClampPoint_s, r3.xy).x;
  r3.xyz = g_LightAccTexture.Sample(SS_ClampLinear_s, r3.xy).xyz;
  r0.w = FC_DepthComputeParam.x + -r0.w;
  r0.w = -FC_DepthComputeParam.z / r0.w;
  r0.w = r0.z + -r0.w;
  r0.w = saturate(r2.w * abs(r0.w));
  r4.xyz = -r3.xyz + r2.xyz;
  r3.xyz = r0.www * r4.xyz + r3.xyz;
  r1.yzw = g_profileArray[r1.x].kernel[14].xyz * r3.xyz + r1.yzw;
  r3.xy = g_profileArray[r1.x].kernel[15].ww * r0.xy + v1.xy;
  r0.xy = g_profileArray[r1.x].kernel[16].ww * r0.xy + v1.xy;
  r0.w = g_DepthTexture.Sample(SS_ClampPoint_s, r3.xy).x;
  r3.xyz = g_LightAccTexture.Sample(SS_ClampLinear_s, r3.xy).xyz;
  r0.w = FC_DepthComputeParam.x + -r0.w;
  r0.w = -FC_DepthComputeParam.z / r0.w;
  r0.w = r0.z + -r0.w;
  r0.w = saturate(r2.w * abs(r0.w));
  r4.xyz = -r3.xyz + r2.xyz;
  r3.xyz = r0.www * r4.xyz + r3.xyz;
  r1.yzw = g_profileArray[r1.x].kernel[15].xyz * r3.xyz + r1.yzw;
  r0.w = g_DepthTexture.Sample(SS_ClampPoint_s, r0.xy).x;
  r3.xyz = g_LightAccTexture.Sample(SS_ClampLinear_s, r0.xy).xyz;
  r0.x = FC_DepthComputeParam.x + -r0.w;
  r0.x = -FC_DepthComputeParam.z / r0.x;
  r0.x = r0.z + -r0.x;
  r0.x = saturate(r2.w * abs(r0.x));
  r0.yzw = -r3.xyz + r2.xyz;
  r0.xyz = r0.xxx * r0.yzw + r3.xyz;
  o0.xyz = g_profileArray[r1.x].kernel[16].xyz * r0.xyz + r1.yzw;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Original ASM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20546
//
//
// Buffer Definitions: 
//
// cbuffer cbSceneParam
// {
//
//   float4 FC_FarClipInfo;             // Offset:    0 Size:    16 [unused]
//   float4 FC_ScreenSize;              // Offset:   16 Size:    16 [unused]
//   float4 FC_DepthComputeParam;       // Offset:   32 Size:    16
//   float4 SC_CameraPos;               // Offset:   48 Size:    16 [unused]
//   float4 VC_ClipPlane;               // Offset:   64 Size:    16 [unused]
//   float4x3 FC_MatrixView;            // Offset:   80 Size:    48 [unused]
//   float4x4 FC_MatrixInvViewProj;     // Offset:  128 Size:    64 [unused]
//   float4x4 FC_MatrixInvProj;         // Offset:  192 Size:    64 [unused]
//   float4x4 FC_MatrixProj;            // Offset:  256 Size:    64 [unused]
//   float4x4 FC_MatrixInvView;         // Offset:  320 Size:    64 [unused]
//   float4x4 VC_MatrixViewProj;        // Offset:  384 Size:    64 [unused]
//   float4 FC_ShadowMapParam;          // Offset:  448 Size:    16 [unused]
//   float4 FC_ShadowColor;             // Offset:  464 Size:    16 [unused]
//   float4 FC_ShadowDir;               // Offset:  480 Size:    16 [unused]
//   float4x4 VC_ShadowMapMatrix;       // Offset:  496 Size:    64 [unused]
//   float FC_ShadowDepthRate;          // Offset:  560 Size:     4 [unused]
//   float FC_ShadowDepthScale;         // Offset:  564 Size:     4 [unused]
//   float FC_ShadowKernelScale;        // Offset:  568 Size:     4 [unused]
//   float FC_ShadowRandTexInvScale;    // Offset:  572 Size:     4 [unused]
//   float FC_ShadowTexInvScaleX;       // Offset:  576 Size:     4 [unused]
//   float FC_ShadowTexInvScaleY;       // Offset:  580 Size:     4 [unused]
//   float FC_ShadowDepthOffsetScale;   // Offset:  584 Size:     4 [unused]
//   float4 FC_ShadowViewKernelScale;   // Offset:  592 Size:    16 [unused]
//   float4x4 FC_ProjSpaceToShadowMatrix[4];// Offset:  608 Size:   256 [unused]
//   float4 FC_CascadeSelectDist;       // Offset:  864 Size:    16 [unused]
//   float FC_FrustumNear;              // Offset:  880 Size:     4 [unused]
//   float FC_FrustumSliceScale;        // Offset:  884 Size:     4 [unused]
//   float FC_FrustumSliceBias;         // Offset:  888 Size:     4 [unused]
//   uint FC_LightTile_Width;           // Offset:  896 Size:     4 [unused]
//   uint FC_LightTile_NumCellX;        // Offset:  900 Size:     4 [unused]
//   float4 FC_CloudShadowParam0;       // Offset:  912 Size:    16 [unused]
//   float4 FC_CloudShadowParam1;       // Offset:  928 Size:    16 [unused]
//   float FC_ShadowScale0;             // Offset:  944 Size:     4 [unused]
//   float FC_ShadowScale1;             // Offset:  948 Size:     4 [unused]
//
// }
//
// cbuffer cbSSS
// {
//
//   struct SCATTERING_PROFILE
//   {
//       
//       float sssWidth;                // Offset:    0
//       float4 kernel[17];             // Offset:   16
//
//   } g_profileArray[2];               // Offset:    0 Size:   576
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// SS_ClampPoint                     sampler      NA          NA    7        1
// SS_ClampLinear                    sampler      NA          NA    9        1
// g_DepthTexture                    texture  float4          2d    1        1
// g_SSSStrengthTexture              texture  float4          2d    3        1
// g_LightAccTexture                 texture  float4          2d   36        1
// cbSSS                             cbuffer      NA          NA    1        1
// cbSceneParam                      cbuffer      NA          NA    8        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float       
// TEXCOORD                 0   xy          1     NONE   float   xy  
// TEXCOORD                 1   xyzw        2     NONE   float       
//
//
// 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 cb8[3], immediateIndexed
dcl_constantbuffer cb1[36], dynamicIndexed
dcl_sampler s7, mode_default
dcl_sampler s9, mode_default
dcl_resource_texture2d (float,float,float,float) t1
dcl_resource_texture2d (float,float,float,float) t3
dcl_resource_texture2d (float,float,float,float) t36
dcl_input_ps linear v1.xy
dcl_output o0.xyzw
dcl_temps 5
mov r0.y, l(1.000000)
sample_indexable(texture2d)(float,float,float,float) r0.z, v1.xyxx, t1.yzxw, s7
add r0.z, -r0.z, cb8[2].x
div r0.z, -cb8[2].z, r0.z
div r0.w, l(1.000000, 1.000000, 1.000000, 1.000000), r0.z
sample_indexable(texture2d)(float,float,float,float) r1.x, v1.xyxx, t3.wxyz, s7
mul r1.x, r1.x, l(255.000000)
ftoi r1.x, r1.x
imul null, r1.x, r1.x, l(18)
mul r0.w, r0.w, cb1[r1.x + 0].x
sample_indexable(texture2d)(float,float,float,float) r2.xyzw, v1.xyxx, t36.xyzw, s7
mov r0.x, r2.w
mul r3.xy, r0.xyxx, r0.wwww
mov o0.w, r0.x
mul r3.z, r2.w, r3.y
mul r0.xy, r3.xzxx, l(0.000000, 0.333333, 0.000000, 0.000000)
mad r1.yz, cb1[r1.x + 2].wwww, r0.xxyx, v1.xxyx
sample_indexable(texture2d)(float,float,float,float) r0.w, r1.yzyy, t1.yzwx, s7
sample_indexable(texture2d)(float,float,float,float) r1.yzw, r1.yzyy, t36.wxyz, s9
add r0.w, -r0.w, cb8[2].x
div r0.w, -cb8[2].z, r0.w
add r0.w, -r0.w, r0.z
mul r2.w, l(300.000000), cb1[r1.x + 0].x
mul_sat r0.w, |r0.w|, r2.w
add r3.xyz, -r1.yzwy, r2.xyzx
mad r1.yzw, r0.wwww, r3.xxyz, r1.yyzw
mul r1.yzw, r1.yyzw, cb1[r1.x + 2].xxyz
mad r1.yzw, r2.xxyz, cb1[r1.x + 1].xxyz, r1.yyzw
mad r3.xy, cb1[r1.x + 3].wwww, r0.xyxx, v1.xyxx
sample_indexable(texture2d)(float,float,float,float) r0.w, r3.xyxx, t1.yzwx, s7
sample_indexable(texture2d)(float,float,float,float) r3.xyz, r3.xyxx, t36.xyzw, s9
add r0.w, -r0.w, cb8[2].x
div r0.w, -cb8[2].z, r0.w
add r0.w, -r0.w, r0.z
mul_sat r0.w, |r0.w|, r2.w
add r4.xyz, r2.xyzx, -r3.xyzx
mad r3.xyz, r0.wwww, r4.xyzx, r3.xyzx
mad r1.yzw, cb1[r1.x + 3].xxyz, r3.xxyz, r1.yyzw
mad r3.xy, cb1[r1.x + 4].wwww, r0.xyxx, v1.xyxx
sample_indexable(texture2d)(float,float,float,float) r0.w, r3.xyxx, t1.yzwx, s7
sample_indexable(texture2d)(float,float,float,float) r3.xyz, r3.xyxx, t36.xyzw, s9
add r0.w, -r0.w, cb8[2].x
div r0.w, -cb8[2].z, r0.w
add r0.w, -r0.w, r0.z
mul_sat r0.w, |r0.w|, r2.w
add r4.xyz, r2.xyzx, -r3.xyzx
mad r3.xyz, r0.wwww, r4.xyzx, r3.xyzx
mad r1.yzw, cb1[r1.x + 4].xxyz, r3.xxyz, r1.yyzw
mad r3.xy, cb1[r1.x + 5].wwww, r0.xyxx, v1.xyxx
sample_indexable(texture2d)(float,float,float,float) r0.w, r3.xyxx, t1.yzwx, s7
sample_indexable(texture2d)(float,float,float,float) r3.xyz, r3.xyxx, t36.xyzw, s9
add r0.w, -r0.w, cb8[2].x
div r0.w, -cb8[2].z, r0.w
add r0.w, -r0.w, r0.z
mul_sat r0.w, |r0.w|, r2.w
add r4.xyz, r2.xyzx, -r3.xyzx
mad r3.xyz, r0.wwww, r4.xyzx, r3.xyzx
mad r1.yzw, cb1[r1.x + 5].xxyz, r3.xxyz, r1.yyzw
mad r3.xy, cb1[r1.x + 6].wwww, r0.xyxx, v1.xyxx
sample_indexable(texture2d)(float,float,float,float) r0.w, r3.xyxx, t1.yzwx, s7
sample_indexable(texture2d)(float,float,float,float) r3.xyz, r3.xyxx, t36.xyzw, s9
add r0.w, -r0.w, cb8[2].x
div r0.w, -cb8[2].z, r0.w
add r0.w, -r0.w, r0.z
mul_sat r0.w, |r0.w|, r2.w
add r4.xyz, r2.xyzx, -r3.xyzx
mad r3.xyz, r0.wwww, r4.xyzx, r3.xyzx
mad r1.yzw, cb1[r1.x + 6].xxyz, r3.xxyz, r1.yyzw
mad r3.xy, cb1[r1.x + 7].wwww, r0.xyxx, v1.xyxx
sample_indexable(texture2d)(float,float,float,float) r0.w, r3.xyxx, t1.yzwx, s7
sample_indexable(texture2d)(float,float,float,float) r3.xyz, r3.xyxx, t36.xyzw, s9
add r0.w, -r0.w, cb8[2].x
div r0.w, -cb8[2].z, r0.w
add r0.w, -r0.w, r0.z
mul_sat r0.w, |r0.w|, r2.w
add r4.xyz, r2.xyzx, -r3.xyzx
mad r3.xyz, r0.wwww, r4.xyzx, r3.xyzx
mad r1.yzw, cb1[r1.x + 7].xxyz, r3.xxyz, r1.yyzw
mad r3.xy, cb1[r1.x + 8].wwww, r0.xyxx, v1.xyxx
sample_indexable(texture2d)(float,float,float,float) r0.w, r3.xyxx, t1.yzwx, s7
sample_indexable(texture2d)(float,float,float,float) r3.xyz, r3.xyxx, t36.xyzw, s9
add r0.w, -r0.w, cb8[2].x
div r0.w, -cb8[2].z, r0.w
add r0.w, -r0.w, r0.z
mul_sat r0.w, |r0.w|, r2.w
add r4.xyz, r2.xyzx, -r3.xyzx
mad r3.xyz, r0.wwww, r4.xyzx, r3.xyzx
mad r1.yzw, cb1[r1.x + 8].xxyz, r3.xxyz, r1.yyzw
mad r3.xy, cb1[r1.x + 9].wwww, r0.xyxx, v1.xyxx
sample_indexable(texture2d)(float,float,float,float) r0.w, r3.xyxx, t1.yzwx, s7
sample_indexable(texture2d)(float,float,float,float) r3.xyz, r3.xyxx, t36.xyzw, s9
add r0.w, -r0.w, cb8[2].x
div r0.w, -cb8[2].z, r0.w
add r0.w, -r0.w, r0.z
mul_sat r0.w, |r0.w|, r2.w
add r4.xyz, r2.xyzx, -r3.xyzx
mad r3.xyz, r0.wwww, r4.xyzx, r3.xyzx
mad r1.yzw, cb1[r1.x + 9].xxyz, r3.xxyz, r1.yyzw
mad r3.xy, cb1[r1.x + 10].wwww, r0.xyxx, v1.xyxx
sample_indexable(texture2d)(float,float,float,float) r0.w, r3.xyxx, t1.yzwx, s7
sample_indexable(texture2d)(float,float,float,float) r3.xyz, r3.xyxx, t36.xyzw, s9
add r0.w, -r0.w, cb8[2].x
div r0.w, -cb8[2].z, r0.w
add r0.w, -r0.w, r0.z
mul_sat r0.w, |r0.w|, r2.w
add r4.xyz, r2.xyzx, -r3.xyzx
mad r3.xyz, r0.wwww, r4.xyzx, r3.xyzx
mad r1.yzw, cb1[r1.x + 10].xxyz, r3.xxyz, r1.yyzw
mad r3.xy, cb1[r1.x + 11].wwww, r0.xyxx, v1.xyxx
sample_indexable(texture2d)(float,float,float,float) r0.w, r3.xyxx, t1.yzwx, s7
sample_indexable(texture2d)(float,float,float,float) r3.xyz, r3.xyxx, t36.xyzw, s9
add r0.w, -r0.w, cb8[2].x
div r0.w, -cb8[2].z, r0.w
add r0.w, -r0.w, r0.z
mul_sat r0.w, |r0.w|, r2.w
add r4.xyz, r2.xyzx, -r3.xyzx
mad r3.xyz, r0.wwww, r4.xyzx, r3.xyzx
mad r1.yzw, cb1[r1.x + 11].xxyz, r3.xxyz, r1.yyzw
mad r3.xy, cb1[r1.x + 12].wwww, r0.xyxx, v1.xyxx
sample_indexable(texture2d)(float,float,float,float) r0.w, r3.xyxx, t1.yzwx, s7
sample_indexable(texture2d)(float,float,float,float) r3.xyz, r3.xyxx, t36.xyzw, s9
add r0.w, -r0.w, cb8[2].x
div r0.w, -cb8[2].z, r0.w
add r0.w, -r0.w, r0.z
mul_sat r0.w, |r0.w|, r2.w
add r4.xyz, r2.xyzx, -r3.xyzx
mad r3.xyz, r0.wwww, r4.xyzx, r3.xyzx
mad r1.yzw, cb1[r1.x + 12].xxyz, r3.xxyz, r1.yyzw
mad r3.xy, cb1[r1.x + 13].wwww, r0.xyxx, v1.xyxx
sample_indexable(texture2d)(float,float,float,float) r0.w, r3.xyxx, t1.yzwx, s7
sample_indexable(texture2d)(float,float,float,float) r3.xyz, r3.xyxx, t36.xyzw, s9
add r0.w, -r0.w, cb8[2].x
div r0.w, -cb8[2].z, r0.w
add r0.w, -r0.w, r0.z
mul_sat r0.w, |r0.w|, r2.w
add r4.xyz, r2.xyzx, -r3.xyzx
mad r3.xyz, r0.wwww, r4.xyzx, r3.xyzx
mad r1.yzw, cb1[r1.x + 13].xxyz, r3.xxyz, r1.yyzw
mad r3.xy, cb1[r1.x + 14].wwww, r0.xyxx, v1.xyxx
sample_indexable(texture2d)(float,float,float,float) r0.w, r3.xyxx, t1.yzwx, s7
sample_indexable(texture2d)(float,float,float,float) r3.xyz, r3.xyxx, t36.xyzw, s9
add r0.w, -r0.w, cb8[2].x
div r0.w, -cb8[2].z, r0.w
add r0.w, -r0.w, r0.z
mul_sat r0.w, |r0.w|, r2.w
add r4.xyz, r2.xyzx, -r3.xyzx
mad r3.xyz, r0.wwww, r4.xyzx, r3.xyzx
mad r1.yzw, cb1[r1.x + 14].xxyz, r3.xxyz, r1.yyzw
mad r3.xy, cb1[r1.x + 15].wwww, r0.xyxx, v1.xyxx
sample_indexable(texture2d)(float,float,float,float) r0.w, r3.xyxx, t1.yzwx, s7
sample_indexable(texture2d)(float,float,float,float) r3.xyz, r3.xyxx, t36.xyzw, s9
add r0.w, -r0.w, cb8[2].x
div r0.w, -cb8[2].z, r0.w
add r0.w, -r0.w, r0.z
mul_sat r0.w, |r0.w|, r2.w
add r4.xyz, r2.xyzx, -r3.xyzx
mad r3.xyz, r0.wwww, r4.xyzx, r3.xyzx
mad r1.yzw, cb1[r1.x + 15].xxyz, r3.xxyz, r1.yyzw
mad r3.xy, cb1[r1.x + 16].wwww, r0.xyxx, v1.xyxx
mad r0.xy, cb1[r1.x + 17].wwww, r0.xyxx, v1.xyxx
sample_indexable(texture2d)(float,float,float,float) r0.w, r3.xyxx, t1.yzwx, s7
sample_indexable(texture2d)(float,float,float,float) r3.xyz, r3.xyxx, t36.xyzw, s9
add r0.w, -r0.w, cb8[2].x
div r0.w, -cb8[2].z, r0.w
add r0.w, -r0.w, r0.z
mul_sat r0.w, |r0.w|, r2.w
add r4.xyz, r2.xyzx, -r3.xyzx
mad r3.xyz, r0.wwww, r4.xyzx, r3.xyzx
mad r1.yzw, cb1[r1.x + 16].xxyz, r3.xxyz, r1.yyzw
sample_indexable(texture2d)(float,float,float,float) r0.w, r0.xyxx, t1.yzwx, s7
sample_indexable(texture2d)(float,float,float,float) r3.xyz, r0.xyxx, t36.xyzw, s9
add r0.x, -r0.w, cb8[2].x
div r0.x, -cb8[2].z, r0.x
add r0.x, -r0.x, r0.z
mul_sat r0.x, |r0.x|, r2.w
add r0.yzw, r2.xxyz, -r3.xxyz
mad r0.xyz, r0.xxxx, r0.yzwy, r3.xyzx
mad o0.xyz, cb1[r1.x + 17].xyzx, r0.xyzx, r1.yzwy
ret 
// Approximately 179 instruction slots used

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
