// Lights MEDIUM
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.2.34 on Wed Mar 23 19:07:33 2016
//
//
// 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
dcl_constantbuffer cb0[34], dynamicIndexed
dcl_constantbuffer cb1[44], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_comparison
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texturecube (float,float,float,float) t1
dcl_input_ps_siv linear noperspective v0.xy, position
dcl_output o0.xyzw
//dcl_temps 4
dcl_temps 16


mul r0.xy, v0.xyxx, cb1[43].zwzz
sample_l_indexable(texture2d)(float,float,float,float) r0.x, r0.xyxx, t0.xyzw, s0, l(0.000000)
mad r0.x, r0.x, cb1[40].z, -cb1[40].w
div r0.x, l(1.000000, 1.000000, 1.000000, 1.000000), r0.x
mad r0.yz, v0.xxyx, cb1[43].zzwz, -cb1[41].wwzw
div r0.yz, r0.yyzy, cb1[41].xxyx
mul r0.yz, r0.xxxx, r0.yyzy

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

mul r1.xyzw, r0.zzzz, cb1[29].xyzw
mad r1.xyzw, r0.yyyy, cb1[28].xyzw, r1.xyzw
mad r0.xyzw, r0.xxxx, cb1[30].xyzw, r1.xyzw
add r0.xyzw, r0.xyzw, cb1[31].xyzw
div r0.xyz, r0.xyzx, r0.wwww
add r1.xyz, -r0.xyzx, cb0[32].xyzx
dp3 r0.w, r1.xyzx, r1.xyzx
sqrt r0.w, r0.w
mul r1.w, r0.w, cb0[32].w
lt r1.w, r1.w, l(1.000000)
if_nz r1.w
  div r2.xyz, r1.xyzx, r0.wwww
  max r0.w, |r1.z|, |r1.y|
  max r0.w, r0.w, |r1.x|
  eq r3.xyz, |r1.xyzx|, r1.xyzx
  eq r1.xy, r0.wwww, |r1.xyxx|
  movc r3.xyz, r3.xyzx, l(0,2,4,0), l(1,3,5,0)
  movc r0.w, r1.y, r3.y, r3.z
  movc r0.w, r1.x, r3.x, r0.w
  ishl r0.w, r0.w, l(2)
  mul r1.xy, r0.yyyy, cb0[r0.w + 3].zwzz
  mad r0.xy, r0.xxxx, cb0[r0.w + 2].zwzz, r1.xyxx
  mad r0.xy, r0.zzzz, cb0[r0.w + 4].zwzz, r0.xyxx
  add r0.xy, r0.xyxx, cb0[r0.w + 5].zwzz
  div r0.x, r0.x, r0.y
  div r0.y, -cb0[33].x, r0.y
  add r0.x, r0.y, r0.x
  sample_c_lz_indexable(texturecube)(float,float,float,float) r0.x, r2.xyzx, t1.xxxx, s1, r0.x
else 
  mov r0.x, l(1.000000)
endif 
add r0.x, r0.x, l(-0.500000)
mad_sat r0.x, r0.x, cb0[26].z, l(0.500000)
mad r0.x, r0.x, r0.x, l(-1.000000)
mad r0.x, cb0[26].y, r0.x, l(1.000000)
mov o0.zw, |r0.xxxx|
mov o0.xy, l(1.000000,1.000000,0,0)
ret 
// Approximately 0 instruction slots used
