// MANUALLY DUMPED [ShaderRegexDecals2][ShaderRegexShadowsSSR1] Water PS 4.
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.3.16 on Thu May 27 20:53:09 2021
//
//
// Note: shader requires additional functionality:
//       Early depth-stencil
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD                10   xyzw        0     NONE   float   xyz
// TEXCOORD                11   xyzw        1     NONE   float   xyzw
// COLOR                    0   xyzw        2     NONE   float   xyz
// TEXCOORD                 0   xyzw        3     NONE   float   xy
// TEXCOORD                 7   xyzw        4     NONE   float
// TEXCOORD                 8   x           5     NONE   float   x
// TEXCOORD                12    yz         5     NONE   float    yz
// SV_POSITION              0   xyzw        6      POS   float   xyz
// SV_IsFrontFace           0   x           7    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 | forceEarlyDepthStencil
dcl_constantbuffer cb0[1], immediateIndexed
dcl_constantbuffer cb1[81], immediateIndexed
dcl_constantbuffer cb2[86], dynamicIndexed
dcl_constantbuffer cb3[40], immediateIndexed
dcl_constantbuffer cb4[41], 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_default
dcl_sampler s6, mode_default
dcl_sampler s7, mode_default
dcl_sampler s8, mode_comparison
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_resource_texture2d (float,float,float,float) t23
dcl_resource_texture2d (float,float,float,float) t24
dcl_resource_texture2d (float,float,float,float) t25
dcl_resource_texture2d (float,float,float,float) t26
dcl_resource_texture2d (float,float,float,float) t27
dcl_resource_texture2d (float,float,float,float) t28
dcl_resource_texture2d (float,float,float,float) t29
dcl_resource_texture2d (float,float,float,float) t30
dcl_input_ps linear centroid v0.xyz
dcl_input_ps linear centroid v1.xyzw
dcl_input_ps linear v2.xyz
dcl_input_ps linear v3.xy
dcl_input_ps linear v5.x
dcl_input_ps linear v5.yz
dcl_input_ps_siv linear noperspective v6.xyz, position
dcl_output o0.xyzw
dcl_temps 30
dcl_resource_texture2d (float,float,float,float) t125
dcl_resource_texture1d (float,float,float,float) t120
mul r0.xy, v6.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
ld_indexable(texture2d)(float,float,float,float) r24.xyzw, l(0, 0, 0, 0), t125.xyzw
ld_indexable(texture2d)(float,float,float,float) r23.xyzw, l(2, 0, 0, 0), t125.xyzw
ld_indexable(texture1d)(float,float,float,float) r22.xyzw, l(10, 0, 0, 0), t120.xyzw
mov r25.x, r0.x
mul r26.xyzw, r0.yyyy, cb1[37].xyzw
mad r26.xyzw, r25.xxxx, cb1[36].xyzw, r26.xyzw
mad r26.xyzw, v6.zzzz, cb1[38].xyzw, r26.xyzw
add r26.xyzw, r26.xyzw, cb1[39].xyzw
mul r24.w, r23.x, l(0.5)
mul r24.w, r24.w, r22.x
mad r25.x, -r24.x, r24.w, r25.x

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

mul r24.w, r23.x, l(0.5)
mul r24.w, r24.w, r22.x
mul r24.w, r24.w, r24.y
mul r24.w, r24.w, r26.w
mad r25.x, r24.x, r24.w, r25.x
mul r2.xyzw, r0.yyyy, cb1[37].xyzw
mad r2.xyzw, r25.xxxx, cb1[36].xyzw, r2.xyzw
mad r2.xyzw, v6.zzzz, cb1[38].xyzw, r2.xyzw
add r2.xyzw, r2.xyzw, cb1[39].xyzw
div r2.xyz, r2.xyzx, r2.wwww
add r0.zw, r2.xxxy, -cb1[56].xxxy
mul r3.xyzw, cb3[11].zzzz, cb4[37].xyzw
frc r3.xyzw, r3.xyzw
mul r4.xy, v3.xyxx, l(3.000000, 3.000000, 0.000000, 0.000000)
mad r3.xy, cb4[4].xyxx, r4.xyxx, r3.xyxx
sample_indexable(texture2d)(float,float,float,float) r5.xyz, r3.xyxx, t19.xyzw, s5
mad r5.xyz, r5.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
mad r3.zw, cb4[8].xxxy, r4.xxxy, r3.zzzw
sample_indexable(texture2d)(float,float,float,float) r6.xyz, r3.zwzz, t20.xyzw, s5
mad r6.xyz, r6.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
add r6.xyz, -r5.xyzx, r6.xyzx
mad r5.xyz, r6.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), r5.xyzx
mul r6.xyzw, cb3[11].zzzz, cb4[38].xyzw
frc r6.xyzw, r6.xyzw
mad r4.zw, cb4[12].xxxy, r4.xxxy, r6.xxxy
sample_indexable(texture2d)(float,float,float,float) r7.xyz, r4.zwzz, t21.xyzw, s5
mad r7.xyz, r7.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
mad r4.xy, cb4[16].xyxx, r4.xyxx, r6.zwzz
sample_indexable(texture2d)(float,float,float,float) r4.xyz, r4.xyxx, t22.xyzw, s5
mad r4.xyz, r4.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), r7.xyzx
add r4.xyz, r4.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
mad r4.xyz, r4.xyzx, v2.yyyy, l(-0.000000, -0.000000, -1.000000, 0.000000)
mad r4.xyz, r4.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), l(0.000000, 0.000000, 1.000000, 0.000000)
dp3 r1.w, r4.xyzx, r4.xyzx
sqrt r1.w, r1.w
div r4.xyz, r4.xyzx, r1.wwww
sample_indexable(texture2d)(float,float,float,float) r6.xyzw, r3.xyxx, t23.xyzw, s0
sample_indexable(texture2d)(float,float,float,float) r7.xyzw, r3.zwzz, t24.xyzw, s4
add r1.w, -r6.w, r7.w
mad r1.w, r1.w, l(0.500000), r6.w
add r4.w, cb4[39].x, cb4[39].x
div r4.w, l(1.000000, 1.000000, 1.000000, 1.000000), r4.w
add r5.w, -v2.z, l(1.000000)
dp2 r6.w, -v2.zzzz, cb4[39].xxxx
add r5.w, r5.w, r6.w
mul r5.w, r4.w, r5.w
sample_indexable(texture2d)(float,float,float,float) r3.x, r3.xyxx, t25.xyzw, s0
sample_indexable(texture2d)(float,float,float,float) r3.y, r3.zwzz, t26.yxzw, s0
add r3.y, -r3.x, r3.y
mad r3.x, r3.y, l(0.500000), r3.x
mad_sat r3.x, r4.w, r3.x, -r5.w
add r3.x, -r3.x, l(1.000000)
add r3.x, -r3.x, l(1.000000)
mul r3.y, r1.w, r3.x
mad r1.w, -r1.w, r3.x, l(1.000000)
add r3.xzw, -r5.xxyz, r4.xxyz
mad r3.xzw, r1.wwww, r3.xxzw, r5.xxyz
add r3.xzw, r3.xxzw, l(0.000000, 0.000000, 0.000000, 1.000000)
mul r4.xy, cb3[11].zzzz, cb4[39].ywyy
frc r4.xy, r4.xyxx
div r0.zw, r0.zzzw, cb4[39].zzzz
mad r4.zw, cb4[20].xxxy, r0.zzzw, r4.xxxy
sample_indexable(texture2d)(float,float,float,float) r4.zw, r4.zwzz, t27.zwxy, s5
mad r4.zw, r4.zzzw, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, -1.000000, -1.000000)
mul r5.xy, cb3[11].zzzz, cb4[40].xyxx
frc r5.xy, r5.xyxx
mad r0.zw, cb4[24].xxxy, r0.zzzw, r5.xxxy
sample_indexable(texture2d)(float,float,float,float) r0.zw, r0.zwzz, t28.zwxy, s5
mad r0.zw, r0.zzzw, l(0.000000, 0.000000, 2.000000, 2.000000), r4.zzzw
add r0.zw, r0.zzzw, l(0.000000, 0.000000, -1.000000, -1.000000)
mul r0.zw, r0.zzzw, cb4[40].zzzz
mul r8.xy, r0.zwzz, l(0.500000, 0.500000, 0.000000, 0.000000)
mov r8.z, l(1.000000)
dp3 r0.z, r8.xyzx, r8.xyzx
sqrt r0.z, r0.z
div r8.xyz, r8.xyzx, r0.zzzz
add r8.xyz, r8.xyzx, l(-0.000000, -0.000000, -1.000000, 0.000000)
mad r8.xyz, v2.xxxx, r8.xyzx, l(1.000000, 1.000000, 2.000000, 0.000000)
mad r8.xyz, r8.xyzx, l(-1.000000, -1.000000, 1.000000, 0.000000), l(1.000000, 1.000000, -1.000000, 0.000000)
dp3 r0.z, r3.xzwx, r8.xyzx
mul r8.xyz, r3.wwww, r8.xyzx
mad r8.xyz, r3.xzwx, r0.zzzz, -r8.xyzx
mad r8.xyz, r8.xyzx, cb3[7].wwww, cb3[7].xyzx
dp3 r0.z, r8.xyzx, r8.xyzx
rsq r0.z, r0.z
mul r8.xyz, r0.zzzz, r8.xyzx
mul r1.xyz, r1.xyzx, r8.yyyy
mad r1.xyz, r8.xxxx, v0.xyzx, r1.xyzx
mad r1.xyz, r8.zzzz, v1.xyzx, r1.xyzx
dp3 r0.z, r1.xyzx, r1.xyzx
rsq r0.z, r0.z
mul r1.xyz, r0.zzzz, r1.xyzx
add r6.xyz, r6.xyzx, r6.xyzx
mad r7.xyz, r7.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), -r6.xyzx
mad r6.xyz, r7.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), r6.xyzx
add r7.xyz, -r6.xyzx, cb4[30].xyzx
mad r6.xyz, r1.wwww, r7.xyzx, r6.xyzx
mul r6.xyz, r6.xyzx, cb4[27].xyzx
mad_sat r0.z, r1.w, l(-0.275000), l(0.300000)
mad r0.z, r0.z, cb3[8].y, cb3[8].x
dp3_sat r7.x, l(0.627403915, 0.329283029, 0.0433130674, 0.000000), r6.xyzx
dp3_sat r7.y, l(0.0690972880, 0.919540405, 0.0113623161, 0.000000), r6.xyzx
dp3_sat r7.z, l(0.0163914394, 0.0880133063, 0.895595253, 0.000000), r6.xyzx
mov_sat r3.y, r3.y
mad r6.xyz, r7.xyzx, cb3[5].wwww, cb3[5].xyzx
mad r7.xyz, cb3[6].wwww, l(0.960000, 0.960000, 0.960000, 0.000000), cb3[6].xyzx
max r8.y, r0.z, l(0.100000)
mul r0.zw, r2.yyyy, cb1[1].zzzw
mad r0.zw, r2.xxxx, cb1[0].zzzw, r0.zzzw
mad r0.zw, r2.zzzz, cb1[2].zzzw, r0.zzzw
add r0.zw, r0.zzzw, cb1[3].zzzw
div r0.z, r0.z, r0.w
dp3 r0.w, r2.xyzx, cb1[48].xyzx
mul r9.xy, r0.xyxx, cb3[2].zwzz
mad r0.w, -r0.w, cb3[30].w, l(1.000000)
mad r9.z, -r0.w, |r0.w|, l(1.000000)
sample_l_indexable(texture3d)(float,float,float,float) r10.xyz, r9.xyzx, t18.xyzw, s1, l(0.000000)
sample_l_indexable(texture3d)(float,float,float,float) r11.xyz, r9.xyzx, t17.xyzw, s1, l(0.000000)
mul r11.xyz, r11.xyzx, cb2[43].yyyy
mad r10.xyz, r10.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
dp3 r0.w, r10.xyzx, r1.xyzx
add r0.w, r0.w, l(1.000000)
dp3 r1.w, r10.xyzx, r10.xyzx
min r4.z, r1.w, l(1.000000)
mad r4.z, -r4.z, l(0.500000), l(1.000000)
mul r0.w, r0.w, r4.z
mul r0.w, r0.w, r0.w
mul r11.xyz, r0.wwww, r11.xyzx
rsq r0.w, r1.w
mad_sat r1.w, r0.w, l(0.250000), l(-0.500000)
mul r1.w, r1.w, l(0.500000)
add r4.z, -r8.y, l(1.000000)
mad_sat r1.w, r1.w, r4.z, r8.y
dp3 r4.z, -r32.xyzx, -r32.xyzx
rsq r4.z, r4.z
mul r12.xyz, -r32.xyzx, r4.zzzz
mad r10.xyz, r10.xyzx, r0.wwww, r12.xyzx
dp3 r0.w, r1.xyzx, r10.xyzx
dp3 r4.w, r10.xyzx, r10.xyzx
rsq r4.w, r4.w
mul_sat r0.w, r0.w, r4.w
mul r1.w, r1.w, r1.w
mul r1.w, r1.w, r1.w
mad r4.w, r0.w, r1.w, -r0.w
mad r0.w, r4.w, r0.w, l(1.000000)
mul r0.w, r0.w, r0.w
mul r0.w, r0.w, l(3.14159274)
div r0.w, r1.w, r0.w
mul r0.w, r0.w, l(0.250000)
mad r10.xyz, r0.wwww, r7.xyzx, r6.xyzx
mul r12.xyz, r1.xyzx, cb2[6].xyzx
mad r12.xyz, r12.xyzx, l(1.500000, 1.500000, 1.500000, 0.000000), r2.xyzx
mad r13.xy, r12.xyxx, cb2[7].xyxx, cb2[7].zwzz
mov_sat r5.zw, r13.xxxy
eq r5.zw, r5.zzzw, r13.xxxy
and r0.w, r5.w, r5.z
if_nz r0.w
  mad r13.z, r12.z, cb2[8].x, cb2[8].y
  sample_l_indexable(texture3d)(float,float,float,float) r0.w, r13.xyzx, t9.yzwx, s7, l(0.000000)
  mul r1.w, r0.w, cb2[6].w
  ge r4.w, l(1.000000), r1.w
  mad r0.w, r0.w, cb2[6].w, l(0.750000)
  movc r0.w, r4.w, r0.w, r1.w
  round_ni r0.w, r0.w
  sample_l_indexable(texture3d)(float,float,float,float) r12.xyzw, r13.xyzx, t7.xyzw, s1, r0.w
  sample_l_indexable(texture3d)(float,float,float,float) r13.xyzw, r13.xyzx, t8.xyzw, s1, r0.w
  mul r14.xyzw, r12.xyzw, r12.xyzw
  mad r15.xyzw, r12.xyzw, l(0.335721463, 0.335721463, 0.335721463, 0.335721463), l(-0.00358909299, -0.00358909299, -0.00358909299, -0.00358909299)
  mad r15.xyzw, r14.xyzw, l(2.67030215, 2.67030215, 2.67030215, 2.67030215), r15.xyzw
  mul r12.xyzw, r12.xyzw, r14.xyzw
  mad r12.xyzw, r12.xyzw, l(-2.01957369, -2.01957369, -2.01957369, -2.01957369), r15.xyzw
  mul r14.xyzw, r13.xyzw, r13.xyzw
  mad r15.xyzw, r13.xyzw, l(0.335721463, 0.335721463, 0.335721463, 0.335721463), l(-0.00358909299, -0.00358909299, -0.00358909299, -0.00358909299)
  mad r15.xyzw, r14.xyzw, l(2.67030215, 2.67030215, 2.67030215, 2.67030215), r15.xyzw
  mul r13.xyzw, r13.xyzw, r14.xyzw
  mad r13.xyzw, r13.xyzw, l(-2.01957369, -2.01957369, -2.01957369, -2.01957369), r15.xyzw
else
  mov r12.xyzw, l(0,0,0,0)
  mov r13.xyzw, l(0,0,0,0)
endif
add r12.xyzw, -r12.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
add r13.xyzw, -r13.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
mul r5.zw, r9.xxxy, l(0.000000, 0.000000, 128.000000, 64.000000)
ftou r9.xy, r5.zwzz
mov r9.zw, l(0,0,0,0)
ld_indexable(texture2d)(uint,uint,uint,uint) r0.w, r9.xyzw, t0.yzwx
dp3 r9.w, r1.xyzx, l(-1.000000, -1.000000, 1.000000, 0.000000)
dp3 r9.z, r1.yxzy, l(-1.000000, 1.000000, 1.000000, 0.000000)
dp3 r9.y, r1.xyzx, l(-1.000000, 1.000000, 1.000000, 0.000000)
dp3 r9.x, r1.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
add r1.w, -cb2[5].w, l(1.000000)
mad r12.xyzw, r12.xyzw, cb2[5].wwww, r1.wwww
mad r13.xyzw, r13.xyzw, cb2[5].wwww, r1.wwww
mad r14.xyzw, r1.xyxy, l(64.000000, 64.000000, 256.000000, 256.000000), r2.xyxy
mad r5.zw, r14.xxxy, cb2[0].xxxy, -cb2[1].xxxy
mad r15.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) r16.xyzw, r15.xyxx, t1.xyzw, s1, l(0.000000)
mad r1.w, r16.w, cb2[0].z, cb2[1].z
add r1.w, -r2.z, r1.w
mad r1.w, |r1.w|, l(0.000156249997), r16.x
add r5.zw, r16.yyyz, l(0.000000, 0.000000, -0.500000, -0.500000)
add r8.z, r1.w, -r5.z
add r8.w, r1.w, r5.z
add_sat r16.xy, -r5.wwww, r8.zwzz
add_sat r16.zw, r5.wwww, r8.zzzw
mad r5.zw, r2.xxxy, cb2[9].xxxy, cb2[9].zzzw
mad r17.zw, r2.zzzz, cb2[8].xxxz, cb2[8].yyyw
max r1.w, |r5.w|, |r5.z|
max r1.w, |r17.w|, r1.w
mad_sat r1.w, -cb2[5].x, r1.w, cb2[5].x
if_nz r0.w
  ushr r0.w, r0.w, l(8)
  mov r2.w, l(1.000000)
  mov r18.xyz, l(0,0,0,0)
  mov r5.zw, l(0,0,1.000000,1.000000)
  mov r4.w, r0.w
  loop
    breakc_z r4.w
    firstbit_lo r6.w, r4.w
    ishl r7.w, l(1), r6.w
    xor r4.w, r4.w, r7.w
    ishl r7.w, r6.w, l(1)
    bfi r8.z, l(31), l(1), r6.w, l(1)
    imul null, r8.w, r6.w, l(3)
    imad r14.xy, r6.wwww, l(3, 3, 0, 0), l(1, 2, 0, 0)
    dp4 r19.x, cb2[r8.w + 46].xyzw, r2.xyzw
    dp4 r19.y, cb2[r14.x + 46].xyzw, r2.xyzw
    dp4 r19.z, cb2[r14.y + 46].xyzw, r2.xyzw
    add r19.xyz, -|r19.xyzx|, l(1.000000, 1.000000, 1.000000, 0.000000)
    mul_sat r19.xyz, r19.xyzx, cb2[r7.w + 70].xyzx
    min r6.w, r19.z, r19.y
    min r6.w, r6.w, r19.x
    add r6.w, -r6.w, l(1.000000)
    mul r8.w, r6.w, r6.w
    add r14.xy, l(1.000000, 1.000000, 0.000000, 0.000000), -cb2[r8.z + 70].xyxx
    mad r14.xy, r8.wwww, r14.xyxx, cb2[r8.z + 70].xyxx
    min r5.zw, r5.zzzw, r14.xxxy
    mad r6.w, -r6.w, r6.w, l(1.000000)
    mul r8.zw, r6.wwww, cb2[r8.z + 70].zzzw
    max r18.xy, r8.zwzz, r18.xyxx
    mul r6.w, r6.w, cb2[r7.w + 70].w
    max r18.z, r6.w, r18.z
  endloop
else
  mov r18.xyz, l(0,0,0,0)
  mov r5.zw, l(0,0,1.000000,1.000000)
endif
mul r0.w, r1.w, r5.w
add r2.w, -r1.w, l(1.000000)
mul r2.w, r2.w, r5.z
mad r5.zw, r14.zzzw, cb2[2].xxxy, -cb2[2].zzzw
sample_l_indexable(texture2d)(float,float,float,float) r4.w, r5.zwzz, t2.yzwx, s7, l(0.000000)
mad r4.w, r4.w, cb2[3].x, cb2[4].x
add r4.w, -r2.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 r2.w, r2.w, r4.w
mad r12.xyzw, r12.xyzw, r0.wwww, r2.wwww
mad r13.xyzw, r13.xyzw, r0.wwww, r2.wwww
mul r14.xyzw, r9.wzyx, l(0.577350259, 0.577350259, 0.577350259, 0.577350259)
mul r19.xyzw, r14.wzyx, r14.wzyx
mul r20.xyzw, r14.xyzw, r19.wzyx
mul r21.xyzw, r19.xyzw, l(0.089800, 0.089800, 0.089800, 0.089800)
mad r20.xyzw, r20.xyzw, l(-0.015700, -0.015700, -0.015700, -0.015700), r21.wzyx
mad r20.xyzw, r9.wzyx, l(0.118991889, 0.118991889, 0.118991889, 0.118991889), r20.xyzw
add r20.xyzw, r20.xyzw, l(0.102900, 0.102900, 0.102900, 0.102900)
mul r14.xyzw, -r14.wzyx, r19.xyzw
mad r14.xyzw, r14.xyzw, l(-0.015700, -0.015700, -0.015700, -0.015700), r21.xyzw
mad r9.xyzw, r9.xyzw, l(-0.118991889, -0.118991889, -0.118991889, -0.118991889), r14.xyzw
add r9.xyzw, r9.xyzw, l(0.102900, 0.102900, 0.102900, 0.102900)
mov r15.zw, l(0,0,3.000000,2.000000)
sample_l_indexable(texture2darray)(float,float,float,float) r14.xyz, r15.xyzx, t5.xyzw, s1, l(0.000000)
sample_l_indexable(texture2darray)(float,float,float,float) r19.xyz, r15.xywx, t5.xyzw, s1, l(0.000000)
mov r15.zw, l(0,0,1.000000,0)
sample_l_indexable(texture2darray)(float,float,float,float) r21.xyz, r15.xyzx, t5.xyzw, s1, l(0.000000)
sample_l_indexable(texture2darray)(float,float,float,float) r15.xyz, r15.xywx, t5.xyzw, s1, l(0.000000)
mul r20.xyzw, r12.xyzw, r20.xyzw
mul r9.xyzw, r9.xyzw, r13.xyzw
mul r13.xyzw, r16.xyzw, r12.xyzw
mad r12.xyzw, -r12.xyzw, r16.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
mul r12.xyzw, r12.xyzw, r20.xyzw
mad r9.xyzw, r9.xyzw, r16.xyzw, r12.xyzw
mul r12.xyzw, r16.xyzw, r13.xyzw
mul r0.w, r18.x, l(0.050000)
mul r13.xyzw, r0.wwww, r9.xyzw
mad r12.xyzw, r20.xyzw, r12.xyzw, r13.xyzw
add r0.w, -r18.x, l(1.000000)
mul r13.xyzw, r0.wwww, r9.xyzw
mul r16.xyz, r12.yyyy, cb3[32].xyzx
mad r16.xyz, cb3[31].xyzx, r12.xxxx, r16.xyzx
mad r16.xyz, cb3[33].xyzx, r12.zzzz, r16.xyzx
mad r16.xyz, cb3[34].xyzx, r12.wwww, r16.xyzx
mad r14.xyz, r14.xyzx, r13.xxxx, r16.xyzx
mad r14.xyz, r19.xyzx, r13.yyyy, r14.xyzx
mad r13.xyz, r21.xyzx, r13.zzzz, r14.xyzx
mad r13.yzw, r15.xxyz, r13.wwww, r13.xxyz
add r13.x, r18.z, r13.y
dp3 r2.w, r32.xyzx, r1.xyzx
add r2.w, r2.w, r2.w
mad r14.xyz, r1.xyzx, -r2.wwww, r32.xyzx
dp3 r2.w, r14.xyzx, r14.xyzx
rsq r2.w, r2.w
mul r15.xyz, r2.wwww, r14.xyzx
add r2.w, r12.y, r12.x
add r2.w, r12.z, r2.w
add r2.w, r12.w, r2.w
mad r4.w, r9.x, r0.w, r2.w
mad r4.w, r9.y, r0.w, r4.w
mad r4.w, r9.z, r0.w, r4.w
mad r0.w, r9.w, r0.w, r4.w
mad r17.xy, r2.xyxx, cb2[7].xyxx, cb2[7].zwzz
sample_l_indexable(texture3d)(float,float,float,float) r9.xyz, r17.xyzx, t11.xyzw, s1, l(0.000000)
mad r9.xyz, r9.xyzx, l(4.000000, 4.000000, 4.000000, 0.000000), l(-2.000000, -2.000000, -2.000000, 0.000000)
mad r9.xyz, r1.xyzx, l(3.000000, 3.000000, 3.000000, 0.000000), r9.xyzx
mad r9.xyz, r9.xyzx, cb2[6].xyzx, r2.xyzx
mad r12.xy, r9.xyxx, cb2[7].xyxx, cb2[7].zwzz
mad r12.z, r9.z, cb2[8].x, cb2[8].y
sample_l_indexable(texture3d)(float,float,float,float) r9.xyz, r12.xyzx, t10.xyzw, s1, l(0.000000)
mul r1.w, r1.w, cb2[43].z
mad r9.xyz, r9.xyzx, r1.wwww, r13.xzwx
log r1.w, r8.y
mad r1.w, r1.w, l(1.200000), l(5.000000)
sample_l_indexable(texturecube)(float,float,float,float) r12.xyz, r14.xyzx, t3.xyzw, s0, r1.w
dp3 r4.w, r15.xyzx, cb1[48].xyzx
add_sat r4.w, r4.w, r4.w
mul_sat r2.w, r2.w, l(4.000000)
mul r0.w, r0.w, r2.w
mad r0.w, r0.w, l(4096.000000), l(64.000000)
mad r13.xyz, r15.xyzx, r0.wwww, r2.xyzx
add r13.xyz, r13.xyzx, cb3[10].xyzx
mul r14.xyz, r13.yyyy, cb1[78].xywx
mad r13.xyw, r13.xxxx, cb1[77].xyxw, r14.xyxz
mad r13.xyz, r13.zzzz, cb1[79].xywx, r13.xywx
add r13.xyz, r13.xyzx, cb1[80].xywx

ld_indexable(texture2d)(float,float,float,float) r27.xyzw, l(0, 0, 0, 0), t125.xyzw
add r27.w, r13.z, -r27.y
mad r13.x, r27.x, r27.w, r13.x
div r5.zw, r13.xxxy, r13.zzzz
mad_sat r13.yz, r5.zzwz, cb3[39].xxyx, cb3[39].zzwz
add r14.xyz, -r0.zzzz, l(0.200000, 0.035000, 0.020000, 0.000000)
mul_sat r14.xyz, r14.xyzx, l(6.00600624, 60.606060, 64.516129, 0.000000)
add r0.z, r14.y, r14.x
add r0.z, r14.z, r0.z
round_ni r0.w, r0.z
mul r2.w, r0.w, l(0.250000)
mad r13.x, r13.y, l(0.250000), r2.w
sample_l_indexable(texture2d)(float,float,float,float) r14.xyzw, r13.xzxx, t4.xyzw, s3, r1.w
add r5.zw, r13.xxxz, l(0.000000, 0.000000, 0.250000, 0.000000)
sample_l_indexable(texture2d)(float,float,float,float) r13.xyzw, r5.zwzz, t4.xyzw, s3, r1.w
add r0.z, -r0.w, r0.z
add r13.xyzw, -r14.xyzw, r13.xyzw
mad r13.xyzw, r0.zzzz, r13.xyzw, r14.xyzw
mul r14.xyz, r13.xyzx, r13.xyzx
dp3 r0.z, r14.xzyx, l(-0.250000, -0.250000, -0.500000, 0.000000)
add r0.z, r0.z, l(1.000000)
rcp r0.z, r0.z
mul r0.z, r4.w, r0.z
mul r0.z, r0.z, cb2[42].z
mul r0.z, r0.z, l(4.000000)
mul r13.xyz, r0.zzzz, r14.xyzx
max r0.z, r13.w, l(0.250000)
div r0.z, l(1.000000, 1.000000, 1.000000, 1.000000), r0.z
mul r13.xyzw, r0.zzzz, r13.xyzw
mad r0.z, -r4.w, r13.w, l(1.000000)
mul r0.z, r0.z, l(0.250000)
mul r12.xyz, r9.xyzx, r12.xyzx
mad r12.xyz, r12.xyzx, r0.zzzz, r13.xyzx
dp3 r0.z, r2.xyzx, r2.xyzx
rsq r0.z, r0.z
mul r13.xyz, r0.zzzz, r2.xyzx
dp3_sat r8.x, r1.xyzx, -r13.xyzx
sample_l_indexable(texture2d)(float,float,float,float) r0.zw, r8.xyxx, t6.zwxy, s1, l(0.000000)
add r0.z, -r0.w, r0.z
mad r8.xzw, r7.xxyz, r0.zzzz, r0.wwww
mul r9.xyz, r6.xyzx, r9.xyzx
mad r8.xzw, r12.xxyz, r8.xxzw, r9.xxyz
mul r8.xzw, r8.xxzw, cb2[43].yyyy
mad r8.xzw, r10.xxyz, r11.xxyz, r8.xxzw
mad_sat r0.z, r2.z, l(0.010000), -v5.y
mul r0.z, r0.z, v5.z
mul r9.xyz, r2.yyyy, cb2[29].xyzx
mad r9.xyz, r2.xxxx, cb2[28].xyzx, r9.xyzx
mad r9.xyz, r2.zzzz, cb2[30].xyzx, r9.xyzx
add r9.xyz, r9.xyzx, cb2[31].xyzx
mov_sat r5.zw, r9.xxxy
eq r5.zw, r5.zzzw, r9.xxxy
and r0.w, r5.w, r5.z
lt r1.w, r9.z, l(1.000000)
and r0.w, r0.w, r1.w
add r5.zw, r9.xxxy, -cb2[34].xxxy
add r10.xy, r9.xyxx, -cb2[35].xyxx
max r1.w, |r5.w|, |r5.z|
max r2.w, |r10.y|, |r10.x|
mad r11.yz, r5.zzwz, cb2[34].zzzz, l(0.000000, 1.500000, 0.500000, 0.000000)
mul r4.w, cb2[34].z, cb2[34].z
mad r10.yz, r10.xxyx, r4.wwww, l(0.000000, 2.500000, 0.500000, 0.000000)
lt r1.w, r1.w, cb2[34].w
movc r5.zw, r1.wwww, r11.yyyz, r9.xxxy
lt r2.w, r2.w, cb2[35].w
movc r12.yz, r2.wwww, r10.yyzy, r5.zzwz
mul r12.x, r12.y, cb2[35].z
sample_l_indexable(texture2d)(float,float,float,float) r5.zw, r12.xzxx, t13.zwxy, s6, l(0.000000)
lt r4.w, r5.w, r9.z
and r4.w, r0.w, r4.w
not r5.w, r4.w
if_z r4.w
  ftoi r0.xy, r0.xyxx
  ge r4.w, r9.z, r5.z
  and r0.w, r0.w, r4.w
  and r0.w, r5.w, r0.w
  dp3 r12.x, r2.xyzx, cb2[18].xyzx
  dp3 r12.y, r2.xyzx, cb2[19].xyzx
  dp3 r12.z, r2.xyzx, cb2[20].xyzx
  add r4.w, |r12.z|, l(0.100000)
  max r4.w, r4.w, |r12.y|
  max r4.w, r4.w, |r12.x|
  div r13.xyz, l(1.000000, 1.000000, 1.000000, 1.000000), cb2[19].wwww
  add r12.xyz, r12.xyzx, cb2[21].xyzx
  lt r5.z, cb2[18].w, r4.w
  mad r14.xyz, r12.xyzx, r13.zzzz, cb2[22].xyzx
  mov r14.w, l(1.000000)
  mov r12.w, l(0)
  movc r12.xyzw, r5.zzzz, r14.xyzw, r12.xyzw
  movc r14.z, r5.z, cb2[19].w, l(1.000000)
  mul r5.z, cb2[18].w, cb2[19].w
  lt r5.z, r5.z, r4.w
  mov r5.w, l(1.000000)
  mad r13.xyz, r12.xyzx, r13.xyzx, cb2[23].xyzx
  mad r15.x, r12.w, r5.w, l(1.000000)
  max r5.w, |r13.y|, |r13.x|
  mad_sat r5.w, -r5.w, l(8.000000), l(7.000000)
  mad r6.w, r13.z, l(0.500000), l(0.500000)
  mul_sat r6.w, r6.w, l(32.000000)
  mul r15.y, r5.w, r6.w
  mul r15.z, r14.z, cb2[19].w
  movc r12.xyz, r5.zzzz, r13.xyzx, r12.xyzx
  mov r14.x, r12.w
  mov r14.y, l(1.000000)
  movc r13.xyz, r5.zzzz, r15.yzxy, r14.yzxy
  mad r12.xyz, r12.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 r5.z, r13.x, r13.y
  mul r4.w, r4.w, r5.z
  mul r5.zw, r4.wwww, l(0.000000, 0.000000, 64.000000, 4.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, r10.x, r0.x
  mov r0.y, r10.x
  mad r13.xy, r0.xyxx, cb2[20].wwww, r12.xyxx
  sample_l_indexable(texture2darray)(float,float,float,float) r13.xyzw, r13.xyzx, t15.xyzw, s1, l(0.000000)
  add r0.xy, -r12.zzzz, r13.xyxx
  mul_sat r0.xy, r5.zwzz, r0.xyxx
  mad r0.x, -r0.x, r13.z, l(1.000000)
  add r4.w, -r13.w, l(1.000000)
  add r4.w, -r0.x, r4.w
  mad r0.x, r0.y, r4.w, r0.x
  if_nz r0.w
    mov r11.w, l(1.000000)
    mov r9.w, l(0)
    movc r9.xyw, r1.wwww, r11.yzyw, r9.xyxw
    mov r10.w, l(2.000000)
    movc r10.yzw, r2.wwww, r10.yyzw, r9.xxyw
    mul r10.x, r10.y, cb2[35].z
    mov_sat r0.yw, r10.xxxz
    ne r0.yw, r0.yyyw, r10.xxxz
    or r0.y, r0.w, r0.y
    lt r0.w, l(1.000000), r9.z
    or r0.y, r0.w, r0.y
    if_nz r0.y
      mov r0.w, l(0)
    endif
    if_z r0.y
      mad r5.zw, r10.xxxz, cb2[36].xxxy, l(0.000000, 0.000000, 0.500000, 0.500000)
      frc r11.xy, r5.zwzz
      round_ni r5.zw, r5.zzzw
      add r5.zw, r5.zzzw, l(0.000000, 0.000000, -0.500000, -0.500000)
      mul r5.zw, r5.zzzw, cb2[36].zzzw
      mad r0.y, r9.z, l(2048.000000), l(-1.000000)
      add r9.xy, -r11.xyxx, l(1.000000, 1.000000, 0.000000, 0.000000)
      gather4_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r12.xyzw, r5.zwzz, t12.xyzw, s1.x
      mad_sat r12.xyzw, r12.xyzw, l(2048.000000, 2048.000000, 2048.000000, 2048.000000), -r0.yyyy
      add r1.w, r12.y, r12.x
      add r1.w, r12.z, r1.w
      add r1.w, r12.w, r1.w
      gather4_aoffimmi_indexable(-2,0,0)(texture2d)(float,float,float,float) r12.xyzw, r5.zwzz, t12.xyzw, s1.x
      mad_sat r12.xyzw, r12.xyzw, l(2048.000000, 2048.000000, 2048.000000, 2048.000000), -r0.yyyy
      mad r1.w, r12.x, r9.x, r1.w
      add r1.w, r12.y, r1.w
      add r1.w, r12.z, r1.w
      mad r1.w, r12.w, r9.x, r1.w
      gather4_aoffimmi_indexable(2,0,0)(texture2d)(float,float,float,float) r12.xyzw, r5.zwzz, t12.xyzw, s1.x
      mad_sat r12.xyzw, r12.xyzw, l(2048.000000, 2048.000000, 2048.000000, 2048.000000), -r0.yyyy
      add r1.w, r1.w, r12.x
      mad r1.w, r12.y, r11.x, r1.w
      mad r1.w, r12.z, r11.x, r1.w
      add r1.w, r12.w, r1.w
      gather4_aoffimmi_indexable(0,-2,0)(texture2d)(float,float,float,float) r12.xyzw, r5.zwzz, t12.xyzw, s1.x
      mad_sat r12.xyzw, r12.xyzw, l(2048.000000, 2048.000000, 2048.000000, 2048.000000), -r0.yyyy
      add r1.w, r1.w, r12.x
      add r1.w, r12.y, r1.w
      mad r1.w, r12.z, r9.y, r1.w
      mad r1.w, r12.w, r9.y, r1.w
      gather4_aoffimmi_indexable(0,2,0)(texture2d)(float,float,float,float) r12.xyzw, r5.zwzz, t12.xyzw, s1.x
      mad_sat r12.xyzw, r12.xyzw, l(2048.000000, 2048.000000, 2048.000000, 2048.000000), -r0.yyyy
      mad r1.w, r12.x, r11.y, r1.w
      mad r1.w, r12.y, r11.y, r1.w
      add r1.w, r12.z, r1.w
      add r1.w, r12.w, r1.w
      mov r9.z, l(1.000000)
      mul r10.xyz, r9.zzyz, r9.xyxx
      gather4_aoffimmi_indexable(-2,-2,0)(texture2d)(float,float,float,float) r12.xyzw, r5.zwzz, t12.xyzw, s1.x
      mad_sat r12.xyzw, r12.xyzw, l(2048.000000, 2048.000000, 2048.000000, 2048.000000), -r0.yyyy
      mad r1.w, r12.x, r10.x, r1.w
      add r1.w, r12.y, r1.w
      mad r1.w, r12.z, r10.y, r1.w
      mad r1.w, r12.w, r10.z, r1.w
      add r11.z, -r11.y, l(1.000000)
      mul r10.xyz, r9.zyzz, r11.xxzx
      gather4_aoffimmi_indexable(2,-2,0)(texture2d)(float,float,float,float) r12.xyzw, r5.zwzz, t12.xyzw, s1.x
      mad_sat r12.xyzw, r12.xyzw, l(2048.000000, 2048.000000, 2048.000000, 2048.000000), -r0.yyyy
      add r1.w, r1.w, r12.x
      mad r1.w, r12.y, r10.x, r1.w
      mad r1.w, r12.z, r10.y, r1.w
      mad r1.w, r12.w, r10.z, r1.w
      mov r11.w, l(1.000000)
      mul r9.xyz, r9.xzxx, r11.yywy
      gather4_aoffimmi_indexable(-2,2,0)(texture2d)(float,float,float,float) r12.xyzw, r5.zwzz, t12.xyzw, s1.x
      mad_sat r12.xyzw, r12.xyzw, l(2048.000000, 2048.000000, 2048.000000, 2048.000000), -r0.yyyy
      mad r1.w, r12.x, r9.x, r1.w
      mad r1.w, r12.y, r9.y, r1.w
      add r1.w, r12.z, r1.w
      mad r1.w, r12.w, r9.z, r1.w
      mul r9.xyz, r11.yyxy, r11.wxww
      gather4_aoffimmi_indexable(2,2,0)(texture2d)(float,float,float,float) r11.xyzw, r5.zwzz, t12.xyzw, s1.x
      mad_sat r11.xyzw, r11.xyzw, l(2048.000000, 2048.000000, 2048.000000, 2048.000000), -r0.yyyy
      mad r0.y, r11.x, r9.x, r1.w
      mad r0.y, r11.y, r9.y, r0.y
      mad r0.y, r11.z, r9.z, r0.y
      add r0.y, r11.w, r0.y
      mad r1.w, -r10.w, l(0.500000), l(2.500000)
      mul r0.y, r0.y, r1.w
      mad r1.w, r1.w, l(0.500000), l(-0.500000)
      mad_sat r0.y, r0.y, l(0.0416666679), -r1.w
      mov r0.w, l(-1)
    else
      mov r0.y, l(1.000000)
    endif
  else
    mov r0.yw, l(0,1.000000,0,0)
  endif
  if_z r0.w
    mul r9.xyzw, r2.yyyy, cb2[25].xyzz
    mad r9.xyzw, r2.xxxx, cb2[24].xyzz, r9.xyzw
    mad r9.xyzw, r2.zzzz, cb2[26].xyzz, r9.xyzw
    add r9.xyzw, r9.xyzw, cb2[27].xyzz
    add r10.xyzw, r9.xyzw, l(-0.500000, -0.500000, -0.500000, -0.000244140625)
    max r0.w, |r10.z|, |r10.y|
    max r0.w, r0.w, |r10.x|
    mad_sat r0.w, -r0.w, l(16.000000), l(8.000000)
    sample_c_lz_indexable(texture2d)(float,float,float,float) r1.w, r9.xyxx, t14.xxxx, s8, r10.w
    add r1.w, r1.w, r1.w
    min r1.w, r1.w, l(1.000000)
    mad r1.w, r0.y, r1.w, -r0.y
    mad r0.y, r0.w, r1.w, r0.y
  endif
  mul r0.x, r0.y, r0.x
  add r0.y, -r18.y, l(1.000000)
  mul r0.x, r0.y, r0.x
else
  mov r0.x, l(0)
endif
mul r0.x, r0.z, r0.x
dp3_sat r0.y, r1.xyzx, -cb2[32].xyzx
mad r6.xyz, r6.xyzx, cb3[5].wwww, cb3[5].xyzx
mad r7.xyz, r7.xyzx, cb3[6].wwww, cb3[6].xyzx
mad r2.xyz, -r32.xyzx, r4.zzzz, -cb2[32].xyzx
dp3 r0.z, r1.xyzx, r2.xyzx
dp3 r0.w, r2.xyzx, r2.xyzx
rsq r0.w, r0.w
mul_sat r0.z, r0.w, r0.z
mul r0.w, r8.y, r8.y
mul r0.w, r0.w, r0.w
mad r1.x, r0.z, r0.w, -r0.z
mad r0.z, r1.x, r0.z, l(1.000000)
mul r0.z, r0.z, r0.z
mul r0.z, r0.z, l(3.14159274)
div r0.z, r0.w, r0.z
mul r0.z, r0.z, l(0.250000)
mul r1.xyz, r7.xyzx, r0.zzzz
mul r0.x, r0.x, r0.y
mad r0.yzw, r6.xxyz, l(0.000000, 0.318309873, 0.318309873, 0.318309873), r1.xxyz
mul r0.xyz, r0.yzwy, r0.xxxx
mul r0.xyz, r0.xyzx, cb2[33].xyzx
mad r0.xyz, cb2[43].yyyy, r0.xyzx, r8.xzwx
dp3 r1.x, l(0.627403915, 0.329283029, 0.0433130674, 0.000000), cb4[26].xyzx
dp3 r1.y, l(0.0690972880, 0.919540405, 0.0113623161, 0.000000), cb4[26].xyzx
dp3 r1.z, l(0.0163914394, 0.0880133063, 0.895595253, 0.000000), cb4[26].xyzx
mad r0.xyz, r1.xyzx, cb2[43].yyyy, r0.xyzx

mov r30.x, v6.x

mul r28.xyzw, v6.yyyy, cb1[37].xyzw
mad r28.xyzw, v6.xxxx, cb1[36].xyzw, r28.xyzw
mad r28.xyzw, v6.zzzz, cb1[38].xyzw, r28.xyzw
add r28.xyzw, r28.xyzw, cb1[39].xyzw

mul r24.w, r23.x, l(0.5)
mul r24.w, r24.w, r22.x
mad r30.x, -r24.x, r24.w, r30.x

mul r29.xyzw, v6.yyyy, cb1[37].xyzw
mad r29.xyzw, r30.xxxx, cb1[36].xyzw, r29.xyzw
mad r29.xyzw, v6.zzzz, cb1[38].xyzw, r29.xyzw
add r29.xyzw, r29.xyzw, cb1[39].xyzw
div r29.xyz, r29.xyzx, r29.wwww

mul r24.w, r23.x, l(0.5)
mul r24.w, r24.w, r22.x
mul r24.w, r24.w, r24.y
mul r24.w, r24.w, r28.w
mad r30.x, r24.x, r24.w, r30.x

mul r1.xyzw, v6.yyyy, cb1[37].xyzw
mad r1.xyzw, r30.xxxx, cb1[36].xyzw, r1.xyzw
mad r1.xyzw, v6.zzzz, cb1[38].xyzw, r1.xyzw
add r1.xyzw, r1.xyzw, cb1[39].xyzw
div r1.xyz, r1.xyzx, r1.wwww
add r2.xy, r1.xyxx, -cb1[56].xyxx
div r2.xy, r2.xyxx, cb4[39].zzzz
mad r2.zw, cb4[20].xxxy, r2.xxxy, r4.xxxy
sample_indexable(texture2d)(float,float,float,float) r2.zw, r2.zwzz, t27.zwxy, s5
mad r2.zw, r2.zzzw, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, -1.000000, -1.000000)
mad r2.xy, cb4[24].xyxx, r2.xyxx, r5.xyxx
sample_indexable(texture2d)(float,float,float,float) r2.xy, r2.xyxx, t28.xyzw, s5
mad r2.xy, r2.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), r2.zwzz
add r2.xy, r2.xyxx, l(-1.000000, -1.000000, 0.000000, 0.000000)
mul r2.xy, r2.xyxx, cb4[40].zzzz
mul r2.xy, r2.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
mov r2.z, l(1.000000)
dp3 r0.w, r2.xyzx, r2.xyzx
sqrt r0.w, r0.w
div r2.xyz, r2.xyzx, r0.wwww
add r2.xyz, r2.xyzx, l(-0.000000, -0.000000, -1.000000, 0.000000)
mad r2.xyz, v2.xxxx, r2.xyzx, l(1.000000, 1.000000, 2.000000, 0.000000)
mad r2.xyz, r2.xyzx, l(-1.000000, -1.000000, 1.000000, 0.000000), l(1.000000, 1.000000, -1.000000, 0.000000)
dp3 r0.w, r3.xzwx, r2.xyzx
mul r2.xyz, r3.wwww, r2.xyzx
mad r2.xyz, r3.xzwx, r0.wwww, -r2.xyzx
mul r4.xyzw, r1.yyyy, cb1[1].xyzw
mad r4.xyzw, r1.xxxx, cb1[0].xyzw, r4.xyzw
mad r4.xyzw, r1.zzzz, cb1[2].xyzw, r4.xyzw
add r4.xyzw, r4.xyzw, cb1[3].xyzw

add r24.w, r4.w, -r24.y
mad r4.x, r24.x, r24.w, r4.x

div r3.xzw, r4.xxyz, r4.wwww
mad r4.zw, r3.xxxz, cb1[52].xxxy, cb1[52].wwwz
sample_l_indexable(texture2d)(float,float,float,float) r5.xyzw, r4.zwzz, t29.xyzw, s1, l(0.000000)
eq r0.w, r5.w, l(0.000000)
discard_nz r0.w
div r5.xyz, r5.xyzx, r5.wwww
mad r2.xyz, r2.xyzx, cb3[7].wwww, cb3[7].xyzx
dp3 r0.w, r1.xyzx, cb1[48].xyzx
dp3 r1.w, r1.xyzx, r1.xyzx
rsq r1.w, r1.w
mul r6.xyz, r1.wwww, r1.xyzx
sample_l_indexable(texture2d)(float,float,float,float) r2.w, r4.zwzz, t16.yzwx, s2, l(0.000000)
mul r2.w, r2.w, r2.w
mad r2.w, r2.w, cb1[51].z, -cb1[51].w
div r2.w, l(1.000000, 1.000000, 1.000000, 1.000000), r2.w
add r0.w, -r0.w, r2.w
dp3 r2.w, r6.xyzx, r2.xyzx
mad r3.x, -r2.w, r2.w, l(1.000000)
mad r3.x, -r3.x, l(0.565323055), l(1.000000)
sqrt r3.z, r3.x
mad r3.z, r2.w, l(0.751879692), r3.z
ge r3.x, r3.x, l(0.000000)
mul r7.xyzw, r6.xyzz, l(0.751879692, 0.751879692, 0.751879692, 4.000000)
mad r2.xyz, -r3.zzzz, r2.xyzx, r7.xyzx
and r2.xyz, r2.xyzx, r3.xxxx
dp3 r3.x, r6.xyzx, v1.xyzx
mad r3.z, -r3.x, r3.x, l(1.000000)
mad r3.z, -r3.z, l(0.565323055), l(1.000000)
sqrt r5.w, r3.z
mad r3.x, r3.x, l(0.751879692), r5.w
ge r3.z, r3.z, l(0.000000)
mad r6.xyz, -r3.xxxx, v1.xyzx, r7.xyzx
and r6.xyz, r3.zzzz, r6.xyzx
add r2.xyz, r2.xyzx, -r6.xyzx
mad r2.xyz, r29.xyzx, r1.wwww, r2.xyzx
max r1.w, r0.w, l(10.000000)
min r1.w, r1.w, l(150.000000)
mul r2.xyz, r1.wwww, r2.xyzx
mad r1.xyz, r2.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), r1.xyzx
mul r2.xyz, r1.yyyy, cb1[1].xywx
mad r1.xyw, r1.xxxx, cb1[0].xyxw, r2.xyxz
mad r1.xyz, r1.zzzz, cb1[2].xywx, r1.xywx
add r1.xyz, r1.xyzx, cb1[3].xywx

add r24.w, r1.z, -r24.y
mad r1.x, r24.x, r24.w, r1.x

div r1.xy, r1.xyxx, r1.zzzz
mad r4.xy, r1.xyxx, cb1[52].xyxx, cb1[52].wzww
add r1.x, cb1[52].z, -cb1[52].y
div r1.x, r4.y, r1.x
mad_sat r1.x, r1.x, l(16.000000), l(-15.000000)
add r1.yz, -r4.zzwz, r4.xxyx
frc r1.w, r7.w
mad r2.xyz, r1.wwww, l(128.000000, 128.000000, 128.000000, 0.000000), l(-64.340622, -72.465622, -64.340622, 0.000000)
mul r2.xyz, r2.xyyx, r2.xyzx
dp3 r1.w, r2.xyzx, l(20.390625, 60.703125, 2.42812085, 0.000000)
frc r1.w, r1.w
mad r1.w, r1.w, l(2.000000), l(4.000000)
div r1.w, l(1.000000, 1.000000, 1.000000, 1.000000), r1.w
sample_l_indexable(texture2d)(float,float,float,float) r6.xyzw, r4.xwxx, t29.xyzw, s1, l(0.000000)
mov r2.xy, r4.xyxx
mov r2.z, l(1.000000)
mov r3.x, l(0)
loop
  ige r3.z, r3.x, l(5)
  breakc_nz r3.z
  mad r2.xy, r1.yzyy, r2.zzzz, r4.zwzz
  sample_l_indexable(texture2d)(float,float,float,float) r3.z, r2.xyxx, t16.yzxw, s2, l(0.000000)
  mul r3.z, r3.z, r3.z
  lt r3.z, r3.w, r3.z
  and r3.z, r1.w, r3.z
  add r2.z, r2.z, -r3.z
  iadd r3.x, r3.x, l(1)
endloop
mov_sat r2.w, -r2.w
add r1.y, -r2.w, l(1.000000)
mul r1.z, r1.y, r1.y
mul r1.y, r1.y, r1.z
mad r1.y, -r1.y, l(0.975000), l(0.975000)
mul r3.x, r0.w, l(0.050000)
mad_sat r0.w, -r0.w, l(0.00390625000), l(1.000000)
add r1.z, -r1.y, l(1.000000)
mad r0.w, r0.w, r1.z, r1.y
sample_l_indexable(texture2d)(float,float,float,float) r7.xyzw, r2.xyxx, t29.xyzw, s1, l(0.000000)
mad r1.y, -r2.z, r2.z, l(1.000000)
mul r1.y, r1.y, r6.w
add r1.z, -r1.x, l(1.000000)
mad r1.x, r1.y, r1.z, r1.x
add r2.xyzw, r6.xyzw, -r7.xyzw
mad r1.xyzw, r1.xxxx, r2.xyzw, r7.xyzw
lt r2.x, l(0.500000), r1.w
div r1.xyz, r1.xyzx, r1.wwww
movc r1.xyz, r2.xxxx, r1.xyzx, r5.xyzx
sample_l_indexable(texture2d)(float,float,float,float) r2.xyzw, r4.zwzz, t30.xyzw, s1, l(0.000000)
mov_sat r3.x, r3.x
mad r0.xyz, r0.xyzx, r2.wwww, r2.xyzx
add r0.w, -r0.w, l(1.000000)
max r0.w, r0.w, r3.y
mul r0.w, r0.w, r3.x
add r0.xyz, -r1.xyzx, r0.xyzx
mad r0.xyz, r0.wwww, r0.xyzx, r1.xyzx
mad r1.xyzw, cb2[17].xyzw, v5.xxxx, cb2[16].xyzw
dp3 r0.w, r0.xyzx, l(0.300000, 0.590000, 0.110000, 0.000000)
add r0.xyz, -r0.wwww, r0.xyzx
mad r0.xyz, r1.wwww, r0.xyzx, r0.wwww
mul o0.xyz, r1.xyzx, r0.xyzx
mov o0.w, l(0)
ret
// Approximately 0 instruction slots used
