// MANUALLY DUMPED [ShaderRegex\ShaderFixes\ShaderRegEx_UE4_UNIVERSAL2_C44.ini\_32_Objects1]
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.3.16 on Sun Nov 14 16:32:47 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
// TEXCOORD                 4   xyzw        3     NONE   float   xy
// TEXCOORD                 7   xyzw        4     NONE   float   xyzw
// 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
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[32], dynamicIndexed
dcl_constantbuffer cb1[163], immediateIndexed
dcl_constantbuffer cb2[10], immediateIndexed
dcl_constantbuffer cb3[22], immediateIndexed
dcl_constantbuffer cb4[4], immediateIndexed
dcl_constantbuffer cb5[2828], dynamicIndexed
dcl_constantbuffer cb6[13], 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_sampler s10, mode_default
dcl_sampler s11, mode_default
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t1
dcl_resource_texture2d (float,float,float,float) t2
dcl_resource_texture2d (float,float,float,float) t3
dcl_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_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_texturecube (float,float,float,float) t11
dcl_resource_texture2d (float,float,float,float) t12
dcl_resource_buffer (uint,uint,uint,uint) t13
dcl_resource_buffer (uint,uint,uint,uint) t14
dcl_resource_texturecubearray (float,float,float,float) t15
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.xy
dcl_input_ps linear v4.xyzw
dcl_input_ps_siv linear noperspective v5.xyzw, position
dcl_output o0.xyzw
dcl_temps 23
dcl_resource_texture2d (float,float,float,float) t125
mul r0.xyz, v0.zxyz, v1.xyzx
mad r0.xyz, v1.zxyz, v0.xyzx, -r0.xyzx
mul r0.xyz, r0.xyzx, v1.wwww

mul r1.xyzw, v5.yyyy, cb1[37].xyzw
mad r1.xyzw, v5.xxxx, cb1[36].xyzw, r1.xyzw
//PS
mad r1.xyzw, v5.zzzz, cb1[38].xyzw, r1.xyzw
add r1.xyzw, r1.xyzw, cb1[39].xyzw

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

mov r21.w, r1.w
ld_indexable(texture2d)(float,float,float,float) r19.xyzw, l(0, 0, 0, 0), t125.xyzw
mov r22.x, l(36)
iadd r22.x, r22.x, l(-4)
mul r20.xyzw, r1.yyyy, cb1[1].xyzw
mad r20.xyzw, r1.xxxx, cb1[0].xyzw, r20.xyzw
mad r20.xyzw, r1.zzzz, cb1[2].xyzw, r20.xyzw
add r20.xyzw, r20.xyzw, cb1[3].xyzw
add r19.w, r20.w, -r19.y
mad r20.x, r19.x, -r19.w, r20.x
mul r1.xyzw, r20.yyyy, cb1[r22.x + 1].xyzw
mad r1.xyzw, r20.xxxx, cb1[r22.x + 0].xyzw, r1.xyzw
mad r1.xyzw, r20.zzzz, cb1[r22.x + 2].xyzw, r1.xyzw
mad r1.xyzw, r20.wwww, cb1[r22.x + 3].xyzw, r1.xyzw
mov r1.w, r21.w
//ObjectFixHere - cb1
add r2.xyz, r1.xyzx, -cb1[58].xyzx
dp3 r0.w, -r1.xyzx, -r1.xyzx
rsq r0.w, r0.w
mul r1.xyz, r0.wwww, -r1.xyzx
mad r3.xy, v2.xyxx, cb6[1].xyxx, cb6[2].xyxx
mad r3.zw, r3.xxxy, cb6[3].xxxy, cb6[2].xxxy
sample_indexable(texture2d)(float,float,float,float) r3.zw, r3.zwzz, t2.zwxy, s1
mad r3.zw, r3.zzzw, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, -1.000000, -1.000000)
dp2 r0.w, r3.zwzz, r3.zwzz
add r0.w, -r0.w, l(1.000000)
max r0.w, r0.w, l(0.000000)
sqrt r0.w, r0.w
mul r0.xyz, r0.xyzx, r3.wwww
mad r0.xyz, r3.zzzz, v0.yzxy, r0.xyzx
mad r0.xyz, r0.wwww, v1.yzxy, r0.xyzx
add r0.w, -cb1[124].w, l(1.000000)
mul r4.xyz, r0.wwww, v1.yzxy
mad r0.xyz, r0.xyzx, cb1[124].wwww, r4.xyzx
dp3 r0.w, r0.xyzx, r0.xyzx
rsq r0.w, r0.w
mul r4.xyz, r0.wwww, r0.xyzx
mad r3.zw, r3.xxxy, cb6[4].xxxy, cb6[2].xxxy
sample_indexable(texture2d)(float,float,float,float) r5.xyzw, r3.zwzz, t3.xyzw, s2
add r1.w, -r5.w, l(1.000000)
div r3.z, l(1.000293), cb6[11].x
add r3.w, -r3.z, l(1.000000)
add r3.z, r3.z, l(1.000000)
mul r3.zw, r3.zzzw, r3.zzzw
div r3.z, r3.w, r3.z
add r3.w, -r3.z, l(1.000000)
dp3 r6.x, r1.yzxy, r4.xyzx
max r6.y, r6.x, l(0.000000)
add r6.z, -r6.y, l(1.000000)
mul r6.w, r6.z, r6.z
mul r6.w, r6.w, r6.w
mul r6.z, r6.w, r6.z
mad r3.z, r3.w, r6.z, r3.z
add r3.z, -r3.z, l(1.000000)
mul r7.xyz, r3.zzzz, cb6[6].xyzx
mul r3.zw, v5.xxxy, cb1[119].zzzw
dp3 r6.z, -r1.yzxy, r4.xyzx
mul r6.w, cb6[11].y, cb6[11].y
mad r7.w, -r6.z, r6.z, l(1.000000)
mad r6.w, -r6.w, r7.w, l(1.000000)
sqrt r7.w, r6.w
mad r6.z, cb6[11].y, r6.z, r7.w
ge r6.w, r6.w, l(0.000000)
mul r8.xyz, r4.zxyz, r6.zzzz
mad r8.xyz, cb6[11].yyyy, -r1.xyzx, -r8.xyzx
and r8.xyz, r6.wwww, r8.xyzx
max r6.z, cb2[9].y, cb2[9].x
max r6.z, r6.z, cb2[9].z
add r6.z, r6.z, r6.z
sample_indexable(texture2d)(float,float,float,float) r9.xyz, r3.xyxx, t4.xywz, s3
mul r6.w, r6.z, r9.z
mul r7.w, r6.x, v5.w
max r7.w, r7.w, l(0.500000)
div r6.w, r6.w, r7.w
mad r6.z, r9.z, r6.z, -r6.w
mad r6.z, r9.y, r6.z, r6.w
mad r8.xyz, r8.xyzx, r6.zzzz, r2.xyzx
add r8.xyz, r8.xyzx, cb1[58].xyzx
mul r9.yzw, r8.yyyy, cb1[1].xxyw
mad r8.xyw, r8.xxxx, cb1[0].xyxw, r9.yzyw
mad r8.xyz, r8.zzzz, cb1[2].xywx, r8.xywx
add r8.xyz, r8.xyzx, cb1[3].xywx

add r19.w, r8.z, -r19.y
mad r8.x, r19.x, -r19.w, r8.x


div r6.zw, r8.xxxy, r8.zzzz
mad r8.xy, r6.zwzz, cb1[54].xyxx, cb1[54].wzww
add r6.zw, r6.zzzw, l(0.000000, 0.000000, 1.000000, 1.000000)
mad r6.zw, r6.zzzw, l(0.000000, 0.000000, 0.500000, 0.500000), l(0.000000, 0.000000, -0.500000, -0.500000)
dp2 r7.w, r6.zwzz, r6.zwzz
sqrt r7.w, r7.w
add r6.zw, |r6.zzzw|, |r6.zzzw|
min r6.z, r6.w, r6.z
log r6.z, r6.z
mul r6.z, r6.z, l(1.675861)
exp r6.z, r6.z
mad r6.z, r6.z, l(0.199999988), l(0.500000)
div r6.z, l(1.000000, 1.000000, 1.000000, 1.000000), r6.z
mad r6.z, -r7.w, r6.z, l(1.000000)
mul_sat r6.z, r6.z, l(3.33333325)
log r6.z, r6.z
mul r6.z, r6.z, l(1.200000)
exp r6.z, r6.z
mad r8.xy, -v5.xyxx, cb1[119].zwzz, r8.xyxx
mad r3.zw, r6.zzzz, r8.xxxy, r3.zzzw
sample_indexable(texture2d)(float,float,float,float) r8.xyz, r3.zwzz, t6.xyzw, s5
mul r8.xyz, r8.xyzx, r8.xyzx
mul r8.xyz, r8.xyzx, r8.xyzx
mul r8.xyz, r7.xyzx, r8.xyzx
mul r8.xyz, r8.xyzx, cb6[11].wwww
mul r8.xyz, r1.wwww, r8.xyzx
mad r8.xyz, r8.xyzx, l(10.000000, 10.000000, 10.000000, 0.000000), r9.xxxx
add r8.xyz, r8.xyzx, cb6[7].xyzx
mul r9.xyz, r7.xyzx, cb6[11].zzzz
mad r5.xyz, -r7.xyzx, cb6[11].zzzz, r5.xyzx
mad_sat r5.xyz, r5.wwww, r5.xyzx, r9.xyzx
mad r3.xy, r3.xyxx, cb6[8].xyxx, cb6[2].xyxx
sample_indexable(texture2d)(float,float,float,float) r3.xyz, r3.xyxx, t5.xywz, s4
mov_sat r1.w, cb6[12].z
mov_sat r3.xyz, r3.xyzx
mad r3.z, r3.z, cb1[125].y, cb1[125].x
mul r3.w, r1.w, l(0.080000)
mad r7.xyz, -r1.wwww, l(0.080000, 0.080000, 0.080000, 0.000000), r5.xyzx
mad r7.xyz, r3.xxxx, r7.xyzx, r3.wwww
mad r5.xyz, -r5.xyzx, r3.xxxx, r5.xyzx
mad r5.xyz, r5.xyzx, cb1[122].wwww, cb1[122].xyzx
mad r7.xyz, r7.xyzx, cb1[123].wwww, cb1[123].xyzx
mul r3.xw, v3.xxxy, l(1.000000, 0.000000, 0.000000, 0.500000)
mad r6.zw, v3.xxxy, l(0.000000, 0.000000, 1.000000, 0.500000), l(0.000000, 0.000000, 0.000000, 0.500000)
sample_indexable(texture2d)(float,float,float,float) r9.xyzw, r3.xwxx, t0.xyzw, s0
sample_indexable(texture2d)(float,float,float,float) r10.xyzw, r6.zwzz, t0.xyzw, s0
mad r1.w, r10.w, l(0.00392156886), r9.w
add r1.w, r1.w, l(-0.00196078443)
mad r1.w, r1.w, cb3[18].w, cb3[20].w
mul r9.xyz, r9.xyzx, r9.xyzx
mad r9.xyz, r9.xyzx, cb3[18].xyzx, cb3[20].xyzx
exp r1.w, r1.w
add r1.w, r1.w, l(-0.0185813606)
mad r10.xyzw, r10.xyzw, cb3[19].xyzw, cb3[21].xyzw
mov r4.w, l(1.000000)
dp4 r3.x, r10.xyzw, r4.xyzw
max r3.x, r3.x, l(0.000000)
mul r1.w, r1.w, r3.x
mul r9.xyz, r9.xyzx, r1.wwww
lt r1.w, l(0.000000), cb1[150].y
if_nz r1.w
  sample_indexable(texture2d)(float,float,float,float) r10.xyzw, v3.xyxx, t1.xyzw, s0
  mad r10.xyz, r10.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
  mul r11.x, r10.w, r10.w
  dp3 r1.w, r10.xyzx, r10.xyzx
  rsq r1.w, r1.w
  mul r10.xyz, r1.wwww, r10.xyzx
  mad r1.w, -r10.w, r10.w, l(1.000000)
  mad r1.w, -r1.w, r1.w, l(1.000000)
  mad r0.xyz, r0.zxyz, r0.wwww, -r10.xyzx
  mad r0.xyz, r1.wwww, r0.xyzx, r10.xyzx
  dp3_sat r3.x, r10.yzxy, r4.xyzx
  add r3.w, -r3.x, l(1.000000)
  mad r11.y, r1.w, r3.w, r3.x
else
  mov r0.xyz, r4.zxyz
  mov r11.xy, l(1.000000,1.000000,0,0)
endif
mov r0.w, l(1.000000)
dp4 r10.x, cb1[153].xyzw, r0.xyzw
dp4 r10.y, cb1[154].xyzw, r0.xyzw
dp4 r10.z, cb1[155].xyzw, r0.xyzw
mul r12.xyzw, r0.yzzx, r0.xyzz
dp4 r13.x, cb1[156].xyzw, r12.xyzw
dp4 r13.y, cb1[157].xyzw, r12.xyzw
dp4 r13.z, cb1[158].xyzw, r12.xyzw
mul r0.y, r0.y, r0.y
mad r0.x, r0.x, r0.x, -r0.y
add r0.yzw, r10.xxyz, r13.xxyz
mad r0.xyz, cb1[159].xyzx, r0.xxxx, r0.yzwy
max r0.xyz, r0.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
mul r0.xyz, r0.xyzx, cb1[152].xyzx
mul r0.w, r11.y, r11.x
mul r0.xyz, r0.wwww, r0.xyzx
mad r0.xyz, r9.xyzx, cb1[142].xyzx, r0.xyzx
dp3 r0.w, r0.xyzx, l(0.300000, 0.590000, 0.110000, 0.000000)
mul r0.xyz, r5.xyzx, r0.xyzx
add r3.xw, v5.xxxy, -cb1[117].xxxy
ftou r3.xw, r3.xxxw
mad r1.w, v5.w, cb4[3].x, cb4[3].y
log r1.w, r1.w
mul r1.w, r1.w, cb4[3].z
max r1.w, r1.w, l(0.000000)
ftou r1.w, r1.w
iadd r4.w, cb4[1].z, l(-1)
umin r1.w, r1.w, r4.w
ushr r3.xw, r3.xxxw, cb4[2].xxxx
imad r1.w, r1.w, cb4[1].y, r3.w
imad r1.w, r1.w, cb4[1].x, r3.x
add r3.x, r6.x, r6.x
mad r9.yzw, r3.xxxx, r4.zzxy, -r1.xxyz
min r1.x, r6.y, l(1.000000)
iadd r1.y, r1.w, cb4[0].w
ishl r1.z, r1.y, l(1)
ld_indexable(buffer)(uint,uint,uint,uint) r1.z, r1.zzzz, t13.yzxw
bfi r1.y, l(31), l(1), r1.y, l(1)
ld_indexable(buffer)(uint,uint,uint,uint) r1.y, r1.yyyy, t13.yxzw
log r1.w, r3.z
mad r1.w, -r1.w, l(1.200000), l(1.000000)
add r3.x, cb1[160].z, l(-1.000000)
add r3.x, -r1.w, r3.x
mov r9.x, l(0)
mov r3.w, l(1.000000)
mov r4.w, l(0)
mov r5.w, l(1.000000)
mov r6.xyzw, l(0,0,0,0)
loop
  uge r7.w, r6.w, r1.z
  breakc_nz r7.w
  lt r7.w, r3.w, l(0.001000)
  if_nz r7.w
    break
  endif
  iadd r7.w, r1.y, r6.w
  ld_indexable(buffer)(uint,uint,uint,uint) r7.w, r7.wwww, t14.yzwx
  add r10.xyz, r2.xyzx, -cb5[r7.w + 0].xyzx
  dp3 r8.w, r10.xyzx, r10.xyzx
  sqrt r10.w, r8.w
  lt r11.x, r10.w, cb5[r7.w + 0].w
  if_nz r11.x
    lt r11.x, l(3.000000), cb5[r7.w + 341].z
    if_nz r11.x
      ishl r11.x, r7.w, l(2)
      mul r11.yzw, r2.yyyy, cb5[r11.x + 1024].xxyz
      mad r11.yzw, r2.xxxx, cb5[r11.x + 1023].xxyz, r11.yyzw
      mad r11.yzw, r2.zzzz, cb5[r11.x + 1025].xxyz, r11.yyzw
      add r11.yzw, r11.yyzw, cb5[r11.x + 1026].xxyz
      mul r12.xyz, r9.zzzz, cb5[r11.x + 1024].xyzx
      mad r12.xyz, r9.yyyy, cb5[r11.x + 1023].xyzx, r12.xyzx
      mad r12.xyz, r9.wwww, cb5[r11.x + 1025].xyzx, r12.xyzx
      add r13.xyz, -r11.yzwy, cb5[r7.w + 2387].xyzx
      div r13.xyz, r13.xyzx, r12.xyzx
      add r11.xyz, -r11.yzwy, -cb5[r7.w + 2387].xyzx
      div r11.xyz, r11.xyzx, r12.xyzx
      ge r12.xyz, r12.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
      and r12.xyz, r12.xyzx, l(0x3f800000, 0x3f800000, 0x3f800000, 0)
      add r14.xyz, -r11.xyzx, r13.xyzx
      mad r14.xyz, r12.xyzx, r14.xyzx, r11.xyzx
      min r14.xyz, r14.xyzx, l(1000000.000000, 1000000.000000, 1000000.000000, 0.000000)
      add r11.xyz, -r13.xyzx, r11.xyzx
      mad r11.xyz, r12.xyzx, r11.xyzx, r13.xyzx
      max r11.xyz, r11.xyzx, l(-1000000.000000, -1000000.000000, -1000000.000000, 0.000000)
      min r11.w, r14.z, r14.y
      min r11.w, r11.w, r14.x
      max r11.y, r11.z, r11.y
      max r11.x, r11.y, r11.x
      add r11.x, -r11.x, r11.w
      mul_sat r11.xy, r11.xwxx, l(0.002000, 0.002000, 0.000000, 0.000000)
      mul r11.x, r11.y, r11.x
      max r11.y, r11.w, l(0.000000)
      mad r11.yzw, r9.yyzw, r11.yyyy, r2.xxyz
      add r12.xyz, r11.yzwy, -cb5[r7.w + 0].xyzx
      add r11.y, -r10.w, cb5[r7.w + 0].w
      mul_sat r11.y, r11.y, l(0.002000)
      mul r11.x, r11.y, r11.x
    else
      lt r13.x, l(2.000000), cb5[r7.w + 341].z
      if_nz r13.x
        ftou r13.xy, cb5[r7.w + 2387].xyxx
        mov r13.zw, l(0,0,100000.000000,-100000.000000)
        mov r14.x, r13.x
        loop
          uge r14.y, r14.x, r13.y
          breakc_nz r14.y
          dp3 r14.y, cb5[r14.x + 2728].xyzx, r9.yzwy
          dp3 r14.z, cb5[r14.x + 2728].xyzx, r2.xyzx
          add r14.z, r14.z, -cb5[r14.x + 2728].w
          div r14.z, -r14.z, r14.y
          lt r14.y, l(0.000000), r14.y
          min r15.x, r13.z, r14.z
          max r16.y, r13.w, r14.z
          mov r15.y, r13.w
          mov r16.x, r13.z
          movc r13.zw, r14.yyyy, r15.xxxy, r16.xxxy
          iadd r14.x, r14.x, l(1)
        endloop
        add r13.x, -r13.w, r13.z
        mul_sat r13.xy, r13.xzxx, l(0.002000, 0.002000, 0.000000, 0.000000)
        mul r13.x, r13.y, r13.x
        add r13.y, -r10.w, cb5[r7.w + 0].w
        mul_sat r13.y, r13.y, l(0.002000)
        mul r11.x, r13.y, r13.x
        max r13.x, r13.z, l(0.000000)
        mad r14.xyz, r9.yzwy, r13.xxxx, r2.xyzx
        add r12.xyz, r14.xyzx, -cb5[r7.w + 0].xyzx
      else
        lt r13.x, l(0.000000), cb5[r7.w + 341].z
        if_nz r13.x
          ishl r13.x, r7.w, l(2)
          mul r14.xyz, r2.yyyy, cb5[r13.x + 1024].xyzx
          mad r14.xyz, r2.xxxx, cb5[r13.x + 1023].xyzx, r14.xyzx
          mad r14.xyz, r2.zzzz, cb5[r13.x + 1025].xyzx, r14.xyzx
          add r14.xyz, r14.xyzx, cb5[r13.x + 1026].xyzx
          mul r15.xyz, r9.zzzz, cb5[r13.x + 1024].xyzx
          mad r15.xyz, r9.yyyy, cb5[r13.x + 1023].xyzx, r15.xyzx
          mad r15.xyz, r9.wwww, cb5[r13.x + 1025].xyzx, r15.xyzx
          rcp r15.xyz, r15.xyzx
          mad r16.xyz, -r14.xyzx, r15.xyzx, -r15.xyzx
          mad r15.xyz, -r14.xyzx, r15.xyzx, r15.xyzx
          max r15.xyz, r15.xyzx, r16.xyzx
          min r13.x, r15.z, r15.y
          min r13.x, r13.x, r15.x
          mad r15.xyz, r13.xxxx, r9.yzwy, r2.xyzx
          add r16.xyz, cb5[r7.w + 0].xyzx, cb5[r7.w + 682].xyzx
          add r12.xyz, r15.xyzx, -r16.xyzx
          mul r13.x, l(0.700000), cb5[r7.w + 2387].w
          mad r15.xyz, -cb5[r7.w + 2387].wwww, l(0.500000, 0.500000, 0.500000, 0.000000), cb5[r7.w + 2387].xyzx
          mul r16.xyz, r14.xyzx, cb5[r7.w + 2387].xyzx
          lt r17.xyz, r16.xyzx, -r15.xyzx
          mad r18.xyz, r14.xyzx, cb5[r7.w + 2387].xyzx, r15.xyzx
          mov r18.xyz, |r18.xyzx|
          and r17.xyz, r17.xyzx, r18.xyzx
          lt r16.xyz, r15.xyzx, r16.xyzx
          mad r14.xyz, r14.xyzx, cb5[r7.w + 2387].xyzx, -r15.xyzx
          mov r14.xyz, |r14.xyzx|
          and r14.xyz, r14.xyzx, r16.xyzx
          dp3 r13.y, r17.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
          dp3 r14.x, r14.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
          add r13.y, r13.y, r14.x
          div r13.x, l(1.000000, 1.000000, 1.000000, 1.000000), r13.x
          mul_sat r13.x, r13.x, r13.y
          mad r13.y, r13.x, l(-2.000000), l(3.000000)
          mul r13.x, r13.x, r13.x
          mad r11.x, -r13.y, r13.x, l(1.000000)
        else
          div_sat r10.w, r10.w, cb5[r7.w + 0].w
          dp3 r13.x, r9.yzwy, r10.xyzx
          mad r8.w, -cb5[r7.w + 0].w, cb5[r7.w + 0].w, r8.w
          mad r8.w, r13.x, r13.x, -r8.w
          ge r13.y, r8.w, l(0.000000)
          sqrt r8.w, r8.w
          add r8.w, -r13.x, r8.w
          mad r10.xyz, r8.wwww, r9.yzwy, r10.xyzx
          add r14.yzw, r10.xxyz, -cb5[r7.w + 682].xxyz
          mad r8.w, r10.w, l(2.500000), l(-1.500000)
          max r8.w, r8.w, l(0.000000)
          mul r10.x, r8.w, r8.w
          mad r8.w, -r8.w, l(2.000000), l(3.000000)
          mad r14.x, -r10.x, r8.w, l(1.000000)
          movc r11.xyzw, r13.yyyy, r14.xyzw, r9.xyzw
          mov r12.xyz, r11.yzwy
        endif
      endif
    endif
    mov r12.w, cb5[r7.w + 341].y
    sample_l_indexable(texturecubearray)(float,float,float,float) r10.xyzw, r12.xyzw, t15.xyzw, s11, r3.x
    mul r10.xyz, r10.xyzx, cb5[r7.w + 341].xxxx
    mul r10.xyz, r11.xxxx, r10.xyzx
    mad r6.xyz, r10.xyzx, r3.wwww, r6.xyzx
    mad r8.w, -r10.w, r11.x, l(1.000000)
    mul r3.w, r3.w, r8.w
    mul r7.w, r11.x, cb5[r7.w + 682].w
    mad r4.w, r7.w, r5.w, r4.w
    add r7.w, -r11.x, l(1.000000)
    mul r5.w, r5.w, r7.w
  endif
  iadd r6.w, r6.w, l(1)
endloop
mul r6.xyz, r6.xyzx, cb1[142].xyzx
dp3 r1.y, cb1[142].xyzx, l(0.300000, 0.590000, 0.110000, 0.000000)
mul r6.w, r1.y, r4.w
lt r1.y, l(0.000000), cb0[10].y
if_nz r1.y
  add r1.y, -r1.w, cb0[10].x
  add r1.y, r1.y, l(-1.000000)
  sample_l_indexable(texturecube)(float,float,float,float) r1.yzw, r9.yzwy, t11.wxyz, s10, r1.y
  dp3 r3.x, cb1[152].xyzx, l(0.300000, 0.590000, 0.110000, 0.000000)
  mul r3.x, r3.x, cb0[11].x
  mul r1.yzw, r1.yyzw, cb1[152].xxyz
  lt r4.w, cb0[10].z, l(1.000000)
  mad r9.xyz, r3.wwww, r1.yzwy, r6.xyzx
  mad r9.w, r3.x, r5.w, r6.w
  movc r1.yzw, r4.wwww, l(0,0,0,0), r1.yyzw
  movc r6.xyzw, r4.wwww, r9.xyzw, r6.xyzw
else
  mov r1.yzw, l(0,0,0,0)
endif
mad_sat r3.x, r3.z, cb1[162].x, cb1[162].y
mad r4.w, r3.x, l(-2.000000), l(3.000000)
mul r3.x, r3.x, r3.x
mul r3.x, r3.x, r4.w
max r4.w, r6.w, l(0.000100)
div r4.w, r0.w, r4.w
min r4.w, r4.w, cb1[162].z
add r4.w, r4.w, l(-1.000000)
mad r3.x, r3.x, r4.w, l(1.000000)
mul r1.yzw, r1.yyzw, r3.wwww
mad r1.yzw, r6.xxyz, r3.xxxx, r1.yyzw
mul r6.xyzw, r7.yxyz, l(50.000000, 0.450000, 0.450000, 0.450000)
mad r6.yzw, r6.yyzw, r0.wwww, -r1.yyzw
mad r1.yzw, cb1[148].wwww, r6.yyzw, r1.yyzw
mad r9.xyzw, r3.zzzz, l(-1.000000, -0.027500, -0.572000, 0.022000), l(1.000000, 0.042500, 1.040000, -0.040000)
mul r0.w, r9.x, r9.x
mul r1.x, r1.x, l(-9.280000)
exp r1.x, r1.x
min r0.w, r0.w, r1.x
mad r0.w, r0.w, r9.x, r9.y
mad r3.xw, r0.wwww, l(-1.040000, 0.000000, 0.000000, 1.040000), r9.zzzw
mov_sat r6.x, r6.x
mul r0.w, r3.w, r6.x
mad r6.xyz, r7.xyzx, r3.xxxx, r0.wwww
dp3 r0.w, cb0[12].xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
lt r0.w, l(0.000100), |r0.w|
if_nz r0.w
  mov r2.w, l(-1.000000)
  dp4 r0.w, cb0[12].xyzw, r2.xyzw
  mad_sat r0.w, |r0.w|, cb0[19].x, cb0[19].y
  add r0.w, -r0.w, l(1.000000)
  add r9.xyz, r2.xyzx, -cb0[13].xyzx
  dp3 r1.x, r9.xyzx, cb0[14].xyzx
  add r1.x, -|r1.x|, cb0[14].w
  mul_sat r1.x, r1.x, cb0[19].x
  dp3 r2.w, r9.xyzx, cb0[15].xyzx
  add r2.w, -|r2.w|, cb0[15].w
  mul_sat r2.w, r2.w, cb0[19].x
  mul r1.x, r1.x, r2.w
  mul r0.w, r0.w, r1.x
  lt r1.x, l(0.000000), r0.w
  if_nz r1.x
    add r9.xyz, r2.xyzx, -cb1[55].xyzx
    dp3 r1.x, r9.xyzx, r9.xyzx
    rsq r1.x, r1.x
    mul r9.xyz, r1.xxxx, r9.xyzx
    dp3 r1.x, r9.xyzx, -cb0[12].xyzx
    add r1.x, r1.x, r1.x
    mad r9.xyz, cb0[12].xyzx, r1.xxxx, r9.xyzx
    mul r10.xyz, r4.xxxx, cb0[17].xyzx
    mad r10.xyz, r4.zzzz, cb0[16].xyzx, r10.xyzx
    mad r10.xyz, r4.yyyy, cb0[18].xyzx, r10.xyzx
    dp3 r1.x, r9.xyzx, r10.xyzx
    add r1.x, r1.x, r1.x
    mad r9.xyz, r10.xyzx, -r1.xxxx, r9.xyzx
    mad r9.xyz, r9.xyzx, cb0[19].zzzz, r2.xyzx
    add r9.xyz, r9.xyzx, cb1[58].xyzx
    mul r10.xyz, r9.yyyy, cb1[9].xyzx
    mad r9.xyw, r9.xxxx, cb1[8].xyxz, r10.xyxz
    mad r9.xyz, r9.zzzz, cb1[10].xyzx, r9.xywx
    add r9.xyz, r9.xyzx, cb1[11].xyzx
    ishl r1.x, cb1[162].w, l(2)
    mul r10.xyz, r9.yyyy, cb0[r1.x + 22].xywx
    mad r9.xyw, r9.xxxx, cb0[r1.x + 21].xyxw, r10.xyxz
    mad r9.xyz, r9.zzzz, cb0[r1.x + 23].xywx, r9.xywx
    add r9.xyz, r9.xyzx, cb0[r1.x + 24].xywx
    movc r1.x, cb0[31].x, cb1[162].w, l(0)
    div r3.xw, r9.xxxy, r9.zzzz
    max r3.xw, r3.xxxw, l(-1.000000, 0.000000, 0.000000, -1.000000)
    min r3.xw, r3.xxxw, l(1.000000, 0.000000, 0.000000, 1.000000)
    mad r3.xw, r3.xxxw, cb0[r1.x + 29].xxxy, cb0[r1.x + 29].zzzw
    dp3 r1.x, cb0[12].yzxy, r4.xyzx
    mad_sat r1.x, r1.x, cb0[20].x, cb0[20].y
    add r2.w, r3.z, l(-0.200000)
    mul_sat r2.w, r2.w, l(10.000000)
    add r2.w, -r2.w, l(1.000000)
    mul r0.w, r0.w, r1.x
    mul r0.w, r2.w, r0.w
    sample_l_indexable(texture2d)(float,float,float,float) r9.xyzw, r3.xwxx, t12.xyzw, s11, l(0.000000)
    mul r0.w, r0.w, r9.w
    mul r3.xzw, r0.wwww, r9.xxyz
  else
    mov r3.xzw, l(0,0,0,0)
    mov r0.w, l(0)
  endif
  add r0.w, -r0.w, l(1.000000)
  mad r1.yzw, r0.wwww, r1.yyzw, r3.xxzw
endif
add r3.xzw, r2.xxyz, -cb1[133].xxyz
mul r9.xyz, r3.xzwx, cb1[135].xyzx
add r10.xyz, r2.xyzx, -cb1[134].xyzx
mul r10.xyz, r10.xyzx, cb1[136].xyzx
mad r3.xzw, r3.xxzw, cb1[135].xxyz, l(-0.500000, 0.000000, -0.500000, -0.500000)
add r3.xzw, -|r3.xxzw|, l(0.500000, 0.000000, 0.500000, 0.500000)
mul_sat r3.xzw, r3.xxzw, l(6.000000, 0.000000, 6.000000, 6.000000)
mul r0.w, r3.z, r3.x
mul r0.w, r3.w, r0.w
sample_l_indexable(texture3d)(float,float,float,float) r3.xzw, r9.xyzx, t7.xwyz, s6, l(0.000000)
sample_l_indexable(texture3d)(float,float,float,float) r11.xyz, r10.xyzx, t8.xyzw, s7, l(0.000000)
add r3.xzw, r3.xxzw, -r11.xxyz
mad r3.xzw, r0.wwww, r3.xxzw, r11.xxyz
sample_l_indexable(texture3d)(float,float,float,float) r9.xyz, r9.xyzx, t9.xyzw, s8, l(0.000000)
sample_l_indexable(texture3d)(float,float,float,float) r10.xyz, r10.xyzx, t10.xyzw, s9, l(0.000000)
add r9.xyz, r9.xyzx, -r10.xyzx
mad r9.xyz, r0.wwww, r9.xyzx, r10.xyzx
dp3 r0.w, r3.xzwx, l(0.300000, 0.590000, 0.110000, 0.000000)
add r0.w, r0.w, l(0.000010)
div r10.xyz, r3.xzwx, r0.wwww
mul r11.yzw, r9.xxyz, r10.xxxx
mul r12.yzw, r9.xxyz, r10.yyyy
mul r9.yzw, r9.xxyz, r10.zzzz
mul r4.yzw, r4.xxyz, l(0.000000, -1.02332771, 1.02332771, -1.02332771)
mov r11.x, r3.x
mov r4.x, l(0.886227548)
dp4 r10.x, r11.xyzw, r4.xyzw
mov r12.x, r3.z
dp4 r10.y, r12.xyzw, r4.xyzw
mov r9.x, r3.w
dp4 r10.z, r9.xyzw, r4.xyzw
max r3.xzw, r10.xxyz, l(0.000000, 0.000000, 0.000000, 0.000000)
mul r3.xzw, r3.xxzw, r5.xxyz
mad r1.xyz, r1.yzwy, r6.xyzx, r3.xzwx
mad r3.xzw, r7.xxyz, l(0.450000, 0.000000, 0.450000, 0.450000), r5.xxyz
add r3.xzw, -r1.xxyz, r3.xxzw
mad r1.xyz, cb1[130].xxxx, r3.xzwx, r1.xyzx
max r3.xzw, r8.xxyz, l(0.000000, 0.000000, 0.000000, 0.000000)
lt r0.w, l(0.000000), cb1[126].x
if_nz r0.w
  add r4.xyz, r2.xyzx, -cb2[8].xyzx
  add r5.xyz, cb2[9].xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
  lt r4.xyz, r5.xyzx, |r4.xyzx|
  or r0.w, r4.y, r4.x
  or r0.w, r4.z, r0.w
  dp3 r1.w, r2.xyzx, l(0.577000, 0.577000, 0.577000, 0.000000)
  mul r1.w, r1.w, l(0.002000)
  frc r1.w, r1.w
  lt r1.w, l(0.500000), r1.w
  movc r2.xyz, r1.wwww, l(0,1.000000,1.000000,0), l(1.000000,1.000000,0,0)
  movc r3.xzw, r0.wwww, r2.xxyz, r3.xxzw
endif
mad r0.xyz, r0.xyzx, r3.yyyy, r1.xyzx
add r0.xyz, r3.xzwx, r0.xyzx
mad o0.xyz, r0.xyzx, v4.wwww, v4.xyzx
mov o0.w, l(1.000000)
ret
// Approximately 0 instruction slots used
