//ReadyOrNotReflection - a bit off still - cahnges at fix 2
// MANUALLY DUMPED [ShaderRegex\ShaderFixes\ShaderRegEx_UE4_UNIVERSAL2_C44.ini\_32_5SpecReflect14][ShaderRegex\ShaderFixes\ShaderRegEx_UE4_UNIVERSAL2_C44.ini\_33_1SSR_SideFix2][ShaderRegex\ShaderFixes\ShaderRegEx_UE4_UNIVERSAL2_C44.ini\_74_SSR_Additional2][ShaderRegex\ShaderFixes\ShaderRegEx_UE4_UNIVERSAL2_C44.ini\_94_LightDecalFix_2]
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.3.16 on Sat May 07 08:24:43 2022
//
//
// 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   x
// TEXCOORD                 0   xyzw        3     NONE   float   xy
// TEXCOORD                 4   xyzw        4     NONE   float   xy
// PRIMITIVE_ID             0   x           5     NONE    uint   x
// LIGHTMAP_ID              0    y          5     NONE    uint    y
// TEXCOORD                 7   xyzw        6     NONE   float   xyzw
// SV_Position              0   xyzw        7      POS   float   xyzw
// SV_IsFrontFace           0   x           8    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[210], immediateIndexed
dcl_constantbuffer cb1[138], dynamicIndexed
dcl_constantbuffer cb2[2728], dynamicIndexed
dcl_constantbuffer cb3[20], 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_resource_structured t0, 16
dcl_resource_structured t1, 16
dcl_resource_buffer (uint,uint,uint,uint) t2
dcl_resource_buffer (uint,uint,uint,uint) t3
dcl_resource_texturecubearray (float,float,float,float) t4
dcl_resource_texture2d (float,float,float,float) t5
dcl_resource_texture3d (float,float,float,float) t6
dcl_resource_texture2d (float,float,float,float) t7
dcl_resource_texture2d (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_texture3d (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_resource_texture2d (float,float,float,float) t16
dcl_resource_texture2d (float,float,float,float) t17
dcl_input_ps linear centroid v0.xyz
dcl_input_ps linear centroid v1.xyzw
dcl_input_ps linear v2.x
dcl_input_ps linear v3.xy
dcl_input_ps linear v4.xy
dcl_input_ps constant v5.x
dcl_input_ps constant v5.y
dcl_input_ps linear v6.xyzw
dcl_input_ps_siv linear noperspective v7.xyzw, position
dcl_output o0.xyzw
dcl_temps 31
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, v7.yyyy, cb0[45].xyzw
mad r1.xyzw, v7.xxxx, cb0[44].xyzw, r1.xyzw
//PS
mad r1.xyzw, v7.zzzz, cb0[46].xyzw, r1.xyzw
add r1.xyzw, r1.xyzw, cb0[47].xyzw
//PS
div r1.xyz, r1.xyzx, r1.wwww

ld_indexable(texture2d)(float,float,float,float) r19.xyzw, l(0, 0, 0, 0), t125.xyzw
mov r21.x, l(44)
iadd r21.x, r21.x, l(-4)
mov r23.xyzw, r1.xyzx
mul r20.xyzw, r23.yyyy, cb0[1].xyzw
mad r20.xyzw, r23.xxxx, cb0[0].xyzw, r20.xyzw
mad r20.xyzw, r23.zzzz, cb0[2].xyzw, r20.xyzw
add r20.xyzw, r20.xyzw, cb0[3].xyzw
mov r24.xyzw, r20.xyzw
mad r20.x, r19.x, -r20.w, r20.x
add r19.w, r24.w, -r19.y
mad r24.x, r19.x, -r19.w, r24.x
mul r25.xyzw, r24.yyyy, cb0[r21.x + 1].xyzw
mad r25.xyzw, r24.xxxx, cb0[r21.x + 0].xyzw, r25.xyzw
mad r25.xyzw, r24.zzzz, cb0[r21.x + 2].xyzw, r25.xyzw
mad r25.xyzw, r24.wwww, cb0[r21.x + 3].xyzw, r25.xyzw
mul r23.xyzw, r20.yyyy, cb0[r21.x + 1].xyzw
mad r23.xyzw, r20.xxxx, cb0[r21.x + 0].xyzw, r23.xyzw
mad r23.xyzw, r20.zzzz, cb0[r21.x + 2].xyzw, r23.xyzw
mad r23.xyzw, r20.wwww, cb0[r21.x + 3].xyzw, r23.xyzw
mov r1.xyz, r23.xyzx
//DepthReg is r22
//SSR
mov r22.x, r20.w

add r2.xyz, r25.xyzx, -cb0[70].xyzx
dp3 r0.w, -r1.xyzx, -r1.xyzx
rsq r0.w, r0.w
mul r3.xyz, r0.wwww, -r1.xyzx
sample_b_indexable(texture2d)(float,float,float,float) r4.xy, v3.xyxx, t14.xyzw, s5, cb0[143].y
add r5.xy, r4.xyxx, r4.xyxx
mad r4.xy, r4.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
dp2 r0.w, r4.xyxx, r4.xyxx
add r0.w, -r0.w, l(1.000000)
max r0.w, r0.w, l(0.000000)
sqrt r5.z, r0.w
add r4.xyz, r5.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
mul r4.xy, r4.xyxx, cb3[12].xxxx
mad r0.w, cb3[12].x, r4.z, l(2.000000)
add r5.xy, v3.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
dp2 r6.x, r5.xyxx, cb3[1].xyxx
dp2 r6.y, r5.xyxx, cb3[2].xyxx
add r5.zw, r6.xxxy, cb3[3].xxxy
add r5.zw, r5.zzzw, l(0.000000, 0.000000, 0.500000, 0.500000)
mul r5.zw, r5.zzzw, cb3[14].yyyy
sample_b_indexable(texture2d)(float,float,float,float) r5.zw, r5.zwzz, t15.zwxy, s6, cb0[143].y
add r6.xy, r5.zwzz, r5.zwzz
mad r5.zw, r5.zzzw, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, -1.000000, -1.000000)
dp2 r1.w, r5.zwzz, r5.zwzz
add r1.w, -r1.w, l(1.000000)
max r1.w, r1.w, l(0.000000)
sqrt r6.z, r1.w
add r6.xyz, r6.xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
mad r6.xyz, cb3[14].zzzz, r6.xyzx, l(0.000000, 0.000000, 1.000000, 0.000000)
mad r4.w, cb3[12].x, r4.z, l(2.000000)
mul r6.xyz, r6.xyzx, l(-1.000000, -1.000000, 1.000000, 0.000000)
dp3 r1.w, r4.xywx, r6.xyzx
mul r6.xyz, r0.wwww, r6.xyzx
mad r4.xyz, r4.xywx, r1.wwww, -r6.xyzx
mad r4.xyz, r4.xyzx, cb0[138].wwww, cb0[138].xyzx
dp3 r0.w, r4.xyzx, r4.xyzx
rsq r0.w, r0.w
mul r4.xyz, r0.wwww, r4.xyzx
mul r0.xyz, r0.xyzx, r4.yyyy
mad r0.xyz, r4.xxxx, v0.yzxy, r0.xyzx
mad r0.xyz, r4.zzzz, v1.yzxy, r0.xyzx
dp3 r0.w, r0.xyzx, r0.xyzx
rsq r0.w, r0.w
mul r0.xyz, r0.wwww, r0.xyzx
mul r4.xyz, cb3[4].xyzx, cb3[14].wwww
add r1.w, v2.x, l(-1.000000)
mad r1.w, cb3[15].x, r1.w, l(1.000000)
sample_b_indexable(texture2d)(float,float,float,float) r5.zw, v3.xyxx, t16.ywxz, s7, cb0[143].y
add r3.w, r5.z, l(-1.000000)
mad r3.w, cb3[15].y, r3.w, l(1.000000)
mul r1.w, r1.w, r3.w
mul r6.xyz, r1.wwww, cb3[6].xyzx
dp2 r7.x, r5.xyxx, cb3[8].xyxx
dp2 r7.y, r5.xyxx, cb3[9].xyxx
add r5.xy, r7.xyxx, cb3[10].xyxx
add r5.xy, r5.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
mul r5.xy, r5.xyxx, cb3[17].zzzz
sample_b_indexable(texture2d)(float,float,float,float) r3.w, r5.xyxx, t17.yzwx, s8, cb0[143].y
ge r4.w, l(0.000000), r3.w
log r3.w, r3.w
mul r3.w, r3.w, cb3[18].x
exp r3.w, r3.w
movc r3.w, r4.w, l(0), r3.w
mul r4.w, r3.w, cb3[18].y
mov_sat r5.x, r4.w
mad r7.xyz, cb3[11].xyzx, r3.wwww, -r6.xyzx
mad_sat r5.xyz, r5.xxxx, r7.xyzx, r6.xyzx
mad r5.w, cb3[18].w, r5.w, cb3[18].z
mul r3.w, r3.w, cb3[19].x
mad r3.w, cb3[18].y, r3.w, r5.w
add_sat r5.w, -r3.w, l(1.000000)
dp3 r6.x, r0.zxyz, r3.xyzx
max r6.y, r6.x, l(0.000000)
add r6.z, -r6.y, l(1.000000)
max r6.z, |r6.z|, l(0.000100)
log r6.z, r6.z
mul r6.z, r6.z, cb3[19].z
exp r6.z, r6.z
add r6.w, -cb3[19].w, l(1.000000)
mad r6.z, r6.z, r6.w, cb3[19].w
add r6.z, r6.z, l(-1.000000)
mad r1.w, r1.w, r6.z, r4.w
add_sat r7.w, r1.w, l(1.000000)
mov_sat r3.w, r3.w
mad r1.w, r3.w, cb0[139].y, cb0[139].x
add r8.xyz, r5.xyzx, l(-0.080000, -0.080000, -0.080000, 0.000000)
mad r8.xyz, r5.wwww, r8.xyzx, l(0.080000, 0.080000, 0.080000, 0.000000)
mad r9.xyz, -r5.xyzx, r5.wwww, r5.xyzx
mad r9.xyz, r9.xyzx, cb0[136].wwww, cb0[136].xyzx
mad r8.xyz, r8.xyzx, cb0[137].wwww, cb0[137].xyzx
ne r3.w, l(0.000000, 0.000000, 0.000000, 0.000000), cb0[183].w
mad r10.xyz, r8.xyzx, l(0.450000, 0.450000, 0.450000, 0.000000), r9.xyzx
movc r9.xyz, r3.wwww, r10.xyzx, r9.xyzx
movc r8.xyz, r3.wwww, l(0,0,0,0), r8.xyzx
mul r6.zw, v4.xxxy, l(0.000000, 0.000000, 1.000000, 0.500000)
mad r10.xy, v4.xyxx, l(1.000000, 0.500000, 0.000000, 0.000000), l(0.000000, 0.500000, 0.000000, 0.000000)
sample_indexable(texture2d)(float,float,float,float) r11.xyzw, r6.zwzz, t13.xyzw, s4
sample_indexable(texture2d)(float,float,float,float) r10.xyzw, r10.xyxx, t13.xyzw, s4
mad r3.w, r10.w, l(0.00392156886), r11.w
add r3.w, r3.w, l(-0.00196078443)
imad r12.xyzw, v5.yyyy, l(15, 15, 15, 15), l(4, 6, 5, 7)
ld_structured_indexable(structured_buffer, stride=16)(mixed,mixed,mixed,mixed) r13.xyzw, r12.x, l(0), t1.xyzw
ld_structured_indexable(structured_buffer, stride=16)(mixed,mixed,mixed,mixed) r14.xyzw, r12.y, l(0), t1.xyzw
mad r3.w, r3.w, r13.w, r14.w
mul r11.xyz, r11.xyzx, r11.xyzx
mad r11.xyz, r11.xyzx, r13.xyzx, r14.xyzx
exp r3.w, r3.w
add r3.w, r3.w, l(-0.0185813606)
ld_structured_indexable(structured_buffer, stride=16)(mixed,mixed,mixed,mixed) r13.xyzw, r12.z, l(0), t1.xyzw
ld_structured_indexable(structured_buffer, stride=16)(mixed,mixed,mixed,mixed) r12.xyzw, r12.w, l(0), t1.xyzw
mad r10.xyzw, r10.xyzw, r13.xyzw, r12.xyzw
mov r0.w, l(1.000000)
dp4 r0.w, r10.xyzw, r0.xyzw
max r0.w, r0.w, l(0.000000)
mul r0.w, r0.w, r3.w
mul r10.xyz, r11.xyzx, r0.wwww
mul r10.xyz, r10.xyzx, cb0[157].xyzx
dp3 r0.w, r10.xyzx, l(0.300000, 0.590000, 0.110000, 0.000000)
mul r10.xyz, r9.xyzx, r10.xyzx
mad r11.xyz, r5.xyzx, l(2.040400, 2.040400, 2.040400, 0.000000), l(-0.332400, -0.332400, -0.332400, 0.000000)
mad r11.xyz, r5.xyzx, l(-4.795100, -4.795100, -4.795100, 0.000000), r11.xyzx
mad r5.xyz, r5.xyzx, l(2.755200, 2.755200, 2.755200, 0.000000), r11.xyzx
add r5.xyz, r5.xyzx, l(1.332000, 1.332000, 1.332000, 0.000000)
max r5.xyz, r5.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
add r6.zw, v7.xxxy, -cb0[129].xxxy
mul r6.zw, r6.zzzw, cb0[131].zzzw
ftou r6.zw, r6.zzzw
mad r3.w, v7.w, cb1[3].x, cb1[3].y
log r3.w, r3.w
mul r3.w, r3.w, cb1[3].z
max r3.w, r3.w, l(0.000000)
ftou r3.w, r3.w
iadd r4.w, cb1[1].z, l(-1)
umin r3.w, r3.w, r4.w
ushr r6.zw, r6.zzzw, cb1[2].xxxx
imad r3.w, r3.w, cb1[1].y, r6.w
imad r3.w, r3.w, cb1[1].x, r6.z
add r4.w, r6.x, r6.x
mad r11.yzw, r4.wwww, r0.zzxy, -r3.xxyz
min r3.x, r6.y, l(1.000000)
iadd r3.y, r3.w, cb1[0].w
ishl r3.z, r3.y, l(1)
ld_indexable(buffer)(uint,uint,uint,uint) r3.z, r3.zzzz, t2.yzxw
umin r3.z, r3.z, cb1[0].y
bfi r3.y, l(31), l(1), r3.y, l(1)
ld_indexable(buffer)(uint,uint,uint,uint) r3.y, r3.yyyy, t2.yxzw
max r3.w, r1.w, l(0.001000)
log r3.w, r3.w
mad r3.w, -r3.w, l(1.200000), l(1.000000)
add r4.w, cb0[195].z, l(-1.000000)
add r3.w, -r3.w, r4.w
mov r11.x, l(0)
mov r4.w, l(1.000000)
mov r5.w, l(0)
mov r6.xyzw, l(0,0,0,1.000000)
mov r8.w, l(0)
loop
  uge r9.w, r8.w, r3.z
  breakc_nz r9.w
  lt r9.w, r4.w, l(0.001000)
  if_nz r9.w
    break
  endif
  iadd r9.w, r3.y, r8.w
  ld_indexable(buffer)(uint,uint,uint,uint) r9.w, r9.wwww, t3.yzwx
  add r12.xyz, r2.xyzx, -cb2[r9.w + 0].xyzx
  dp3 r10.w, r12.xyzx, r12.xyzx
  sqrt r12.w, r10.w
  lt r13.x, r12.w, cb2[r9.w + 0].w
  if_nz r13.x
    lt r13.x, l(0.000000), cb2[r9.w + 341].z
    if_nz r13.x
      ishl r13.x, r9.w, l(2)
      mul r13.yzw, r2.yyyy, cb2[r13.x + 1024].xxyz
      mad r13.yzw, r2.xxxx, cb2[r13.x + 1023].xxyz, r13.yyzw
      mad r13.yzw, r2.zzzz, cb2[r13.x + 1025].xxyz, r13.yyzw
      add r13.yzw, r13.yyzw, cb2[r13.x + 1026].xxyz
      mul r14.xyz, r11.zzzz, cb2[r13.x + 1024].xyzx
      mad r14.xyz, r11.yyyy, cb2[r13.x + 1023].xyzx, r14.xyzx
      mad r14.xyz, r11.wwww, cb2[r13.x + 1025].xyzx, r14.xyzx
      rcp r14.xyz, r14.xyzx
      mad r15.xyz, -r13.yzwy, r14.xyzx, -r14.xyzx
      mad r14.xyz, -r13.yzwy, r14.xyzx, r14.xyzx
      max r14.xyz, r14.xyzx, r15.xyzx
      min r13.x, r14.z, r14.y
      min r13.x, r13.x, r14.x
      mad r14.xyz, r13.xxxx, r11.yzwy, r2.xyzx
      add r15.xyz, cb2[r9.w + 0].xyzx, cb2[r9.w + 682].xyzx
      add r14.xyz, r14.xyzx, -r15.xyzx
      mul r13.x, l(0.700000), cb2[r9.w + 2387].w
      mad r15.xyz, -cb2[r9.w + 2387].wwww, l(0.500000, 0.500000, 0.500000, 0.000000), cb2[r9.w + 2387].xyzx
      mul r16.xyz, r13.yzwy, cb2[r9.w + 2387].xyzx
      lt r17.xyz, r16.xyzx, -r15.xyzx
      mad r18.xyz, r13.yzwy, cb2[r9.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 r13.yzw, r13.yyzw, cb2[r9.w + 2387].xxyz, -r15.xxyz
      mov r13.yzw, |r13.yyzw|
      and r13.yzw, r13.yyzw, r16.xxyz
      dp3 r15.x, r17.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
      dp3 r13.y, r13.yzwy, l(1.000000, 1.000000, 1.000000, 0.000000)
      add r13.y, r13.y, r15.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 r13.x, -r13.y, r13.x, l(1.000000)
    else
      div_sat r12.w, r12.w, cb2[r9.w + 0].w
      dp3 r15.x, r11.yzwy, r12.xyzx
      mad r10.w, -cb2[r9.w + 0].w, cb2[r9.w + 0].w, r10.w
      mad r10.w, r15.x, r15.x, -r10.w
      ge r15.y, r10.w, l(0.000000)
      sqrt r10.w, r10.w
      add r10.w, -r15.x, r10.w
      mad r12.xyz, r10.wwww, r11.yzwy, r12.xyzx
      add r16.yzw, r12.xxyz, -cb2[r9.w + 682].xxyz
      mad r10.w, r12.w, l(2.500000), l(-1.500000)
      max r10.w, r10.w, l(0.000000)
      mul r12.x, r10.w, r10.w
      mad r10.w, -r10.w, l(2.000000), l(3.000000)
      mad r16.x, -r12.x, r10.w, l(1.000000)
      movc r13.xyzw, r15.yyyy, r16.xyzw, r11.xyzw
      mov r14.xyz, r13.yzwy
    endif
    mov r14.w, cb2[r9.w + 341].y
    sample_l_indexable(texturecubearray)(float,float,float,float) r12.xyzw, r14.xyzw, t4.xyzw, s1, r3.w
    mul r12.xyz, r12.xyzx, cb2[r9.w + 341].xxxx
    mul r12.xyz, r13.xxxx, r12.xyzx
    mad r6.xyz, r12.xyzx, r4.wwww, r6.xyzx
    mad r10.w, -r12.w, r13.x, l(1.000000)
    mul r4.w, r4.w, r10.w
    mul r9.w, r13.x, cb2[r9.w + 682].w
    mad r5.w, r9.w, r6.w, r5.w
    add r9.w, -r13.x, l(1.000000)
    mul r6.w, r6.w, r9.w
  endif
  iadd r8.w, r8.w, l(1)
endloop
mul r3.yzw, r6.xxyz, cb0[157].xxyz
dp3 r4.w, cb0[157].xyzx, l(0.300000, 0.590000, 0.110000, 0.000000)
mul r4.w, r4.w, r5.w
mad_sat r5.w, r1.w, cb0[197].x, cb0[197].y
mad r6.x, r5.w, l(-2.000000), l(3.000000)
mul r5.w, r5.w, r5.w
mul r5.w, r5.w, r6.x
max r4.w, r4.w, l(0.000100)
div r0.w, r0.w, r4.w
min r0.w, r0.w, cb0[197].z
add r0.w, r0.w, l(-1.000000)
mad r0.w, r5.w, r0.w, l(1.000000)
mul r3.yzw, r0.wwww, r3.yyzw
eq r0.w, cb0[145].x, l(0.000000)
if_nz r0.w
  utof r0.w, cb0[144].y
  mad r6.xy, r0.wwww, l(32.665001, 11.815000, 0.000000, 0.000000), v7.xyxx
  dp2 r0.w, r6.xyxx, l(0.0671105608, 0.00583714992, 0.000000, 0.000000)
  frc r0.w, r0.w
  mul r0.w, r0.w, l(52.982918)
  frc r0.w, r0.w
  add r0.w, r0.w, l(-0.500000)
  mul r6.xyzw, r1.yyyy, cb0[1].xyzw
  mad r6.xyzw, r1.xxxx, cb0[0].xyzw, r6.xyzw
  mad r6.xyzw, r1.zzzz, cb0[2].xyzw, r6.xyzw

//PS
  add r6.xyzw, r6.xyzw, cb0[3].xyzw
  mad r1.xyz, r11.yzwy, v7.wwww, r1.xyzx
  mul r11.xyzw, r1.yyyy, cb0[1].xyzw
  mad r11.xyzw, r1.xxxx, cb0[0].xyzw, r11.xyzw
  mad r11.xyzw, r1.zzzz, cb0[2].xyzw, r11.xyzw
  add r11.xyzw, r11.xyzw, cb0[3].xyzw

ld_indexable(texture2d)(float,float,float,float) r19.xyzw, l(0, 0, 0, 0), t125.xyzw
add r19.w, r6.w, -r19.y
mad r6.x, r19.x, r19.w, r6.x

add r19.w, r11.w, -r19.y
mad r11.x, r19.x, r19.w, r11.x

  rcp r1.x, r6.w
  mul r1.xyz, r1.xxxx, r6.xyzx
  rcp r4.w, r11.w
  mad r6.xy, v7.wwww, cb0[30].zwzz, r6.zwzz
  rcp r5.w, r6.y
  mad r6.yzw, r11.xxyz, r4.wwww, -r1.xxyz
  dp2 r4.w, r6.yzyy, r6.yzyy
  sqrt r4.w, r4.w
  mul r8.w, r4.w, l(0.500000)
  mad r11.xy, r1.xyxx, r8.wwww, r6.yzyy
  mad r11.xy, -r4.wwww, l(0.500000, 0.500000, 0.000000, 0.000000), |r11.xyxx|
  max r11.xy, r11.xyxx, l(0.000000, 0.000000, 0.000000, 0.000000)
  div r11.xy, r11.xyxx, |r6.yzyy|
  add r11.xy, -r11.xyxx, l(1.000000, 1.000000, 0.000000, 0.000000)
  min r4.w, r11.y, r11.x
  div r4.w, r4.w, r8.w
  mul r6.yzw, r4.wwww, r6.yyzw
  mad r4.w, -r6.x, r5.w, r1.z
  mul r4.w, r4.w, l(4.000000)
  max r4.w, r4.w, |r6.w|
  mad r11.xy, r1.xyxx, l(0.500000, -0.500000, 0.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)
  mul r1.xy, r11.xyxx, cb1[135].xyxx
  mul r6.yz, r6.yyzy, cb1[135].xxyx
  mul r5.w, r4.w, l(0.0833333358)
  mul r6.xyz, r6.yzwy, l(0.0416666679, -0.0416666679, 0.0833333358, 0.000000)
  mad r1.xyz, r6.xyzx, r0.wwww, r1.xyzx
  mov r0.w, l(1.000000)
  mov r13.x, l(0)
  mov r11.xyz, l(0,0,0,0)
  mov r6.w, l(0)
  mov r8.w, l(0)
  mov r9.w, l(0)
  mov r10.w, l(0)
  mov r12.xw, l(0,0,0,0)
  loop
    uge r13.w, r12.w, l(12)
    breakc_nz r13.w
    utof r13.w, r12.w
    add r14.xyzw, r13.wwww, l(1.000000, 2.000000, 3.000000, 4.000000)
    mad r15.xyzw, r14.xxxy, r6.xyzz, r1.xyzz
    mad r16.xyzw, r14.yyzz, r6.xyxy, r1.xyxy
    mad r14.xyzw, r14.wwzw, r6.xyzz, r1.xyzz
    mad r13.w, r1.w, l(0.666666687), r0.w
    mad r17.x, r1.w, l(0.666666687), r13.w
    sample_l_indexable(texture2d)(float,float,float,float) r18.x, r15.xyxx, t7.xyzw, s2, r0.w
    sample_l_indexable(texture2d)(float,float,float,float) r18.y, r16.xyxx, t7.yxzw, s2, r0.w
    sample_l_indexable(texture2d)(float,float,float,float) r18.z, r16.zwzz, t7.yzxw, s2, r13.w
    sample_l_indexable(texture2d)(float,float,float,float) r18.w, r14.xyxx, t7.yzwx, s2, r13.w
    mov r14.xy, r15.zwzz
    add r14.xyzw, -r18.xyzw, r14.xyzw
    mad r15.xyzw, r4.wwww, l(0.0833333358, 0.0833333358, 0.0833333358, 0.0833333358), r14.xyzw
    lt r15.xyzw, |r15.xyzw|, r5.wwww
    or r16.xy, r15.zwzz, r15.xyxx
    or r13.w, r16.y, r16.x
    if_nz r13.w
      mov r13.x, r14.x
      mov r11.xyz, r14.yzwy
      mov r6.w, r15.x
      mov r8.w, r15.y
      mov r9.w, r15.z
      mov r10.w, l(-1)
      break
    endif
    mov r12.x, r14.w
    iadd r12.w, r12.w, l(4)
    mov r0.w, r17.x
    mov r13.x, r14.x
    mov r11.xyz, r14.yzwy
    mov r6.w, r15.x
    mov r8.w, r15.y
    mov r9.w, r15.z
    mov r10.w, r13.w
  endloop
  if_nz r10.w
    mov r11.w, l(2.000000)
    mov r14.xy, r11.yzyy
    mov r14.z, l(3.000000)
    movc r11.yzw, r9.wwww, r11.xxyw, r14.xxyz
    mov r13.y, r11.x
    mov r13.z, l(1.000000)
    movc r11.xyz, r8.wwww, r13.xyzx, r11.yzwy
    mov r12.y, r13.x
    mov r12.z, l(0)
    movc r11.xyz, r6.wwww, r12.xyzx, r11.xyzx
    utof r0.w, r12.w
    add r0.w, r0.w, r11.z
    add r4.w, -r11.y, r11.x
    div_sat r4.w, r11.x, r4.w
    add r0.w, r0.w, r4.w
    mad r1.xyz, r6.xyzx, r0.wwww, r1.xyzx
ld_indexable(texture2d)(float,float,float,float) r26.xyzw, l(0, 0, 0, 0), t125.xyzw
mov r27.xyz, r1.xyz
mul r27.xy, r1.xyxx, cb1[135].zwzz
div r26.w, r26.y, r22.x
add r26.w, l(-1.0), r26.w
mad r27.x, r26.w, r26.x, r27.x
mad r27.xy, r27.xyxx, l(2.000000, -2.000000, 0.000000, 0.000000), l(-1.000000, 1.000000, 0.000000, 0.000000)
mul r27.xy, r27.xyxx, cb0[66].xyxx
div r27.xy, r27.xyxx, cb0[66].xyxx
    mul r1.xy, r1.xyxx, cb1[135].zwzz

//PS
    mad r1.xy, r1.xyxx, l(2.000000, -2.000000, 0.000000, 0.000000), l(-1.000000, 1.000000, 0.000000, 0.000000)
    mul r1.xy, r1.xyxx, cb0[66].xyxx

//PS
    div r1.xy, r1.xyxx, cb0[66].xyxx

//PS
    mul r6.xyz, r1.yyyy, cb0[123].xywx
    mad r6.xyz, r1.xxxx, cb0[122].xywx, r6.xyzx
    mad r6.xyz, r1.zzzz, cb0[124].xywx, r6.xyzx
    add r6.xyz, r6.xyzx, cb0[125].xywx

    div r6.xy, r6.xyxx, r6.zzzz
lt r28.y, r1.x, l(-0.7)
ge r28.z, r1.x, l(0.7)
mul r28.x, cb0[124].z, cb0[125].x
mul r28.x, r28.x, l(1.8)
if_nz r28.y
mad r6.x, r6.z, -r28.x, r6.x
endif
if_nz r28.z
mad r6.x, r6.z, -r28.x, r6.x
endif
    mad r6.zw, r6.xxxy, cb1[136].xxxy, cb1[136].zzzw

mad_sat r1.xy, |r27.xyxx|, l(5.000000, 5.000000, 0.000000, 0.000000), l(-4.000000, -4.000000, 0.000000, 0.000000)
    dp2 r0.w, r1.xyxx, r1.xyxx
    add r0.w, -r0.w, l(1.000000)
    max r0.w, r0.w, l(0.000000)
    mad_sat r1.xy, |r6.xyxx|, l(5.000000, 5.000000, 0.000000, 0.000000), l(-4.000000, -4.000000, 0.000000, 0.000000)
    dp2 r1.x, r1.xyxx, r1.xyxx
    add r1.x, -r1.x, l(1.000000)
    max r1.x, r1.x, l(0.000000)
    min r0.w, r0.w, r1.x
    sample_l_indexable(texture2d)(float,float,float,float) r1.xyz, r6.zwzz, t8.xyzw, s3, l(0.000000)
    min r1.xyz, -r1.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
    mad_sat r4.w, -r1.w, l(6.600000), l(2.000000)
    mul r0.w, r0.w, r4.w
    mov r4.w, l(1.000000)
    mul r1.xyz, r0.wwww, -r1.xyzx
    mul r1.xyz, r1.xyzx, cb1[137].xxxx
    mad r0.w, -r4.w, r0.w, l(1.000000)
    mad r3.yzw, r3.yyzw, r0.wwww, r1.xxyz
  endif
endif
mad r6.xyzw, r1.wwww, l(-1.000000, -0.027500, -0.572000, 0.022000), l(1.000000, 0.042500, 1.040000, -0.040000)
mul r0.w, r6.x, r6.x
mul r1.x, r3.x, l(-9.280000)
exp r1.x, r1.x
min r0.w, r0.w, r1.x
mad r0.w, r0.w, r6.x, r6.y
mad r1.xy, r0.wwww, l(-1.040000, 1.040000, 0.000000, 0.000000), r6.zwzz
mul r0.w, r8.y, l(50.000000)
mov_sat r0.w, r0.w
mul r0.w, r1.y, r0.w
mad r1.xyz, r8.xyzx, r1.xxxx, r0.wwww
dp3 r0.w, cb1[86].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, cb1[86].xyzw, r2.xyzw
  mad_sat r0.w, |r0.w|, cb1[93].x, cb1[93].y
  add r0.w, -r0.w, l(1.000000)
  add r6.xyz, r2.xyzx, -cb1[87].xyzx
  dp3 r2.w, r6.xyzx, cb1[88].xyzx
  add r2.w, -|r2.w|, cb1[88].w
  mul_sat r2.w, r2.w, cb1[93].x
  dp3 r3.x, r6.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 r0.w, r0.w, r2.w
  dp3 r2.w, cb1[86].yzxy, r0.xyzx
  mad_sat r2.w, r2.w, cb1[94].x, cb1[94].y
  add r1.w, r1.w, l(-0.200000)
  mul_sat r1.w, r1.w, l(10.000000)
  add r1.w, -r1.w, l(1.000000)
  mul r0.w, r0.w, r2.w
  mul r0.w, r1.w, r0.w
  lt r1.w, l(0.000000), r0.w
  if_nz r1.w
    add r6.xyz, r2.xyzx, -cb0[67].xyzx
    dp3 r1.w, r6.xyzx, r6.xyzx
    rsq r1.w, r1.w
    mul r6.xyz, r1.wwww, r6.xyzx
    dp3 r1.w, r6.xyzx, -cb1[86].xyzx
    add r1.w, r1.w, r1.w
    mad r6.xyz, cb1[86].xyzx, r1.wwww, r6.xyzx
    mul r11.xyz, r0.xxxx, cb1[91].xyzx
    mad r11.xyz, r0.zzzz, cb1[90].xyzx, r11.xyzx
    mad r11.xyz, r0.yyyy, cb1[92].xyzx, r11.xyzx
    dp3 r1.w, r6.xyzx, r11.xyzx
    add r1.w, r1.w, r1.w
    mad r6.xyz, r11.xyzx, -r1.wwww, r6.xyzx
    mad r6.xyz, r6.xyzx, cb1[93].zzzz, r2.xyzx
    add r6.xyz, r6.xyzx, cb0[70].xyzx
    mul r11.xyz, r6.yyyy, cb0[13].xyzx
    mad r6.xyw, r6.xxxx, cb0[12].xyxz, r11.xyxz

//PS
    mad r6.xyz, r6.zzzz, cb0[14].xyzx, r6.xywx
    add r6.xyz, r6.xyzx, cb0[15].xyzx
    ishl r1.w, cb0[197].w, l(2)
    mul r11.xyz, r6.yyyy, cb1[r1.w + 96].xywx
    mad r6.xyw, r6.xxxx, cb1[r1.w + 95].xyxw, r11.xyxz
    mad r6.xyz, r6.zzzz, cb1[r1.w + 97].xywx, r6.xywx
    add r6.xyz, r6.xyzx, cb1[r1.w + 98].xywx
    movc r1.w, cb1[105].z, cb0[197].w, l(0)

ld_indexable(texture2d)(float,float,float,float) r29.xyzw, l(0, 0, 0, 0), t125.xyzw
mad r6.x, r29.x, r6.z, r6.x
    div r6.xy, r6.xyxx, r6.zzzz

    max r6.xy, r6.xyxx, -cb1[105].xyxx
    min r6.xy, r6.xyxx, cb1[105].xyxx
    mad r6.xy, r6.xyxx, cb1[r1.w + 103].xyxx, cb1[r1.w + 103].zwzz
    sample_l_indexable(texture2d)(float,float,float,float) r6.xyzw, r6.xyxx, t5.xyzw, s1, l(0.000000)
    mul r0.w, r0.w, r6.w
  else
    mov r6.xyz, l(0,0,0,0)
    mov r0.w, l(0)
  endif
  add r0.w, -r0.w, l(1.000000)
  mad r3.yzw, r0.wwww, r3.yyzw, r6.xxyz
endif
mul r1.xyz, r1.xyzx, r3.yzwy
mad r3.xyz, r8.xyzx, l(2.040400, 2.040400, 2.040400, 0.000000), l(-0.332400, -0.332400, -0.332400, 0.000000)
mad r3.xyz, r8.xyzx, l(-4.795100, -4.795100, -4.795100, 0.000000), r3.xyzx
mad r3.xyz, r8.xyzx, l(2.755200, 2.755200, 2.755200, 0.000000), r3.xyzx
add r3.xyz, r3.xyzx, l(1.332000, 1.332000, 1.332000, 0.000000)
max r3.xyz, r3.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
lt r0.w, l(0.000000), cb1[114].w
if_nz r0.w

  mul r6.xyz, r2.yyyy, cb0[5].xywx
  mad r6.xyz, r2.xxxx, cb0[4].xywx, r6.xyzx

  mad r6.xyz, r2.zzzz, cb0[6].xywx, r6.xyzx
  add r6.xyz, r6.xyzx, cb0[7].xywx

ld_indexable(texture2d)(float,float,float,float) r30.xyzw, l(0, 0, 0, 0), t125.xyzw
add r30.w, r6.z, -r30.y
mad r6.x, r30.w, r30.x, r6.x
  div r6.xy, r6.xyxx, r6.zzzz

//add r6.x, r6.x, r30.x
  mad r11.xy, r6.xyxx, l(0.500000, -0.500000, 0.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)

  mad r0.w, r6.z, cb0[209].x, cb0[209].y
  log r0.w, r0.w
  mul r0.w, r0.w, cb0[209].z
  mul r11.z, r0.w, cb0[208].z
  sample_l_indexable(texture3d)(float,float,float,float) r6.xyzw, r11.xyzx, t6.xyzw, s0, l(0.000000)
  mul r11.x, r6.w, v6.w
  mad r6.xyz, v6.xyzx, r6.wwww, r6.xyzx
else
  mov r6.xyz, v6.xyzx
  mov r11.x, v6.w
endif
add r11.yzw, r2.xxyz, -cb0[148].xxyz
mul r12.xyz, r11.yzwy, cb0[150].xyzx
add r13.xyz, r2.xyzx, -cb0[149].xyzx
mul r13.xyz, r13.xyzx, cb0[151].xyzx
mad r11.yzw, r11.yyzw, cb0[150].xxyz, l(0.000000, -0.500000, -0.500000, -0.500000)
add r11.yzw, -|r11.yyzw|, l(0.000000, 0.500000, 0.500000, 0.500000)
mul_sat r11.yzw, r11.yyzw, l(0.000000, 6.000000, 6.000000, 6.000000)
mul r0.w, r11.z, r11.y
mul r0.w, r11.w, r0.w
sample_l_indexable(texture3d)(float,float,float,float) r11.yzw, r12.xyzx, t9.wxyz, s0, l(0.000000)
sample_l_indexable(texture3d)(float,float,float,float) r14.xyz, r13.xyzx, t10.xyzw, s0, l(0.000000)
add r11.yzw, r11.yyzw, -r14.xxyz
mad r11.yzw, r0.wwww, r11.yyzw, r14.xxyz
sample_l_indexable(texture3d)(float,float,float,float) r12.xyz, r12.xyzx, t11.xyzw, s0, l(0.000000)
sample_l_indexable(texture3d)(float,float,float,float) r13.xyz, r13.xyzx, t12.xyzw, s0, l(0.000000)
add r12.xyz, r12.xyzx, -r13.xyzx
mad r12.xyz, r0.wwww, r12.xyzx, r13.xyzx
dp3 r0.w, r11.yzwy, l(0.300000, 0.590000, 0.110000, 0.000000)
add r0.w, r0.w, l(0.000010)
div r13.xyz, r11.yzwy, r0.wwww
mul r14.yzw, r12.xxyz, r13.xxxx
mul r15.yzw, r12.xxyz, r13.yyyy
mul r12.yzw, r12.xxyz, r13.zzzz
mul r0.yzw, r0.xxyz, l(0.000000, -1.02332771, 1.02332771, -1.02332771)
mov r14.x, r11.y
mov r0.x, l(0.886227548)
dp4 r13.x, r14.xyzw, r0.xyzw
mov r15.x, r11.z
dp4 r13.y, r15.xyzw, r0.xyzw
mov r12.x, r11.w
dp4 r13.z, r12.xyzw, r0.xyzw
max r0.xyz, r13.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
mul r0.xyz, r0.xyzx, r9.xyzx
mad r0.xyz, r1.xyzx, r3.xyzx, r0.xyzx
mad r1.xyz, r8.xyzx, l(0.450000, 0.450000, 0.450000, 0.000000), r9.xyzx
add r1.xyz, -r0.xyzx, r1.xyzx
mad r0.xyz, cb0[145].yyyy, r1.xyzx, r0.xyzx
max r7.xyz, r4.xyzx, l(0.000000, 0.000000, 0.000000, 0.000000)
lt r0.w, l(0.000000), cb0[140].x
if_nz r0.w
  imad r1.xy, v5.xxxx, l(36, 36, 0, 0), l(5, 19, 0, 0)
  ld_structured_indexable(structured_buffer, stride=16)(mixed,mixed,mixed,mixed) r1.xzw, r1.x, l(0), t0.xxyz
  add r1.xzw, -r1.xxzw, r2.xxyz
  ld_structured_indexable(structured_buffer, stride=16)(mixed,mixed,mixed,mixed) r3.xyz, r1.y, l(0), t0.xyzx
  add r3.xyz, r3.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
  lt r1.xyz, r3.xyzx, |r1.xzwx|
  or r0.w, r1.y, r1.x
  or r0.w, r1.z, r0.w
  dp3 r1.x, r2.xyzx, l(0.577000, 0.577000, 0.577000, 0.000000)
  mul r1.x, r1.x, l(0.002000)
  frc r1.x, r1.x
  lt r1.x, l(0.500000), r1.x
  movc r1.yzw, r1.xxxx, l(0,0,1.000000,1.000000), l(0,1.000000,1.000000,0)
  mov r1.x, l(1.000000)
  movc r7.xyzw, r0.wwww, r1.yzwx, r7.xyzw
  mov o0.w, r7.w
else
  mov o0.w, r7.w
endif
mad r0.xyz, r10.xyzx, r5.xyzx, r0.xyzx
add r0.xyz, r7.xyzx, r0.xyzx
mad r0.xyz, r0.xyzx, r11.xxxx, r6.xyzx
mul o0.xyz, r0.xyzx, cb0[135].yyyy
ret
// Approximately 0 instruction slots used
