//false pos for Genesis Noir
// MANUALLY DUMPED [ShaderRegex\ShaderFixes\ShaderRegEx_UE4_UNIVERSAL2_C44.ini\_32_MultipleEffects0][ShaderRegex\ShaderFixes\ShaderRegEx_UE4_UNIVERSAL2_C44.ini\_94_LightDecalFix_2]
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.3.16 on Tue Dec 14 16:49:52 2021
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD                10   xyzw        0     NONE   float   xyz
// TEXCOORD                11   xyzw        1     NONE   float   xyzw
// PRIMITIVE_ID             0   x           2     NONE    uint   x
// TEXCOORD                 7   xyzw        3     NONE   float   xyzw
// TEXCOORD                 9   xyz         4     NONE   float   xyz
// SV_Position              0   xyzw        5      POS   float   xyzw
// SV_IsFrontFace           0   x           6    FFACE    uint   x
//
//
// 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[187], immediateIndexed
dcl_constantbuffer cb1[119], dynamicIndexed
dcl_constantbuffer cb2[682], dynamicIndexed
dcl_constantbuffer cb3[3], immediateIndexed
dcl_constantbuffer cb4[5], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_sampler s2, mode_default
dcl_sampler s3, mode_default
dcl_resource_texture3d (uint,uint,uint,uint) t0
dcl_resource_texture3d (float,float,float,float) t1
dcl_resource_structured t2, 16
dcl_resource_buffer (float,float,float,float) t3
dcl_resource_buffer (uint,uint,uint,uint) t4
dcl_resource_buffer (uint,uint,uint,uint) t5
dcl_resource_texturecubearray (float,float,float,float) t6
dcl_resource_texture2d (float,float,float,float) t7
dcl_resource_texture3d (float,float,float,float) t8
dcl_resource_texture2d (float,float,float,float) t9
dcl_resource_texture2d (float,float,float,float) t10
dcl_resource_texture2d (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_texture2d (float,float,float,float) t15
dcl_input_ps linear centroid v0.xyz
dcl_input_ps linear centroid v1.xyzw
dcl_input_ps constant v2.x
dcl_input_ps linear v3.xyzw
dcl_input_ps linear v4.xyz

dcl_input_ps_siv linear noperspective v5.xyzw, position

dcl_input_ps_sgv v6.x, is_front_face
dcl_output o0.xyzw
dcl_temps 25
dcl_resource_texture2d (float,float,float,float) t125
mul r0.xyz, v0.yzxy, v1.zxyz
mad r0.xyz, v1.yzxy, v0.zxyz, -r0.xyzx
mul r0.xyz, r0.xyzx, v1.wwww
add r1.xy, v5.xyxx, -cb0[125].xyxx
mad r1.zw, r1.xxxy, cb0[126].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 r22.xyzw, v5.yyyy, cb0[45].xyzw
//PS
mad r22.xyzw, v5.xxxx, cb0[44].xyzw, r22.xyzw
//PS
mad r22.xyzw, v5.zzzz, cb0[46].xyzw, r22.xyzw
add r22.xyzw, r22.xyzw, cb0[47].xyzw
mov r23.xyzw, v5.xyzw
ld_indexable(texture2d)(float,float,float,float) r21.xyzw, l(0, 0, 0, 0), t125.xyzw
mul r21.w, r21.y, r22.w
add r21.w, r21.w, l(-1.0)
mul r21.w, r21.w, cb0[126].x
mul r21.w, r21.w, l(0.500000)
mad r23.x, r21.x, r21.w, r23.x
mul r3.xyzw, v5.yyyy, cb0[45].xyzw
// false pos so use original v5.x here instead of r23.x
mad r3.xyzw, v5.xxxx, cb0[44].xyzw, r3.xyzw
//PS
mad r3.xyzw, v5.zzzz, cb0[46].xyzw, r3.xyzw
add r3.xyzw, r3.xyzw, cb0[47].xyzw

div r3.xyz, r3.xyzx, r3.wwww

add r4.xyz, r3.xyzx, -cb0[66].xyzx
add r5.xyz, v4.xyzx, -cb0[66].xyzx
dp3 r0.w, -r3.xyzx, -r3.xyzx
rsq r0.w, r0.w
mul r3.xyz, r0.wwww, -r3.xyzx
imad r6.xyzw, v2.xxxx, l(26, 26, 26, 26), l(4, 20, 23, 25)
ld_structured_indexable(structured_buffer, stride=16)(mixed,mixed,mixed,mixed) r0.w, r6.x, l(12), t2.xxxx
mul r0.w, r0.w, cb0[135].w
movc r1.z, v6.x, l(1.000000), l(-1.000000)
mul r0.w, r0.w, r1.z
mad r7.xyz, cb0[132].wwww, l(0.000000, 0.000000, 1.000000, 0.000000), cb0[132].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, v0.xyzx, r0.xyzx
mad r0.xyz, r7.zzzz, v1.xyzx, r0.xyzx
dp3 r1.z, r0.xyzx, r0.xyzx
rsq r1.z, r1.z
mul r0.xyz, r0.xyzx, r1.zzzz
mul r0.xyz, r0.wwww, r0.xyzx
add r7.xyz, -cb3[1].xyzx, cb3[2].xyzx
mad r7.xyz, r7.xyzx, l(0.220000, 0.220000, 0.220000, 0.000000), cb3[1].xyzx
add r5.xyz, r5.xyzx, -r7.xyzx
dp3 r0.w, r5.xyzx, r5.xyzx
sqrt r0.w, r0.w
min r0.w, r0.w, cb4[4].x
div r0.w, r0.w, cb4[4].x
add r0.w, -r0.w, l(1.000000)
max r0.w, r0.w, l(0.000000)
dp2 r0.w, r0.wwww, r0.wwww
mul r5.xy, cb0[136].zzzz, l(0.628318548, 0.050000, 0.000000, 0.000000)
sincos r1.z, null, r5.x
add r1.z, r1.z, l(1.000000)
mad r1.z, -r1.z, l(0.100000), l(1.000000)
div r1.w, l(1.000000, 1.000000, 1.000000, 1.000000), r1.z
mul r0.w, r0.w, r1.w
min r0.w, r0.w, l(1.000000)
mad r1.w, r0.w, l(-2.000000), l(3.000000)
mul r0.w, r0.w, r0.w
mul r0.w, r0.w, r1.w
div r0.w, r0.w, r1.z
mov r5.z, l(0)
add r1.zw, r0.wwww, r5.yyyz
mul r1.zw, r1.zzzw, l(0.000000, 0.000000, 1.000000, 0.300000)
sample_b_indexable(texture2d)(float,float,float,float) r5.xyz, r1.zwzz, t15.xyzw, s3, cb0[137].y
mad_sat r0.w, r0.w, l(1300.000000), l(-6.000000)
mad_sat r5.xyz, r0.wwww, r5.xyzx, cb4[4].zzzz
add r5.xyz, r5.xyzx, cb4[1].xyzx
mov_sat r7.xyz, cb4[3].xyzx
ld_structured_indexable(structured_buffer, stride=16)(mixed,mixed,mixed,mixed) r8.xyz, r6.y, l(0), t2.xyzx
lt r1.zw, l(0.000000, 0.000000, 0.000000, 0.000000), r8.xxxz
lt r0.w, l(0.000000), cb0[168].w
and r0.w, r0.w, r1.z
div r2.xy, r2.xyxx, r2.wwww
mad r9.xy, r2.xyxx, cb0[62].xyxx, cb0[62].wzww
sample_l_indexable(texture2d)(float,float,float,float) r10.xyzw, r9.xyxx, t12.xyzw, s2, l(0.000000)
sample_l_indexable(texture2d)(float,float,float,float) r11.xyzw, r9.xyxx, t13.xyzw, s2, l(0.000000)
sample_l_indexable(texture2d)(float,float,float,float) r12.xyzw, r9.xyxx, t14.xyzw, s2, l(0.000000)
mad r8.xzw, r11.xxyz, l(2.000000, 0.000000, 2.000000, 2.000000), l(-1.00392163, 0.000000, -1.00392163, -1.00392163)
mad r8.xzw, r0.xxyz, r11.wwww, r8.xxzw
mad r11.z, cb0[133].x, r12.w, r12.z
add r11.xy, r12.xyxx, r12.wwww
mad r10.xyz, r7.xyzx, r10.wwww, r10.xyzx
movc r0.xyz, r0.wwww, r8.xzwx, r0.xyzx
movc r7.xyz, r0.wwww, r10.xyzx, r7.xyzx
mov r8.x, l(1.000000)
mov r8.z, cb0[133].x
movc r8.xzw, r0.wwww, r11.xxyz, r8.xxxz
if_nz r1.w
  mad r10.xyz, r4.xyzx, cb0[183].xyzx, cb0[184].xyzx
  max r10.xyz, r10.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
  min r10.xyz, r10.xyzx, l(0.990000, 0.990000, 0.990000, 0.000000)
  mul r10.xyz, r10.xyzx, cb0[185].xyzx
  ftoi r11.xyz, r10.xyzx
  mov r11.w, l(0)
  ld_indexable(texture3d)(uint,uint,uint,uint) r11.xyzw, r11.xyzw, t0.xyzw
  utof r11.xyzw, r11.xyzw
  add r0.w, cb0[185].w, l(1.000000)
  div r10.xyz, r10.xyzx, r11.wwww
  frc r10.xyz, r10.xyzx
  mul r10.xyz, r10.xyzx, cb0[185].wwww
  mad r10.xyz, r11.xyzx, r0.wwww, r10.xyzx
  add r10.xyz, r10.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
  mul r10.xyz, r10.xyzx, cb0[186].xyzx
  sample_l_indexable(texture3d)(float,float,float,float) r10.x, r10.xyzx, t1.xyzw, s0, l(0.000000)
else
  mov r10.x, l(1.000000)
endif
mul r0.w, r8.z, l(0.080000)
mad r11.xyz, -r8.zzzz, l(0.080000, 0.080000, 0.080000, 0.000000), r7.xyzx
mad r11.xyz, r8.xxxx, r11.xyzx, r0.wwww
mad r7.xyz, -r7.xyzx, r8.xxxx, r7.xyzx
mad r7.xyz, r7.xyzx, cb0[130].wwww, cb0[130].xyzx
mad r11.xyz, r11.xyzx, cb0[131].wwww, cb0[131].xyzx
ilt r0.w, l(1), cb0[129].x
if_nz r0.w
  mul r1.zw, r9.xxxy, cb0[127].xxxy
  round_z r1.zw, r1.zzzw
  ftoi r12.xy, r1.zwzz
  mov r12.z, l(0)
  ld_indexable(texture2d)(float,float,float,float) r0.w, r12.xyzz, t11.yzwx
  mad r1.z, r0.w, cb0[61].x, cb0[61].y
  mad r0.w, r0.w, cb0[61].z, -cb0[61].w
  div r0.w, l(1.000000, 1.000000, 1.000000, 1.000000), r0.w
  add r0.w, r0.w, r1.z
  mad r0.w, -r2.z, l(1.000000), r0.w
  div r0.w, |r0.w|, r2.w
  lt r0.w, l(0.010000), r0.w
  if_nz r0.w
    mov r13.y, -cb0[127].z
    mov r13.z, l(0)
    add r13.yz, r9.xxyx, r13.yyzy
    iadd r14.xyzw, r12.xxyy, l(1, -1, 1, -1)
    mov r12.w, r14.y
    ld_indexable(texture2d)(float,float,float,float) r0.w, r12.wyzz, t11.yzwx
    mad r1.z, r0.w, cb0[61].x, cb0[61].y
    mad r0.w, r0.w, cb0[61].z, -cb0[61].w
    div r0.w, l(1.000000, 1.000000, 1.000000, 1.000000), r0.w
    add r0.w, r0.w, r1.z
    mad r0.w, -r2.z, l(1.000000), r0.w
    mov r13.x, |r0.w|
    lt r0.w, r13.x, l(100000000.000000)
    mov r9.z, l(100000000.000000)
    movc r13.xyz, r0.wwww, r13.xyzx, r9.zxyz
    mov r15.y, l(0)
    mov r15.z, cb0[127].w
    add r15.yz, r9.xxyx, r15.yyzy
    mov r16.xz, r12.xxzx
    mov r16.yw, r14.zzzw
    ld_indexable(texture2d)(float,float,float,float) r0.w, r16.xyzz, t11.yzwx
    mad r1.z, r0.w, cb0[61].x, cb0[61].y
    mad r0.w, r0.w, cb0[61].z, -cb0[61].w
    div r0.w, l(1.000000, 1.000000, 1.000000, 1.000000), r0.w
    add r0.w, r0.w, r1.z
    mad r0.w, -r2.z, l(1.000000), r0.w
    mov r15.x, |r0.w|
    lt r0.w, r15.x, r13.x
    movc r13.xyz, r0.wwww, r15.xyzx, r13.xyzx
    mov r15.y, cb0[127].z
    mov r15.z, l(0)
    add r15.yz, r9.xxyx, r15.yyzy
    mov r14.yzw, r12.yyzz
    ld_indexable(texture2d)(float,float,float,float) r0.w, r14.xyzw, t11.yzwx
    mad r1.z, r0.w, cb0[61].x, cb0[61].y
    mad r0.w, r0.w, cb0[61].z, -cb0[61].w
    div r0.w, l(1.000000, 1.000000, 1.000000, 1.000000), r0.w
    add r0.w, r0.w, r1.z
    mad r0.w, -r2.z, l(1.000000), r0.w
    mov r15.x, |r0.w|
    lt r0.w, r15.x, r13.x
    movc r12.xyz, r0.wwww, r15.xyzx, r13.xyzx
    mov r2.x, l(0)
    mov r2.y, -cb0[127].w
    add r1.zw, r2.xxxy, r9.xxxy
    ld_indexable(texture2d)(float,float,float,float) r0.w, r16.xwzz, t11.yzwx
    mad r2.x, r0.w, cb0[61].x, cb0[61].y
    mad r0.w, r0.w, cb0[61].z, -cb0[61].w
    div r0.w, l(1.000000, 1.000000, 1.000000, 1.000000), r0.w
    add r0.w, r0.w, r2.x
    mad r0.w, -r2.z, l(1.000000), r0.w
    lt r0.w, |r0.w|, r12.x
    movc r9.xy, r0.wwww, r1.zwzz, r12.yzyy
  endif
endif
resinfo_indexable(texture2d)(float,float,float,float)_uint r1.zw, l(0), t10.zwxy
utof r1.zw, r1.zzzw
mul r1.zw, r1.zzzw, r9.xxxy
round_z r1.zw, r1.zzzw
ftoi r12.xy, r1.zwzz
mov r12.zw, l(0,0,0,0)
ld_indexable(texture2d)(float,float,float,float) r0.w, r12.xyzw, t10.yzwx
mul r1.z, r8.y, l(3.999000)
ftou r1.xyz, r1.xyzx
and r1.z, r1.z, l(2)
movc r1.z, r1.z, cb0[169].y, l(1.000000)
add r0.w, r0.w, l(-1.000000)
mad r0.w, r1.z, r0.w, l(1.000000)
mad r1.z, v5.w, cb1[3].x, cb1[3].y
log r1.z, r1.z
mul r1.z, r1.z, cb1[3].z
max r1.z, r1.z, l(0.000000)
ftou r1.z, r1.z
iadd r1.w, cb1[1].z, l(-1)
umin r1.z, r1.w, r1.z
ushr r1.xy, r1.xyxx, cb1[2].xxxx
imad r1.y, r1.z, cb1[1].y, r1.y
imad r1.x, r1.y, cb1[1].x, r1.x
if_nz cb1[118].x
  mul r1.yz, r9.xxyx, cb0[127].xxyx
  round_z r1.yz, r1.yyzy
  ftoi r9.xy, r1.yzyy
  mov r9.zw, l(0,0,0,0)
  ld_indexable(texture2d)(float,float,float,float) r9.xyzw, r9.xyzw, t9.xyzw
else
  mov r9.xyzw, l(1.000000,1.000000,1.000000,1.000000)
endif
mul r9.xyzw, r9.xyzw, r9.xyzw
ld_structured_indexable(structured_buffer, stride=16)(mixed,mixed,mixed,mixed) r1.y, r6.z, l(12), t2.xxxx
if_nz cb1[0].z
  and r12.xyzw, cb1[6].xxxx, l(255, 1, 2, 4)
  movc r12.xyzw, r12.xyzw, l(1,1.000000,1.000000,1.000000), l(0,0,0,0)
  and r1.z, cb1[6].x, l(8)
  movc r13.w, r1.z, l(1.000000), l(0)
  ushr r1.zw, cb1[6].xxxx, l(0, 0, 4, 8)
  ubfe r2.x, l(1), l(4), cb1[6].x
  movc r14.x, r2.x, l(1.000000), l(0)
  and r2.xyz, r1.zzzz, l(2, 4, 8, 0)
  movc r14.yzw, r2.xxyz, l(0,1.000000,1.000000,1.000000), l(0,0,0,0)
  dp4 r1.z, r14.xyzw, r9.xyzw
  lt r2.x, cb1[6].w, l(0.000000)
  swapc r2.x, r6.x, r2.x, l(1.000000), r1.z
  if_nz r12.x
    mov r13.xyz, r12.yzwy
    dp4 r1.z, r13.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
    mov r10.y, l(1.000000)
    dp4 r2.y, r10.xyyy, r13.xyzw
    add r2.y, r2.y, l(-1.000000)
    mad r1.z, r1.z, r2.y, l(1.000000)
    mad_sat r2.y, r2.w, cb1[6].z, cb1[6].w
    mul r2.y, r2.y, r2.y
    add r1.z, -r2.x, r1.z
    mad r1.z, r2.y, r1.z, r2.x
    min r2.x, r6.x, r1.z
    mul r8.x, r6.x, r1.z
    mul r8.y, r6.x, r2.x
  else
    mov r8.xy, l(1.000000,1.000000,0,0)
  endif
  add r1.z, r8.y, r8.x
  lt r1.z, l(0.000000), r1.z
  if_nz r1.z
    dp3 r1.z, cb1[4].xyzx, cb1[4].xyzx
    rsq r1.z, r1.z
    mul r2.xyz, r1.zzzz, cb1[4].xyzx
    dp3 r1.z, r0.xyzx, r2.xyzx
    mov_sat r2.w, r1.z
    max r3.w, r8.w, l(0.020000)
    dp3 r5.w, r0.xyzx, r3.xyzx
    dp3 r2.x, r3.xyzx, r2.xyzx
    mad r2.y, r2.x, l(2.000000), l(2.000000)
    rsq r2.y, r2.y
    add r1.z, r1.z, r5.w
    mul_sat r1.z, r2.y, r1.z
    mad_sat r2.x, r2.y, r2.x, r2.y
    add r2.y, |r5.w|, l(0.000010)
    min r2.y, r2.y, l(1.000000)
    mul r6.xyz, r2.wwww, r7.xyzx
    mul r2.z, r3.w, r3.w
    mul r5.w, r2.z, r2.z
    mad r7.w, r1.z, r5.w, -r1.z
    mad r1.z, r7.w, r1.z, l(1.000000)
    mul r1.z, r1.z, r1.z
    mul r1.z, r1.z, l(3.14159274)
    div r1.z, r5.w, r1.z
    mad r3.w, -r3.w, r3.w, l(1.000000)
    mad r5.w, r2.y, r3.w, r2.z
    mad r2.z, r2.w, r3.w, r2.z
    mul r2.y, r2.z, r2.y
    mad r2.y, r2.w, r5.w, r2.y
    rcp r2.y, r2.y
    mul r1.z, r1.z, r2.y
    add r2.x, -r2.x, l(1.000000)
    mul r2.y, r2.x, r2.x
    mul r2.y, r2.y, r2.y
    mul r2.z, r2.x, r2.y
    mul_sat r3.w, r11.y, l(50.000000)
    mad r2.x, -r2.y, r2.x, l(1.000000)
    mul r12.xyz, r11.xyzx, r2.xxxx
    mad r2.xyz, r3.wwww, r2.zzzz, r12.xyzx
    mul r1.z, r1.z, l(0.500000)
    mul r2.xyz, r2.xyzx, r1.zzzz
    mul r2.xyz, r2.xyzx, r2.wwww
    mad r2.xyz, r6.xyzx, l(0.318309873, 0.318309873, 0.318309873, 0.000000), r2.xyzx
    mul r6.xyz, r8.xxxx, cb1[5].xyzx
    mul r2.xyz, r2.xyzx, r6.xyzx
  else
    mov r2.xyz, l(0,0,0,0)
  endif
  and r1.z, r1.y, r1.w
  movc r2.xyz, r1.zzzz, r2.xyzx, l(0,0,0,0)
else
  mov r2.xyz, l(0,0,0,0)
endif
ishl r1.z, r1.x, l(1)
ld_indexable(buffer)(uint,uint,uint,uint) r1.z, r1.zzzz, t4.yzxw
umin r1.z, r1.z, cb1[0].x
bfi r1.x, l(31), l(1), r1.x, l(1)
ld_indexable(buffer)(uint,uint,uint,uint) r1.x, r1.xxxx, t4.xyzw
umin r1.z, r1.z, cb1[0].x
dp3 r1.w, -r3.xyzx, r0.xyzx
add r1.w, r1.w, r1.w
mad r6.xyz, r0.xyzx, -r1.wwww, -r3.xyzx
max r1.w, r8.w, l(0.020000)
mul r2.w, r1.w, r1.w
mad r1.w, -r1.w, r1.w, l(1.000000)
dp3 r3.w, r0.xyzx, r3.xyzx
add r5.w, r3.w, r3.w
mad r7.w, r5.w, r3.w, l(-1.000000)
add r8.x, |r3.w|, l(0.000010)
min r8.x, r8.x, l(1.000000)
mul r12.xyz, r7.xyzx, l(0.318309873, 0.318309873, 0.318309873, 0.000000)
mul r8.y, r2.w, r2.w
mul r8.z, r11.y, l(50.000000)
mov_sat r8.z, r8.z
mov r10.z, l(1.000000)
mov r13.y, l(1.000000)
mov r14.xyz, r2.xyzx
mov r10.y, l(0)
loop
  uge r10.w, r10.y, r1.z
  breakc_nz r10.w
  iadd r10.w, r1.x, r10.y
  ld_indexable(buffer)(uint,uint,uint,uint) r10.w, r10.wwww, t5.yzwx
  imul null, r11.w, r10.w, l(5)
  ld_indexable(buffer)(float,float,float,float) r15.xyzw, r11.wwww, t3.xyzw
  imad r16.xyz, r10.wwww, l(5, 5, 5, 0), l(1, 2, 3, 0)
  ld_indexable(buffer)(float,float,float,float) r17.xyzw, r16.xxxx, t3.xyzw
  ld_indexable(buffer)(float,float,float,float) r18.xyzw, r16.yyyy, t3.xyzw
  ld_indexable(buffer)(float,float,float,float) r16.xyzw, r16.zzzz, t3.xyzw
  eq r11.w, r17.w, l(0.000000)
  lt r12.w, l(-2.000000), r16.x
  add r15.xyz, -r4.xyzx, r15.xyzx
  dp3 r13.z, r15.xyzx, r15.xyzx
  rsq r13.w, r13.z
  mul r19.xyz, r13.wwww, r15.xyzx
  mul r13.w, r15.w, r15.w
  mul r13.z, r13.w, r13.z
  mad r13.z, -r13.z, r13.z, l(1.000000)
  max r13.z, r13.z, l(0.000000)
  mul r13.z, r13.z, r13.z
  mul r20.xyz, r15.wwww, r15.xyzx
  dp3 r13.w, r20.xyzx, r20.xyzx
  min r13.w, r13.w, l(1.000000)
  add r13.w, -r13.w, l(1.000000)
  log r13.w, r13.w
  mul r13.w, r13.w, r17.w
  exp r13.w, r13.w
  movc r13.z, r11.w, r13.z, r13.w
  dp3 r13.w, r19.xyzx, r18.xyzx
  add r13.w, -r16.x, r13.w
  mul_sat r13.w, r16.y, r13.w
  mul r13.w, r13.w, r13.w
  mul r13.w, r13.w, r13.z
  movc r12.w, r12.w, r13.w, r13.z
  lt r13.z, l(0.000000), r12.w
  if_nz r13.z
    and r13.z, r18.w, l(255)
    movc r13.z, r13.z, l(1), l(0)
    if_nz r13.z
      and r19.xyzw, r18.wwww, l(1, 2, 4, 8)
      movc r19.xyzw, r19.xyzw, l(1.000000,1.000000,1.000000,1.000000), l(0,0,0,0)
      ushr r13.z, r18.w, l(4)
      ubfe r13.w, l(1), l(4), r18.w
      movc r20.x, r13.w, l(1.000000), l(0)
      and r18.xyz, r13.zzzz, l(2, 4, 8, 0)
      movc r20.yzw, r18.xxyz, l(0,1.000000,1.000000,1.000000), l(0,0,0,0)
      dp4 r13.z, r20.xyzw, r9.xyzw
      dp4 r13.w, r19.xyzw, l(1.000000, 1.000000, 1.000000, 1.000000)
      dp4 r14.w, r10.xzzz, r19.xyzw
      add r14.w, r14.w, l(-1.000000)
      mad r13.w, r13.w, r14.w, l(1.000000)
      mul r13.zw, r13.wwww, r13.zzzz
    else
      mov r13.zw, l(0,0,1.000000,1.000000)
    endif
    add r13.w, r13.w, r13.z
    lt r13.w, l(0.000000), r13.w
    if_nz r13.w
      imad r10.w, r10.w, l(5), l(4)
      ld_indexable(buffer)(float,float,float,float) r19.xyzw, r10.wwww, t3.xyzw
      f16tof32 r10.w, r16.w
      mul r13.w, r10.w, l(0.500000)
      mad r16.xyw, -r13.wwww, r19.xyxz, r15.xyxz
      mad r15.xyz, r13.wwww, r19.xyzx, r15.xyzx
      lt r13.w, l(0.000000), r10.w
      if_nz r13.w
        dp3 r14.w, r16.xywx, r16.xywx
        dp3 r15.w, r15.xyzx, r15.xyzx
        rsq r14.w, r14.w
        rsq r15.w, r15.w
        mul r17.w, r14.w, r15.w
        dp3 r18.x, r16.xywx, r15.xyzx
        mul r18.x, r17.w, r18.x
        mad r18.y, r18.x, l(0.500000), r17.w
        add r18.y, r18.y, l(0.500000)
        div r19.y, r17.w, r18.y
        dp3 r17.w, r0.xyzx, r16.xywx
        dp3 r18.y, r0.xyzx, r15.xyzx
        mul r15.w, r15.w, r18.y
        mad r14.w, r17.w, r14.w, r15.w
        mul r19.x, r14.w, l(0.500000)
      else
        dp3 r14.w, r16.xywx, r16.xywx
        add r15.w, r14.w, l(1.000000)
        rcp r19.y, r15.w
        rsq r14.w, r14.w
        mul r20.xyz, r14.wwww, r16.xywx
        dp3 r19.x, r0.xyzx, r20.xyzx
        mov r18.x, l(1.000000)
      endif
      lt r14.w, l(0.000000), r16.z
      mul r15.w, r16.z, r16.z
      mul_sat r15.w, r19.y, r15.w
      sqrt r15.w, r15.w
      lt r17.w, r19.x, r15.w
      max r18.y, -r15.w, r19.x
      add r18.y, r15.w, r18.y
      mul r18.y, r18.y, r18.y
      mul r15.w, r15.w, l(4.000000)
      div r15.w, r18.y, r15.w
      movc r15.w, r17.w, r15.w, r19.x
      movc_sat r14.w, r14.w, r15.w, r19.x
      movc r11.w, r11.w, r19.y, l(1.000000)
      add r15.xyz, -r16.xywx, r15.xyzx
      dp3 r15.w, r6.xyzx, r15.xyzx
      mad r19.xyz, r15.wwww, r6.xyzx, -r15.xyzx
      dp3 r17.w, r16.xywx, r19.xyzx
      mul r15.w, r15.w, r15.w
      mad r10.w, r10.w, r10.w, -r15.w
      div_sat r10.w, r17.w, r10.w
      mad r15.xyz, r10.wwww, r15.xyzx, r16.xywx
      movc r15.xyz, r13.wwww, r15.xyzx, r16.xywx
      dp3 r10.w, r15.xyzx, r15.xyzx
      rsq r10.w, r10.w
      mul r15.xyz, r10.wwww, r15.xyzx
      mul r13.w, r10.w, r16.z
      mul_sat r13.w, r1.w, r13.w
      mul_sat r10.w, r10.w, r19.w
      dp3 r15.w, r0.xyzx, r15.xyzx
      dp3 r15.x, r3.xyzx, r15.xyzx
      mad r15.y, r15.x, l(2.000000), l(2.000000)
      rsq r15.y, r15.y
      add r15.z, r3.w, r15.w
      mul_sat r15.z, r15.y, r15.z
      mad_sat r15.y, r15.y, r15.x, r15.y
      lt r16.x, l(0.000000), r13.w
      if_nz r16.x
        mad r16.y, -r13.w, r13.w, l(1.000000)
        sqrt r16.y, r16.y
        dp2 r16.z, r3.wwww, r15.wwww
        add r16.w, -r15.x, r16.z
        ge r17.w, r16.w, r16.y
        if_nz r17.w
          mov r15.z, l(1.000000)
          mov r15.y, |r3.w|
        else
          mad r17.w, -r16.w, r16.w, l(1.000000)
          rsq r17.w, r17.w
          mul r17.w, r13.w, r17.w
          mad r18.y, -r16.w, r15.w, r3.w
          mul r18.z, r17.w, r18.y
          mad r16.w, -r16.w, r15.x, r7.w
          mul r19.x, r15.w, r15.w
          mad r19.x, -r3.w, r3.w, -r19.x
          add r19.x, r19.x, l(1.000000)
          mad r19.x, -r15.x, r15.x, r19.x
          mad_sat r16.z, r16.z, r15.x, r19.x
          sqrt r16.z, r16.z
          mul r16.zw, r16.zzzw, r17.wwww
          mul r19.x, r3.w, r16.z
          add r19.y, r19.x, r19.x
          mad r19.z, r15.w, r16.y, r3.w
          mad r17.w, r17.w, r18.y, r19.z
          mad r18.y, r15.x, r16.y, r16.w
          add r18.y, r18.y, l(1.000000)
          mul r19.w, r16.z, r18.y
          mul r20.x, r17.w, r18.y
          mul r20.y, r17.w, r19.y
          mul r19.x, r19.x, r17.w
          mul r19.x, r19.x, l(0.500000)
          mad r19.x, r19.w, l(-0.500000), r19.x
          mul r19.x, r19.x, r20.x
          mad r20.z, -r19.w, l(2.000000), r20.y
          mul r20.y, r20.z, r20.y
          mad r19.w, r19.w, r19.w, r20.y
          mul r20.y, r18.y, r18.y
          mad r18.y, r15.x, r16.y, r18.y
          mad r18.y, r18.y, l(-0.500000), l(-0.500000)
          mul r18.y, r18.y, r20.x
          mad r18.y, r19.z, r20.y, r18.y
          mad r17.w, r17.w, r18.y, r19.w
          add r18.y, r19.x, r19.x
          mul r19.z, r19.x, r19.x
          mad r19.z, r17.w, r17.w, r19.z
          div r18.y, r18.y, r19.z
          mul r17.w, r17.w, r18.y
          mad r18.y, -r18.y, r19.x, l(1.000000)
          mul r16.z, r16.z, r17.w
          mad r16.z, r18.y, r18.z, r16.z
          mul r17.w, r19.y, r17.w
          mad r16.w, r18.y, r16.w, r17.w
          mad r15.w, r15.w, r16.y, r16.z
          mad r15.x, r15.x, r16.y, r16.w
          mad r16.y, r15.x, l(2.000000), l(2.000000)
          rsq r16.y, r16.y
          add r15.w, r3.w, r15.w
          mul_sat r15.z, r16.y, r15.w
          mad_sat r15.y, r16.y, r15.x, r16.y
        endif
      endif
      mul r11.w, r14.w, r11.w
      lt r15.x, l(0.000000), r10.w
      mul r10.w, r10.w, r10.w
      mad r15.w, r15.y, l(3.600000), l(0.400000)
      div r10.w, r10.w, r15.w
      mad r10.w, r2.w, r2.w, r10.w
      min r10.w, r10.w, l(1.000000)
      movc r13.x, r15.x, r10.w, r8.y
      mul r10.w, r13.w, l(0.250000)
      ishr r15.x, r13.x, l(1)
      iadd r15.x, r15.x, l(0x1fbd1df5)
      mad r13.w, r15.x, l(3.000000), r13.w
      mul r10.w, r10.w, r13.w
      add r13.w, r15.y, l(0.001000)
      div r10.w, r10.w, r13.w
      add r19.x, r10.w, r13.x
      div r19.y, r13.x, r19.x
      movc r15.xw, r16.xxxx, r19.xxxy, r13.xxxy
      lt r10.w, r18.x, l(1.000000)
      add r16.x, -r18.x, l(1.000100)
      add r16.y, r18.x, l(1.000000)
      div r16.x, r16.x, r16.y
      sqrt r16.x, r16.x
      mul r16.y, r16.x, l(0.250000)
      ishr r16.z, r15.x, l(1)
      iadd r16.z, r16.z, l(0x1fbd1df5)
      mad r16.x, r16.z, l(3.000000), r16.x
      mul r16.x, r16.x, r16.y
      div r13.w, r16.x, r13.w
      add r13.w, r13.w, r15.x
      div r13.w, r15.x, r13.w
      sqrt r13.w, r13.w
      mul r13.w, r13.w, r15.w
      movc r10.w, r10.w, r13.w, r15.w
      mad r13.w, r15.z, r13.x, -r15.z
      mad r13.w, r13.w, r15.z, l(1.000000)
      mul r13.w, r13.w, r13.w
      mul r13.w, r13.w, l(3.14159274)
      div r13.w, r13.x, r13.w
      mul r10.w, r10.w, r13.w
      sqrt r13.x, r13.x
      add r13.w, -r13.x, l(1.000000)
      mad r15.x, r8.x, r13.w, r13.x
      mad r13.x, r14.w, r13.w, r13.x
      mul r13.x, r8.x, r13.x
      mad r13.x, r14.w, r15.x, r13.x
      rcp r13.x, r13.x
      mul r10.w, r10.w, r13.x
      add r13.x, -r15.y, l(1.000000)
      mul r13.w, r13.x, r13.x
      mul r13.w, r13.w, r13.w
      mul r14.w, r13.x, r13.w
      mad r13.x, -r13.w, r13.x, l(1.000000)
      mul r15.xyz, r11.xyzx, r13.xxxx
      mad r15.xyz, r8.zzzz, r14.wwww, r15.xyzx
      mul r10.w, r10.w, l(0.500000)
      mul r15.xyz, r15.xyzx, r10.wwww
      mul r15.xyz, r11.wwww, r15.xyzx
      mad r15.xyz, r11.wwww, r12.xyzx, r15.xyzx
      mul r16.xyz, r12.wwww, r17.xyzx
      mul r13.xzw, r13.zzzz, r16.xxyz
      mul r13.xzw, r13.xxzw, r15.xxyz
    else
      mov r13.xzw, l(0,0,0,0)
    endif
  else
    mov r13.xzw, l(0,0,0,0)
  endif
  ushr r10.w, r18.w, l(8)
  and r10.w, r1.y, r10.w
  add r13.xzw, r13.xxzw, r14.xxyz
  movc r14.xyz, r10.wwww, r13.xzwx, r14.xyzx
  iadd r10.y, r10.y, l(1)
endloop
ld_structured_indexable(structured_buffer, stride=16)(mixed,mixed,mixed,mixed) r1.x, r6.w, l(0), t2.xxxx
mad r2.xyz, r5.wwww, r0.xyzx, -r3.xyzx
mov_sat r3.w, r3.w
log r1.y, r8.w
mad r1.y, -r1.y, l(1.200000), l(1.000000)
add r1.z, cb0[168].z, l(-1.000000)
add r1.y, -r1.y, r1.z
mov r2.w, cb2[r1.x + 341].y
sample_l_indexable(texturecubearray)(float,float,float,float) r1.yzw, r2.xyzw, t6.wxyz, s1, r1.y
mul r1.xyz, r1.yzwy, cb2[r1.x + 341].xxxx
mul r1.xyz, r1.xyzx, cb0[151].xyzx
mad r1.xyz, cb0[157].wwww, -r1.xyzx, r1.xyzx
mad r2.xyzw, r8.wwww, 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, r3.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
mul r1.w, r8.z, r2.y
mad r2.xyz, r11.xyzx, r2.xxxx, r1.wwww
dp3 r1.w, cb1[86].xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
lt r1.w, l(0.000100), |r1.w|
if_nz r1.w
  mov r4.w, l(-1.000000)
  dp4 r1.w, cb1[86].xyzw, r4.xyzw
  mad_sat r1.w, |r1.w|, cb1[93].x, cb1[93].y
  add r1.w, -r1.w, l(1.000000)
  add r3.xyz, r4.xyzx, -cb1[87].xyzx
  dp3 r2.w, r3.xyzx, cb1[88].xyzx
  add r2.w, -|r2.w|, cb1[88].w
  mul_sat r2.w, r2.w, cb1[93].x
  dp3 r3.x, r3.xyzx, cb1[89].xyzx
  add r3.x, -|r3.x|, cb1[89].w
  mul_sat r3.x, r3.x, cb1[93].x
  mul r2.w, r2.w, r3.x
  mul r1.w, r1.w, r2.w
  lt r2.w, l(0.000000), r1.w
  if_nz r2.w
    add r3.xyz, r4.xyzx, -cb0[63].xyzx
    dp3 r2.w, r3.xyzx, r3.xyzx
    rsq r2.w, r2.w
    mul r3.xyz, r2.wwww, r3.xyzx
    dp3 r2.w, r3.xyzx, -cb1[86].xyzx
    add r2.w, r2.w, r2.w
    mad r3.xyz, cb1[86].xyzx, r2.wwww, r3.xyzx
    mul r6.xyz, r0.yyyy, cb1[91].xyzx
    mad r6.xyz, r0.xxxx, cb1[90].xyzx, r6.xyzx
    mad r6.xyz, r0.zzzz, cb1[92].xyzx, r6.xyzx
    dp3 r2.w, r3.xyzx, r6.xyzx
    add r2.w, r2.w, r2.w
    mad r3.xyz, r6.xyzx, -r2.wwww, r3.xyzx
    mad r3.xyz, r3.xyzx, cb1[93].zzzz, r4.xyzx
    add r3.xyz, r3.xyzx, cb0[66].xyzx
    mul r6.xyz, r3.yyyy, cb0[13].xyzx
    mad r3.xyw, r3.xxxx, cb0[12].xyxz, r6.xyxz
    mad r3.xyz, r3.zzzz, cb0[14].xyzx, r3.xywx
    add r3.xyz, r3.xyzx, cb0[15].xyzx
    ishl r2.w, cb0[170].w, l(2)
    mul r6.xyz, r3.yyyy, cb1[r2.w + 96].xywx
    mad r3.xyw, r3.xxxx, cb1[r2.w + 95].xyxw, r6.xyxz
    mad r3.xyz, r3.zzzz, cb1[r2.w + 97].xywx, r3.xywx
    add r3.xyz, r3.xyzx, cb1[r2.w + 98].xywx
    movc r2.w, cb1[105].z, cb0[170].w, l(0)
    div r3.xy, r3.xyxx, r3.zzzz
    max r3.xy, r3.xyxx, -cb1[105].xyxx
    min r3.xy, r3.xyxx, cb1[105].xyxx
    mad r3.xy, r3.xyxx, cb1[r2.w + 103].xyxx, cb1[r2.w + 103].zwzz
    dp3 r0.x, cb1[86].xyzx, r0.xyzx
    mad_sat r0.x, r0.x, cb1[94].x, cb1[94].y
    add r0.y, r8.w, l(-0.200000)
    mul_sat r0.y, r0.y, l(10.000000)
    add r0.y, -r0.y, l(1.000000)
    mul r0.x, r0.x, r1.w
    mul r0.x, r0.y, r0.x
    sample_l_indexable(texture2d)(float,float,float,float) r3.xyzw, r3.xyxx, t7.xyzw, s1, l(0.000000)
    mul r0.x, r0.x, r3.w
    mul r3.xyz, r0.xxxx, r3.xyzx
  else
    mov r3.xyz, l(0,0,0,0)
    mov r0.x, l(0)
  endif
  add r0.x, -r0.x, l(1.000000)
  mad r1.xyz, r0.xxxx, r1.xyzx, r3.xyzx
endif
mul r0.xyz, r2.xyzx, r1.xyzx
mul r0.xyz, r0.wwww, r0.xyzx
mad r1.xyz, r11.xyzx, l(2.040400, 2.040400, 2.040400, 0.000000), l(-0.332400, -0.332400, -0.332400, 0.000000)
mad r1.xyz, r11.xyzx, l(-4.795100, -4.795100, -4.795100, 0.000000), r1.xyzx
mad r1.xyz, r11.xyzx, l(2.755200, 2.755200, 2.755200, 0.000000), r1.xyzx
add r1.xyz, r1.xyzx, l(1.332000, 1.332000, 1.332000, 0.000000)
max r1.xyz, r1.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
mad r0.xyz, r0.xyzx, r1.xyzx, r14.xyzx
lt r0.w, l(0.000000), cb1[114].w
if_nz r0.w

  mul r1.xyz, r4.yyyy, cb0[5].xywx
  mad r1.xyz, r4.xxxx, cb0[4].xywx, r1.xyzx

  mad r1.xyz, r4.zzzz, cb0[6].xywx, r1.xyzx
  add r1.xyz, r1.xyzx, cb0[7].xywx

  div r1.xy, r1.xyxx, r1.zzzz

ld_indexable(texture2d)(float,float,float,float) r24.xyzw, l(0, 0, 0, 0), t125.xyzw
add r1.x, r1.x, r24.x
  mad r2.xy, r1.xyxx, l(0.500000, -0.500000, 0.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)

  mad r0.w, r1.z, cb0[181].x, cb0[181].y
  log r0.w, r0.w
  mul r0.w, r0.w, cb0[181].z
  mul r2.z, r0.w, cb0[180].z
  sample_l_indexable(texture3d)(float,float,float,float) r1.xyzw, r2.xyzx, t8.xyzw, s0, l(0.000000)
  mul r2.x, r1.w, v3.w
  mad r1.xyz, v3.xyzx, r1.wwww, r1.xyzx
else
  mov r1.xyz, v3.xyzx
  mov r2.x, v3.w
endif
mad r2.yzw, r11.xxyz, l(0.000000, 0.450000, 0.450000, 0.450000), r7.xxyz
add r2.yzw, -r0.xxyz, r2.yyzw
mad r0.xyz, cb0[139].xxxx, r2.yzwy, r0.xyzx
max r2.yzw, r5.xxyz, l(0.000000, 0.000000, 0.000000, 0.000000)
lt r0.w, l(0.000000), cb0[134].x
if_nz r0.w
  imad r3.xy, v2.xxxx, l(26, 26, 0, 0), l(5, 19, 0, 0)
  ld_structured_indexable(structured_buffer, stride=16)(mixed,mixed,mixed,mixed) r3.xzw, r3.x, l(0), t2.xxyz
  add r3.xzw, -r3.xxzw, r4.xxyz
  ld_structured_indexable(structured_buffer, stride=16)(mixed,mixed,mixed,mixed) r5.xyz, r3.y, l(0), t2.xyzx
  add r5.xyz, r5.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
  lt r3.xyz, r5.xyzx, |r3.xzwx|
  or r0.w, r3.y, r3.x
  or r0.w, r3.z, r0.w
  dp3 r1.w, r4.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 r3.xyz, r1.wwww, l(0,1.000000,1.000000,0), l(1.000000,1.000000,0,0)
  movc r2.yzw, r0.wwww, r3.xxyz, r2.yyzw
endif
add r0.xyz, r0.xyzx, r2.yzwy
mad o0.xyz, r0.xyzx, r2.xxxx, r1.xyzx
mov o0.w, l(0)
ret
// Approximately 0 instruction slots used
