// MANUALLY DUMPED [ShaderRegexLightingPS1nospec] Manual specular reflections PS 3.
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384
//
//   using 3Dmigoto v1.3.16 on Sat Oct  2 18:15:34 2021
//
//
// Buffer Definitions:
//
// cbuffer fblock
// {
//
//   float4 renderpositiontoviewtexture;// Index:    0.xyzw           Components:     4
//   float4 lightprepassinverseparams;  // Index:    1.xyzw           Components:     4
//   float4 globalvieworigin;           // Index:    2.xyzw           Components:     4
//   float4 pointshadowbias;            // Index:    3.xyzw           Components:     4
//   float4 clusteredshadingparm;       // Index:    4.xyzw           Components:     4
//   float4 clusteredshadingparm2;      // Index:    5.xyzw           Components:     4
//   float4 projectionmatrixz;          // Index:    6.xyzw           Components:     4
//   float4 pointspotshadowresolution;  // Index:    7.xyzw           Components:     4
//   float4 lightprepassparalleldir0;   // Index:    8.xyzw           Components:     4
//   float4 lightprepassparallelcolor0; // Index:    9.xyzw           Components:     4
//   float4 parallelshadowresolution;   // Index:   10.xyzw           Components:     4
//   float4 localtolightparallels1;     // Index:   11.xyzw           Components:     4
//   float4 localtolightparallelt1;     // Index:   12.xyzw           Components:     4
//   float4 localtolightparallelr1;     // Index:   13.xyzw           Components:     4
//   float4 localtolightparallels2;     // Index:   14.xyzw           Components:     4
//   float4 localtolightparallelt2;     // Index:   15.xyzw           Components:     4
//   float4 localtolightparallelr2;     // Index:   16.xyzw           Components:     4
//   float4 localtolightparallels;      // Index:   17.xyzw           Components:     4
//   float4 localtolightparallelt;      // Index:   18.xyzw           Components:     4
//   float4 localtolightparallelr;      // Index:   19.xyzw           Components:     4
//
// }
//
// Resource bind info for clusternumlights
// {
//
//   struct clusternumlights_t
//   {
//
//       uint offset;                   // Index:    0
//       uint numItems;                 // Index:    0.y
//       uint offsetRP;                 // Index:    0.z
//       uint numItemsRP;               // Index:    0.w
//
//   } $Element;                        // Index:    0.xyzw           Components:     4
//
// }
//
// Resource bind info for clusterlightsid
// {
//
//   struct clusterlightsid_t
//   {
//
//       uint id;                       // Index:    0
//
//   } $Element;                        // Index:    0.x              Components:     1
//
// }
//
// Resource bind info for lightparmsspot
// {
//
//   struct lightparmsspot_t
//   {
//
//       float4 lightPositions;         // Index:    0
//       float4 lightColors;            // Index:    1
//       float4 lightExtentses;         // Index:    2
//       float4 lightSpotDir;           // Index:    3
//       float4 lightClipBoundingVolumeExtent;// Index:    4
//       float4 lightClipBoundingVolumeOrigin;// Index:    5
//       float4 lightParm;              // Index:    6
//       float4 lightAxisX;             // Index:    7
//       float4 lightAxisY;             // Index:    8
//       float4 lightAxisZ;             // Index:    9
//       float4 localToLightS;          // Index:   10
//       float4 localToLightT;          // Index:   11
//       float4 localToLightR;          // Index:   12
//       float4 localToLightQ;          // Index:   13
//
//   } $Element;                        // Index:    0-13             Components:    56
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// viewdepthmap_samp_state           sampler      NA          NA    0        1
// packedgbuffer0main_samp_state     sampler      NA          NA    1        1
// packedgbuffer1main_samp_state     sampler      NA          NA    2        1
// roughnesstex_samp_state           sampler      NA          NA    3        1
// viewstencil_samp_state            sampler      NA          NA    4        1
// shadowstexarray_samp_state      sampler_c      NA          NA    5        1
// shadowcubestrqmap_samp_state      sampler      NA          NA    6        1
// lightdepthparallelmap_samp_state  sampler_c      NA          NA    7        1
// viewdepthmap_samp                 texture  float4          2d    0        1
// packedgbuffer0main_samp           texture  float4          2d    1        1
// packedgbuffer1main_samp           texture  float4          2d    2        1
// roughnesstex_samp                 texture  float4          2d    3        1
// viewstencil_samp                  texture  float4          2d    4        1
// shadowstexarray_samp              texture  float4     2darray    5        1
// shadowcubestrqmap_samp            texture  float4   cubearray    6        1
// lightdepthparallelmap_samp        texture  float4          2d    7        1
// clusternumlights                  texture  struct         r/o    8        1
// clusterlightsid                   texture  struct         r/o    9        1
// lightparmsspot                    texture  struct         r/o   10        1
// fblock                            cbuffer      NA          NA    0        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// TEXCOORD                 1   xyzw        0     NONE   float   xyzw
// TEXCOORD                 2   xyzw        1     NONE   float   xyzw
// SV_Position              0   xyzw        2      POS   float   xy
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[20], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s1, mode_default
dcl_sampler s2, mode_default
dcl_sampler s3, mode_default
dcl_sampler s4, mode_default
dcl_sampler s5, mode_comparison
dcl_sampler s6, mode_default
dcl_sampler s7, mode_comparison
dcl_resource_texture2d (float,float,float,float) t0
dcl_resource_texture2d (float,float,float,float) t1
dcl_resource_texture2d (float,float,float,float) t2
dcl_resource_texture2d (float,float,float,float) t3
dcl_resource_texture2d (float,float,float,float) t4
dcl_resource_texture2darray (float,float,float,float) t5
dcl_resource_texturecubearray (float,float,float,float) t6
dcl_resource_texture2d (float,float,float,float) t7
dcl_resource_structured t8, 16
dcl_resource_structured t9, 4
dcl_resource_structured t10, 224
dcl_input_ps linear v0.xyzw
dcl_input_ps linear v1.xyzw
dcl_input_ps_siv linear noperspective v2.xy, position
dcl_output o0.xyzw
dcl_temps 45
dcl_resource_texture2d (float,float,float,float) t125
dcl_constantbuffer cb13[10], immediateIndexed
mad r0.xy, v2.xyxx, cb0[0].zwzz, cb0[0].xyxx
sample_aoffimmi_indexable(0,0,0)(texture2d)(float,float,float,float) r0.w, r0.xyxx, t0.yzwx, s0
eq r1.x, r0.w, l(1.000000)
if_nz r1.x
  discard_nz l(-1)
endif
sample_l_indexable(texture2d)(float,float,float,float) r1.xyzw, r0.xyxx, t1.xyzw, s1, l(0.000000)
sample_l_indexable(texture2d)(float,float,float,float) r2.xyzw, r0.xyxx, t2.xyzw, s2, l(0.000000)
mul r3.xyzw, r1.zwxy, l(65535.000000, 65535.000000, 65535.000000, 65535.000000)
ftou r3.xyzw, r3.xyzw
ubfe r3.xyzw, l(8, 8, 8, 8), l(8, 8, 8, 8), r3.xyzw
utof r3.xyzw, r3.xyzw
mad r3.xyzw, r3.xyzw, l(0.00784313772, 0.00784313772, 0.00784313772, 0.00784313772), l(-1.000000, -1.000000, -1.000000, -1.000000)
add r4.xyz, -|r3.xyxx|, l(1.000000, 1.000000, 1.000000, 0.000000)
add r5.z, -|r3.y|, r4.x
ge r1.w, r5.z, l(0.000000)
ge r6.xyzw, r3.xyzw, l(0.000000, 0.000000, 0.000000, 0.000000)
movc r6.xyzw, r6.xyzw, l(1.000000,1.000000,1.000000,1.000000), l(-1.000000,-1.000000,-1.000000,-1.000000)
mul r4.xy, r4.yzyy, r6.xyxx
movc r5.xy, r1.wwww, r3.xyxx, r4.xyxx
dp3 r1.w, r5.xyzx, r5.xyzx
rsq r1.w, r1.w
mul r4.xyz, r1.wwww, r5.xyzx
mad r4.xyz, r4.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), l(0.500000, 0.500000, 0.500000, 0.000000)
mul r2.xzw, r2.zzwx, l(65535.000000, 0.000000, 65535.000000, 65535.000000)
mad r1.w, r2.y, l(65535.000000), l(0.100000)
ftou r1.w, r1.w
and r1.w, r1.w, l(255)
utof r1.w, r1.w
add r1.w, r1.w, l(0.100000)
ftou r1.w, r1.w
add r5.xyz, -|r3.zwzz|, l(1.000000, 1.000000, 1.000000, 0.000000)
add r7.z, -|r3.w|, r5.x
ge r2.y, r7.z, l(0.000000)
mul r3.xy, r6.zwzz, r5.yzyy
movc r7.xy, r2.yyyy, r3.zwzz, r3.xyxx
dp3 r2.y, r7.xyzx, r7.xyzx
rsq r2.y, r2.y
mul r3.xyz, r2.yyyy, r7.xyzx
mad r3.xyz, r3.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000), l(0.500000, 0.500000, 0.500000, 0.000000)
ftou r2.xyz, r2.xzwx
and r2.xy, r2.xyxx, l(255, 255, 0, 0)
utof r2.xy, r2.xyxx
mul r2.xw, r2.xxxy, l(0.00392156886, 0.000000, 0.000000, 0.00392156886)
and r5.xy, r1.wwww, l(1, 4, 0, 0)
ieq r5.xy, r5.xyxx, l(1, 4, 0, 0)
movc r1.w, r5.x, l(0), r2.x
mad r3.xyz, r3.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
dp3 r2.x, r3.xyzx, r3.xyzx
rsq r2.x, r2.x
mul r3.xyz, r2.xxxx, r3.xyzx
mad r4.xyz, r4.xyzx, l(2.000000, 2.000000, 2.000000, 0.000000), l(-1.000000, -1.000000, -1.000000, 0.000000)
ld_indexable(texture2d)(float,float,float,float) r28.xyzw, l(0, 0, 0, 0), t125.xyzw
add r30.xyzw, v0.xyzw, -v1.xyzw
//Comment.
mad r30.xyzw, r0.wwww, r30.xyzw, v1.xyzw
mov r29.xyzw, v0.xyzw
mad r31.w, r28.y, r30.w, l(-1.0)
div r31.w, r31.w, r0.w
mul r31.x, r31.w, cb13[0].x
mul r31.y, r31.w, cb13[1].x
mul r31.z, r31.w, cb13[2].x
mad r29.xyz, r28.xxxx, r31.xyzx, r29.xyzx
add r6.xyzw, r29.xyzw, -v1.xyzw
mad r6.xyzw, r0.w, r6.xyzw, v1.xyzw
div r5.xzw, r6.xxyz, r6.wwww
add r5.xzw, r5.xxzw, cb0[1].xxyz
mul r1.xyz, r1.xyzx, l(65535.000000, 65535.000000, 65535.000000, 0.000000)
ftou r1.xyz, r1.xyzx
and r1.xyz, r1.xyzx, l(255, 255, 255, 0)
utof r1.xyz, r1.xyzx
mul r1.xyz, r1.xyzx, l(0.00392156886, 0.00392156886, 0.00392156886, 0.000000)
sample_l_indexable(texture2d)(float,float,float,float) r2.x, r0.xyxx, t3.xyzw, s3, l(0.000000)
log r1.xyz, r1.xyzx
mul r1.xyz, r1.xyzx, l(2.200000, 2.200000, 2.200000, 0.000000)
exp r1.xyz, r1.xyzx

mov r39.xyzw, r5.xyzw
mul r38.x, r28.y, cb13[0].x
mul r38.y, r28.y, cb13[1].x
mul r38.z, r28.y, cb13[2].x
mad r39.xzw, -r28.xxxx, r38.xxyz, r39.xxzw

add r6.xyz, -r39.xzwx, cb0[2].xyzx
dp3 r3.w, r6.xyzx, r6.xyzx
rsq r3.w, r3.w
mul r7.xyz, r3.wwww, r6.xyzx
mad r8.xyz, r3.xyzx, cb0[3].zzzz, r5.xzwx
ubfe r2.z, l(8), l(8), r2.z
utof r2.z, r2.z
mul r4.w, r2.z, l(0.00392156886)
sample_l_indexable(texture2d)(float,float,float,float) r5.x, r0.xyxx, t4.xyzw, s4, l(0.000000)
mul r5.x, r5.x, l(255.000000)
ftou r5.x, r5.x
add r0.z, -r0.y, l(1.000000)

mov r40.xyzw, r0.xyzw
mad r28.w, r30.w, r28.y, l(-1.0)
mul r28.w, r28.w, l(0.5)
mad r40.x, r28.x, r28.w, r40.x

mul r0.xy, r40.xzxx, cb0[4].xyxx
round_ni r0.xy, r0.xyxx
add r9.xyz, cb0[4].xyzx, l(-1.000000, -1.000000, -1.000000, 0.000000)
add r0.z, r0.w, cb0[6].z
div r0.z, cb0[6].w, r0.z
div r0.z, r0.z, cb0[5].z
max r0.z, r0.z, l(1.000000)
log r0.z, r0.z
mul r0.z, r0.z, cb0[5].w
round_ni r0.z, r0.z
min r0.xyz, r0.xyzx, r9.xyzx
mad r0.x, r0.y, cb0[4].x, r0.x
mul r0.y, r0.z, cb0[4].x
mad r0.x, r0.y, cb0[4].y, r0.x
ftou r0.x, r0.x
ld_structured_indexable(structured_buffer, stride=16)(mixed,mixed,mixed,mixed) r0.xy, r0.x, l(0), t8.xyxx
and r0.z, r0.y, l(255)
ubfe r0.y, l(8), l(8), r0.y
ishl r0.x, r0.x, l(5)
iadd r0.z, r0.z, r0.x
and r0.w, r5.x, l(2)
ine r0.w, r0.w, l(2)
dp3 r5.x, r3.xyzx, r7.xyzx
max r5.x, r5.x, l(0.000000)
min r5.z, r5.x, l(1.000000)
mad r2.z, -r2.z, l(0.00392156886), l(1.000000)
mul r9.xyz, r1.xyzx, l(0.318309873, 0.318309873, 0.318309873, 0.000000)
add r1.xyz, r1.xyzx, l(-0.040000, -0.040000, -0.040000, 0.000000)
mad r1.xyz, r1.wwww, r1.xyzx, l(0.040000, 0.040000, 0.040000, 0.000000)
add r10.xyz, -r1.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
add r1.w, -r1.w, l(1.000000)
max r1.w, r1.w, l(0.010000)
mul r11.xyz, r1.wwww, r9.xyzx
movc r12.xyz, r5.yyyy, r9.xyzx, r11.xyzx
lt r1.w, l(0.000000), r2.y
mov r8.w, l(1.000000)
mov r13.w, l(0)
mov r14.w, l(1.000000)
mov r15.w, l(2.000000)
mov r16.w, l(3.000000)
mov r17.xyz, l(0,0,0,0)
mov r18.xyz, l(0,0,0,0)
mov r2.y, r0.x
loop
  uge r5.w, r2.y, r0.z
  breakc_nz r5.w
  ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r5.w, r2.y, l(0), t9.xxxx
  iadd r6.w, r2.y, l(1)
  ld_structured_indexable(structured_buffer, stride=224)(mixed,mixed,mixed,mixed) r19.xyzw, r5.w, l(100), t10.xyzw
  ftou r7.w, r19.y
  and r9.w, r7.w, l(1)
  ieq r9.w, r9.w, l(1)
  and r9.w, r0.w, r9.w
  if_nz r9.w
    mov r2.y, r6.w
    continue
  endif
  ld_structured_indexable(structured_buffer, stride=224)(mixed,mixed,mixed,mixed) r20.xyz, r5.w, l(64), t10.xyzx
  ld_structured_indexable(structured_buffer, stride=224)(mixed,mixed,mixed,mixed) r21.xyzw, r5.w, l(116), t10.wxyz
  ld_structured_indexable(structured_buffer, stride=224)(mixed,mixed,mixed,mixed) r22.xyzw, r5.w, l(132), t10.wxyz
  ld_structured_indexable(structured_buffer, stride=224)(mixed,mixed,mixed,mixed) r23.xyzw, r5.w, l(148), t10.wxyz
  and r9.w, r7.w, l(64)
  ieq r9.w, r9.w, l(64)
  mov r24.x, r19.w
  mov r24.yzw, r21.yyzw
  dp4 r24.x, r8.xyzw, r24.xyzw
  mov r21.yzw, r22.yyzw
  dp4 r24.y, r8.xyzw, r21.xyzw
  mov r22.yzw, r23.yyzw
  dp4 r24.z, r8.xyzw, r22.xyzw
  div r20.xyz, |r24.xyzx|, r20.xyzx
  max r10.w, r20.y, r20.x
  max r10.w, r20.z, r10.w
  ge r10.w, r10.w, l(1.000000)
  and r11.w, r9.w, r10.w
  mov r2.y, r6.w
  continuec_nz r11.w
  movc r10.w, r10.w, l(0), l(1.000000)
  ld_structured_indexable(structured_buffer, stride=224)(mixed,mixed,mixed,mixed) r20.xyzw, r5.w, l(0), t10.xyzw
  ld_structured_indexable(structured_buffer, stride=224)(mixed,mixed,mixed,mixed) r21.xyzw, r5.w, l(32), t10.xyzw
  movc r9.w, r9.w, r10.w, l(1.000000)
  and r10.w, r7.w, l(128)
  ieq r10.w, r10.w, l(128)
  if_nz r10.w
    ld_structured_indexable(structured_buffer, stride=224)(mixed,mixed,mixed,mixed) r10.w, r5.w, l(92), t10.xxxx
    add r22.xyz, r8.xyzx, -r20.xyzx
    mul r24.xyz, r22.xyzx, l(0.020000, 0.020000, 0.020000, 0.000000)
    dp3 r11.w, |r24.xyzx|, |r24.xyzx|
    mul r22.xyz, r22.xyzx, l(0.500000, 0.500000, 0.500000, 0.000000)
    dp3 r12.w, |r22.xyzx|, |r22.xyzx|
    add r10.w, r10.w, l(9.999999960E-12)
    div r10.w, r12.w, r10.w
    mad r10.w, -r10.w, r10.w, l(1.000000)
    max r10.w, r10.w, l(0.000000)
    mul r10.w, r10.w, r10.w
    add r11.w, r20.w, r11.w
    div r11.w, l(1.000000, 1.000000, 1.000000, 1.000000), r11.w
    mul r10.w, r10.w, r11.w
    mul r10.w, r9.w, r10.w
    mul r10.w, r10.w, l(0.0795798153)
  else
    add r22.xyz, r8.xyzx, -r20.xyzx
    div_sat r21.xyz, |r22.xyzx|, r21.xyzx
    add r21.xyz, -r21.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
    mul r11.w, r21.y, r21.x
    mul r11.w, r21.z, r11.w
    log r11.w, r11.w
    mul r11.w, r11.w, r20.w
    exp r11.w, r11.w
    mul r10.w, r9.w, r11.w
  endif
  add r9.w, r10.w, l(-1.000000004E-15)
  lt r9.w, r9.w, l(0.000000)
  if_nz r9.w
    mov r2.y, r6.w
    continue
  endif
  ld_structured_indexable(structured_buffer, stride=224)(mixed,mixed,mixed,mixed) r22.xyzw, r5.w, l(16), t10.xyzw
  add r20.xyz, -r8.xyzx, r20.xyzx
  dp3 r9.w, r20.xyzx, r20.xyzx
  rsq r9.w, r9.w
  mul r20.xyz, r9.wwww, r20.xyzx
  dp3 r9.w, r3.xyzx, r20.xyzx
  max r9.w, r9.w, l(0.000000)
  min r11.w, r9.w, l(1.000000)
  if_nz r1.w
    dp3_sat r12.w, r7.xyzx, -r20.xyzx
    mul r12.w, r12.w, r12.w
    dp3_sat r17.w, -r4.xyzx, r20.xyzx
    mad r12.w, r12.w, r12.w, -r17.w
    mad r12.w, r12.w, l(0.600000), r17.w
    mul r12.w, r2.w, r12.w
    mul r12.w, r12.w, l(3.000000)
  else
    mov r12.w, l(0)
  endif
  and r17.w, r7.w, l(8)
  ieq r17.w, r17.w, l(8)
  if_nz r17.w
    ld_structured_indexable(structured_buffer, stride=224)(mixed,mixed,mixed,mixed) r24.xyzw, r5.w, l(164), t10.wxyz
    ld_structured_indexable(structured_buffer, stride=224)(mixed,mixed,mixed,mixed) r25.xyzw, r5.w, l(180), t10.wxyz
    ld_structured_indexable(structured_buffer, stride=224)(mixed,mixed,mixed,mixed) r26.xyzw, r5.w, l(196), t10.xyzw
    ld_structured_indexable(structured_buffer, stride=224)(mixed,mixed,mixed,mixed) r27.xyz, r5.w, l(212), t10.xyzx
    mov r23.yzw, r24.yyzw
    dp4 r13.x, r8.xyzw, r23.xyzw
    mov r24.yzw, r25.yyzw
    dp4 r13.y, r8.xyzw, r24.xyzw
    mov r25.yzw, r26.xxyz
    dp4 r13.z, r8.xyzw, r25.xyzw
    mov r27.w, r26.w
    dp4 r23.w, r8.yzwx, r27.xyzw
    sample_indexable(texturecubearray)(float,float,float,float) r24.xyzw, r13.xyzw, t6.xyzw, s6
    mov r23.xyz, r13.xyzx
    dp4 r13.x, r24.xyzw, r23.xyzw
    mov r14.xyz, r23.xyzx
    sample_indexable(texturecubearray)(float,float,float,float) r24.xyzw, r14.xyzw, t6.xyzw, s6
    dp4 r13.y, r24.xyzw, r23.xyzw
    mov r15.xyz, r14.xyzx
    sample_indexable(texturecubearray)(float,float,float,float) r24.xyzw, r15.xyzw, t6.xyzw, s6
    dp4 r13.z, r24.xyzw, r23.xyzw
    mov r16.xyz, r15.xyzx
    sample_indexable(texturecubearray)(float,float,float,float) r24.xyzw, r16.xyzw, t6.xyzw, s6
    dp4 r5.w, r24.xyzw, r23.xyzw
    div r23.xyz, r13.xyzx, r5.wwww
    add r23.w, -r23.y, l(1.000000)
    mad r13.xy, r23.xwxx, cb0[7].xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
    round_ni r14.xy, r13.xyxx
    add r13.xy, r13.xyxx, -r14.xyxx
    add r14.xy, r14.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
    mul r15.xy, r14.xyxx, cb0[7].zwzz
    mad r16.xy, -r13.yxyy, l(3.000000, 3.000000, 0.000000, 0.000000), l(4.000000, 4.000000, 0.000000, 0.000000)
    mad r19.yw, r13.xxxy, l(0.000000, 3.000000, 0.000000, 3.000000), l(0.000000, 1.000000, 0.000000, 1.000000)
    mad r21.xy, -r13.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(3.000000, 3.000000, 0.000000, 0.000000)
    div r21.xy, r21.xyxx, r16.yxyy
    add r23.xy, r13.xyxx, l(3.000000, 3.000000, 0.000000, 0.000000)
    mul r24.yz, r23.yyxy, l(0.000000, 0.142857149, 0.142857149, 0.000000)
    div r13.xy, r13.xyxx, r19.ywyy
    add r25.xy, r13.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000)
    add r24.xw, r21.xxxy, l(-2.000000, 0.000000, 0.000000, -2.000000)
    mul r5.w, r16.x, r16.y
    mul r26.xyzw, r24.xwzw, cb0[7].zwzw
    mad r13.xy, r14.xyxx, cb0[7].zwzz, r26.xyxx
    mov r13.z, r19.x
    sample_c_lz_indexable(texture2darray)(float,float,float,float) r14.z, r13.xyzx, t5.xxxx, s5, r23.z
    mul r21.xy, r16.xyxx, l(7.000000, 7.000000, 0.000000, 0.000000)
    mad r13.xy, r14.xyxx, cb0[7].zwzz, r26.zwzz
    sample_c_lz_indexable(texture2darray)(float,float,float,float) r15.z, r13.xyzx, t5.xxxx, s5, r23.z
    mul r15.z, r15.z, r21.x
    mul r16.xy, r16.xyxx, r19.ywyy
    mov r25.zw, r24.wwwy
    mul r26.xyzw, r25.xzxw, cb0[7].zwzw
    mad r13.xy, r14.xyxx, cb0[7].zwzz, r26.xyxx
    sample_c_lz_indexable(texture2darray)(float,float,float,float) r16.z, r13.xyzx, t5.xxxx, s5, r23.z
    mad r5.w, r5.w, r14.z, r15.z
    mad r5.w, r16.x, r16.z, r5.w
    mul r27.xyzw, r24.xyzy, cb0[7].zwzw
    mad r13.xy, r14.xyxx, cb0[7].zwzz, r27.xyxx
    sample_c_lz_indexable(texture2darray)(float,float,float,float) r14.z, r13.xyzx, t5.xxxx, s5, r23.z
    mad r13.xy, r14.xyxx, cb0[7].zwzz, r27.zwzz
    sample_c_lz_indexable(texture2darray)(float,float,float,float) r15.z, r13.xyzx, t5.xxxx, s5, r23.z
    mul r15.z, r15.z, l(49.000000)
    mul r16.xz, r19.yywy, l(7.000000, 0.000000, 7.000000, 0.000000)
    mad r13.xy, r14.xyxx, cb0[7].zwzz, r26.zwzz
    sample_c_lz_indexable(texture2darray)(float,float,float,float) r17.w, r13.xyzx, t5.xxxx, s5, r23.z
    mad r14.z, r21.y, r14.z, r15.z
    mad r14.z, r16.x, r17.w, r14.z
    add r5.w, r5.w, r14.z
    mov r24.y, r25.y
    mul r24.xyzw, r24.xyzy, cb0[7].zwzw
    mad r13.xy, r14.xyxx, cb0[7].zwzz, r24.xyxx
    sample_c_lz_indexable(texture2darray)(float,float,float,float) r14.z, r13.xyzx, t5.xxxx, s5, r23.z
    mad r13.xy, r14.xyxx, cb0[7].zwzz, r24.zwzz
    sample_c_lz_indexable(texture2darray)(float,float,float,float) r14.x, r13.xyzx, t5.xxxx, s5, r23.z
    mul r14.x, r14.x, r16.z
    mul r14.y, r19.w, r19.y
    mad r13.xy, r25.xyxx, cb0[7].zwzz, r15.xyxx
    sample_c_lz_indexable(texture2darray)(float,float,float,float) r13.x, r13.xyzx, t5.xxxx, s5, r23.z
    mad r13.y, r16.y, r14.z, r14.x
    mad r13.x, r14.y, r13.x, r13.y
    add r5.w, r5.w, r13.x
    mul r5.w, r5.w, l(0.00694444450)
    max r5.w, r22.w, r5.w
    mul r10.w, r5.w, r10.w
  endif
  mul r5.w, r11.w, r10.w
  mad r13.x, r10.w, r11.w, l(-1.000000004E-15)
  add r13.y, r12.w, l(-1.000000004E-15)
  lt r13.xy, r13.xyxx, l(0.000000, 0.000000, 0.000000, 0.000000)
  and r13.x, r13.y, r13.x
  if_nz r13.x
    mov r2.y, r6.w
    continue
  endif
  max r13.x, r2.x, r21.w
  mad r14.xyz, r6.xyzx, r3.wwww, r20.xyzx
  dp3 r13.y, r14.xyzx, r14.xyzx
  rsq r13.y, r13.y
  mul r14.xyz, r13.yyyy, r14.xyzx
  dp3 r13.y, r7.xyzx, r14.xyzx
  max r13.y, r13.y, l(0.000000)
  min r13.z, r13.y, l(1.000000)
  dp3 r14.x, r3.xyzx, r14.xyzx
  max r14.x, r14.x, l(0.000000)
  min r14.y, r14.x, l(1.000000)
  mul r14.z, r14.y, r14.y
  mad r15.x, r13.z, l(-5.554730), l(-6.983160)
  mul r13.z, r13.z, r15.x
  exp r13.z, r13.z
  mad r13.z, r2.z, r13.z, r4.w
  mad r15.xy, -r14.yyyy, r14.yyyy, l(1.000001, 1.000000, 0.000000, 0.000000)
  div r14.y, r14.z, r15.x
  mul r13.x, r13.x, r13.x
  mul r14.z, r13.x, l(0.500000)
  mad r15.x, r13.x, l(4.000000), l(1.000000)
  mul r15.x, r15.x, l(3.14159274)
  div r15.x, l(1.000000, 1.000000, 1.000000, 1.000000), r15.x
  div r14.y, -r14.y, r13.x
  mul r14.y, r14.y, l(1.442695)
  exp r14.y, r14.y
  mul r14.y, r14.y, l(4.000000)
  mad r15.y, r15.y, r15.y, l(1.000000012E-07)
  div r14.y, r14.y, r15.y
  add r14.y, r14.y, l(1.000000)
  mul r14.y, r14.y, r15.x
  add r15.x, r5.z, r11.w
  mad r11.w, -r11.w, r5.z, r15.x
  mad r11.w, r11.w, l(4.000000), l(1.000000012E-07)
  div r11.w, l(1.000000, 1.000000, 1.000000, 1.000000), r11.w
  mul r13.z, r13.z, r14.y
  mul r11.w, r11.w, r13.z
  mul r13.z, r14.x, r14.x
  mad r14.x, r13.x, r13.x, l(-1.000000)
  mad r13.z, r13.z, r14.x, l(1.000000)
  max r13.z, r13.z, l(1.000000012E-07)
  div r13.z, r13.x, r13.z
  mul r13.z, r13.z, r13.z
  mul r13.z, r13.z, l(0.318309873)
  mad r13.x, -r13.x, l(0.500000), l(1.000000)
  mad r9.w, r9.w, r13.x, r14.z
  div r9.w, l(1.000000, 1.000000, 1.000000, 1.000000), r9.w
  mad r13.x, r5.x, r13.x, r14.z
  div r13.x, l(1.000000, 1.000000, 1.000000, 1.000000), r13.x
  mul r9.w, r9.w, r13.x
  mad r13.x, r13.y, l(-5.554730), l(-6.983160)
  mul r13.x, r13.y, r13.x
  exp r13.x, r13.x
  mad r14.xyz, r10.xyzx, r13.xxxx, r1.xyzx
  mul r9.w, r9.w, r13.z
  mul r9.w, r9.w, l(0.250000)
  mul r13.xyz, r9.wwww, r14.xyzx
  movc r13.xyz, r5.yyyy, r11.wwww, r13.xyzx
  mul r14.xyz, r5.wwww, r22.xyzx
  and r15.xy, r7.wwww, l(32, 16, 0, 0)
  ine r15.xy, r15.xyxx, l(32, 16, 0, 0)
  mul r16.xyz, r12.xyzx, r14.xyzx
  and r16.xyz, r15.xxxx, r16.xyzx
  mul r13.xyz, r13.xyzx, r14.xyzx
  mul r13.xyz, r19.zzzz, r13.xyzx
  and r13.xyz, r13.xyzx, r15.yyyy
  mul r14.xyz, r12.xyzx, r22.xyzx
  mul r5.w, r12.w, r10.w
  mad r14.xyz, r14.xyzx, r5.wwww, r16.xyzx
  add r17.xyz, r14.xyzx, r17.xyzx
  add r18.xyz, r13.xyzx, r18.xyzx
  mov r2.y, r6.w
endloop
iadd r0.x, r0.y, r0.z
mov r8.w, l(1.000000)
mov r13.w, l(0)
mov r14.xyz, r17.xyzx
mov r15.xyz, r18.xyzx
mov r0.y, r0.z
loop
  uge r2.y, r0.y, r0.x
  breakc_nz r2.y
  ld_structured_indexable(structured_buffer, stride=4)(mixed,mixed,mixed,mixed) r2.y, r0.y, l(0), t9.xxxx
  iadd r5.w, r0.y, l(1)
  ld_structured_indexable(structured_buffer, stride=224)(mixed,mixed,mixed,mixed) r16.xyzw, r2.y, l(92), t10.xyzw
  ftou r6.w, r16.w
  and r7.w, r6.w, l(1)
  ieq r7.w, r7.w, l(1)
  and r7.w, r0.w, r7.w
  if_nz r7.w
    mov r0.y, r5.w
    continue
  endif
  ld_structured_indexable(structured_buffer, stride=224)(mixed,mixed,mixed,mixed) r19.xyz, r2.y, l(64), t10.xyzx
  ld_structured_indexable(structured_buffer, stride=224)(mixed,mixed,mixed,mixed) r20.xyzw, r2.y, l(108), t10.xyzw
  ld_structured_indexable(structured_buffer, stride=224)(mixed,mixed,mixed,mixed) r21.xyzw, r2.y, l(124), t10.yzwx
  ld_structured_indexable(structured_buffer, stride=224)(mixed,mixed,mixed,mixed) r22.xyzw, r2.y, l(140), t10.yzwx
  ld_structured_indexable(structured_buffer, stride=224)(mixed,mixed,mixed,mixed) r23.xyzw, r2.y, l(156), t10.yzwx
  and r7.w, r6.w, l(64)
  ieq r7.w, r7.w, l(64)
  mov r24.xyz, r20.yzwy
  mov r24.w, r21.w
  dp4 r24.x, r8.xyzw, r24.xyzw
  mov r21.w, r22.w
  dp4 r24.y, r8.xyzw, r21.xyzw
  mov r22.w, r23.w
  dp4 r24.z, r8.xyzw, r22.xyzw
  div r19.xyz, |r24.xyzx|, r19.xyzx
  max r9.w, r19.y, r19.x
  max r9.w, r19.z, r9.w
  ge r9.w, r9.w, l(1.000000)
  and r10.w, r7.w, r9.w
  mov r0.y, r5.w
  continuec_nz r10.w
  movc r9.w, r9.w, l(0), l(1.000000)
  ld_structured_indexable(structured_buffer, stride=224)(mixed,mixed,mixed,mixed) r19.xyzw, r2.y, l(0), t10.xyzw
  ld_structured_indexable(structured_buffer, stride=224)(mixed,mixed,mixed,mixed) r21.xyzw, r2.y, l(48), t10.xyzw
  add r20.yzw, -r8.xxyz, r19.xxyz
  dp3 r10.w, r20.yzwy, r20.yzwy
  rsq r10.w, r10.w
  mul r20.yzw, r10.wwww, r20.yyzw
  movc r7.w, r7.w, r9.w, l(1.000000)
  dp3 r9.w, r20.yzwy, -r21.xyzx
  add r9.w, -r20.x, r9.w
  mul_sat r9.w, r21.w, r9.w
  mul r9.w, r9.w, r9.w
  mul r10.w, r7.w, r9.w
  mad r7.w, r7.w, r9.w, l(-1.000000004E-15)
  lt r7.w, r7.w, l(0.000000)
  mov r0.y, r5.w
  continuec_nz r7.w
  ld_structured_indexable(structured_buffer, stride=224)(mixed,mixed,mixed,mixed) r7.w, r2.y, l(80), t10.xxxx
  add r22.xyz, r8.xyzx, -r19.xyzx
  dp3 r9.w, r21.xyzx, r22.xyzx
  add r7.w, -r7.w, r9.w
  lt r7.w, r7.w, l(0.000000)
  mov r0.y, r5.w
  continuec_nz r7.w
  add r7.w, -r16.y, r9.w
  lt r7.w, l(0.000000), r7.w
  mov r0.y, r5.w
  continuec_nz r7.w
  ld_structured_indexable(structured_buffer, stride=224)(mixed,mixed,mixed,mixed) r21.xyzw, r2.y, l(32), t10.xyzw
  and r7.w, r6.w, l(128)
  ieq r7.w, r7.w, l(128)
  if_nz r7.w
    and r7.w, r6.w, l(256)
    ieq r7.w, r7.w, l(256)
    mul r24.xyz, r22.xyzx, l(0.020000, 0.020000, 0.020000, 0.000000)
    dp3 r11.w, |r24.xyzx|, |r24.xyzx|
    add r12.w, r16.y, l(9.999999717E-10)
    div_sat r9.w, r9.w, r12.w
    mul r9.w, r9.w, r9.w
    mul r9.w, r9.w, r9.w
    and r7.w, r7.w, r9.w
    mad r7.w, -r7.w, r7.w, l(1.000000)
    mul r7.w, r7.w, r7.w
    add r9.w, r19.w, r11.w
    div r9.w, l(1.000000, 1.000000, 1.000000, 1.000000), r9.w
    mul r7.w, r7.w, r9.w
    mul r7.w, r10.w, r7.w
    mul r7.w, r7.w, l(0.0795798153)
  else
    div_sat r21.xyz, |r22.xyzx|, r21.xyzx
    add r21.xyz, -r21.xyzx, l(1.000000, 1.000000, 1.000000, 0.000000)
    mul r9.w, r21.y, r21.x
    mul r9.w, r21.z, r9.w
    log r9.w, r9.w
    mul r9.w, r9.w, r19.w
    exp r9.w, r9.w
    mul r7.w, r9.w, r10.w
  endif
  add r9.w, r7.w, l(-1.000000004E-15)
  lt r9.w, r9.w, l(0.000000)
  if_nz r9.w
    mov r0.y, r5.w
    continue
  endif
  ld_structured_indexable(structured_buffer, stride=224)(mixed,mixed,mixed,mixed) r22.xyzw, r2.y, l(16), t10.xyzw
  dp3 r9.w, r3.xyzx, r20.yzwy
  max r9.w, r9.w, l(0.000000)
  min r10.w, r9.w, l(1.000000)
  if_nz r1.w
    dp3_sat r11.w, r7.xyzx, -r20.yzwy
    mul r11.w, r11.w, r11.w
    dp3_sat r12.w, -r4.xyzx, r20.yzwy
    mad r11.w, r11.w, r11.w, -r12.w
    mad r11.w, r11.w, l(0.600000), r12.w
    mul r11.w, r2.w, r11.w
    mul r11.w, r11.w, l(3.000000)
  else
    mov r11.w, l(0)
  endif
  and r12.w, r6.w, l(8)
  ieq r12.w, r12.w, l(8)
  if_nz r12.w
    ld_structured_indexable(structured_buffer, stride=224)(mixed,mixed,mixed,mixed) r24.xyzw, r2.y, l(172), t10.yzwx
    ld_structured_indexable(structured_buffer, stride=224)(mixed,mixed,mixed,mixed) r25.xyzw, r2.y, l(188), t10.yzwx
    ld_structured_indexable(structured_buffer, stride=224)(mixed,mixed,mixed,mixed) r26.xyzw, r2.y, l(204), t10.xyzw
    ld_structured_indexable(structured_buffer, stride=224)(mixed,mixed,mixed,mixed) r27.w, r2.y, l(220), t10.xxxx
    mov r13.xyz, r19.xyzx
    add r19.xyzw, r8.xyzw, -r13.xyzw
    mov r23.w, r24.w
    dp4 r13.x, r19.xyzw, r23.xyzw
    mov r24.w, r25.w
    dp4 r13.y, r19.xyzw, r24.xyzw
    mov r25.w, r26.x
    dp4 r13.z, r19.xyzw, r25.xyzw
    mov r27.xyz, r26.yzwy
    dp4 r2.y, r19.xyzw, r27.xyzw
    div r13.xyz, r13.xyzx, r2.yyyy
    mad r19.xy, r13.xyxx, l(0.500000, 0.500000, 0.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)
    add r19.z, -r19.y, l(1.000000)
    mad r13.xy, r19.xzxx, cb0[7].xyxx, l(0.500000, 0.500000, 0.000000, 0.000000)
    round_ni r16.yw, r13.xxxy
    add r13.xy, r13.xyxx, -r16.ywyy
    add r16.yw, r16.yyyw, l(0.000000, -0.500000, 0.000000, -0.500000)
    mul r19.xy, r16.ywyy, cb0[7].zwzz
    mad r19.zw, -r13.yyyx, l(0.000000, 0.000000, 3.000000, 3.000000), l(0.000000, 0.000000, 4.000000, 4.000000)
    mad r21.xy, r13.xyxx, l(3.000000, 3.000000, 0.000000, 0.000000), l(1.000000, 1.000000, 0.000000, 0.000000)
    mad r23.xy, -r13.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000), l(3.000000, 3.000000, 0.000000, 0.000000)
    div r23.xy, r23.xyxx, r19.wzww
    add r23.zw, r13.xxxy, l(0.000000, 0.000000, 3.000000, 3.000000)
    mul r24.yz, r23.wwzw, l(0.000000, 0.142857149, 0.142857149, 0.000000)
    div r13.xy, r13.xyxx, r21.xyxx
    add r25.xy, r13.xyxx, l(2.000000, 2.000000, 0.000000, 0.000000)
    add r24.xw, r23.xxxy, l(-2.000000, 0.000000, 0.000000, -2.000000)
    mul r2.y, r19.z, r19.w
    mul r23.xyzw, r24.xwzw, cb0[7].zwzw
    mad r26.xy, r16.ywyy, cb0[7].zwzz, r23.xyxx
    mov r26.z, r16.z
    sample_c_lz_indexable(texture2darray)(float,float,float,float) r12.w, r26.xyzx, t5.xxxx, s5, r13.z
    mul r13.xy, r19.zwzz, l(7.000000, 7.000000, 0.000000, 0.000000)
    mad r26.xy, r16.ywyy, cb0[7].zwzz, r23.zwzz
    sample_c_lz_indexable(texture2darray)(float,float,float,float) r14.w, r26.xyzx, t5.xxxx, s5, r13.z
    mul r13.x, r13.x, r14.w
    mul r19.zw, r19.zzzw, r21.xxxy
    mov r25.zw, r24.wwwy
    mul r23.xyzw, r25.xzxw, cb0[7].zwzw
    mad r26.xy, r16.ywyy, cb0[7].zwzz, r23.xyxx
    sample_c_lz_indexable(texture2darray)(float,float,float,float) r14.w, r26.xyzx, t5.xxxx, s5, r13.z
    mad r2.y, r2.y, r12.w, r13.x
    mad r2.y, r19.z, r14.w, r2.y
    mul r27.xyzw, r24.xyzy, cb0[7].zwzw
    mad r26.xy, r16.ywyy, cb0[7].zwzz, r27.xyxx
    sample_c_lz_indexable(texture2darray)(float,float,float,float) r12.w, r26.xyzx, t5.xxxx, s5, r13.z
    mad r26.xy, r16.ywyy, cb0[7].zwzz, r27.zwzz
    sample_c_lz_indexable(texture2darray)(float,float,float,float) r13.x, r26.xyzx, t5.xxxx, s5, r13.z
    mul r13.x, r13.x, l(49.000000)
    mul r23.xy, r21.xyxx, l(7.000000, 7.000000, 0.000000, 0.000000)
    mad r26.xy, r16.ywyy, cb0[7].zwzz, r23.zwzz
    sample_c_lz_indexable(texture2darray)(float,float,float,float) r14.w, r26.xyzx, t5.xxxx, s5, r13.z
    mad r12.w, r13.y, r12.w, r13.x
    mad r12.w, r23.x, r14.w, r12.w
    add r2.y, r2.y, r12.w
    mov r24.y, r25.y
    mul r24.xyzw, r24.xyzy, cb0[7].zwzw
    mad r26.xy, r16.ywyy, cb0[7].zwzz, r24.xyxx
    sample_c_lz_indexable(texture2darray)(float,float,float,float) r12.w, r26.xyzx, t5.xxxx, s5, r13.z
    mad r26.xy, r16.ywyy, cb0[7].zwzz, r24.zwzz
    sample_c_lz_indexable(texture2darray)(float,float,float,float) r13.x, r26.xyzx, t5.xxxx, s5, r13.z
    mul r13.x, r13.x, r23.y
    mul r13.y, r21.y, r21.x
    mad r26.xy, r25.xyxx, cb0[7].zwzz, r19.xyxx
    sample_c_lz_indexable(texture2darray)(float,float,float,float) r13.z, r26.xyzx, t5.xxxx, s5, r13.z
    mad r12.w, r19.w, r12.w, r13.x
    mad r12.w, r13.y, r13.z, r12.w
    add r2.y, r2.y, r12.w
    mul r2.y, r2.y, l(0.00694444450)
    max r2.y, r22.w, r2.y
    mul r7.w, r2.y, r7.w
  endif
  mul r2.y, r10.w, r7.w
  mad r12.w, r7.w, r10.w, l(-1.000000004E-15)
  lt r12.w, r12.w, l(0.000000)
  add r13.x, r11.w, l(-1.000000004E-15)
  lt r13.x, r13.x, l(0.000000)
  and r12.w, r12.w, r13.x
  if_nz r12.w
    mov r0.y, r5.w
    continue
  endif
  max r12.w, r2.x, r21.w
  mad r13.xyz, r6.xyzx, r3.wwww, r20.yzwy
  dp3 r14.w, r13.xyzx, r13.xyzx
  rsq r14.w, r14.w
  mul r13.xyz, r13.xyzx, r14.wwww
  dp3 r14.w, r7.xyzx, r13.xyzx
  max r14.w, r14.w, l(0.000000)
  min r15.w, r14.w, l(1.000000)
  dp3 r13.x, r3.xyzx, r13.xyzx
  max r13.x, r13.x, l(0.000000)
  min r13.y, r13.x, l(1.000000)
  mul r13.xz, r13.xxyx, r13.xxyx
  mad r16.y, r15.w, l(-5.554730), l(-6.983160)
  mul r15.w, r15.w, r16.y
  exp r15.w, r15.w
  mad r15.w, r2.z, r15.w, r4.w
  mad r16.yz, -r13.yyyy, r13.yyyy, l(0.000000, 1.000001, 1.000000, 0.000000)
  div r13.y, r13.z, r16.y
  mul r12.w, r12.w, r12.w
  mul r13.z, r12.w, l(0.500000)
  mad r16.y, r12.w, l(4.000000), l(1.000000)
  mul r16.y, r16.y, l(3.14159274)
  div r16.y, l(1.000000, 1.000000, 1.000000, 1.000000), r16.y
  div r13.y, -r13.y, r12.w
  mul r13.y, r13.y, l(1.442695)
  exp r13.y, r13.y
  mul r13.y, r13.y, l(4.000000)
  mad r16.z, r16.z, r16.z, l(1.000000012E-07)
  div r13.y, r13.y, r16.z
  add r13.y, r13.y, l(1.000000)
  mul r13.y, r13.y, r16.y
  add r16.y, r5.z, r10.w
  mad r10.w, -r10.w, r5.z, r16.y
  mad r10.w, r10.w, l(4.000000), l(1.000000012E-07)
  div r10.w, l(1.000000, 1.000000, 1.000000, 1.000000), r10.w
  mul r13.y, r15.w, r13.y
  mul r10.w, r10.w, r13.y
  mad r13.y, r12.w, r12.w, l(-1.000000)
  mad r13.x, r13.x, r13.y, l(1.000000)
  max r13.x, r13.x, l(1.000000012E-07)
  div r13.x, r12.w, r13.x
  mul r13.x, r13.x, r13.x
  mul r13.x, r13.x, l(0.318309873)
  mad r12.w, -r12.w, l(0.500000), l(1.000000)
  mad r9.w, r9.w, r12.w, r13.z
  div r9.w, l(1.000000, 1.000000, 1.000000, 1.000000), r9.w
  mad r12.w, r5.x, r12.w, r13.z
  div r12.w, l(1.000000, 1.000000, 1.000000, 1.000000), r12.w
  mul r9.w, r9.w, r12.w
  mad r12.w, r14.w, l(-5.554730), l(-6.983160)
  mul r12.w, r14.w, r12.w
  exp r12.w, r12.w
  mad r16.yzw, r10.xxyz, r12.wwww, r1.xxyz
  mul r9.w, r9.w, r13.x
  mul r9.w, r9.w, l(0.250000)
  mul r13.xyz, r9.wwww, r16.yzwy
  movc r13.xyz, r5.yyyy, r10.wwww, r13.xyzx
  mul r16.yzw, r2.yyyy, r22.xxyz
  and r19.xy, r6.wwww, l(32, 16, 0, 0)
  ine r19.xy, r19.xyxx, l(32, 16, 0, 0)
  mul r20.xyz, r12.xyzx, r16.yzwy
  and r19.xzw, r19.xxxx, r20.xxyz
  mul r13.xyz, r13.xyzx, r16.yzwy
  mul r13.xyz, r16.xxxx, r13.xyzx
  and r13.xyz, r13.xyzx, r19.yyyy
  mul r16.xyz, r12.xyzx, r22.xyzx
  mul r2.y, r11.w, r7.w
  mad r16.xyz, r16.xyzx, r2.yyyy, r19.xzwx
  add r14.xyz, r14.xyzx, r16.xyzx
  add r15.xyz, r13.xyzx, r15.xyzx
  mov r0.y, r5.w
endloop
dp3 r0.x, cb0[8].xyzx, cb0[8].xyzx
rsq r0.x, r0.x
mul r0.xyz, r0.xxxx, cb0[8].xyzx
max r0.w, r2.x, l(0.040000)
if_nz r5.y
  mad r12.xyz, r6.xyzx, r3.wwww, r0.xyzx
  dp3 r2.x, r12.xyzx, r12.xyzx
  rsq r2.x, r2.x
  mul r12.xyz, r2.xxxx, r12.xyzx
  dp3_sat r2.x, r7.xyzx, r12.xyzx
  dp3_sat r2.y, r3.xyzx, r12.xyzx
  mul r5.y, r2.y, r2.y
  dp3_sat r5.w, r3.xyzx, r0.xyzx
  mad r6.w, r2.x, l(-5.554730), l(-6.983160)
  mul r2.x, r2.x, r6.w
  exp r2.x, r2.x
  mad r2.x, r2.z, r2.x, r4.w
  mad r2.yz, -r2.yyyy, r2.yyyy, l(0.000000, 1.000001, 1.000000, 0.000000)
  div r2.y, r5.y, r2.y
  mul r4.w, r0.w, r0.w
  mad r5.y, r4.w, l(4.000000), l(1.000000)
  mul r5.y, r5.y, l(3.14159274)
  div r5.y, l(1.000000, 1.000000, 1.000000, 1.000000), r5.y
  div r2.y, -r2.y, r4.w
  mul r2.y, r2.y, l(1.442695)
  exp r2.y, r2.y
  mul r2.y, r2.y, l(4.000000)
  mad r2.z, r2.z, r2.z, l(1.000000012E-07)
  div r2.y, r2.y, r2.z
  add r2.y, r2.y, l(1.000000)
  mul r2.y, r2.y, r5.y
  add r2.z, r5.z, r5.w
  mad r2.z, -r5.w, r5.z, r2.z
  mad r2.z, r2.z, l(4.000000), l(1.000000012E-07)
  div r2.z, l(1.000000, 1.000000, 1.000000, 1.000000), r2.z
  mul r2.x, r2.x, r2.y
  mul r2.xyz, r2.zzzz, r2.xxxx
  mov r11.xyz, r9.xyzx
else
  mad r5.yzw, r6.xxyz, r3.wwww, r0.xxyz
  dp3 r3.w, r5.yzwy, r5.yzwy
  rsq r3.w, r3.w
  mul r5.yzw, r3.wwww, r5.yyzw
  dp3 r3.w, r7.xyzx, r5.yzwy
  max r3.w, r3.w, l(0.000000)
  dp3 r4.w, r3.xyzx, r5.yzwy
  max r4.w, r4.w, l(0.000000)
  dp3 r5.y, r3.xyzx, r0.xyzx
  max r5.y, r5.y, l(0.000000)
  mul r0.w, r0.w, r0.w
  mul r4.w, r4.w, r4.w
  mad r5.z, r0.w, r0.w, l(-1.000000)
  mad r4.w, r4.w, r5.z, l(1.000000)
  max r4.w, r4.w, l(1.000000012E-07)
  div r4.w, r0.w, r4.w
  mul r4.w, r4.w, r4.w
  mul r4.w, r4.w, l(0.318309873)
  mul r5.z, r0.w, l(0.500000)
  mad r0.w, -r0.w, l(0.500000), l(1.000000)
  mad r5.y, r5.y, r0.w, r5.z
  div r5.y, l(1.000000, 1.000000, 1.000000, 1.000000), r5.y
  mad r0.w, r5.x, r0.w, r5.z
  div r0.w, l(1.000000, 1.000000, 1.000000, 1.000000), r0.w
  mul r0.w, r0.w, r5.y
  mad r5.x, r3.w, l(-5.554730), l(-6.983160)
  mul r3.w, r3.w, r5.x
  exp r3.w, r3.w
  mad r1.xyz, r10.xyzx, r3.wwww, r1.xyzx
  mul r0.w, r0.w, r4.w
  mul r0.w, r0.w, l(0.250000)
  mul r2.xyz, r0.wwww, r1.xyzx
endif
if_nz r1.w
  dp3_sat r0.w, r7.xyzx, -r0.xyzx
  mul r0.w, r0.w, r0.w
  dp3_sat r1.x, -r4.xyzx, r0.xyzx
  mad r0.w, r0.w, r0.w, -r1.x
  mad r0.w, r0.w, l(0.600000), r1.x
  mul r0.w, r2.w, r0.w
  mul r0.w, r0.w, l(3.000000)
else
  mov r0.w, l(0)
endif
dp3_sat r0.x, r3.xyzx, r0.xyzx
mad r1.xyz, r3.xyzx, cb0[3].zzzz, r8.xyzx
mov r1.w, l(1.000000)
dp4 r0.y, r1.xyzw, cb0[17].xyzw
dp4 r0.z, r1.xyzw, cb0[18].xyzw
dp4 r3.w, r1.xyzw, cb0[19].xyzw
add r4.xy, -cb0[10].zwzz, l(1.000000, 1.000000, 0.000000, 0.000000)
mad r0.yz, r0.yyzy, l(0.000000, 0.500000, 0.500000, 0.000000), l(0.000000, 0.500000, 0.500000, 0.000000)
mul r4.zw, cb0[10].zzzw, l(0.000000, 0.000000, 5.000000, 5.000000)
lt r4.zw, r4.zzzw, r0.yyyz
and r2.w, r4.w, r4.z
mad r4.zw, -cb0[10].zzzw, l(0.000000, 0.000000, 5.000000, 5.000000), l(0.000000, 0.000000, 1.000000, 1.000000)
lt r4.zw, r0.yyyz, r4.zzzw
and r2.w, r2.w, r4.z
and r2.w, r4.w, r2.w
mov r3.x, l(0)
mul r3.yz, r0.yyzy, l(0.000000, 0.333333343, 1.000000, 0.000000)
movc r3.xyzw, r2.wwww, r3.xyzw, l(1.000000,0,0,0)
dp4 r0.y, r1.xyzw, cb0[11].xyzw
dp4 r0.z, r1.xyzw, cb0[12].xyzw
dp4 r5.w, r1.xyzw, cb0[13].xyzw
mad r0.yz, r0.yyzy, l(0.000000, 0.500000, 0.500000, 0.000000), l(0.000000, 0.500000, 0.500000, 0.000000)
ieq r4.z, r2.w, l(0)
lt r6.xy, cb0[10].zwzz, r0.yzyy
and r4.z, r4.z, r6.x
and r4.z, r6.y, r4.z
lt r4.xy, r0.yzyy, r4.xyxx
and r4.x, r4.x, r4.z
and r4.x, r4.y, r4.x
mov r5.x, l(0)
mad r5.yz, r0.yyzy, l(0.000000, 0.333333343, 1.000000, 0.000000), l(0.000000, 0.333333343, 0.000000, 0.000000)
movc r3.xyzw, r4.xxxx, r5.xyzw, r3.xyzw
or r0.y, r2.w, r4.x
dp4 r4.x, r1.xyzw, cb0[14].xyzw
dp4 r4.y, r1.xyzw, cb0[15].xyzw
dp4 r1.w, r1.xyzw, cb0[16].xyzw
mad r4.zw, r4.xxxy, l(0.000000, 0.000000, 0.500000, 0.500000), l(0.000000, 0.000000, 0.500000, 0.500000)
dp2 r0.z, r4.xyxx, r4.xyxx
add r0.z, r0.z, l(-0.800000)
mul_sat r1.x, r0.z, l(5.000000)
mad r1.yz, r4.zzwz, l(0.000000, 0.333333343, 1.000000, 0.000000), l(0.000000, 0.666666687, 0.000000, 0.000000)
movc r1.xyzw, r0.yyyy, r3.xyzw, r1.xyzw
add r0.y, -r1.w, l(1.000000)
mad r1.yz, r1.yyzy, l(0.000000, 1.000000, -1.000000, 0.000000), l(0.000000, 0.000000, 1.000000, 0.000000)
mad r1.yz, r1.yyzy, cb0[10].xxyx, l(0.000000, 0.500000, 0.500000, 0.000000)
round_ni r3.xy, r1.yzyy
add r1.yz, r1.yyzy, -r3.xxyx
add r3.xy, r3.xyxx, l(-0.500000, -0.500000, 0.000000, 0.000000)
mul r3.xy, r3.xyxx, cb0[10].zwzz
mad r3.zw, -r1.zzzy, l(0.000000, 0.000000, 3.000000, 3.000000), l(0.000000, 0.000000, 4.000000, 4.000000)
mad r4.xy, r1.yzyy, l(3.000000, 3.000000, 0.000000, 0.000000), l(1.000000, 1.000000, 0.000000, 0.000000)
mad r4.zw, -r1.yyyz, l(0.000000, 0.000000, 2.000000, 2.000000), l(0.000000, 0.000000, 3.000000, 3.000000)
div r4.zw, r4.zzzw, r3.wwwz
add r5.xy, r1.yzyy, l(3.000000, 3.000000, 0.000000, 0.000000)
mul r5.yz, r5.yyxy, l(0.000000, 0.142857149, 0.142857149, 0.000000)
div r1.yz, r1.yyzy, r4.xxyx
add r6.xy, r1.yzyy, l(2.000000, 2.000000, 0.000000, 0.000000)
add r5.xw, r4.zzzw, l(-2.000000, 0.000000, 0.000000, -2.000000)
mul r0.z, r3.z, r3.w
mad r7.xyzw, r5.xwzw, cb0[10].zwzw, r3.xyxy
sample_c_lz_indexable(texture2d)(float,float,float,float) r1.y, r7.xyxx, t7.xxxx, s7, r0.y
mul r1.zw, r3.zzzw, l(0.000000, 0.000000, 7.000000, 7.000000)
sample_c_lz_indexable(texture2d)(float,float,float,float) r2.w, r7.zwzz, t7.xxxx, s7, r0.y
mul r1.z, r1.z, r2.w
mul r3.zw, r3.zzzw, r4.xxxy
mov r6.zw, r5.wwwy
mad r7.xyzw, r6.xzxw, cb0[10].zwzw, r3.xyxy
sample_c_lz_indexable(texture2d)(float,float,float,float) r2.w, r7.xyxx, t7.xxxx, s7, r0.y
mad r0.z, r0.z, r1.y, r1.z
mad r0.z, r3.z, r2.w, r0.z
mad r8.xyzw, r5.xyzy, cb0[10].zwzw, r3.xyxy
sample_c_lz_indexable(texture2d)(float,float,float,float) r1.y, r8.xyxx, t7.xxxx, s7, r0.y
sample_c_lz_indexable(texture2d)(float,float,float,float) r1.z, r8.zwzz, t7.xxxx, s7, r0.y
mul r1.z, r1.z, l(49.000000)
mul r4.zw, r4.xxxy, l(0.000000, 0.000000, 7.000000, 7.000000)
sample_c_lz_indexable(texture2d)(float,float,float,float) r2.w, r7.zwzz, t7.xxxx, s7, r0.y
mad r1.y, r1.w, r1.y, r1.z
mad r1.y, r4.z, r2.w, r1.y
add r0.z, r0.z, r1.y
mov r5.y, r6.y
mad r5.xyzw, r5.xyzy, cb0[10].zwzw, r3.xyxy
sample_c_lz_indexable(texture2d)(float,float,float,float) r1.y, r5.xyxx, t7.xxxx, s7, r0.y
sample_c_lz_indexable(texture2d)(float,float,float,float) r1.z, r5.zwzz, t7.xxxx, s7, r0.y
mul r1.z, r1.z, r4.w
mul r1.w, r4.y, r4.x
mad r3.xy, r6.xyxx, cb0[10].zwzz, r3.xyxx
sample_c_lz_indexable(texture2d)(float,float,float,float) r0.y, r3.xyxx, t7.xxxx, s7, r0.y
mad r1.y, r3.w, r1.y, r1.z
mad r0.y, r1.w, r0.y, r1.y
add r0.y, r0.y, r0.z
mul r0.y, r0.y, l(0.00694444450)
max r0.y, r1.x, r0.y
max r0.y, r0.y, cb0[9].w
mul r1.xyz, r0.yyyy, cb0[9].xyzx
mul r0.xyz, r0.xxxx, r1.xyzx
mul r1.xyz, r1.xyzx, r11.xyzx
mul r1.xyz, r0.wwww, r1.xyzx
mad r1.xyz, r0.xyzx, r11.xyzx, r1.xyzx
add r1.xyz, r1.xyzx, r14.xyzx
mul r0.xyz, r2.xyzx, r0.xyzx
mad r0.xyz, r0.xyzx, cb0[8].wwww, r15.xyzx
add o0.xyz, r0.xyzx, r1.xyzx
dp3 o0.w, r1.xyzx, l(0.212600, 0.715200, 0.072200, 0.000000)
ret
// Approximately 851 instruction slots used
