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

cbuffer cbLightAccParam : register(b0)
{
  float4x4 g_InvProjMatrix : packoffset(c0);
  float4x3 g_ViewMatrix : packoffset(c4);
  float4 g_ScreenSize : packoffset(c7);
  float4x4 g_CameraMatrix : packoffset(c8);
  float4 g_specPowerParam : packoffset(c12);
  float4x4 g_ProjMatrix : packoffset(c13);
  uint g_lightCount : packoffset(c17);
  bool g_visualizeLightCount : packoffset(c17.y);
  uint g_spotLightCount : packoffset(c17.z);
  uint g_lineLightCount : packoffset(c17.w);
  float g_frustumNear : packoffset(c18);
  float g_frustumFar : packoffset(c18.y);
  float g_frustumSliceScale : packoffset(c18.z);
  float g_frustumSliceBias : packoffset(c18.w);
  uint4 g_lightTileSize : packoffset(c19);
}

cbuffer cbLightAccShadowInfo : register(b2)
{
  float4 g_aShadowMapInfo : packoffset(c0);
}

cbuffer cbLightAccLightParam : register(b1)
{

  struct
  {
    float4 PositionAndRadius;
    float4 DiffColor;
    float4 SpecColor;
    float4 TransLightParam;
    float4 ProjParam;
    float4 ShadowCenterPos;
    float4 ViewportScaleOffset[6];
  } g_aPointLight : packoffset(c0);

}

SamplerState SS_ClampPoint_s : register(s7);
SamplerState SS_WrapLinear_s : register(s8);
SamplerComparisonState SS_Shadow_s : register(s12);
Texture2D<float4> g_LightPrepassAttrTexture : register(t0);
Texture2D<float4> g_DepthTexture : register(t1);
Texture2D<float4> g_GBuffer1Texture : register(t3);
Texture2D<float4> g_GBuffer3Texture : register(t5);
Texture2D<float4> g_LightShadowTexture_0_ : register(t7);
Texture2D<float4> g_SSAOTexture : register(t33);


// 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,
  out float4 o1 : SV_TARGET1)
{
  float4 r0,r1,r2,r3,r4,r5,r6,r7,r8;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.zw = float2(1,1);
  r1.zw = float2(0,0);
  r2.z = g_DepthTexture.Sample(SS_ClampPoint_s, v1.xy).x;
  r2.xy = v2.xy;
  r2.w = 1;
  r3.x = dot(r2.xyzw, g_InvProjMatrix._m00_m10_m20_m30);
  r3.y = dot(r2.xyzw, g_InvProjMatrix._m01_m11_m21_m31);
  r3.z = dot(r2.xyzw, g_InvProjMatrix._m02_m12_m22_m32);
  r2.x = dot(r2.xyzw, g_InvProjMatrix._m03_m13_m23_m33);
  r2.xyz = r3.xyz / r2.xxx;
  r3.xyz = g_aPointLight.ShadowCenterPos.xyz + -r2.xyz;
  r4.z = -r3.x;
  r5.w = -r3.y;
  r6.xyz = cmp(abs(r3.xyx) < abs(r3.yzz));
  r7.xyz = cmp(float3(0,0,0) < -r3.zyx);
  r4.w = r7.y ? r3.z : -r3.z;
  r5.z = r7.x ? -r3.x : r3.x;
  r4.xy = r7.yy ? g_aPointLight.ViewportScaleOffset[2].zw : g_aPointLight.ViewportScaleOffset[3].zw;
  r5.xy = r7.xx ? g_aPointLight.ViewportScaleOffset[4].zw : g_aPointLight.ViewportScaleOffset[5].zw;
  r4.xyzw = r6.yyyy ? r5.xyzw : r4.xyzw;
  r8.z = r7.z ? r3.z : -r3.z;
  r8.xy = r7.zz ? g_aPointLight.ViewportScaleOffset[0].zw : g_aPointLight.ViewportScaleOffset[1].zw;
  r5.xyz = r6.zzz ? r5.xyz : r8.xyz;
  r4.xyzw = r6.xxxx ? r4.xyzw : r5.xyzw;
  r2.w = max(abs(r3.y), abs(r3.z));
  r3.w = max(abs(r3.x), r2.w);
  r1.xy = r4.xy * r3.ww;
  r3.xy = r4.zw;
  r3.z = g_aPointLight.ProjParam.x * r3.w + g_aPointLight.ProjParam.y;
  r4.xy = r7.yy ? g_aPointLight.ViewportScaleOffset[2].xy : g_aPointLight.ViewportScaleOffset[3].xy;
  r4.zw = r7.xx ? g_aPointLight.ViewportScaleOffset[4].xy : g_aPointLight.ViewportScaleOffset[5].xy;
  r5.xy = r7.zz ? g_aPointLight.ViewportScaleOffset[0].xy : g_aPointLight.ViewportScaleOffset[1].xy;
  r5.xy = r6.zz ? r4.zw : r5.xy;
  r4.xy = r6.yy ? r4.zw : r4.xy;
  r0.xy = r6.xx ? r4.xy : r5.xy;
  r0.xyzw = r3.xyzw * r0.xyzw + r1.xyzw;
  r1.xyzw = g_aShadowMapInfo.zwzw * r0.wwww;
  r3.xyzw = r1.zwzw * float4(-0.5,-0.5,0,0) + r0.xyzw;
  r3.xyz = r3.xyz / r3.www;
  r3.x = g_LightShadowTexture_0_.SampleCmpLevelZero(SS_Shadow_s, r3.xy, r3.z).x;
  r4.xyzw = r1.zwzw * float4(0.5,-0.5,0,0) + r0.xyzw;
  r4.xyz = r4.xyz / r4.www;
  r3.y = g_LightShadowTexture_0_.SampleCmpLevelZero(SS_Shadow_s, r4.xy, r4.z).x;
  r4.xyzw = r1.zwzw * float4(-0.5,0.5,0,0) + r0.xyzw;
  r0.xyzw = r1.xyzw * float4(0.5,0.5,0,0) + r0.xyzw;
  r0.xyz = r0.xyz / r0.www;
  r3.w = g_LightShadowTexture_0_.SampleCmpLevelZero(SS_Shadow_s, r0.xy, r0.z).x;
  r0.xyz = r4.xyz / r4.www;
  r3.z = g_LightShadowTexture_0_.SampleCmpLevelZero(SS_Shadow_s, r0.xy, r0.z).x;
  r0.x = dot(r3.xyzw, float4(0.25,0.25,0.25,0.25));
  r0.x = -1 + r0.x;
  r0.x = g_aPointLight.ProjParam.w * r0.x + 1;
  r0.yzw = g_aPointLight.PositionAndRadius.xyz + -r2.xyz;
  r1.x = dot(r0.yzw, r0.yzw);
  r1.y = rsqrt(r1.x);
  r0.yzw = r1.yyy * r0.yzw;
  r1.yzw = g_LightPrepassAttrTexture.Sample(SS_ClampPoint_s, v1.xy).xyz;
  r1.yzw = r1.yzw * float3(2,2,2) + float3(-1,-1,-1);
  r2.w = dot(r1.yzw, r1.yzw);
  r2.w = rsqrt(r2.w);
  r1.yzw = r2.www * r1.yzw;
  r3.x = dot(r1.yzw, g_ViewMatrix._m00_m10_m20);
  r3.y = dot(r1.yzw, g_ViewMatrix._m01_m11_m21);
  r3.z = dot(r1.yzw, g_ViewMatrix._m02_m12_m22);
  r1.y = dot(r3.xyz, r0.yzw);
  r1.zw = g_GBuffer1Texture.Sample(SS_ClampPoint_s, v1.xy).xy;
  r2.w = r1.w * 10 + r1.y;
  r1.y = saturate(r1.y);
  r2.w = max(0, r2.w);
  r3.w = r1.w * 20 + 1;
  r2.w = r2.w / r3.w;
  r4.xyz = g_aPointLight.DiffColor.xyz * r2.www;
  r4.xyz = r4.xyz * r0.xxx;
  r2.w = dot(r2.xyz, r2.xyz);
  r2.w = rsqrt(r2.w);
  r5.xyz = r2.xyz * r2.www;
  r2.w = dot(-r5.xyz, r3.xyz);
  r3.w = saturate(dot(r0.yzw, r5.xyz));
  r3.w = log2(r3.w);
  r2.w = 1 + r2.w;
  r2.w = max(0, r2.w);
  r2.w = 0.5 * r2.w;
  r2.w = r2.w * r2.w;
  r4.w = 32 * g_aPointLight.TransLightParam.y;
  r3.w = r4.w * r3.w;
  r3.w = exp2(r3.w);
  r2.w = r3.w * r2.w;
  r2.w = g_aPointLight.TransLightParam.x * r2.w;
  r5.xyz = g_aPointLight.DiffColor.xyz * r2.www;
  r6.xy = float2(10,13) * r1.wz;
  r1.z = cmp(r1.w == 0.000000);
  r5.xyz = r6.xxx * r5.xyz;
  r1.w = exp2(r6.y);
  r2.w = 1 / r1.x;
  r1.x = saturate(g_aPointLight.PositionAndRadius.w * r1.x);
  r1.x = 1 + -r1.x;
  r2.w = -g_aPointLight.PositionAndRadius.w + r2.w;
  r2.w = max(0, r2.w);
  r5.xyz = r5.xyz * r2.www;
  r4.xyz = r4.xyz * r2.www + r5.xyz;
  r5.xyz = g_aPointLight.DiffColor.xyz * r1.yyy;
  r1.y = log2(r1.y);
  r1.y = 0.100000001 * r1.y;
  r1.y = exp2(r1.y);
  r5.xyz = r5.xyz * r0.xxx;
  r5.xyz = r5.xyz * r2.www;
  r4.xyz = r1.zzz ? r5.xyz : r4.xyz;
  r5.xyz = g_GBuffer3Texture.Sample(SS_ClampPoint_s, v1.xy).xyz;
  r5.xyz = r5.xyz * r5.xyz;
  r6.xyz = -r5.xyz * float3(0.5,0.5,0.5) + float3(1,1,1);
  r4.xyz = r6.xyz * r4.xyz;
  r1.z = g_SSAOTexture.Sample(SS_WrapLinear_s, v1.xy).x;
  o0.xyz = r4.xyz * r1.zzz;
  o0.w = 1;
  r2.w = dot(-r2.xyz, -r2.xyz);
  r2.w = rsqrt(r2.w);
  r0.yzw = -r2.xyz * r2.www + r0.yzw;
  r2.x = dot(r0.yzw, r0.yzw);
  r2.x = rsqrt(r2.x);
  r0.yzw = r2.xxx * r0.yzw;
  r0.y = saturate(dot(r0.yzw, r3.xyz));
  r0.y = log2(r0.y);
  r0.z = g_aPointLight.DiffColor.w * r1.w;
  r0.w = r1.w * 0.00999999978 + g_aPointLight.DiffColor.w;
  r0.z = r0.z / r0.w;
  r0.z = max(1, r0.z);
  r0.y = r0.z * r0.y;
  r0.z = r0.z * 0.125 + 0.25;
  r0.y = exp2(r0.y);
  r2.xyz = g_aPointLight.SpecColor.xyz * r0.yyy;
  r2.xyz = r2.xyz * r1.yyy;
  r0.xyw = r2.xyz * r0.xxx;
  r0.xyw = r0.xyw * r1.xxx;
  r0.xyz = r0.xyw * r0.zzz;
  r0.xyz = r0.xyz * r5.xyz;
  o1.xyz = r0.xyz * r1.zzz;
  o1.w = 1;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Original ASM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20546
//
//
// Buffer Definitions: 
//
// cbuffer cbLightAccParam
// {
//
//   float4x4 g_InvProjMatrix;          // Offset:    0 Size:    64
//   float4x3 g_ViewMatrix;             // Offset:   64 Size:    48
//   float4 g_ScreenSize;               // Offset:  112 Size:    16 [unused]
//   float4x4 g_CameraMatrix;           // Offset:  128 Size:    64 [unused]
//   float4 g_specPowerParam;           // Offset:  192 Size:    16 [unused]
//   float4x4 g_ProjMatrix;             // Offset:  208 Size:    64 [unused]
//   uint g_lightCount;                 // Offset:  272 Size:     4 [unused]
//   bool g_visualizeLightCount;        // Offset:  276 Size:     4 [unused]
//   uint g_spotLightCount;             // Offset:  280 Size:     4 [unused]
//   uint g_lineLightCount;             // Offset:  284 Size:     4 [unused]
//   float g_frustumNear;               // Offset:  288 Size:     4 [unused]
//   float g_frustumFar;                // Offset:  292 Size:     4 [unused]
//   float g_frustumSliceScale;         // Offset:  296 Size:     4 [unused]
//   float g_frustumSliceBias;          // Offset:  300 Size:     4 [unused]
//   uint4 g_lightTileSize;             // Offset:  304 Size:    16 [unused]
//
// }
//
// cbuffer cbLightAccShadowInfo
// {
//
//   float4 g_aShadowMapInfo;           // Offset:    0 Size:    16
//
// }
//
// cbuffer cbLightAccLightParam
// {
//
//   struct PointLight
//   {
//       
//       float4 PositionAndRadius;      // Offset:    0
//       float4 DiffColor;              // Offset:   16
//       float4 SpecColor;              // Offset:   32
//       float4 TransLightParam;        // Offset:   48
//       float4 ProjParam;              // Offset:   64
//       float4 ShadowCenterPos;        // Offset:   80
//       float4 ViewportScaleOffset[6]; // Offset:   96
//
//   } g_aPointLight;                   // Offset:    0 Size:   192
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// SS_ClampPoint                     sampler      NA          NA    7        1
// SS_WrapLinear                     sampler      NA          NA    8        1
// SS_Shadow                       sampler_c      NA          NA   12        1
// g_LightPrepassAttrTexture         texture  float4          2d    0        1
// g_DepthTexture                    texture  float4          2d    1        1
// g_GBuffer1Texture                 texture  float4          2d    3        1
// g_GBuffer3Texture                 texture  float4          2d    5        1
// g_LightShadowTexture[0]           texture  float4          2d    7        1
// g_SSAOTexture                     texture  float4          2d   33        1
// cbLightAccParam                   cbuffer      NA          NA    0        1
// cbLightAccLightParam              cbuffer      NA          NA    1        1
// cbLightAccShadowInfo              cbuffer      NA          NA    2        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   xy  
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_TARGET                0   xyzw        0   TARGET   float   xyzw
// SV_TARGET                1   xyzw        1   TARGET   float   xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[7], immediateIndexed
dcl_constantbuffer cb2[1], immediateIndexed
dcl_constantbuffer cb1[12], immediateIndexed
dcl_sampler s7, mode_default
dcl_sampler s8, mode_default
dcl_sampler s12, mode_comparison
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t1
dcl_resource_texture2d (float,float,float,float) t3
dcl_resource_texture2d (float,float,float,float) t5
dcl_resource_texture2d (float,float,float,float) t7
dcl_resource_texture2d (float,float,float,float) t33
dcl_input_ps linear v1.xy
dcl_input_ps linear v2.xy
dcl_output o0.xyzw
dcl_output o1.xyzw
dcl_temps 9
mov r0.zw, l(0,0,1.000000,1.000000)
mov r1.zw, l(0,0,0,0)
sample_indexable(texture2d)(float,float,float,float) r2.z, v1.xyxx, t1.yzxw, s7
mov r2.xy, v2.xyxx
mov r2.w, l(1.000000)
dp4 r3.x, r2.xyzw, cb0[0].xyzw
dp4 r3.y, r2.xyzw, cb0[1].xyzw
dp4 r3.z, r2.xyzw, cb0[2].xyzw
dp4 r2.x, r2.xyzw, cb0[3].xyzw
div r2.xyz, r3.xyzx, r2.xxxx
add r3.xyz, -r2.xyzx, cb1[5].xyzx
mov r4.z, -r3.x
mov r5.w, -r3.y
lt r6.xyz, |r3.xyxx|, |r3.yzzy|
lt r7.xyz, l(0.000000, 0.000000, 0.000000, 0.000000), -r3.zyxz
movc r4.w, r7.y, r3.z, -r3.z
movc r5.z, r7.x, -r3.x, r3.x
movc r4.xy, r7.yyyy, cb1[8].zwzz, cb1[9].zwzz
movc r5.xy, r7.xxxx, cb1[10].zwzz, cb1[11].zwzz
movc r4.xyzw, r6.yyyy, r5.xyzw, r4.xyzw
movc r8.z, r7.z, r3.z, -r3.z
movc r8.xy, r7.zzzz, cb1[6].zwzz, cb1[7].zwzz
movc r5.xyz, r6.zzzz, r5.xyzx, r8.xyzx
movc r4.xyzw, r6.xxxx, r4.xyzw, r5.xyzw
max r2.w, |r3.z|, |r3.y|
max r3.w, r2.w, |r3.x|
mul r1.xy, r3.wwww, r4.xyxx
mov r3.xy, r4.zwzz
mad r3.z, cb1[4].x, r3.w, cb1[4].y
movc r4.xy, r7.yyyy, cb1[8].xyxx, cb1[9].xyxx
movc r4.zw, r7.xxxx, cb1[10].xxxy, cb1[11].xxxy
movc r5.xy, r7.zzzz, cb1[6].xyxx, cb1[7].xyxx
movc r5.xy, r6.zzzz, r4.zwzz, r5.xyxx
movc r4.xy, r6.yyyy, r4.zwzz, r4.xyxx
movc r0.xy, r6.xxxx, r4.xyxx, r5.xyxx
mad r0.xyzw, r3.xyzw, r0.xyzw, r1.xyzw
mul r1.xyzw, r0.wwww, cb2[0].zwzw
mad r3.xyzw, r1.zwzw, l(-0.500000, -0.500000, 0.000000, 0.000000), r0.xyzw
div r3.xyz, r3.xyzx, r3.wwww
sample_c_lz_indexable(texture2d)(float,float,float,float) r3.x, r3.xyxx, t7.xxxx, s12, r3.z
mad r4.xyzw, r1.zwzw, l(0.500000, -0.500000, 0.000000, 0.000000), r0.xyzw
div r4.xyz, r4.xyzx, r4.wwww
sample_c_lz_indexable(texture2d)(float,float,float,float) r3.y, r4.xyxx, t7.xxxx, s12, r4.z
mad r4.xyzw, r1.zwzw, l(-0.500000, 0.500000, 0.000000, 0.000000), r0.xyzw
mad r0.xyzw, r1.xyzw, l(0.500000, 0.500000, 0.000000, 0.000000), r0.xyzw
div r0.xyz, r0.xyzx, r0.wwww
sample_c_lz_indexable(texture2d)(float,float,float,float) r3.w, r0.xyxx, t7.xxxx, s12, r0.z
div r0.xyz, r4.xyzx, r4.wwww
sample_c_lz_indexable(texture2d)(float,float,float,float) r3.z, r0.xyxx, t7.xxxx, s12, r0.z
dp4 r0.x, r3.xyzw, l(0.250000, 0.250000, 0.250000, 0.250000)
add r0.x, r0.x, l(-1.000000)
mad r0.x, cb1[4].w, r0.x, l(1.000000)
add r0.yzw, -r2.xxyz, cb1[0].xxyz
dp3 r1.x, r0.yzwy, r0.yzwy
rsq r1.y, r1.x
mul r0.yzw, r0.yyzw, r1.yyyy
sample_indexable(texture2d)(float,float,float,float) r1.yzw, v1.xyxx, t0.wxyz, s7
mad r1.yzw, r1.yyzw, l(0.000000, 2.000000, 2.000000, 2.000000), l(0.000000, -1.000000, -1.000000, -1.000000)
dp3 r2.w, r1.yzwy, r1.yzwy
rsq r2.w, r2.w
mul r1.yzw, r1.yyzw, r2.wwww
dp3 r3.x, r1.yzwy, cb0[4].xyzx
dp3 r3.y, r1.yzwy, cb0[5].xyzx
dp3 r3.z, r1.yzwy, cb0[6].xyzx
dp3 r1.y, r3.xyzx, r0.yzwy
sample_indexable(texture2d)(float,float,float,float) r1.zw, v1.xyxx, t3.zwxy, s7
mad r2.w, r1.w, l(10.000000), r1.y
mov_sat r1.y, r1.y
max r2.w, r2.w, l(0.000000)
mad r3.w, r1.w, l(20.000000), l(1.000000)
div r2.w, r2.w, r3.w
mul r4.xyz, r2.wwww, cb1[1].xyzx
mul r4.xyz, r0.xxxx, r4.xyzx
dp3 r2.w, r2.xyzx, r2.xyzx
rsq r2.w, r2.w
mul r5.xyz, r2.wwww, r2.xyzx
dp3 r2.w, -r5.xyzx, r3.xyzx
dp3_sat r3.w, r0.yzwy, r5.xyzx
log r3.w, r3.w
add r2.w, r2.w, l(1.000000)
max r2.w, r2.w, l(0.000000)
mul r2.w, r2.w, l(0.500000)
mul r2.w, r2.w, r2.w
mul r4.w, cb1[3].y, l(32.000000)
mul r3.w, r3.w, r4.w
exp r3.w, r3.w
mul r2.w, r2.w, r3.w
mul r2.w, r2.w, cb1[3].x
mul r5.xyz, r2.wwww, cb1[1].xyzx
mul r6.xy, r1.wzww, l(10.000000, 13.000000, 0.000000, 0.000000)
eq r1.z, r1.w, l(0.000000)
mul r5.xyz, r5.xyzx, r6.xxxx
exp r1.w, r6.y
div r2.w, l(1.000000, 1.000000, 1.000000, 1.000000), r1.x
mul_sat r1.x, r1.x, cb1[0].w
add r1.x, -r1.x, l(1.000000)
add r2.w, r2.w, -cb1[0].w
max r2.w, r2.w, l(0.000000)
mul r5.xyz, r2.wwww, r5.xyzx
mad r4.xyz, r4.xyzx, r2.wwww, r5.xyzx
mul r5.xyz, r1.yyyy, cb1[1].xyzx
log r1.y, r1.y
mul r1.y, r1.y, l(0.100000)
exp r1.y, r1.y
mul r5.xyz, r0.xxxx, r5.xyzx
mul r5.xyz, r2.wwww, r5.xyzx
movc r4.xyz, r1.zzzz, r5.xyzx, r4.xyzx
sample_indexable(texture2d)(float,float,float,float) r5.xyz, v1.xyxx, t5.xyzw, s7
mul r5.xyz, r5.xyzx, r5.xyzx
mad r6.xyz, -r5.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), l(1.000000, 1.000000, 1.000000, 0.000000)
mul r4.xyz, r4.xyzx, r6.xyzx
sample_indexable(texture2d)(float,float,float,float) r1.z, v1.xyxx, t33.yzxw, s8
mul o0.xyz, r1.zzzz, r4.xyzx
mov o0.w, l(1.000000)
dp3 r2.w, -r2.xyzx, -r2.xyzx
rsq r2.w, r2.w
mad r0.yzw, -r2.xxyz, r2.wwww, r0.yyzw
dp3 r2.x, r0.yzwy, r0.yzwy
rsq r2.x, r2.x
mul r0.yzw, r0.yyzw, r2.xxxx
dp3_sat r0.y, r0.yzwy, r3.xyzx
log r0.y, r0.y
mul r0.z, r1.w, cb1[1].w
mad r0.w, r1.w, l(0.010000), cb1[1].w
div r0.z, r0.z, r0.w
max r0.z, r0.z, l(1.000000)
mul r0.y, r0.y, r0.z
mad r0.z, r0.z, l(0.125000), l(0.250000)
exp r0.y, r0.y
mul r2.xyz, r0.yyyy, cb1[2].xyzx
mul r2.xyz, r1.yyyy, r2.xyzx
mul r0.xyw, r0.xxxx, r2.xyxz
mul r0.xyw, r1.xxxx, r0.xyxw
mul r0.xyz, r0.zzzz, r0.xywx
mul r0.xyz, r5.xyzx, r0.xyzx
mul o1.xyz, r1.zzzz, r0.xyzx
mov o1.w, l(1.000000)
ret 
// Approximately 138 instruction slots used

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