// MANUALLY DUMPED [ShaderRegex_LightingPS1] P5S water haloing PS 1.
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384
//
//   using 3Dmigoto v1.3.16 on Thu Mar 03 23:05:52 2022
//
//
// Buffer Definitions:
//
// cbuffer $Globals
// {
//
//   float4 litDir[4];                  // Index:    0 1 2 3          Components:    16
//   float4 litCol[4];                  // Index:    4 5 6 7          Components:    16
//   float4 litOcc;                     // Index:    8.xyzw           Components:     4
//   float4 ambLit;                     // Index:    9.xyzw           Components:     4
//   int nDirLit;                       // Index:   10.x              Components:     1
//   float4 vEye;                       // Index:   11.xyzw           Components:     4
//   float2 vOccRate;                   // Index:   12.xy             Components:     2
//      = 0x3f800000 0x3f800000
//   float4 vClstZPrm;                  // Index:   13.xyzw           Components:     4
//   int nClstPtch[2];                  // Index:   14-15.x           Components:     5
//   float fClstScl;                    // Index:   15.y              Components:     1 [unused]
//   float2 vFadeDist;                  // Index:   15.zw             Components:     2
//   float3 vCameraPos;                 // Index:   16.xyz            Components:     3
//   float3 vCameraDir;                 // Index:   17.xyz            Components:     3
//   float2 vD2Z;                       // Index:   18.xy             Components:     2
//   float4 mRrW2T[3];                  // Index:   19 20 21          Components:    12
//   row_major float4x4 mV2W;           // Index:   22 23 24 25       Components:    16
//   row_major float4x4 mP2W;           // Index:   26 27 28 29       Components:    16
//   float fAmbMapsDORate;              // Index:   30.x              Components:     1
//      = 0x00000000
//   float4 vAmbDifScl;                 // Index:   31.xyzw           Components:     4
//      = 0x3f800000 0x3f800000 0x3f800000 0x3f800000
//   float4 vAmbSpcScl;                 // Index:   32.xyzw           Components:     4
//      = 0x3f800000 0x3f800000 0x3f800000 0x3f800000
//   float4 vTsbViewPort;               // Index:   33.xyzw           Components:     4
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// __smpsIES                         sampler      NA          NA    0        1
// __smpsDepthMap                    sampler      NA          NA    1        1
// __smpsGxAmbLut                    sampler      NA          NA    2        1
// __smpsAmbSpc                      sampler      NA          NA    3        1
// __smpsTrnsSpc                     sampler      NA          NA    4        1
// sIES                              texture  float4     2darray    0        1
// sDepthMap                         texture  float4          2d    1        1
// sGxAmbLut                         texture  float4          2d    2        1
// sAmbSpc                           texture  float4        cube    3        1
// sTrnsSpc                          texture  float4          2d    4        1
// sDepth                            texture  float4          2d    5        1
// sGBuf0                            texture  float4          2d    6        1
// sGBuf1                            texture  float4     2darray    7        1
// sGBuf2                            texture  float4          2d    8        1
// sGBuf3                            texture  float4     2darray    9        1
// tCllLightIndices                  texture    uint         buf   16        1
// tCllLightPositions                texture  float4         buf   17        1
// tCllLightAttributes               texture  float3         buf   18        1
// tCllLightExAttributes             texture    uint         buf   19        1
// tCllSptLightAttributes            texture  float3         buf   20        1
// tCllSptLightExAttributes          texture    uint         buf   21        1
// $Globals                          cbuffer      NA          NA    0        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float   xy
// TEXCOORD                 0   xyzw        1     NONE   float   xy w
//
//
// 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[34], 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_resource_texture2darray (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t1
dcl_resource_texture2d (float,float,float,float) t2
dcl_resource_texturecube (float,float,float,float) t3
dcl_resource_texture2d (float,float,float,float) t4
dcl_resource_texture2d (float,float,float,float) t5
dcl_resource_texture2d (float,float,float,float) t6
dcl_resource_texture2darray (float,float,float,float) t7
dcl_resource_texture2d (float,float,float,float) t8
dcl_resource_texture2darray (float,float,float,float) t9
dcl_resource_buffer (uint,uint,uint,uint) t16
dcl_resource_buffer (float,float,float,float) t17
dcl_resource_buffer (float,float,float,float) t18
dcl_resource_buffer (uint,uint,uint,uint) t19
dcl_resource_buffer (float,float,float,float) t20
dcl_resource_buffer (uint,uint,uint,uint) t21
dcl_input_ps_siv linear noperspective v0.xy, position
dcl_input_ps linear v1.xyw
dcl_output o0.xyzw
dcl_temps 48
dcl_resource_texture2d (float,float,float,float) t125
ftoi r0.xy, v0.xyxx
mov r0.zw, l(0,0,1,0)
ld_indexable(texture2d)(float,float,float,float) r1.xyzw, r0.xyww, t6.xyzw
ld_indexable(texture2darray)(float,float,float,float) r2.xyzw, r0.xyww, t7.xyzw
ld_indexable(texture2d)(float,float,float,float) r3.xyz, r0.xyww, t8.xyzw
ld_indexable(texture2darray)(float,float,float,float) r4.xyz, r0.xyww, t9.xyzw
ld_indexable(texture2darray)(float,float,float,float) r5.xyz, r0.xyzw, t9.xyzw
mov r0.z, l(3)
ld_indexable(texture2darray)(float,float,float,float) r6.xyz, r0.xyzw, t7.xywz
ld_indexable(texture2d)(float,float,float,float) r0.x, r0.xyww, t5.xyzw
ld_indexable(texture2d)(float,float,float,float) r33.xyzw, l(0, 0, 0, 0), t125.xyzw
mov r34.x, v1.x
mul r35.xyzw, v1.yyyy, cb0[27].xyzw
mad r35.xyzw, r34.xxxx, cb0[26].xyzw, r35.xyzw
mad r35.xyzw, r0.xxxx, cb0[28].xyzw, r35.xyzw
add r35.xyzw, r35.xyzw, cb0[29].xyzw
add r34.x, -r33.x, r34.x
mul r36.xyzw, v1.yyyy, cb0[27].xyzw
mad r36.xyzw, r34.xxxx, cb0[26].xyzw, r36.xyzw
mad r36.xyzw, r0.xxxx, cb0[28].xyzw, r36.xyzw
add r36.xyzw, r36.xyzw, cb0[29].xyzw
div r36.yzw, r36.xxyz, r36.wwww
mul r37.w, r33.y, r35.w
mad r34.x, r33.x, r37.w, r34.x
mul r7.xyzw, v1.yyyy, cb0[27].xyzw
mad r7.xyzw, r34.xxxx, cb0[26].xyzw, r7.xyzw
mad r7.xyzw, r0.xxxx, cb0[28].xyzw, r7.xyzw
add r7.xyzw, r7.xyzw, cb0[29].xyzw
div r0.yzw, r7.xxyz, r7.wwww
add r7.xyz, -r36.yzwy, cb0[11].xyzx
dp3 r3.w, r7.xyzx, r7.xyzx
rsq r3.w, r3.w
mul r8.xyz, r3.wwww, r7.xyzx
add r4.w, r2.w, r2.w
mad r3.xy, r3.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(-1.000000, -1.000000, 0.000000, 0.000000)
add r9.xyz, -|r3.xyxx|, l(1.000000, 1.000000, 1.000000, 0.000000)
add r10.z, -|r3.y|, r9.x
ge r5.w, r10.z, l(0.000000)
ge r9.xw, r3.xxxy, l(0.000000, 0.000000, 0.000000, 0.000000)
movc r9.xw, r9.xxxw, l(1.000000,0,0,1.000000), l(-1.000000,0,0,-1.000000)
mul r9.xy, r9.xwxx, r9.yzyy
movc r10.xy, r5.wwww, r3.xyxx, r9.xyxx
dp3 r3.x, r10.xyzx, r10.xyzx
rsq r3.x, r3.x
mul r9.xyz, r3.xxxx, r10.xyzx
mul r10.xyz, r9.yyyy, cb0[23].xyzx
mad r9.xyw, r9.xxxx, cb0[22].xyxz, r10.xyxz
mad r9.xyz, r9.zzzz, cb0[24].xyzx, r9.xywx
mul r3.x, r3.z, l(65535.000000)
ftou r3.x, r3.x
ushr r3.x, r3.x, l(8)
utof r3.x, r3.x
mul r3.y, r3.x, l(0.00392156886)
mad r3.x, r3.x, l(0.00392156886), l(1.000000)

add r10.xyz, -r36.yzwy, cb0[16].xyzx
max r11.xyz, r1.xyzx, l(0.000100, 0.000100, 0.000100, 0.000000)
min r11.xyz, r11.xyzx, l(0.999900, 0.999900, 0.999900, 0.000000)
log r11.xyz, r11.xyzx
mul r11.xyz, r11.xyzx, l(0.693147182, 0.693147182, 0.693147182, 0.000000)
max r5.yw, r5.yyyz, l(0.000000, 0.000100, 0.000000, 0.000000)
div r11.xyz, -r11.xyzx, r5.yyyy
mul r11.xyz, r5.wwww, -r11.xyzx
mul r11.xyz, r11.xyzx, l(1.442695, 1.442695, 1.442695, 0.000000)
exp r11.xyz, r11.xyzx
dp3 r12.x, r9.xyzx, r8.xyzx
mov_sat r3.z, r12.x
add r5.y, r1.w, r3.z
mad r5.y, r5.y, r5.y, r1.w
add_sat r5.y, r5.y, l(-1.000000)
dp3 r13.x, r9.xyzx, -cb0[0].xyzx
lt r5.w, r13.x, l(0.000000)
lt r6.w, l(1.000000), r3.x
and r5.w, r5.w, r6.w
add r7.w, r13.x, r13.x
mad r14.yzw, r9.xxyz, r7.wwww, cb0[0].xxyz
mov r14.x, -r13.x
mul r15.xyz, r11.xyzx, cb0[4].xyzx
mad r16.xyz, r7.xyzx, r3.wwww, -r14.yzwy
dp3 r7.w, r16.xyzx, r16.xyzx
rsq r7.w, r7.w
mul r16.xyz, r7.wwww, r16.xyzx
dp3_sat r7.w, r8.xyzx, r16.xyzx
add r16.xyz, -r2.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
add r7.w, -r7.w, l(1.000000)
mul r8.w, r7.w, r7.w
mul r8.w, r8.w, r8.w
mul r7.w, r7.w, r8.w
mad r17.xyz, r16.xyzx, r7.wwww, r2.xyzx
add r18.xyz, -r17.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
add r3.x, -r3.x, l(2.000000)
mul r19.xyz, r3.xxxx, r18.xyzx
mad r17.xyz, r18.xyzx, r3.xxxx, r17.xyzx
add r17.xyz, -r17.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
mul r18.xyz, r3.yyyy, r19.xyzx
movc r17.xyz, r5.wwww, r17.yzxy, l(-1.000000,-1.000000,-1.000000,0)
movc r18.xyz, r5.wwww, r18.xyzx, l(-1.000000,-1.000000,-1.000000,0)
movc r15.xyz, r5.wwww, r15.xyzx, cb0[4].xyzx
mov r13.yzw, cb0[0].xxyz
movc r14.xyzw, r5.wwww, r14.xyzw, r13.xyzw
mad r14.yzw, r7.xxyz, r3.wwww, -r14.yyzw
dp3 r5.w, r14.yzwy, r14.yzwy
rsq r5.w, r5.w
mul r14.yzw, r5.wwww, r14.yyzw
dp3 r5.w, r8.xyzx, r14.yzwy
ge r7.w, r17.z, l(0.000000)
mov_sat r8.w, r5.w
add r8.w, -r8.w, l(1.000000)
mul r9.w, r8.w, r8.w
mul r9.w, r9.w, r9.w
mul r8.w, r8.w, r9.w
mad r19.xyz, r16.xyzx, r8.wwww, r2.xyzx
movc r19.xyz, r7.wwww, r17.zxyz, r19.xyzx
mul r4.w, r4.w, r4.w
mul r8.w, r4.w, r4.w
dp3 r9.w, r9.xyzx, r14.yzwy
mul r10.w, r8.w, r8.w
mul r9.w, r9.w, r9.w
mad r11.w, r8.w, r8.w, l(-1.000000)
mad r9.w, r9.w, r11.w, l(1.000000)
max r9.w, r9.w, l(0.000100)
mul r9.w, r9.w, r9.w
mul r9.w, r9.w, l(4.000000)
div r9.w, r10.w, r9.w
mul r12.z, r8.w, l(0.500000)
mad r8.w, -r8.w, l(0.500000), l(1.000000)
mad r5.w, r5.w, r8.w, r12.z
mul r5.w, r5.w, r5.w
div r5.w, l(1.000000, 1.000000, 1.000000, 1.000000), r5.w
mul r5.w, r5.w, r9.w
mul r14.yzw, r5.wwww, r19.xxyz
mul r14.yzw, r15.xxyz, r14.yyzw
mov_sat r14.x, r14.x
mul r13.zw, cb0[8].xxxx, cb0[12].yyyx
mad r19.xy, -cb0[12].yxyy, cb0[8].xxxx, l(1.000000, 1.000000, 0.000000, 0.000000)
mad r5.w, r5.y, r13.z, r19.x
mul r5.w, r5.w, r14.x
mul r14.yzw, r5.wwww, r14.yyzw
mul r15.xyz, r14.xxxx, r15.xyzx
mul r19.xzw, r3.xxxx, r16.xxyz
movc r20.xyz, r7.wwww, r18.xyzx, r19.xzwx
mul r15.xyz, r15.xyzx, r20.xyzx
mad r5.w, r1.w, r13.w, r19.y
mul r15.xyz, r5.wwww, r15.xyzx
mul r15.xyz, r6.zzzz, r15.xyzx
mul r14.xyz, r6.zzzz, r14.yzwy
ilt r5.w, l(0), cb0[10].x
if_nz r5.w
  dp3 r20.x, r9.xyzx, -cb0[1].xyzx
  lt r5.w, r20.x, l(0.000000)
  and r5.w, r6.w, r5.w
  add r7.w, r20.x, r20.x
  mad r21.yzw, r9.xxyz, r7.wwww, cb0[1].xxyz
  mov r21.x, -r20.x
  mul r22.xyz, r11.xyzx, cb0[5].xyzx
  mad r23.xyz, r7.xyzx, r3.wwww, -r21.yzwy
  dp3 r7.w, r23.xyzx, r23.xyzx
  rsq r7.w, r7.w
  mul r23.xyz, r7.wwww, r23.xyzx
  dp3_sat r7.w, r8.xyzx, r23.xyzx
  add r7.w, -r7.w, l(1.000000)
  mul r9.w, r7.w, r7.w
  mul r9.w, r9.w, r9.w
  mul r7.w, r7.w, r9.w
  mad r23.xyz, r16.xyzx, r7.wwww, r2.xyzx
  add r24.xyz, -r23.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
  mul r25.xyz, r3.xxxx, r24.xyzx
  mad r23.xyz, r24.xyzx, r3.xxxx, r23.xyzx
  add r23.xyz, -r23.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
  mul r24.xyz, r3.yyyy, r25.xyzx
  mov r17.w, l(-1.000000)
  movc r17.xyz, r5.wwww, r23.yzxy, r17.xywx
  movc r18.xyz, r5.wwww, r24.xyzx, r18.xyzx
  movc r22.xyz, r5.wwww, r22.xyzx, cb0[5].xyzx
  mov r20.yzw, cb0[1].xxyz
  movc r20.xyzw, r5.wwww, r21.xyzw, r20.xyzw
  mad r20.yzw, r7.xxyz, r3.wwww, -r20.yyzw
  dp3 r5.w, r20.yzwy, r20.yzwy
  rsq r5.w, r5.w
  mul r20.yzw, r5.wwww, r20.yyzw
  dp3 r5.w, r8.xyzx, r20.yzwy
  ge r7.w, r17.z, l(0.000000)
  mov_sat r9.w, r5.w
  add r9.w, -r9.w, l(1.000000)
  mul r12.w, r9.w, r9.w
  mul r12.w, r12.w, r12.w
  mul r9.w, r9.w, r12.w
  mad r21.xyz, r16.xyzx, r9.wwww, r2.xyzx
  movc r21.xyz, r7.wwww, r17.zxyz, r21.xyzx
  dp3 r9.w, r9.xyzx, r20.yzwy
  mul r9.w, r9.w, r9.w
  mad r9.w, r9.w, r11.w, l(1.000000)
  max r9.w, r9.w, l(0.000100)
  mul r9.w, r9.w, r9.w
  mul r9.w, r9.w, l(4.000000)
  div r9.w, r10.w, r9.w
  mad r5.w, r5.w, r8.w, r12.z
  mul r5.w, r5.w, r5.w
  div r5.w, l(1.000000, 1.000000, 1.000000, 1.000000), r5.w
  mul r5.w, r5.w, r9.w
  mul r20.yzw, r5.wwww, r21.xxyz
  mul r20.yzw, r22.xxyz, r20.yyzw
  mov_sat r20.x, r20.x
  mul r13.zw, cb0[8].yyyy, cb0[12].yyyx
  mad r21.xy, -cb0[12].yxyy, cb0[8].yyyy, l(1.000000, 1.000000, 0.000000, 0.000000)
  mad r5.w, r5.y, r13.z, r21.x
  mul r5.w, r5.w, r20.x
  mad r14.xyz, r20.yzwy, r5.wwww, r14.xyzx
  mul r20.xyz, r20.xxxx, r22.xyzx
  movc r21.xzw, r7.wwww, r18.xxyz, r19.xxzw
  mul r20.xyz, r20.xyzx, r21.xzwx
  mad r5.w, r1.w, r13.w, r21.y
  mad r15.xyz, r20.xyzx, r5.wwww, r15.xyzx
  ilt r5.w, l(1), cb0[10].x
  if_nz r5.w
    dp3 r20.x, r9.xyzx, -cb0[2].xyzx
    lt r5.w, r20.x, l(0.000000)
    and r5.w, r6.w, r5.w
    add r7.w, r20.x, r20.x
    mad r21.yzw, r9.xxyz, r7.wwww, cb0[2].xxyz
    mov r21.x, -r20.x
    mul r22.xyz, r11.xyzx, cb0[6].xyzx
    mad r23.xyz, r7.xyzx, r3.wwww, -r21.yzwy
    dp3 r7.w, r23.xyzx, r23.xyzx
    rsq r7.w, r7.w
    mul r23.xyz, r7.wwww, r23.xyzx
    dp3_sat r7.w, r8.xyzx, r23.xyzx
    add r7.w, -r7.w, l(1.000000)
    mul r9.w, r7.w, r7.w
    mul r9.w, r9.w, r9.w
    mul r7.w, r7.w, r9.w
    mad r23.xyz, r16.xyzx, r7.wwww, r2.xyzx
    add r24.xyz, -r23.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
    mul r25.xyz, r3.xxxx, r24.xyzx
    mad r23.xyz, r24.xyzx, r3.xxxx, r23.xyzx
    add r23.xyz, -r23.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
    mul r24.xyz, r3.yyyy, r25.xyzx
    mov r17.w, l(-1.000000)
    movc r17.xyz, r5.wwww, r23.yzxy, r17.xywx
    movc r18.xyz, r5.wwww, r24.xyzx, r18.xyzx
    movc r22.xyz, r5.wwww, r22.xyzx, cb0[6].xyzx
    mov r20.yzw, cb0[2].xxyz
    movc r20.xyzw, r5.wwww, r21.xyzw, r20.xyzw
    mad r20.yzw, r7.xxyz, r3.wwww, -r20.yyzw
    dp3 r5.w, r20.yzwy, r20.yzwy
    rsq r5.w, r5.w
    mul r20.yzw, r5.wwww, r20.yyzw
    dp3 r5.w, r8.xyzx, r20.yzwy
    ge r7.w, r17.z, l(0.000000)
    mov_sat r9.w, r5.w
    add r9.w, -r9.w, l(1.000000)
    mul r12.w, r9.w, r9.w
    mul r12.w, r12.w, r12.w
    mul r9.w, r9.w, r12.w
    mad r21.xyz, r16.xyzx, r9.wwww, r2.xyzx
    movc r21.xyz, r7.wwww, r17.zxyz, r21.xyzx
    dp3 r9.w, r9.xyzx, r20.yzwy
    mul r9.w, r9.w, r9.w
    mad r9.w, r9.w, r11.w, l(1.000000)
    max r9.w, r9.w, l(0.000100)
    mul r9.w, r9.w, r9.w
    mul r9.w, r9.w, l(4.000000)
    div r9.w, r10.w, r9.w
    mad r5.w, r5.w, r8.w, r12.z
    mul r5.w, r5.w, r5.w
    div r5.w, l(1.000000, 1.000000, 1.000000, 1.000000), r5.w
    mul r5.w, r5.w, r9.w
    mul r20.yzw, r5.wwww, r21.xxyz
    mul r20.yzw, r22.xxyz, r20.yyzw
    mov_sat r20.x, r20.x
    mul r13.zw, cb0[8].zzzz, cb0[12].yyyx
    mad r21.xy, -cb0[12].yxyy, cb0[8].zzzz, l(1.000000, 1.000000, 0.000000, 0.000000)
    mad r5.w, r5.y, r13.z, r21.x
    mul r5.w, r5.w, r20.x
    mad r14.xyz, r20.yzwy, r5.wwww, r14.xyzx
    mul r20.xyz, r20.xxxx, r22.xyzx
    movc r21.xzw, r7.wwww, r18.xxyz, r19.xxzw
    mul r20.xyz, r20.xyzx, r21.xzwx
    mad r5.w, r1.w, r13.w, r21.y
    mad r15.xyz, r20.xyzx, r5.wwww, r15.xyzx
    ilt r5.w, l(2), cb0[10].x
    if_nz r5.w
      dp3 r20.x, r9.xyzx, -cb0[3].xyzx
      lt r5.w, r20.x, l(0.000000)
      and r5.w, r6.w, r5.w
      add r7.w, r20.x, r20.x
      mad r21.yzw, r9.xxyz, r7.wwww, cb0[3].xxyz
      mov r21.x, -r20.x
      mul r22.xyz, r11.xyzx, cb0[7].xyzx
      mad r23.xyz, r7.xyzx, r3.wwww, -r21.yzwy
      dp3 r7.w, r23.xyzx, r23.xyzx
      rsq r7.w, r7.w
      mul r23.xyz, r7.wwww, r23.xyzx
      dp3_sat r7.w, r8.xyzx, r23.xyzx
      add r7.w, -r7.w, l(1.000000)
      mul r9.w, r7.w, r7.w
      mul r9.w, r9.w, r9.w
      mul r7.w, r7.w, r9.w
      mad r23.xyz, r16.xyzx, r7.wwww, r2.xyzx
      add r24.xyz, -r23.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
      mul r25.xyz, r3.xxxx, r24.xyzx
      mad r23.xyz, r24.xyzx, r3.xxxx, r23.xyzx
      add r23.xyz, -r23.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
      mul r24.xyz, r3.yyyy, r25.xyzx
      mov r17.w, l(-1.000000)
      movc r17.xyz, r5.wwww, r23.yzxy, r17.xywx
      movc r18.xyz, r5.wwww, r24.xyzx, r18.xyzx
      movc r22.xyz, r5.wwww, r22.xyzx, cb0[7].xyzx
      mov r20.yzw, cb0[3].xxyz
      movc r20.xyzw, r5.wwww, r21.xyzw, r20.xyzw
      mad r20.yzw, r7.xxyz, r3.wwww, -r20.yyzw
      dp3 r5.w, r20.yzwy, r20.yzwy
      rsq r5.w, r5.w
      mul r20.yzw, r5.wwww, r20.yyzw
      dp3 r5.w, r8.xyzx, r20.yzwy
      ge r7.w, r17.z, l(0.000000)
      mov_sat r9.w, r5.w
      add r9.w, -r9.w, l(1.000000)
      mul r12.w, r9.w, r9.w
      mul r12.w, r12.w, r12.w
      mul r9.w, r9.w, r12.w
      mad r21.xyz, r16.xyzx, r9.wwww, r2.xyzx
      movc r21.xyz, r7.wwww, r17.zxyz, r21.xyzx
      dp3 r9.w, r9.xyzx, r20.yzwy
      mul r9.w, r9.w, r9.w
      mad r9.w, r9.w, r11.w, l(1.000000)
      max r9.w, r9.w, l(0.000100)
      mul r9.w, r9.w, r9.w
      mul r9.w, r9.w, l(4.000000)
      div r9.w, r10.w, r9.w
      mad r5.w, r5.w, r8.w, r12.z
      mul r5.w, r5.w, r5.w
      div r5.w, l(1.000000, 1.000000, 1.000000, 1.000000), r5.w
      mul r5.w, r5.w, r9.w
      mul r20.yzw, r5.wwww, r21.xxyz
      mul r20.yzw, r22.xxyz, r20.yyzw
      mov_sat r20.x, r20.x
      mul r13.zw, cb0[8].wwww, cb0[12].yyyx
      mad r17.zw, -cb0[12].yyyx, cb0[8].wwww, l(0.000000, 0.000000, 1.000000, 1.000000)
      mad r5.w, r5.y, r13.z, r17.z
      mul r5.w, r5.w, r20.x
      mad r14.xyz, r20.yzwy, r5.wwww, r14.xyzx
      mul r20.xyz, r20.xxxx, r22.xyzx
      movc r21.xyz, r7.wwww, r18.xyzx, r19.xzwx
      mul r20.xyz, r20.xyzx, r21.xyzx
      mad r5.w, r1.w, r13.w, r17.w
      mad r15.xyz, r20.xyzx, r5.wwww, r15.xyzx
    endif
  endif
endif
mad r0.x, r0.x, cb0[13].x, cb0[13].y
log r5.w, r0.x
mad r5.w, r5.w, cb0[13].z, cb0[13].w
max r5.w, r5.w, l(0.000000)
ftou r5.w, r5.w
ult r7.w, r5.w, l(16)
if_nz r7.w
  mul r13.zw, v0.xxxy, l(0.000000, 0.000000, 0.015625, 0.015625)
  ftou r13.zw, r13.zzzw
  imul null, r7.w, r13.w, cb0[14].x
  imad r5.w, cb0[15].x, r5.w, r7.w
  iadd r5.w, r13.z, r5.w
  div r0.x, l(-1.000000), r0.x
  add r7.w, -cb0[15].w, cb0[15].z
  add r0.x, r0.x, -cb0[15].w
  div r7.w, l(1.000000, 1.000000, 1.000000, 1.000000), r7.w
  mul_sat r0.x, r0.x, r7.w
  mad r7.w, r0.x, l(-2.000000), l(3.000000)
  mul r0.x, r0.x, r0.x
  mul r0.x, r0.x, r7.w
  ishl r7.w, r5.w, l(2)
  ld_indexable(buffer)(uint,uint,uint,uint) r7.w, r7.wwww, t16.yzwx
  bfi r20.xyz, l(30, 30, 30, 0), l(2, 2, 2, 0), r5.wwww, l(1, 2, 3, 0)
  ld_indexable(buffer)(uint,uint,uint,uint) r5.w, r20.xxxx, t16.yzwx
  ishl r5.w, r5.w, l(16)
  or r5.w, r5.w, r7.w
  ld_indexable(buffer)(uint,uint,uint,uint) r7.w, r20.yyyy, t16.yzwx
  ld_indexable(buffer)(uint,uint,uint,uint) r9.w, r20.zzzz, t16.yzwx
  mov r20.x, l(1.000000)
  mov r21.x, l(-1.000000)
  mov r22.xyz, r15.xyzx
  mov r23.xyz, r18.xyzx
  mov r24.xyz, r14.xyzx
  mov r25.xy, r17.xyxx
  mov r12.w, l(0)
  loop
    uge r13.z, r12.w, r7.w
    breakc_nz r13.z
    iadd r13.z, r5.w, r12.w
    ld_indexable(buffer)(uint,uint,uint,uint) r13.z, r13.zzzz, t16.yzxw
    ld_indexable(buffer)(float,float,float,float) r26.xyzw, r13.zzzz, t17.xyzw
    mul r13.w, r26.w, r26.w
    add r26.xyz, -r0.yzwy, r26.xyzx
    dp3 r20.z, r26.xyzx, r26.xyzx
    lt r14.w, r20.z, r13.w
    if_nz r14.w
      imul null, r14.w, r13.z, l(3)
      ld_indexable(buffer)(float,float,float,float) r27.xyz, r14.wwww, t18.xyzw
      imad r15.w, l(3), r13.z, l(1)
      ld_indexable(buffer)(float,float,float,float) r28.xyz, r15.wwww, t18.xyzw
      mul r27.xyz, r0.xxxx, r27.xyzx
      ld_indexable(buffer)(uint,uint,uint,uint) r15.w, r15.wwww, t19.yzwx
      utof r15.w, r15.w
      mul r15.w, r15.w, l(0.00392156886)
      ld_indexable(buffer)(uint,uint,uint,uint) r14.w, r14.wwww, t19.yzwx
      rsq r16.w, r20.z
      mul r29.xyz, r16.wwww, -r26.xyzx
      ieq r17.z, r14.w, l(3)
      if_nz r17.z
        imad r13.z, l(3), r13.z, l(2)
        ld_indexable(buffer)(uint,uint,uint,uint) r17.z, r13.zzzz, t19.yzxw
        ld_indexable(buffer)(float,float,float,float) r30.xyz, r13.zzzz, t18.xyzw
        dp3 r13.z, -r26.xyzx, -r26.xyzx
        rsq r13.z, r13.z
        mul r26.xyz, r13.zzzz, -r26.xyzx
        dp3 r13.z, r26.xyzx, r30.xyzx
        mad r31.x, r13.z, l(-0.500000), l(0.500000)
        dp3 r17.w, r26.xyzx, r28.xyzx
        mad r13.z, -r13.z, r13.z, l(1.000000)
        rsq r13.z, r13.z
        mul r13.z, r13.z, r17.w
        mul r32.xyz, r28.zxyz, r30.yzxy
        mad r30.xyz, r28.yzxy, r30.zxyz, -r32.xyzx
        dp3 r17.w, r30.xyzx, r26.xyzx
        ge r17.w, r17.w, l(0.000000)
        mad r26.xy, r13.zzzz, l(-0.250000, 0.250000, 0.000000, 0.000000), l(0.250000, 0.750000, 0.000000, 0.000000)
        movc r31.y, r17.w, r26.x, r26.y
        utof r31.z, r17.z
        sample_l_indexable(texture2darray)(float,float,float,float) r13.z, r31.xyzx, t0.yzxw, s0, l(0.000000)
        mul r13.z, r13.w, r13.z
        div r13.z, r13.z, r20.z
        div r13.w, r20.z, r13.w
        add r13.w, -r13.w, l(1.000000)
        max r13.w, r13.w, l(0.000000)
        mul r13.z, r13.w, r13.z
      else
        ieq r13.w, r14.w, l(2)
        mul r14.w, -r20.z, r28.x
        mul r14.w, r14.w, l(1.442695)
        exp r14.w, r14.w
        mul_sat r14.w, r14.w, r28.y
        mul r20.y, r16.w, r20.z
        dp3 r16.w, r28.xyzx, r20.xyzx
        div r16.w, l(1.000000, 1.000000, 1.000000, 1.000000), r16.w
        movc r13.z, r13.w, r14.w, r16.w
      endif
      mul r20.yzw, r27.xxyz, r13.zzzz
      dp3 r13.z, r9.xyzx, -r29.xyzx
      lt r13.w, r13.z, l(0.000000)
      and r13.w, r6.w, r13.w
      if_nz r13.w
        add r13.w, r13.z, r13.z
        mad r29.xyz, r9.xyzx, r13.wwww, r29.xyzx
        mul r20.yzw, r11.xxyz, r20.yyzw
        mad r26.xyz, r7.xyzx, r3.wwww, -r29.xyzx
        dp3 r13.w, r26.xyzx, r26.xyzx
        rsq r13.w, r13.w
        mul r26.xyz, r13.wwww, r26.xyzx
        dp3_sat r13.w, r8.xyzx, r26.xyzx
        add r13.w, -r13.w, l(1.000000)
        mul r14.w, r13.w, r13.w
        mul r14.w, r14.w, r14.w
        mul r13.w, r13.w, r14.w
        mad r26.xyz, r16.xyzx, r13.wwww, r2.xyzx
        add r27.xyz, -r26.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
        mul r28.xyz, r3.xxxx, r27.xyzx
        mad r26.xyz, r27.xyzx, r3.xxxx, r26.xyzx
        add r25.xyz, -r26.yzxy, l(1.000000, 1.000000, 1.000000, 0.000000)
        mul r23.xyz, r3.yyyy, r28.xyzx
        mov r13.z, -r13.z
      else
        mov r21.yz, r25.xxyx
        mov r25.xyz, r21.yzxy
      endif
      mad r21.yzw, r7.xxyz, r3.wwww, -r29.xxyz
      dp3 r13.w, r21.yzwy, r21.yzwy
      rsq r13.w, r13.w
      mul r21.yzw, r13.wwww, r21.yyzw
      dp3 r13.w, r8.xyzx, r21.yzwy
      ge r14.w, r25.z, l(0.000000)
      mov_sat r16.w, r13.w
      add r16.w, -r16.w, l(1.000000)
      mul r17.z, r16.w, r16.w
      mul r17.z, r17.z, r17.z
      mul r16.w, r16.w, r17.z
      mad r26.xyz, r16.xyzx, r16.wwww, r2.xyzx
      movc r26.xyz, r14.wwww, r25.zxyz, r26.xyzx
      dp3 r16.w, r9.xyzx, r21.yzwy
      mul r16.w, r16.w, r16.w
      mad r16.w, r16.w, r11.w, l(1.000000)
      max r16.w, r16.w, l(0.000100)
      mul r16.w, r16.w, r16.w
      mul r16.w, r16.w, l(4.000000)
      div r16.w, r10.w, r16.w
      mad r13.w, r13.w, r8.w, r12.z
      mul r13.w, r13.w, r13.w
      div r13.w, l(1.000000, 1.000000, 1.000000, 1.000000), r13.w
      mul r13.w, r13.w, r16.w
      mul r21.yzw, r13.wwww, r26.xxyz
      mul r21.yzw, r20.yyzw, r21.yyzw
      mov_sat r13.z, r13.z
      mul r17.zw, r15.wwww, cb0[12].yyyx
      mad r25.zw, -cb0[12].yyyx, r15.wwww, l(0.000000, 0.000000, 1.000000, 1.000000)
      mad r13.w, r5.y, r17.z, r25.z
      mul r13.w, r13.w, r13.z
      mad r24.xyz, r21.yzwy, r13.wwww, r24.xyzx
      mul r20.yzw, r13.zzzz, r20.yyzw
      movc r21.yzw, r14.wwww, r23.xxyz, r19.xxzw
      mul r20.yzw, r20.yyzw, r21.yyzw
      mad r13.z, r1.w, r17.w, r25.w
      mad r22.xyz, r20.yzwy, r13.zzzz, r22.xyzx
    endif
    iadd r12.w, r12.w, l(1)
  endloop
  iadd r5.w, r5.w, r7.w
  mov r17.x, l(1.000000)
  mov r18.x, l(-1.000000)
  mov r15.xyz, r22.xyzx
  mov r20.xyz, r23.xyzx
  mov r14.xyz, r24.xyzx
  mov r21.xy, r25.xyxx
  mov r7.w, l(0)
  loop
    uge r12.w, r7.w, r9.w
    breakc_nz r12.w
    iadd r12.w, r5.w, r7.w
    ld_indexable(buffer)(uint,uint,uint,uint) r12.w, r12.wwww, t16.yzwx
    imul null, r13.z, r12.w, l(5)
    ld_indexable(buffer)(float,float,float,float) r26.xyz, r13.zzzz, t20.xyzw
    imad r13.z, l(5), r12.w, l(4)
    ld_indexable(buffer)(float,float,float,float) r27.xyz, r13.zzzz, t20.xyzw
    add r26.xyz, -r0.yzwy, r26.xyzx
    dp3 r17.z, r26.xyzx, r26.xyzx
    lt r13.z, r17.z, r27.x
    if_nz r13.z
      imad r13.z, l(5), r12.w, l(1)
      ld_indexable(buffer)(float,float,float,float) r28.xyz, r13.zzzz, t20.xyzw
      rsq r13.z, r17.z
      mul r29.xyz, r13.zzzz, -r26.xyzx
      dp3 r13.w, -r29.xyzx, r28.xyzx
      mad_sat r13.w, r13.w, r27.z, r27.y
      lt r14.w, l(0.000000), r13.w
      if_nz r14.w
        imad r25.zw, l(0, 0, 5, 5), r12.wwww, l(0, 0, 2, 3)
        ld_indexable(buffer)(float,float,float,float) r27.yzw, r25.zzzz, t20.wxyz
        ld_indexable(buffer)(float,float,float,float) r30.xyz, r25.wwww, t20.xyzw
        mul r27.yzw, r0.xxxx, r27.yyzw
        imul null, r14.w, r12.w, l(3)
        imad r15.w, l(3), r12.w, l(1)
        ld_indexable(buffer)(uint,uint,uint,uint) r15.w, r15.wwww, t21.yzwx
        utof r15.w, r15.w
        mul r15.w, r15.w, l(0.00392156886)
        ld_indexable(buffer)(uint,uint,uint,uint) r14.w, r14.wwww, t21.yzwx
        ieq r16.w, r14.w, l(3)
        if_nz r16.w
          imad r12.w, l(3), r12.w, l(2)
          ld_indexable(buffer)(uint,uint,uint,uint) r12.w, r12.wwww, t21.yzwx
          dp3 r16.w, -r26.xyzx, -r26.xyzx
          rsq r16.w, r16.w
          mul r26.xyz, r16.wwww, -r26.xyzx
          dp3 r16.w, r26.xyzx, r28.xyzx
          mad r31.x, r16.w, l(-0.500000), l(0.500000)
          dp3 r17.w, r26.xyzx, r30.xyzx
          mad r16.w, -r16.w, r16.w, l(1.000000)
          rsq r16.w, r16.w
          mul r16.w, r16.w, r17.w
          mul r32.xyz, r28.yzxy, r30.zxyz
          mad r28.xyz, r30.yzxy, r28.zxyz, -r32.xyzx
          dp3 r17.w, r28.xyzx, r26.xyzx
          ge r17.w, r17.w, l(0.000000)
          mad r25.zw, r16.wwww, l(0.000000, 0.000000, -0.250000, 0.250000), l(0.000000, 0.000000, 0.250000, 0.750000)
          movc r31.y, r17.w, r25.z, r25.w
          utof r31.z, r12.w
          sample_l_indexable(texture2darray)(float,float,float,float) r12.w, r31.xyzx, t0.yzwx, s0, l(0.000000)
          mul r12.w, r27.x, r12.w
          div r12.w, r12.w, r17.z
          div r16.w, r17.z, r27.x
          add_sat r16.w, -r16.w, l(1.000000)
          mul r12.w, r12.w, r16.w
          mul r12.w, r13.w, r12.w
        else
          ieq r14.w, r14.w, l(2)
          mul r16.w, -r17.z, r30.x
          mul r16.w, r16.w, l(1.442695)
          exp r16.w, r16.w
          mul_sat r16.w, r16.w, r30.y
          mul r16.w, r13.w, r16.w
          mul r17.y, r13.z, r17.z
          dp3 r13.z, r17.xyzx, r30.xyzx
          div r13.z, r13.w, r13.z
          movc r12.w, r14.w, r16.w, r13.z
        endif
        mul r17.yzw, r27.yyzw, r12.wwww
        dp3 r12.w, r9.xyzx, -r29.xyzx
        lt r13.z, r12.w, l(0.000000)
        and r13.z, r6.w, r13.z
        if_nz r13.z
          add r13.z, r12.w, r12.w
          mad r29.xyz, r9.xyzx, r13.zzzz, r29.xyzx
          mul r17.yzw, r11.xxyz, r17.yyzw
          mad r26.xyz, r7.xyzx, r3.wwww, -r29.xyzx
          dp3 r13.z, r26.xyzx, r26.xyzx
          rsq r13.z, r13.z
          mul r26.xyz, r13.zzzz, r26.xyzx
          dp3_sat r13.z, r8.xyzx, r26.xyzx
          add r13.z, -r13.z, l(1.000000)
          mul r13.w, r13.z, r13.z
          mul r13.w, r13.w, r13.w
          mul r13.z, r13.w, r13.z
          mad r26.xyz, r16.xyzx, r13.zzzz, r2.xyzx
          add r27.xyz, -r26.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
          mul r28.xyz, r3.xxxx, r27.xyzx
          mad r26.xyz, r27.xyzx, r3.xxxx, r26.xyzx
          add r21.xyz, -r26.yzxy, l(1.000000, 1.000000, 1.000000, 0.000000)
          mul r20.xyz, r3.yyyy, r28.xyzx
          mov r12.w, -r12.w
        else
          mov r18.yz, r21.xxyx
          mov r21.xyz, r18.yzxy
        endif
        mad r18.yzw, r7.xxyz, r3.wwww, -r29.xxyz
        dp3 r13.z, r18.yzwy, r18.yzwy
        rsq r13.z, r13.z
        mul r18.yzw, r13.zzzz, r18.yyzw
        dp3 r13.z, r8.xyzx, r18.yzwy
        ge r13.w, r21.z, l(0.000000)
        mov_sat r14.w, r13.z
        add r14.w, -r14.w, l(1.000000)
        mul r16.w, r14.w, r14.w
        mul r16.w, r16.w, r16.w
        mul r14.w, r14.w, r16.w
        mad r26.xyz, r16.xyzx, r14.wwww, r2.xyzx
        movc r26.xyz, r13.wwww, r21.zxyz, r26.xyzx
        dp3 r14.w, r9.xyzx, r18.yzwy
        mul r14.w, r14.w, r14.w
        mad r14.w, r14.w, r11.w, l(1.000000)
        max r14.w, r14.w, l(0.000100)
        mul r14.w, r14.w, r14.w
        mul r14.w, r14.w, l(4.000000)
        div r14.w, r10.w, r14.w
        mad r13.z, r13.z, r8.w, r12.z
        mul r13.z, r13.z, r13.z
        div r13.z, l(1.000000, 1.000000, 1.000000, 1.000000), r13.z
        mul r13.z, r13.z, r14.w
        mul r18.yzw, r13.zzzz, r26.xxyz
        mul r18.yzw, r17.yyzw, r18.yyzw
        mov_sat r12.w, r12.w
        mul r21.zw, r15.wwww, cb0[12].yyyx
        mad r25.zw, -cb0[12].yyyx, r15.wwww, l(0.000000, 0.000000, 1.000000, 1.000000)
        mad r13.z, r5.y, r21.z, r25.z
        mul r13.z, r12.w, r13.z
        mad r14.xyz, r18.yzwy, r13.zzzz, r14.xyzx
        mul r17.yzw, r12.wwww, r17.yyzw
        movc r18.yzw, r13.wwww, r20.xxyz, r19.xxzw
        mul r17.yzw, r17.yyzw, r18.yyzw
        mad r12.w, r1.w, r21.w, r25.w
        mad r15.xyz, r17.yzwy, r12.wwww, r15.xyzx
      endif
    endif
    iadd r7.w, r7.w, l(1)
  endloop
endif
ne r0.x, cb0[30].x, l(0.000000)
dp3 r3.y, -r8.xyzx, r9.xyzx
add r3.y, r3.y, r3.y
mad r7.xyz, r9.xyzx, -r3.yyyy, -r8.xyzx
mov r8.x, -r9.y
mov r8.y, -r7.y
mov_sat r8.xy, r8.xyxx
dp3_sat r13.y, r7.xyzx, -cb0[0].xyzx
mov_sat r13.x, r13.x
add r3.yw, r8.xxxy, r13.xxxy
mul_sat r3.yw, r3.yyyw, cb0[30].xxxx
add r5.w, r6.z, l(-1.000000)
mad r3.yw, r3.yyyw, r5.wwww, l(0.000000, 1.000000, 0.000000, 1.000000)
movc r3.yw, r0.xxxx, r3.yyyw, l(0,1.000000,0,1.000000)
sample_l_indexable(texturecube)(float,float,float,float) r8.xyz, r9.xyzx, t3.xyzw, s3, l(6.000000)
mul r8.xyz, r3.yyyy, r8.xyzx
mad r8.xyz, r8.xyzx, cb0[31].xyzx, cb0[9].xyzx
add r0.x, -cb0[31].w, l(1.000000)
mad r0.x, r1.w, cb0[31].w, r0.x
add r0.x, r0.x, l(-1.000000)
add r0.x, r0.x, l(1.000000)
add r6.xy, -r6.yxyy, l(1.000000, 1.000000, 0.000000, 0.000000)
mul r3.y, r0.x, r6.x
mul r8.xyz, r3.yyyy, r8.xyzx
mad r8.xyz, r8.xyzx, r19.xzwx, r15.xyzx
mul r3.y, r4.w, l(6.000000)
max r7.w, |r7.y|, l(0.008749)
sample_l_indexable(texturecube)(float,float,float,float) r7.xyz, r7.xwzx, t3.xyzw, s3, r3.y
mul r7.xyz, r3.wwww, r7.xyzx
mul r7.xyz, r7.xyzx, cb0[32].xyzx
mov r12.y, r2.w
sample_indexable(texture2d)(float,float,float,float) r3.yw, r12.xyxx, t2.zxwy, s2
mad r12.xyz, r2.xyzx, r3.yyyy, r3.wwww
mul r7.xyz, r7.xyzx, r12.xyzx
add r2.w, -cb0[32].w, l(1.000000)
mad r1.w, r1.w, cb0[32].w, r2.w
add r2.w, -r1.w, l(1.000000)
mad r2.w, r5.y, r2.w, r1.w
mad r1.w, r1.w, r2.w, l(-1.000000)
add r1.w, r1.w, l(1.000000)
mul r2.w, r6.y, r1.w
mad r6.xyz, r7.xyzx, r2.wwww, r14.xyzx
div r2.w, l(1.000000, 1.000000, 1.000000, 1.000000), r5.x
dp3 r3.y, r10.xyzx, r10.xyzx
rsq r3.y, r3.y
mul r5.xyw, r3.yyyy, r10.xyxz
dp3_sat r3.y, r9.xyzx, r5.xywx
mad r3.y, -r3.y, r3.y, l(1.000000)
sqrt r3.y, r3.y
mad r3.y, r3.y, r2.w, -r3.y
add r7.xyz, r9.xyzx, l(-0.000000, -1.000000, -0.000000, 0.000000)
mul r5.xyw, r2.wwww, r5.xyxw
mad r5.xyw, r3.yyyy, r7.xyxz, -r5.xyxw
dp3 r2.w, r5.xywx, r5.xywx
rsq r2.w, r2.w
mul r5.xyw, r2.wwww, r5.xyxw
mad r5.xyz, r5.xywx, r5.zzzz, r0.yzwy
mov r5.w, l(1.000000)
dp4 r7.x, r5.xyzw, cb0[19].xyzw
dp4 r7.y, r5.xyzw, cb0[20].xyzw
dp4 r0.y, r5.xyzw, cb0[21].xyzw

//Haloing fix. Related to water PS.
add r33.w, r0.y, -r33.y
mul r33.w, r33.w, l(0.5)
mad r7.x, r33.x, r33.w, r7.x

//mov r41.xyw, v1.xyxw
//add r33.w, r0.y, -r33.y
//mul r33.w, r33.w, l(0.5)
//mad r41.x, r33.x, r33.w, r41.x

div r0.yz, r7.xxyx, r0.yyyy
sample_indexable(texture2d)(float,float,float,float) r0.w, r0.yzyy, t1.yzwx, s1
if_nz r6.w
  div r3.yw, v1.xxxy, v1.wwww
  mad r3.yw, r3.yyyw, l(0.000000, 0.500000, 0.000000, -0.500000), l(0.000000, 0.500000, 0.000000, 0.500000)
  dp3 r2.w, -r10.xyzx, cb0[17].xyzx
  add r3.z, -r3.z, l(1.000000)
  mul r4.w, r3.z, r3.z
  mul r4.w, r4.w, r4.w
  mul r3.z, r3.z, r4.w
  mad r2.xyz, r16.xyzx, r3.zzzz, r2.xyzx
  add r5.xyz, -r2.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
  mad r2.xyz, r5.xyzx, r3.xxxx, r2.xyzx
  add r2.xyz, -r2.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
  mul r5.xyz, r3.xxxx, r2.xyzx
  mad_sat r0.w, cb0[18].y, r0.w, cb0[18].x
  div r0.w, l(1.000000, 1.000000, 1.000000, 1.000000), r0.w
  lt r0.w, r0.w, r2.w
  movc r0.yz, r0.wwww, r3.yywy, r0.yyzy
  mad r0.yz, r0.yyzy, cb0[33].zzwz, cb0[33].xxyx
  sample_l_indexable(texture2d)(float,float,float,float) r3.xyz, r0.yzyy, t4.xyzw, s4, l(16.000000)
  mul r3.xyz, r3.xyzx, cb0[31].xyzx
  mul r3.xyz, r0.xxxx, r3.xyzx
  mul r3.xyz, r5.xyzx, r3.xyzx
  mad r8.xyz, r3.xyzx, r11.xyzx, r8.xyzx
  sample_l_indexable(texture2d)(float,float,float,float) r0.xyz, r0.yzyy, t4.xyzw, s4, l(0.000000)
  mul r0.xyz, r0.xyzx, cb0[32].xyzx
  mul r0.xyz, r1.wwww, r0.xyzx
  mul r0.xyz, r2.xyzx, r0.xyzx
  mad r6.xyz, r0.xyzx, r11.xyzx, r6.xyzx
endif
mad r0.xyz, r8.xyzx, r1.xyzx, r4.xyzx
add o0.xyz, r6.xyzx, r0.xyzx
mov o0.w, l(1.000000)
ret
// Approximately 743 instruction slots used
