// MANUALLY DUMPED [ShaderRegex_ShadowsPS1] Real light shafts.
//
// Generated by Microsoft (R) D3D Shader Disassembler
//
//   using 3Dmigoto v1.3.16 on Mon Apr 05 23:05:51 2021
//
//
// Note: shader requires additional functionality:
//       Early depth-stencil
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD                 0   xyzw        0     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 | forceEarlyDepthStencil
dcl_immediateConstantBuffer { { 0, 0, 0, 0},
                              { 0.500000, 0, 0, 0},
                              { 0.125000, 0, 0, 0},
                              { 0.625000, 0, 0, 0},
                              { 0.750000, 0, 0, 0},
                              { 0.250000, 0, 0, 0},
                              { 0.875000, 0, 0, 0},
                              { 0.375000, 0, 0, 0},
                              { 0.187500, 0, 0, 0},
                              { 0.687500, 0, 0, 0},
                              { 0.062500, 0, 0, 0},
                              { 0.562500, 0, 0, 0},
                              { 0.937500, 0, 0, 0},
                              { 0.437500, 0, 0, 0},
                              { 0.812500, 0, 0, 0},
                              { 0.312500, 0, 0, 0} }
dcl_constantbuffer cb12[30], immediateIndexed
dcl_constantbuffer cb9[14], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_sampler s13, mode_comparison
dcl_sampler s14, mode_comparison
dcl_sampler s15, mode_comparison
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2darray (float,float,float,float) t1
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_structured t19, 80
dcl_input_ps linear v0.xyw
dcl_output o0.xyzw
dcl_temps 25
dcl_resource_texture2d (float,float,float,float) t125
ld_indexable(texture2d)(float,float,float,float) r14.xyzw, l(0, 0, 0, 0), t125.xyzw
div r0.xy, v0.xyxx, v0.wwww

//Copy of r0.x.
mov r20.xy, r0.xyxx

//Getting depth from the future.
mad r21.xy, r0.xyxx, l(0.500000, -0.500000, 0.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)
sample_indexable(texture2d)(float,float,float,float) r1.w, r21.xyxx, t0.yzwx, s0
add r1.w, r1.w, cb12[2].z
div r2.z, -cb12[2].w, r1.w

//Fix only for copy of r0.x.
mad r20.x, r14.x, l(-1.0), r20.x
div r14.w, -r14.y, r2.z
mad r20.x, r14.x, r14.w, r20.x

mul r0.zw, r20.xxxy, l(0.000000, 0.000000, 0.500000, -0.500000)

mad r0.xy, r0.xyxx, l(0.500000, -0.500000, 0.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)
mul r1.xy, r0.xyxx, cb12[29].xyxx
mul r1.zw, r1.xxxy, l(0.000000, 0.000000, 0.250000, 0.250000)
frc r1.zw, r1.zzzw
mul r1.zw, r1.zzzw, l(0.000000, 0.000000, 4.000000, 4.000000)
ftoi r1.zw, r1.zzzw
imad r1.z, r1.w, l(4), r1.z
add r1.z, l(0.062500), icb[r1.z + 0].x


sample_indexable(texture2d)(float,float,float,float) r1.w, r0.xyxx, t0.yzwx, s0
add r1.w, r1.w, cb12[2].z
div r2.z, -cb12[2].w, r1.w
mul r0.zw, r0.zzzw, r2.zzzz
mul r0.xyzw, r0.xyzw, l(1000000.000000, 1000000.000000, 2.000000, -2.000000)
div r2.x, -r0.z, cb12[0].x
div r2.y, -r0.w, cb12[1].y
round_ni r0.xy, r0.xyxx
ftou r0.xy, r0.xyxx
imad r0.x, r0.y, l(57), r0.x
ishl r0.y, r0.x, l(13)
xor r0.x, r0.x, r0.y
imul null, r0.y, r0.x, r0.x
imad r0.y, r0.y, l(0x00003d73), l(0x000c0ae5)
imad r0.x, r0.x, r0.y, l(0x5208dd0d)
and r0.x, r0.x, l(0x7fffffff)
utof r0.x, r0.x
mul r0.x, r0.x, l(9.313225746E-010)
frc r0.x, -r0.x
mul r0.x, r0.x, r0.x
mul r0.x, r0.x, r0.x
mad r0.x, r0.x, l(0.062500), r1.z
movc r0.x, cb9[12].w, r0.x, r1.z
itof r0.y, cb9[12].x
mul r0.z, -r2.z, r0.y
mad r0.z, r0.z, l(0.0666666701), l(1.000000)
ftoi r0.z, r0.z
imin r0.z, r0.z, cb9[12].x
div r0.w, l(-15.000000), r2.z
mul r2.xyw, r0.wwww, r2.xyxz
div r3.y, l(15.000000), r0.y
div r2.xyw, r2.xyxw, r0.yyyy
mul r4.xyz, r0.xxxx, r2.xywx

add r14.w, r4.z, r14.y
div r14.w, r14.w, cb12[0].x
mad r4.x, r14.x, r14.w, r4.x

mad r3.x, -r0.x, r3.y, -r2.z
ilt r0.y, l(0), r0.z
if_nz r0.y
  ge r0.w, l(0.000000), r3.x
  lt r1.z, r3.x, r3.y
  add r3.w, -r3.y, r3.x
  mov r3.z, l(0)
  movc r1.zw, r1.zzzz, r3.zzzx, r3.wwwy
  movc r3.xy, r0.wwww, r3.xyxx, r1.zwzz
  if_z r0.w
    mul r1.z, r3.y, cb9[13].y
    if_nz cb9[12].z
      mul r1.w, r1.z, l(0.002000)
      mul r2.z, r4.z, l(-0.0666666701)
      max r2.z, r2.z, l(0.000000)
      rsq r2.z, r2.z
      div r2.z, l(1.000000, 1.000000, 1.000000, 1.000000), r2.z
      mul r5.z, r2.z, l(16.000000)
      mul r2.z, r4.x, cb12[0].x
      mul r2.z, r2.z, l(-0.500000)
      div r2.z, r2.z, r4.z
      add r5.x, r2.z, l(0.500000)
      mul r2.z, r4.y, cb12[1].y
      mul r2.z, r2.z, l(0.500000)
      div r2.z, r2.z, r4.z
      add r5.y, r2.z, l(0.500000)
      sample_indexable(texture2darray)(float,float,float,float) r2.z, r5.xyzx, t1.xywz, s1
      mul r1.w, r1.w, r2.z
    else
      mul r1.w, r1.z, l(0.000200000009)
    endif
    lt r1.z, l(0.900000), r1.w
    movc r1.z, r1.z, l(0.900000), r1.w
    add r1.w, -r1.z, l(1.000000)
    if_nz cb9[12].y
      mov r4.w, l(1.000000)



      dp4 r5.x, cb9[8].xyzw, r4.xyzw
      dp4 r5.y, cb9[9].xyzw, r4.xyzw
      dp4 r5.z, cb9[10].xyzw, r4.xyzw
      dp4 r2.z, cb9[11].xyzw, r4.xyzw
      div r5.xyz, r5.xyzx, r2.zzzz
      mov_sat r6.xy, r5.xyxx
      eq r6.xy, r5.xyxx, r6.xyxx
      and r2.z, r6.y, r6.x
      if_nz r2.z
        mul r6.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
        frc r6.xy, r6.xyxx
        lt r6.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r6.xyxx
        and r6.xy, r6.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
        add r2.z, r6.x, r6.y
        lt r5.w, l(1.100000), r2.z
        movc r6.z, r5.w, l(0), r2.z
        add r6.xy, r6.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
        mad r5.xy, r6.xyxx, l(0.000976562500, 0.000976562500, 0.000000, 0.000000), r5.xyxx
        mov_sat r6.xy, r5.xyxx
        eq r6.xy, r5.xyxx, r6.xyxx
        and r2.z, r6.y, r6.x
        if_nz r2.z
          min r2.z, r5.z, l(1.000000)
          sample_c_indexable(texture2d)(float,float,float,float) r2.z, r5.xyxx, t15.xxxx, s15, r2.z
        else
          mov r2.z, l(1.000000)
        endif
      else
	    
		
		
        dp4 r5.x, cb9[4].xyzw, r4.xyzw
        dp4 r5.y, cb9[5].xyzw, r4.xyzw
        dp4 r5.z, cb9[6].xyzw, r4.xyzw
        dp4 r5.w, cb9[7].xyzw, r4.xyzw
        div r5.xyz, r5.xyzx, r5.wwww
        mov_sat r6.xy, r5.xyxx
        eq r6.xy, r5.xyxx, r6.xyxx
        and r5.w, r6.y, r6.x
        if_nz r5.w
          mul r6.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
          frc r6.xy, r6.xyxx
          lt r6.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r6.xyxx
          and r6.xy, r6.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
          add r5.w, r6.x, r6.y
          lt r6.y, l(1.100000), r5.w
          movc r6.z, r6.y, l(0), r5.w
          add r6.xy, r6.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
          mad r5.xy, r6.xyxx, l(0.000244140625, 0.000244140625, 0.000000, 0.000000), r5.xyxx
          mov_sat r6.xy, r5.xyxx
          eq r6.xy, r5.xyxx, r6.xyxx
          and r5.w, r6.y, r6.x
          if_nz r5.w
            min r5.z, r5.z, l(1.000000)
            sample_c_indexable(texture2d)(float,float,float,float) r2.z, r5.xyxx, t14.xxxx, s14, r5.z
          else
            mov r2.z, l(1.000000)
          endif
        else
          dp4 r5.x, cb9[0].xyzw, r4.xyzw
          dp4 r5.y, cb9[1].xyzw, r4.xyzw
          dp4 r5.z, cb9[2].xyzw, r4.xyzw
          dp4 r5.w, cb9[3].xyzw, r4.xyzw
          div r5.xyz, r5.xyzx, r5.wwww
          mov_sat r6.xy, r5.xyxx
          eq r6.xy, r5.xyxx, r6.xyxx
          and r5.w, r6.y, r6.x
          if_nz r5.w
            mul r6.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
            frc r6.xy, r6.xyxx
            lt r6.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r6.xyxx
            and r6.xy, r6.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
            add r5.w, r6.x, r6.y
            lt r6.y, l(1.100000), r5.w
            movc r6.z, r6.y, l(0), r5.w
            add r6.xy, r6.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
            mad r5.xy, r6.xyxx, l(0.0000610351563, 0.0000610351563, 0.000000, 0.000000), r5.xyxx
            mov_sat r6.xy, r5.xyxx
            eq r6.xy, r5.xyxx, r6.xyxx
            and r5.w, r6.y, r6.x
            if_nz r5.w
              min r5.z, r5.z, l(1.000000)
              sample_c_indexable(texture2d)(float,float,float,float) r2.z, r5.xyxx, t13.xxxx, s13, r5.z
            else
              mov r2.z, l(1.000000)
            endif
          else
            mov r2.z, l(1.000000)
          endif
        endif
      endif
      mul r1.z, r1.z, r2.z
    endif
    dp3 r2.z, r2.xywx, r2.xywx
    lt r5.x, l(0.000100), r2.z
    div r5.y, l(1.000000, 1.000000, 1.000000, 1.000000), r2.z
    mad r5.z, -cb9[13].x, cb9[13].x, l(1.000000)
    mad r5.w, cb9[13].x, cb9[13].x, l(1.000000)
    add r6.x, cb9[13].x, cb9[13].x
    dp3 r6.y, r4.xyzx, r4.xyzx
    rsq r6.y, r6.y
    mul r6.yzw, r4.xxyz, r6.yyyy
    mad r7.xyz, r2.xywx, l(0.500000, 0.500000, 0.500000, 0.000000), r4.xyzx
    dp3 r7.w, r7.xyzx, r7.xyzx
    rsq r8.x, r7.w
    mul r7.xyz, r7.xyzx, r8.xxxx
    add r7.w, r7.w, l(0.000100)
    log r7.w, r7.w
    mul r7.w, r7.w, l(1.500000)
    exp r7.w, r7.w
    mul r7.w, r7.w, l(0.010000)
    mov r8.xyzw, l(0,0,0,0)
    loop
      uge r9.x, r8.w, cb9[13].w
      breakc_nz r9.x
      ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r9.x, r8.w, l(12), t19.xxxx
      switch r9.x
        case l(0)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r9.xyzw, r8.w, l(16), t19.xyzw
        mad r10.xyz, r0.xxxx, r2.xywx, -r9.xyzx
        dp3 r10.w, r2.xywx, r10.xyzx
        dp3 r10.x, r10.xyzx, r10.xyzx
        mad r10.y, -r9.w, r9.w, r10.x
        mul r10.y, r2.z, r10.y
        mad r10.y, r10.w, r10.w, -r10.y
        ge r10.z, r10.y, l(0.000000)
        and r10.z, r5.x, r10.z
        if_nz r10.z
          sqrt r10.y, r10.y
          add r10.z, -r10.y, -r10.w
          add r10.y, r10.y, -r10.w
          mul r10.yz, r5.yyyy, r10.yyzy
          ge r10.w, l(1.000000), r10.z
          ge r11.x, r10.y, l(0.000000)
          and r10.w, r10.w, r11.x
          if_nz r10.w
            lt r10.w, r10.z, l(0.000000)
            lt r11.x, l(1.000000), r10.y
            movc r10.y, r11.x, l(1.000000), r10.y
            movc r10.z, r10.w, l(-0.000000), -r10.z
            add r10.y, r10.z, r10.y
            mul r10.z, r10.y, l(0.500000)
            mad r11.xyz, r10.zzzz, r2.xywx, r4.xyzx
            ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r12.xyz, r8.w, l(0), t19.xyzx
            dp3 r10.z, r11.xyzx, r11.xyzx
            rsq r10.z, r10.z
            mul r13.xyz, r10.zzzz, r11.xyzx
            add r9.xyz, r9.xyzx, -r11.xyzx
            dp3 r10.z, r9.xyzx, r9.xyzx
            rsq r10.z, r10.z
            mul r9.xyz, r9.xyzx, r10.zzzz
            dp3 r9.x, r13.xyzx, r9.xyzx
            mad r9.x, -r6.x, r9.x, r5.w
            log r9.x, |r9.x|
            mul r9.x, r9.x, l(1.500000)
            exp r9.x, r9.x
            mul r9.x, r9.x, l(12.566371)
            div r9.x, r5.z, r9.x
            mul r9.xyz, r9.xxxx, r12.xyzx
            mul r9.xyz, r10.yyyy, r9.xyzx
            sqrt r10.y, r10.x
            div r9.w, r10.y, r9.w
            add r9.w, -r9.w, l(1.000000)
            max r9.w, r9.w, l(0.000000)
            mul r9.xyz, r9.wwww, r9.xyzx
            mul r9.w, r10.x, l(0.010000)
            div r9.xyz, r9.xyzx, r9.wwww
            mul r9.xyz, r1.zzzz, r9.xyzx
            mad r8.xyz, r9.xyzx, l(0.100000, 0.100000, 0.100000, 0.000000), r8.xyzx
          endif
        endif
        break
        case l(1)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r9.xyzw, r8.w, l(16), t19.xyzw
        mad r10.xyz, r0.xxxx, r2.xywx, -r9.xyzx
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.xyz, r8.w, l(32), t19.xyzx
        dp3 r10.w, r10.xyzx, r11.xyzx
        lt r10.w, l(0.000000), r10.w
        if_nz r10.w
          dp3 r10.w, r11.xyzx, r11.xyzx
          rsq r10.w, r10.w
          mul r11.xyz, r10.wwww, r11.xyzx
          dp3 r10.w, r10.xyzx, r11.xyzx
          mul r12.xyz, r11.xyzx, r10.wwww
          dp3 r10.w, r10.xyzx, r10.xyzx
          rsq r11.w, r10.w
          mul r10.xyz, r10.xyzx, r11.wwww
          dp3 r10.x, r11.xyzx, r10.xyzx
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.yz, r8.w, l(64), t19.xxyx
          ge r11.xy, r10.xzxx, r10.yxyy
          add r10.x, -r10.z, r10.x
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.z, r8.w, l(68), t19.xxxx
          add r10.y, -r10.z, r10.y
          div r10.x, r10.x, r10.y
          movc r10.x, r11.y, l(0), r10.x
          movc r10.x, r11.x, l(1.000000), r10.x
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.xyz, r8.w, l(0), t19.xyzx
          mad r9.xyz, -r0.xxxx, r2.xywx, r9.xyzx
          dp3 r10.y, r9.xyzx, r9.xyzx
          rsq r10.y, r10.y
          mul r9.xyz, r9.xyzx, r10.yyyy
          dp3 r9.x, r6.yzwy, r9.xyzx
          mad r9.x, -r6.x, r9.x, r5.w
          log r9.x, |r9.x|
          mul r9.x, r9.x, l(1.500000)
          exp r9.x, r9.x
          mul r9.x, r9.x, l(12.566371)
          div r9.x, r5.z, r9.x
          mul r9.xyz, r9.xxxx, r11.xyzx
          mul r9.xyz, r10.xxxx, r9.xyzx
          mul r9.xyz, r9.xyzx, l(10000.000000, 10000.000000, 10000.000000, 0.000000)
          sqrt r10.x, r10.w
          div r9.w, r10.x, r9.w
          add r9.w, -r9.w, l(1.000000)
          max r9.w, r9.w, l(0.000000)
          mul r9.xyz, r9.wwww, r9.xyzx
          dp3 r9.w, r12.xyzx, r12.xyzx
          add r9.w, r9.w, l(0.010000)
          div r9.xyz, r9.xyzx, r9.wwww
          mad r8.xyz, r1.zzzz, r9.xyzx, r8.xyzx
        endif
        break
        case l(2)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r9.xyz, r8.w, l(32), t19.xyzx
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyz, r8.w, l(0), t19.xyzx
        dp3 r9.w, r9.xyzx, r9.xyzx
        rsq r9.w, r9.w
        mul r9.xyz, r9.wwww, r9.xyzx
        dp3 r9.x, r7.xyzx, r9.xyzx
        mad r9.x, -r6.x, r9.x, r5.w
        log r9.x, |r9.x|
        mul r9.x, r9.x, l(1.500000)
        exp r9.x, r9.x
        mul r9.x, r9.x, l(12.566371)
        div r9.x, r5.z, r9.x
        mul r9.xyz, r9.xxxx, r10.xyzx
        div r9.xyz, r9.xyzx, r7.wwww
        mul r9.xyz, r1.zzzz, r9.xyzx
        mad r8.xyz, r9.xyzx, l(0.000001, 0.000001, 0.000001, 0.000000), r8.xyzx
        break
        default
        break
      endswitch
      iadd r8.w, r8.w, l(1)
    endloop
    mad r4.xyz, r0.xxxx, r2.xywx, r2.xywx
  else
    mov r8.xyz, l(0,0,0,0)
    mov r1.w, l(1.000000)
  endif
  movc r0.x, r0.w, l(0), l(1)
else
  mov r8.xyz, l(0,0,0,0)
  mov r1.w, l(1.000000)
  mov r0.xw, l(0,0,0,-1)
endif
not r0.w, r0.w
and r0.y, r0.w, r0.y
ilt r0.w, r0.x, r0.z
and r0.y, r0.w, r0.y
if_nz r0.y
  ge r0.w, l(0.000000), r3.x
  lt r1.z, r3.x, r3.y
  add r3.z, -r3.y, r3.x
  mov r3.w, l(0)
  movc r5.xy, r1.zzzz, r3.wxww, r3.zyzz
  movc r3.xy, r0.wwww, r3.xyxx, r5.xyxx
  if_z r0.w
    mul r1.z, r3.y, cb9[13].y
    if_nz cb9[12].z
      mul r2.z, r1.z, l(0.002000)
      mul r5.x, r4.z, l(-0.0666666701)
      max r5.x, r5.x, l(0.000000)
      rsq r5.x, r5.x
      div r5.x, l(1.000000, 1.000000, 1.000000, 1.000000), r5.x
      mul r5.w, r4.x, cb12[0].x
      mul r5.zw, r5.xxxw, l(0.000000, 0.000000, 16.000000, -0.500000)
      div r5.w, r5.w, r4.z
      add r5.x, r5.w, l(0.500000)
      mul r5.w, r4.y, cb12[1].y
      mul r5.w, r5.w, l(0.500000)
      div r5.w, r5.w, r4.z
      add r5.y, r5.w, l(0.500000)
      sample_indexable(texture2darray)(float,float,float,float) r5.x, r5.xyzx, t1.wxyz, s1
      mul r2.z, r2.z, r5.x
    else
      mul r2.z, r1.z, l(0.000200000009)
    endif
    lt r1.z, l(0.900000), r2.z
    movc r1.z, r1.z, l(0.900000), r2.z
    add r2.z, -r1.z, l(1.000000)
    mul r1.w, r1.w, r2.z
    mul r5.xyz, r2.zzzz, r8.xyzx
    if_nz cb9[12].y
      mov r4.w, l(1.000000)
      dp4 r6.x, cb9[8].xyzw, r4.xyzw
      dp4 r6.y, cb9[9].xyzw, r4.xyzw
      dp4 r6.z, cb9[10].xyzw, r4.xyzw
      dp4 r2.z, cb9[11].xyzw, r4.xyzw
      div r6.xyz, r6.xyzx, r2.zzzz
      mov_sat r7.xy, r6.xyxx
      eq r7.xy, r6.xyxx, r7.xyxx
      and r2.z, r7.y, r7.x
      if_nz r2.z
        mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
        frc r7.xy, r7.xyxx
        lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
        and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
        add r2.z, r7.x, r7.y
        lt r5.w, l(1.100000), r2.z
        movc r7.z, r5.w, l(0), r2.z
        add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
        mad r6.xy, r7.xyxx, l(0.000976562500, 0.000976562500, 0.000000, 0.000000), r6.xyxx
        mov_sat r7.xy, r6.xyxx
        eq r7.xy, r6.xyxx, r7.xyxx
        and r2.z, r7.y, r7.x
        if_nz r2.z
          min r2.z, r6.z, l(1.000000)
          sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t15.xxxx, s15, r2.z
        else
          mov r2.z, l(1.000000)
        endif
      else
        dp4 r6.x, cb9[4].xyzw, r4.xyzw
        dp4 r6.y, cb9[5].xyzw, r4.xyzw
        dp4 r6.z, cb9[6].xyzw, r4.xyzw
        dp4 r5.w, cb9[7].xyzw, r4.xyzw
        div r6.xyz, r6.xyzx, r5.wwww
        mov_sat r7.xy, r6.xyxx
        eq r7.xy, r6.xyxx, r7.xyxx
        and r5.w, r7.y, r7.x
        if_nz r5.w
          mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
          frc r7.xy, r7.xyxx
          lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
          and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
          add r5.w, r7.x, r7.y
          lt r6.w, l(1.100000), r5.w
          movc r7.z, r6.w, l(0), r5.w
          add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
          mad r6.xy, r7.xyxx, l(0.000244140625, 0.000244140625, 0.000000, 0.000000), r6.xyxx
          mov_sat r7.xy, r6.xyxx
          eq r7.xy, r6.xyxx, r7.xyxx
          and r5.w, r7.y, r7.x
          if_nz r5.w
            min r5.w, r6.z, l(1.000000)
            sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t14.xxxx, s14, r5.w
          else
            mov r2.z, l(1.000000)
          endif
        else
          dp4 r6.x, cb9[0].xyzw, r4.xyzw
          dp4 r6.y, cb9[1].xyzw, r4.xyzw
          dp4 r6.z, cb9[2].xyzw, r4.xyzw
          dp4 r5.w, cb9[3].xyzw, r4.xyzw
          div r6.xyz, r6.xyzx, r5.wwww
          mov_sat r7.xy, r6.xyxx
          eq r7.xy, r6.xyxx, r7.xyxx
          and r5.w, r7.y, r7.x
          if_nz r5.w
            mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
            frc r7.xy, r7.xyxx
            lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
            and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
            add r5.w, r7.x, r7.y
            lt r6.w, l(1.100000), r5.w
            movc r7.z, r6.w, l(0), r5.w
            add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
            mad r6.xy, r7.xyxx, l(0.0000610351563, 0.0000610351563, 0.000000, 0.000000), r6.xyxx
            mov_sat r7.xy, r6.xyxx
            eq r7.xy, r6.xyxx, r7.xyxx
            and r5.w, r7.y, r7.x
            if_nz r5.w
              min r5.w, r6.z, l(1.000000)
              sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t13.xxxx, s13, r5.w
            else
              mov r2.z, l(1.000000)
            endif
          else
            mov r2.z, l(1.000000)
          endif
        endif
      endif
      mul r1.z, r1.z, r2.z
    endif
    dp3 r2.z, r2.xywx, r2.xywx
    lt r5.w, l(0.000100), r2.z
    div r6.x, l(1.000000, 1.000000, 1.000000, 1.000000), r2.z
    mad r6.y, -cb9[13].x, cb9[13].x, l(1.000000)
    mad r6.z, cb9[13].x, cb9[13].x, l(1.000000)
    add r6.w, cb9[13].x, cb9[13].x
    dp3 r7.x, r4.xyzx, r4.xyzx
    rsq r7.x, r7.x
    mul r7.xyz, r4.xyzx, r7.xxxx
    mad r9.xyz, r2.xywx, l(0.500000, 0.500000, 0.500000, 0.000000), r4.xyzx
    dp3 r7.w, r9.xyzx, r9.xyzx
    rsq r8.w, r7.w
    mul r9.xyz, r8.wwww, r9.xyzx
    add r7.w, r7.w, l(0.000100)
    log r7.w, r7.w
    mul r7.w, r7.w, l(1.500000)
    exp r7.w, r7.w
    mul r7.w, r7.w, l(0.010000)
    mov r8.xyz, r5.xyzx
    mov r8.w, l(0)
    loop
      uge r9.w, r8.w, cb9[13].w
      breakc_nz r9.w
      ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r9.w, r8.w, l(12), t19.xxxx
      switch r9.w
        case l(0)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyzw, r8.w, l(16), t19.xyzw
        add r11.xyz, r4.xyzx, -r10.xyzx
        dp3 r9.w, r2.xywx, r11.xyzx
        dp3 r11.x, r11.xyzx, r11.xyzx
        mad r11.y, -r10.w, r10.w, r11.x
        mul r11.y, r2.z, r11.y
        mad r11.y, r9.w, r9.w, -r11.y
        ge r11.z, r11.y, l(0.000000)
        and r11.z, r5.w, r11.z
        if_nz r11.z
          sqrt r11.y, r11.y
          add r11.z, -r9.w, -r11.y
          mul r11.z, r6.x, r11.z
          add r9.w, -r9.w, r11.y
          mul r9.w, r6.x, r9.w
          ge r11.y, l(1.000000), r11.z
          ge r11.w, r9.w, l(0.000000)
          and r11.y, r11.w, r11.y
          if_nz r11.y
            lt r11.y, r11.z, l(0.000000)
            lt r11.w, l(1.000000), r9.w
            movc r9.w, r11.w, l(1.000000), r9.w
            movc r11.y, r11.y, l(-0.000000), -r11.z
            add r9.w, r9.w, r11.y
            mul r11.y, r9.w, l(0.500000)
            mad r11.yzw, r11.yyyy, r2.xxyw, r4.xxyz
            ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r12.xyz, r8.w, l(0), t19.xyzx
            dp3 r12.w, r11.yzwy, r11.yzwy
            rsq r12.w, r12.w
            mul r13.xyz, r11.yzwy, r12.wwww
            add r10.xyz, r10.xyzx, -r11.yzwy
            dp3 r11.y, r10.xyzx, r10.xyzx
            rsq r11.y, r11.y
            mul r10.xyz, r10.xyzx, r11.yyyy
            dp3 r10.x, r13.xyzx, r10.xyzx
            mad r10.x, -r6.w, r10.x, r6.z
            log r10.x, |r10.x|
            mul r10.x, r10.x, l(1.500000)
            exp r10.x, r10.x
            mul r10.x, r10.x, l(12.566371)
            div r10.x, r6.y, r10.x
            mul r10.xyz, r10.xxxx, r12.xyzx
            mul r10.xyz, r9.wwww, r10.xyzx
            sqrt r9.w, r11.x
            div r9.w, r9.w, r10.w
            add r9.w, -r9.w, l(1.000000)
            max r9.w, r9.w, l(0.000000)
            mul r10.xyz, r9.wwww, r10.xyzx
            mul r9.w, r11.x, l(0.010000)
            div r10.xyz, r10.xyzx, r9.wwww
            mul r10.xyz, r1.zzzz, r10.xyzx
            mad r8.xyz, r10.xyzx, l(0.100000, 0.100000, 0.100000, 0.000000), r8.xyzx
          endif
        endif
        break
        case l(1)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyzw, r8.w, l(16), t19.xyzw
        add r11.xyz, r4.xyzx, -r10.xyzx
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r12.xyz, r8.w, l(32), t19.xyzx
        dp3 r9.w, r11.xyzx, r12.xyzx
        lt r9.w, l(0.000000), r9.w
        if_nz r9.w
          dp3 r9.w, r12.xyzx, r12.xyzx
          rsq r9.w, r9.w
          mul r12.xyz, r9.wwww, r12.xyzx
          dp3 r9.w, r11.xyzx, r12.xyzx
          mul r13.xyz, r12.xyzx, r9.wwww
          dp3 r9.w, r11.xyzx, r11.xyzx
          rsq r11.w, r9.w
          mul r11.xyz, r11.wwww, r11.xyzx
          dp3 r11.x, r12.xyzx, r11.xyzx
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.yz, r8.w, l(64), t19.xxyx
          ge r11.w, r11.x, r11.y
          ge r12.x, r11.z, r11.x
          add r11.x, -r11.z, r11.x
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.z, r8.w, l(68), t19.xxxx
          add r11.y, -r11.z, r11.y
          div r11.x, r11.x, r11.y
          movc r11.x, r12.x, l(0), r11.x
          movc r11.x, r11.w, l(1.000000), r11.x
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.yzw, r8.w, l(0), t19.xxyz
          add r10.xyz, -r4.xyzx, r10.xyzx
          dp3 r12.x, r10.xyzx, r10.xyzx
          rsq r12.x, r12.x
          mul r10.xyz, r10.xyzx, r12.xxxx
          dp3 r10.x, r7.xyzx, r10.xyzx
          mad r10.x, -r6.w, r10.x, r6.z
          log r10.x, |r10.x|
          mul r10.x, r10.x, l(1.500000)
          exp r10.x, r10.x
          mul r10.x, r10.x, l(12.566371)
          div r10.x, r6.y, r10.x
          mul r10.xyz, r10.xxxx, r11.yzwy
          mul r10.xyz, r11.xxxx, r10.xyzx
          mul r10.xyz, r10.xyzx, l(10000.000000, 10000.000000, 10000.000000, 0.000000)
          sqrt r9.w, r9.w
          div r9.w, r9.w, r10.w
          add r9.w, -r9.w, l(1.000000)
          max r9.w, r9.w, l(0.000000)
          mul r10.xyz, r9.wwww, r10.xyzx
          dp3 r9.w, r13.xyzx, r13.xyzx
          add r9.w, r9.w, l(0.010000)
          div r10.xyz, r10.xyzx, r9.wwww
          mad r8.xyz, r1.zzzz, r10.xyzx, r8.xyzx
        endif
        break
        case l(2)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyz, r8.w, l(32), t19.xyzx
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.xyz, r8.w, l(0), t19.xyzx
        dp3 r9.w, r10.xyzx, r10.xyzx
        rsq r9.w, r9.w
        mul r10.xyz, r9.wwww, r10.xyzx
        dp3 r9.w, r9.xyzx, r10.xyzx
        mad r9.w, -r6.w, r9.w, r6.z
        log r9.w, |r9.w|
        mul r9.w, r9.w, l(1.500000)
        exp r9.w, r9.w
        mul r9.w, r9.w, l(12.566371)
        div r9.w, r6.y, r9.w
        mul r10.xyz, r9.wwww, r11.xyzx
        div r10.xyz, r10.xyzx, r7.wwww
        mul r10.xyz, r1.zzzz, r10.xyzx
        mad r8.xyz, r10.xyzx, l(0.000001, 0.000001, 0.000001, 0.000000), r8.xyzx
        break
        default
        break
      endswitch
      iadd r8.w, r8.w, l(1)
    endloop
    add r4.xyz, r2.xywx, r4.xyzx
  endif
  movc r0.x, r0.w, l(1), l(2)
else
  mov r0.w, l(-1)
endif
not r0.w, r0.w
and r0.y, r0.w, r0.y
ilt r0.w, r0.x, r0.z
and r0.y, r0.w, r0.y
if_nz r0.y
  ge r0.w, l(0.000000), r3.x
  lt r1.z, r3.x, r3.y
  add r3.z, -r3.y, r3.x
  mov r3.w, l(0)
  movc r5.xy, r1.zzzz, r3.wxww, r3.zyzz
  movc r3.xy, r0.wwww, r3.xyxx, r5.xyxx
  if_z r0.w
    mul r1.z, r3.y, cb9[13].y
    if_nz cb9[12].z
      mul r2.z, r1.z, l(0.002000)
      mul r5.x, r4.z, l(-0.0666666701)
      max r5.x, r5.x, l(0.000000)
      rsq r5.x, r5.x
      div r5.x, l(1.000000, 1.000000, 1.000000, 1.000000), r5.x
      mul r5.w, r4.x, cb12[0].x
      mul r5.zw, r5.xxxw, l(0.000000, 0.000000, 16.000000, -0.500000)
      div r5.w, r5.w, r4.z
      add r5.x, r5.w, l(0.500000)
      mul r5.w, r4.y, cb12[1].y
      mul r5.w, r5.w, l(0.500000)
      div r5.w, r5.w, r4.z
      add r5.y, r5.w, l(0.500000)
      sample_indexable(texture2darray)(float,float,float,float) r5.x, r5.xyzx, t1.wxyz, s1
      mul r2.z, r2.z, r5.x
    else
      mul r2.z, r1.z, l(0.000200000009)
    endif
    lt r1.z, l(0.900000), r2.z
    movc r1.z, r1.z, l(0.900000), r2.z
    add r2.z, -r1.z, l(1.000000)
    mul r1.w, r1.w, r2.z
    mul r5.xyz, r2.zzzz, r8.xyzx
    if_nz cb9[12].y
      mov r4.w, l(1.000000)
      dp4 r6.x, cb9[8].xyzw, r4.xyzw
      dp4 r6.y, cb9[9].xyzw, r4.xyzw
      dp4 r6.z, cb9[10].xyzw, r4.xyzw
      dp4 r2.z, cb9[11].xyzw, r4.xyzw
      div r6.xyz, r6.xyzx, r2.zzzz
      mov_sat r7.xy, r6.xyxx
      eq r7.xy, r6.xyxx, r7.xyxx
      and r2.z, r7.y, r7.x
      if_nz r2.z
        mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
        frc r7.xy, r7.xyxx
        lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
        and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
        add r2.z, r7.x, r7.y
        lt r5.w, l(1.100000), r2.z
        movc r7.z, r5.w, l(0), r2.z
        add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
        mad r6.xy, r7.xyxx, l(0.000976562500, 0.000976562500, 0.000000, 0.000000), r6.xyxx
        mov_sat r7.xy, r6.xyxx
        eq r7.xy, r6.xyxx, r7.xyxx
        and r2.z, r7.y, r7.x
        if_nz r2.z
          min r2.z, r6.z, l(1.000000)
          sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t15.xxxx, s15, r2.z
        else
          mov r2.z, l(1.000000)
        endif
      else
        dp4 r6.x, cb9[4].xyzw, r4.xyzw
        dp4 r6.y, cb9[5].xyzw, r4.xyzw
        dp4 r6.z, cb9[6].xyzw, r4.xyzw
        dp4 r5.w, cb9[7].xyzw, r4.xyzw
        div r6.xyz, r6.xyzx, r5.wwww
        mov_sat r7.xy, r6.xyxx
        eq r7.xy, r6.xyxx, r7.xyxx
        and r5.w, r7.y, r7.x
        if_nz r5.w
          mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
          frc r7.xy, r7.xyxx
          lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
          and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
          add r5.w, r7.x, r7.y
          lt r6.w, l(1.100000), r5.w
          movc r7.z, r6.w, l(0), r5.w
          add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
          mad r6.xy, r7.xyxx, l(0.000244140625, 0.000244140625, 0.000000, 0.000000), r6.xyxx
          mov_sat r7.xy, r6.xyxx
          eq r7.xy, r6.xyxx, r7.xyxx
          and r5.w, r7.y, r7.x
          if_nz r5.w
            min r5.w, r6.z, l(1.000000)
            sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t14.xxxx, s14, r5.w
          else
            mov r2.z, l(1.000000)
          endif
        else
          dp4 r6.x, cb9[0].xyzw, r4.xyzw
          dp4 r6.y, cb9[1].xyzw, r4.xyzw
          dp4 r6.z, cb9[2].xyzw, r4.xyzw
          dp4 r5.w, cb9[3].xyzw, r4.xyzw
          div r6.xyz, r6.xyzx, r5.wwww
          mov_sat r7.xy, r6.xyxx
          eq r7.xy, r6.xyxx, r7.xyxx
          and r5.w, r7.y, r7.x
          if_nz r5.w
            mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
            frc r7.xy, r7.xyxx
            lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
            and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
            add r5.w, r7.x, r7.y
            lt r6.w, l(1.100000), r5.w
            movc r7.z, r6.w, l(0), r5.w
            add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
            mad r6.xy, r7.xyxx, l(0.0000610351563, 0.0000610351563, 0.000000, 0.000000), r6.xyxx
            mov_sat r7.xy, r6.xyxx
            eq r7.xy, r6.xyxx, r7.xyxx
            and r5.w, r7.y, r7.x
            if_nz r5.w
              min r5.w, r6.z, l(1.000000)
              sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t13.xxxx, s13, r5.w
            else
              mov r2.z, l(1.000000)
            endif
          else
            mov r2.z, l(1.000000)
          endif
        endif
      endif
      mul r1.z, r1.z, r2.z
    endif
    dp3 r2.z, r2.xywx, r2.xywx
    lt r5.w, l(0.000100), r2.z
    div r6.x, l(1.000000, 1.000000, 1.000000, 1.000000), r2.z
    mad r6.y, -cb9[13].x, cb9[13].x, l(1.000000)
    mad r6.z, cb9[13].x, cb9[13].x, l(1.000000)
    add r6.w, cb9[13].x, cb9[13].x
    dp3 r7.x, r4.xyzx, r4.xyzx
    rsq r7.x, r7.x
    mul r7.xyz, r4.xyzx, r7.xxxx
    mad r9.xyz, r2.xywx, l(0.500000, 0.500000, 0.500000, 0.000000), r4.xyzx
    dp3 r7.w, r9.xyzx, r9.xyzx
    rsq r8.w, r7.w
    mul r9.xyz, r8.wwww, r9.xyzx
    add r7.w, r7.w, l(0.000100)
    log r7.w, r7.w
    mul r7.w, r7.w, l(1.500000)
    exp r7.w, r7.w
    mul r7.w, r7.w, l(0.010000)
    mov r8.xyz, r5.xyzx
    mov r8.w, l(0)
    loop
      uge r9.w, r8.w, cb9[13].w
      breakc_nz r9.w
      ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r9.w, r8.w, l(12), t19.xxxx
      switch r9.w
        case l(0)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyzw, r8.w, l(16), t19.xyzw
        add r11.xyz, r4.xyzx, -r10.xyzx
        dp3 r9.w, r2.xywx, r11.xyzx
        dp3 r11.x, r11.xyzx, r11.xyzx
        mad r11.y, -r10.w, r10.w, r11.x
        mul r11.y, r2.z, r11.y
        mad r11.y, r9.w, r9.w, -r11.y
        ge r11.z, r11.y, l(0.000000)
        and r11.z, r5.w, r11.z
        if_nz r11.z
          sqrt r11.y, r11.y
          add r11.z, -r9.w, -r11.y
          mul r11.z, r6.x, r11.z
          add r9.w, -r9.w, r11.y
          mul r9.w, r6.x, r9.w
          ge r11.y, l(1.000000), r11.z
          ge r11.w, r9.w, l(0.000000)
          and r11.y, r11.w, r11.y
          if_nz r11.y
            lt r11.y, r11.z, l(0.000000)
            lt r11.w, l(1.000000), r9.w
            movc r9.w, r11.w, l(1.000000), r9.w
            movc r11.y, r11.y, l(-0.000000), -r11.z
            add r9.w, r9.w, r11.y
            mul r11.y, r9.w, l(0.500000)
            mad r11.yzw, r11.yyyy, r2.xxyw, r4.xxyz
            ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r12.xyz, r8.w, l(0), t19.xyzx
            dp3 r12.w, r11.yzwy, r11.yzwy
            rsq r12.w, r12.w
            mul r13.xyz, r11.yzwy, r12.wwww
            add r10.xyz, r10.xyzx, -r11.yzwy
            dp3 r11.y, r10.xyzx, r10.xyzx
            rsq r11.y, r11.y
            mul r10.xyz, r10.xyzx, r11.yyyy
            dp3 r10.x, r13.xyzx, r10.xyzx
            mad r10.x, -r6.w, r10.x, r6.z
            log r10.x, |r10.x|
            mul r10.x, r10.x, l(1.500000)
            exp r10.x, r10.x
            mul r10.x, r10.x, l(12.566371)
            div r10.x, r6.y, r10.x
            mul r10.xyz, r10.xxxx, r12.xyzx
            mul r10.xyz, r9.wwww, r10.xyzx
            sqrt r9.w, r11.x
            div r9.w, r9.w, r10.w
            add r9.w, -r9.w, l(1.000000)
            max r9.w, r9.w, l(0.000000)
            mul r10.xyz, r9.wwww, r10.xyzx
            mul r9.w, r11.x, l(0.010000)
            div r10.xyz, r10.xyzx, r9.wwww
            mul r10.xyz, r1.zzzz, r10.xyzx
            mad r8.xyz, r10.xyzx, l(0.100000, 0.100000, 0.100000, 0.000000), r8.xyzx
          endif
        endif
        break
        case l(1)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyzw, r8.w, l(16), t19.xyzw
        add r11.xyz, r4.xyzx, -r10.xyzx
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r12.xyz, r8.w, l(32), t19.xyzx
        dp3 r9.w, r11.xyzx, r12.xyzx
        lt r9.w, l(0.000000), r9.w
        if_nz r9.w
          dp3 r9.w, r12.xyzx, r12.xyzx
          rsq r9.w, r9.w
          mul r12.xyz, r9.wwww, r12.xyzx
          dp3 r9.w, r11.xyzx, r12.xyzx
          mul r13.xyz, r12.xyzx, r9.wwww
          dp3 r9.w, r11.xyzx, r11.xyzx
          rsq r11.w, r9.w
          mul r11.xyz, r11.wwww, r11.xyzx
          dp3 r11.x, r12.xyzx, r11.xyzx
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.yz, r8.w, l(64), t19.xxyx
          ge r11.w, r11.x, r11.y
          ge r12.x, r11.z, r11.x
          add r11.x, -r11.z, r11.x
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.z, r8.w, l(68), t19.xxxx
          add r11.y, -r11.z, r11.y
          div r11.x, r11.x, r11.y
          movc r11.x, r12.x, l(0), r11.x
          movc r11.x, r11.w, l(1.000000), r11.x
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.yzw, r8.w, l(0), t19.xxyz
          add r10.xyz, -r4.xyzx, r10.xyzx
          dp3 r12.x, r10.xyzx, r10.xyzx
          rsq r12.x, r12.x
          mul r10.xyz, r10.xyzx, r12.xxxx
          dp3 r10.x, r7.xyzx, r10.xyzx
          mad r10.x, -r6.w, r10.x, r6.z
          log r10.x, |r10.x|
          mul r10.x, r10.x, l(1.500000)
          exp r10.x, r10.x
          mul r10.x, r10.x, l(12.566371)
          div r10.x, r6.y, r10.x
          mul r10.xyz, r10.xxxx, r11.yzwy
          mul r10.xyz, r11.xxxx, r10.xyzx
          mul r10.xyz, r10.xyzx, l(10000.000000, 10000.000000, 10000.000000, 0.000000)
          sqrt r9.w, r9.w
          div r9.w, r9.w, r10.w
          add r9.w, -r9.w, l(1.000000)
          max r9.w, r9.w, l(0.000000)
          mul r10.xyz, r9.wwww, r10.xyzx
          dp3 r9.w, r13.xyzx, r13.xyzx
          add r9.w, r9.w, l(0.010000)
          div r10.xyz, r10.xyzx, r9.wwww
          mad r8.xyz, r1.zzzz, r10.xyzx, r8.xyzx
        endif
        break
        case l(2)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyz, r8.w, l(32), t19.xyzx
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.xyz, r8.w, l(0), t19.xyzx
        dp3 r9.w, r10.xyzx, r10.xyzx
        rsq r9.w, r9.w
        mul r10.xyz, r9.wwww, r10.xyzx
        dp3 r9.w, r9.xyzx, r10.xyzx
        mad r9.w, -r6.w, r9.w, r6.z
        log r9.w, |r9.w|
        mul r9.w, r9.w, l(1.500000)
        exp r9.w, r9.w
        mul r9.w, r9.w, l(12.566371)
        div r9.w, r6.y, r9.w
        mul r10.xyz, r9.wwww, r11.xyzx
        div r10.xyz, r10.xyzx, r7.wwww
        mul r10.xyz, r1.zzzz, r10.xyzx
        mad r8.xyz, r10.xyzx, l(0.000001, 0.000001, 0.000001, 0.000000), r8.xyzx
        break
        default
        break
      endswitch
      iadd r8.w, r8.w, l(1)
    endloop
    add r4.xyz, r2.xywx, r4.xyzx
  endif
  movc r0.x, r0.w, l(2), l(3)
else
  mov r0.w, l(-1)
endif
not r0.w, r0.w
and r0.y, r0.w, r0.y
ilt r0.w, r0.x, r0.z
and r0.y, r0.w, r0.y
if_nz r0.y
  ge r0.w, l(0.000000), r3.x
  lt r1.z, r3.x, r3.y
  add r3.z, -r3.y, r3.x
  mov r3.w, l(0)
  movc r5.xy, r1.zzzz, r3.wxww, r3.zyzz
  movc r3.xy, r0.wwww, r3.xyxx, r5.xyxx
  if_z r0.w
    mul r1.z, r3.y, cb9[13].y
    if_nz cb9[12].z
      mul r2.z, r1.z, l(0.002000)
      mul r5.x, r4.z, l(-0.0666666701)
      max r5.x, r5.x, l(0.000000)
      rsq r5.x, r5.x
      div r5.x, l(1.000000, 1.000000, 1.000000, 1.000000), r5.x
      mul r5.w, r4.x, cb12[0].x
      mul r5.zw, r5.xxxw, l(0.000000, 0.000000, 16.000000, -0.500000)
      div r5.w, r5.w, r4.z
      add r5.x, r5.w, l(0.500000)
      mul r5.w, r4.y, cb12[1].y
      mul r5.w, r5.w, l(0.500000)
      div r5.w, r5.w, r4.z
      add r5.y, r5.w, l(0.500000)
      sample_indexable(texture2darray)(float,float,float,float) r5.x, r5.xyzx, t1.wxyz, s1
      mul r2.z, r2.z, r5.x
    else
      mul r2.z, r1.z, l(0.000200000009)
    endif
    lt r1.z, l(0.900000), r2.z
    movc r1.z, r1.z, l(0.900000), r2.z
    add r2.z, -r1.z, l(1.000000)
    mul r1.w, r1.w, r2.z
    mul r5.xyz, r2.zzzz, r8.xyzx
    if_nz cb9[12].y
      mov r4.w, l(1.000000)
      dp4 r6.x, cb9[8].xyzw, r4.xyzw
      dp4 r6.y, cb9[9].xyzw, r4.xyzw
      dp4 r6.z, cb9[10].xyzw, r4.xyzw
      dp4 r2.z, cb9[11].xyzw, r4.xyzw
      div r6.xyz, r6.xyzx, r2.zzzz
      mov_sat r7.xy, r6.xyxx
      eq r7.xy, r6.xyxx, r7.xyxx
      and r2.z, r7.y, r7.x
      if_nz r2.z
        mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
        frc r7.xy, r7.xyxx
        lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
        and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
        add r2.z, r7.x, r7.y
        lt r5.w, l(1.100000), r2.z
        movc r7.z, r5.w, l(0), r2.z
        add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
        mad r6.xy, r7.xyxx, l(0.000976562500, 0.000976562500, 0.000000, 0.000000), r6.xyxx
        mov_sat r7.xy, r6.xyxx
        eq r7.xy, r6.xyxx, r7.xyxx
        and r2.z, r7.y, r7.x
        if_nz r2.z
          min r2.z, r6.z, l(1.000000)
          sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t15.xxxx, s15, r2.z
        else
          mov r2.z, l(1.000000)
        endif
      else
        dp4 r6.x, cb9[4].xyzw, r4.xyzw
        dp4 r6.y, cb9[5].xyzw, r4.xyzw
        dp4 r6.z, cb9[6].xyzw, r4.xyzw
        dp4 r5.w, cb9[7].xyzw, r4.xyzw
        div r6.xyz, r6.xyzx, r5.wwww
        mov_sat r7.xy, r6.xyxx
        eq r7.xy, r6.xyxx, r7.xyxx
        and r5.w, r7.y, r7.x
        if_nz r5.w
          mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
          frc r7.xy, r7.xyxx
          lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
          and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
          add r5.w, r7.x, r7.y
          lt r6.w, l(1.100000), r5.w
          movc r7.z, r6.w, l(0), r5.w
          add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
          mad r6.xy, r7.xyxx, l(0.000244140625, 0.000244140625, 0.000000, 0.000000), r6.xyxx
          mov_sat r7.xy, r6.xyxx
          eq r7.xy, r6.xyxx, r7.xyxx
          and r5.w, r7.y, r7.x
          if_nz r5.w
            min r5.w, r6.z, l(1.000000)
            sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t14.xxxx, s14, r5.w
          else
            mov r2.z, l(1.000000)
          endif
        else
          dp4 r6.x, cb9[0].xyzw, r4.xyzw
          dp4 r6.y, cb9[1].xyzw, r4.xyzw
          dp4 r6.z, cb9[2].xyzw, r4.xyzw
          dp4 r5.w, cb9[3].xyzw, r4.xyzw
          div r6.xyz, r6.xyzx, r5.wwww
          mov_sat r7.xy, r6.xyxx
          eq r7.xy, r6.xyxx, r7.xyxx
          and r5.w, r7.y, r7.x
          if_nz r5.w
            mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
            frc r7.xy, r7.xyxx
            lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
            and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
            add r5.w, r7.x, r7.y
            lt r6.w, l(1.100000), r5.w
            movc r7.z, r6.w, l(0), r5.w
            add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
            mad r6.xy, r7.xyxx, l(0.0000610351563, 0.0000610351563, 0.000000, 0.000000), r6.xyxx
            mov_sat r7.xy, r6.xyxx
            eq r7.xy, r6.xyxx, r7.xyxx
            and r5.w, r7.y, r7.x
            if_nz r5.w
              min r5.w, r6.z, l(1.000000)
              sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t13.xxxx, s13, r5.w
            else
              mov r2.z, l(1.000000)
            endif
          else
            mov r2.z, l(1.000000)
          endif
        endif
      endif
      mul r1.z, r1.z, r2.z
    endif
    dp3 r2.z, r2.xywx, r2.xywx
    lt r5.w, l(0.000100), r2.z
    div r6.x, l(1.000000, 1.000000, 1.000000, 1.000000), r2.z
    mad r6.y, -cb9[13].x, cb9[13].x, l(1.000000)
    mad r6.z, cb9[13].x, cb9[13].x, l(1.000000)
    add r6.w, cb9[13].x, cb9[13].x
    dp3 r7.x, r4.xyzx, r4.xyzx
    rsq r7.x, r7.x
    mul r7.xyz, r4.xyzx, r7.xxxx
    mad r9.xyz, r2.xywx, l(0.500000, 0.500000, 0.500000, 0.000000), r4.xyzx
    dp3 r7.w, r9.xyzx, r9.xyzx
    rsq r8.w, r7.w
    mul r9.xyz, r8.wwww, r9.xyzx
    add r7.w, r7.w, l(0.000100)
    log r7.w, r7.w
    mul r7.w, r7.w, l(1.500000)
    exp r7.w, r7.w
    mul r7.w, r7.w, l(0.010000)
    mov r8.xyz, r5.xyzx
    mov r8.w, l(0)
    loop
      uge r9.w, r8.w, cb9[13].w
      breakc_nz r9.w
      ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r9.w, r8.w, l(12), t19.xxxx
      switch r9.w
        case l(0)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyzw, r8.w, l(16), t19.xyzw
        add r11.xyz, r4.xyzx, -r10.xyzx
        dp3 r9.w, r2.xywx, r11.xyzx
        dp3 r11.x, r11.xyzx, r11.xyzx
        mad r11.y, -r10.w, r10.w, r11.x
        mul r11.y, r2.z, r11.y
        mad r11.y, r9.w, r9.w, -r11.y
        ge r11.z, r11.y, l(0.000000)
        and r11.z, r5.w, r11.z
        if_nz r11.z
          sqrt r11.y, r11.y
          add r11.z, -r9.w, -r11.y
          mul r11.z, r6.x, r11.z
          add r9.w, -r9.w, r11.y
          mul r9.w, r6.x, r9.w
          ge r11.y, l(1.000000), r11.z
          ge r11.w, r9.w, l(0.000000)
          and r11.y, r11.w, r11.y
          if_nz r11.y
            lt r11.y, r11.z, l(0.000000)
            lt r11.w, l(1.000000), r9.w
            movc r9.w, r11.w, l(1.000000), r9.w
            movc r11.y, r11.y, l(-0.000000), -r11.z
            add r9.w, r9.w, r11.y
            mul r11.y, r9.w, l(0.500000)
            mad r11.yzw, r11.yyyy, r2.xxyw, r4.xxyz
            ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r12.xyz, r8.w, l(0), t19.xyzx
            dp3 r12.w, r11.yzwy, r11.yzwy
            rsq r12.w, r12.w
            mul r13.xyz, r11.yzwy, r12.wwww
            add r10.xyz, r10.xyzx, -r11.yzwy
            dp3 r11.y, r10.xyzx, r10.xyzx
            rsq r11.y, r11.y
            mul r10.xyz, r10.xyzx, r11.yyyy
            dp3 r10.x, r13.xyzx, r10.xyzx
            mad r10.x, -r6.w, r10.x, r6.z
            log r10.x, |r10.x|
            mul r10.x, r10.x, l(1.500000)
            exp r10.x, r10.x
            mul r10.x, r10.x, l(12.566371)
            div r10.x, r6.y, r10.x
            mul r10.xyz, r10.xxxx, r12.xyzx
            mul r10.xyz, r9.wwww, r10.xyzx
            sqrt r9.w, r11.x
            div r9.w, r9.w, r10.w
            add r9.w, -r9.w, l(1.000000)
            max r9.w, r9.w, l(0.000000)
            mul r10.xyz, r9.wwww, r10.xyzx
            mul r9.w, r11.x, l(0.010000)
            div r10.xyz, r10.xyzx, r9.wwww
            mul r10.xyz, r1.zzzz, r10.xyzx
            mad r8.xyz, r10.xyzx, l(0.100000, 0.100000, 0.100000, 0.000000), r8.xyzx
          endif
        endif
        break
        case l(1)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyzw, r8.w, l(16), t19.xyzw
        add r11.xyz, r4.xyzx, -r10.xyzx
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r12.xyz, r8.w, l(32), t19.xyzx
        dp3 r9.w, r11.xyzx, r12.xyzx
        lt r9.w, l(0.000000), r9.w
        if_nz r9.w
          dp3 r9.w, r12.xyzx, r12.xyzx
          rsq r9.w, r9.w
          mul r12.xyz, r9.wwww, r12.xyzx
          dp3 r9.w, r11.xyzx, r12.xyzx
          mul r13.xyz, r12.xyzx, r9.wwww
          dp3 r9.w, r11.xyzx, r11.xyzx
          rsq r11.w, r9.w
          mul r11.xyz, r11.wwww, r11.xyzx
          dp3 r11.x, r12.xyzx, r11.xyzx
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.yz, r8.w, l(64), t19.xxyx
          ge r11.w, r11.x, r11.y
          ge r12.x, r11.z, r11.x
          add r11.x, -r11.z, r11.x
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.z, r8.w, l(68), t19.xxxx
          add r11.y, -r11.z, r11.y
          div r11.x, r11.x, r11.y
          movc r11.x, r12.x, l(0), r11.x
          movc r11.x, r11.w, l(1.000000), r11.x
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.yzw, r8.w, l(0), t19.xxyz
          add r10.xyz, -r4.xyzx, r10.xyzx
          dp3 r12.x, r10.xyzx, r10.xyzx
          rsq r12.x, r12.x
          mul r10.xyz, r10.xyzx, r12.xxxx
          dp3 r10.x, r7.xyzx, r10.xyzx
          mad r10.x, -r6.w, r10.x, r6.z
          log r10.x, |r10.x|
          mul r10.x, r10.x, l(1.500000)
          exp r10.x, r10.x
          mul r10.x, r10.x, l(12.566371)
          div r10.x, r6.y, r10.x
          mul r10.xyz, r10.xxxx, r11.yzwy
          mul r10.xyz, r11.xxxx, r10.xyzx
          mul r10.xyz, r10.xyzx, l(10000.000000, 10000.000000, 10000.000000, 0.000000)
          sqrt r9.w, r9.w
          div r9.w, r9.w, r10.w
          add r9.w, -r9.w, l(1.000000)
          max r9.w, r9.w, l(0.000000)
          mul r10.xyz, r9.wwww, r10.xyzx
          dp3 r9.w, r13.xyzx, r13.xyzx
          add r9.w, r9.w, l(0.010000)
          div r10.xyz, r10.xyzx, r9.wwww
          mad r8.xyz, r1.zzzz, r10.xyzx, r8.xyzx
        endif
        break
        case l(2)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyz, r8.w, l(32), t19.xyzx
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.xyz, r8.w, l(0), t19.xyzx
        dp3 r9.w, r10.xyzx, r10.xyzx
        rsq r9.w, r9.w
        mul r10.xyz, r9.wwww, r10.xyzx
        dp3 r9.w, r9.xyzx, r10.xyzx
        mad r9.w, -r6.w, r9.w, r6.z
        log r9.w, |r9.w|
        mul r9.w, r9.w, l(1.500000)
        exp r9.w, r9.w
        mul r9.w, r9.w, l(12.566371)
        div r9.w, r6.y, r9.w
        mul r10.xyz, r9.wwww, r11.xyzx
        div r10.xyz, r10.xyzx, r7.wwww
        mul r10.xyz, r1.zzzz, r10.xyzx
        mad r8.xyz, r10.xyzx, l(0.000001, 0.000001, 0.000001, 0.000000), r8.xyzx
        break
        default
        break
      endswitch
      iadd r8.w, r8.w, l(1)
    endloop
    add r4.xyz, r2.xywx, r4.xyzx
  endif
  movc r0.x, r0.w, l(3), l(4)
else
  mov r0.w, l(-1)
endif
not r0.w, r0.w
and r0.y, r0.w, r0.y
ilt r0.w, r0.x, r0.z
and r0.y, r0.w, r0.y
if_nz r0.y
  ge r0.w, l(0.000000), r3.x
  lt r1.z, r3.x, r3.y
  add r3.z, -r3.y, r3.x
  mov r3.w, l(0)
  movc r5.xy, r1.zzzz, r3.wxww, r3.zyzz
  movc r3.xy, r0.wwww, r3.xyxx, r5.xyxx
  if_z r0.w
    mul r1.z, r3.y, cb9[13].y
    if_nz cb9[12].z
      mul r2.z, r1.z, l(0.002000)
      mul r5.x, r4.z, l(-0.0666666701)
      max r5.x, r5.x, l(0.000000)
      rsq r5.x, r5.x
      div r5.x, l(1.000000, 1.000000, 1.000000, 1.000000), r5.x
      mul r5.w, r4.x, cb12[0].x
      mul r5.zw, r5.xxxw, l(0.000000, 0.000000, 16.000000, -0.500000)
      div r5.w, r5.w, r4.z
      add r5.x, r5.w, l(0.500000)
      mul r5.w, r4.y, cb12[1].y
      mul r5.w, r5.w, l(0.500000)
      div r5.w, r5.w, r4.z
      add r5.y, r5.w, l(0.500000)
      sample_indexable(texture2darray)(float,float,float,float) r5.x, r5.xyzx, t1.wxyz, s1
      mul r2.z, r2.z, r5.x
    else
      mul r2.z, r1.z, l(0.000200000009)
    endif
    lt r1.z, l(0.900000), r2.z
    movc r1.z, r1.z, l(0.900000), r2.z
    add r2.z, -r1.z, l(1.000000)
    mul r1.w, r1.w, r2.z
    mul r5.xyz, r2.zzzz, r8.xyzx
    if_nz cb9[12].y
      mov r4.w, l(1.000000)
      dp4 r6.x, cb9[8].xyzw, r4.xyzw
      dp4 r6.y, cb9[9].xyzw, r4.xyzw
      dp4 r6.z, cb9[10].xyzw, r4.xyzw
      dp4 r2.z, cb9[11].xyzw, r4.xyzw
      div r6.xyz, r6.xyzx, r2.zzzz
      mov_sat r7.xy, r6.xyxx
      eq r7.xy, r6.xyxx, r7.xyxx
      and r2.z, r7.y, r7.x
      if_nz r2.z
        mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
        frc r7.xy, r7.xyxx
        lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
        and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
        add r2.z, r7.x, r7.y
        lt r5.w, l(1.100000), r2.z
        movc r7.z, r5.w, l(0), r2.z
        add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
        mad r6.xy, r7.xyxx, l(0.000976562500, 0.000976562500, 0.000000, 0.000000), r6.xyxx
        mov_sat r7.xy, r6.xyxx
        eq r7.xy, r6.xyxx, r7.xyxx
        and r2.z, r7.y, r7.x
        if_nz r2.z
          min r2.z, r6.z, l(1.000000)
          sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t15.xxxx, s15, r2.z
        else
          mov r2.z, l(1.000000)
        endif
      else
        dp4 r6.x, cb9[4].xyzw, r4.xyzw
        dp4 r6.y, cb9[5].xyzw, r4.xyzw
        dp4 r6.z, cb9[6].xyzw, r4.xyzw
        dp4 r5.w, cb9[7].xyzw, r4.xyzw
        div r6.xyz, r6.xyzx, r5.wwww
        mov_sat r7.xy, r6.xyxx
        eq r7.xy, r6.xyxx, r7.xyxx
        and r5.w, r7.y, r7.x
        if_nz r5.w
          mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
          frc r7.xy, r7.xyxx
          lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
          and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
          add r5.w, r7.x, r7.y
          lt r6.w, l(1.100000), r5.w
          movc r7.z, r6.w, l(0), r5.w
          add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
          mad r6.xy, r7.xyxx, l(0.000244140625, 0.000244140625, 0.000000, 0.000000), r6.xyxx
          mov_sat r7.xy, r6.xyxx
          eq r7.xy, r6.xyxx, r7.xyxx
          and r5.w, r7.y, r7.x
          if_nz r5.w
            min r5.w, r6.z, l(1.000000)
            sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t14.xxxx, s14, r5.w
          else
            mov r2.z, l(1.000000)
          endif
        else
          dp4 r6.x, cb9[0].xyzw, r4.xyzw
          dp4 r6.y, cb9[1].xyzw, r4.xyzw
          dp4 r6.z, cb9[2].xyzw, r4.xyzw
          dp4 r5.w, cb9[3].xyzw, r4.xyzw
          div r6.xyz, r6.xyzx, r5.wwww
          mov_sat r7.xy, r6.xyxx
          eq r7.xy, r6.xyxx, r7.xyxx
          and r5.w, r7.y, r7.x
          if_nz r5.w
            mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
            frc r7.xy, r7.xyxx
            lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
            and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
            add r5.w, r7.x, r7.y
            lt r6.w, l(1.100000), r5.w
            movc r7.z, r6.w, l(0), r5.w
            add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
            mad r6.xy, r7.xyxx, l(0.0000610351563, 0.0000610351563, 0.000000, 0.000000), r6.xyxx
            mov_sat r7.xy, r6.xyxx
            eq r7.xy, r6.xyxx, r7.xyxx
            and r5.w, r7.y, r7.x
            if_nz r5.w
              min r5.w, r6.z, l(1.000000)
              sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t13.xxxx, s13, r5.w
            else
              mov r2.z, l(1.000000)
            endif
          else
            mov r2.z, l(1.000000)
          endif
        endif
      endif
      mul r1.z, r1.z, r2.z
    endif
    dp3 r2.z, r2.xywx, r2.xywx
    lt r5.w, l(0.000100), r2.z
    div r6.x, l(1.000000, 1.000000, 1.000000, 1.000000), r2.z
    mad r6.y, -cb9[13].x, cb9[13].x, l(1.000000)
    mad r6.z, cb9[13].x, cb9[13].x, l(1.000000)
    add r6.w, cb9[13].x, cb9[13].x
    dp3 r7.x, r4.xyzx, r4.xyzx
    rsq r7.x, r7.x
    mul r7.xyz, r4.xyzx, r7.xxxx
    mad r9.xyz, r2.xywx, l(0.500000, 0.500000, 0.500000, 0.000000), r4.xyzx
    dp3 r7.w, r9.xyzx, r9.xyzx
    rsq r8.w, r7.w
    mul r9.xyz, r8.wwww, r9.xyzx
    add r7.w, r7.w, l(0.000100)
    log r7.w, r7.w
    mul r7.w, r7.w, l(1.500000)
    exp r7.w, r7.w
    mul r7.w, r7.w, l(0.010000)
    mov r8.xyz, r5.xyzx
    mov r8.w, l(0)
    loop
      uge r9.w, r8.w, cb9[13].w
      breakc_nz r9.w
      ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r9.w, r8.w, l(12), t19.xxxx
      switch r9.w
        case l(0)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyzw, r8.w, l(16), t19.xyzw
        add r11.xyz, r4.xyzx, -r10.xyzx
        dp3 r9.w, r2.xywx, r11.xyzx
        dp3 r11.x, r11.xyzx, r11.xyzx
        mad r11.y, -r10.w, r10.w, r11.x
        mul r11.y, r2.z, r11.y
        mad r11.y, r9.w, r9.w, -r11.y
        ge r11.z, r11.y, l(0.000000)
        and r11.z, r5.w, r11.z
        if_nz r11.z
          sqrt r11.y, r11.y
          add r11.z, -r9.w, -r11.y
          mul r11.z, r6.x, r11.z
          add r9.w, -r9.w, r11.y
          mul r9.w, r6.x, r9.w
          ge r11.y, l(1.000000), r11.z
          ge r11.w, r9.w, l(0.000000)
          and r11.y, r11.w, r11.y
          if_nz r11.y
            lt r11.y, r11.z, l(0.000000)
            lt r11.w, l(1.000000), r9.w
            movc r9.w, r11.w, l(1.000000), r9.w
            movc r11.y, r11.y, l(-0.000000), -r11.z
            add r9.w, r9.w, r11.y
            mul r11.y, r9.w, l(0.500000)
            mad r11.yzw, r11.yyyy, r2.xxyw, r4.xxyz
            ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r12.xyz, r8.w, l(0), t19.xyzx
            dp3 r12.w, r11.yzwy, r11.yzwy
            rsq r12.w, r12.w
            mul r13.xyz, r11.yzwy, r12.wwww
            add r10.xyz, r10.xyzx, -r11.yzwy
            dp3 r11.y, r10.xyzx, r10.xyzx
            rsq r11.y, r11.y
            mul r10.xyz, r10.xyzx, r11.yyyy
            dp3 r10.x, r13.xyzx, r10.xyzx
            mad r10.x, -r6.w, r10.x, r6.z
            log r10.x, |r10.x|
            mul r10.x, r10.x, l(1.500000)
            exp r10.x, r10.x
            mul r10.x, r10.x, l(12.566371)
            div r10.x, r6.y, r10.x
            mul r10.xyz, r10.xxxx, r12.xyzx
            mul r10.xyz, r9.wwww, r10.xyzx
            sqrt r9.w, r11.x
            div r9.w, r9.w, r10.w
            add r9.w, -r9.w, l(1.000000)
            max r9.w, r9.w, l(0.000000)
            mul r10.xyz, r9.wwww, r10.xyzx
            mul r9.w, r11.x, l(0.010000)
            div r10.xyz, r10.xyzx, r9.wwww
            mul r10.xyz, r1.zzzz, r10.xyzx
            mad r8.xyz, r10.xyzx, l(0.100000, 0.100000, 0.100000, 0.000000), r8.xyzx
          endif
        endif
        break
        case l(1)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyzw, r8.w, l(16), t19.xyzw
        add r11.xyz, r4.xyzx, -r10.xyzx
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r12.xyz, r8.w, l(32), t19.xyzx
        dp3 r9.w, r11.xyzx, r12.xyzx
        lt r9.w, l(0.000000), r9.w
        if_nz r9.w
          dp3 r9.w, r12.xyzx, r12.xyzx
          rsq r9.w, r9.w
          mul r12.xyz, r9.wwww, r12.xyzx
          dp3 r9.w, r11.xyzx, r12.xyzx
          mul r13.xyz, r12.xyzx, r9.wwww
          dp3 r9.w, r11.xyzx, r11.xyzx
          rsq r11.w, r9.w
          mul r11.xyz, r11.wwww, r11.xyzx
          dp3 r11.x, r12.xyzx, r11.xyzx
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.yz, r8.w, l(64), t19.xxyx
          ge r11.w, r11.x, r11.y
          ge r12.x, r11.z, r11.x
          add r11.x, -r11.z, r11.x
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.z, r8.w, l(68), t19.xxxx
          add r11.y, -r11.z, r11.y
          div r11.x, r11.x, r11.y
          movc r11.x, r12.x, l(0), r11.x
          movc r11.x, r11.w, l(1.000000), r11.x
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.yzw, r8.w, l(0), t19.xxyz
          add r10.xyz, -r4.xyzx, r10.xyzx
          dp3 r12.x, r10.xyzx, r10.xyzx
          rsq r12.x, r12.x
          mul r10.xyz, r10.xyzx, r12.xxxx
          dp3 r10.x, r7.xyzx, r10.xyzx
          mad r10.x, -r6.w, r10.x, r6.z
          log r10.x, |r10.x|
          mul r10.x, r10.x, l(1.500000)
          exp r10.x, r10.x
          mul r10.x, r10.x, l(12.566371)
          div r10.x, r6.y, r10.x
          mul r10.xyz, r10.xxxx, r11.yzwy
          mul r10.xyz, r11.xxxx, r10.xyzx
          mul r10.xyz, r10.xyzx, l(10000.000000, 10000.000000, 10000.000000, 0.000000)
          sqrt r9.w, r9.w
          div r9.w, r9.w, r10.w
          add r9.w, -r9.w, l(1.000000)
          max r9.w, r9.w, l(0.000000)
          mul r10.xyz, r9.wwww, r10.xyzx
          dp3 r9.w, r13.xyzx, r13.xyzx
          add r9.w, r9.w, l(0.010000)
          div r10.xyz, r10.xyzx, r9.wwww
          mad r8.xyz, r1.zzzz, r10.xyzx, r8.xyzx
        endif
        break
        case l(2)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyz, r8.w, l(32), t19.xyzx
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.xyz, r8.w, l(0), t19.xyzx
        dp3 r9.w, r10.xyzx, r10.xyzx
        rsq r9.w, r9.w
        mul r10.xyz, r9.wwww, r10.xyzx
        dp3 r9.w, r9.xyzx, r10.xyzx
        mad r9.w, -r6.w, r9.w, r6.z
        log r9.w, |r9.w|
        mul r9.w, r9.w, l(1.500000)
        exp r9.w, r9.w
        mul r9.w, r9.w, l(12.566371)
        div r9.w, r6.y, r9.w
        mul r10.xyz, r9.wwww, r11.xyzx
        div r10.xyz, r10.xyzx, r7.wwww
        mul r10.xyz, r1.zzzz, r10.xyzx
        mad r8.xyz, r10.xyzx, l(0.000001, 0.000001, 0.000001, 0.000000), r8.xyzx
        break
        default
        break
      endswitch
      iadd r8.w, r8.w, l(1)
    endloop
    add r4.xyz, r2.xywx, r4.xyzx
  endif
  movc r0.x, r0.w, l(4), l(5)
else
  mov r0.w, l(-1)
endif
not r0.w, r0.w
and r0.y, r0.w, r0.y
ilt r0.w, r0.x, r0.z
and r0.y, r0.w, r0.y
if_nz r0.y
  ge r0.w, l(0.000000), r3.x
  lt r1.z, r3.x, r3.y
  add r3.z, -r3.y, r3.x
  mov r3.w, l(0)
  movc r5.xy, r1.zzzz, r3.wxww, r3.zyzz
  movc r3.xy, r0.wwww, r3.xyxx, r5.xyxx
  if_z r0.w
    mul r1.z, r3.y, cb9[13].y
    if_nz cb9[12].z
      mul r2.z, r1.z, l(0.002000)
      mul r5.x, r4.z, l(-0.0666666701)
      max r5.x, r5.x, l(0.000000)
      rsq r5.x, r5.x
      div r5.x, l(1.000000, 1.000000, 1.000000, 1.000000), r5.x
      mul r5.w, r4.x, cb12[0].x
      mul r5.zw, r5.xxxw, l(0.000000, 0.000000, 16.000000, -0.500000)
      div r5.w, r5.w, r4.z
      add r5.x, r5.w, l(0.500000)
      mul r5.w, r4.y, cb12[1].y
      mul r5.w, r5.w, l(0.500000)
      div r5.w, r5.w, r4.z
      add r5.y, r5.w, l(0.500000)
      sample_indexable(texture2darray)(float,float,float,float) r5.x, r5.xyzx, t1.wxyz, s1
      mul r2.z, r2.z, r5.x
    else
      mul r2.z, r1.z, l(0.000200000009)
    endif
    lt r1.z, l(0.900000), r2.z
    movc r1.z, r1.z, l(0.900000), r2.z
    add r2.z, -r1.z, l(1.000000)
    mul r1.w, r1.w, r2.z
    mul r5.xyz, r2.zzzz, r8.xyzx
    if_nz cb9[12].y
      mov r4.w, l(1.000000)
      dp4 r6.x, cb9[8].xyzw, r4.xyzw
      dp4 r6.y, cb9[9].xyzw, r4.xyzw
      dp4 r6.z, cb9[10].xyzw, r4.xyzw
      dp4 r2.z, cb9[11].xyzw, r4.xyzw
      div r6.xyz, r6.xyzx, r2.zzzz
      mov_sat r7.xy, r6.xyxx
      eq r7.xy, r6.xyxx, r7.xyxx
      and r2.z, r7.y, r7.x
      if_nz r2.z
        mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
        frc r7.xy, r7.xyxx
        lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
        and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
        add r2.z, r7.x, r7.y
        lt r5.w, l(1.100000), r2.z
        movc r7.z, r5.w, l(0), r2.z
        add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
        mad r6.xy, r7.xyxx, l(0.000976562500, 0.000976562500, 0.000000, 0.000000), r6.xyxx
        mov_sat r7.xy, r6.xyxx
        eq r7.xy, r6.xyxx, r7.xyxx
        and r2.z, r7.y, r7.x
        if_nz r2.z
          min r2.z, r6.z, l(1.000000)
          sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t15.xxxx, s15, r2.z
        else
          mov r2.z, l(1.000000)
        endif
      else
        dp4 r6.x, cb9[4].xyzw, r4.xyzw
        dp4 r6.y, cb9[5].xyzw, r4.xyzw
        dp4 r6.z, cb9[6].xyzw, r4.xyzw
        dp4 r5.w, cb9[7].xyzw, r4.xyzw
        div r6.xyz, r6.xyzx, r5.wwww
        mov_sat r7.xy, r6.xyxx
        eq r7.xy, r6.xyxx, r7.xyxx
        and r5.w, r7.y, r7.x
        if_nz r5.w
          mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
          frc r7.xy, r7.xyxx
          lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
          and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
          add r5.w, r7.x, r7.y
          lt r6.w, l(1.100000), r5.w
          movc r7.z, r6.w, l(0), r5.w
          add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
          mad r6.xy, r7.xyxx, l(0.000244140625, 0.000244140625, 0.000000, 0.000000), r6.xyxx
          mov_sat r7.xy, r6.xyxx
          eq r7.xy, r6.xyxx, r7.xyxx
          and r5.w, r7.y, r7.x
          if_nz r5.w
            min r5.w, r6.z, l(1.000000)
            sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t14.xxxx, s14, r5.w
          else
            mov r2.z, l(1.000000)
          endif
        else
          dp4 r6.x, cb9[0].xyzw, r4.xyzw
          dp4 r6.y, cb9[1].xyzw, r4.xyzw
          dp4 r6.z, cb9[2].xyzw, r4.xyzw
          dp4 r5.w, cb9[3].xyzw, r4.xyzw
          div r6.xyz, r6.xyzx, r5.wwww
          mov_sat r7.xy, r6.xyxx
          eq r7.xy, r6.xyxx, r7.xyxx
          and r5.w, r7.y, r7.x
          if_nz r5.w
            mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
            frc r7.xy, r7.xyxx
            lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
            and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
            add r5.w, r7.x, r7.y
            lt r6.w, l(1.100000), r5.w
            movc r7.z, r6.w, l(0), r5.w
            add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
            mad r6.xy, r7.xyxx, l(0.0000610351563, 0.0000610351563, 0.000000, 0.000000), r6.xyxx
            mov_sat r7.xy, r6.xyxx
            eq r7.xy, r6.xyxx, r7.xyxx
            and r5.w, r7.y, r7.x
            if_nz r5.w
              min r5.w, r6.z, l(1.000000)
              sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t13.xxxx, s13, r5.w
            else
              mov r2.z, l(1.000000)
            endif
          else
            mov r2.z, l(1.000000)
          endif
        endif
      endif
      mul r1.z, r1.z, r2.z
    endif
    dp3 r2.z, r2.xywx, r2.xywx
    lt r5.w, l(0.000100), r2.z
    div r6.x, l(1.000000, 1.000000, 1.000000, 1.000000), r2.z
    mad r6.y, -cb9[13].x, cb9[13].x, l(1.000000)
    mad r6.z, cb9[13].x, cb9[13].x, l(1.000000)
    add r6.w, cb9[13].x, cb9[13].x
    dp3 r7.x, r4.xyzx, r4.xyzx
    rsq r7.x, r7.x
    mul r7.xyz, r4.xyzx, r7.xxxx
    mad r9.xyz, r2.xywx, l(0.500000, 0.500000, 0.500000, 0.000000), r4.xyzx
    dp3 r7.w, r9.xyzx, r9.xyzx
    rsq r8.w, r7.w
    mul r9.xyz, r8.wwww, r9.xyzx
    add r7.w, r7.w, l(0.000100)
    log r7.w, r7.w
    mul r7.w, r7.w, l(1.500000)
    exp r7.w, r7.w
    mul r7.w, r7.w, l(0.010000)
    mov r8.xyz, r5.xyzx
    mov r8.w, l(0)
    loop
      uge r9.w, r8.w, cb9[13].w
      breakc_nz r9.w
      ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r9.w, r8.w, l(12), t19.xxxx
      switch r9.w
        case l(0)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyzw, r8.w, l(16), t19.xyzw
        add r11.xyz, r4.xyzx, -r10.xyzx
        dp3 r9.w, r2.xywx, r11.xyzx
        dp3 r11.x, r11.xyzx, r11.xyzx
        mad r11.y, -r10.w, r10.w, r11.x
        mul r11.y, r2.z, r11.y
        mad r11.y, r9.w, r9.w, -r11.y
        ge r11.z, r11.y, l(0.000000)
        and r11.z, r5.w, r11.z
        if_nz r11.z
          sqrt r11.y, r11.y
          add r11.z, -r9.w, -r11.y
          mul r11.z, r6.x, r11.z
          add r9.w, -r9.w, r11.y
          mul r9.w, r6.x, r9.w
          ge r11.y, l(1.000000), r11.z
          ge r11.w, r9.w, l(0.000000)
          and r11.y, r11.w, r11.y
          if_nz r11.y
            lt r11.y, r11.z, l(0.000000)
            lt r11.w, l(1.000000), r9.w
            movc r9.w, r11.w, l(1.000000), r9.w
            movc r11.y, r11.y, l(-0.000000), -r11.z
            add r9.w, r9.w, r11.y
            mul r11.y, r9.w, l(0.500000)
            mad r11.yzw, r11.yyyy, r2.xxyw, r4.xxyz
            ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r12.xyz, r8.w, l(0), t19.xyzx
            dp3 r12.w, r11.yzwy, r11.yzwy
            rsq r12.w, r12.w
            mul r13.xyz, r11.yzwy, r12.wwww
            add r10.xyz, r10.xyzx, -r11.yzwy
            dp3 r11.y, r10.xyzx, r10.xyzx
            rsq r11.y, r11.y
            mul r10.xyz, r10.xyzx, r11.yyyy
            dp3 r10.x, r13.xyzx, r10.xyzx
            mad r10.x, -r6.w, r10.x, r6.z
            log r10.x, |r10.x|
            mul r10.x, r10.x, l(1.500000)
            exp r10.x, r10.x
            mul r10.x, r10.x, l(12.566371)
            div r10.x, r6.y, r10.x
            mul r10.xyz, r10.xxxx, r12.xyzx
            mul r10.xyz, r9.wwww, r10.xyzx
            sqrt r9.w, r11.x
            div r9.w, r9.w, r10.w
            add r9.w, -r9.w, l(1.000000)
            max r9.w, r9.w, l(0.000000)
            mul r10.xyz, r9.wwww, r10.xyzx
            mul r9.w, r11.x, l(0.010000)
            div r10.xyz, r10.xyzx, r9.wwww
            mul r10.xyz, r1.zzzz, r10.xyzx
            mad r8.xyz, r10.xyzx, l(0.100000, 0.100000, 0.100000, 0.000000), r8.xyzx
          endif
        endif
        break
        case l(1)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyzw, r8.w, l(16), t19.xyzw
        add r11.xyz, r4.xyzx, -r10.xyzx
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r12.xyz, r8.w, l(32), t19.xyzx
        dp3 r9.w, r11.xyzx, r12.xyzx
        lt r9.w, l(0.000000), r9.w
        if_nz r9.w
          dp3 r9.w, r12.xyzx, r12.xyzx
          rsq r9.w, r9.w
          mul r12.xyz, r9.wwww, r12.xyzx
          dp3 r9.w, r11.xyzx, r12.xyzx
          mul r13.xyz, r12.xyzx, r9.wwww
          dp3 r9.w, r11.xyzx, r11.xyzx
          rsq r11.w, r9.w
          mul r11.xyz, r11.wwww, r11.xyzx
          dp3 r11.x, r12.xyzx, r11.xyzx
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.yz, r8.w, l(64), t19.xxyx
          ge r11.w, r11.x, r11.y
          ge r12.x, r11.z, r11.x
          add r11.x, -r11.z, r11.x
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.z, r8.w, l(68), t19.xxxx
          add r11.y, -r11.z, r11.y
          div r11.x, r11.x, r11.y
          movc r11.x, r12.x, l(0), r11.x
          movc r11.x, r11.w, l(1.000000), r11.x
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.yzw, r8.w, l(0), t19.xxyz
          add r10.xyz, -r4.xyzx, r10.xyzx
          dp3 r12.x, r10.xyzx, r10.xyzx
          rsq r12.x, r12.x
          mul r10.xyz, r10.xyzx, r12.xxxx
          dp3 r10.x, r7.xyzx, r10.xyzx
          mad r10.x, -r6.w, r10.x, r6.z
          log r10.x, |r10.x|
          mul r10.x, r10.x, l(1.500000)
          exp r10.x, r10.x
          mul r10.x, r10.x, l(12.566371)
          div r10.x, r6.y, r10.x
          mul r10.xyz, r10.xxxx, r11.yzwy
          mul r10.xyz, r11.xxxx, r10.xyzx
          mul r10.xyz, r10.xyzx, l(10000.000000, 10000.000000, 10000.000000, 0.000000)
          sqrt r9.w, r9.w
          div r9.w, r9.w, r10.w
          add r9.w, -r9.w, l(1.000000)
          max r9.w, r9.w, l(0.000000)
          mul r10.xyz, r9.wwww, r10.xyzx
          dp3 r9.w, r13.xyzx, r13.xyzx
          add r9.w, r9.w, l(0.010000)
          div r10.xyz, r10.xyzx, r9.wwww
          mad r8.xyz, r1.zzzz, r10.xyzx, r8.xyzx
        endif
        break
        case l(2)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyz, r8.w, l(32), t19.xyzx
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.xyz, r8.w, l(0), t19.xyzx
        dp3 r9.w, r10.xyzx, r10.xyzx
        rsq r9.w, r9.w
        mul r10.xyz, r9.wwww, r10.xyzx
        dp3 r9.w, r9.xyzx, r10.xyzx
        mad r9.w, -r6.w, r9.w, r6.z
        log r9.w, |r9.w|
        mul r9.w, r9.w, l(1.500000)
        exp r9.w, r9.w
        mul r9.w, r9.w, l(12.566371)
        div r9.w, r6.y, r9.w
        mul r10.xyz, r9.wwww, r11.xyzx
        div r10.xyz, r10.xyzx, r7.wwww
        mul r10.xyz, r1.zzzz, r10.xyzx
        mad r8.xyz, r10.xyzx, l(0.000001, 0.000001, 0.000001, 0.000000), r8.xyzx
        break
        default
        break
      endswitch
      iadd r8.w, r8.w, l(1)
    endloop
    add r4.xyz, r2.xywx, r4.xyzx
  endif
  movc r0.x, r0.w, l(5), l(6)
else
  mov r0.w, l(-1)
endif
not r0.w, r0.w
and r0.y, r0.w, r0.y
ilt r0.w, r0.x, r0.z
and r0.y, r0.w, r0.y
if_nz r0.y
  ge r0.w, l(0.000000), r3.x
  lt r1.z, r3.x, r3.y
  add r3.z, -r3.y, r3.x
  mov r3.w, l(0)
  movc r5.xy, r1.zzzz, r3.wxww, r3.zyzz
  movc r3.xy, r0.wwww, r3.xyxx, r5.xyxx
  if_z r0.w
    mul r1.z, r3.y, cb9[13].y
    if_nz cb9[12].z
      mul r2.z, r1.z, l(0.002000)
      mul r5.x, r4.z, l(-0.0666666701)
      max r5.x, r5.x, l(0.000000)
      rsq r5.x, r5.x
      div r5.x, l(1.000000, 1.000000, 1.000000, 1.000000), r5.x
      mul r5.w, r4.x, cb12[0].x
      mul r5.zw, r5.xxxw, l(0.000000, 0.000000, 16.000000, -0.500000)
      div r5.w, r5.w, r4.z
      add r5.x, r5.w, l(0.500000)
      mul r5.w, r4.y, cb12[1].y
      mul r5.w, r5.w, l(0.500000)
      div r5.w, r5.w, r4.z
      add r5.y, r5.w, l(0.500000)
      sample_indexable(texture2darray)(float,float,float,float) r5.x, r5.xyzx, t1.wxyz, s1
      mul r2.z, r2.z, r5.x
    else
      mul r2.z, r1.z, l(0.000200000009)
    endif
    lt r1.z, l(0.900000), r2.z
    movc r1.z, r1.z, l(0.900000), r2.z
    add r2.z, -r1.z, l(1.000000)
    mul r1.w, r1.w, r2.z
    mul r5.xyz, r2.zzzz, r8.xyzx
    if_nz cb9[12].y
      mov r4.w, l(1.000000)
      dp4 r6.x, cb9[8].xyzw, r4.xyzw
      dp4 r6.y, cb9[9].xyzw, r4.xyzw
      dp4 r6.z, cb9[10].xyzw, r4.xyzw
      dp4 r2.z, cb9[11].xyzw, r4.xyzw
      div r6.xyz, r6.xyzx, r2.zzzz
      mov_sat r7.xy, r6.xyxx
      eq r7.xy, r6.xyxx, r7.xyxx
      and r2.z, r7.y, r7.x
      if_nz r2.z
        mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
        frc r7.xy, r7.xyxx
        lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
        and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
        add r2.z, r7.x, r7.y
        lt r5.w, l(1.100000), r2.z
        movc r7.z, r5.w, l(0), r2.z
        add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
        mad r6.xy, r7.xyxx, l(0.000976562500, 0.000976562500, 0.000000, 0.000000), r6.xyxx
        mov_sat r7.xy, r6.xyxx
        eq r7.xy, r6.xyxx, r7.xyxx
        and r2.z, r7.y, r7.x
        if_nz r2.z
          min r2.z, r6.z, l(1.000000)
          sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t15.xxxx, s15, r2.z
        else
          mov r2.z, l(1.000000)
        endif
      else
        dp4 r6.x, cb9[4].xyzw, r4.xyzw
        dp4 r6.y, cb9[5].xyzw, r4.xyzw
        dp4 r6.z, cb9[6].xyzw, r4.xyzw
        dp4 r5.w, cb9[7].xyzw, r4.xyzw
        div r6.xyz, r6.xyzx, r5.wwww
        mov_sat r7.xy, r6.xyxx
        eq r7.xy, r6.xyxx, r7.xyxx
        and r5.w, r7.y, r7.x
        if_nz r5.w
          mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
          frc r7.xy, r7.xyxx
          lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
          and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
          add r5.w, r7.x, r7.y
          lt r6.w, l(1.100000), r5.w
          movc r7.z, r6.w, l(0), r5.w
          add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
          mad r6.xy, r7.xyxx, l(0.000244140625, 0.000244140625, 0.000000, 0.000000), r6.xyxx
          mov_sat r7.xy, r6.xyxx
          eq r7.xy, r6.xyxx, r7.xyxx
          and r5.w, r7.y, r7.x
          if_nz r5.w
            min r5.w, r6.z, l(1.000000)
            sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t14.xxxx, s14, r5.w
          else
            mov r2.z, l(1.000000)
          endif
        else
          dp4 r6.x, cb9[0].xyzw, r4.xyzw
          dp4 r6.y, cb9[1].xyzw, r4.xyzw
          dp4 r6.z, cb9[2].xyzw, r4.xyzw
          dp4 r5.w, cb9[3].xyzw, r4.xyzw
          div r6.xyz, r6.xyzx, r5.wwww
          mov_sat r7.xy, r6.xyxx
          eq r7.xy, r6.xyxx, r7.xyxx
          and r5.w, r7.y, r7.x
          if_nz r5.w
            mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
            frc r7.xy, r7.xyxx
            lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
            and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
            add r5.w, r7.x, r7.y
            lt r6.w, l(1.100000), r5.w
            movc r7.z, r6.w, l(0), r5.w
            add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
            mad r6.xy, r7.xyxx, l(0.0000610351563, 0.0000610351563, 0.000000, 0.000000), r6.xyxx
            mov_sat r7.xy, r6.xyxx
            eq r7.xy, r6.xyxx, r7.xyxx
            and r5.w, r7.y, r7.x
            if_nz r5.w
              min r5.w, r6.z, l(1.000000)
              sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t13.xxxx, s13, r5.w
            else
              mov r2.z, l(1.000000)
            endif
          else
            mov r2.z, l(1.000000)
          endif
        endif
      endif
      mul r1.z, r1.z, r2.z
    endif
    dp3 r2.z, r2.xywx, r2.xywx
    lt r5.w, l(0.000100), r2.z
    div r6.x, l(1.000000, 1.000000, 1.000000, 1.000000), r2.z
    mad r6.y, -cb9[13].x, cb9[13].x, l(1.000000)
    mad r6.z, cb9[13].x, cb9[13].x, l(1.000000)
    add r6.w, cb9[13].x, cb9[13].x
    dp3 r7.x, r4.xyzx, r4.xyzx
    rsq r7.x, r7.x
    mul r7.xyz, r4.xyzx, r7.xxxx
    mad r9.xyz, r2.xywx, l(0.500000, 0.500000, 0.500000, 0.000000), r4.xyzx
    dp3 r7.w, r9.xyzx, r9.xyzx
    rsq r8.w, r7.w
    mul r9.xyz, r8.wwww, r9.xyzx
    add r7.w, r7.w, l(0.000100)
    log r7.w, r7.w
    mul r7.w, r7.w, l(1.500000)
    exp r7.w, r7.w
    mul r7.w, r7.w, l(0.010000)
    mov r8.xyz, r5.xyzx
    mov r8.w, l(0)
    loop
      uge r9.w, r8.w, cb9[13].w
      breakc_nz r9.w
      ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r9.w, r8.w, l(12), t19.xxxx
      switch r9.w
        case l(0)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyzw, r8.w, l(16), t19.xyzw
        add r11.xyz, r4.xyzx, -r10.xyzx
        dp3 r9.w, r2.xywx, r11.xyzx
        dp3 r11.x, r11.xyzx, r11.xyzx
        mad r11.y, -r10.w, r10.w, r11.x
        mul r11.y, r2.z, r11.y
        mad r11.y, r9.w, r9.w, -r11.y
        ge r11.z, r11.y, l(0.000000)
        and r11.z, r5.w, r11.z
        if_nz r11.z
          sqrt r11.y, r11.y
          add r11.z, -r9.w, -r11.y
          mul r11.z, r6.x, r11.z
          add r9.w, -r9.w, r11.y
          mul r9.w, r6.x, r9.w
          ge r11.y, l(1.000000), r11.z
          ge r11.w, r9.w, l(0.000000)
          and r11.y, r11.w, r11.y
          if_nz r11.y
            lt r11.y, r11.z, l(0.000000)
            lt r11.w, l(1.000000), r9.w
            movc r9.w, r11.w, l(1.000000), r9.w
            movc r11.y, r11.y, l(-0.000000), -r11.z
            add r9.w, r9.w, r11.y
            mul r11.y, r9.w, l(0.500000)
            mad r11.yzw, r11.yyyy, r2.xxyw, r4.xxyz
            ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r12.xyz, r8.w, l(0), t19.xyzx
            dp3 r12.w, r11.yzwy, r11.yzwy
            rsq r12.w, r12.w
            mul r13.xyz, r11.yzwy, r12.wwww
            add r10.xyz, r10.xyzx, -r11.yzwy
            dp3 r11.y, r10.xyzx, r10.xyzx
            rsq r11.y, r11.y
            mul r10.xyz, r10.xyzx, r11.yyyy
            dp3 r10.x, r13.xyzx, r10.xyzx
            mad r10.x, -r6.w, r10.x, r6.z
            log r10.x, |r10.x|
            mul r10.x, r10.x, l(1.500000)
            exp r10.x, r10.x
            mul r10.x, r10.x, l(12.566371)
            div r10.x, r6.y, r10.x
            mul r10.xyz, r10.xxxx, r12.xyzx
            mul r10.xyz, r9.wwww, r10.xyzx
            sqrt r9.w, r11.x
            div r9.w, r9.w, r10.w
            add r9.w, -r9.w, l(1.000000)
            max r9.w, r9.w, l(0.000000)
            mul r10.xyz, r9.wwww, r10.xyzx
            mul r9.w, r11.x, l(0.010000)
            div r10.xyz, r10.xyzx, r9.wwww
            mul r10.xyz, r1.zzzz, r10.xyzx
            mad r8.xyz, r10.xyzx, l(0.100000, 0.100000, 0.100000, 0.000000), r8.xyzx
          endif
        endif
        break
        case l(1)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyzw, r8.w, l(16), t19.xyzw
        add r11.xyz, r4.xyzx, -r10.xyzx
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r12.xyz, r8.w, l(32), t19.xyzx
        dp3 r9.w, r11.xyzx, r12.xyzx
        lt r9.w, l(0.000000), r9.w
        if_nz r9.w
          dp3 r9.w, r12.xyzx, r12.xyzx
          rsq r9.w, r9.w
          mul r12.xyz, r9.wwww, r12.xyzx
          dp3 r9.w, r11.xyzx, r12.xyzx
          mul r13.xyz, r12.xyzx, r9.wwww
          dp3 r9.w, r11.xyzx, r11.xyzx
          rsq r11.w, r9.w
          mul r11.xyz, r11.wwww, r11.xyzx
          dp3 r11.x, r12.xyzx, r11.xyzx
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.yz, r8.w, l(64), t19.xxyx
          ge r11.w, r11.x, r11.y
          ge r12.x, r11.z, r11.x
          add r11.x, -r11.z, r11.x
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.z, r8.w, l(68), t19.xxxx
          add r11.y, -r11.z, r11.y
          div r11.x, r11.x, r11.y
          movc r11.x, r12.x, l(0), r11.x
          movc r11.x, r11.w, l(1.000000), r11.x
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.yzw, r8.w, l(0), t19.xxyz
          add r10.xyz, -r4.xyzx, r10.xyzx
          dp3 r12.x, r10.xyzx, r10.xyzx
          rsq r12.x, r12.x
          mul r10.xyz, r10.xyzx, r12.xxxx
          dp3 r10.x, r7.xyzx, r10.xyzx
          mad r10.x, -r6.w, r10.x, r6.z
          log r10.x, |r10.x|
          mul r10.x, r10.x, l(1.500000)
          exp r10.x, r10.x
          mul r10.x, r10.x, l(12.566371)
          div r10.x, r6.y, r10.x
          mul r10.xyz, r10.xxxx, r11.yzwy
          mul r10.xyz, r11.xxxx, r10.xyzx
          mul r10.xyz, r10.xyzx, l(10000.000000, 10000.000000, 10000.000000, 0.000000)
          sqrt r9.w, r9.w
          div r9.w, r9.w, r10.w
          add r9.w, -r9.w, l(1.000000)
          max r9.w, r9.w, l(0.000000)
          mul r10.xyz, r9.wwww, r10.xyzx
          dp3 r9.w, r13.xyzx, r13.xyzx
          add r9.w, r9.w, l(0.010000)
          div r10.xyz, r10.xyzx, r9.wwww
          mad r8.xyz, r1.zzzz, r10.xyzx, r8.xyzx
        endif
        break
        case l(2)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyz, r8.w, l(32), t19.xyzx
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.xyz, r8.w, l(0), t19.xyzx
        dp3 r9.w, r10.xyzx, r10.xyzx
        rsq r9.w, r9.w
        mul r10.xyz, r9.wwww, r10.xyzx
        dp3 r9.w, r9.xyzx, r10.xyzx
        mad r9.w, -r6.w, r9.w, r6.z
        log r9.w, |r9.w|
        mul r9.w, r9.w, l(1.500000)
        exp r9.w, r9.w
        mul r9.w, r9.w, l(12.566371)
        div r9.w, r6.y, r9.w
        mul r10.xyz, r9.wwww, r11.xyzx
        div r10.xyz, r10.xyzx, r7.wwww
        mul r10.xyz, r1.zzzz, r10.xyzx
        mad r8.xyz, r10.xyzx, l(0.000001, 0.000001, 0.000001, 0.000000), r8.xyzx
        break
        default
        break
      endswitch
      iadd r8.w, r8.w, l(1)
    endloop
    add r4.xyz, r2.xywx, r4.xyzx
  endif
  movc r0.x, r0.w, l(6), l(7)
else
  mov r0.w, l(-1)
endif
not r0.w, r0.w
and r0.y, r0.w, r0.y
ilt r0.w, r0.x, r0.z
and r0.y, r0.w, r0.y
if_nz r0.y
  ge r0.w, l(0.000000), r3.x
  lt r1.z, r3.x, r3.y
  add r3.z, -r3.y, r3.x
  mov r3.w, l(0)
  movc r5.xy, r1.zzzz, r3.wxww, r3.zyzz
  movc r3.xy, r0.wwww, r3.xyxx, r5.xyxx
  if_z r0.w
    mul r1.z, r3.y, cb9[13].y
    if_nz cb9[12].z
      mul r2.z, r1.z, l(0.002000)
      mul r5.x, r4.z, l(-0.0666666701)
      max r5.x, r5.x, l(0.000000)
      rsq r5.x, r5.x
      div r5.x, l(1.000000, 1.000000, 1.000000, 1.000000), r5.x
      mul r5.w, r4.x, cb12[0].x
      mul r5.zw, r5.xxxw, l(0.000000, 0.000000, 16.000000, -0.500000)
      div r5.w, r5.w, r4.z
      add r5.x, r5.w, l(0.500000)
      mul r5.w, r4.y, cb12[1].y
      mul r5.w, r5.w, l(0.500000)
      div r5.w, r5.w, r4.z
      add r5.y, r5.w, l(0.500000)
      sample_indexable(texture2darray)(float,float,float,float) r5.x, r5.xyzx, t1.wxyz, s1
      mul r2.z, r2.z, r5.x
    else
      mul r2.z, r1.z, l(0.000200000009)
    endif
    lt r1.z, l(0.900000), r2.z
    movc r1.z, r1.z, l(0.900000), r2.z
    add r2.z, -r1.z, l(1.000000)
    mul r1.w, r1.w, r2.z
    mul r5.xyz, r2.zzzz, r8.xyzx
    if_nz cb9[12].y
      mov r4.w, l(1.000000)
      dp4 r6.x, cb9[8].xyzw, r4.xyzw
      dp4 r6.y, cb9[9].xyzw, r4.xyzw
      dp4 r6.z, cb9[10].xyzw, r4.xyzw
      dp4 r2.z, cb9[11].xyzw, r4.xyzw
      div r6.xyz, r6.xyzx, r2.zzzz
      mov_sat r7.xy, r6.xyxx
      eq r7.xy, r6.xyxx, r7.xyxx
      and r2.z, r7.y, r7.x
      if_nz r2.z
        mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
        frc r7.xy, r7.xyxx
        lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
        and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
        add r2.z, r7.x, r7.y
        lt r5.w, l(1.100000), r2.z
        movc r7.z, r5.w, l(0), r2.z
        add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
        mad r6.xy, r7.xyxx, l(0.000976562500, 0.000976562500, 0.000000, 0.000000), r6.xyxx
        mov_sat r7.xy, r6.xyxx
        eq r7.xy, r6.xyxx, r7.xyxx
        and r2.z, r7.y, r7.x
        if_nz r2.z
          min r2.z, r6.z, l(1.000000)
          sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t15.xxxx, s15, r2.z
        else
          mov r2.z, l(1.000000)
        endif
      else
        dp4 r6.x, cb9[4].xyzw, r4.xyzw
        dp4 r6.y, cb9[5].xyzw, r4.xyzw
        dp4 r6.z, cb9[6].xyzw, r4.xyzw
        dp4 r5.w, cb9[7].xyzw, r4.xyzw
        div r6.xyz, r6.xyzx, r5.wwww
        mov_sat r7.xy, r6.xyxx
        eq r7.xy, r6.xyxx, r7.xyxx
        and r5.w, r7.y, r7.x
        if_nz r5.w
          mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
          frc r7.xy, r7.xyxx
          lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
          and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
          add r5.w, r7.x, r7.y
          lt r6.w, l(1.100000), r5.w
          movc r7.z, r6.w, l(0), r5.w
          add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
          mad r6.xy, r7.xyxx, l(0.000244140625, 0.000244140625, 0.000000, 0.000000), r6.xyxx
          mov_sat r7.xy, r6.xyxx
          eq r7.xy, r6.xyxx, r7.xyxx
          and r5.w, r7.y, r7.x
          if_nz r5.w
            min r5.w, r6.z, l(1.000000)
            sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t14.xxxx, s14, r5.w
          else
            mov r2.z, l(1.000000)
          endif
        else
          dp4 r6.x, cb9[0].xyzw, r4.xyzw
          dp4 r6.y, cb9[1].xyzw, r4.xyzw
          dp4 r6.z, cb9[2].xyzw, r4.xyzw
          dp4 r5.w, cb9[3].xyzw, r4.xyzw
          div r6.xyz, r6.xyzx, r5.wwww
          mov_sat r7.xy, r6.xyxx
          eq r7.xy, r6.xyxx, r7.xyxx
          and r5.w, r7.y, r7.x
          if_nz r5.w
            mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
            frc r7.xy, r7.xyxx
            lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
            and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
            add r5.w, r7.x, r7.y
            lt r6.w, l(1.100000), r5.w
            movc r7.z, r6.w, l(0), r5.w
            add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
            mad r6.xy, r7.xyxx, l(0.0000610351563, 0.0000610351563, 0.000000, 0.000000), r6.xyxx
            mov_sat r7.xy, r6.xyxx
            eq r7.xy, r6.xyxx, r7.xyxx
            and r5.w, r7.y, r7.x
            if_nz r5.w
              min r5.w, r6.z, l(1.000000)
              sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t13.xxxx, s13, r5.w
            else
              mov r2.z, l(1.000000)
            endif
          else
            mov r2.z, l(1.000000)
          endif
        endif
      endif
      mul r1.z, r1.z, r2.z
    endif
    dp3 r2.z, r2.xywx, r2.xywx
    lt r5.w, l(0.000100), r2.z
    div r6.x, l(1.000000, 1.000000, 1.000000, 1.000000), r2.z
    mad r6.y, -cb9[13].x, cb9[13].x, l(1.000000)
    mad r6.z, cb9[13].x, cb9[13].x, l(1.000000)
    add r6.w, cb9[13].x, cb9[13].x
    dp3 r7.x, r4.xyzx, r4.xyzx
    rsq r7.x, r7.x
    mul r7.xyz, r4.xyzx, r7.xxxx
    mad r9.xyz, r2.xywx, l(0.500000, 0.500000, 0.500000, 0.000000), r4.xyzx
    dp3 r7.w, r9.xyzx, r9.xyzx
    rsq r8.w, r7.w
    mul r9.xyz, r8.wwww, r9.xyzx
    add r7.w, r7.w, l(0.000100)
    log r7.w, r7.w
    mul r7.w, r7.w, l(1.500000)
    exp r7.w, r7.w
    mul r7.w, r7.w, l(0.010000)
    mov r8.xyz, r5.xyzx
    mov r8.w, l(0)
    loop
      uge r9.w, r8.w, cb9[13].w
      breakc_nz r9.w
      ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r9.w, r8.w, l(12), t19.xxxx
      switch r9.w
        case l(0)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyzw, r8.w, l(16), t19.xyzw
        add r11.xyz, r4.xyzx, -r10.xyzx
        dp3 r9.w, r2.xywx, r11.xyzx
        dp3 r11.x, r11.xyzx, r11.xyzx
        mad r11.y, -r10.w, r10.w, r11.x
        mul r11.y, r2.z, r11.y
        mad r11.y, r9.w, r9.w, -r11.y
        ge r11.z, r11.y, l(0.000000)
        and r11.z, r5.w, r11.z
        if_nz r11.z
          sqrt r11.y, r11.y
          add r11.z, -r9.w, -r11.y
          mul r11.z, r6.x, r11.z
          add r9.w, -r9.w, r11.y
          mul r9.w, r6.x, r9.w
          ge r11.y, l(1.000000), r11.z
          ge r11.w, r9.w, l(0.000000)
          and r11.y, r11.w, r11.y
          if_nz r11.y
            lt r11.y, r11.z, l(0.000000)
            lt r11.w, l(1.000000), r9.w
            movc r9.w, r11.w, l(1.000000), r9.w
            movc r11.y, r11.y, l(-0.000000), -r11.z
            add r9.w, r9.w, r11.y
            mul r11.y, r9.w, l(0.500000)
            mad r11.yzw, r11.yyyy, r2.xxyw, r4.xxyz
            ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r12.xyz, r8.w, l(0), t19.xyzx
            dp3 r12.w, r11.yzwy, r11.yzwy
            rsq r12.w, r12.w
            mul r13.xyz, r11.yzwy, r12.wwww
            add r10.xyz, r10.xyzx, -r11.yzwy
            dp3 r11.y, r10.xyzx, r10.xyzx
            rsq r11.y, r11.y
            mul r10.xyz, r10.xyzx, r11.yyyy
            dp3 r10.x, r13.xyzx, r10.xyzx
            mad r10.x, -r6.w, r10.x, r6.z
            log r10.x, |r10.x|
            mul r10.x, r10.x, l(1.500000)
            exp r10.x, r10.x
            mul r10.x, r10.x, l(12.566371)
            div r10.x, r6.y, r10.x
            mul r10.xyz, r10.xxxx, r12.xyzx
            mul r10.xyz, r9.wwww, r10.xyzx
            sqrt r9.w, r11.x
            div r9.w, r9.w, r10.w
            add r9.w, -r9.w, l(1.000000)
            max r9.w, r9.w, l(0.000000)
            mul r10.xyz, r9.wwww, r10.xyzx
            mul r9.w, r11.x, l(0.010000)
            div r10.xyz, r10.xyzx, r9.wwww
            mul r10.xyz, r1.zzzz, r10.xyzx
            mad r8.xyz, r10.xyzx, l(0.100000, 0.100000, 0.100000, 0.000000), r8.xyzx
          endif
        endif
        break
        case l(1)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyzw, r8.w, l(16), t19.xyzw
        add r11.xyz, r4.xyzx, -r10.xyzx
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r12.xyz, r8.w, l(32), t19.xyzx
        dp3 r9.w, r11.xyzx, r12.xyzx
        lt r9.w, l(0.000000), r9.w
        if_nz r9.w
          dp3 r9.w, r12.xyzx, r12.xyzx
          rsq r9.w, r9.w
          mul r12.xyz, r9.wwww, r12.xyzx
          dp3 r9.w, r11.xyzx, r12.xyzx
          mul r13.xyz, r12.xyzx, r9.wwww
          dp3 r9.w, r11.xyzx, r11.xyzx
          rsq r11.w, r9.w
          mul r11.xyz, r11.wwww, r11.xyzx
          dp3 r11.x, r12.xyzx, r11.xyzx
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.yz, r8.w, l(64), t19.xxyx
          ge r11.w, r11.x, r11.y
          ge r12.x, r11.z, r11.x
          add r11.x, -r11.z, r11.x
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.z, r8.w, l(68), t19.xxxx
          add r11.y, -r11.z, r11.y
          div r11.x, r11.x, r11.y
          movc r11.x, r12.x, l(0), r11.x
          movc r11.x, r11.w, l(1.000000), r11.x
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.yzw, r8.w, l(0), t19.xxyz
          add r10.xyz, -r4.xyzx, r10.xyzx
          dp3 r12.x, r10.xyzx, r10.xyzx
          rsq r12.x, r12.x
          mul r10.xyz, r10.xyzx, r12.xxxx
          dp3 r10.x, r7.xyzx, r10.xyzx
          mad r10.x, -r6.w, r10.x, r6.z
          log r10.x, |r10.x|
          mul r10.x, r10.x, l(1.500000)
          exp r10.x, r10.x
          mul r10.x, r10.x, l(12.566371)
          div r10.x, r6.y, r10.x
          mul r10.xyz, r10.xxxx, r11.yzwy
          mul r10.xyz, r11.xxxx, r10.xyzx
          mul r10.xyz, r10.xyzx, l(10000.000000, 10000.000000, 10000.000000, 0.000000)
          sqrt r9.w, r9.w
          div r9.w, r9.w, r10.w
          add r9.w, -r9.w, l(1.000000)
          max r9.w, r9.w, l(0.000000)
          mul r10.xyz, r9.wwww, r10.xyzx
          dp3 r9.w, r13.xyzx, r13.xyzx
          add r9.w, r9.w, l(0.010000)
          div r10.xyz, r10.xyzx, r9.wwww
          mad r8.xyz, r1.zzzz, r10.xyzx, r8.xyzx
        endif
        break
        case l(2)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyz, r8.w, l(32), t19.xyzx
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.xyz, r8.w, l(0), t19.xyzx
        dp3 r9.w, r10.xyzx, r10.xyzx
        rsq r9.w, r9.w
        mul r10.xyz, r9.wwww, r10.xyzx
        dp3 r9.w, r9.xyzx, r10.xyzx
        mad r9.w, -r6.w, r9.w, r6.z
        log r9.w, |r9.w|
        mul r9.w, r9.w, l(1.500000)
        exp r9.w, r9.w
        mul r9.w, r9.w, l(12.566371)
        div r9.w, r6.y, r9.w
        mul r10.xyz, r9.wwww, r11.xyzx
        div r10.xyz, r10.xyzx, r7.wwww
        mul r10.xyz, r1.zzzz, r10.xyzx
        mad r8.xyz, r10.xyzx, l(0.000001, 0.000001, 0.000001, 0.000000), r8.xyzx
        break
        default
        break
      endswitch
      iadd r8.w, r8.w, l(1)
    endloop
    add r4.xyz, r2.xywx, r4.xyzx
  endif
  movc r0.x, r0.w, l(7), l(8)
else
  mov r0.w, l(-1)
endif
not r0.w, r0.w
and r0.y, r0.w, r0.y
ilt r0.w, r0.x, r0.z
and r0.y, r0.w, r0.y
if_nz r0.y
  ge r0.w, l(0.000000), r3.x
  lt r1.z, r3.x, r3.y
  add r3.z, -r3.y, r3.x
  mov r3.w, l(0)
  movc r5.xy, r1.zzzz, r3.wxww, r3.zyzz
  movc r3.xy, r0.wwww, r3.xyxx, r5.xyxx
  if_z r0.w
    mul r1.z, r3.y, cb9[13].y
    if_nz cb9[12].z
      mul r2.z, r1.z, l(0.002000)
      mul r5.x, r4.z, l(-0.0666666701)
      max r5.x, r5.x, l(0.000000)
      rsq r5.x, r5.x
      div r5.x, l(1.000000, 1.000000, 1.000000, 1.000000), r5.x
      mul r5.w, r4.x, cb12[0].x
      mul r5.zw, r5.xxxw, l(0.000000, 0.000000, 16.000000, -0.500000)
      div r5.w, r5.w, r4.z
      add r5.x, r5.w, l(0.500000)
      mul r5.w, r4.y, cb12[1].y
      mul r5.w, r5.w, l(0.500000)
      div r5.w, r5.w, r4.z
      add r5.y, r5.w, l(0.500000)
      sample_indexable(texture2darray)(float,float,float,float) r5.x, r5.xyzx, t1.wxyz, s1
      mul r2.z, r2.z, r5.x
    else
      mul r2.z, r1.z, l(0.000200000009)
    endif
    lt r1.z, l(0.900000), r2.z
    movc r1.z, r1.z, l(0.900000), r2.z
    add r2.z, -r1.z, l(1.000000)
    mul r1.w, r1.w, r2.z
    mul r5.xyz, r2.zzzz, r8.xyzx
    if_nz cb9[12].y
      mov r4.w, l(1.000000)
      dp4 r6.x, cb9[8].xyzw, r4.xyzw
      dp4 r6.y, cb9[9].xyzw, r4.xyzw
      dp4 r6.z, cb9[10].xyzw, r4.xyzw
      dp4 r2.z, cb9[11].xyzw, r4.xyzw
      div r6.xyz, r6.xyzx, r2.zzzz
      mov_sat r7.xy, r6.xyxx
      eq r7.xy, r6.xyxx, r7.xyxx
      and r2.z, r7.y, r7.x
      if_nz r2.z
        mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
        frc r7.xy, r7.xyxx
        lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
        and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
        add r2.z, r7.x, r7.y
        lt r5.w, l(1.100000), r2.z
        movc r7.z, r5.w, l(0), r2.z
        add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
        mad r6.xy, r7.xyxx, l(0.000976562500, 0.000976562500, 0.000000, 0.000000), r6.xyxx
        mov_sat r7.xy, r6.xyxx
        eq r7.xy, r6.xyxx, r7.xyxx
        and r2.z, r7.y, r7.x
        if_nz r2.z
          min r2.z, r6.z, l(1.000000)
          sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t15.xxxx, s15, r2.z
        else
          mov r2.z, l(1.000000)
        endif
      else
        dp4 r6.x, cb9[4].xyzw, r4.xyzw
        dp4 r6.y, cb9[5].xyzw, r4.xyzw
        dp4 r6.z, cb9[6].xyzw, r4.xyzw
        dp4 r5.w, cb9[7].xyzw, r4.xyzw
        div r6.xyz, r6.xyzx, r5.wwww
        mov_sat r7.xy, r6.xyxx
        eq r7.xy, r6.xyxx, r7.xyxx
        and r5.w, r7.y, r7.x
        if_nz r5.w
          mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
          frc r7.xy, r7.xyxx
          lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
          and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
          add r5.w, r7.x, r7.y
          lt r6.w, l(1.100000), r5.w
          movc r7.z, r6.w, l(0), r5.w
          add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
          mad r6.xy, r7.xyxx, l(0.000244140625, 0.000244140625, 0.000000, 0.000000), r6.xyxx
          mov_sat r7.xy, r6.xyxx
          eq r7.xy, r6.xyxx, r7.xyxx
          and r5.w, r7.y, r7.x
          if_nz r5.w
            min r5.w, r6.z, l(1.000000)
            sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t14.xxxx, s14, r5.w
          else
            mov r2.z, l(1.000000)
          endif
        else
          dp4 r6.x, cb9[0].xyzw, r4.xyzw
          dp4 r6.y, cb9[1].xyzw, r4.xyzw
          dp4 r6.z, cb9[2].xyzw, r4.xyzw
          dp4 r5.w, cb9[3].xyzw, r4.xyzw
          div r6.xyz, r6.xyzx, r5.wwww
          mov_sat r7.xy, r6.xyxx
          eq r7.xy, r6.xyxx, r7.xyxx
          and r5.w, r7.y, r7.x
          if_nz r5.w
            mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
            frc r7.xy, r7.xyxx
            lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
            and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
            add r5.w, r7.x, r7.y
            lt r6.w, l(1.100000), r5.w
            movc r7.z, r6.w, l(0), r5.w
            add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
            mad r6.xy, r7.xyxx, l(0.0000610351563, 0.0000610351563, 0.000000, 0.000000), r6.xyxx
            mov_sat r7.xy, r6.xyxx
            eq r7.xy, r6.xyxx, r7.xyxx
            and r5.w, r7.y, r7.x
            if_nz r5.w
              min r5.w, r6.z, l(1.000000)
              sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t13.xxxx, s13, r5.w
            else
              mov r2.z, l(1.000000)
            endif
          else
            mov r2.z, l(1.000000)
          endif
        endif
      endif
      mul r1.z, r1.z, r2.z
    endif
    dp3 r2.z, r2.xywx, r2.xywx
    lt r5.w, l(0.000100), r2.z
    div r6.x, l(1.000000, 1.000000, 1.000000, 1.000000), r2.z
    mad r6.y, -cb9[13].x, cb9[13].x, l(1.000000)
    mad r6.z, cb9[13].x, cb9[13].x, l(1.000000)
    add r6.w, cb9[13].x, cb9[13].x
    dp3 r7.x, r4.xyzx, r4.xyzx
    rsq r7.x, r7.x
    mul r7.xyz, r4.xyzx, r7.xxxx
    mad r9.xyz, r2.xywx, l(0.500000, 0.500000, 0.500000, 0.000000), r4.xyzx
    dp3 r7.w, r9.xyzx, r9.xyzx
    rsq r8.w, r7.w
    mul r9.xyz, r8.wwww, r9.xyzx
    add r7.w, r7.w, l(0.000100)
    log r7.w, r7.w
    mul r7.w, r7.w, l(1.500000)
    exp r7.w, r7.w
    mul r7.w, r7.w, l(0.010000)
    mov r8.xyz, r5.xyzx
    mov r8.w, l(0)
    loop
      uge r9.w, r8.w, cb9[13].w
      breakc_nz r9.w
      ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r9.w, r8.w, l(12), t19.xxxx
      switch r9.w
        case l(0)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyzw, r8.w, l(16), t19.xyzw
        add r11.xyz, r4.xyzx, -r10.xyzx
        dp3 r9.w, r2.xywx, r11.xyzx
        dp3 r11.x, r11.xyzx, r11.xyzx
        mad r11.y, -r10.w, r10.w, r11.x
        mul r11.y, r2.z, r11.y
        mad r11.y, r9.w, r9.w, -r11.y
        ge r11.z, r11.y, l(0.000000)
        and r11.z, r5.w, r11.z
        if_nz r11.z
          sqrt r11.y, r11.y
          add r11.z, -r9.w, -r11.y
          mul r11.z, r6.x, r11.z
          add r9.w, -r9.w, r11.y
          mul r9.w, r6.x, r9.w
          ge r11.y, l(1.000000), r11.z
          ge r11.w, r9.w, l(0.000000)
          and r11.y, r11.w, r11.y
          if_nz r11.y
            lt r11.y, r11.z, l(0.000000)
            lt r11.w, l(1.000000), r9.w
            movc r9.w, r11.w, l(1.000000), r9.w
            movc r11.y, r11.y, l(-0.000000), -r11.z
            add r9.w, r9.w, r11.y
            mul r11.y, r9.w, l(0.500000)
            mad r11.yzw, r11.yyyy, r2.xxyw, r4.xxyz
            ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r12.xyz, r8.w, l(0), t19.xyzx
            dp3 r12.w, r11.yzwy, r11.yzwy
            rsq r12.w, r12.w
            mul r13.xyz, r11.yzwy, r12.wwww
            add r10.xyz, r10.xyzx, -r11.yzwy
            dp3 r11.y, r10.xyzx, r10.xyzx
            rsq r11.y, r11.y
            mul r10.xyz, r10.xyzx, r11.yyyy
            dp3 r10.x, r13.xyzx, r10.xyzx
            mad r10.x, -r6.w, r10.x, r6.z
            log r10.x, |r10.x|
            mul r10.x, r10.x, l(1.500000)
            exp r10.x, r10.x
            mul r10.x, r10.x, l(12.566371)
            div r10.x, r6.y, r10.x
            mul r10.xyz, r10.xxxx, r12.xyzx
            mul r10.xyz, r9.wwww, r10.xyzx
            sqrt r9.w, r11.x
            div r9.w, r9.w, r10.w
            add r9.w, -r9.w, l(1.000000)
            max r9.w, r9.w, l(0.000000)
            mul r10.xyz, r9.wwww, r10.xyzx
            mul r9.w, r11.x, l(0.010000)
            div r10.xyz, r10.xyzx, r9.wwww
            mul r10.xyz, r1.zzzz, r10.xyzx
            mad r8.xyz, r10.xyzx, l(0.100000, 0.100000, 0.100000, 0.000000), r8.xyzx
          endif
        endif
        break
        case l(1)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyzw, r8.w, l(16), t19.xyzw
        add r11.xyz, r4.xyzx, -r10.xyzx
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r12.xyz, r8.w, l(32), t19.xyzx
        dp3 r9.w, r11.xyzx, r12.xyzx
        lt r9.w, l(0.000000), r9.w
        if_nz r9.w
          dp3 r9.w, r12.xyzx, r12.xyzx
          rsq r9.w, r9.w
          mul r12.xyz, r9.wwww, r12.xyzx
          dp3 r9.w, r11.xyzx, r12.xyzx
          mul r13.xyz, r12.xyzx, r9.wwww
          dp3 r9.w, r11.xyzx, r11.xyzx
          rsq r11.w, r9.w
          mul r11.xyz, r11.wwww, r11.xyzx
          dp3 r11.x, r12.xyzx, r11.xyzx
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.yz, r8.w, l(64), t19.xxyx
          ge r11.w, r11.x, r11.y
          ge r12.x, r11.z, r11.x
          add r11.x, -r11.z, r11.x
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.z, r8.w, l(68), t19.xxxx
          add r11.y, -r11.z, r11.y
          div r11.x, r11.x, r11.y
          movc r11.x, r12.x, l(0), r11.x
          movc r11.x, r11.w, l(1.000000), r11.x
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.yzw, r8.w, l(0), t19.xxyz
          add r10.xyz, -r4.xyzx, r10.xyzx
          dp3 r12.x, r10.xyzx, r10.xyzx
          rsq r12.x, r12.x
          mul r10.xyz, r10.xyzx, r12.xxxx
          dp3 r10.x, r7.xyzx, r10.xyzx
          mad r10.x, -r6.w, r10.x, r6.z
          log r10.x, |r10.x|
          mul r10.x, r10.x, l(1.500000)
          exp r10.x, r10.x
          mul r10.x, r10.x, l(12.566371)
          div r10.x, r6.y, r10.x
          mul r10.xyz, r10.xxxx, r11.yzwy
          mul r10.xyz, r11.xxxx, r10.xyzx
          mul r10.xyz, r10.xyzx, l(10000.000000, 10000.000000, 10000.000000, 0.000000)
          sqrt r9.w, r9.w
          div r9.w, r9.w, r10.w
          add r9.w, -r9.w, l(1.000000)
          max r9.w, r9.w, l(0.000000)
          mul r10.xyz, r9.wwww, r10.xyzx
          dp3 r9.w, r13.xyzx, r13.xyzx
          add r9.w, r9.w, l(0.010000)
          div r10.xyz, r10.xyzx, r9.wwww
          mad r8.xyz, r1.zzzz, r10.xyzx, r8.xyzx
        endif
        break
        case l(2)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyz, r8.w, l(32), t19.xyzx
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.xyz, r8.w, l(0), t19.xyzx
        dp3 r9.w, r10.xyzx, r10.xyzx
        rsq r9.w, r9.w
        mul r10.xyz, r9.wwww, r10.xyzx
        dp3 r9.w, r9.xyzx, r10.xyzx
        mad r9.w, -r6.w, r9.w, r6.z
        log r9.w, |r9.w|
        mul r9.w, r9.w, l(1.500000)
        exp r9.w, r9.w
        mul r9.w, r9.w, l(12.566371)
        div r9.w, r6.y, r9.w
        mul r10.xyz, r9.wwww, r11.xyzx
        div r10.xyz, r10.xyzx, r7.wwww
        mul r10.xyz, r1.zzzz, r10.xyzx
        mad r8.xyz, r10.xyzx, l(0.000001, 0.000001, 0.000001, 0.000000), r8.xyzx
        break
        default
        break
      endswitch
      iadd r8.w, r8.w, l(1)
    endloop
    add r4.xyz, r2.xywx, r4.xyzx
  endif
  movc r0.x, r0.w, l(8), l(9)
else
  mov r0.w, l(-1)
endif
not r0.w, r0.w
and r0.y, r0.w, r0.y
ilt r0.w, r0.x, r0.z
and r0.y, r0.w, r0.y
if_nz r0.y
  ge r0.w, l(0.000000), r3.x
  lt r1.z, r3.x, r3.y
  add r3.z, -r3.y, r3.x
  mov r3.w, l(0)
  movc r5.xy, r1.zzzz, r3.wxww, r3.zyzz
  movc r3.xy, r0.wwww, r3.xyxx, r5.xyxx
  if_z r0.w
    mul r1.z, r3.y, cb9[13].y
    if_nz cb9[12].z
      mul r2.z, r1.z, l(0.002000)
      mul r5.x, r4.z, l(-0.0666666701)
      max r5.x, r5.x, l(0.000000)
      rsq r5.x, r5.x
      div r5.x, l(1.000000, 1.000000, 1.000000, 1.000000), r5.x
      mul r5.w, r4.x, cb12[0].x
      mul r5.zw, r5.xxxw, l(0.000000, 0.000000, 16.000000, -0.500000)
      div r5.w, r5.w, r4.z
      add r5.x, r5.w, l(0.500000)
      mul r5.w, r4.y, cb12[1].y
      mul r5.w, r5.w, l(0.500000)
      div r5.w, r5.w, r4.z
      add r5.y, r5.w, l(0.500000)
      sample_indexable(texture2darray)(float,float,float,float) r5.x, r5.xyzx, t1.wxyz, s1
      mul r2.z, r2.z, r5.x
    else
      mul r2.z, r1.z, l(0.000200000009)
    endif
    lt r1.z, l(0.900000), r2.z
    movc r1.z, r1.z, l(0.900000), r2.z
    add r2.z, -r1.z, l(1.000000)
    mul r1.w, r1.w, r2.z
    mul r5.xyz, r2.zzzz, r8.xyzx
    if_nz cb9[12].y
      mov r4.w, l(1.000000)
      dp4 r6.x, cb9[8].xyzw, r4.xyzw
      dp4 r6.y, cb9[9].xyzw, r4.xyzw
      dp4 r6.z, cb9[10].xyzw, r4.xyzw
      dp4 r2.z, cb9[11].xyzw, r4.xyzw
      div r6.xyz, r6.xyzx, r2.zzzz
      mov_sat r7.xy, r6.xyxx
      eq r7.xy, r6.xyxx, r7.xyxx
      and r2.z, r7.y, r7.x
      if_nz r2.z
        mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
        frc r7.xy, r7.xyxx
        lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
        and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
        add r2.z, r7.x, r7.y
        lt r5.w, l(1.100000), r2.z
        movc r7.z, r5.w, l(0), r2.z
        add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
        mad r6.xy, r7.xyxx, l(0.000976562500, 0.000976562500, 0.000000, 0.000000), r6.xyxx
        mov_sat r7.xy, r6.xyxx
        eq r7.xy, r6.xyxx, r7.xyxx
        and r2.z, r7.y, r7.x
        if_nz r2.z
          min r2.z, r6.z, l(1.000000)
          sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t15.xxxx, s15, r2.z
        else
          mov r2.z, l(1.000000)
        endif
      else
        dp4 r6.x, cb9[4].xyzw, r4.xyzw
        dp4 r6.y, cb9[5].xyzw, r4.xyzw
        dp4 r6.z, cb9[6].xyzw, r4.xyzw
        dp4 r5.w, cb9[7].xyzw, r4.xyzw
        div r6.xyz, r6.xyzx, r5.wwww
        mov_sat r7.xy, r6.xyxx
        eq r7.xy, r6.xyxx, r7.xyxx
        and r5.w, r7.y, r7.x
        if_nz r5.w
          mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
          frc r7.xy, r7.xyxx
          lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
          and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
          add r5.w, r7.x, r7.y
          lt r6.w, l(1.100000), r5.w
          movc r7.z, r6.w, l(0), r5.w
          add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
          mad r6.xy, r7.xyxx, l(0.000244140625, 0.000244140625, 0.000000, 0.000000), r6.xyxx
          mov_sat r7.xy, r6.xyxx
          eq r7.xy, r6.xyxx, r7.xyxx
          and r5.w, r7.y, r7.x
          if_nz r5.w
            min r5.w, r6.z, l(1.000000)
            sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t14.xxxx, s14, r5.w
          else
            mov r2.z, l(1.000000)
          endif
        else
          dp4 r6.x, cb9[0].xyzw, r4.xyzw
          dp4 r6.y, cb9[1].xyzw, r4.xyzw
          dp4 r6.z, cb9[2].xyzw, r4.xyzw
          dp4 r5.w, cb9[3].xyzw, r4.xyzw
          div r6.xyz, r6.xyzx, r5.wwww
          mov_sat r7.xy, r6.xyxx
          eq r7.xy, r6.xyxx, r7.xyxx
          and r5.w, r7.y, r7.x
          if_nz r5.w
            mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
            frc r7.xy, r7.xyxx
            lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
            and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
            add r5.w, r7.x, r7.y
            lt r6.w, l(1.100000), r5.w
            movc r7.z, r6.w, l(0), r5.w
            add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
            mad r6.xy, r7.xyxx, l(0.0000610351563, 0.0000610351563, 0.000000, 0.000000), r6.xyxx
            mov_sat r7.xy, r6.xyxx
            eq r7.xy, r6.xyxx, r7.xyxx
            and r5.w, r7.y, r7.x
            if_nz r5.w
              min r5.w, r6.z, l(1.000000)
              sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t13.xxxx, s13, r5.w
            else
              mov r2.z, l(1.000000)
            endif
          else
            mov r2.z, l(1.000000)
          endif
        endif
      endif
      mul r1.z, r1.z, r2.z
    endif
    dp3 r2.z, r2.xywx, r2.xywx
    lt r5.w, l(0.000100), r2.z
    div r6.x, l(1.000000, 1.000000, 1.000000, 1.000000), r2.z
    mad r6.y, -cb9[13].x, cb9[13].x, l(1.000000)
    mad r6.z, cb9[13].x, cb9[13].x, l(1.000000)
    add r6.w, cb9[13].x, cb9[13].x
    dp3 r7.x, r4.xyzx, r4.xyzx
    rsq r7.x, r7.x
    mul r7.xyz, r4.xyzx, r7.xxxx
    mad r9.xyz, r2.xywx, l(0.500000, 0.500000, 0.500000, 0.000000), r4.xyzx
    dp3 r7.w, r9.xyzx, r9.xyzx
    rsq r8.w, r7.w
    mul r9.xyz, r8.wwww, r9.xyzx
    add r7.w, r7.w, l(0.000100)
    log r7.w, r7.w
    mul r7.w, r7.w, l(1.500000)
    exp r7.w, r7.w
    mul r7.w, r7.w, l(0.010000)
    mov r8.xyz, r5.xyzx
    mov r8.w, l(0)
    loop
      uge r9.w, r8.w, cb9[13].w
      breakc_nz r9.w
      ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r9.w, r8.w, l(12), t19.xxxx
      switch r9.w
        case l(0)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyzw, r8.w, l(16), t19.xyzw
        add r11.xyz, r4.xyzx, -r10.xyzx
        dp3 r9.w, r2.xywx, r11.xyzx
        dp3 r11.x, r11.xyzx, r11.xyzx
        mad r11.y, -r10.w, r10.w, r11.x
        mul r11.y, r2.z, r11.y
        mad r11.y, r9.w, r9.w, -r11.y
        ge r11.z, r11.y, l(0.000000)
        and r11.z, r5.w, r11.z
        if_nz r11.z
          sqrt r11.y, r11.y
          add r11.z, -r9.w, -r11.y
          mul r11.z, r6.x, r11.z
          add r9.w, -r9.w, r11.y
          mul r9.w, r6.x, r9.w
          ge r11.y, l(1.000000), r11.z
          ge r11.w, r9.w, l(0.000000)
          and r11.y, r11.w, r11.y
          if_nz r11.y
            lt r11.y, r11.z, l(0.000000)
            lt r11.w, l(1.000000), r9.w
            movc r9.w, r11.w, l(1.000000), r9.w
            movc r11.y, r11.y, l(-0.000000), -r11.z
            add r9.w, r9.w, r11.y
            mul r11.y, r9.w, l(0.500000)
            mad r11.yzw, r11.yyyy, r2.xxyw, r4.xxyz
            ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r12.xyz, r8.w, l(0), t19.xyzx
            dp3 r12.w, r11.yzwy, r11.yzwy
            rsq r12.w, r12.w
            mul r13.xyz, r11.yzwy, r12.wwww
            add r10.xyz, r10.xyzx, -r11.yzwy
            dp3 r11.y, r10.xyzx, r10.xyzx
            rsq r11.y, r11.y
            mul r10.xyz, r10.xyzx, r11.yyyy
            dp3 r10.x, r13.xyzx, r10.xyzx
            mad r10.x, -r6.w, r10.x, r6.z
            log r10.x, |r10.x|
            mul r10.x, r10.x, l(1.500000)
            exp r10.x, r10.x
            mul r10.x, r10.x, l(12.566371)
            div r10.x, r6.y, r10.x
            mul r10.xyz, r10.xxxx, r12.xyzx
            mul r10.xyz, r9.wwww, r10.xyzx
            sqrt r9.w, r11.x
            div r9.w, r9.w, r10.w
            add r9.w, -r9.w, l(1.000000)
            max r9.w, r9.w, l(0.000000)
            mul r10.xyz, r9.wwww, r10.xyzx
            mul r9.w, r11.x, l(0.010000)
            div r10.xyz, r10.xyzx, r9.wwww
            mul r10.xyz, r1.zzzz, r10.xyzx
            mad r8.xyz, r10.xyzx, l(0.100000, 0.100000, 0.100000, 0.000000), r8.xyzx
          endif
        endif
        break
        case l(1)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyzw, r8.w, l(16), t19.xyzw
        add r11.xyz, r4.xyzx, -r10.xyzx
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r12.xyz, r8.w, l(32), t19.xyzx
        dp3 r9.w, r11.xyzx, r12.xyzx
        lt r9.w, l(0.000000), r9.w
        if_nz r9.w
          dp3 r9.w, r12.xyzx, r12.xyzx
          rsq r9.w, r9.w
          mul r12.xyz, r9.wwww, r12.xyzx
          dp3 r9.w, r11.xyzx, r12.xyzx
          mul r13.xyz, r12.xyzx, r9.wwww
          dp3 r9.w, r11.xyzx, r11.xyzx
          rsq r11.w, r9.w
          mul r11.xyz, r11.wwww, r11.xyzx
          dp3 r11.x, r12.xyzx, r11.xyzx
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.yz, r8.w, l(64), t19.xxyx
          ge r11.w, r11.x, r11.y
          ge r12.x, r11.z, r11.x
          add r11.x, -r11.z, r11.x
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.z, r8.w, l(68), t19.xxxx
          add r11.y, -r11.z, r11.y
          div r11.x, r11.x, r11.y
          movc r11.x, r12.x, l(0), r11.x
          movc r11.x, r11.w, l(1.000000), r11.x
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.yzw, r8.w, l(0), t19.xxyz
          add r10.xyz, -r4.xyzx, r10.xyzx
          dp3 r12.x, r10.xyzx, r10.xyzx
          rsq r12.x, r12.x
          mul r10.xyz, r10.xyzx, r12.xxxx
          dp3 r10.x, r7.xyzx, r10.xyzx
          mad r10.x, -r6.w, r10.x, r6.z
          log r10.x, |r10.x|
          mul r10.x, r10.x, l(1.500000)
          exp r10.x, r10.x
          mul r10.x, r10.x, l(12.566371)
          div r10.x, r6.y, r10.x
          mul r10.xyz, r10.xxxx, r11.yzwy
          mul r10.xyz, r11.xxxx, r10.xyzx
          mul r10.xyz, r10.xyzx, l(10000.000000, 10000.000000, 10000.000000, 0.000000)
          sqrt r9.w, r9.w
          div r9.w, r9.w, r10.w
          add r9.w, -r9.w, l(1.000000)
          max r9.w, r9.w, l(0.000000)
          mul r10.xyz, r9.wwww, r10.xyzx
          dp3 r9.w, r13.xyzx, r13.xyzx
          add r9.w, r9.w, l(0.010000)
          div r10.xyz, r10.xyzx, r9.wwww
          mad r8.xyz, r1.zzzz, r10.xyzx, r8.xyzx
        endif
        break
        case l(2)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyz, r8.w, l(32), t19.xyzx
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.xyz, r8.w, l(0), t19.xyzx
        dp3 r9.w, r10.xyzx, r10.xyzx
        rsq r9.w, r9.w
        mul r10.xyz, r9.wwww, r10.xyzx
        dp3 r9.w, r9.xyzx, r10.xyzx
        mad r9.w, -r6.w, r9.w, r6.z
        log r9.w, |r9.w|
        mul r9.w, r9.w, l(1.500000)
        exp r9.w, r9.w
        mul r9.w, r9.w, l(12.566371)
        div r9.w, r6.y, r9.w
        mul r10.xyz, r9.wwww, r11.xyzx
        div r10.xyz, r10.xyzx, r7.wwww
        mul r10.xyz, r1.zzzz, r10.xyzx
        mad r8.xyz, r10.xyzx, l(0.000001, 0.000001, 0.000001, 0.000000), r8.xyzx
        break
        default
        break
      endswitch
      iadd r8.w, r8.w, l(1)
    endloop
    add r4.xyz, r2.xywx, r4.xyzx
  endif
  movc r0.x, r0.w, l(9), l(10)
else
  mov r0.w, l(-1)
endif
not r0.w, r0.w
and r0.y, r0.w, r0.y
ilt r0.w, r0.x, r0.z
and r0.y, r0.w, r0.y
if_nz r0.y
  ge r0.w, l(0.000000), r3.x
  lt r1.z, r3.x, r3.y
  add r3.z, -r3.y, r3.x
  mov r3.w, l(0)
  movc r5.xy, r1.zzzz, r3.wxww, r3.zyzz
  movc r3.xy, r0.wwww, r3.xyxx, r5.xyxx
  if_z r0.w
    mul r1.z, r3.y, cb9[13].y
    if_nz cb9[12].z
      mul r2.z, r1.z, l(0.002000)
      mul r5.x, r4.z, l(-0.0666666701)
      max r5.x, r5.x, l(0.000000)
      rsq r5.x, r5.x
      div r5.x, l(1.000000, 1.000000, 1.000000, 1.000000), r5.x
      mul r5.w, r4.x, cb12[0].x
      mul r5.zw, r5.xxxw, l(0.000000, 0.000000, 16.000000, -0.500000)
      div r5.w, r5.w, r4.z
      add r5.x, r5.w, l(0.500000)
      mul r5.w, r4.y, cb12[1].y
      mul r5.w, r5.w, l(0.500000)
      div r5.w, r5.w, r4.z
      add r5.y, r5.w, l(0.500000)
      sample_indexable(texture2darray)(float,float,float,float) r5.x, r5.xyzx, t1.wxyz, s1
      mul r2.z, r2.z, r5.x
    else
      mul r2.z, r1.z, l(0.000200000009)
    endif
    lt r1.z, l(0.900000), r2.z
    movc r1.z, r1.z, l(0.900000), r2.z
    add r2.z, -r1.z, l(1.000000)
    mul r1.w, r1.w, r2.z
    mul r5.xyz, r2.zzzz, r8.xyzx
    if_nz cb9[12].y
      mov r4.w, l(1.000000)
      dp4 r6.x, cb9[8].xyzw, r4.xyzw
      dp4 r6.y, cb9[9].xyzw, r4.xyzw
      dp4 r6.z, cb9[10].xyzw, r4.xyzw
      dp4 r2.z, cb9[11].xyzw, r4.xyzw
      div r6.xyz, r6.xyzx, r2.zzzz
      mov_sat r7.xy, r6.xyxx
      eq r7.xy, r6.xyxx, r7.xyxx
      and r2.z, r7.y, r7.x
      if_nz r2.z
        mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
        frc r7.xy, r7.xyxx
        lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
        and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
        add r2.z, r7.x, r7.y
        lt r5.w, l(1.100000), r2.z
        movc r7.z, r5.w, l(0), r2.z
        add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
        mad r6.xy, r7.xyxx, l(0.000976562500, 0.000976562500, 0.000000, 0.000000), r6.xyxx
        mov_sat r7.xy, r6.xyxx
        eq r7.xy, r6.xyxx, r7.xyxx
        and r2.z, r7.y, r7.x
        if_nz r2.z
          min r2.z, r6.z, l(1.000000)
          sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t15.xxxx, s15, r2.z
        else
          mov r2.z, l(1.000000)
        endif
      else
        dp4 r6.x, cb9[4].xyzw, r4.xyzw
        dp4 r6.y, cb9[5].xyzw, r4.xyzw
        dp4 r6.z, cb9[6].xyzw, r4.xyzw
        dp4 r5.w, cb9[7].xyzw, r4.xyzw
        div r6.xyz, r6.xyzx, r5.wwww
        mov_sat r7.xy, r6.xyxx
        eq r7.xy, r6.xyxx, r7.xyxx
        and r5.w, r7.y, r7.x
        if_nz r5.w
          mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
          frc r7.xy, r7.xyxx
          lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
          and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
          add r5.w, r7.x, r7.y
          lt r6.w, l(1.100000), r5.w
          movc r7.z, r6.w, l(0), r5.w
          add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
          mad r6.xy, r7.xyxx, l(0.000244140625, 0.000244140625, 0.000000, 0.000000), r6.xyxx
          mov_sat r7.xy, r6.xyxx
          eq r7.xy, r6.xyxx, r7.xyxx
          and r5.w, r7.y, r7.x
          if_nz r5.w
            min r5.w, r6.z, l(1.000000)
            sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t14.xxxx, s14, r5.w
          else
            mov r2.z, l(1.000000)
          endif
        else
          dp4 r6.x, cb9[0].xyzw, r4.xyzw
          dp4 r6.y, cb9[1].xyzw, r4.xyzw
          dp4 r6.z, cb9[2].xyzw, r4.xyzw
          dp4 r5.w, cb9[3].xyzw, r4.xyzw
          div r6.xyz, r6.xyzx, r5.wwww
          mov_sat r7.xy, r6.xyxx
          eq r7.xy, r6.xyxx, r7.xyxx
          and r5.w, r7.y, r7.x
          if_nz r5.w
            mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
            frc r7.xy, r7.xyxx
            lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
            and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
            add r5.w, r7.x, r7.y
            lt r6.w, l(1.100000), r5.w
            movc r7.z, r6.w, l(0), r5.w
            add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
            mad r6.xy, r7.xyxx, l(0.0000610351563, 0.0000610351563, 0.000000, 0.000000), r6.xyxx
            mov_sat r7.xy, r6.xyxx
            eq r7.xy, r6.xyxx, r7.xyxx
            and r5.w, r7.y, r7.x
            if_nz r5.w
              min r5.w, r6.z, l(1.000000)
              sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t13.xxxx, s13, r5.w
            else
              mov r2.z, l(1.000000)
            endif
          else
            mov r2.z, l(1.000000)
          endif
        endif
      endif
      mul r1.z, r1.z, r2.z
    endif
    dp3 r2.z, r2.xywx, r2.xywx
    lt r5.w, l(0.000100), r2.z
    div r6.x, l(1.000000, 1.000000, 1.000000, 1.000000), r2.z
    mad r6.y, -cb9[13].x, cb9[13].x, l(1.000000)
    mad r6.z, cb9[13].x, cb9[13].x, l(1.000000)
    add r6.w, cb9[13].x, cb9[13].x
    dp3 r7.x, r4.xyzx, r4.xyzx
    rsq r7.x, r7.x
    mul r7.xyz, r4.xyzx, r7.xxxx
    mad r9.xyz, r2.xywx, l(0.500000, 0.500000, 0.500000, 0.000000), r4.xyzx
    dp3 r7.w, r9.xyzx, r9.xyzx
    rsq r8.w, r7.w
    mul r9.xyz, r8.wwww, r9.xyzx
    add r7.w, r7.w, l(0.000100)
    log r7.w, r7.w
    mul r7.w, r7.w, l(1.500000)
    exp r7.w, r7.w
    mul r7.w, r7.w, l(0.010000)
    mov r8.xyz, r5.xyzx
    mov r8.w, l(0)
    loop
      uge r9.w, r8.w, cb9[13].w
      breakc_nz r9.w
      ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r9.w, r8.w, l(12), t19.xxxx
      switch r9.w
        case l(0)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyzw, r8.w, l(16), t19.xyzw
        add r11.xyz, r4.xyzx, -r10.xyzx
        dp3 r9.w, r2.xywx, r11.xyzx
        dp3 r11.x, r11.xyzx, r11.xyzx
        mad r11.y, -r10.w, r10.w, r11.x
        mul r11.y, r2.z, r11.y
        mad r11.y, r9.w, r9.w, -r11.y
        ge r11.z, r11.y, l(0.000000)
        and r11.z, r5.w, r11.z
        if_nz r11.z
          sqrt r11.y, r11.y
          add r11.z, -r9.w, -r11.y
          mul r11.z, r6.x, r11.z
          add r9.w, -r9.w, r11.y
          mul r9.w, r6.x, r9.w
          ge r11.y, l(1.000000), r11.z
          ge r11.w, r9.w, l(0.000000)
          and r11.y, r11.w, r11.y
          if_nz r11.y
            lt r11.y, r11.z, l(0.000000)
            lt r11.w, l(1.000000), r9.w
            movc r9.w, r11.w, l(1.000000), r9.w
            movc r11.y, r11.y, l(-0.000000), -r11.z
            add r9.w, r9.w, r11.y
            mul r11.y, r9.w, l(0.500000)
            mad r11.yzw, r11.yyyy, r2.xxyw, r4.xxyz
            ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r12.xyz, r8.w, l(0), t19.xyzx
            dp3 r12.w, r11.yzwy, r11.yzwy
            rsq r12.w, r12.w
            mul r13.xyz, r11.yzwy, r12.wwww
            add r10.xyz, r10.xyzx, -r11.yzwy
            dp3 r11.y, r10.xyzx, r10.xyzx
            rsq r11.y, r11.y
            mul r10.xyz, r10.xyzx, r11.yyyy
            dp3 r10.x, r13.xyzx, r10.xyzx
            mad r10.x, -r6.w, r10.x, r6.z
            log r10.x, |r10.x|
            mul r10.x, r10.x, l(1.500000)
            exp r10.x, r10.x
            mul r10.x, r10.x, l(12.566371)
            div r10.x, r6.y, r10.x
            mul r10.xyz, r10.xxxx, r12.xyzx
            mul r10.xyz, r9.wwww, r10.xyzx
            sqrt r9.w, r11.x
            div r9.w, r9.w, r10.w
            add r9.w, -r9.w, l(1.000000)
            max r9.w, r9.w, l(0.000000)
            mul r10.xyz, r9.wwww, r10.xyzx
            mul r9.w, r11.x, l(0.010000)
            div r10.xyz, r10.xyzx, r9.wwww
            mul r10.xyz, r1.zzzz, r10.xyzx
            mad r8.xyz, r10.xyzx, l(0.100000, 0.100000, 0.100000, 0.000000), r8.xyzx
          endif
        endif
        break
        case l(1)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyzw, r8.w, l(16), t19.xyzw
        add r11.xyz, r4.xyzx, -r10.xyzx
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r12.xyz, r8.w, l(32), t19.xyzx
        dp3 r9.w, r11.xyzx, r12.xyzx
        lt r9.w, l(0.000000), r9.w
        if_nz r9.w
          dp3 r9.w, r12.xyzx, r12.xyzx
          rsq r9.w, r9.w
          mul r12.xyz, r9.wwww, r12.xyzx
          dp3 r9.w, r11.xyzx, r12.xyzx
          mul r13.xyz, r12.xyzx, r9.wwww
          dp3 r9.w, r11.xyzx, r11.xyzx
          rsq r11.w, r9.w
          mul r11.xyz, r11.wwww, r11.xyzx
          dp3 r11.x, r12.xyzx, r11.xyzx
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.yz, r8.w, l(64), t19.xxyx
          ge r11.w, r11.x, r11.y
          ge r12.x, r11.z, r11.x
          add r11.x, -r11.z, r11.x
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.z, r8.w, l(68), t19.xxxx
          add r11.y, -r11.z, r11.y
          div r11.x, r11.x, r11.y
          movc r11.x, r12.x, l(0), r11.x
          movc r11.x, r11.w, l(1.000000), r11.x
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.yzw, r8.w, l(0), t19.xxyz
          add r10.xyz, -r4.xyzx, r10.xyzx
          dp3 r12.x, r10.xyzx, r10.xyzx
          rsq r12.x, r12.x
          mul r10.xyz, r10.xyzx, r12.xxxx
          dp3 r10.x, r7.xyzx, r10.xyzx
          mad r10.x, -r6.w, r10.x, r6.z
          log r10.x, |r10.x|
          mul r10.x, r10.x, l(1.500000)
          exp r10.x, r10.x
          mul r10.x, r10.x, l(12.566371)
          div r10.x, r6.y, r10.x
          mul r10.xyz, r10.xxxx, r11.yzwy
          mul r10.xyz, r11.xxxx, r10.xyzx
          mul r10.xyz, r10.xyzx, l(10000.000000, 10000.000000, 10000.000000, 0.000000)
          sqrt r9.w, r9.w
          div r9.w, r9.w, r10.w
          add r9.w, -r9.w, l(1.000000)
          max r9.w, r9.w, l(0.000000)
          mul r10.xyz, r9.wwww, r10.xyzx
          dp3 r9.w, r13.xyzx, r13.xyzx
          add r9.w, r9.w, l(0.010000)
          div r10.xyz, r10.xyzx, r9.wwww
          mad r8.xyz, r1.zzzz, r10.xyzx, r8.xyzx
        endif
        break
        case l(2)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyz, r8.w, l(32), t19.xyzx
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.xyz, r8.w, l(0), t19.xyzx
        dp3 r9.w, r10.xyzx, r10.xyzx
        rsq r9.w, r9.w
        mul r10.xyz, r9.wwww, r10.xyzx
        dp3 r9.w, r9.xyzx, r10.xyzx
        mad r9.w, -r6.w, r9.w, r6.z
        log r9.w, |r9.w|
        mul r9.w, r9.w, l(1.500000)
        exp r9.w, r9.w
        mul r9.w, r9.w, l(12.566371)
        div r9.w, r6.y, r9.w
        mul r10.xyz, r9.wwww, r11.xyzx
        div r10.xyz, r10.xyzx, r7.wwww
        mul r10.xyz, r1.zzzz, r10.xyzx
        mad r8.xyz, r10.xyzx, l(0.000001, 0.000001, 0.000001, 0.000000), r8.xyzx
        break
        default
        break
      endswitch
      iadd r8.w, r8.w, l(1)
    endloop
    add r4.xyz, r2.xywx, r4.xyzx
  endif
  movc r0.x, r0.w, l(10), l(11)
else
  mov r0.w, l(-1)
endif
not r0.w, r0.w
and r0.y, r0.w, r0.y
ilt r0.w, r0.x, r0.z
and r0.y, r0.w, r0.y
if_nz r0.y
  ge r0.w, l(0.000000), r3.x
  lt r1.z, r3.x, r3.y
  add r3.z, -r3.y, r3.x
  mov r3.w, l(0)
  movc r5.xy, r1.zzzz, r3.wxww, r3.zyzz
  movc r3.xy, r0.wwww, r3.xyxx, r5.xyxx
  if_z r0.w
    mul r1.z, r3.y, cb9[13].y
    if_nz cb9[12].z
      mul r2.z, r1.z, l(0.002000)
      mul r5.x, r4.z, l(-0.0666666701)
      max r5.x, r5.x, l(0.000000)
      rsq r5.x, r5.x
      div r5.x, l(1.000000, 1.000000, 1.000000, 1.000000), r5.x
      mul r5.w, r4.x, cb12[0].x
      mul r5.zw, r5.xxxw, l(0.000000, 0.000000, 16.000000, -0.500000)
      div r5.w, r5.w, r4.z
      add r5.x, r5.w, l(0.500000)
      mul r5.w, r4.y, cb12[1].y
      mul r5.w, r5.w, l(0.500000)
      div r5.w, r5.w, r4.z
      add r5.y, r5.w, l(0.500000)
      sample_indexable(texture2darray)(float,float,float,float) r5.x, r5.xyzx, t1.wxyz, s1
      mul r2.z, r2.z, r5.x
    else
      mul r2.z, r1.z, l(0.000200000009)
    endif
    lt r1.z, l(0.900000), r2.z
    movc r1.z, r1.z, l(0.900000), r2.z
    add r2.z, -r1.z, l(1.000000)
    mul r1.w, r1.w, r2.z
    mul r5.xyz, r2.zzzz, r8.xyzx
    if_nz cb9[12].y
      mov r4.w, l(1.000000)
      dp4 r6.x, cb9[8].xyzw, r4.xyzw
      dp4 r6.y, cb9[9].xyzw, r4.xyzw
      dp4 r6.z, cb9[10].xyzw, r4.xyzw
      dp4 r2.z, cb9[11].xyzw, r4.xyzw
      div r6.xyz, r6.xyzx, r2.zzzz
      mov_sat r7.xy, r6.xyxx
      eq r7.xy, r6.xyxx, r7.xyxx
      and r2.z, r7.y, r7.x
      if_nz r2.z
        mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
        frc r7.xy, r7.xyxx
        lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
        and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
        add r2.z, r7.x, r7.y
        lt r5.w, l(1.100000), r2.z
        movc r7.z, r5.w, l(0), r2.z
        add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
        mad r6.xy, r7.xyxx, l(0.000976562500, 0.000976562500, 0.000000, 0.000000), r6.xyxx
        mov_sat r7.xy, r6.xyxx
        eq r7.xy, r6.xyxx, r7.xyxx
        and r2.z, r7.y, r7.x
        if_nz r2.z
          min r2.z, r6.z, l(1.000000)
          sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t15.xxxx, s15, r2.z
        else
          mov r2.z, l(1.000000)
        endif
      else
        dp4 r6.x, cb9[4].xyzw, r4.xyzw
        dp4 r6.y, cb9[5].xyzw, r4.xyzw
        dp4 r6.z, cb9[6].xyzw, r4.xyzw
        dp4 r5.w, cb9[7].xyzw, r4.xyzw
        div r6.xyz, r6.xyzx, r5.wwww
        mov_sat r7.xy, r6.xyxx
        eq r7.xy, r6.xyxx, r7.xyxx
        and r5.w, r7.y, r7.x
        if_nz r5.w
          mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
          frc r7.xy, r7.xyxx
          lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
          and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
          add r5.w, r7.x, r7.y
          lt r6.w, l(1.100000), r5.w
          movc r7.z, r6.w, l(0), r5.w
          add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
          mad r6.xy, r7.xyxx, l(0.000244140625, 0.000244140625, 0.000000, 0.000000), r6.xyxx
          mov_sat r7.xy, r6.xyxx
          eq r7.xy, r6.xyxx, r7.xyxx
          and r5.w, r7.y, r7.x
          if_nz r5.w
            min r5.w, r6.z, l(1.000000)
            sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t14.xxxx, s14, r5.w
          else
            mov r2.z, l(1.000000)
          endif
        else
          dp4 r6.x, cb9[0].xyzw, r4.xyzw
          dp4 r6.y, cb9[1].xyzw, r4.xyzw
          dp4 r6.z, cb9[2].xyzw, r4.xyzw
          dp4 r5.w, cb9[3].xyzw, r4.xyzw
          div r6.xyz, r6.xyzx, r5.wwww
          mov_sat r7.xy, r6.xyxx
          eq r7.xy, r6.xyxx, r7.xyxx
          and r5.w, r7.y, r7.x
          if_nz r5.w
            mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
            frc r7.xy, r7.xyxx
            lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
            and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
            add r5.w, r7.x, r7.y
            lt r6.w, l(1.100000), r5.w
            movc r7.z, r6.w, l(0), r5.w
            add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
            mad r6.xy, r7.xyxx, l(0.0000610351563, 0.0000610351563, 0.000000, 0.000000), r6.xyxx
            mov_sat r7.xy, r6.xyxx
            eq r7.xy, r6.xyxx, r7.xyxx
            and r5.w, r7.y, r7.x
            if_nz r5.w
              min r5.w, r6.z, l(1.000000)
              sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t13.xxxx, s13, r5.w
            else
              mov r2.z, l(1.000000)
            endif
          else
            mov r2.z, l(1.000000)
          endif
        endif
      endif
      mul r1.z, r1.z, r2.z
    endif
    dp3 r2.z, r2.xywx, r2.xywx
    lt r5.w, l(0.000100), r2.z
    div r6.x, l(1.000000, 1.000000, 1.000000, 1.000000), r2.z
    mad r6.y, -cb9[13].x, cb9[13].x, l(1.000000)
    mad r6.z, cb9[13].x, cb9[13].x, l(1.000000)
    add r6.w, cb9[13].x, cb9[13].x
    dp3 r7.x, r4.xyzx, r4.xyzx
    rsq r7.x, r7.x
    mul r7.xyz, r4.xyzx, r7.xxxx
    mad r9.xyz, r2.xywx, l(0.500000, 0.500000, 0.500000, 0.000000), r4.xyzx
    dp3 r7.w, r9.xyzx, r9.xyzx
    rsq r8.w, r7.w
    mul r9.xyz, r8.wwww, r9.xyzx
    add r7.w, r7.w, l(0.000100)
    log r7.w, r7.w
    mul r7.w, r7.w, l(1.500000)
    exp r7.w, r7.w
    mul r7.w, r7.w, l(0.010000)
    mov r8.xyz, r5.xyzx
    mov r8.w, l(0)
    loop
      uge r9.w, r8.w, cb9[13].w
      breakc_nz r9.w
      ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r9.w, r8.w, l(12), t19.xxxx
      switch r9.w
        case l(0)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyzw, r8.w, l(16), t19.xyzw
        add r11.xyz, r4.xyzx, -r10.xyzx
        dp3 r9.w, r2.xywx, r11.xyzx
        dp3 r11.x, r11.xyzx, r11.xyzx
        mad r11.y, -r10.w, r10.w, r11.x
        mul r11.y, r2.z, r11.y
        mad r11.y, r9.w, r9.w, -r11.y
        ge r11.z, r11.y, l(0.000000)
        and r11.z, r5.w, r11.z
        if_nz r11.z
          sqrt r11.y, r11.y
          add r11.z, -r9.w, -r11.y
          mul r11.z, r6.x, r11.z
          add r9.w, -r9.w, r11.y
          mul r9.w, r6.x, r9.w
          ge r11.y, l(1.000000), r11.z
          ge r11.w, r9.w, l(0.000000)
          and r11.y, r11.w, r11.y
          if_nz r11.y
            lt r11.y, r11.z, l(0.000000)
            lt r11.w, l(1.000000), r9.w
            movc r9.w, r11.w, l(1.000000), r9.w
            movc r11.y, r11.y, l(-0.000000), -r11.z
            add r9.w, r9.w, r11.y
            mul r11.y, r9.w, l(0.500000)
            mad r11.yzw, r11.yyyy, r2.xxyw, r4.xxyz
            ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r12.xyz, r8.w, l(0), t19.xyzx
            dp3 r12.w, r11.yzwy, r11.yzwy
            rsq r12.w, r12.w
            mul r13.xyz, r11.yzwy, r12.wwww
            add r10.xyz, r10.xyzx, -r11.yzwy
            dp3 r11.y, r10.xyzx, r10.xyzx
            rsq r11.y, r11.y
            mul r10.xyz, r10.xyzx, r11.yyyy
            dp3 r10.x, r13.xyzx, r10.xyzx
            mad r10.x, -r6.w, r10.x, r6.z
            log r10.x, |r10.x|
            mul r10.x, r10.x, l(1.500000)
            exp r10.x, r10.x
            mul r10.x, r10.x, l(12.566371)
            div r10.x, r6.y, r10.x
            mul r10.xyz, r10.xxxx, r12.xyzx
            mul r10.xyz, r9.wwww, r10.xyzx
            sqrt r9.w, r11.x
            div r9.w, r9.w, r10.w
            add r9.w, -r9.w, l(1.000000)
            max r9.w, r9.w, l(0.000000)
            mul r10.xyz, r9.wwww, r10.xyzx
            mul r9.w, r11.x, l(0.010000)
            div r10.xyz, r10.xyzx, r9.wwww
            mul r10.xyz, r1.zzzz, r10.xyzx
            mad r8.xyz, r10.xyzx, l(0.100000, 0.100000, 0.100000, 0.000000), r8.xyzx
          endif
        endif
        break
        case l(1)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyzw, r8.w, l(16), t19.xyzw
        add r11.xyz, r4.xyzx, -r10.xyzx
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r12.xyz, r8.w, l(32), t19.xyzx
        dp3 r9.w, r11.xyzx, r12.xyzx
        lt r9.w, l(0.000000), r9.w
        if_nz r9.w
          dp3 r9.w, r12.xyzx, r12.xyzx
          rsq r9.w, r9.w
          mul r12.xyz, r9.wwww, r12.xyzx
          dp3 r9.w, r11.xyzx, r12.xyzx
          mul r13.xyz, r12.xyzx, r9.wwww
          dp3 r9.w, r11.xyzx, r11.xyzx
          rsq r11.w, r9.w
          mul r11.xyz, r11.wwww, r11.xyzx
          dp3 r11.x, r12.xyzx, r11.xyzx
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.yz, r8.w, l(64), t19.xxyx
          ge r11.w, r11.x, r11.y
          ge r12.x, r11.z, r11.x
          add r11.x, -r11.z, r11.x
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.z, r8.w, l(68), t19.xxxx
          add r11.y, -r11.z, r11.y
          div r11.x, r11.x, r11.y
          movc r11.x, r12.x, l(0), r11.x
          movc r11.x, r11.w, l(1.000000), r11.x
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.yzw, r8.w, l(0), t19.xxyz
          add r10.xyz, -r4.xyzx, r10.xyzx
          dp3 r12.x, r10.xyzx, r10.xyzx
          rsq r12.x, r12.x
          mul r10.xyz, r10.xyzx, r12.xxxx
          dp3 r10.x, r7.xyzx, r10.xyzx
          mad r10.x, -r6.w, r10.x, r6.z
          log r10.x, |r10.x|
          mul r10.x, r10.x, l(1.500000)
          exp r10.x, r10.x
          mul r10.x, r10.x, l(12.566371)
          div r10.x, r6.y, r10.x
          mul r10.xyz, r10.xxxx, r11.yzwy
          mul r10.xyz, r11.xxxx, r10.xyzx
          mul r10.xyz, r10.xyzx, l(10000.000000, 10000.000000, 10000.000000, 0.000000)
          sqrt r9.w, r9.w
          div r9.w, r9.w, r10.w
          add r9.w, -r9.w, l(1.000000)
          max r9.w, r9.w, l(0.000000)
          mul r10.xyz, r9.wwww, r10.xyzx
          dp3 r9.w, r13.xyzx, r13.xyzx
          add r9.w, r9.w, l(0.010000)
          div r10.xyz, r10.xyzx, r9.wwww
          mad r8.xyz, r1.zzzz, r10.xyzx, r8.xyzx
        endif
        break
        case l(2)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyz, r8.w, l(32), t19.xyzx
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.xyz, r8.w, l(0), t19.xyzx
        dp3 r9.w, r10.xyzx, r10.xyzx
        rsq r9.w, r9.w
        mul r10.xyz, r9.wwww, r10.xyzx
        dp3 r9.w, r9.xyzx, r10.xyzx
        mad r9.w, -r6.w, r9.w, r6.z
        log r9.w, |r9.w|
        mul r9.w, r9.w, l(1.500000)
        exp r9.w, r9.w
        mul r9.w, r9.w, l(12.566371)
        div r9.w, r6.y, r9.w
        mul r10.xyz, r9.wwww, r11.xyzx
        div r10.xyz, r10.xyzx, r7.wwww
        mul r10.xyz, r1.zzzz, r10.xyzx
        mad r8.xyz, r10.xyzx, l(0.000001, 0.000001, 0.000001, 0.000000), r8.xyzx
        break
        default
        break
      endswitch
      iadd r8.w, r8.w, l(1)
    endloop
    add r4.xyz, r2.xywx, r4.xyzx
  endif
  movc r0.x, r0.w, l(11), l(12)
else
  mov r0.w, l(-1)
endif
not r0.w, r0.w
and r0.y, r0.w, r0.y
ilt r0.w, r0.x, r0.z
and r0.y, r0.w, r0.y
if_nz r0.y
  ge r0.w, l(0.000000), r3.x
  lt r1.z, r3.x, r3.y
  add r3.z, -r3.y, r3.x
  mov r3.w, l(0)
  movc r5.xy, r1.zzzz, r3.wxww, r3.zyzz
  movc r3.xy, r0.wwww, r3.xyxx, r5.xyxx
  if_z r0.w
    mul r1.z, r3.y, cb9[13].y
    if_nz cb9[12].z
      mul r2.z, r1.z, l(0.002000)
      mul r5.x, r4.z, l(-0.0666666701)
      max r5.x, r5.x, l(0.000000)
      rsq r5.x, r5.x
      div r5.x, l(1.000000, 1.000000, 1.000000, 1.000000), r5.x
      mul r5.w, r4.x, cb12[0].x
      mul r5.zw, r5.xxxw, l(0.000000, 0.000000, 16.000000, -0.500000)
      div r5.w, r5.w, r4.z
      add r5.x, r5.w, l(0.500000)
      mul r5.w, r4.y, cb12[1].y
      mul r5.w, r5.w, l(0.500000)
      div r5.w, r5.w, r4.z
      add r5.y, r5.w, l(0.500000)
      sample_indexable(texture2darray)(float,float,float,float) r5.x, r5.xyzx, t1.wxyz, s1
      mul r2.z, r2.z, r5.x
    else
      mul r2.z, r1.z, l(0.000200000009)
    endif
    lt r1.z, l(0.900000), r2.z
    movc r1.z, r1.z, l(0.900000), r2.z
    add r2.z, -r1.z, l(1.000000)
    mul r1.w, r1.w, r2.z
    mul r5.xyz, r2.zzzz, r8.xyzx
    if_nz cb9[12].y
      mov r4.w, l(1.000000)
      dp4 r6.x, cb9[8].xyzw, r4.xyzw
      dp4 r6.y, cb9[9].xyzw, r4.xyzw
      dp4 r6.z, cb9[10].xyzw, r4.xyzw
      dp4 r2.z, cb9[11].xyzw, r4.xyzw
      div r6.xyz, r6.xyzx, r2.zzzz
      mov_sat r7.xy, r6.xyxx
      eq r7.xy, r6.xyxx, r7.xyxx
      and r2.z, r7.y, r7.x
      if_nz r2.z
        mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
        frc r7.xy, r7.xyxx
        lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
        and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
        add r2.z, r7.x, r7.y
        lt r5.w, l(1.100000), r2.z
        movc r7.z, r5.w, l(0), r2.z
        add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
        mad r6.xy, r7.xyxx, l(0.000976562500, 0.000976562500, 0.000000, 0.000000), r6.xyxx
        mov_sat r7.xy, r6.xyxx
        eq r7.xy, r6.xyxx, r7.xyxx
        and r2.z, r7.y, r7.x
        if_nz r2.z
          min r2.z, r6.z, l(1.000000)
          sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t15.xxxx, s15, r2.z
        else
          mov r2.z, l(1.000000)
        endif
      else
        dp4 r6.x, cb9[4].xyzw, r4.xyzw
        dp4 r6.y, cb9[5].xyzw, r4.xyzw
        dp4 r6.z, cb9[6].xyzw, r4.xyzw
        dp4 r5.w, cb9[7].xyzw, r4.xyzw
        div r6.xyz, r6.xyzx, r5.wwww
        mov_sat r7.xy, r6.xyxx
        eq r7.xy, r6.xyxx, r7.xyxx
        and r5.w, r7.y, r7.x
        if_nz r5.w
          mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
          frc r7.xy, r7.xyxx
          lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
          and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
          add r5.w, r7.x, r7.y
          lt r6.w, l(1.100000), r5.w
          movc r7.z, r6.w, l(0), r5.w
          add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
          mad r6.xy, r7.xyxx, l(0.000244140625, 0.000244140625, 0.000000, 0.000000), r6.xyxx
          mov_sat r7.xy, r6.xyxx
          eq r7.xy, r6.xyxx, r7.xyxx
          and r5.w, r7.y, r7.x
          if_nz r5.w
            min r5.w, r6.z, l(1.000000)
            sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t14.xxxx, s14, r5.w
          else
            mov r2.z, l(1.000000)
          endif
        else
          dp4 r6.x, cb9[0].xyzw, r4.xyzw
          dp4 r6.y, cb9[1].xyzw, r4.xyzw
          dp4 r6.z, cb9[2].xyzw, r4.xyzw
          dp4 r5.w, cb9[3].xyzw, r4.xyzw
          div r6.xyz, r6.xyzx, r5.wwww
          mov_sat r7.xy, r6.xyxx
          eq r7.xy, r6.xyxx, r7.xyxx
          and r5.w, r7.y, r7.x
          if_nz r5.w
            mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
            frc r7.xy, r7.xyxx
            lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
            and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
            add r5.w, r7.x, r7.y
            lt r6.w, l(1.100000), r5.w
            movc r7.z, r6.w, l(0), r5.w
            add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
            mad r6.xy, r7.xyxx, l(0.0000610351563, 0.0000610351563, 0.000000, 0.000000), r6.xyxx
            mov_sat r7.xy, r6.xyxx
            eq r7.xy, r6.xyxx, r7.xyxx
            and r5.w, r7.y, r7.x
            if_nz r5.w
              min r5.w, r6.z, l(1.000000)
              sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t13.xxxx, s13, r5.w
            else
              mov r2.z, l(1.000000)
            endif
          else
            mov r2.z, l(1.000000)
          endif
        endif
      endif
      mul r1.z, r1.z, r2.z
    endif
    dp3 r2.z, r2.xywx, r2.xywx
    lt r5.w, l(0.000100), r2.z
    div r6.x, l(1.000000, 1.000000, 1.000000, 1.000000), r2.z
    mad r6.y, -cb9[13].x, cb9[13].x, l(1.000000)
    mad r6.z, cb9[13].x, cb9[13].x, l(1.000000)
    add r6.w, cb9[13].x, cb9[13].x
    dp3 r7.x, r4.xyzx, r4.xyzx
    rsq r7.x, r7.x
    mul r7.xyz, r4.xyzx, r7.xxxx
    mad r9.xyz, r2.xywx, l(0.500000, 0.500000, 0.500000, 0.000000), r4.xyzx
    dp3 r7.w, r9.xyzx, r9.xyzx
    rsq r8.w, r7.w
    mul r9.xyz, r8.wwww, r9.xyzx
    add r7.w, r7.w, l(0.000100)
    log r7.w, r7.w
    mul r7.w, r7.w, l(1.500000)
    exp r7.w, r7.w
    mul r7.w, r7.w, l(0.010000)
    mov r8.xyz, r5.xyzx
    mov r8.w, l(0)
    loop
      uge r9.w, r8.w, cb9[13].w
      breakc_nz r9.w
      ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r9.w, r8.w, l(12), t19.xxxx
      switch r9.w
        case l(0)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyzw, r8.w, l(16), t19.xyzw
        add r11.xyz, r4.xyzx, -r10.xyzx
        dp3 r9.w, r2.xywx, r11.xyzx
        dp3 r11.x, r11.xyzx, r11.xyzx
        mad r11.y, -r10.w, r10.w, r11.x
        mul r11.y, r2.z, r11.y
        mad r11.y, r9.w, r9.w, -r11.y
        ge r11.z, r11.y, l(0.000000)
        and r11.z, r5.w, r11.z
        if_nz r11.z
          sqrt r11.y, r11.y
          add r11.z, -r9.w, -r11.y
          mul r11.z, r6.x, r11.z
          add r9.w, -r9.w, r11.y
          mul r9.w, r6.x, r9.w
          ge r11.y, l(1.000000), r11.z
          ge r11.w, r9.w, l(0.000000)
          and r11.y, r11.w, r11.y
          if_nz r11.y
            lt r11.y, r11.z, l(0.000000)
            lt r11.w, l(1.000000), r9.w
            movc r9.w, r11.w, l(1.000000), r9.w
            movc r11.y, r11.y, l(-0.000000), -r11.z
            add r9.w, r9.w, r11.y
            mul r11.y, r9.w, l(0.500000)
            mad r11.yzw, r11.yyyy, r2.xxyw, r4.xxyz
            ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r12.xyz, r8.w, l(0), t19.xyzx
            dp3 r12.w, r11.yzwy, r11.yzwy
            rsq r12.w, r12.w
            mul r13.xyz, r11.yzwy, r12.wwww
            add r10.xyz, r10.xyzx, -r11.yzwy
            dp3 r11.y, r10.xyzx, r10.xyzx
            rsq r11.y, r11.y
            mul r10.xyz, r10.xyzx, r11.yyyy
            dp3 r10.x, r13.xyzx, r10.xyzx
            mad r10.x, -r6.w, r10.x, r6.z
            log r10.x, |r10.x|
            mul r10.x, r10.x, l(1.500000)
            exp r10.x, r10.x
            mul r10.x, r10.x, l(12.566371)
            div r10.x, r6.y, r10.x
            mul r10.xyz, r10.xxxx, r12.xyzx
            mul r10.xyz, r9.wwww, r10.xyzx
            sqrt r9.w, r11.x
            div r9.w, r9.w, r10.w
            add r9.w, -r9.w, l(1.000000)
            max r9.w, r9.w, l(0.000000)
            mul r10.xyz, r9.wwww, r10.xyzx
            mul r9.w, r11.x, l(0.010000)
            div r10.xyz, r10.xyzx, r9.wwww
            mul r10.xyz, r1.zzzz, r10.xyzx
            mad r8.xyz, r10.xyzx, l(0.100000, 0.100000, 0.100000, 0.000000), r8.xyzx
          endif
        endif
        break
        case l(1)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyzw, r8.w, l(16), t19.xyzw
        add r11.xyz, r4.xyzx, -r10.xyzx
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r12.xyz, r8.w, l(32), t19.xyzx
        dp3 r9.w, r11.xyzx, r12.xyzx
        lt r9.w, l(0.000000), r9.w
        if_nz r9.w
          dp3 r9.w, r12.xyzx, r12.xyzx
          rsq r9.w, r9.w
          mul r12.xyz, r9.wwww, r12.xyzx
          dp3 r9.w, r11.xyzx, r12.xyzx
          mul r13.xyz, r12.xyzx, r9.wwww
          dp3 r9.w, r11.xyzx, r11.xyzx
          rsq r11.w, r9.w
          mul r11.xyz, r11.wwww, r11.xyzx
          dp3 r11.x, r12.xyzx, r11.xyzx
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.yz, r8.w, l(64), t19.xxyx
          ge r11.w, r11.x, r11.y
          ge r12.x, r11.z, r11.x
          add r11.x, -r11.z, r11.x
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.z, r8.w, l(68), t19.xxxx
          add r11.y, -r11.z, r11.y
          div r11.x, r11.x, r11.y
          movc r11.x, r12.x, l(0), r11.x
          movc r11.x, r11.w, l(1.000000), r11.x
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.yzw, r8.w, l(0), t19.xxyz
          add r10.xyz, -r4.xyzx, r10.xyzx
          dp3 r12.x, r10.xyzx, r10.xyzx
          rsq r12.x, r12.x
          mul r10.xyz, r10.xyzx, r12.xxxx
          dp3 r10.x, r7.xyzx, r10.xyzx
          mad r10.x, -r6.w, r10.x, r6.z
          log r10.x, |r10.x|
          mul r10.x, r10.x, l(1.500000)
          exp r10.x, r10.x
          mul r10.x, r10.x, l(12.566371)
          div r10.x, r6.y, r10.x
          mul r10.xyz, r10.xxxx, r11.yzwy
          mul r10.xyz, r11.xxxx, r10.xyzx
          mul r10.xyz, r10.xyzx, l(10000.000000, 10000.000000, 10000.000000, 0.000000)
          sqrt r9.w, r9.w
          div r9.w, r9.w, r10.w
          add r9.w, -r9.w, l(1.000000)
          max r9.w, r9.w, l(0.000000)
          mul r10.xyz, r9.wwww, r10.xyzx
          dp3 r9.w, r13.xyzx, r13.xyzx
          add r9.w, r9.w, l(0.010000)
          div r10.xyz, r10.xyzx, r9.wwww
          mad r8.xyz, r1.zzzz, r10.xyzx, r8.xyzx
        endif
        break
        case l(2)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyz, r8.w, l(32), t19.xyzx
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.xyz, r8.w, l(0), t19.xyzx
        dp3 r9.w, r10.xyzx, r10.xyzx
        rsq r9.w, r9.w
        mul r10.xyz, r9.wwww, r10.xyzx
        dp3 r9.w, r9.xyzx, r10.xyzx
        mad r9.w, -r6.w, r9.w, r6.z
        log r9.w, |r9.w|
        mul r9.w, r9.w, l(1.500000)
        exp r9.w, r9.w
        mul r9.w, r9.w, l(12.566371)
        div r9.w, r6.y, r9.w
        mul r10.xyz, r9.wwww, r11.xyzx
        div r10.xyz, r10.xyzx, r7.wwww
        mul r10.xyz, r1.zzzz, r10.xyzx
        mad r8.xyz, r10.xyzx, l(0.000001, 0.000001, 0.000001, 0.000000), r8.xyzx
        break
        default
        break
      endswitch
      iadd r8.w, r8.w, l(1)
    endloop
    add r4.xyz, r2.xywx, r4.xyzx
  endif
  movc r0.x, r0.w, l(12), l(13)
else
  mov r0.w, l(-1)
endif
not r0.w, r0.w
and r0.y, r0.w, r0.y
ilt r0.w, r0.x, r0.z
and r0.y, r0.w, r0.y
if_nz r0.y
  ge r0.w, l(0.000000), r3.x
  lt r1.z, r3.x, r3.y
  add r3.z, -r3.y, r3.x
  mov r3.w, l(0)
  movc r5.xy, r1.zzzz, r3.wxww, r3.zyzz
  movc r3.xy, r0.wwww, r3.xyxx, r5.xyxx
  if_z r0.w
    mul r1.z, r3.y, cb9[13].y
    if_nz cb9[12].z
      mul r2.z, r1.z, l(0.002000)
      mul r5.x, r4.z, l(-0.0666666701)
      max r5.x, r5.x, l(0.000000)
      rsq r5.x, r5.x
      div r5.x, l(1.000000, 1.000000, 1.000000, 1.000000), r5.x
      mul r5.w, r4.x, cb12[0].x
      mul r5.zw, r5.xxxw, l(0.000000, 0.000000, 16.000000, -0.500000)
      div r5.w, r5.w, r4.z
      add r5.x, r5.w, l(0.500000)
      mul r5.w, r4.y, cb12[1].y
      mul r5.w, r5.w, l(0.500000)
      div r5.w, r5.w, r4.z
      add r5.y, r5.w, l(0.500000)
      sample_indexable(texture2darray)(float,float,float,float) r5.x, r5.xyzx, t1.wxyz, s1
      mul r2.z, r2.z, r5.x
    else
      mul r2.z, r1.z, l(0.000200000009)
    endif
    lt r1.z, l(0.900000), r2.z
    movc r1.z, r1.z, l(0.900000), r2.z
    add r2.z, -r1.z, l(1.000000)
    mul r1.w, r1.w, r2.z
    mul r5.xyz, r2.zzzz, r8.xyzx
    if_nz cb9[12].y
      mov r4.w, l(1.000000)
      dp4 r6.x, cb9[8].xyzw, r4.xyzw
      dp4 r6.y, cb9[9].xyzw, r4.xyzw
      dp4 r6.z, cb9[10].xyzw, r4.xyzw
      dp4 r2.z, cb9[11].xyzw, r4.xyzw
      div r6.xyz, r6.xyzx, r2.zzzz
      mov_sat r7.xy, r6.xyxx
      eq r7.xy, r6.xyxx, r7.xyxx
      and r2.z, r7.y, r7.x
      if_nz r2.z
        mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
        frc r7.xy, r7.xyxx
        lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
        and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
        add r2.z, r7.x, r7.y
        lt r5.w, l(1.100000), r2.z
        movc r7.z, r5.w, l(0), r2.z
        add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
        mad r6.xy, r7.xyxx, l(0.000976562500, 0.000976562500, 0.000000, 0.000000), r6.xyxx
        mov_sat r7.xy, r6.xyxx
        eq r7.xy, r6.xyxx, r7.xyxx
        and r2.z, r7.y, r7.x
        if_nz r2.z
          min r2.z, r6.z, l(1.000000)
          sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t15.xxxx, s15, r2.z
        else
          mov r2.z, l(1.000000)
        endif
      else
        dp4 r6.x, cb9[4].xyzw, r4.xyzw
        dp4 r6.y, cb9[5].xyzw, r4.xyzw
        dp4 r6.z, cb9[6].xyzw, r4.xyzw
        dp4 r5.w, cb9[7].xyzw, r4.xyzw
        div r6.xyz, r6.xyzx, r5.wwww
        mov_sat r7.xy, r6.xyxx
        eq r7.xy, r6.xyxx, r7.xyxx
        and r5.w, r7.y, r7.x
        if_nz r5.w
          mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
          frc r7.xy, r7.xyxx
          lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
          and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
          add r5.w, r7.x, r7.y
          lt r6.w, l(1.100000), r5.w
          movc r7.z, r6.w, l(0), r5.w
          add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
          mad r6.xy, r7.xyxx, l(0.000244140625, 0.000244140625, 0.000000, 0.000000), r6.xyxx
          mov_sat r7.xy, r6.xyxx
          eq r7.xy, r6.xyxx, r7.xyxx
          and r5.w, r7.y, r7.x
          if_nz r5.w
            min r5.w, r6.z, l(1.000000)
            sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t14.xxxx, s14, r5.w
          else
            mov r2.z, l(1.000000)
          endif
        else
          dp4 r6.x, cb9[0].xyzw, r4.xyzw
          dp4 r6.y, cb9[1].xyzw, r4.xyzw
          dp4 r6.z, cb9[2].xyzw, r4.xyzw
          dp4 r5.w, cb9[3].xyzw, r4.xyzw
          div r6.xyz, r6.xyzx, r5.wwww
          mov_sat r7.xy, r6.xyxx
          eq r7.xy, r6.xyxx, r7.xyxx
          and r5.w, r7.y, r7.x
          if_nz r5.w
            mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
            frc r7.xy, r7.xyxx
            lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
            and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
            add r5.w, r7.x, r7.y
            lt r6.w, l(1.100000), r5.w
            movc r7.z, r6.w, l(0), r5.w
            add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
            mad r6.xy, r7.xyxx, l(0.0000610351563, 0.0000610351563, 0.000000, 0.000000), r6.xyxx
            mov_sat r7.xy, r6.xyxx
            eq r7.xy, r6.xyxx, r7.xyxx
            and r5.w, r7.y, r7.x
            if_nz r5.w
              min r5.w, r6.z, l(1.000000)
              sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t13.xxxx, s13, r5.w
            else
              mov r2.z, l(1.000000)
            endif
          else
            mov r2.z, l(1.000000)
          endif
        endif
      endif
      mul r1.z, r1.z, r2.z
    endif
    dp3 r2.z, r2.xywx, r2.xywx
    lt r5.w, l(0.000100), r2.z
    div r6.x, l(1.000000, 1.000000, 1.000000, 1.000000), r2.z
    mad r6.y, -cb9[13].x, cb9[13].x, l(1.000000)
    mad r6.z, cb9[13].x, cb9[13].x, l(1.000000)
    add r6.w, cb9[13].x, cb9[13].x
    dp3 r7.x, r4.xyzx, r4.xyzx
    rsq r7.x, r7.x
    mul r7.xyz, r4.xyzx, r7.xxxx
    mad r9.xyz, r2.xywx, l(0.500000, 0.500000, 0.500000, 0.000000), r4.xyzx
    dp3 r7.w, r9.xyzx, r9.xyzx
    rsq r8.w, r7.w
    mul r9.xyz, r8.wwww, r9.xyzx
    add r7.w, r7.w, l(0.000100)
    log r7.w, r7.w
    mul r7.w, r7.w, l(1.500000)
    exp r7.w, r7.w
    mul r7.w, r7.w, l(0.010000)
    mov r8.xyz, r5.xyzx
    mov r8.w, l(0)
    loop
      uge r9.w, r8.w, cb9[13].w
      breakc_nz r9.w
      ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r9.w, r8.w, l(12), t19.xxxx
      switch r9.w
        case l(0)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyzw, r8.w, l(16), t19.xyzw
        add r11.xyz, r4.xyzx, -r10.xyzx
        dp3 r9.w, r2.xywx, r11.xyzx
        dp3 r11.x, r11.xyzx, r11.xyzx
        mad r11.y, -r10.w, r10.w, r11.x
        mul r11.y, r2.z, r11.y
        mad r11.y, r9.w, r9.w, -r11.y
        ge r11.z, r11.y, l(0.000000)
        and r11.z, r5.w, r11.z
        if_nz r11.z
          sqrt r11.y, r11.y
          add r11.z, -r9.w, -r11.y
          mul r11.z, r6.x, r11.z
          add r9.w, -r9.w, r11.y
          mul r9.w, r6.x, r9.w
          ge r11.y, l(1.000000), r11.z
          ge r11.w, r9.w, l(0.000000)
          and r11.y, r11.w, r11.y
          if_nz r11.y
            lt r11.y, r11.z, l(0.000000)
            lt r11.w, l(1.000000), r9.w
            movc r9.w, r11.w, l(1.000000), r9.w
            movc r11.y, r11.y, l(-0.000000), -r11.z
            add r9.w, r9.w, r11.y
            mul r11.y, r9.w, l(0.500000)
            mad r11.yzw, r11.yyyy, r2.xxyw, r4.xxyz
            ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r12.xyz, r8.w, l(0), t19.xyzx
            dp3 r12.w, r11.yzwy, r11.yzwy
            rsq r12.w, r12.w
            mul r13.xyz, r11.yzwy, r12.wwww
            add r10.xyz, r10.xyzx, -r11.yzwy
            dp3 r11.y, r10.xyzx, r10.xyzx
            rsq r11.y, r11.y
            mul r10.xyz, r10.xyzx, r11.yyyy
            dp3 r10.x, r13.xyzx, r10.xyzx
            mad r10.x, -r6.w, r10.x, r6.z
            log r10.x, |r10.x|
            mul r10.x, r10.x, l(1.500000)
            exp r10.x, r10.x
            mul r10.x, r10.x, l(12.566371)
            div r10.x, r6.y, r10.x
            mul r10.xyz, r10.xxxx, r12.xyzx
            mul r10.xyz, r9.wwww, r10.xyzx
            sqrt r9.w, r11.x
            div r9.w, r9.w, r10.w
            add r9.w, -r9.w, l(1.000000)
            max r9.w, r9.w, l(0.000000)
            mul r10.xyz, r9.wwww, r10.xyzx
            mul r9.w, r11.x, l(0.010000)
            div r10.xyz, r10.xyzx, r9.wwww
            mul r10.xyz, r1.zzzz, r10.xyzx
            mad r8.xyz, r10.xyzx, l(0.100000, 0.100000, 0.100000, 0.000000), r8.xyzx
          endif
        endif
        break
        case l(1)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyzw, r8.w, l(16), t19.xyzw
        add r11.xyz, r4.xyzx, -r10.xyzx
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r12.xyz, r8.w, l(32), t19.xyzx
        dp3 r9.w, r11.xyzx, r12.xyzx
        lt r9.w, l(0.000000), r9.w
        if_nz r9.w
          dp3 r9.w, r12.xyzx, r12.xyzx
          rsq r9.w, r9.w
          mul r12.xyz, r9.wwww, r12.xyzx
          dp3 r9.w, r11.xyzx, r12.xyzx
          mul r13.xyz, r12.xyzx, r9.wwww
          dp3 r9.w, r11.xyzx, r11.xyzx
          rsq r11.w, r9.w
          mul r11.xyz, r11.wwww, r11.xyzx
          dp3 r11.x, r12.xyzx, r11.xyzx
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.yz, r8.w, l(64), t19.xxyx
          ge r11.w, r11.x, r11.y
          ge r12.x, r11.z, r11.x
          add r11.x, -r11.z, r11.x
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.z, r8.w, l(68), t19.xxxx
          add r11.y, -r11.z, r11.y
          div r11.x, r11.x, r11.y
          movc r11.x, r12.x, l(0), r11.x
          movc r11.x, r11.w, l(1.000000), r11.x
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.yzw, r8.w, l(0), t19.xxyz
          add r10.xyz, -r4.xyzx, r10.xyzx
          dp3 r12.x, r10.xyzx, r10.xyzx
          rsq r12.x, r12.x
          mul r10.xyz, r10.xyzx, r12.xxxx
          dp3 r10.x, r7.xyzx, r10.xyzx
          mad r10.x, -r6.w, r10.x, r6.z
          log r10.x, |r10.x|
          mul r10.x, r10.x, l(1.500000)
          exp r10.x, r10.x
          mul r10.x, r10.x, l(12.566371)
          div r10.x, r6.y, r10.x
          mul r10.xyz, r10.xxxx, r11.yzwy
          mul r10.xyz, r11.xxxx, r10.xyzx
          mul r10.xyz, r10.xyzx, l(10000.000000, 10000.000000, 10000.000000, 0.000000)
          sqrt r9.w, r9.w
          div r9.w, r9.w, r10.w
          add r9.w, -r9.w, l(1.000000)
          max r9.w, r9.w, l(0.000000)
          mul r10.xyz, r9.wwww, r10.xyzx
          dp3 r9.w, r13.xyzx, r13.xyzx
          add r9.w, r9.w, l(0.010000)
          div r10.xyz, r10.xyzx, r9.wwww
          mad r8.xyz, r1.zzzz, r10.xyzx, r8.xyzx
        endif
        break
        case l(2)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyz, r8.w, l(32), t19.xyzx
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.xyz, r8.w, l(0), t19.xyzx
        dp3 r9.w, r10.xyzx, r10.xyzx
        rsq r9.w, r9.w
        mul r10.xyz, r9.wwww, r10.xyzx
        dp3 r9.w, r9.xyzx, r10.xyzx
        mad r9.w, -r6.w, r9.w, r6.z
        log r9.w, |r9.w|
        mul r9.w, r9.w, l(1.500000)
        exp r9.w, r9.w
        mul r9.w, r9.w, l(12.566371)
        div r9.w, r6.y, r9.w
        mul r10.xyz, r9.wwww, r11.xyzx
        div r10.xyz, r10.xyzx, r7.wwww
        mul r10.xyz, r1.zzzz, r10.xyzx
        mad r8.xyz, r10.xyzx, l(0.000001, 0.000001, 0.000001, 0.000000), r8.xyzx
        break
        default
        break
      endswitch
      iadd r8.w, r8.w, l(1)
    endloop
    add r4.xyz, r2.xywx, r4.xyzx
  endif
  movc r0.x, r0.w, l(13), l(14)
else
  mov r0.w, l(-1)
endif
not r0.w, r0.w
and r0.y, r0.w, r0.y
ilt r0.w, r0.x, r0.z
and r0.y, r0.w, r0.y
if_nz r0.y
  ge r0.w, l(0.000000), r3.x
  lt r1.z, r3.x, r3.y
  add r3.z, -r3.y, r3.x
  mov r3.w, l(0)
  movc r5.xy, r1.zzzz, r3.wxww, r3.zyzz
  movc r3.xy, r0.wwww, r3.xyxx, r5.xyxx
  if_z r0.w
    mul r1.z, r3.y, cb9[13].y
    if_nz cb9[12].z
      mul r2.z, r1.z, l(0.002000)
      mul r5.x, r4.z, l(-0.0666666701)
      max r5.x, r5.x, l(0.000000)
      rsq r5.x, r5.x
      div r5.x, l(1.000000, 1.000000, 1.000000, 1.000000), r5.x
      mul r5.w, r4.x, cb12[0].x
      mul r5.zw, r5.xxxw, l(0.000000, 0.000000, 16.000000, -0.500000)
      div r5.w, r5.w, r4.z
      add r5.x, r5.w, l(0.500000)
      mul r5.w, r4.y, cb12[1].y
      mul r5.w, r5.w, l(0.500000)
      div r5.w, r5.w, r4.z
      add r5.y, r5.w, l(0.500000)
      sample_indexable(texture2darray)(float,float,float,float) r5.x, r5.xyzx, t1.wxyz, s1
      mul r2.z, r2.z, r5.x
    else
      mul r2.z, r1.z, l(0.000200000009)
    endif
    lt r1.z, l(0.900000), r2.z
    movc r1.z, r1.z, l(0.900000), r2.z
    add r2.z, -r1.z, l(1.000000)
    mul r1.w, r1.w, r2.z
    mul r5.xyz, r2.zzzz, r8.xyzx
    if_nz cb9[12].y
      mov r4.w, l(1.000000)
      dp4 r6.x, cb9[8].xyzw, r4.xyzw
      dp4 r6.y, cb9[9].xyzw, r4.xyzw
      dp4 r6.z, cb9[10].xyzw, r4.xyzw
      dp4 r2.z, cb9[11].xyzw, r4.xyzw
      div r6.xyz, r6.xyzx, r2.zzzz
      mov_sat r7.xy, r6.xyxx
      eq r7.xy, r6.xyxx, r7.xyxx
      and r2.z, r7.y, r7.x
      if_nz r2.z
        mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
        frc r7.xy, r7.xyxx
        lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
        and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
        add r2.z, r7.x, r7.y
        lt r5.w, l(1.100000), r2.z
        movc r7.z, r5.w, l(0), r2.z
        add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
        mad r6.xy, r7.xyxx, l(0.000976562500, 0.000976562500, 0.000000, 0.000000), r6.xyxx
        mov_sat r7.xy, r6.xyxx
        eq r7.xy, r6.xyxx, r7.xyxx
        and r2.z, r7.y, r7.x
        if_nz r2.z
          min r2.z, r6.z, l(1.000000)
          sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t15.xxxx, s15, r2.z
        else
          mov r2.z, l(1.000000)
        endif
      else
        dp4 r6.x, cb9[4].xyzw, r4.xyzw
        dp4 r6.y, cb9[5].xyzw, r4.xyzw
        dp4 r6.z, cb9[6].xyzw, r4.xyzw
        dp4 r5.w, cb9[7].xyzw, r4.xyzw
        div r6.xyz, r6.xyzx, r5.wwww
        mov_sat r7.xy, r6.xyxx
        eq r7.xy, r6.xyxx, r7.xyxx
        and r5.w, r7.y, r7.x
        if_nz r5.w
          mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
          frc r7.xy, r7.xyxx
          lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
          and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
          add r5.w, r7.x, r7.y
          lt r6.w, l(1.100000), r5.w
          movc r7.z, r6.w, l(0), r5.w
          add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
          mad r6.xy, r7.xyxx, l(0.000244140625, 0.000244140625, 0.000000, 0.000000), r6.xyxx
          mov_sat r7.xy, r6.xyxx
          eq r7.xy, r6.xyxx, r7.xyxx
          and r5.w, r7.y, r7.x
          if_nz r5.w
            min r5.w, r6.z, l(1.000000)
            sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t14.xxxx, s14, r5.w
          else
            mov r2.z, l(1.000000)
          endif
        else
          dp4 r6.x, cb9[0].xyzw, r4.xyzw
          dp4 r6.y, cb9[1].xyzw, r4.xyzw
          dp4 r6.z, cb9[2].xyzw, r4.xyzw
          dp4 r5.w, cb9[3].xyzw, r4.xyzw
          div r6.xyz, r6.xyzx, r5.wwww
          mov_sat r7.xy, r6.xyxx
          eq r7.xy, r6.xyxx, r7.xyxx
          and r5.w, r7.y, r7.x
          if_nz r5.w
            mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
            frc r7.xy, r7.xyxx
            lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
            and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
            add r5.w, r7.x, r7.y
            lt r6.w, l(1.100000), r5.w
            movc r7.z, r6.w, l(0), r5.w
            add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
            mad r6.xy, r7.xyxx, l(0.0000610351563, 0.0000610351563, 0.000000, 0.000000), r6.xyxx
            mov_sat r7.xy, r6.xyxx
            eq r7.xy, r6.xyxx, r7.xyxx
            and r5.w, r7.y, r7.x
            if_nz r5.w
              min r5.w, r6.z, l(1.000000)
              sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t13.xxxx, s13, r5.w
            else
              mov r2.z, l(1.000000)
            endif
          else
            mov r2.z, l(1.000000)
          endif
        endif
      endif
      mul r1.z, r1.z, r2.z
    endif
    dp3 r2.z, r2.xywx, r2.xywx
    lt r5.w, l(0.000100), r2.z
    div r6.x, l(1.000000, 1.000000, 1.000000, 1.000000), r2.z
    mad r6.y, -cb9[13].x, cb9[13].x, l(1.000000)
    mad r6.z, cb9[13].x, cb9[13].x, l(1.000000)
    add r6.w, cb9[13].x, cb9[13].x
    dp3 r7.x, r4.xyzx, r4.xyzx
    rsq r7.x, r7.x
    mul r7.xyz, r4.xyzx, r7.xxxx
    mad r9.xyz, r2.xywx, l(0.500000, 0.500000, 0.500000, 0.000000), r4.xyzx
    dp3 r7.w, r9.xyzx, r9.xyzx
    rsq r8.w, r7.w
    mul r9.xyz, r8.wwww, r9.xyzx
    add r7.w, r7.w, l(0.000100)
    log r7.w, r7.w
    mul r7.w, r7.w, l(1.500000)
    exp r7.w, r7.w
    mul r7.w, r7.w, l(0.010000)
    mov r8.xyz, r5.xyzx
    mov r8.w, l(0)
    loop
      uge r9.w, r8.w, cb9[13].w
      breakc_nz r9.w
      ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r9.w, r8.w, l(12), t19.xxxx
      switch r9.w
        case l(0)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyzw, r8.w, l(16), t19.xyzw
        add r11.xyz, r4.xyzx, -r10.xyzx
        dp3 r9.w, r2.xywx, r11.xyzx
        dp3 r11.x, r11.xyzx, r11.xyzx
        mad r11.y, -r10.w, r10.w, r11.x
        mul r11.y, r2.z, r11.y
        mad r11.y, r9.w, r9.w, -r11.y
        ge r11.z, r11.y, l(0.000000)
        and r11.z, r5.w, r11.z
        if_nz r11.z
          sqrt r11.y, r11.y
          add r11.z, -r9.w, -r11.y
          mul r11.z, r6.x, r11.z
          add r9.w, -r9.w, r11.y
          mul r9.w, r6.x, r9.w
          ge r11.y, l(1.000000), r11.z
          ge r11.w, r9.w, l(0.000000)
          and r11.y, r11.w, r11.y
          if_nz r11.y
            lt r11.y, r11.z, l(0.000000)
            lt r11.w, l(1.000000), r9.w
            movc r9.w, r11.w, l(1.000000), r9.w
            movc r11.y, r11.y, l(-0.000000), -r11.z
            add r9.w, r9.w, r11.y
            mul r11.y, r9.w, l(0.500000)
            mad r11.yzw, r11.yyyy, r2.xxyw, r4.xxyz
            ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r12.xyz, r8.w, l(0), t19.xyzx
            dp3 r12.w, r11.yzwy, r11.yzwy
            rsq r12.w, r12.w
            mul r13.xyz, r11.yzwy, r12.wwww
            add r10.xyz, r10.xyzx, -r11.yzwy
            dp3 r11.y, r10.xyzx, r10.xyzx
            rsq r11.y, r11.y
            mul r10.xyz, r10.xyzx, r11.yyyy
            dp3 r10.x, r13.xyzx, r10.xyzx
            mad r10.x, -r6.w, r10.x, r6.z
            log r10.x, |r10.x|
            mul r10.x, r10.x, l(1.500000)
            exp r10.x, r10.x
            mul r10.x, r10.x, l(12.566371)
            div r10.x, r6.y, r10.x
            mul r10.xyz, r10.xxxx, r12.xyzx
            mul r10.xyz, r9.wwww, r10.xyzx
            sqrt r9.w, r11.x
            div r9.w, r9.w, r10.w
            add r9.w, -r9.w, l(1.000000)
            max r9.w, r9.w, l(0.000000)
            mul r10.xyz, r9.wwww, r10.xyzx
            mul r9.w, r11.x, l(0.010000)
            div r10.xyz, r10.xyzx, r9.wwww
            mul r10.xyz, r1.zzzz, r10.xyzx
            mad r8.xyz, r10.xyzx, l(0.100000, 0.100000, 0.100000, 0.000000), r8.xyzx
          endif
        endif
        break
        case l(1)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyzw, r8.w, l(16), t19.xyzw
        add r11.xyz, r4.xyzx, -r10.xyzx
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r12.xyz, r8.w, l(32), t19.xyzx
        dp3 r9.w, r11.xyzx, r12.xyzx
        lt r9.w, l(0.000000), r9.w
        if_nz r9.w
          dp3 r9.w, r12.xyzx, r12.xyzx
          rsq r9.w, r9.w
          mul r12.xyz, r9.wwww, r12.xyzx
          dp3 r9.w, r11.xyzx, r12.xyzx
          mul r13.xyz, r12.xyzx, r9.wwww
          dp3 r9.w, r11.xyzx, r11.xyzx
          rsq r11.w, r9.w
          mul r11.xyz, r11.wwww, r11.xyzx
          dp3 r11.x, r12.xyzx, r11.xyzx
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.yz, r8.w, l(64), t19.xxyx
          ge r11.w, r11.x, r11.y
          ge r12.x, r11.z, r11.x
          add r11.x, -r11.z, r11.x
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.z, r8.w, l(68), t19.xxxx
          add r11.y, -r11.z, r11.y
          div r11.x, r11.x, r11.y
          movc r11.x, r12.x, l(0), r11.x
          movc r11.x, r11.w, l(1.000000), r11.x
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.yzw, r8.w, l(0), t19.xxyz
          add r10.xyz, -r4.xyzx, r10.xyzx
          dp3 r12.x, r10.xyzx, r10.xyzx
          rsq r12.x, r12.x
          mul r10.xyz, r10.xyzx, r12.xxxx
          dp3 r10.x, r7.xyzx, r10.xyzx
          mad r10.x, -r6.w, r10.x, r6.z
          log r10.x, |r10.x|
          mul r10.x, r10.x, l(1.500000)
          exp r10.x, r10.x
          mul r10.x, r10.x, l(12.566371)
          div r10.x, r6.y, r10.x
          mul r10.xyz, r10.xxxx, r11.yzwy
          mul r10.xyz, r11.xxxx, r10.xyzx
          mul r10.xyz, r10.xyzx, l(10000.000000, 10000.000000, 10000.000000, 0.000000)
          sqrt r9.w, r9.w
          div r9.w, r9.w, r10.w
          add r9.w, -r9.w, l(1.000000)
          max r9.w, r9.w, l(0.000000)
          mul r10.xyz, r9.wwww, r10.xyzx
          dp3 r9.w, r13.xyzx, r13.xyzx
          add r9.w, r9.w, l(0.010000)
          div r10.xyz, r10.xyzx, r9.wwww
          mad r8.xyz, r1.zzzz, r10.xyzx, r8.xyzx
        endif
        break
        case l(2)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyz, r8.w, l(32), t19.xyzx
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.xyz, r8.w, l(0), t19.xyzx
        dp3 r9.w, r10.xyzx, r10.xyzx
        rsq r9.w, r9.w
        mul r10.xyz, r9.wwww, r10.xyzx
        dp3 r9.w, r9.xyzx, r10.xyzx
        mad r9.w, -r6.w, r9.w, r6.z
        log r9.w, |r9.w|
        mul r9.w, r9.w, l(1.500000)
        exp r9.w, r9.w
        mul r9.w, r9.w, l(12.566371)
        div r9.w, r6.y, r9.w
        mul r10.xyz, r9.wwww, r11.xyzx
        div r10.xyz, r10.xyzx, r7.wwww
        mul r10.xyz, r1.zzzz, r10.xyzx
        mad r8.xyz, r10.xyzx, l(0.000001, 0.000001, 0.000001, 0.000000), r8.xyzx
        break
        default
        break
      endswitch
      iadd r8.w, r8.w, l(1)
    endloop
    add r4.xyz, r2.xywx, r4.xyzx
  endif
  movc r0.x, r0.w, l(14), l(15)
else
  mov r0.w, l(-1)
endif
not r0.w, r0.w
and r0.y, r0.w, r0.y
ilt r0.w, r0.x, r0.z
and r0.y, r0.w, r0.y
if_nz r0.y
  ge r0.w, l(0.000000), r3.x
  lt r1.z, r3.x, r3.y
  add r3.z, -r3.y, r3.x
  mov r3.w, l(0)
  movc r5.xy, r1.zzzz, r3.wxww, r3.zyzz
  movc r3.xy, r0.wwww, r3.xyxx, r5.xyxx
  if_z r0.w
    mul r1.z, r3.y, cb9[13].y
    if_nz cb9[12].z
      mul r2.z, r1.z, l(0.002000)
      mul r5.x, r4.z, l(-0.0666666701)
      max r5.x, r5.x, l(0.000000)
      rsq r5.x, r5.x
      div r5.x, l(1.000000, 1.000000, 1.000000, 1.000000), r5.x
      mul r5.w, r4.x, cb12[0].x
      mul r5.zw, r5.xxxw, l(0.000000, 0.000000, 16.000000, -0.500000)
      div r5.w, r5.w, r4.z
      add r5.x, r5.w, l(0.500000)
      mul r5.w, r4.y, cb12[1].y
      mul r5.w, r5.w, l(0.500000)
      div r5.w, r5.w, r4.z
      add r5.y, r5.w, l(0.500000)
      sample_indexable(texture2darray)(float,float,float,float) r5.x, r5.xyzx, t1.wxyz, s1
      mul r2.z, r2.z, r5.x
    else
      mul r2.z, r1.z, l(0.000200000009)
    endif
    lt r1.z, l(0.900000), r2.z
    movc r1.z, r1.z, l(0.900000), r2.z
    add r2.z, -r1.z, l(1.000000)
    mul r1.w, r1.w, r2.z
    mul r5.xyz, r2.zzzz, r8.xyzx
    if_nz cb9[12].y
      mov r4.w, l(1.000000)
      dp4 r6.x, cb9[8].xyzw, r4.xyzw
      dp4 r6.y, cb9[9].xyzw, r4.xyzw
      dp4 r6.z, cb9[10].xyzw, r4.xyzw
      dp4 r2.z, cb9[11].xyzw, r4.xyzw
      div r6.xyz, r6.xyzx, r2.zzzz
      mov_sat r7.xy, r6.xyxx
      eq r7.xy, r6.xyxx, r7.xyxx
      and r2.z, r7.y, r7.x
      if_nz r2.z
        mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
        frc r7.xy, r7.xyxx
        lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
        and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
        add r2.z, r7.x, r7.y
        lt r5.w, l(1.100000), r2.z
        movc r7.z, r5.w, l(0), r2.z
        add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
        mad r6.xy, r7.xyxx, l(0.000976562500, 0.000976562500, 0.000000, 0.000000), r6.xyxx
        mov_sat r7.xy, r6.xyxx
        eq r7.xy, r6.xyxx, r7.xyxx
        and r2.z, r7.y, r7.x
        if_nz r2.z
          min r2.z, r6.z, l(1.000000)
          sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t15.xxxx, s15, r2.z
        else
          mov r2.z, l(1.000000)
        endif
      else
        dp4 r6.x, cb9[4].xyzw, r4.xyzw
        dp4 r6.y, cb9[5].xyzw, r4.xyzw
        dp4 r6.z, cb9[6].xyzw, r4.xyzw
        dp4 r5.w, cb9[7].xyzw, r4.xyzw
        div r6.xyz, r6.xyzx, r5.wwww
        mov_sat r7.xy, r6.xyxx
        eq r7.xy, r6.xyxx, r7.xyxx
        and r5.w, r7.y, r7.x
        if_nz r5.w
          mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
          frc r7.xy, r7.xyxx
          lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
          and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
          add r5.w, r7.x, r7.y
          lt r6.w, l(1.100000), r5.w
          movc r7.z, r6.w, l(0), r5.w
          add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
          mad r6.xy, r7.xyxx, l(0.000244140625, 0.000244140625, 0.000000, 0.000000), r6.xyxx
          mov_sat r7.xy, r6.xyxx
          eq r7.xy, r6.xyxx, r7.xyxx
          and r5.w, r7.y, r7.x
          if_nz r5.w
            min r5.w, r6.z, l(1.000000)
            sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t14.xxxx, s14, r5.w
          else
            mov r2.z, l(1.000000)
          endif
        else
          dp4 r6.x, cb9[0].xyzw, r4.xyzw
          dp4 r6.y, cb9[1].xyzw, r4.xyzw
          dp4 r6.z, cb9[2].xyzw, r4.xyzw
          dp4 r5.w, cb9[3].xyzw, r4.xyzw
          div r6.xyz, r6.xyzx, r5.wwww
          mov_sat r7.xy, r6.xyxx
          eq r7.xy, r6.xyxx, r7.xyxx
          and r5.w, r7.y, r7.x
          if_nz r5.w
            mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
            frc r7.xy, r7.xyxx
            lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
            and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
            add r5.w, r7.x, r7.y
            lt r6.w, l(1.100000), r5.w
            movc r7.z, r6.w, l(0), r5.w
            add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
            mad r6.xy, r7.xyxx, l(0.0000610351563, 0.0000610351563, 0.000000, 0.000000), r6.xyxx
            mov_sat r7.xy, r6.xyxx
            eq r7.xy, r6.xyxx, r7.xyxx
            and r5.w, r7.y, r7.x
            if_nz r5.w
              min r5.w, r6.z, l(1.000000)
              sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t13.xxxx, s13, r5.w
            else
              mov r2.z, l(1.000000)
            endif
          else
            mov r2.z, l(1.000000)
          endif
        endif
      endif
      mul r1.z, r1.z, r2.z
    endif
    dp3 r2.z, r2.xywx, r2.xywx
    lt r5.w, l(0.000100), r2.z
    div r6.x, l(1.000000, 1.000000, 1.000000, 1.000000), r2.z
    mad r6.y, -cb9[13].x, cb9[13].x, l(1.000000)
    mad r6.z, cb9[13].x, cb9[13].x, l(1.000000)
    add r6.w, cb9[13].x, cb9[13].x
    dp3 r7.x, r4.xyzx, r4.xyzx
    rsq r7.x, r7.x
    mul r7.xyz, r4.xyzx, r7.xxxx
    mad r9.xyz, r2.xywx, l(0.500000, 0.500000, 0.500000, 0.000000), r4.xyzx
    dp3 r7.w, r9.xyzx, r9.xyzx
    rsq r8.w, r7.w
    mul r9.xyz, r8.wwww, r9.xyzx
    add r7.w, r7.w, l(0.000100)
    log r7.w, r7.w
    mul r7.w, r7.w, l(1.500000)
    exp r7.w, r7.w
    mul r7.w, r7.w, l(0.010000)
    mov r8.xyz, r5.xyzx
    mov r8.w, l(0)
    loop
      uge r9.w, r8.w, cb9[13].w
      breakc_nz r9.w
      ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r9.w, r8.w, l(12), t19.xxxx
      switch r9.w
        case l(0)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyzw, r8.w, l(16), t19.xyzw
        add r11.xyz, r4.xyzx, -r10.xyzx
        dp3 r9.w, r2.xywx, r11.xyzx
        dp3 r11.x, r11.xyzx, r11.xyzx
        mad r11.y, -r10.w, r10.w, r11.x
        mul r11.y, r2.z, r11.y
        mad r11.y, r9.w, r9.w, -r11.y
        ge r11.z, r11.y, l(0.000000)
        and r11.z, r5.w, r11.z
        if_nz r11.z
          sqrt r11.y, r11.y
          add r11.z, -r9.w, -r11.y
          mul r11.z, r6.x, r11.z
          add r9.w, -r9.w, r11.y
          mul r9.w, r6.x, r9.w
          ge r11.y, l(1.000000), r11.z
          ge r11.w, r9.w, l(0.000000)
          and r11.y, r11.w, r11.y
          if_nz r11.y
            lt r11.y, r11.z, l(0.000000)
            lt r11.w, l(1.000000), r9.w
            movc r9.w, r11.w, l(1.000000), r9.w
            movc r11.y, r11.y, l(-0.000000), -r11.z
            add r9.w, r9.w, r11.y
            mul r11.y, r9.w, l(0.500000)
            mad r11.yzw, r11.yyyy, r2.xxyw, r4.xxyz
            ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r12.xyz, r8.w, l(0), t19.xyzx
            dp3 r12.w, r11.yzwy, r11.yzwy
            rsq r12.w, r12.w
            mul r13.xyz, r11.yzwy, r12.wwww
            add r10.xyz, r10.xyzx, -r11.yzwy
            dp3 r11.y, r10.xyzx, r10.xyzx
            rsq r11.y, r11.y
            mul r10.xyz, r10.xyzx, r11.yyyy
            dp3 r10.x, r13.xyzx, r10.xyzx
            mad r10.x, -r6.w, r10.x, r6.z
            log r10.x, |r10.x|
            mul r10.x, r10.x, l(1.500000)
            exp r10.x, r10.x
            mul r10.x, r10.x, l(12.566371)
            div r10.x, r6.y, r10.x
            mul r10.xyz, r10.xxxx, r12.xyzx
            mul r10.xyz, r9.wwww, r10.xyzx
            sqrt r9.w, r11.x
            div r9.w, r9.w, r10.w
            add r9.w, -r9.w, l(1.000000)
            max r9.w, r9.w, l(0.000000)
            mul r10.xyz, r9.wwww, r10.xyzx
            mul r9.w, r11.x, l(0.010000)
            div r10.xyz, r10.xyzx, r9.wwww
            mul r10.xyz, r1.zzzz, r10.xyzx
            mad r8.xyz, r10.xyzx, l(0.100000, 0.100000, 0.100000, 0.000000), r8.xyzx
          endif
        endif
        break
        case l(1)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyzw, r8.w, l(16), t19.xyzw
        add r11.xyz, r4.xyzx, -r10.xyzx
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r12.xyz, r8.w, l(32), t19.xyzx
        dp3 r9.w, r11.xyzx, r12.xyzx
        lt r9.w, l(0.000000), r9.w
        if_nz r9.w
          dp3 r9.w, r12.xyzx, r12.xyzx
          rsq r9.w, r9.w
          mul r12.xyz, r9.wwww, r12.xyzx
          dp3 r9.w, r11.xyzx, r12.xyzx
          mul r13.xyz, r12.xyzx, r9.wwww
          dp3 r9.w, r11.xyzx, r11.xyzx
          rsq r11.w, r9.w
          mul r11.xyz, r11.wwww, r11.xyzx
          dp3 r11.x, r12.xyzx, r11.xyzx
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.yz, r8.w, l(64), t19.xxyx
          ge r11.w, r11.x, r11.y
          ge r12.x, r11.z, r11.x
          add r11.x, -r11.z, r11.x
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.z, r8.w, l(68), t19.xxxx
          add r11.y, -r11.z, r11.y
          div r11.x, r11.x, r11.y
          movc r11.x, r12.x, l(0), r11.x
          movc r11.x, r11.w, l(1.000000), r11.x
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.yzw, r8.w, l(0), t19.xxyz
          add r10.xyz, -r4.xyzx, r10.xyzx
          dp3 r12.x, r10.xyzx, r10.xyzx
          rsq r12.x, r12.x
          mul r10.xyz, r10.xyzx, r12.xxxx
          dp3 r10.x, r7.xyzx, r10.xyzx
          mad r10.x, -r6.w, r10.x, r6.z
          log r10.x, |r10.x|
          mul r10.x, r10.x, l(1.500000)
          exp r10.x, r10.x
          mul r10.x, r10.x, l(12.566371)
          div r10.x, r6.y, r10.x
          mul r10.xyz, r10.xxxx, r11.yzwy
          mul r10.xyz, r11.xxxx, r10.xyzx
          mul r10.xyz, r10.xyzx, l(10000.000000, 10000.000000, 10000.000000, 0.000000)
          sqrt r9.w, r9.w
          div r9.w, r9.w, r10.w
          add r9.w, -r9.w, l(1.000000)
          max r9.w, r9.w, l(0.000000)
          mul r10.xyz, r9.wwww, r10.xyzx
          dp3 r9.w, r13.xyzx, r13.xyzx
          add r9.w, r9.w, l(0.010000)
          div r10.xyz, r10.xyzx, r9.wwww
          mad r8.xyz, r1.zzzz, r10.xyzx, r8.xyzx
        endif
        break
        case l(2)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyz, r8.w, l(32), t19.xyzx
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.xyz, r8.w, l(0), t19.xyzx
        dp3 r9.w, r10.xyzx, r10.xyzx
        rsq r9.w, r9.w
        mul r10.xyz, r9.wwww, r10.xyzx
        dp3 r9.w, r9.xyzx, r10.xyzx
        mad r9.w, -r6.w, r9.w, r6.z
        log r9.w, |r9.w|
        mul r9.w, r9.w, l(1.500000)
        exp r9.w, r9.w
        mul r9.w, r9.w, l(12.566371)
        div r9.w, r6.y, r9.w
        mul r10.xyz, r9.wwww, r11.xyzx
        div r10.xyz, r10.xyzx, r7.wwww
        mul r10.xyz, r1.zzzz, r10.xyzx
        mad r8.xyz, r10.xyzx, l(0.000001, 0.000001, 0.000001, 0.000000), r8.xyzx
        break
        default
        break
      endswitch
      iadd r8.w, r8.w, l(1)
    endloop
    add r4.xyz, r2.xywx, r4.xyzx
  endif
  movc r0.x, r0.w, l(15), l(16)
else
  mov r0.w, l(-1)
endif
not r0.w, r0.w
and r0.y, r0.w, r0.y
ilt r0.w, r0.x, r0.z
and r0.y, r0.w, r0.y
if_nz r0.y
  ge r0.w, l(0.000000), r3.x
  lt r1.z, r3.x, r3.y
  add r3.z, -r3.y, r3.x
  mov r3.w, l(0)
  movc r5.xy, r1.zzzz, r3.wxww, r3.zyzz
  movc r3.xy, r0.wwww, r3.xyxx, r5.xyxx
  if_z r0.w
    mul r1.z, r3.y, cb9[13].y
    if_nz cb9[12].z
      mul r2.z, r1.z, l(0.002000)
      mul r5.x, r4.z, l(-0.0666666701)
      max r5.x, r5.x, l(0.000000)
      rsq r5.x, r5.x
      div r5.x, l(1.000000, 1.000000, 1.000000, 1.000000), r5.x
      mul r5.w, r4.x, cb12[0].x
      mul r5.zw, r5.xxxw, l(0.000000, 0.000000, 16.000000, -0.500000)
      div r5.w, r5.w, r4.z
      add r5.x, r5.w, l(0.500000)
      mul r5.w, r4.y, cb12[1].y
      mul r5.w, r5.w, l(0.500000)
      div r5.w, r5.w, r4.z
      add r5.y, r5.w, l(0.500000)
      sample_indexable(texture2darray)(float,float,float,float) r5.x, r5.xyzx, t1.wxyz, s1
      mul r2.z, r2.z, r5.x
    else
      mul r2.z, r1.z, l(0.000200000009)
    endif
    lt r1.z, l(0.900000), r2.z
    movc r1.z, r1.z, l(0.900000), r2.z
    add r2.z, -r1.z, l(1.000000)
    mul r1.w, r1.w, r2.z
    mul r5.xyz, r2.zzzz, r8.xyzx
    if_nz cb9[12].y
      mov r4.w, l(1.000000)
      dp4 r6.x, cb9[8].xyzw, r4.xyzw
      dp4 r6.y, cb9[9].xyzw, r4.xyzw
      dp4 r6.z, cb9[10].xyzw, r4.xyzw
      dp4 r2.z, cb9[11].xyzw, r4.xyzw
      div r6.xyz, r6.xyzx, r2.zzzz
      mov_sat r7.xy, r6.xyxx
      eq r7.xy, r6.xyxx, r7.xyxx
      and r2.z, r7.y, r7.x
      if_nz r2.z
        mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
        frc r7.xy, r7.xyxx
        lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
        and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
        add r2.z, r7.x, r7.y
        lt r5.w, l(1.100000), r2.z
        movc r7.z, r5.w, l(0), r2.z
        add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
        mad r6.xy, r7.xyxx, l(0.000976562500, 0.000976562500, 0.000000, 0.000000), r6.xyxx
        mov_sat r7.xy, r6.xyxx
        eq r7.xy, r6.xyxx, r7.xyxx
        and r2.z, r7.y, r7.x
        if_nz r2.z
          min r2.z, r6.z, l(1.000000)
          sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t15.xxxx, s15, r2.z
        else
          mov r2.z, l(1.000000)
        endif
      else
        dp4 r6.x, cb9[4].xyzw, r4.xyzw
        dp4 r6.y, cb9[5].xyzw, r4.xyzw
        dp4 r6.z, cb9[6].xyzw, r4.xyzw
        dp4 r5.w, cb9[7].xyzw, r4.xyzw
        div r6.xyz, r6.xyzx, r5.wwww
        mov_sat r7.xy, r6.xyxx
        eq r7.xy, r6.xyxx, r7.xyxx
        and r5.w, r7.y, r7.x
        if_nz r5.w
          mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
          frc r7.xy, r7.xyxx
          lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
          and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
          add r5.w, r7.x, r7.y
          lt r6.w, l(1.100000), r5.w
          movc r7.z, r6.w, l(0), r5.w
          add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
          mad r6.xy, r7.xyxx, l(0.000244140625, 0.000244140625, 0.000000, 0.000000), r6.xyxx
          mov_sat r7.xy, r6.xyxx
          eq r7.xy, r6.xyxx, r7.xyxx
          and r5.w, r7.y, r7.x
          if_nz r5.w
            min r5.w, r6.z, l(1.000000)
            sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t14.xxxx, s14, r5.w
          else
            mov r2.z, l(1.000000)
          endif
        else
          dp4 r6.x, cb9[0].xyzw, r4.xyzw
          dp4 r6.y, cb9[1].xyzw, r4.xyzw
          dp4 r6.z, cb9[2].xyzw, r4.xyzw
          dp4 r5.w, cb9[3].xyzw, r4.xyzw
          div r6.xyz, r6.xyzx, r5.wwww
          mov_sat r7.xy, r6.xyxx
          eq r7.xy, r6.xyxx, r7.xyxx
          and r5.w, r7.y, r7.x
          if_nz r5.w
            mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
            frc r7.xy, r7.xyxx
            lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
            and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
            add r5.w, r7.x, r7.y
            lt r6.w, l(1.100000), r5.w
            movc r7.z, r6.w, l(0), r5.w
            add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
            mad r6.xy, r7.xyxx, l(0.0000610351563, 0.0000610351563, 0.000000, 0.000000), r6.xyxx
            mov_sat r7.xy, r6.xyxx
            eq r7.xy, r6.xyxx, r7.xyxx
            and r5.w, r7.y, r7.x
            if_nz r5.w
              min r5.w, r6.z, l(1.000000)
              sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t13.xxxx, s13, r5.w
            else
              mov r2.z, l(1.000000)
            endif
          else
            mov r2.z, l(1.000000)
          endif
        endif
      endif
      mul r1.z, r1.z, r2.z
    endif
    dp3 r2.z, r2.xywx, r2.xywx
    lt r5.w, l(0.000100), r2.z
    div r6.x, l(1.000000, 1.000000, 1.000000, 1.000000), r2.z
    mad r6.y, -cb9[13].x, cb9[13].x, l(1.000000)
    mad r6.z, cb9[13].x, cb9[13].x, l(1.000000)
    add r6.w, cb9[13].x, cb9[13].x
    dp3 r7.x, r4.xyzx, r4.xyzx
    rsq r7.x, r7.x
    mul r7.xyz, r4.xyzx, r7.xxxx
    mad r9.xyz, r2.xywx, l(0.500000, 0.500000, 0.500000, 0.000000), r4.xyzx
    dp3 r7.w, r9.xyzx, r9.xyzx
    rsq r8.w, r7.w
    mul r9.xyz, r8.wwww, r9.xyzx
    add r7.w, r7.w, l(0.000100)
    log r7.w, r7.w
    mul r7.w, r7.w, l(1.500000)
    exp r7.w, r7.w
    mul r7.w, r7.w, l(0.010000)
    mov r8.xyz, r5.xyzx
    mov r8.w, l(0)
    loop
      uge r9.w, r8.w, cb9[13].w
      breakc_nz r9.w
      ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r9.w, r8.w, l(12), t19.xxxx
      switch r9.w
        case l(0)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyzw, r8.w, l(16), t19.xyzw
        add r11.xyz, r4.xyzx, -r10.xyzx
        dp3 r9.w, r2.xywx, r11.xyzx
        dp3 r11.x, r11.xyzx, r11.xyzx
        mad r11.y, -r10.w, r10.w, r11.x
        mul r11.y, r2.z, r11.y
        mad r11.y, r9.w, r9.w, -r11.y
        ge r11.z, r11.y, l(0.000000)
        and r11.z, r5.w, r11.z
        if_nz r11.z
          sqrt r11.y, r11.y
          add r11.z, -r9.w, -r11.y
          mul r11.z, r6.x, r11.z
          add r9.w, -r9.w, r11.y
          mul r9.w, r6.x, r9.w
          ge r11.y, l(1.000000), r11.z
          ge r11.w, r9.w, l(0.000000)
          and r11.y, r11.w, r11.y
          if_nz r11.y
            lt r11.y, r11.z, l(0.000000)
            lt r11.w, l(1.000000), r9.w
            movc r9.w, r11.w, l(1.000000), r9.w
            movc r11.y, r11.y, l(-0.000000), -r11.z
            add r9.w, r9.w, r11.y
            mul r11.y, r9.w, l(0.500000)
            mad r11.yzw, r11.yyyy, r2.xxyw, r4.xxyz
            ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r12.xyz, r8.w, l(0), t19.xyzx
            dp3 r12.w, r11.yzwy, r11.yzwy
            rsq r12.w, r12.w
            mul r13.xyz, r11.yzwy, r12.wwww
            add r10.xyz, r10.xyzx, -r11.yzwy
            dp3 r11.y, r10.xyzx, r10.xyzx
            rsq r11.y, r11.y
            mul r10.xyz, r10.xyzx, r11.yyyy
            dp3 r10.x, r13.xyzx, r10.xyzx
            mad r10.x, -r6.w, r10.x, r6.z
            log r10.x, |r10.x|
            mul r10.x, r10.x, l(1.500000)
            exp r10.x, r10.x
            mul r10.x, r10.x, l(12.566371)
            div r10.x, r6.y, r10.x
            mul r10.xyz, r10.xxxx, r12.xyzx
            mul r10.xyz, r9.wwww, r10.xyzx
            sqrt r9.w, r11.x
            div r9.w, r9.w, r10.w
            add r9.w, -r9.w, l(1.000000)
            max r9.w, r9.w, l(0.000000)
            mul r10.xyz, r9.wwww, r10.xyzx
            mul r9.w, r11.x, l(0.010000)
            div r10.xyz, r10.xyzx, r9.wwww
            mul r10.xyz, r1.zzzz, r10.xyzx
            mad r8.xyz, r10.xyzx, l(0.100000, 0.100000, 0.100000, 0.000000), r8.xyzx
          endif
        endif
        break
        case l(1)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyzw, r8.w, l(16), t19.xyzw
        add r11.xyz, r4.xyzx, -r10.xyzx
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r12.xyz, r8.w, l(32), t19.xyzx
        dp3 r9.w, r11.xyzx, r12.xyzx
        lt r9.w, l(0.000000), r9.w
        if_nz r9.w
          dp3 r9.w, r12.xyzx, r12.xyzx
          rsq r9.w, r9.w
          mul r12.xyz, r9.wwww, r12.xyzx
          dp3 r9.w, r11.xyzx, r12.xyzx
          mul r13.xyz, r12.xyzx, r9.wwww
          dp3 r9.w, r11.xyzx, r11.xyzx
          rsq r11.w, r9.w
          mul r11.xyz, r11.wwww, r11.xyzx
          dp3 r11.x, r12.xyzx, r11.xyzx
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.yz, r8.w, l(64), t19.xxyx
          ge r11.w, r11.x, r11.y
          ge r12.x, r11.z, r11.x
          add r11.x, -r11.z, r11.x
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.z, r8.w, l(68), t19.xxxx
          add r11.y, -r11.z, r11.y
          div r11.x, r11.x, r11.y
          movc r11.x, r12.x, l(0), r11.x
          movc r11.x, r11.w, l(1.000000), r11.x
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.yzw, r8.w, l(0), t19.xxyz
          add r10.xyz, -r4.xyzx, r10.xyzx
          dp3 r12.x, r10.xyzx, r10.xyzx
          rsq r12.x, r12.x
          mul r10.xyz, r10.xyzx, r12.xxxx
          dp3 r10.x, r7.xyzx, r10.xyzx
          mad r10.x, -r6.w, r10.x, r6.z
          log r10.x, |r10.x|
          mul r10.x, r10.x, l(1.500000)
          exp r10.x, r10.x
          mul r10.x, r10.x, l(12.566371)
          div r10.x, r6.y, r10.x
          mul r10.xyz, r10.xxxx, r11.yzwy
          mul r10.xyz, r11.xxxx, r10.xyzx
          mul r10.xyz, r10.xyzx, l(10000.000000, 10000.000000, 10000.000000, 0.000000)
          sqrt r9.w, r9.w
          div r9.w, r9.w, r10.w
          add r9.w, -r9.w, l(1.000000)
          max r9.w, r9.w, l(0.000000)
          mul r10.xyz, r9.wwww, r10.xyzx
          dp3 r9.w, r13.xyzx, r13.xyzx
          add r9.w, r9.w, l(0.010000)
          div r10.xyz, r10.xyzx, r9.wwww
          mad r8.xyz, r1.zzzz, r10.xyzx, r8.xyzx
        endif
        break
        case l(2)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyz, r8.w, l(32), t19.xyzx
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.xyz, r8.w, l(0), t19.xyzx
        dp3 r9.w, r10.xyzx, r10.xyzx
        rsq r9.w, r9.w
        mul r10.xyz, r9.wwww, r10.xyzx
        dp3 r9.w, r9.xyzx, r10.xyzx
        mad r9.w, -r6.w, r9.w, r6.z
        log r9.w, |r9.w|
        mul r9.w, r9.w, l(1.500000)
        exp r9.w, r9.w
        mul r9.w, r9.w, l(12.566371)
        div r9.w, r6.y, r9.w
        mul r10.xyz, r9.wwww, r11.xyzx
        div r10.xyz, r10.xyzx, r7.wwww
        mul r10.xyz, r1.zzzz, r10.xyzx
        mad r8.xyz, r10.xyzx, l(0.000001, 0.000001, 0.000001, 0.000000), r8.xyzx
        break
        default
        break
      endswitch
      iadd r8.w, r8.w, l(1)
    endloop
    add r4.xyz, r2.xywx, r4.xyzx
  endif
  movc r0.x, r0.w, l(16), l(17)
else
  mov r0.w, l(-1)
endif
not r0.w, r0.w
and r0.y, r0.w, r0.y
ilt r0.w, r0.x, r0.z
and r0.y, r0.w, r0.y
if_nz r0.y
  ge r0.w, l(0.000000), r3.x
  lt r1.z, r3.x, r3.y
  add r3.z, -r3.y, r3.x
  mov r3.w, l(0)
  movc r5.xy, r1.zzzz, r3.wxww, r3.zyzz
  movc r3.xy, r0.wwww, r3.xyxx, r5.xyxx
  if_z r0.w
    mul r1.z, r3.y, cb9[13].y
    if_nz cb9[12].z
      mul r2.z, r1.z, l(0.002000)
      mul r5.x, r4.z, l(-0.0666666701)
      max r5.x, r5.x, l(0.000000)
      rsq r5.x, r5.x
      div r5.x, l(1.000000, 1.000000, 1.000000, 1.000000), r5.x
      mul r5.w, r4.x, cb12[0].x
      mul r5.zw, r5.xxxw, l(0.000000, 0.000000, 16.000000, -0.500000)
      div r5.w, r5.w, r4.z
      add r5.x, r5.w, l(0.500000)
      mul r5.w, r4.y, cb12[1].y
      mul r5.w, r5.w, l(0.500000)
      div r5.w, r5.w, r4.z
      add r5.y, r5.w, l(0.500000)
      sample_indexable(texture2darray)(float,float,float,float) r5.x, r5.xyzx, t1.wxyz, s1
      mul r2.z, r2.z, r5.x
    else
      mul r2.z, r1.z, l(0.000200000009)
    endif
    lt r1.z, l(0.900000), r2.z
    movc r1.z, r1.z, l(0.900000), r2.z
    add r2.z, -r1.z, l(1.000000)
    mul r1.w, r1.w, r2.z
    mul r5.xyz, r2.zzzz, r8.xyzx
    if_nz cb9[12].y
      mov r4.w, l(1.000000)
      dp4 r6.x, cb9[8].xyzw, r4.xyzw
      dp4 r6.y, cb9[9].xyzw, r4.xyzw
      dp4 r6.z, cb9[10].xyzw, r4.xyzw
      dp4 r2.z, cb9[11].xyzw, r4.xyzw
      div r6.xyz, r6.xyzx, r2.zzzz
      mov_sat r7.xy, r6.xyxx
      eq r7.xy, r6.xyxx, r7.xyxx
      and r2.z, r7.y, r7.x
      if_nz r2.z
        mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
        frc r7.xy, r7.xyxx
        lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
        and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
        add r2.z, r7.x, r7.y
        lt r5.w, l(1.100000), r2.z
        movc r7.z, r5.w, l(0), r2.z
        add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
        mad r6.xy, r7.xyxx, l(0.000976562500, 0.000976562500, 0.000000, 0.000000), r6.xyxx
        mov_sat r7.xy, r6.xyxx
        eq r7.xy, r6.xyxx, r7.xyxx
        and r2.z, r7.y, r7.x
        if_nz r2.z
          min r2.z, r6.z, l(1.000000)
          sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t15.xxxx, s15, r2.z
        else
          mov r2.z, l(1.000000)
        endif
      else
        dp4 r6.x, cb9[4].xyzw, r4.xyzw
        dp4 r6.y, cb9[5].xyzw, r4.xyzw
        dp4 r6.z, cb9[6].xyzw, r4.xyzw
        dp4 r5.w, cb9[7].xyzw, r4.xyzw
        div r6.xyz, r6.xyzx, r5.wwww
        mov_sat r7.xy, r6.xyxx
        eq r7.xy, r6.xyxx, r7.xyxx
        and r5.w, r7.y, r7.x
        if_nz r5.w
          mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
          frc r7.xy, r7.xyxx
          lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
          and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
          add r5.w, r7.x, r7.y
          lt r6.w, l(1.100000), r5.w
          movc r7.z, r6.w, l(0), r5.w
          add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
          mad r6.xy, r7.xyxx, l(0.000244140625, 0.000244140625, 0.000000, 0.000000), r6.xyxx
          mov_sat r7.xy, r6.xyxx
          eq r7.xy, r6.xyxx, r7.xyxx
          and r5.w, r7.y, r7.x
          if_nz r5.w
            min r5.w, r6.z, l(1.000000)
            sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t14.xxxx, s14, r5.w
          else
            mov r2.z, l(1.000000)
          endif
        else
          dp4 r6.x, cb9[0].xyzw, r4.xyzw
          dp4 r6.y, cb9[1].xyzw, r4.xyzw
          dp4 r6.z, cb9[2].xyzw, r4.xyzw
          dp4 r5.w, cb9[3].xyzw, r4.xyzw
          div r6.xyz, r6.xyzx, r5.wwww
          mov_sat r7.xy, r6.xyxx
          eq r7.xy, r6.xyxx, r7.xyxx
          and r5.w, r7.y, r7.x
          if_nz r5.w
            mul r7.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
            frc r7.xy, r7.xyxx
            lt r7.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r7.xyxx
            and r7.xy, r7.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
            add r5.w, r7.x, r7.y
            lt r6.w, l(1.100000), r5.w
            movc r7.z, r6.w, l(0), r5.w
            add r7.xy, r7.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
            mad r6.xy, r7.xyxx, l(0.0000610351563, 0.0000610351563, 0.000000, 0.000000), r6.xyxx
            mov_sat r7.xy, r6.xyxx
            eq r7.xy, r6.xyxx, r7.xyxx
            and r5.w, r7.y, r7.x
            if_nz r5.w
              min r5.w, r6.z, l(1.000000)
              sample_c_indexable(texture2d)(float,float,float,float) r2.z, r6.xyxx, t13.xxxx, s13, r5.w
            else
              mov r2.z, l(1.000000)
            endif
          else
            mov r2.z, l(1.000000)
          endif
        endif
      endif
      mul r1.z, r1.z, r2.z
    endif
    dp3 r2.z, r2.xywx, r2.xywx
    lt r5.w, l(0.000100), r2.z
    div r6.x, l(1.000000, 1.000000, 1.000000, 1.000000), r2.z
    mad r6.y, -cb9[13].x, cb9[13].x, l(1.000000)
    mad r6.z, cb9[13].x, cb9[13].x, l(1.000000)
    add r6.w, cb9[13].x, cb9[13].x
    dp3 r7.x, r4.xyzx, r4.xyzx
    rsq r7.x, r7.x
    mul r7.xyz, r4.xyzx, r7.xxxx
    mad r9.xyz, r2.xywx, l(0.500000, 0.500000, 0.500000, 0.000000), r4.xyzx
    dp3 r7.w, r9.xyzx, r9.xyzx
    rsq r8.w, r7.w
    mul r9.xyz, r8.wwww, r9.xyzx
    add r7.w, r7.w, l(0.000100)
    log r7.w, r7.w
    mul r7.w, r7.w, l(1.500000)
    exp r7.w, r7.w
    mul r7.w, r7.w, l(0.010000)
    mov r8.xyz, r5.xyzx
    mov r8.w, l(0)
    loop
      uge r9.w, r8.w, cb9[13].w
      breakc_nz r9.w
      ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r9.w, r8.w, l(12), t19.xxxx
      switch r9.w
        case l(0)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyzw, r8.w, l(16), t19.xyzw
        add r11.xyz, r4.xyzx, -r10.xyzx
        dp3 r9.w, r2.xywx, r11.xyzx
        dp3 r11.x, r11.xyzx, r11.xyzx
        mad r11.y, -r10.w, r10.w, r11.x
        mul r11.y, r2.z, r11.y
        mad r11.y, r9.w, r9.w, -r11.y
        ge r11.z, r11.y, l(0.000000)
        and r11.z, r5.w, r11.z
        if_nz r11.z
          sqrt r11.y, r11.y
          add r11.z, -r9.w, -r11.y
          mul r11.z, r6.x, r11.z
          add r9.w, -r9.w, r11.y
          mul r9.w, r6.x, r9.w
          ge r11.y, l(1.000000), r11.z
          ge r11.w, r9.w, l(0.000000)
          and r11.y, r11.w, r11.y
          if_nz r11.y
            lt r11.y, r11.z, l(0.000000)
            lt r11.w, l(1.000000), r9.w
            movc r9.w, r11.w, l(1.000000), r9.w
            movc r11.y, r11.y, l(-0.000000), -r11.z
            add r9.w, r9.w, r11.y
            mul r11.y, r9.w, l(0.500000)
            mad r11.yzw, r11.yyyy, r2.xxyw, r4.xxyz
            ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r12.xyz, r8.w, l(0), t19.xyzx
            dp3 r12.w, r11.yzwy, r11.yzwy
            rsq r12.w, r12.w
            mul r13.xyz, r11.yzwy, r12.wwww
            add r10.xyz, r10.xyzx, -r11.yzwy
            dp3 r11.y, r10.xyzx, r10.xyzx
            rsq r11.y, r11.y
            mul r10.xyz, r10.xyzx, r11.yyyy
            dp3 r10.x, r13.xyzx, r10.xyzx
            mad r10.x, -r6.w, r10.x, r6.z
            log r10.x, |r10.x|
            mul r10.x, r10.x, l(1.500000)
            exp r10.x, r10.x
            mul r10.x, r10.x, l(12.566371)
            div r10.x, r6.y, r10.x
            mul r10.xyz, r10.xxxx, r12.xyzx
            mul r10.xyz, r9.wwww, r10.xyzx
            sqrt r9.w, r11.x
            div r9.w, r9.w, r10.w
            add r9.w, -r9.w, l(1.000000)
            max r9.w, r9.w, l(0.000000)
            mul r10.xyz, r9.wwww, r10.xyzx
            mul r9.w, r11.x, l(0.010000)
            div r10.xyz, r10.xyzx, r9.wwww
            mul r10.xyz, r1.zzzz, r10.xyzx
            mad r8.xyz, r10.xyzx, l(0.100000, 0.100000, 0.100000, 0.000000), r8.xyzx
          endif
        endif
        break
        case l(1)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyzw, r8.w, l(16), t19.xyzw
        add r11.xyz, r4.xyzx, -r10.xyzx
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r12.xyz, r8.w, l(32), t19.xyzx
        dp3 r9.w, r11.xyzx, r12.xyzx
        lt r9.w, l(0.000000), r9.w
        if_nz r9.w
          dp3 r9.w, r12.xyzx, r12.xyzx
          rsq r9.w, r9.w
          mul r12.xyz, r9.wwww, r12.xyzx
          dp3 r9.w, r11.xyzx, r12.xyzx
          mul r13.xyz, r12.xyzx, r9.wwww
          dp3 r9.w, r11.xyzx, r11.xyzx
          rsq r11.w, r9.w
          mul r11.xyz, r11.wwww, r11.xyzx
          dp3 r11.x, r12.xyzx, r11.xyzx
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.yz, r8.w, l(64), t19.xxyx
          ge r11.w, r11.x, r11.y
          ge r12.x, r11.z, r11.x
          add r11.x, -r11.z, r11.x
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.z, r8.w, l(68), t19.xxxx
          add r11.y, -r11.z, r11.y
          div r11.x, r11.x, r11.y
          movc r11.x, r12.x, l(0), r11.x
          movc r11.x, r11.w, l(1.000000), r11.x
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.yzw, r8.w, l(0), t19.xxyz
          add r10.xyz, -r4.xyzx, r10.xyzx
          dp3 r12.x, r10.xyzx, r10.xyzx
          rsq r12.x, r12.x
          mul r10.xyz, r10.xyzx, r12.xxxx
          dp3 r10.x, r7.xyzx, r10.xyzx
          mad r10.x, -r6.w, r10.x, r6.z
          log r10.x, |r10.x|
          mul r10.x, r10.x, l(1.500000)
          exp r10.x, r10.x
          mul r10.x, r10.x, l(12.566371)
          div r10.x, r6.y, r10.x
          mul r10.xyz, r10.xxxx, r11.yzwy
          mul r10.xyz, r11.xxxx, r10.xyzx
          mul r10.xyz, r10.xyzx, l(10000.000000, 10000.000000, 10000.000000, 0.000000)
          sqrt r9.w, r9.w
          div r9.w, r9.w, r10.w
          add r9.w, -r9.w, l(1.000000)
          max r9.w, r9.w, l(0.000000)
          mul r10.xyz, r9.wwww, r10.xyzx
          dp3 r9.w, r13.xyzx, r13.xyzx
          add r9.w, r9.w, l(0.010000)
          div r10.xyz, r10.xyzx, r9.wwww
          mad r8.xyz, r1.zzzz, r10.xyzx, r8.xyzx
        endif
        break
        case l(2)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyz, r8.w, l(32), t19.xyzx
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.xyz, r8.w, l(0), t19.xyzx
        dp3 r9.w, r10.xyzx, r10.xyzx
        rsq r9.w, r9.w
        mul r10.xyz, r9.wwww, r10.xyzx
        dp3 r9.w, r9.xyzx, r10.xyzx
        mad r9.w, -r6.w, r9.w, r6.z
        log r9.w, |r9.w|
        mul r9.w, r9.w, l(1.500000)
        exp r9.w, r9.w
        mul r9.w, r9.w, l(12.566371)
        div r9.w, r6.y, r9.w
        mul r10.xyz, r9.wwww, r11.xyzx
        div r10.xyz, r10.xyzx, r7.wwww
        mul r10.xyz, r1.zzzz, r10.xyzx
        mad r8.xyz, r10.xyzx, l(0.000001, 0.000001, 0.000001, 0.000000), r8.xyzx
        break
        default
        break
      endswitch
      iadd r8.w, r8.w, l(1)
    endloop
    add r4.xyz, r2.xywx, r4.xyzx
  endif
  movc r0.x, r0.w, l(17), l(18)
else
  mov r0.w, l(-1)
endif
not r0.w, r0.w
and r0.y, r0.w, r0.y
ilt r0.w, r0.x, r0.z
and r0.y, r0.w, r0.y
if_nz r0.y
  ge r0.w, l(0.000000), r3.x
  lt r1.z, r3.x, r3.y
  add r3.z, -r3.y, r3.x
  mov r3.w, l(0)
  movc r3.zw, r1.zzzz, r3.wwwx, r3.zzzy
  movc r3.xy, r0.wwww, r3.xyxx, r3.zwzz
  if_z r0.w
    mul r1.z, r3.y, cb9[13].y
    if_nz cb9[12].z
      mul r2.z, r1.z, l(0.002000)
      mul r3.z, r4.z, l(-0.0666666701)
      max r3.z, r3.z, l(0.000000)
      rsq r3.z, r3.z
      div r3.z, l(1.000000, 1.000000, 1.000000, 1.000000), r3.z
      mul r5.z, r3.z, l(16.000000)
      mul r3.z, r4.x, cb12[0].x
      mul r3.z, r3.z, l(-0.500000)
      div r3.z, r3.z, r4.z
      add r5.x, r3.z, l(0.500000)
      mul r3.z, r4.y, cb12[1].y
      mul r3.z, r3.z, l(0.500000)
      div r3.z, r3.z, r4.z
      add r5.y, r3.z, l(0.500000)
      sample_indexable(texture2darray)(float,float,float,float) r3.z, r5.xyzx, t1.xywz, s1
      mul r2.z, r2.z, r3.z
    else
      mul r2.z, r1.z, l(0.000200000009)
    endif
    lt r1.z, l(0.900000), r2.z
    movc r1.z, r1.z, l(0.900000), r2.z
    add r2.z, -r1.z, l(1.000000)
    mul r1.w, r1.w, r2.z
    mul r5.xyz, r2.zzzz, r8.xyzx
    if_nz cb9[12].y
      mov r4.w, l(1.000000)
      dp4 r6.x, cb9[8].xyzw, r4.xyzw
      dp4 r6.y, cb9[9].xyzw, r4.xyzw
      dp4 r6.z, cb9[10].xyzw, r4.xyzw
      dp4 r2.z, cb9[11].xyzw, r4.xyzw
      div r6.xyz, r6.xyzx, r2.zzzz
      mov_sat r3.zw, r6.xxxy
      eq r3.zw, r6.xxxy, r3.zzzw
      and r2.z, r3.w, r3.z
      if_nz r2.z
        mul r3.zw, r1.xxxy, l(0.000000, 0.000000, 0.500000, 0.500000)
        frc r3.zw, r3.zzzw
        lt r3.zw, l(0.000000, 0.000000, 0.250000, 0.250000), r3.zzzw
        and r7.xy, r3.zwzz, l(0x3f800000, 0x3f800000, 0, 0)
        add r2.z, r7.x, r7.y
        lt r3.z, l(1.100000), r2.z
        movc r7.z, r3.z, l(0), r2.z
        add r3.zw, r7.xxxz, l(0.000000, 0.000000, -0.500000, -0.500000)
        mad r3.zw, r3.zzzw, l(0.000000, 0.000000, 0.000976562500, 0.000976562500), r6.xxxy
        mov_sat r6.xy, r3.zwzz
        eq r6.xy, r3.zwzz, r6.xyxx
        and r2.z, r6.y, r6.x
        if_nz r2.z
          min r2.z, r6.z, l(1.000000)
          sample_c_indexable(texture2d)(float,float,float,float) r2.z, r3.zwzz, t15.xxxx, s15, r2.z
        else
          mov r2.z, l(1.000000)
        endif
      else
        dp4 r6.x, cb9[4].xyzw, r4.xyzw
        dp4 r6.y, cb9[5].xyzw, r4.xyzw
        dp4 r6.z, cb9[6].xyzw, r4.xyzw
        dp4 r3.z, cb9[7].xyzw, r4.xyzw
        div r6.xyz, r6.xyzx, r3.zzzz
        mov_sat r3.zw, r6.xxxy
        eq r3.zw, r6.xxxy, r3.zzzw
        and r3.z, r3.w, r3.z
        if_nz r3.z
          mul r3.zw, r1.xxxy, l(0.000000, 0.000000, 0.500000, 0.500000)
          frc r3.zw, r3.zzzw
          lt r3.zw, l(0.000000, 0.000000, 0.250000, 0.250000), r3.zzzw
          and r7.xy, r3.zwzz, l(0x3f800000, 0x3f800000, 0, 0)
          add r3.z, r7.x, r7.y
          lt r3.w, l(1.100000), r3.z
          movc r7.z, r3.w, l(0), r3.z
          add r3.zw, r7.xxxz, l(0.000000, 0.000000, -0.500000, -0.500000)
          mad r3.zw, r3.zzzw, l(0.000000, 0.000000, 0.000244140625, 0.000244140625), r6.xxxy
          mov_sat r6.xy, r3.zwzz
          eq r6.xy, r3.zwzz, r6.xyxx
          and r5.w, r6.y, r6.x
          if_nz r5.w
            min r5.w, r6.z, l(1.000000)
            sample_c_indexable(texture2d)(float,float,float,float) r2.z, r3.zwzz, t14.xxxx, s14, r5.w
          else
            mov r2.z, l(1.000000)
          endif
        else
          dp4 r6.x, cb9[0].xyzw, r4.xyzw
          dp4 r6.y, cb9[1].xyzw, r4.xyzw
          dp4 r6.z, cb9[2].xyzw, r4.xyzw
          dp4 r3.z, cb9[3].xyzw, r4.xyzw
          div r6.xyz, r6.xyzx, r3.zzzz
          mov_sat r3.zw, r6.xxxy
          eq r3.zw, r6.xxxy, r3.zzzw
          and r3.z, r3.w, r3.z
          if_nz r3.z
            mul r3.zw, r1.xxxy, l(0.000000, 0.000000, 0.500000, 0.500000)
            frc r3.zw, r3.zzzw
            lt r3.zw, l(0.000000, 0.000000, 0.250000, 0.250000), r3.zzzw
            and r7.xy, r3.zwzz, l(0x3f800000, 0x3f800000, 0, 0)
            add r3.z, r7.x, r7.y
            lt r3.w, l(1.100000), r3.z
            movc r7.z, r3.w, l(0), r3.z
            add r3.zw, r7.xxxz, l(0.000000, 0.000000, -0.500000, -0.500000)
            mad r3.zw, r3.zzzw, l(0.000000, 0.000000, 0.0000610351563, 0.0000610351563), r6.xxxy
            mov_sat r6.xy, r3.zwzz
            eq r6.xy, r3.zwzz, r6.xyxx
            and r5.w, r6.y, r6.x
            if_nz r5.w
              min r5.w, r6.z, l(1.000000)
              sample_c_indexable(texture2d)(float,float,float,float) r2.z, r3.zwzz, t13.xxxx, s13, r5.w
            else
              mov r2.z, l(1.000000)
            endif
          else
            mov r2.z, l(1.000000)
          endif
        endif
      endif
      mul r1.z, r1.z, r2.z
    endif
    dp3 r2.z, r2.xywx, r2.xywx
    lt r3.z, l(0.000100), r2.z
    div r3.w, l(1.000000, 1.000000, 1.000000, 1.000000), r2.z
    mad r5.w, -cb9[13].x, cb9[13].x, l(1.000000)
    mad r6.x, cb9[13].x, cb9[13].x, l(1.000000)
    add r6.y, cb9[13].x, cb9[13].x
    dp3 r6.z, r4.xyzx, r4.xyzx
    rsq r6.z, r6.z
    mul r7.xyz, r4.xyzx, r6.zzzz
    mad r9.xyz, r2.xywx, l(0.500000, 0.500000, 0.500000, 0.000000), r4.xyzx
    dp3 r6.z, r9.xyzx, r9.xyzx
    rsq r6.w, r6.z
    mul r9.xyz, r6.wwww, r9.xyzx
    add r6.z, r6.z, l(0.000100)
    log r6.z, r6.z
    mul r6.z, r6.z, l(1.500000)
    exp r6.z, r6.z
    mul r6.z, r6.z, l(0.010000)
    mov r8.xyz, r5.xyzx
    mov r6.w, l(0)
    loop
      uge r7.w, r6.w, cb9[13].w
      breakc_nz r7.w
      ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r7.w, r6.w, l(12), t19.xxxx
      switch r7.w
        case l(0)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyzw, r6.w, l(16), t19.xyzw
        add r11.xyz, r4.xyzx, -r10.xyzx
        dp3 r7.w, r2.xywx, r11.xyzx
        dp3 r8.w, r11.xyzx, r11.xyzx
        mad r9.w, -r10.w, r10.w, r8.w
        mul r9.w, r2.z, r9.w
        mad r9.w, r7.w, r7.w, -r9.w
        ge r11.x, r9.w, l(0.000000)
        and r11.x, r3.z, r11.x
        if_nz r11.x
          sqrt r9.w, r9.w
          add r11.x, -r7.w, -r9.w
          mul r11.x, r3.w, r11.x
          add r7.w, -r7.w, r9.w
          mul r7.w, r3.w, r7.w
          ge r9.w, l(1.000000), r11.x
          ge r11.y, r7.w, l(0.000000)
          and r9.w, r9.w, r11.y
          if_nz r9.w
            lt r9.w, r11.x, l(0.000000)
            lt r11.y, l(1.000000), r7.w
            movc r7.w, r11.y, l(1.000000), r7.w
            movc r9.w, r9.w, l(-0.000000), -r11.x
            add r7.w, r7.w, r9.w
            mul r9.w, r7.w, l(0.500000)
            mad r11.xyz, r9.wwww, r2.xywx, r4.xyzx
            ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r12.xyz, r6.w, l(0), t19.xyzx
            dp3 r9.w, r11.xyzx, r11.xyzx
            rsq r9.w, r9.w
            mul r13.xyz, r9.wwww, r11.xyzx
            add r10.xyz, r10.xyzx, -r11.xyzx
            dp3 r9.w, r10.xyzx, r10.xyzx
            rsq r9.w, r9.w
            mul r10.xyz, r9.wwww, r10.xyzx
            dp3 r9.w, r13.xyzx, r10.xyzx
            mad r9.w, -r6.y, r9.w, r6.x
            log r9.w, |r9.w|
            mul r9.w, r9.w, l(1.500000)
            exp r9.w, r9.w
            mul r9.w, r9.w, l(12.566371)
            div r9.w, r5.w, r9.w
            mul r10.xyz, r9.wwww, r12.xyzx
            mul r10.xyz, r7.wwww, r10.xyzx
            sqrt r7.w, r8.w
            div r7.w, r7.w, r10.w
            add r7.w, -r7.w, l(1.000000)
            max r7.w, r7.w, l(0.000000)
            mul r10.xyz, r7.wwww, r10.xyzx
            mul r7.w, r8.w, l(0.010000)
            div r10.xyz, r10.xyzx, r7.wwww
            mul r10.xyz, r1.zzzz, r10.xyzx
            mad r8.xyz, r10.xyzx, l(0.100000, 0.100000, 0.100000, 0.000000), r8.xyzx
          endif
        endif
        break
        case l(1)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyzw, r6.w, l(16), t19.xyzw
        add r11.xyz, r4.xyzx, -r10.xyzx
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r12.xyz, r6.w, l(32), t19.xyzx
        dp3 r7.w, r11.xyzx, r12.xyzx
        lt r7.w, l(0.000000), r7.w
        if_nz r7.w
          dp3 r7.w, r12.xyzx, r12.xyzx
          rsq r7.w, r7.w
          mul r12.xyz, r7.wwww, r12.xyzx
          dp3 r7.w, r11.xyzx, r12.xyzx
          mul r13.xyz, r12.xyzx, r7.wwww
          dp3 r7.w, r11.xyzx, r11.xyzx
          rsq r8.w, r7.w
          mul r11.xyz, r8.wwww, r11.xyzx
          dp3 r8.w, r12.xyzx, r11.xyzx
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.xy, r6.w, l(64), t19.xyxx
          ge r9.w, r8.w, r11.x
          ge r11.z, r11.y, r8.w
          add r8.w, r8.w, -r11.y
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.y, r6.w, l(68), t19.xxxx
          add r11.x, -r11.y, r11.x
          div r8.w, r8.w, r11.x
          movc r8.w, r11.z, l(0), r8.w
          movc r8.w, r9.w, l(1.000000), r8.w
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.xyz, r6.w, l(0), t19.xyzx
          add r10.xyz, -r4.xyzx, r10.xyzx
          dp3 r9.w, r10.xyzx, r10.xyzx
          rsq r9.w, r9.w
          mul r10.xyz, r9.wwww, r10.xyzx
          dp3 r9.w, r7.xyzx, r10.xyzx
          mad r9.w, -r6.y, r9.w, r6.x
          log r9.w, |r9.w|
          mul r9.w, r9.w, l(1.500000)
          exp r9.w, r9.w
          mul r9.w, r9.w, l(12.566371)
          div r9.w, r5.w, r9.w
          mul r10.xyz, r9.wwww, r11.xyzx
          mul r10.xyz, r8.wwww, r10.xyzx
          mul r10.xyz, r10.xyzx, l(10000.000000, 10000.000000, 10000.000000, 0.000000)
          sqrt r7.w, r7.w
          div r7.w, r7.w, r10.w
          add r7.w, -r7.w, l(1.000000)
          max r7.w, r7.w, l(0.000000)
          mul r10.xyz, r7.wwww, r10.xyzx
          dp3 r7.w, r13.xyzx, r13.xyzx
          add r7.w, r7.w, l(0.010000)
          div r10.xyz, r10.xyzx, r7.wwww
          mad r8.xyz, r1.zzzz, r10.xyzx, r8.xyzx
        endif
        break
        case l(2)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyz, r6.w, l(32), t19.xyzx
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.xyz, r6.w, l(0), t19.xyzx
        dp3 r7.w, r10.xyzx, r10.xyzx
        rsq r7.w, r7.w
        mul r10.xyz, r7.wwww, r10.xyzx
        dp3 r7.w, r9.xyzx, r10.xyzx
        mad r7.w, -r6.y, r7.w, r6.x
        log r7.w, |r7.w|
        mul r7.w, r7.w, l(1.500000)
        exp r7.w, r7.w
        mul r7.w, r7.w, l(12.566371)
        div r7.w, r5.w, r7.w
        mul r10.xyz, r7.wwww, r11.xyzx
        div r10.xyz, r10.xyzx, r6.zzzz
        mul r10.xyz, r1.zzzz, r10.xyzx
        mad r8.xyz, r10.xyzx, l(0.000001, 0.000001, 0.000001, 0.000000), r8.xyzx
        break
        default
        break
      endswitch
      iadd r6.w, r6.w, l(1)
    endloop
    add r4.xyz, r2.xywx, r4.xyzx
  endif
  movc r0.x, r0.w, l(18), l(19)
else
  mov r0.w, l(-1)
endif
not r0.w, r0.w
and r0.y, r0.w, r0.y
ilt r0.x, r0.x, r0.z
and r0.x, r0.x, r0.y
if_nz r0.x
  lt r0.x, l(0.000000), r3.x
  if_nz r0.x
    lt r0.x, r3.x, r3.y
    movc r0.x, r0.x, r3.x, r3.y
    mul r0.x, r0.x, cb9[13].y
    if_nz cb9[12].z
      mul r0.y, r0.x, l(0.002000)
      mul r0.z, r4.z, l(-0.0666666701)
      max r0.z, r0.z, l(0.000000)
      rsq r0.z, r0.z
      div r0.z, l(1.000000, 1.000000, 1.000000, 1.000000), r0.z
      mul r3.z, r0.z, l(16.000000)
      mul r0.z, r4.x, cb12[0].x
      mul r0.z, r0.z, l(-0.500000)
      div r0.z, r0.z, r4.z
      add r3.x, r0.z, l(0.500000)
      mul r0.z, r4.y, cb12[1].y
      mul r0.z, r0.z, l(0.500000)
      div r0.z, r0.z, r4.z
      add r3.y, r0.z, l(0.500000)
      sample_indexable(texture2darray)(float,float,float,float) r0.z, r3.xyzx, t1.xywz, s1
      mul r0.y, r0.z, r0.y
    else
      mul r0.y, r0.x, l(0.000200000009)
    endif
    lt r0.x, l(0.900000), r0.y
    movc r0.x, r0.x, l(0.900000), r0.y
    add r0.y, -r0.x, l(1.000000)
    mul o0.w, r0.y, r1.w
    mul r0.yzw, r0.yyyy, r8.xxyz
    if_nz cb9[12].y
      mov r4.w, l(1.000000)
      dp4 r3.x, cb9[8].xyzw, r4.xyzw
      dp4 r3.y, cb9[9].xyzw, r4.xyzw
      dp4 r3.z, cb9[10].xyzw, r4.xyzw
      dp4 r1.z, cb9[11].xyzw, r4.xyzw
      div r3.xyz, r3.xyzx, r1.zzzz
      mov_sat r5.xy, r3.xyxx
      eq r5.xy, r3.xyxx, r5.xyxx
      and r1.z, r5.y, r5.x
      if_nz r1.z
        mul r5.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
        frc r5.xy, r5.xyxx
        lt r5.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r5.xyxx
        and r5.xy, r5.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
        add r1.z, r5.x, r5.y
        lt r2.z, l(1.100000), r1.z
        movc r5.z, r2.z, l(0), r1.z
        add r5.xy, r5.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
        mad r3.xy, r5.xyxx, l(0.000976562500, 0.000976562500, 0.000000, 0.000000), r3.xyxx
        mov_sat r5.xy, r3.xyxx
        eq r5.xy, r3.xyxx, r5.xyxx
        and r1.z, r5.y, r5.x
        if_nz r1.z
          min r1.z, r3.z, l(1.000000)
          sample_c_indexable(texture2d)(float,float,float,float) r1.z, r3.xyxx, t15.xxxx, s15, r1.z
        else
          mov r1.z, l(1.000000)
        endif
      else
        dp4 r3.x, cb9[4].xyzw, r4.xyzw
        dp4 r3.y, cb9[5].xyzw, r4.xyzw
        dp4 r3.z, cb9[6].xyzw, r4.xyzw
        dp4 r2.z, cb9[7].xyzw, r4.xyzw
        div r3.xyz, r3.xyzx, r2.zzzz
        mov_sat r5.xy, r3.xyxx
        eq r5.xy, r3.xyxx, r5.xyxx
        and r2.z, r5.y, r5.x
        if_nz r2.z
          mul r5.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
          frc r5.xy, r5.xyxx
          lt r5.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r5.xyxx
          and r5.xy, r5.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
          add r2.z, r5.x, r5.y
          lt r3.w, l(1.100000), r2.z
          movc r5.z, r3.w, l(0), r2.z
          add r5.xy, r5.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
          mad r3.xy, r5.xyxx, l(0.000244140625, 0.000244140625, 0.000000, 0.000000), r3.xyxx
          mov_sat r5.xy, r3.xyxx
          eq r5.xy, r3.xyxx, r5.xyxx
          and r2.z, r5.y, r5.x
          if_nz r2.z
            min r2.z, r3.z, l(1.000000)
            sample_c_indexable(texture2d)(float,float,float,float) r1.z, r3.xyxx, t14.xxxx, s14, r2.z
          else
            mov r1.z, l(1.000000)
          endif
        else
          dp4 r3.x, cb9[0].xyzw, r4.xyzw
          dp4 r3.y, cb9[1].xyzw, r4.xyzw
          dp4 r3.z, cb9[2].xyzw, r4.xyzw
          dp4 r2.z, cb9[3].xyzw, r4.xyzw
          div r3.xyz, r3.xyzx, r2.zzzz
          mov_sat r5.xy, r3.xyxx
          eq r5.xy, r3.xyxx, r5.xyxx
          and r2.z, r5.y, r5.x
          if_nz r2.z
            mul r1.xy, r1.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
            frc r1.xy, r1.xyxx
            lt r1.xy, l(0.250000, 0.250000, 0.000000, 0.000000), r1.xyxx
            and r5.xy, r1.xyxx, l(0x3f800000, 0x3f800000, 0, 0)
            add r1.x, r5.x, r5.y
            lt r1.y, l(1.100000), r1.x
            movc r5.z, r1.y, l(0), r1.x
            add r1.xy, r5.xzxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
            mad r1.xy, r1.xyxx, l(0.0000610351563, 0.0000610351563, 0.000000, 0.000000), r3.xyxx
            mov_sat r3.xy, r1.xyxx
            eq r3.xy, r1.xyxx, r3.xyxx
            and r2.z, r3.y, r3.x
            if_nz r2.z
              min r2.z, r3.z, l(1.000000)
              sample_c_indexable(texture2d)(float,float,float,float) r1.z, r1.xyxx, t13.xxxx, s13, r2.z
            else
              mov r1.z, l(1.000000)
            endif
          else
            mov r1.z, l(1.000000)
          endif
        endif
      endif
      mul r0.x, r0.x, r1.z
    endif
    dp3 r1.x, r2.xywx, r2.xywx
    lt r1.y, l(0.000100), r1.x
    div r1.z, l(1.000000, 1.000000, 1.000000, 1.000000), r1.x
    mad r2.z, -cb9[13].x, cb9[13].x, l(1.000000)
    mad r3.x, cb9[13].x, cb9[13].x, l(1.000000)
    add r3.y, cb9[13].x, cb9[13].x
    dp3 r3.z, r4.xyzx, r4.xyzx
    rsq r3.z, r3.z
    mul r5.xyz, r3.zzzz, r4.xyzx
    mad r6.xyz, r2.xywx, l(0.500000, 0.500000, 0.500000, 0.000000), r4.xyzx
    dp3 r3.z, r6.xyzx, r6.xyzx
    rsq r3.w, r3.z
    mul r6.xyz, r3.wwww, r6.xyzx
    add r3.z, r3.z, l(0.000100)
    log r3.z, r3.z
    mul r3.z, r3.z, l(1.500000)
    exp r3.z, r3.z
    mul r3.z, r3.z, l(0.010000)
    mov r7.xyz, r0.yzwy
    mov r3.w, l(0)
    loop
      uge r4.w, r3.w, cb9[13].w
      breakc_nz r4.w
      ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r4.w, r3.w, l(12), t19.xxxx
      switch r4.w
        case l(0)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r9.xyzw, r3.w, l(16), t19.xyzw
        add r10.xyz, r4.xyzx, -r9.xyzx
        dp3 r4.w, r2.xywx, r10.xyzx
        dp3 r5.w, r10.xyzx, r10.xyzx
        mad r6.w, -r9.w, r9.w, r5.w
        mul r6.w, r1.x, r6.w
        mad r6.w, r4.w, r4.w, -r6.w
        ge r7.w, r6.w, l(0.000000)
        and r7.w, r1.y, r7.w
        if_nz r7.w
          sqrt r6.w, r6.w
          add r7.w, -r4.w, -r6.w
          mul r7.w, r1.z, r7.w
          add r4.w, -r4.w, r6.w
          mul r4.w, r1.z, r4.w
          ge r6.w, l(1.000000), r7.w
          ge r8.w, r4.w, l(0.000000)
          and r6.w, r6.w, r8.w
          if_nz r6.w
            lt r6.w, r7.w, l(0.000000)
            lt r8.w, l(1.000000), r4.w
            movc r4.w, r8.w, l(1.000000), r4.w
            movc r6.w, r6.w, l(-0.000000), -r7.w
            add r4.w, r4.w, r6.w
            mul r6.w, r4.w, l(0.500000)
            mad r10.xyz, r6.wwww, r2.xywx, r4.xyzx
            ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.xyz, r3.w, l(0), t19.xyzx
            dp3 r6.w, r10.xyzx, r10.xyzx
            rsq r6.w, r6.w
            mul r12.xyz, r6.wwww, r10.xyzx
            add r9.xyz, r9.xyzx, -r10.xyzx
            dp3 r6.w, r9.xyzx, r9.xyzx
            rsq r6.w, r6.w
            mul r9.xyz, r6.wwww, r9.xyzx
            dp3 r6.w, r12.xyzx, r9.xyzx
            mad r6.w, -r3.y, r6.w, r3.x
            log r6.w, |r6.w|
            mul r6.w, r6.w, l(1.500000)
            exp r6.w, r6.w
            mul r6.w, r6.w, l(12.566371)
            div r6.w, r2.z, r6.w
            mul r9.xyz, r6.wwww, r11.xyzx
            mul r9.xyz, r4.wwww, r9.xyzx
            sqrt r4.w, r5.w
            div r4.w, r4.w, r9.w
            add r4.w, -r4.w, l(1.000000)
            max r4.w, r4.w, l(0.000000)
            mul r9.xyz, r4.wwww, r9.xyzx
            mul r4.w, r5.w, l(0.010000)
            div r9.xyz, r9.xyzx, r4.wwww
            mul r9.xyz, r0.xxxx, r9.xyzx
            mad r7.xyz, r9.xyzx, l(0.100000, 0.100000, 0.100000, 0.000000), r7.xyzx
          endif
        endif
        break
        case l(1)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r9.xyzw, r3.w, l(16), t19.xyzw
        add r10.xyz, r4.xyzx, -r9.xyzx
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r11.xyz, r3.w, l(32), t19.xyzx
        dp3 r4.w, r10.xyzx, r11.xyzx
        lt r4.w, l(0.000000), r4.w
        if_nz r4.w
          dp3 r4.w, r11.xyzx, r11.xyzx
          rsq r4.w, r4.w
          mul r11.xyz, r4.wwww, r11.xyzx
          dp3 r4.w, r10.xyzx, r11.xyzx
          mul r12.xyz, r11.xyzx, r4.wwww
          dp3 r4.w, r10.xyzx, r10.xyzx
          rsq r5.w, r4.w
          mul r10.xyz, r5.wwww, r10.xyzx
          dp3 r5.w, r11.xyzx, r10.xyzx
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xy, r3.w, l(64), t19.xyxx
          ge r6.w, r5.w, r10.x
          ge r7.w, r10.y, r5.w
          add r5.w, r5.w, -r10.y
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r8.w, r3.w, l(68), t19.xxxx
          add r8.w, -r8.w, r10.x
          div r5.w, r5.w, r8.w
          movc r5.w, r7.w, l(0), r5.w
          movc r5.w, r6.w, l(1.000000), r5.w
          ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyz, r3.w, l(0), t19.xyzx
          add r9.xyz, -r4.xyzx, r9.xyzx
          dp3 r6.w, r9.xyzx, r9.xyzx
          rsq r6.w, r6.w
          mul r9.xyz, r6.wwww, r9.xyzx
          dp3 r6.w, r5.xyzx, r9.xyzx
          mad r6.w, -r3.y, r6.w, r3.x
          log r6.w, |r6.w|
          mul r6.w, r6.w, l(1.500000)
          exp r6.w, r6.w
          mul r6.w, r6.w, l(12.566371)
          div r6.w, r2.z, r6.w
          mul r9.xyz, r6.wwww, r10.xyzx
          mul r9.xyz, r5.wwww, r9.xyzx
          mul r9.xyz, r9.xyzx, l(10000.000000, 10000.000000, 10000.000000, 0.000000)
          sqrt r4.w, r4.w
          div r4.w, r4.w, r9.w
          add r4.w, -r4.w, l(1.000000)
          max r4.w, r4.w, l(0.000000)
          mul r9.xyz, r4.wwww, r9.xyzx
          dp3 r4.w, r12.xyzx, r12.xyzx
          add r4.w, r4.w, l(0.010000)
          div r9.xyz, r9.xyzx, r4.wwww
          mad r7.xyz, r0.xxxx, r9.xyzx, r7.xyzx
        endif
        break
        case l(2)
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r9.xyz, r3.w, l(32), t19.xyzx
        ld_structured_indexable(structured_buffer, stride=80)(mixed,mixed,mixed,mixed) r10.xyz, r3.w, l(0), t19.xyzx
        dp3 r4.w, r9.xyzx, r9.xyzx
        rsq r4.w, r4.w
        mul r9.xyz, r4.wwww, r9.xyzx
        dp3 r4.w, r6.xyzx, r9.xyzx
        mad r4.w, -r3.y, r4.w, r3.x
        log r4.w, |r4.w|
        mul r4.w, r4.w, l(1.500000)
        exp r4.w, r4.w
        mul r4.w, r4.w, l(12.566371)
        div r4.w, r2.z, r4.w
        mul r9.xyz, r4.wwww, r10.xyzx
        div r9.xyz, r9.xyzx, r3.zzzz
        mul r9.xyz, r0.xxxx, r9.xyzx
        mad r7.xyz, r9.xyzx, l(0.000001, 0.000001, 0.000001, 0.000000), r7.xyzx
        break
        default
        break
      endswitch
      iadd r3.w, r3.w, l(1)
    endloop
    mov o0.xyz, r7.xyzx
  else
    mov o0.xyz, r8.xyzx
    mov o0.w, r1.w
  endif
else
  mov o0.xyz, r8.xyzx
  mov o0.w, r1.w
endif
ret
// Approximately 0 instruction slots used
