// Shadows ASM
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.2.34 on Tue Mar 22 18:41:36 2016
//
//
// Note: shader requires additional functionality:
//       Early depth-stencil
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   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 | forceEarlyDepthStencil
dcl_constantbuffer cb0[32], immediateIndexed
dcl_constantbuffer cb1[44], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_sampler s2, mode_default
dcl_sampler s3, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t1
dcl_resource_texture2d (float,float,float,float) t2
dcl_resource_texture2d (float,float,float,float) t3
dcl_input_ps_siv linear noperspective v0.xy, position
dcl_output o0.xyzw
//dcl_temps 15
dcl_temps 16

mul r0.xy, v0.xyxx, cb1[43].zwzz
sample_l_indexable(texture2d)(float,float,float,float) r0.z, r0.xyxx, t2.yzxw, s2, l(0.000000)
mad r0.z, r0.z, cb1[40].z, -cb1[40].w
div r0.z, l(1.000000, 1.000000, 1.000000, 1.000000), r0.z
mad r1.xy, v0.xyxx, cb1[43].zwzz, -cb1[41].wzww
div r1.xy, r1.xyxx, cb1[41].xyxx
mul r1.xy, r0.zzzz, r1.xyxx

ld_indexable(texture2d)(float,float,float,float) r16.xyzw, l(0, 0, 0, 0), t125.xyzw
  add r16.w, r0.z, -r16.y
  mul r16.w, r16.x, r16.w
  add r1.x, r1.x, -r16.w

mul r2.xyzw, r1.yyyy, cb0[28].xyzw
mad r1.xyzw, r1.xxxx, cb0[27].xyzw, r2.xyzw
mad r1.xyzw, r0.zzzz, cb0[29].xyzw, r1.xyzw
add r1.xyzw, r1.xyzw, cb0[30].xyzw
div r0.zw, r1.xxxy, r1.wwww
min r1.x, r1.z, l(0.999990)
sample_l_indexable(texture2d)(float,float,float,float) r1.y, r0.xyxx, t0.xwyz, s0, l(0.000000)
lt r1.w, l(0.500000), r1.y
movc r1.w, r1.w, l(-0.500000), l(-0.000000)
add r1.y, r1.w, r1.y
mul r1.y, r1.y, l(14.000000)
ftou r1.y, r1.y
mad r0.zw, r0.zzzw, cb0[1].xxxy, l(0.000000, 0.000000, -0.500000, -0.500000)
frc r2.xy, r0.zwzz
round_ni r0.zw, r0.zzzw
add r0.zw, r0.zzzw, l(0.000000, 0.000000, 0.500000, 0.500000)
mul r0.zw, r0.zzzw, cb0[1].zzzw
gather4_aoffimmi_indexable(-2,-2,0)(texture2d)(float,float,float,float) r3.xyzw, r0.zwzz, t3.xyzw, s3.x
add r4.xyzw, -r1.xxxx, r3.xyzw
mad_sat r4.xyzw, r4.xyzw, cb0[0].zzzz, l(1.000000, 1.000000, 1.000000, 1.000000)
gather4_aoffimmi_indexable(0,-2,0)(texture2d)(float,float,float,float) r5.xyzw, r0.zwzz, t3.xyzw, s3.x
add r6.xyzw, -r1.xxxx, r5.xyzw
mad_sat r6.xyzw, r6.xyzw, cb0[0].zzzz, l(1.000000, 1.000000, 1.000000, 1.000000)
gather4_aoffimmi_indexable(2,-2,0)(texture2d)(float,float,float,float) r7.xyzw, r0.zwzz, t3.xyzw, s3.x
add r8.xyzw, -r1.xxxx, r7.xyzw
mad_sat r8.xyzw, r8.xyzw, cb0[0].zzzz, l(1.000000, 1.000000, 1.000000, 1.000000)
add r2.zw, -r2.xxxy, l(0.000000, 0.000000, 1.000000, 1.000000)
mad r4.xy, r4.wxww, r2.zzzz, r4.zyzz
add r4.xy, r6.wxww, r4.xyxx
add r4.xy, r6.zyzz, r4.xyxx
add r4.xy, r8.wxww, r4.xyxx
mad r4.xy, r8.zyzz, r2.xxxx, r4.xyxx
mad r1.w, r4.x, r2.w, r4.y
gather4_aoffimmi_indexable(-2,0,0)(texture2d)(float,float,float,float) r4.xyzw, r0.zwzz, t3.xyzw, s3.x
add r6.xyzw, -r1.xxxx, r4.xyzw
mad_sat r6.xyzw, r6.xyzw, cb0[0].zzzz, l(1.000000, 1.000000, 1.000000, 1.000000)
gather4_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r8.xyzw, r0.zwzz, t3.xyzw, s3.x
add r9.xyzw, -r1.xxxx, r8.xyzw
mad_sat r9.xyzw, r9.xyzw, cb0[0].zzzz, l(1.000000, 1.000000, 1.000000, 1.000000)
gather4_aoffimmi_indexable(2,0,0)(texture2d)(float,float,float,float) r10.xyzw, r0.zwzz, t3.xyzw, s3.x
add r11.xyzw, -r1.xxxx, r10.xyzw
mad_sat r11.xyzw, r11.xyzw, cb0[0].zzzz, l(1.000000, 1.000000, 1.000000, 1.000000)
mad r6.xy, r6.wxww, r2.zzzz, r6.zyzz
add r6.xy, r9.wxww, r6.xyxx
add r6.xy, r9.zyzz, r6.xyxx
add r6.xy, r11.wxww, r6.xyxx
mad r6.xy, r11.zyzz, r2.xxxx, r6.xyxx
add r6.x, r6.y, r6.x
add r1.w, r1.w, r6.x
gather4_aoffimmi_indexable(-2,2,0)(texture2d)(float,float,float,float) r6.xyzw, r0.zwzz, t3.xyzw, s3.x
add r9.xyzw, -r1.xxxx, r6.xyzw
mad_sat r9.xyzw, r9.xyzw, cb0[0].zzzz, l(1.000000, 1.000000, 1.000000, 1.000000)
gather4_aoffimmi_indexable(0,2,0)(texture2d)(float,float,float,float) r11.xyzw, r0.zwzz, t3.xyzw, s3.x
add r12.xyzw, -r1.xxxx, r11.xyzw
mad_sat r12.xyzw, r12.xyzw, cb0[0].zzzz, l(1.000000, 1.000000, 1.000000, 1.000000)
gather4_aoffimmi_indexable(2,2,0)(texture2d)(float,float,float,float) r13.xyzw, r0.zwzz, t3.xyzw, s3.x
add r14.xyzw, -r1.xxxx, r13.xyzw
mad_sat r14.xyzw, r14.xyzw, cb0[0].zzzz, l(1.000000, 1.000000, 1.000000, 1.000000)
mad r0.zw, r9.wwwx, r2.zzzz, r9.zzzy
add r0.zw, r12.wwwx, r0.zzzw
add r0.zw, r12.zzzy, r0.zzzw
add r0.zw, r14.wwwx, r0.zzzw
mad r0.zw, r14.zzzy, r2.xxxx, r0.zzzw
mad r0.z, r0.w, r2.y, r0.z
add r0.z, r0.z, r1.w
ieq r9.xyzw, r1.yyyy, l(2, 3, 5, 6)
or r0.w, r9.y, r9.x
or r0.w, r9.z, r0.w
or r0.w, r9.w, r0.w
if_nz r0.w
  sample_l_indexable(texture2d)(float,float,float,float) r0.x, r0.xyxx, t1.xyzw, s1, l(0.000000)
  min r0.x, r0.x, l(0.999000)
  add r0.x, -r0.x, l(1.000000)
  log r0.x, r0.x
  mul r0.x, r0.x, cb0[31].y
  add r0.y, r1.z, cb0[31].x
  mul r0.x, r0.x, l(-0.0346573591)
  add r1.xyzw, -r3.xyzw, r0.yyyy
  max r1.xyzw, r1.xyzw, l(0.000000, 0.000000, 0.000000, 0.000000)
  mul r1.xyzw, r0.xxxx, -r1.xyzw
  mul r1.xyzw, r1.xyzw, l(1.442695, 1.442695, 1.442695, 1.442695)
  exp_sat r1.xyzw, r1.xyzw
  lt r3.xyzw, l(0.990000, 0.990000, 0.990000, 0.990000), r3.xyzw
  movc r1.xyzw, r3.xyzw, l(1.000000,1.000000,1.000000,1.000000), r1.xyzw
  add r3.xyzw, -r5.xyzw, r0.yyyy
  max r3.xyzw, r3.xyzw, l(0.000000, 0.000000, 0.000000, 0.000000)
  mul r3.xyzw, r0.xxxx, -r3.xyzw
  mul r3.xyzw, r3.xyzw, l(1.442695, 1.442695, 1.442695, 1.442695)
  exp_sat r3.xyzw, r3.xyzw
  lt r5.xyzw, l(0.990000, 0.990000, 0.990000, 0.990000), r5.xyzw
  movc r3.xyzw, r5.xyzw, l(1.000000,1.000000,1.000000,1.000000), r3.xyzw
  add r5.xyzw, -r7.xyzw, r0.yyyy
  max r5.xyzw, r5.xyzw, l(0.000000, 0.000000, 0.000000, 0.000000)
  mul r5.xyzw, r0.xxxx, -r5.xyzw
  mul r5.xyzw, r5.xyzw, l(1.442695, 1.442695, 1.442695, 1.442695)
  exp_sat r5.xyzw, r5.xyzw
  lt r7.xyzw, l(0.990000, 0.990000, 0.990000, 0.990000), r7.xyzw
  movc r5.xyzw, r7.xyzw, l(1.000000,1.000000,1.000000,1.000000), r5.xyzw
  mad r1.xy, r1.wxww, r2.zzzz, r1.zyzz
  add r1.xy, r3.wxww, r1.xyxx
  add r1.xy, r3.zyzz, r1.xyxx
  add r1.xy, r5.wxww, r1.xyxx
  mad r1.xy, r5.zyzz, r2.xxxx, r1.xyxx
  mad r0.w, r1.x, r2.w, r1.y
  add r1.xyzw, -r4.xyzw, r0.yyyy
  max r1.xyzw, r1.xyzw, l(0.000000, 0.000000, 0.000000, 0.000000)
  mul r1.xyzw, r0.xxxx, -r1.xyzw
  mul r1.xyzw, r1.xyzw, l(1.442695, 1.442695, 1.442695, 1.442695)
  exp_sat r1.xyzw, r1.xyzw
  lt r3.xyzw, l(0.990000, 0.990000, 0.990000, 0.990000), r4.xyzw
  movc r1.xyzw, r3.xyzw, l(1.000000,1.000000,1.000000,1.000000), r1.xyzw
  add r3.xyzw, -r8.xyzw, r0.yyyy
  max r3.xyzw, r3.xyzw, l(0.000000, 0.000000, 0.000000, 0.000000)
  mul r3.xyzw, r0.xxxx, -r3.xyzw
  mul r3.xyzw, r3.xyzw, l(1.442695, 1.442695, 1.442695, 1.442695)
  exp_sat r3.xyzw, r3.xyzw
  lt r4.xyzw, l(0.990000, 0.990000, 0.990000, 0.990000), r8.xyzw
  movc r3.xyzw, r4.xyzw, l(1.000000,1.000000,1.000000,1.000000), r3.xyzw
  add r4.xyzw, -r10.xyzw, r0.yyyy
  max r4.xyzw, r4.xyzw, l(0.000000, 0.000000, 0.000000, 0.000000)
  mul r4.xyzw, r0.xxxx, -r4.xyzw
  mul r4.xyzw, r4.xyzw, l(1.442695, 1.442695, 1.442695, 1.442695)
  exp_sat r4.xyzw, r4.xyzw
  lt r5.xyzw, l(0.990000, 0.990000, 0.990000, 0.990000), r10.xyzw
  movc r4.xyzw, r5.xyzw, l(1.000000,1.000000,1.000000,1.000000), r4.xyzw
  mad r1.xy, r1.wxww, r2.zzzz, r1.zyzz
  add r1.xy, r3.wxww, r1.xyxx
  add r1.xy, r3.zyzz, r1.xyxx
  add r1.xy, r4.wxww, r1.xyxx
  mad r1.xy, r4.zyzz, r2.xxxx, r1.xyxx
  add r1.x, r1.y, r1.x
  add r0.w, r0.w, r1.x
  add r1.xyzw, -r6.xyzw, r0.yyyy
  max r1.xyzw, r1.xyzw, l(0.000000, 0.000000, 0.000000, 0.000000)
  mul r1.xyzw, r0.xxxx, -r1.xyzw
  mul r1.xyzw, r1.xyzw, l(1.442695, 1.442695, 1.442695, 1.442695)
  exp_sat r1.xyzw, r1.xyzw
  lt r3.xyzw, l(0.990000, 0.990000, 0.990000, 0.990000), r6.xyzw
  movc r1.xyzw, r3.xyzw, l(1.000000,1.000000,1.000000,1.000000), r1.xyzw
  add r3.xyzw, -r11.xyzw, r0.yyyy
  max r3.xyzw, r3.xyzw, l(0.000000, 0.000000, 0.000000, 0.000000)
  mul r3.xyzw, r0.xxxx, -r3.xyzw
  mul r3.xyzw, r3.xyzw, l(1.442695, 1.442695, 1.442695, 1.442695)
  exp_sat r3.xyzw, r3.xyzw
  lt r4.xyzw, l(0.990000, 0.990000, 0.990000, 0.990000), r11.xyzw
  movc r3.xyzw, r4.xyzw, l(1.000000,1.000000,1.000000,1.000000), r3.xyzw
  add r4.xyzw, -r13.xyzw, r0.yyyy
  max r4.xyzw, r4.xyzw, l(0.000000, 0.000000, 0.000000, 0.000000)
  mul r4.xyzw, r0.xxxx, -r4.xyzw
  mul r4.xyzw, r4.xyzw, l(1.442695, 1.442695, 1.442695, 1.442695)
  exp_sat r4.xyzw, r4.xyzw
  lt r5.xyzw, l(0.990000, 0.990000, 0.990000, 0.990000), r13.xyzw
  movc r4.xyzw, r5.xyzw, l(1.000000,1.000000,1.000000,1.000000), r4.xyzw
  mad r0.xy, r1.wxww, r2.zzzz, r1.zyzz
  add r0.xy, r3.wxww, r0.xyxx
  add r0.xy, r3.zyzz, r0.xyxx
  add r0.xy, r4.wxww, r0.xyxx
  mad r0.xy, r4.zyzz, r2.xxxx, r0.xyxx
  mad r0.x, r0.y, r2.y, r0.x
  add r0.x, r0.x, r0.w
  mul r0.x, r0.x, l(0.040000)
else 
  mov r0.x, l(1.000000)
endif 
mad r0.y, r0.z, l(0.040000), l(-0.500000)
mad_sat r0.y, r0.y, cb0[26].z, l(0.500000)
mad r0.y, r0.y, r0.y, l(-1.000000)
mad r0.y, cb0[26].y, r0.y, l(1.000000)
mad r0.x, r0.x, r0.x, l(-1.000000)
mad r0.x, cb0[26].y, r0.x, l(1.000000)
sqrt o0.xyzw, r0.yxyx
ret 
// Approximately 0 instruction slots used
