// MANUALLY DUMPED [ShaderRegexDecals2][ShaderRegexShadowsSSR1] Manual specular.
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.3.16 on Fri May 28 18:50:56 2021
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD                10   xyzw        0     NONE   float   xyz
// TEXCOORD                11   xyzw        1     NONE   float   xyzw
// TEXCOORD                 0   xyzw        2     NONE   float   xy
// COLOR                    1   xyzw        3     NONE   float   x  w
// PARTICLE_POSITION        0   xyz         4     NONE   float
// PARTICLE_TIME            0      w        4     NONE   float
// PARTICLE_VELOCITY        0   xyzw        5     NONE   float
// TEXCOORD                 7   xyzw        6     NONE   float   xyzw
// TEXCOORD                 8   x           7     NONE   float   x
// TEXCOORD                12    yz         7     NONE   float    yz
// SV_POSITION              0   xyzw        8      POS   float   xyzw
// SV_IsFrontFace           0   x           9    FFACE    uint
//
//
// 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[1], immediateIndexed
dcl_constantbuffer cb1[81], immediateIndexed
dcl_constantbuffer cb2[86], dynamicIndexed
dcl_constantbuffer cb3[40], immediateIndexed
dcl_constantbuffer cb4[4], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_sampler s2, mode_default
dcl_sampler s3, mode_default
dcl_sampler s4, mode_default
dcl_sampler s5, mode_comparison
dcl_sampler s6, mode_default
dcl_sampler s7, mode_default
dcl_sampler s8, mode_default
dcl_sampler s9, mode_default
dcl_resource_texture2d (uint,uint,uint,uint) t0
dcl_resource_texture2d (float,float,float,float) t1
dcl_resource_texture2d (float,float,float,float) t2
dcl_resource_texturecube (float,float,float,float) t3
dcl_resource_texture2d (float,float,float,float) t4
dcl_resource_texture2darray (float,float,float,float) t5
dcl_resource_texture2d (float,float,float,float) t6
dcl_resource_texture3d (float,float,float,float) t7
dcl_resource_texture3d (float,float,float,float) t8
dcl_resource_texture3d (float,float,float,float) t9
dcl_resource_texture3d (float,float,float,float) t10
dcl_resource_texture3d (float,float,float,float) t11
dcl_resource_texture2d (float,float,float,float) t12
dcl_resource_texture2d (float,float,float,float) t13
dcl_resource_texture2d (float,float,float,float) t14
dcl_resource_texture2darray (float,float,float,float) t15
dcl_resource_texture2d (float,float,float,float) t16
dcl_resource_texture3d (float,float,float,float) t17
dcl_resource_texture3d (float,float,float,float) t18
dcl_resource_texture2d (float,float,float,float) t19
dcl_resource_texture2d (float,float,float,float) t20
dcl_resource_texture2d (float,float,float,float) t21
dcl_resource_texture2d (float,float,float,float) t22
dcl_input_ps linear centroid v0.xyz
dcl_input_ps linear centroid v1.xyzw
dcl_input_ps linear v2.xy
dcl_input_ps linear v3.xw
dcl_input_ps linear v6.xyzw
dcl_input_ps linear v7.x
dcl_input_ps linear v7.yz
dcl_input_ps_siv linear noperspective v8.xyzw, position
dcl_output o0.xyzw
dcl_temps 34
dcl_resource_texture2d (float,float,float,float) t125
dcl_resource_texture1d (float,float,float,float) t120
mul r0.xy, v8.xyxx, cb0[0].xyxx
mul r1.xyz, v0.yzxy, v1.zxyz
mad r1.xyz, v1.yzxy, v0.zxyz, -r1.xyzx
mul r1.xyz, r1.xyzx, v1.wwww
mad r0.zw, v8.xxxy, cb0[0].xxxy, -cb3[1].xxxy
mad r0.zw, r0.zzzw, cb3[2].zzzw, l(0.000000, 0.000000, -0.500000, -0.500000)
mul r2.xy, r0.zwzz, v8.wwww
mov r2.z, v8.w
mul r2.xyw, r2.xyxz, l(2.000000, -2.000000, 0.000000, 1.000000)
ld_indexable(texture2d)(float,float,float,float) r20.xyzw, l(0, 0, 0, 0), t125.xyzw
ld_indexable(texture2d)(float,float,float,float) r19.xyzw, l(2, 0, 0, 0), t125.xyzw
ld_indexable(texture1d)(float,float,float,float) r18.xyzw, l(10, 0, 0, 0), t120.xyzw
mov r21.x, r0.x
mul r22.xyzw, r0.yyyy, cb1[37].xyzw
mad r22.xyzw, r21.xxxx, cb1[36].xyzw, r22.xyzw
mad r22.xyzw, v8.zzzz, cb1[38].xyzw, r22.xyzw
add r22.xyzw, r22.xyzw, cb1[39].xyzw
mul r20.w, r19.x, l(0.5)
mul r20.w, r20.w, r18.x
mad r21.x, -r20.x, r20.w, r21.x

mul r32.xyzw, r0.yyyy, cb1[37].xyzw
mad r32.xyzw, r21.xxxx, cb1[36].xyzw, r32.xyzw
mad r32.xyzw, v8.zzzz, cb1[38].xyzw, r32.xyzw
add r32.xyzw, r32.xyzw, cb1[39].xyzw
div r32.xyz, r32.xyzx, r32.wwww

mul r20.w, r19.x, l(0.5)
mul r20.w, r20.w, r18.x
mul r20.w, r20.w, r20.y
mul r20.w, r20.w, r22.w
mad r21.x, r20.x, r20.w, r21.x
mul r3.xyzw, r0.yyyy, cb1[37].xyzw
mad r3.xyzw, r21.xxxx, cb1[36].xyzw, r3.xyzw
mad r3.xyzw, v8.zzzz, cb1[38].xyzw, r3.xyzw
add r3.xyzw, r3.xyzw, cb1[39].xyzw
div r3.xyz, r3.xyzx, r3.wwww
mul r0.zw, v2.xxxy, l(0.000000, 0.000000, 0.500000, 0.500000)
sample_indexable(texture2d)(float,float,float,float) r0.zw, r0.zwzz, t19.zwxy, s6
add r0.zw, r0.zzzw, l(0.000000, 0.000000, -0.500000, -0.500000)
mul r0.zw, r0.zzzw, l(0.000000, 0.000000, 0.300000, 0.300000)
sample_indexable(texture2d)(float,float,float,float) r4.xy, v2.xyxx, t20.xyzw, s7
add r4.xy, -r4.xyxx, l(1.000000, 1.000000, 0.000000, 0.000000)
mad r0.zw, r0.zzzw, r4.xxxy, v2.xxxy
sample_indexable(texture2d)(float,float,float,float) r4.xyz, r0.zwzz, t21.xyzw, s8
mad r4.xyz, r4.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
sample_indexable(texture2d)(float,float,float,float) r0.z, r0.zwzz, t22.yzxw, s9
add r0.w, r0.z, -v3.x
add_sat r1.w, r0.w, l(0.009000)
div r1.w, l(1.000000, 1.000000, 1.000000, 1.000000), r1.w
mul_sat r0.w, r0.w, r1.w
add r5.xyz, -r4.xyzx, l(0.000000, 0.000000, 1.000000, 0.000000)
mad r4.xyz, r0.wwww, r5.xyzx, r4.xyzx
mad r4.xyz, r4.xyzx, cb3[7].wwww, cb3[7].xyzx
dp3 r0.w, r4.xyzx, r4.xyzx
rsq r0.w, r0.w
mul r4.xyz, r0.wwww, r4.xyzx
mul r1.xyz, r1.xyzx, r4.yyyy
mad r1.xyz, r4.xxxx, v0.xyzx, r1.xyzx
mad r1.xyz, r4.zzzz, v1.xyzx, r1.xyzx
dp3 r0.w, r1.xyzx, r1.xyzx
rsq r0.w, r0.w
mul r1.xyz, r0.wwww, r1.xyzx
mad r4.xy, r0.zzzz, l(-0.0245000012, -0.000700000033, 0.000000, 0.000000), l(0.070000, 0.002000, 0.000000, 0.000000)
mul r4.xy, r4.xyxx, cb4[3].xzxx
ge r0.z, r0.z, v3.x
and r0.z, r0.z, l(0x3f800000)
mul r0.z, r0.z, v3.w
div r2.xy, r2.xyxx, r2.wwww
mad r2.xy, r2.xyxx, cb1[52].xyxx, cb1[52].wzww
sample_l_indexable(texture2d)(float,float,float,float) r0.w, r2.xyxx, t16.yzwx, s2, l(0.000000)
mul r0.w, r0.w, r0.w
mad r0.w, r0.w, cb1[51].z, -cb1[51].w
div r0.w, l(1.000000, 1.000000, 1.000000, 1.000000), r0.w
add r1.w, r0.w, l(-5.000000)
mad_sat r1.w, -r2.z, l(1.000000), r1.w
add r1.w, -r1.w, l(1.000000)
mad r0.w, -r2.z, l(1.000000), r0.w
add r0.w, r0.w, l(4.000000)
mul_sat r0.w, r0.w, l(0.200000)
mul r0.w, r0.w, r1.w
mul_sat r0.z, r0.w, r0.z
mad r0.w, cb3[8].y, l(0.180000), cb3[8].x
dp2_sat r2.x, l(0.627403915, 0.0433130674, 0.000000, 0.000000), r4.xyxx
dp2_sat r2.y, l(0.0690972880, 0.0113623161, 0.000000, 0.000000), r4.xyxx
dp2_sat r2.z, l(0.0163914394, 0.895595253, 0.000000, 0.000000), r4.xyxx
mad r2.xyz, r2.xyzx, cb3[5].wwww, cb3[5].xyzx
mad r4.xyz, cb3[6].wwww, l(0.0559999980, 0.0559999980, 0.0559999980, 0.000000), cb3[6].xyzx
max r5.y, r0.w, l(0.100000)
mul r5.zw, r3.yyyy, cb1[1].zzzw
mad r5.zw, r3.xxxx, cb1[0].zzzw, r5.zzzw
mad r5.zw, r3.zzzz, cb1[2].zzzw, r5.zzzw
add r5.zw, r5.zzzw, cb1[3].zzzw
div r0.w, r5.z, r5.w
dp3 r1.w, r3.xyzx, cb1[48].xyzx
mul r6.xy, r0.xyxx, cb3[2].zwzz
mad r1.w, -r1.w, cb3[30].w, l(1.000000)
mad r6.z, -r1.w, |r1.w|, l(1.000000)
sample_l_indexable(texture3d)(float,float,float,float) r7.xyz, r6.xyzx, t18.xyzw, s1, l(0.000000)
sample_l_indexable(texture3d)(float,float,float,float) r8.xyz, r6.xyzx, t17.xyzw, s1, l(0.000000)
mul r8.xyz, r8.xyzx, cb2[43].yyyy
mad r7.xyz, r7.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
dp3 r1.w, r7.xyzx, r1.xyzx
add r1.w, r1.w, l(1.000000)
dp3 r2.w, r7.xyzx, r7.xyzx
min r2.w, r2.w, l(1.000000)
mad r2.w, -r2.w, l(0.500000), l(1.000000)
mul r1.w, r1.w, r2.w
mul r1.w, r1.w, r1.w
mul r7.xyz, r1.wwww, r8.xyzx
mul r8.xyz, r1.xyzx, cb2[6].xyzx
mad r8.xyz, r8.xyzx, l(1.500000, 1.500000, 1.500000, 0.000000), r3.xyzx
mad r9.xy, r8.xyxx, cb2[7].xyxx, cb2[7].zwzz
mov_sat r5.zw, r9.xxxy
eq r5.zw, r5.zzzw, r9.xxxy
and r1.w, r5.w, r5.z
if_nz r1.w
  mad r9.z, r8.z, cb2[8].x, cb2[8].y
  sample_l_indexable(texture3d)(float,float,float,float) r1.w, r9.xyzx, t9.yzwx, s4, l(0.000000)
  mul r2.w, r1.w, cb2[6].w
  ge r4.w, l(1.000000), r2.w
  mad r1.w, r1.w, cb2[6].w, l(0.750000)
  movc r1.w, r4.w, r1.w, r2.w
  round_ni r1.w, r1.w
  sample_l_indexable(texture3d)(float,float,float,float) r8.xyzw, r9.xyzx, t7.xyzw, s1, r1.w
  sample_l_indexable(texture3d)(float,float,float,float) r9.xyzw, r9.xyzx, t8.xyzw, s1, r1.w
  mul r10.xyzw, r8.xyzw, r8.xyzw
  mad r11.xyzw, r8.xyzw, l(0.335721463, 0.335721463, 0.335721463, 0.335721463), l(-0.00358909299, -0.00358909299, -0.00358909299, -0.00358909299)
  mad r11.xyzw, r10.xyzw, l(2.67030215, 2.67030215, 2.67030215, 2.67030215), r11.xyzw
  mul r8.xyzw, r8.xyzw, r10.xyzw
  mad r8.xyzw, r8.xyzw, l(-2.01957369, -2.01957369, -2.01957369, -2.01957369), r11.xyzw
  mul r10.xyzw, r9.xyzw, r9.xyzw
  mad r11.xyzw, r9.xyzw, l(0.335721463, 0.335721463, 0.335721463, 0.335721463), l(-0.00358909299, -0.00358909299, -0.00358909299, -0.00358909299)
  mad r11.xyzw, r10.xyzw, l(2.67030215, 2.67030215, 2.67030215, 2.67030215), r11.xyzw
  mul r9.xyzw, r9.xyzw, r10.xyzw
  mad r9.xyzw, r9.xyzw, l(-2.01957369, -2.01957369, -2.01957369, -2.01957369), r11.xyzw
else
  mov r8.xyzw, l(0,0,0,0)
  mov r9.xyzw, l(0,0,0,0)
endif
add r8.xyzw, -r8.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
add r9.xyzw, -r9.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
mul r5.zw, r6.xxxy, l(0.000000, 0.000000, 128.000000, 64.000000)
ftou r6.xy, r5.zwzz
mov r6.zw, l(0,0,0,0)
ld_indexable(texture2d)(uint,uint,uint,uint) r1.w, r6.xyzw, t0.yzwx
dp3 r6.w, r1.xyzx, l(-1.000000, -1.000000, 1.000000, 0.000000)
dp3 r6.z, r1.yxzy, l(-1.000000, 1.000000, 1.000000, 0.000000)
dp3 r6.y, r1.xyzx, l(-1.000000, 1.000000, 1.000000, 0.000000)
dp3 r6.x, r1.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
add r2.w, -cb2[5].w, l(1.000000)
mad r8.xyzw, r8.xyzw, cb2[5].wwww, r2.wwww
mad r9.xyzw, r9.xyzw, cb2[5].wwww, r2.wwww
mad r10.xyzw, r1.xyxy, l(64.000000, 64.000000, 256.000000, 256.000000), r3.xyxy
mad r5.zw, r10.xxxy, cb2[0].xxxy, -cb2[1].xxxy
mad r11.xy, r5.zwzz, l(2.000000, 2.000000, 0.000000, 0.000000), l(-0.500000, -0.500000, 0.000000, 0.000000)
sample_l_indexable(texture2d)(float,float,float,float) r12.xyzw, r11.xyxx, t1.xyzw, s1, l(0.000000)
mad r2.w, r12.w, cb2[0].z, cb2[1].z
add r2.w, -r3.z, r2.w
mad r2.w, |r2.w|, l(0.000156249997), r12.x
add r5.zw, r12.yyyz, l(0.000000, 0.000000, -0.500000, -0.500000)
add r12.z, r2.w, -r5.z
add r12.w, r2.w, r5.z
add_sat r13.xy, -r5.wwww, r12.zwzz
add_sat r13.zw, r5.wwww, r12.zzzw
mad r5.zw, r3.xxxy, cb2[9].xxxy, cb2[9].zzzw
mad r12.zw, r3.zzzz, cb2[8].xxxz, cb2[8].yyyw
max r2.w, |r5.w|, |r5.z|
max r2.w, |r12.w|, r2.w
mad_sat r2.w, -cb2[5].x, r2.w, cb2[5].x
if_nz r1.w
  ushr r1.w, r1.w, l(8)
  mov r3.w, l(1.000000)
  mov r14.xyz, l(0,0,0,0)
  mov r5.zw, l(0,0,1.000000,1.000000)
  mov r4.w, r1.w
  loop
    breakc_z r4.w
    firstbit_lo r7.w, r4.w
    ishl r10.x, l(1), r7.w
    xor r4.w, r4.w, r10.x
    ishl r10.x, r7.w, l(1)
    bfi r10.y, l(31), l(1), r7.w, l(1)
    imul null, r12.w, r7.w, l(3)
    imad r15.xy, r7.wwww, l(3, 3, 0, 0), l(1, 2, 0, 0)
    dp4 r16.x, cb2[r12.w + 46].xyzw, r3.xyzw
    dp4 r16.y, cb2[r15.x + 46].xyzw, r3.xyzw
    dp4 r16.z, cb2[r15.y + 46].xyzw, r3.xyzw
    add r15.xyz, -|r16.xyzx|, l(1.000000, 1.000000, 1.000000, 0.000000)
    mul_sat r15.xyz, r15.xyzx, cb2[r10.x + 70].xyzx
    min r7.w, r15.z, r15.y
    min r7.w, r7.w, r15.x
    add r7.w, -r7.w, l(1.000000)
    mul r12.w, r7.w, r7.w
    add r15.xy, l(1.000000, 1.000000, 0.000000, 0.000000), -cb2[r10.y + 70].xyxx
    mad r15.xy, r12.wwww, r15.xyxx, cb2[r10.y + 70].xyxx
    min r5.zw, r5.zzzw, r15.xxxy
    mad r7.w, -r7.w, r7.w, l(1.000000)
    mul r15.xy, r7.wwww, cb2[r10.y + 70].zwzz
    max r14.xy, r14.xyxx, r15.xyxx
    mul r7.w, r7.w, cb2[r10.x + 70].w
    max r14.z, r7.w, r14.z
  endloop
else
  mov r14.xyz, l(0,0,0,0)
  mov r5.zw, l(0,0,1.000000,1.000000)
endif
mul r1.w, r2.w, r5.w
add r3.w, -r2.w, l(1.000000)
mul r3.w, r3.w, r5.z
mad r5.zw, r10.zzzw, cb2[2].xxxy, -cb2[2].zzzw
sample_l_indexable(texture2d)(float,float,float,float) r4.w, r5.zwzz, t2.yzwx, s4, l(0.000000)
mad r4.w, r4.w, cb2[3].x, cb2[4].x
add r4.w, -r3.z, r4.w
mad_sat r4.w, r4.w, l(-0.00195312500), l(1.000000)
add r4.w, r4.w, l(0.500000)
min r4.w, r4.w, l(1.000000)
mul r3.w, r3.w, r4.w
mad r8.xyzw, r8.xyzw, r1.wwww, r3.wwww
mad r9.xyzw, r9.xyzw, r1.wwww, r3.wwww
mul r10.xyzw, r6.wzyx, l(0.577350259, 0.577350259, 0.577350259, 0.577350259)
mul r15.xyzw, r10.wzyx, r10.wzyx
mul r16.xyzw, r10.xyzw, r15.wzyx
mul r17.xyzw, r15.xyzw, l(0.089800, 0.089800, 0.089800, 0.089800)
mad r16.xyzw, r16.xyzw, l(-0.015700, -0.015700, -0.015700, -0.015700), r17.wzyx
mad r16.xyzw, r6.wzyx, l(0.118991889, 0.118991889, 0.118991889, 0.118991889), r16.xyzw
add r16.xyzw, r16.xyzw, l(0.102900, 0.102900, 0.102900, 0.102900)
mul r10.xyzw, -r10.wzyx, r15.xyzw
mad r10.xyzw, r10.xyzw, l(-0.015700, -0.015700, -0.015700, -0.015700), r17.xyzw
mad r6.xyzw, r6.xyzw, l(-0.118991889, -0.118991889, -0.118991889, -0.118991889), r10.xyzw
add r6.xyzw, r6.xyzw, l(0.102900, 0.102900, 0.102900, 0.102900)
mov r11.zw, l(0,0,3.000000,2.000000)
sample_l_indexable(texture2darray)(float,float,float,float) r10.xyz, r11.xyzx, t5.xyzw, s1, l(0.000000)
sample_l_indexable(texture2darray)(float,float,float,float) r15.xyz, r11.xywx, t5.xyzw, s1, l(0.000000)
mov r11.zw, l(0,0,1.000000,0)
sample_l_indexable(texture2darray)(float,float,float,float) r17.xyz, r11.xyzx, t5.xyzw, s1, l(0.000000)
sample_l_indexable(texture2darray)(float,float,float,float) r11.xyz, r11.xywx, t5.xyzw, s1, l(0.000000)
mul r16.xyzw, r8.xyzw, r16.xyzw
mul r6.xyzw, r6.xyzw, r9.xyzw
mul r9.xyzw, r13.xyzw, r8.xyzw
mad r8.xyzw, -r8.xyzw, r13.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
mul r8.xyzw, r8.xyzw, r16.xyzw
mad r6.xyzw, r6.xyzw, r13.xyzw, r8.xyzw
mul r8.xyzw, r13.xyzw, r9.xyzw
mul r1.w, r14.x, l(0.050000)
mul r9.xyzw, r1.wwww, r6.xyzw
mad r8.xyzw, r16.xyzw, r8.xyzw, r9.xyzw
add r1.w, -r14.x, l(1.000000)
mul r9.xyzw, r1.wwww, r6.xyzw
mul r13.xyz, r8.yyyy, cb3[32].xyzx
mad r13.xyz, cb3[31].xyzx, r8.xxxx, r13.xyzx
mad r13.xyz, cb3[33].xyzx, r8.zzzz, r13.xyzx
mad r13.xyz, cb3[34].xyzx, r8.wwww, r13.xyzx
mad r10.xyz, r10.xyzx, r9.xxxx, r13.xyzx
mad r10.xyz, r15.xyzx, r9.yyyy, r10.xyzx
mad r9.xyz, r17.xyzx, r9.zzzz, r10.xyzx
mad r9.yzw, r11.xxyz, r9.wwww, r9.xxyz
add r9.x, r14.z, r9.y
dp3 r3.w, r32.xyzx, r1.xyzx
add r3.w, r3.w, r3.w
mad r10.xyz, r1.xyzx, -r3.wwww, r32.xyzx
dp3 r3.w, r10.xyzx, r10.xyzx
rsq r3.w, r3.w
mul r11.xyz, r3.wwww, r10.xyzx
add r3.w, r8.y, r8.x
add r3.w, r8.z, r3.w
add r3.w, r8.w, r3.w
mad r3.w, r6.x, r1.w, r3.w
mad r3.w, r6.y, r1.w, r3.w
mad r3.w, r6.z, r1.w, r3.w
mad r1.w, r6.w, r1.w, r3.w
mad r12.xy, r3.xyxx, cb2[7].xyxx, cb2[7].zwzz
sample_l_indexable(texture3d)(float,float,float,float) r6.xyz, r12.xyzx, t11.xyzw, s1, l(0.000000)
mad r6.xyz, r6.xyzx, l(4.000000, 4.000000, 4.000000, 0.000000), l(-2.000000, -2.000000, -2.000000, 0.000000)
mad r6.xyz, r1.xyzx, l(3.000000, 3.000000, 3.000000, 0.000000), r6.xyzx
mad r6.xyz, r6.xyzx, cb2[6].xyzx, r3.xyzx
mad r8.xy, r6.xyxx, cb2[7].xyxx, cb2[7].zwzz
mad r8.z, r6.z, cb2[8].x, cb2[8].y
sample_l_indexable(texture3d)(float,float,float,float) r6.xyz, r8.xyzx, t10.xyzw, s1, l(0.000000)
mul r2.w, r2.w, cb2[43].z
mad r6.xyz, r6.xyzx, r2.wwww, r9.xzwx
log r2.w, r5.y
mad r2.w, r2.w, l(1.200000), l(5.000000)
sample_l_indexable(texturecube)(float,float,float,float) r8.xyz, r10.xyzx, t3.xyzw, s0, r2.w
frc r3.w, r10.y
mad r3.w, r3.w, l(347834.531250), r10.x
frc r3.w, r3.w
dp3 r4.w, r11.xyzx, cb1[48].xyzx
add_sat r4.w, r4.w, r4.w
mad r1.w, r1.w, l(4096.000000), l(64.000000)
mad r9.xyz, r11.xyzx, r1.wwww, r3.xyzx
add r9.xyz, r9.xyzx, cb3[10].xyzx
mul r10.xyz, r9.yyyy, cb1[78].xywx
mad r9.xyw, r9.xxxx, cb1[77].xyxw, r10.xyxz
mad r9.xyz, r9.zzzz, cb1[79].xywx, r9.xywx
add r9.xyz, r9.xyzx, cb1[80].xywx

ld_indexable(texture2d)(float,float,float,float) r23.xyzw, l(0, 0, 0, 0), t125.xyzw
add r23.w, r9.z, -r23.y
mad r9.x, r23.x, r23.w, r9.x
div r5.zw, r9.xxxy, r9.zzzz
mad_sat r9.yz, r5.zzwz, cb3[39].xxyx, cb3[39].zzwz
mad r10.xyz, r3.wwww, l(-0.166500, -0.016500, -0.015500, 0.000000), l(0.200000, 0.035000, 0.020000, 0.000000)
lt r10.xyz, r0.wwww, r10.xyzx
and r10.xyz, r10.xyzx, l(0x3e800000, 0x3e800000, 0x3e800000, 0)
add r0.w, r10.y, r10.x
add r0.w, r10.z, r0.w
mad r9.x, r9.y, l(0.250000), r0.w
add r0.w, r2.w, r3.w
add r0.w, r0.w, l(-0.500000)
sample_l_indexable(texture2d)(float,float,float,float) r9.xyzw, r9.xzxx, t4.xyzw, s4, r0.w
mul r9.xyz, r9.xyzx, r9.xyzx
dp3 r0.w, r9.xzyx, l(-0.250000, -0.250000, -0.500000, 0.000000)
add r0.w, r0.w, l(1.000000)
rcp r0.w, r0.w
mul r0.w, r4.w, r0.w
mul r0.w, r0.w, cb2[42].z
mul r0.w, r0.w, l(4.000000)
mul r9.xyz, r0.wwww, r9.xyzx
mad r0.w, -r4.w, r9.w, l(1.000000)
mul r8.xyz, r6.xyzx, r8.xyzx
mad r8.xyz, r8.xyzx, r0.wwww, r9.xyzx
dp3 r0.w, r32.xyzx, r32.xyzx
rsq r0.w, r0.w
mul r9.xyz, r0.wwww, r32.xyzx
dp3_sat r5.x, r1.xyzx, -r9.xyzx
sample_l_indexable(texture2d)(float,float,float,float) r5.xy, r5.xyxx, t6.xyzw, s1, l(0.000000)
add r0.w, -r5.y, r5.x
mad r4.xyz, r4.xyzx, r0.wwww, r5.yyyy
mul r5.xyz, r2.xyzx, r6.xyzx
mad r4.xyz, r8.xyzx, r4.xyzx, r5.xyzx
mul r4.xyz, r4.xyzx, cb2[43].yyyy
mad r4.xyz, r2.xyzx, r7.xyzx, r4.xyzx
mad_sat r0.w, r3.z, l(0.010000), -v7.y
mul r0.w, r0.w, v7.z
mul r5.xyz, r3.yyyy, cb2[29].xyzx
mad r5.xyz, r3.xxxx, cb2[28].xyzx, r5.xyzx
mad r5.xyz, r3.zzzz, cb2[30].xyzx, r5.xyzx
add r5.xyz, r5.xyzx, cb2[31].xyzx
mov_sat r6.xy, r5.xyxx
eq r6.xy, r6.xyxx, r5.xyxx
and r1.w, r6.y, r6.x
lt r2.w, r5.z, l(1.000000)
and r1.w, r1.w, r2.w
add r6.xy, r5.xyxx, -cb2[34].xyxx
add r6.zw, r5.xxxy, -cb2[35].xxxy
max r2.w, |r6.y|, |r6.x|
max r3.w, |r6.w|, |r6.z|
mad r7.yz, r6.xxyx, cb2[34].zzzz, l(0.000000, 1.500000, 0.500000, 0.000000)
mul r4.w, cb2[34].z, cb2[34].z
mad r6.yz, r6.zzwz, r4.wwww, l(0.000000, 2.500000, 0.500000, 0.000000)
lt r2.w, r2.w, cb2[34].w
movc r8.xy, r2.wwww, r7.yzyy, r5.xyxx
lt r3.w, r3.w, cb2[35].w
movc r8.yz, r3.wwww, r6.yyzy, r8.xxyx
mul r8.x, r8.y, cb2[35].z
sample_l_indexable(texture2d)(float,float,float,float) r8.xy, r8.xzxx, t13.xyzw, s3, l(0.000000)
lt r4.w, r8.y, r5.z
and r4.w, r1.w, r4.w
not r6.x, r4.w
if_z r4.w
  ftoi r0.xy, r0.xyxx
  ge r4.w, r5.z, r8.x
  and r1.w, r1.w, r4.w
  and r1.w, r6.x, r1.w
  dp3 r8.x, r3.xyzx, cb2[18].xyzx
  dp3 r8.y, r3.xyzx, cb2[19].xyzx
  dp3 r8.z, r3.xyzx, cb2[20].xyzx
  add r4.w, |r8.z|, l(0.100000)
  max r4.w, r4.w, |r8.y|
  max r4.w, r4.w, |r8.x|
  div r9.xyz, l(1.000000, 1.000000, 1.000000, 1.000000), cb2[19].wwww
  add r8.xyz, r8.xyzx, cb2[21].xyzx
  lt r6.x, cb2[18].w, r4.w
  mad r10.xyz, r8.xyzx, r9.zzzz, cb2[22].xyzx
  mov r10.w, l(1.000000)
  mov r8.w, l(0)
  movc r8.xyzw, r6.xxxx, r10.xyzw, r8.xyzw
  movc r10.z, r6.x, cb2[19].w, l(1.000000)
  mul r6.x, cb2[18].w, cb2[19].w
  lt r6.x, r6.x, r4.w
  mov r7.x, l(1.000000)
  mad r9.xyz, r8.xyzx, r9.xyzx, cb2[23].xyzx
  mad r11.x, r8.w, r7.x, l(1.000000)
  max r7.x, |r9.y|, |r9.x|
  mad_sat r7.x, -r7.x, l(8.000000), l(7.000000)
  mad r9.w, r9.z, l(0.500000), l(0.500000)
  mul_sat r9.w, r9.w, l(32.000000)
  mul r11.y, r7.x, r9.w
  mul r11.z, r10.z, cb2[19].w
  movc r8.xyz, r6.xxxx, r9.xyzx, r8.xyzx
  mov r10.x, r8.w
  mov r10.y, l(1.000000)
  movc r9.xyz, r6.xxxx, r11.yzxy, r10.yzxy
  mad r8.xyz, r8.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), l(0.500000, 0.500000, 0.500000, 0.000000)
  mad r4.w, -r4.w, l(0.250000), l(1.000000)
  max r4.w, r4.w, l(0.000000)
  add r4.w, r4.w, l(0.250000)
  min r4.w, r4.w, l(1.000000)
  mul r6.x, r9.x, r9.y
  mul r4.w, r4.w, r6.x
  mul r10.xy, r4.wwww, l(64.000000, 4.000000, 0.000000, 0.000000)
  bfi r0.y, l(2), l(2), r0.y, l(0)
  bfi r0.x, l(2), l(0), r0.x, r0.y
  uge r0.y, r0.x, l(8)
  movc r0.y, r0.y, l(-1561935455715328.000000), l(183712671068922260000000000000000000000.000000)
  bfi r0.x, l(3), l(2), r0.x, l(0)
  ushr r0.x, r0.y, r0.x
  and r0.x, r0.x, l(15)
  and r0.y, cb3[12].y, l(15)
  xor r0.y, r0.y, l(10)
  imad r0.x, r0.y, l(3), r0.x
  and r0.x, r0.x, l(15)
  utof r0.x, r0.x
  add r0.x, r0.x, l(0.500000)
  mul r0.x, r0.x, l(0.392699093)
  sincos r0.x, r6.x, r0.x
  mov r0.y, r6.x
  mad r9.xy, r0.xyxx, cb2[20].wwww, r8.xyxx
  sample_l_indexable(texture2darray)(float,float,float,float) r9.xyzw, r9.xyzx, t15.xyzw, s1, l(0.000000)
  add r0.xy, -r8.zzzz, r9.xyxx
  mul_sat r0.xy, r10.xyxx, r0.xyxx
  mad r0.x, -r0.x, r9.z, l(1.000000)
  add r4.w, -r9.w, l(1.000000)
  add r4.w, -r0.x, r4.w
  mad r0.x, r0.y, r4.w, r0.x
  if_nz r1.w
    mov r7.w, l(1.000000)
    mov r5.w, l(0)
    movc r5.xyw, r2.wwww, r7.yzyw, r5.xyxw
    mov r6.w, l(2.000000)
    movc r6.yzw, r3.wwww, r6.yyzw, r5.xxyw
    mul r6.x, r6.y, cb2[35].z
    mov_sat r5.xy, r6.xzxx
    ne r5.xy, r5.xyxx, r6.xzxx
    or r0.y, r5.y, r5.x
    lt r1.w, l(1.000000), r5.z
    or r0.y, r0.y, r1.w
    if_nz r0.y
      mov r1.w, l(0)
    endif
    if_z r0.y
      mad r5.xy, r6.xzxx, cb2[36].xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
      frc r7.xy, r5.xyxx
      round_ni r5.xy, r5.xyxx
      add r5.xy, r5.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
      mul r5.xy, r5.xyxx, cb2[36].zwzz
      mad r0.y, r5.z, l(2048.000000), l(-1.000000)
      add r6.xy, -r7.xyxx, l(1.000000, 1.000000, 0.000000, 0.000000)
      gather4_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r8.xyzw, r5.xyxx, t12.xyzw, s1.x
      mad_sat r8.xyzw, r8.xyzw, l(2048.000000, 2048.000000, 2048.000000, 2048.000000), -r0.yyyy
      add r2.w, r8.y, r8.x
      add r2.w, r8.z, r2.w
      add r2.w, r8.w, r2.w
      gather4_aoffimmi_indexable(-2,0,0)(texture2d)(float,float,float,float) r8.xyzw, r5.xyxx, t12.xyzw, s1.x
      mad_sat r8.xyzw, r8.xyzw, l(2048.000000, 2048.000000, 2048.000000, 2048.000000), -r0.yyyy
      mad r2.w, r8.x, r6.x, r2.w
      add r2.w, r8.y, r2.w
      add r2.w, r8.z, r2.w
      mad r2.w, r8.w, r6.x, r2.w
      gather4_aoffimmi_indexable(2,0,0)(texture2d)(float,float,float,float) r8.xyzw, r5.xyxx, t12.xyzw, s1.x
      mad_sat r8.xyzw, r8.xyzw, l(2048.000000, 2048.000000, 2048.000000, 2048.000000), -r0.yyyy
      add r2.w, r2.w, r8.x
      mad r2.w, r8.y, r7.x, r2.w
      mad r2.w, r8.z, r7.x, r2.w
      add r2.w, r8.w, r2.w
      gather4_aoffimmi_indexable(0,-2,0)(texture2d)(float,float,float,float) r8.xyzw, r5.xyxx, t12.xyzw, s1.x
      mad_sat r8.xyzw, r8.xyzw, l(2048.000000, 2048.000000, 2048.000000, 2048.000000), -r0.yyyy
      add r2.w, r2.w, r8.x
      add r2.w, r8.y, r2.w
      mad r2.w, r8.z, r6.y, r2.w
      mad r2.w, r8.w, r6.y, r2.w
      gather4_aoffimmi_indexable(0,2,0)(texture2d)(float,float,float,float) r8.xyzw, r5.xyxx, t12.xyzw, s1.x
      mad_sat r8.xyzw, r8.xyzw, l(2048.000000, 2048.000000, 2048.000000, 2048.000000), -r0.yyyy
      mad r2.w, r8.x, r7.y, r2.w
      mad r2.w, r8.y, r7.y, r2.w
      add r2.w, r8.z, r2.w
      add r2.w, r8.w, r2.w
      mov r6.z, l(1.000000)
      mul r8.xyz, r6.zzyz, r6.xyxx
      gather4_aoffimmi_indexable(-2,-2,0)(texture2d)(float,float,float,float) r9.xyzw, r5.xyxx, t12.xyzw, s1.x
      mad_sat r9.xyzw, r9.xyzw, l(2048.000000, 2048.000000, 2048.000000, 2048.000000), -r0.yyyy
      mad r2.w, r9.x, r8.x, r2.w
      add r2.w, r9.y, r2.w
      mad r2.w, r9.z, r8.y, r2.w
      mad r2.w, r9.w, r8.z, r2.w
      add r7.z, -r7.y, l(1.000000)
      mul r8.xyz, r6.zyzz, r7.xxzx
      gather4_aoffimmi_indexable(2,-2,0)(texture2d)(float,float,float,float) r9.xyzw, r5.xyxx, t12.xyzw, s1.x
      mad_sat r9.xyzw, r9.xyzw, l(2048.000000, 2048.000000, 2048.000000, 2048.000000), -r0.yyyy
      add r2.w, r2.w, r9.x
      mad r2.w, r9.y, r8.x, r2.w
      mad r2.w, r9.z, r8.y, r2.w
      mad r2.w, r9.w, r8.z, r2.w
      mov r7.w, l(1.000000)
      mul r6.xyz, r6.xzxx, r7.yywy
      gather4_aoffimmi_indexable(-2,2,0)(texture2d)(float,float,float,float) r8.xyzw, r5.xyxx, t12.xyzw, s1.x
      mad_sat r8.xyzw, r8.xyzw, l(2048.000000, 2048.000000, 2048.000000, 2048.000000), -r0.yyyy
      mad r2.w, r8.x, r6.x, r2.w
      mad r2.w, r8.y, r6.y, r2.w
      add r2.w, r8.z, r2.w
      mad r2.w, r8.w, r6.z, r2.w
      mul r6.xyz, r7.yyxy, r7.wxww
      gather4_aoffimmi_indexable(2,2,0)(texture2d)(float,float,float,float) r5.xyzw, r5.xyxx, t12.xyzw, s1.x
      mad_sat r5.xyzw, r5.xyzw, l(2048.000000, 2048.000000, 2048.000000, 2048.000000), -r0.yyyy
      mad r0.y, r5.x, r6.x, r2.w
      mad r0.y, r5.y, r6.y, r0.y
      mad r0.y, r5.z, r6.z, r0.y
      add r0.y, r5.w, r0.y
      mad r2.w, -r6.w, l(0.500000), l(2.500000)
      mul r0.y, r0.y, r2.w
      mad r2.w, r2.w, l(0.500000), l(-0.500000)
      mad_sat r0.y, r0.y, l(0.0416666679), -r2.w
      mov r1.w, l(-1)
    else
      mov r0.y, l(1.000000)
    endif
  else
    mov r0.y, l(1.000000)
    mov r1.w, l(0)
  endif
  if_z r1.w
    mul r5.xyzw, r3.yyyy, cb2[25].xyzz
    mad r5.xyzw, r3.xxxx, cb2[24].xyzz, r5.xyzw
    mad r3.xyzw, r3.zzzz, cb2[26].xyzz, r5.xyzw
    add r3.xyzw, r3.xyzw, cb2[27].xyzz
    add r5.xyzw, r3.xyzw, l(-0.500000, -0.500000, -0.500000, -0.000244140625)
    max r1.w, |r5.z|, |r5.y|
    max r1.w, r1.w, |r5.x|
    mad_sat r1.w, -r1.w, l(16.000000), l(8.000000)
    sample_c_lz_indexable(texture2d)(float,float,float,float) r2.w, r3.xyxx, t14.xxxx, s5, r5.w
    add r2.w, r2.w, r2.w
    min r2.w, r2.w, l(1.000000)
    mad r2.w, r0.y, r2.w, -r0.y
    mad r0.y, r1.w, r2.w, r0.y
  endif
  mul r0.x, r0.y, r0.x
  add r0.y, -r14.y, l(1.000000)
  mul r0.x, r0.y, r0.x
else
  mov r0.x, l(0)
endif
mul r0.x, r0.w, r0.x
dp3_sat r0.y, r1.xyzx, -cb2[32].xyzx
mad r1.xyz, r2.xyzx, cb3[5].wwww, cb3[5].xyzx
mul r1.xyz, r1.xyzx, l(0.318309873, 0.318309873, 0.318309873, 0.000000)
mul r0.x, r0.x, r0.y
mul r0.xyw, r1.xyxz, r0.xxxx
mul r0.xyw, r0.xyxw, cb2[33].xyxz
mad r0.xyw, cb2[43].yyyy, r0.xyxw, r4.xyxz
dp3 r1.x, l(0.627403915, 0.329283029, 0.0433130674, 0.000000), cb4[2].xyzx
dp3 r1.y, l(0.0690972880, 0.919540405, 0.0113623161, 0.000000), cb4[2].xyzx
dp3 r1.z, l(0.0163914394, 0.0880133063, 0.895595253, 0.000000), cb4[2].xyzx
mad r0.xyw, r1.xyxz, cb2[43].yyyy, r0.xyxw
max r1.x, r0.y, r0.x
max r1.x, r0.w, r1.x
mul r1.x, r1.x, v6.w
max r1.x, r1.x, v6.w
mul r1.x, r0.z, r1.x
ge r1.x, l(0.010000), r1.x
discard_nz r1.x
mad r0.xyw, r0.xyxw, v6.wwww, v6.xyxz
mad r1.xyzw, cb2[17].xyzw, v7.xxxx, cb2[16].xyzw
dp3 r2.x, r0.xywx, l(0.300000, 0.590000, 0.110000, 0.000000)
add r0.xyw, r0.xyxw, -r2.xxxx
mad r0.xyw, r1.wwww, r0.xyxw, r2.xxxx
mul o0.xyz, r1.xyzx, r0.xywx
mov o0.w, r0.z
ret
// Approximately 0 instruction slots used
