// MANUALLY DUMPED [ShaderRegex\ShaderFixes\ShaderRegEx_UE4_UNIVERSAL2_C44.ini\_09_Lights2][ShaderRegex\ShaderFixes\ShaderRegEx_UE4_UNIVERSAL2_C44.ini\_11_Lights46SPEC][ShaderRegex\ShaderFixes\ShaderRegEx_UE4_UNIVERSAL2_C44.ini\_17_3LightsAdditional3]
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.3.16 on Tue Dec 21 13:13:09 2021
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD                 0   xy          0     NONE   float   xy
// TEXCOORD                 1   xy          1     NONE   float   xy
// TEXCOORD                 5   xyzw        2     NONE   float   xyz
// TEXCOORD                 6   xyzw        3     NONE   float   xyzw
// VertexContextVector      0   xyzw        4     NONE   float      w
// SV_Position              0   xyzw        5      POS   float   xyzw
// SV_IsFrontFace           0   x           6    FFACE    uint
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
// SV_Target                5   xyzw        5   TARGET   float   xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[41], immediateIndexed
dcl_constantbuffer cb1[160], immediateIndexed
dcl_constantbuffer cb2[12], immediateIndexed
dcl_constantbuffer cb3[6], immediateIndexed
dcl_constantbuffer cb4[4], immediateIndexed
dcl_constantbuffer cb5[2728], dynamicIndexed
dcl_constantbuffer cb6[5], 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_default
dcl_sampler s9, mode_default
dcl_resource_texture3d (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_resource_texture2d (float,float,float,float) t4
dcl_resource_texture2d (float,float,float,float) t5
dcl_resource_texture2d (float,float,float,float) t6
dcl_resource_texture2d (float,float,float,float) t7
dcl_resource_texture2d (float,float,float,float) t8
dcl_resource_texture2d (float,float,float,float) t9
dcl_resource_texture3d (float,float,float,float) t10
dcl_resource_texture3d (float,float,float,float) t11
dcl_resource_texture3d (float,float,float,float) t12
dcl_resource_texture3d (float,float,float,float) t13
dcl_resource_buffer (uint,uint,uint,uint) t14
dcl_resource_buffer (uint,uint,uint,uint) t15
dcl_resource_texture2d (float,float,float,float) t16
dcl_resource_texture2d (float,float,float,float) t17
dcl_resource_texture2d (float,float,float,float) t18
dcl_resource_texturecubearray (float,float,float,float) t19
dcl_input_ps linear v0.xy
dcl_input_ps linear v1.xy
dcl_input_ps linear v2.xyz
dcl_input_ps linear v3.xyzw
dcl_input_ps linear v4.w
dcl_input_ps_siv linear noperspective centroid v5.xyzw, position
dcl_output o0.xyzw
dcl_output o5.xyzw
dcl_temps 32
dcl_resource_texture2d (float,float,float,float) t125
mul r0.xyz, v2.yzxy, v3.zxyz
mad r0.xyz, v3.yzxy, v2.zxyz, -r0.xyzx
mul r0.xyz, r0.xyzx, v3.wwww
add r0.w, v4.w, l(0.500000)
round_ni r0.w, r0.w
ftoi r0.w, r0.w
add r1.xy, v5.xyxx, -cb1[121].xyxx
mad r1.zw, r1.xxxy, cb1[122].zzzw, l(0.000000, 0.000000, -0.500000, -0.500000)
mul r2.xy, r1.zwzz, v5.wwww
mov r2.z, v5.w
mul r2.xyw, r2.xyxz, l(2.000000, -2.000000, 0.000000, 1.000000)


mul r3.xyzw, v5.yyyy, cb1[37].xyzw

mad r3.xyzw, v5.xxxx, cb1[36].xyzw, r3.xyzw
//PS
mad r3.xyzw, v5.zzzz, cb1[38].xyzw, r3.xyzw
add r3.xyzw, r3.xyzw, cb1[39].xyzw

//PS
div r3.xyz, r3.xyzx, r3.wwww

mov r27.w, r3.w
ld_indexable(texture2d)(float,float,float,float) r25.xyzw, l(0, 0, 0, 0), t125.xyzw
mov r28.x, l(36)
iadd r28.x, r28.x, l(-4)
mul r26.xyzw, r3.yyyy, cb1[1].xyzw
mad r26.xyzw, r3.xxxx, cb1[0].xyzw, r26.xyzw
mad r26.xyzw, r3.zzzz, cb1[2].xyzw, r26.xyzw
add r26.xyzw, r26.xyzw, cb1[3].xyzw
mad r26.x, -r25.x, r26.w, r26.x
mul r29.xyzw, r26.yyyy, cb1[r28.x + 1].xyzw
mad r29.xyzw, r26.xxxx, cb1[r28.x + 0].xyzw, r29.xyzw
mad r29.xyzw, r26.zzzz, cb1[r28.x + 2].xyzw, r29.xyzw
mad r29.xyzw, r26.wwww, cb1[r28.x + 3].xyzw, r29.xyzw
//mad r26.x, r25.x, r25.y, r26.x
mul r3.xyzw, r26.yyyy, cb1[r28.x + 1].xyzw
mad r3.xyzw, r26.xxxx, cb1[r28.x + 0].xyzw, r3.xyzw
mad r3.xyzw, r26.zzzz, cb1[r28.x + 2].xyzw, r3.xyzw
mad r3.xyzw, r26.wwww, cb1[r28.x + 3].xyzw, r3.xyzw
mov r3.w, r27.w
mov r29.w, r27.w
add r4.xyz, r3.xyzx, -cb1[62].xyzx

dp3 r1.z, -r29.xyzx, -r29.xyzx
rsq r1.z, r1.z

mul r5.xyz, r1.zzzz, -r29.xyzx
//ObjectFixHere - cb1
ishl r1.z, cb1[139].z, l(3)
iadd r6.z, r0.w, r1.z
ftoi r6.xy, v5.xyxx
and r6.xyz, r6.xyzx, l(63, 63, 63, 0)
mov r6.w, l(0)
ld_indexable(texture3d)(float,float,float,float) r0.w, r6.xyzw, t0.yzwx
sample_indexable(texture2d)(float,float,float,float) r6.xyz, v1.xyxx, t1.xyzw, s1
add r1.z, r6.y, cb6[4].y
frc r1.w, r1.z
sample_indexable(texture2d)(float,float,float,float) r6.yw, v1.xyxx, t2.zxwy, s2
mad r6.yw, r6.yyyw, l(0.000000, 2.000000, 0.000000, 2.000000), l(0.000000, -1.000000, 0.000000, -1.000000)
dp2 r3.w, -r6.ywyy, -r6.ywyy
rsq r3.w, r3.w
mul r6.yw, r3.wwww, -r6.yyyw
mul r7.xy, r1.wwww, r6.ywyy
mad r7.xy, r7.xyxx, r6.zzzz, v0.xyxx
sample_indexable(texture2d)(float,float,float,float) r7.xy, r7.xyxx, t3.xyzw, s3
mad r7.xy, r7.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
dp2 r3.w, r7.xyxx, r7.xyxx
add r3.w, -r3.w, l(1.000000)
max r3.w, r3.w, l(0.000000)
sqrt r7.z, r3.w
dp3 r3.w, r7.xyzx, r7.xyzx
rsq r3.w, r3.w
mul r7.xyz, r3.wwww, r7.xyzx
add r1.z, r1.z, l(0.500000)
frc r1.z, r1.z
mul r8.xy, r6.ywyy, r1.zzzz
mad r8.xy, r8.xyxx, r6.zzzz, v0.xyxx
sample_indexable(texture2d)(float,float,float,float) r8.xy, r8.xyxx, t3.xyzw, s3
mad r8.xy, r8.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
dp2 r1.z, r8.xyxx, r8.xyxx
add r1.z, -r1.z, l(1.000000)
max r1.z, r1.z, l(0.000000)
sqrt r8.z, r1.z
dp3 r1.z, r8.xyzx, r8.xyzx
rsq r1.z, r1.z
mad r1.w, r1.w, l(2.000000), l(-1.000000)
mad r3.w, |r1.w|, l(-2.000000), l(3.000000)
mul r1.w, |r1.w|, |r1.w|
mul r1.w, r1.w, r3.w
mad r8.xyz, r8.xyzx, r1.zzzz, -r7.xyzx
mad r7.xyz, r1.wwww, r8.xyzx, r7.xyzx
dp3 r1.z, r7.xyzx, r7.xyzx
rsq r1.z, r1.z
mul r8.xyz, r1.zzzz, r7.xyzx
add r1.w, -r6.x, l(1.000000)
mad r7.xyz, -r7.xyzx, r1.zzzz, l(0.000000, 0.000000, 1.000000, 0.000000)
mad r7.xyz, r1.wwww, r7.xyzx, r8.xyzx
dp3 r1.z, r7.xyzx, r7.xyzx
sqrt r1.z, r1.z
div r7.xyz, r7.xyzx, r1.zzzz
mad r7.xyz, r7.xyzx, cb1[134].wwww, cb1[134].xyzx
dp3 r1.z, r7.xyzx, r7.xyzx
rsq r1.z, r1.z
mul r7.xyz, r1.zzzz, r7.xyzx
mul r0.xyz, r0.xyzx, r7.yyyy
mad r0.xyz, r7.xxxx, v2.xyzx, r0.xyzx
mad r0.xyz, r7.zzzz, v3.xyzx, r0.xyzx
dp3 r1.z, r0.xyzx, r0.xyzx
rsq r1.z, r1.z
mul r7.xyz, r0.xyzx, r1.zzzz
sample_indexable(texture2d)(float,float,float,float) r0.xyz, l(0.500000, 0.500000, 0.000000, 0.000000), t4.xyzw, s6
mad_sat r8.xyz, r4.xyzx, cb0[10].xyzx, cb0[11].xyzx
mul r8.xyz, r8.xyzx, cb0[12].xyzx
mov_sat r0.xyz, r0.xyzx
max r9.xyz, cb6[2].xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
lt r1.z, l(0.000000), cb2[11].y
movc r1.z, r1.z, cb3[5].x, l(1.000000)
sample_l_indexable(texture3d)(float,float,float,float) r1.w, r8.xyzx, t13.yzwx, s0, l(0.000000)
mul r1.z, r1.w, r1.z
mad r1.w, r0.w, l(0.996093750), l(0.00195312500)
lt r1.z, r1.w, r1.z
and r1.z, r1.z, l(32)
and r6.xz, cb2[11].xxxx, l(2, 0, 4, 0)
movc r6.xz, r6.xxzx, l(64,0,128,0), l(0,0,0,0)
iadd r1.z, r1.z, r6.x
iadd r1.z, r6.z, r1.z
sample_indexable(texture2d)(float,float,float,float) r6.xz, l(0.500000, 0.500000, 0.000000, 0.000000), t5.xzyw, s6
mul r1.w, r6.z, l(100.000000)
sample_indexable(texture2d)(float,float,float,float) r10.xyz, v1.xyxx, t6.xyzw, s4
add r3.w, r10.y, cb6[4].y
frc r4.w, r3.w
mul r10.yw, r6.yyyw, r4.wwww
mad r10.yw, r10.yyyw, r10.zzzz, v0.xxxy
sample_indexable(texture2d)(float,float,float,float) r5.w, r10.ywyy, t7.yzwx, s5
add r3.w, r3.w, l(0.500000)
frc r3.w, r3.w
mul r6.yz, r6.yywy, r3.wwww
mad r6.yz, r6.yyzy, r10.zzzz, v0.xxyx
sample_indexable(texture2d)(float,float,float,float) r3.w, r6.yzyy, t7.yzwx, s5
mad r4.w, r4.w, l(2.000000), l(-1.000000)
mad r6.y, |r4.w|, l(-2.000000), l(3.000000)
mul r4.w, |r4.w|, |r4.w|
mul r4.w, r4.w, r6.y
add r3.w, -r5.w, r3.w
mad r3.w, r4.w, r3.w, r5.w
mul r4.w, r10.x, r3.w
deriv_rtx_coarse r6.yzw, r7.xxyz
dp3 r5.w, r6.yzwy, r6.yzwy
deriv_rty_coarse r6.yzw, r7.xxyz
dp3 r6.y, r6.yzwy, r6.yzwy
add r5.w, r5.w, r6.y
mul r5.w, r5.w, l(0.500000)
min r5.w, r5.w, l(0.180000)
mad r5.w, cb1[135].x, cb1[135].x, r5.w
min r5.w, r5.w, l(1.000000)
sqrt r6.y, r5.w
mad r10.yzw, r0.xxyz, cb1[132].wwww, cb1[132].xxyz
mad r11.xyz, cb1[133].wwww, l(0.0199999977, 0.0199999977, 0.0199999977, 0.000000), cb1[133].xyzx
mad r12.xyz, r11.xyzx, l(0.450000, 0.450000, 0.450000, 0.000000), r10.yzwy
dp3 r6.z, r7.xyzx, r5.xyzx
max r6.w, |r6.z|, l(0.000010)
mad r10.yzw, r12.xxyz, l(0.000000, 2.040400, 2.040400, 2.040400), l(0.000000, -0.332400, -0.332400, -0.332400)
mad r10.yzw, r12.xxyz, l(0.000000, -4.795100, -4.795100, -4.795100), r10.yyzw
mad r10.yzw, r12.xxyz, l(0.000000, 2.755200, 2.755200, 2.755200), r10.yyzw
add r10.yzw, r10.yyzw, l(0.000000, 1.332000, 1.332000, 1.332000)
max r10.yzw, r10.yyzw, l(0.000000, 1.000000, 1.000000, 1.000000)
and r1.z, r1.z, l(64)
movc r1.z, r1.z, cb1[130].x, l(1.000000)
ftou r1.xy, r1.xyxx
mad r8.w, v5.w, cb4[3].x, cb4[3].y
log r8.w, r8.w
mul r8.w, r8.w, cb4[3].z
iadd r9.w, cb4[1].z, l(-1)
itof r9.w, r9.w
max r8.w, r8.w, l(0.000000)
min r8.w, r9.w, r8.w
ftou r8.w, r8.w
ushr r1.xy, r1.xyxx, cb4[2].xxxx
imad r1.y, r8.w, cb4[1].y, r1.y
imad r1.x, r1.y, cb4[1].x, r1.x
mul r13.xyz, r7.xyzx, r6.zzzz
mad r13.xyz, r13.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), -r5.xyzx
dp3 r1.y, r13.xyzx, r13.xyzx
rsq r1.y, r1.y
mul r13.xyz, r1.yyyy, r13.xyzx
dp3 r1.y, v3.xyzx, r13.xyzx
add r1.y, -r1.y, |r1.y|
mad r13.xyz, r1.yyyy, v3.xyzx, r13.xyzx
dp3 r1.y, r13.xyzx, r13.xyzx
rsq r1.y, r1.y
mul r13.xyz, r1.yyyy, r13.xyzx
mad r5.xyz, r6.zzzz, r7.xyzx, -r5.xyzx
mad r1.y, -r6.z, r6.z, l(1.000000)
mad r1.y, -r1.y, l(0.562502801), l(1.000000)
sqrt r1.y, r1.y
mul r14.xyz, r1.yyyy, r7.xyzx
mad r5.xyz, r5.xyzx, l(0.750001848, 0.750001848, 0.750001848, 0.000000), -r14.xyzx
dp3 r1.y, r5.xyzx, r5.xyzx
rsq r1.y, r1.y
mul r5.xyz, r1.yyyy, r5.xyzx
min r1.y, r6.w, l(1.000000)
sample_l_indexable(texture3d)(float,float,float,float) r8.xyz, r8.xyzx, t12.xyzw, s0, l(0.000000)
mul r14.xyz, r8.xyzx, l(0.318309873, 0.318309873, 0.318309873, 0.000000)
lt r6.z, l(0.000000), cb0[13].w
if_nz r6.z
  mad r8.xyz, -r8.xyzx, l(0.318309873, 0.318309873, 0.318309873, 0.000000), cb0[13].xyzx
  mad r14.xyz, cb0[13].wwww, r8.xyzx, r14.xyzx
endif
add r8.xyz, r4.xyzx, -cb1[143].xyzx
mul r15.xyz, r8.xyzx, cb1[145].xyzx
add r16.xyz, r4.xyzx, -cb1[144].xyzx
mul r16.xyz, r16.xyzx, cb1[146].xyzx
mad r8.xyz, r8.xyzx, cb1[145].xyzx, l(-0.500000, -0.500000, -0.500000, 0.000000)
add r8.xyz, -|r8.xyzx|, l(0.500000, 0.500000, 0.500000, 0.000000)
mul_sat r8.xyz, r8.xyzx, l(6.000000, 6.000000, 6.000000, 0.000000)
mul r6.z, r8.y, r8.x
mul r6.z, r8.z, r6.z
sample_l_indexable(texture3d)(float,float,float,float) r8.xyz, r15.xyzx, t10.xyzw, s0, l(0.000000)
sample_l_indexable(texture3d)(float,float,float,float) r15.xyz, r16.xyzx, t11.xyzw, s0, l(0.000000)
min r8.xyz, r8.xyzx, l(65504.000000, 65504.000000, 65504.000000, 0.000000)
min r15.xyz, r15.xyzx, l(65504.000000, 65504.000000, 65504.000000, 0.000000)
mul r15.xyz, r15.xyzx, cb1[128].yyyy
mad r8.xyz, r8.xyzx, cb1[128].yyyy, -r15.xyzx
mad r8.xyz, r6.zzzz, r8.xyzx, r15.xyzx
mul r8.xyz, r8.xyzx, l(0.886227548, 0.886227548, 0.886227548, 0.000000)
mul r15.xy, v5.xyxx, cb1[126].zwzz
sample_l_indexable(texture2d)(float,float,float,float) r6.z, r15.xyxx, t9.yzxw, s8, l(0.000000)
mad r8.w, r6.z, cb1[57].x, cb1[57].y
mad r6.z, r6.z, cb1[57].z, -cb1[57].w
rcp r6.z, r6.z
add r6.z, r6.z, r8.w
mad r8.w, -r2.z, l(1.000000), r6.z
max r8.w, r8.w, l(0.000000)
mul r16.xyz, r5.yyyy, cb1[9].xyzx
mad r16.xyz, r5.xxxx, cb1[8].xyzx, r16.xyzx
mad r5.xyz, r5.zzzz, cb1[10].xyzx, r16.xyzx
dp3 r5.z, r5.xyzx, r5.xyzx
rsq r5.z, r5.z
mul r5.xy, r5.zzzz, r5.xyxx
mul r5.z, r8.w, l(0.050000)
min r5.z, r5.z, l(1.000000)
mul r5.xy, r5.zzzz, r5.xyxx
mul r5.xy, r5.xyxx, l(10.000000, 10.000000, 0.000000, 0.000000)
max r5.z, r2.w, l(100.000000)
mul r16.x, r5.z, cb1[28].x
mul r16.y, r5.z, cb1[29].y
rcp r15.zw, r16.xxxy
mul r15.zw, r15.zzzw, cb1[58].xxxy
mad r5.xy, r5.xyxx, r15.zwzz, r15.xyxx
mad r5.xy, r5.xyxx, cb1[126].xyxx, -cb1[121].xyxx
mul r5.xy, r5.xyxx, cb1[122].zwzz
mad r5.xy, r5.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
lt r15.zw, l(0.000000, 0.000000, 0.000000, 0.000000), -r5.xxxy
lt r16.xy, -r5.xyxx, l(0.000000, 0.000000, 0.000000, 0.000000)
iadd r15.zw, -r15.zzzw, r16.xxxy
ishl r15.zw, r15.zzzw, l(0, 0, 1, 1)
itof r15.zw, r15.zzzw
add r16.xy, |r5.xyxx|, l(-1.000000, -1.000000, 0.000000, 0.000000)
max r16.xy, r16.xyxx, l(0.000000, 0.000000, 0.000000, 0.000000)
mad r5.xy, r15.zwzz, r16.xyxx, r5.xyxx
mad r5.xy, r5.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)
mul r5.xy, r5.xyxx, cb1[122].xyxx
add r15.zw, cb1[122].xxxy, l(0.000000, 0.000000, -0.500000, -0.500000)
max r5.xy, r5.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
min r5.xy, r15.zwzz, r5.xyxx
add r5.xy, r5.xyxx, cb1[121].xyxx
mul r5.xy, r5.xyxx, cb1[126].zwzz
sample_l_indexable(texture2d)(float,float,float,float) r5.z, r5.xyxx, t9.yzxw, s8, l(0.000000)
mad r9.w, r5.z, cb1[57].x, cb1[57].y
mad r5.z, r5.z, cb1[57].z, -cb1[57].w
rcp r5.z, r5.z
add r5.z, r5.z, r9.w
ge r9.w, r5.z, r2.w
movc r5.xy, r9.wwww, r5.xyxx, r15.xyxx
movc r5.z, r9.w, r5.z, r6.z
mad r2.z, -r2.z, l(1.000000), r5.z
max r5.z, r2.z, l(0.000000)
mul_sat r2.z, r2.z, l(0.050000)
add r5.z, -r8.w, r5.z
mad r2.z, r2.z, r5.z, r8.w
sample_l_indexable(texture2d)(float,float,float,float) r5.xyz, r5.xyxx, t8.xyzw, s7, l(0.000000)
min r5.xyz, r5.xyzx, l(65504.000000, 65504.000000, 65504.000000, 0.000000)
mul r5.xyz, r5.xyzx, cb1[128].yyyy
mul_sat r6.z, r2.z, l(0.050000)
mul r8.w, r6.z, r6.z
mad r6.z, -r6.z, l(2.000000), l(3.000000)
mul r9.w, r6.z, r8.w
max r6.x, r6.x, l(0.010000)
add r11.w, -r6.x, l(1.000000)
mul r15.xyz, r0.xyzx, r11.wwww
max r1.w, r1.w, l(0.000100)
rcp r1.w, r1.w
mul r1.w, r1.w, r2.z
lt r16.xyz, r15.xyzx, l(0.000001, 0.000001, 0.000001, 0.000000)
log r15.xyz, |r15.xyzx|
mul r15.xyz, r1.wwww, r15.xyzx
exp r15.xyz, r15.xyzx
movc r15.xyz, r16.xyzx, l(0,0,0,0), r15.xyzx
mul r16.xyz, r5.xyzx, r15.xyzx
dp3 r1.w, r15.xyzx, l(0.212600, 0.715200, 0.072200, 0.000000)
add r1.w, -r1.w, l(1.000000)
max r1.w, r1.w, l(0.000000)
mul r0.xyz, r0.xyzx, r6.xxxx
mul r0.xyz, r1.wwww, r0.xyzx
mul r15.xyz, r0.xyzx, r14.xyzx
mul r15.xyz, r1.zzzz, r15.xyzx
mad r0.xyz, r8.xyzx, r0.xyzx, r15.xyzx
mad r8.xyz, r14.xyzx, r1.zzzz, r8.xyzx
mul r8.xyz, r8.xyzx, l(0.600000, 0.600000, 0.600000, 0.000000)
add r1.w, -r5.w, l(1.000000)
mad r1.w, r4.w, r1.w, r5.w
sqrt r1.w, r1.w
min r1.w, r1.w, l(1.000000)
mad r15.xyzw, r1.wwww, l(-1.000000, -0.027500, -0.572000, 0.022000), l(1.000000, 0.042500, 1.040000, -0.040000)
mul r2.z, r15.x, r15.x
mul r1.y, r1.y, l(-9.280000)
exp r1.y, r1.y
min r1.y, r1.y, r2.z
mad r1.y, r1.y, r15.x, r15.y
mad r15.xy, r1.yyyy, l(-1.040000, 1.040000, 0.000000, 0.000000), r15.zwzz
mad_sat r1.y, r15.x, l(0.020000), r15.y
add r2.z, -r1.y, l(1.000000)
mul r5.w, r2.z, r2.z
iadd r1.x, r1.x, cb4[0].w
ishl r6.x, r1.x, l(1)
ld_indexable(buffer)(uint,uint,uint,uint) r6.x, r6.xxxx, t14.xyzw
bfi r1.x, l(31), l(1), r1.x, l(1)
ld_indexable(buffer)(uint,uint,uint,uint) r1.x, r1.xxxx, t14.xyzw
mad r11.w, -r1.w, l(3.000000), l(7.000000)
mul r11.w, r1.w, r11.w
min r11.w, r11.w, l(4.000000)
mov r17.xyz, l(0,0,0,0)
mov r13.w, l(1.000000)
mov r15.xyzw, l(0,0,0,1.000000)
mov r16.w, l(0)
loop
  uge r17.w, r16.w, r6.x
  breakc_nz r17.w
  iadd r17.w, r1.x, r16.w
  ld_indexable(buffer)(uint,uint,uint,uint) r17.w, r17.wwww, t15.yzwx
  add r18.xyz, r4.xyzx, -cb5[r17.w + 0].xyzx
  dp3 r18.w, r18.xyzx, r18.xyzx
  mul r19.x, cb5[r17.w + 0].w, cb5[r17.w + 0].w
  lt r19.x, r18.w, r19.x
  if_nz r19.x
    lt r19.x, l(0.000000), cb5[r17.w + 341].z
    if_nz r19.x
      ishl r19.x, r17.w, l(2)
      mul r19.yzw, r4.yyyy, cb5[r19.x + 1024].xxyz
      mad r19.yzw, r4.xxxx, cb5[r19.x + 1023].xxyz, r19.yyzw
      mad r19.yzw, r4.zzzz, cb5[r19.x + 1025].xxyz, r19.yyzw
      add r19.yzw, r19.yyzw, cb5[r19.x + 1026].xxyz
      mul r20.x, l(0.700000), cb5[r17.w + 2387].w
      mad r20.yzw, -cb5[r17.w + 2387].wwww, l(0.000000, 0.500000, 0.500000, 0.500000), cb5[r17.w + 2387].xxyz
      mad r21.xyz, r19.yzwy, cb5[r17.w + 2387].xyzx, -r20.yzwy
      max r21.xyz, r21.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
      mad r20.yzw, r19.yyzw, cb5[r17.w + 2387].xxyz, r20.yyzw
      min r20.yzw, r20.yyzw, l(0.000000, 0.000000, 0.000000, 0.000000)
      add r20.yzw, -r20.yyzw, r21.xxyz
      add r20.y, r20.z, r20.y
      add r20.y, r20.w, r20.y
      rcp r20.x, r20.x
      mul_sat r20.x, r20.x, r20.y
      mul r20.y, r20.x, r20.x
      mad r20.x, -r20.x, l(2.000000), l(3.000000)
      mad r20.x, -r20.y, r20.x, l(1.000000)
      lt r20.y, l(0.000000), r20.x
      if_nz r20.y
        add r20.yzw, r18.xxyz, -cb5[r17.w + 682].xxyz
        mul r21.xyz, r13.yyyy, cb5[r19.x + 1024].xyzx
        mad r21.xyz, r13.xxxx, cb5[r19.x + 1023].xyzx, r21.xyzx
        mad r21.xyz, r13.zzzz, cb5[r19.x + 1025].xyzx, r21.xyzx
        rcp r21.xyz, r21.xyzx
        mad r22.xyz, r19.yzwy, r21.xyzx, r21.xyzx
        mad r19.xyz, r19.yzwy, r21.xyzx, -r21.xyzx
        min r19.xyz, r19.xyzx, r22.xyzx
        max r19.y, r19.z, r19.y
        max r19.x, r19.y, r19.x
        mad r19.xyz, -r19.xxxx, r13.xyzx, r20.yzwy
      else
        mov r19.xyz, r13.xyzx
      endif
    else
      sqrt r20.y, r18.w
      div_sat r20.y, r20.y, cb5[r17.w + 0].w
      mad r20.y, r20.y, l(2.500000), l(-1.500000)
      max r20.y, r20.y, l(0.000000)
      mul r20.z, r20.y, r20.y
      mad r20.y, -r20.y, l(2.000000), l(3.000000)
      mad r20.x, -r20.z, r20.y, l(1.000000)
      lt r20.y, l(0.000000), r20.x
      if_nz r20.y
        add r20.yzw, r18.xxyz, -cb5[r17.w + 682].xxyz
        dp3 r18.x, r13.xyzx, r18.xyzx
        mad r18.y, r18.x, r18.x, -r18.w
        mad r18.y, cb5[r17.w + 0].w, cb5[r17.w + 0].w, r18.y
        ge r18.z, r18.y, l(0.000000)
        sqrt r18.y, r18.y
        add r18.x, -r18.x, r18.y
        mad r18.xyw, r18.xxxx, r13.xyxz, r20.yzyw
        movc r19.xyz, r18.zzzz, r18.xywx, r13.xyzx
      else
        mov r19.xyz, r13.xyzx
      endif
    endif
    lt r18.x, l(0.000000), r20.x
    if_nz r18.x
      mov r19.w, cb5[r17.w + 341].y
      sample_l_indexable(texturecubearray)(float,float,float,float) r18.xyz, r19.xyzw, t19.xyzw, s9, r11.w
      mul r18.w, r20.x, cb5[r17.w + 341].x
      mul r19.x, r13.w, r18.w
      mad r18.xyz, r18.xyzx, r19.xxxx, r15.xyzx
      add r19.x, -r20.x, l(1.000000)
      mul r13.w, r13.w, r19.x
      mov r7.w, cb5[r17.w + 341].y
      sample_l_indexable(texturecubearray)(float,float,float,float) r19.yzw, r7.xyzw, t19.wxyz, s9, l(4.000000)
      mul r7.w, r15.w, r18.w
      mad r19.yzw, r19.yyzw, r7.wwww, r17.xxyz
      mul r15.w, r15.w, r19.x
      lt r7.w, r13.w, l(0.001000)
      if_nz r7.w
        mov r15.xyz, r18.xyzx
        mov r17.xyz, r19.yzwy
        break
      endif
      mov r15.xyz, r18.xyzx
      mov r17.xyz, r19.yzwy
    endif
  endif
  iadd r16.w, r16.w, l(1)
endloop
mul r7.xyz, r15.xyzx, cb1[153].xyzx
mul r17.xyz, r17.xyzx, cb1[153].xyzx
dp3 r14.w, r14.xyzx, l(0.212600, 0.715200, 0.072200, 0.000000)
dp3 r1.x, r17.xyzx, l(0.212600, 0.715200, 0.072200, 0.000000)
dp3 r6.x, r7.xyzx, l(0.212600, 0.715200, 0.072200, 0.000000)
max r17.xyzw, r14.xyzw, l(0.000010, 0.000010, 0.000010, 0.000010)
max r1.x, r1.x, l(0.000010)
div r17.xyzw, r17.xyzw, r1.xxxx
mul r18.xyz, r7.xyzx, r17.wwww
add_sat r1.x, r17.w, l(-1.000000)
mad r17.xyz, r17.xyzx, r6.xxxx, -r18.xyzx
mad r17.xyz, r1.xxxx, r17.xyzx, r18.xyzx
max r1.x, r1.w, l(0.040000)
add r6.x, r1.x, r1.x
min r6.x, r6.x, l(1.000000)
mad r15.xyz, -r15.xyzx, cb1[153].xyzx, r17.xyzx
mad r7.xyz, r6.xxxx, r15.xyzx, r7.xyzx
mul r1.x, r1.x, r1.x
mul r1.x, r1.x, r1.x
add r15.xyz, -r7.xyzx, r14.xyzx
mad r7.xyz, r1.xxxx, r15.xyzx, r7.xyzx
mad r14.xyz, r14.xyzx, l(0.009000, 0.009000, 0.009000, 0.000000), -r7.xyzx
mad r7.xyz, cb1[159].wwww, r14.xyzx, r7.xyzx
mul r14.xyz, r1.zzzz, r7.xyzx
mul r1.x, r1.w, r1.w
max r1.x, r1.x, l(0.000010)
rcp r1.x, r1.x
mul r1.x, r1.x, l(10.000000)

mul r15.xyzw, r3.yyyy, cb1[1].xyzw
mad r15.xyzw, r3.xxxx, cb1[0].xyzw, r15.xyzw

//PS
mad r15.xyzw, r3.zzzz, cb1[2].xyzw, r15.xyzw
add r15.xyzw, r15.xyzw, cb1[3].xyzw
mul r13.xyz, r2.wwww, r13.xyzx
mul r17.xyzw, r13.yyyy, cb1[1].xyzw

//PS
mad r17.xyzw, r13.xxxx, cb1[0].xyzw, r17.xyzw
mad r13.xyzw, r13.zzzz, cb1[2].xyzw, r17.xyzw

add r13.xyzw, r13.xyzw, r15.xyzw
mad r1.xzw, r1.xxxx, cb1[24].xxyw, r15.xxyw
mad r17.xy, r2.wwww, cb1[26].zwzz, r15.zwzz
ld_indexable(texture2d)(float,float,float,float) r30.xyzw, l(0, 0, 0, 0), t125.xyzw
mul r30.w, r15.w, r30.x
add r15.x, r15.x, r30.w
mul r31.y, r13.w, r30.x
add r13.x, r13.x, r31.y
div r15.xyz, r15.xyzx, r15.wwww
div r13.xyz, r13.xyzx, r13.wwww

div r1.xz, r1.xxzx, r1.wwww
div r1.w, r17.x, r17.y
add r13.xyz, -r15.xyzx, r13.xyzx
add r1.xz, -r15.xxyx, r1.xxzx
dp2 r6.x, r13.xyxx, r13.xyxx
sqrt r6.x, r6.x
mul r7.w, r6.x, l(0.500000)
mad r17.xy, r15.xyxx, r7.wwww, r13.xyxx
mad r17.xy, -r6.xxxx, l(0.500000, 0.500000, 0.000000, 0.000000), |r17.xyxx|
max r17.xy, r17.xyxx, l(0.000000, 0.000000, 0.000000, 0.000000)
add r17.xy, |r13.xyxx|, -r17.xyxx
div r17.xy, r17.xyxx, |r13.xyxx|
min r6.x, r17.y, r17.x
mul r13.xyz, r13.xyzx, r6.xxxx
div r13.xyz, r13.xyzx, r7.wwww
dp2 r1.x, r1.xzxx, r1.xzxx
dp2 r1.z, r13.xyxx, r13.xyxx
sqrt r1.xz, r1.xxzx
max r1.z, r1.z, l(0.000100)
rcp r1.z, r1.z
mul r1.x, r1.z, r1.x
min r1.x, r1.x, l(1.000000)
mad r1.x, r1.x, l(8.000000), r0.w
round_pi r1.x, r1.x
ftou r1.x, r1.x
umin r1.x, r1.x, l(8)
umax r1.x, r1.x, l(1)
mad r17.xy, r15.xyxx, l(0.500000, -0.500000, 0.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)
mul r15.xy, r17.xyxx, cb0[38].xyxx
mul r13.xy, r13.xyxx, cb0[38].xyxx
mul r13.xyw, r13.xyxz, l(0.062500, -0.062500, 0.000000, 0.125000)
add r1.z, -r1.w, r15.z
max r1.z, r1.z, |r13.z|
mul r1.w, r1.z, l(0.125000)
resinfo_indexable(texture2d)(float,float,float,float) r17.xy, l(0), t16.xyzw
add r17.zw, r17.xxxy, l(0.000000, 0.000000, -1.000000, -1.000000)
mov r18.zw, l(0,0,0,0)
mov r19.xyz, l(0,0,0,0)
mov r6.x, l(0)
mov r7.w, l(0)
mov r11.w, l(0)
loop
  uge r14.w, r11.w, r1.x
  breakc_nz r14.w
  utof r14.w, r11.w
  add r14.w, r0.w, r14.w
  mad r20.xyz, r13.xywx, r14.wwww, r15.xyzx
  mul r20.xy, r17.xyxx, r20.xyxx
  max r20.xy, r20.xyxx, l(0.000000, 0.000000, 0.000000, 0.000000)
  min r20.xy, r17.zwzz, r20.xyxx
  ftou r18.xy, r20.xyxx
  ld_indexable(texture2d)(float,float,float,float) r15.w, r18.xyzw, t16.yzwx
  add r15.w, -r15.w, r20.z
  mad r16.w, -r1.z, l(0.125000), -r15.w
  lt r16.w, |r16.w|, r1.w
  if_nz r16.w
    mad r16.w, -r13.z, l(0.125000), r15.w
    movc r16.w, r11.w, r7.w, r16.w
    add r14.w, r14.w, l(-1.000000)
    add r18.x, -r15.w, r16.w
    div_sat r16.w, r16.w, r18.x
    add r14.w, r14.w, r16.w
    mad r19.xyz, r13.xywx, |r14.wwww|, r15.xyzx
    mul r14.w, |r14.w|, l(0.125000)
    min r14.w, r14.w, l(1.000000)
    mad r6.x, -r14.w, r14.w, l(1.000000)
    break
  endif
  mov r7.w, r15.w
  iadd r11.w, r11.w, l(1)
  mov r19.xyz, l(0,0,0,0)
  mov r6.x, l(0)
endloop
lt r0.w, l(0.000000), r6.x
if_nz r0.w
  mul r1.xz, r19.xxyx, cb0[38].zzwz
  mad r1.xz, r1.xxzx, l(2.000000, 0.000000, -2.000000, 0.000000), l(-1.000000, 0.000000, 1.000000, 0.000000)
  eq r0.w, cb1[140].y, l(0.000000)
  if_nz r0.w
    mul r13.xyz, r1.zzzz, cb1[115].xywx
    mad r13.xyz, r1.xxxx, cb1[114].xywx, r13.xyzx
    mad r13.xyz, r19.zzzz, cb1[116].xywx, r13.xyzx
    add r13.xyz, r13.xyzx, cb1[117].xywx
    div r13.xy, r13.xyxx, r13.zzzz
    mad r13.zw, r13.xxxy, cb1[123].xxxy, cb1[123].wwwz
    mad r13.zw, r13.zzzw, cb1[126].xxxy, l(0.000000, 0.000000, 0.500000, 0.500000)
    ftoi r13.zw, r13.zzzw
    add r15.xy, cb1[124].xyxx, cb1[125].xyxx
    add r15.xy, r15.xyxx, l(-1.000000, -1.000000, 0.000000, 0.000000)
    ftoi r15.zw, cb1[124].xxxy
    ftoi r15.xy, r15.xyxx
    imax r13.zw, r13.zzzw, r15.zzzw
    imin r15.xy, r15.xyxx, r13.zwzz
    mov r15.zw, l(0,0,0,0)
    ld_indexable(texture2d)(float,float,float,float) r17.xyz, r15.xyww, t17.xyzw
    min r17.xyz, r17.xyzx, l(65504.000000, 65504.000000, 65504.000000, 0.000000)
    mul r7.xyz, r17.xyzx, cb0[40].yyyy
    ld_indexable(texture2d)(float,float,float,float) r15.xyz, r15.xyzw, t18.xyzw
    min r15.xyz, r15.xyzx, l(65504.000000, 65504.000000, 65504.000000, 0.000000)
    mul r15.xyz, r15.xyzx, cb0[40].yyyy
  else
    mad r13.zw, r1.xxxz, cb1[58].xxxy, cb1[58].wwwz
    sample_l_indexable(texture2d)(float,float,float,float) r17.xyz, r13.zwzz, t8.xyzw, s7, l(0.000000)
    min r17.xyz, r17.xyzx, l(65504.000000, 65504.000000, 65504.000000, 0.000000)
    mul r15.xyz, r17.xyzx, cb1[128].yyyy
    mov r13.xy, r1.xzxx
  endif
  mad r0.w, r19.z, cb1[57].x, cb1[57].y
  mad r1.w, r19.z, cb1[57].z, -cb1[57].w
  rcp r1.w, r1.w
  add r0.w, r0.w, r1.w
  mul r1.xz, r0.wwww, r1.xxzx

ld_indexable(texture2d)(float,float,float,float) r23.xyzw, l(0, 0, 0, 0), t125.xyzw
add r24.x, r0.w, -r23.y
mad r1.x, -r24.x, r23.x, r1.x
  mul r17.xyz, r1.zzzz, cb1[45].xyzx
  mad r1.xzw, r1.xxxx, cb1[44].xxyz, r17.xxyz

//PS
  mad r1.xzw, r0.wwww, cb1[46].xxyz, r1.xxzw
  add r1.xzw, r1.xxzw, cb1[47].xxyz

  add r3.xyz, -r3.xyzx, r1.xzwx
  dp3 r0.w, r3.xyzx, r3.xyzx
  sqrt r0.w, r0.w
  dp3 r1.x, r1.xzwx, r1.xzwx
  sqrt r1.x, r1.x
  max r1.x, r1.x, l(0.000100)
  rcp r1.x, r1.x
  mul r0.w, r0.w, r1.x
  min r0.w, r0.w, l(1.000000)
  add r1.xzw, r7.xxyz, -r15.xxyz
  mad r7.xyz, r0.wwww, r1.xzwx, r15.xyzx
  mov r7.w, l(1.000000)
  mul r7.xyzw, r6.xxxx, r7.xyzw
  div r1.xz, r2.xxyx, r2.wwww
  add r1.xz, -r1.xxzx, r13.xxyx
  mul r1.xz, r1.xxzx, l(0.500000, 0.000000, 0.500000, 0.000000)
  mad_sat r1.xz, |r1.xxzx|, l(5.000000, 0.000000, 5.000000, 0.000000), l(-4.000000, 0.000000, -4.000000, 0.000000)
  dp2 r0.w, r1.xzxx, r1.xzxx
  add r0.w, -r0.w, l(1.000000)
  max r0.w, r0.w, l(0.000000)
  mul r7.xyzw, r0.wwww, r7.xyzw
  mul r1.xzw, r7.xxyz, cb1[129].xxxx
  mad r0.w, -r7.w, cb1[129].x, l(1.000000)
  mad r14.xyz, r14.xyzx, r0.wwww, r1.xzwx
endif
mad r0.w, -r8.w, r6.z, l(1.000000)
mul r1.xzw, r5.wwww, r16.xxyz
mad r2.x, -r3.w, r10.x, l(1.000000)
mul r1.xzw, r1.xxzw, r2.xxxx
mul r1.xzw, r9.wwww, r1.xxzw
mad r1.xzw, r5.xxyz, r0.wwww, r1.xxzw
mul r0.xyz, r0.xyzx, r5.wwww
mul r0.xyz, r2.xxxx, r0.xyzx
mul r0.xyz, r9.wwww, r0.xyzx
mad r0.xyz, r0.xyzx, r10.yzwy, r1.xzwx
mul r1.xyz, r1.yyyy, r14.xyzx
mul r1.xyz, r2.xxxx, r1.xyzx
mul r2.xyz, r2.zzzz, r8.xyzx
mul r2.xyz, r4.wwww, r2.xyzx
mul r2.xyz, r9.wwww, r2.xyzx
mul r2.xyz, r10.yzwy, r2.xyzx
mad r1.xyz, r1.xyzx, r9.wwww, r2.xyzx
dp3 r0.w, r11.xyzx, l(0.333333343, 0.333333343, 0.333333343, 0.000000)
mad r2.xyzw, r6.yyyy, l(-1.000000, -0.027500, -0.572000, 0.022000), l(1.000000, 0.042500, 1.040000, -0.040000)
mul r1.w, r2.x, r2.x
mul r3.x, r6.w, l(-9.280000)
exp r3.x, r3.x
min r1.w, r1.w, r3.x
mad r1.w, r1.w, r2.x, r2.y
mad r2.xy, r1.wwww, l(-1.040000, 1.040000, 0.000000, 0.000000), r2.zwzz
dp3 r0.w, r0.wwww, l(0.333333343, 0.333333343, 0.333333343, 0.000000)
mul_sat r1.w, r0.w, l(50.000000)
mul r1.w, r2.y, r1.w
mad_sat r0.w, r0.w, r2.x, r1.w
add r0.w, -r0.w, l(1.000000)
mul r0.w, r0.w, r0.w
mad r1.xyz, r9.xyzx, r0.wwww, r1.xyzx
add r0.xyz, r0.xyzx, r1.xyzx
lt r1.x, l(0.000000), cb1[140].z
dp3 r12.w, r12.xyzx, l(0.212600, 0.715200, 0.072200, 0.000000)
mov r0.w, l(1.000000)
movc r0.xyzw, r1.xxxx, r12.xyzw, r0.xyzw
lt r1.x, l(0.000000), cb1[136].x
if_nz r1.x
  add r1.xyz, r4.xyzx, -cb2[8].xyzx
  add r2.xyz, cb2[9].xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
  lt r1.xyz, r2.xyzx, |r1.xyzx|
  or r1.x, r1.y, r1.x
  or r1.x, r1.z, r1.x
  dp3 r1.y, r4.xyzx, l(0.577000, 0.577000, 0.577000, 0.000000)
  mul r1.y, r1.y, l(0.002000)
  frc r1.y, r1.y
  lt r1.y, l(0.500000), r1.y
  movc r2.xyz, r1.yyyy, l(0,1.000000,1.000000,0), l(1.000000,1.000000,0,0)
  dp3 r2.w, r2.xyzx, l(0.212600, 0.715200, 0.072200, 0.000000)
  movc r0.xyzw, r1.xxxx, r2.xyzw, r0.xyzw
  mov o0.w, r0.w
else
  mov o0.w, r0.w
endif
mul o0.xyz, r0.xyzx, cb1[128].xxxx
mov o5.xyzw, l(0,0,0,0)
ret
// Approximately 0 instruction slots used
