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

cbuffer cbSampleOffset : register(b1)
{
  float4 g_avSampleOffsets[16] : packoffset(c0);
}

SamplerState SS_ClampLinear_s : register(s3);
Texture2D<float4> g_ShortAOTex : register(t0);


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


void main( 
  float4 v0 : SV_Position0,
  float2 v1 : TEXCOORD0,
  out float4 o0 : SV_Target0)
{
  float4 r0,r1,r2;
  uint4 bitmask, uiDest;
  float4 fDest;

  r0.xy = g_avSampleOffsets[0].xy + v1.xy;
  r0.xyzw = g_ShortAOTex.Sample(SS_ClampLinear_s, r0.xy).xyzw;
  r0.y = dot(r0.yzw, float3(1.53787005e-005,0.00392156886,1));
  r1.xyzw = g_ShortAOTex.Sample(SS_ClampLinear_s, v1.xy).xyzw;
  r0.z = dot(r1.yzw, float3(1.53787005e-005,0.00392156886,1));
  r0.y = r0.z + -r0.y;
  r0.yw = r0.yz * r0.yz;
  r0.w = 100 / r0.w;
  r0.y = r0.y * r0.w;
  r0.y = exp2(-r0.y);
  r2.x = g_avSampleOffsets[0].z * r0.y;
  r0.y = g_avSampleOffsets[0].z * r0.y + 1;
  r0.x = r0.x * r2.x + r1.x;
  o0.yzw = r1.yzw;
  r1.xy = g_avSampleOffsets[1].xy + v1.xy;
  r1.xyzw = g_ShortAOTex.Sample(SS_ClampLinear_s, r1.xy).xyzw;
  r1.y = dot(r1.yzw, float3(1.53787005e-005,0.00392156886,1));
  r1.y = -r1.y + r0.z;
  r1.y = r1.y * r1.y;
  r1.y = r1.y * r0.w;
  r1.y = exp2(-r1.y);
  r1.z = g_avSampleOffsets[1].z * r1.y;
  r0.y = g_avSampleOffsets[1].z * r1.y + r0.y;
  r0.x = r1.x * r1.z + r0.x;
  r1.xy = g_avSampleOffsets[2].xy + v1.xy;
  r1.xyzw = g_ShortAOTex.Sample(SS_ClampLinear_s, r1.xy).xyzw;
  r1.y = dot(r1.yzw, float3(1.53787005e-005,0.00392156886,1));
  r1.y = -r1.y + r0.z;
  r1.y = r1.y * r1.y;
  r1.y = r1.y * r0.w;
  r1.y = exp2(-r1.y);
  r1.z = g_avSampleOffsets[2].z * r1.y;
  r0.y = g_avSampleOffsets[2].z * r1.y + r0.y;
  r0.x = r1.x * r1.z + r0.x;
  r1.xy = g_avSampleOffsets[3].xy + v1.xy;
  r1.xyzw = g_ShortAOTex.Sample(SS_ClampLinear_s, r1.xy).xyzw;
  r1.y = dot(r1.yzw, float3(1.53787005e-005,0.00392156886,1));
  r0.z = -r1.y + r0.z;
  r0.z = r0.z * r0.z;
  r0.z = r0.z * r0.w;
  r0.z = exp2(-r0.z);
  r0.w = g_avSampleOffsets[3].z * r0.z;
  r0.y = g_avSampleOffsets[3].z * r0.z + r0.y;
  r0.x = r1.x * r0.w + r0.x;
  o0.x = r0.x / r0.y;
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Original ASM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20546
//
//
// Buffer Definitions: 
//
// cbuffer cbSampleOffset
// {
//
//   float4 g_avSampleOffsets[16];      // Offset:    0 Size:   256
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// SS_ClampLinear                    sampler      NA          NA    3        1
// g_ShortAOTex                      texture  float4          2d    0        1
// cbSampleOffset                    cbuffer      NA          NA    1        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float       
// TEXCOORD                 0   xy          1     NONE   float   xy  
//
//
// 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 cb1[4], immediateIndexed
dcl_sampler s3, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_input_ps linear v1.xy
dcl_output o0.xyzw
dcl_temps 3
add r0.xy, v1.xyxx, cb1[0].xyxx
sample_indexable(texture2d)(float,float,float,float) r0.xyzw, r0.xyxx, t0.xyzw, s3
dp3 r0.y, r0.yzwy, l(0.000015, 0.003922, 1.000000, 0.000000)
sample_indexable(texture2d)(float,float,float,float) r1.xyzw, v1.xyxx, t0.xyzw, s3
dp3 r0.z, r1.yzwy, l(0.000015, 0.003922, 1.000000, 0.000000)
add r0.y, -r0.y, r0.z
mul r0.yw, r0.yyyz, r0.yyyz
div r0.w, l(100.000000), r0.w
mul r0.y, r0.w, r0.y
exp r0.y, -r0.y
mul r2.x, r0.y, cb1[0].z
mad r0.y, cb1[0].z, r0.y, l(1.000000)
mad r0.x, r0.x, r2.x, r1.x
mov o0.yzw, r1.yyzw
add r1.xy, v1.xyxx, cb1[1].xyxx
sample_indexable(texture2d)(float,float,float,float) r1.xyzw, r1.xyxx, t0.xyzw, s3
dp3 r1.y, r1.yzwy, l(0.000015, 0.003922, 1.000000, 0.000000)
add r1.y, r0.z, -r1.y
mul r1.y, r1.y, r1.y
mul r1.y, r0.w, r1.y
exp r1.y, -r1.y
mul r1.z, r1.y, cb1[1].z
mad r0.y, cb1[1].z, r1.y, r0.y
mad r0.x, r1.x, r1.z, r0.x
add r1.xy, v1.xyxx, cb1[2].xyxx
sample_indexable(texture2d)(float,float,float,float) r1.xyzw, r1.xyxx, t0.xyzw, s3
dp3 r1.y, r1.yzwy, l(0.000015, 0.003922, 1.000000, 0.000000)
add r1.y, r0.z, -r1.y
mul r1.y, r1.y, r1.y
mul r1.y, r0.w, r1.y
exp r1.y, -r1.y
mul r1.z, r1.y, cb1[2].z
mad r0.y, cb1[2].z, r1.y, r0.y
mad r0.x, r1.x, r1.z, r0.x
add r1.xy, v1.xyxx, cb1[3].xyxx
sample_indexable(texture2d)(float,float,float,float) r1.xyzw, r1.xyxx, t0.xyzw, s3
dp3 r1.y, r1.yzwy, l(0.000015, 0.003922, 1.000000, 0.000000)
add r0.z, r0.z, -r1.y
mul r0.z, r0.z, r0.z
mul r0.z, r0.w, r0.z
exp r0.z, -r0.z
mul r0.w, r0.z, cb1[3].z
mad r0.y, cb1[3].z, r0.z, r0.y
mad r0.x, r1.x, r0.w, r0.x
div o0.x, r0.x, r0.y
ret 
// Approximately 46 instruction slots used

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