//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
//   using 3Dmigoto v1.2.67 on Mon Jan 01 13:11:45 2018
//
//
// Buffer Definitions: 
//
// cbuffer $Globals
// {
//
//   struct
//   {
//       
//       float4x4 mLightSpaceInverse;   // Offset:    0
//       float4x4 mLightSpace;          // Offset:   64
//       float4 vShadowBias;            // Offset:  128
//       float4 vBiasDir;               // Offset:  144
//       float4 vSmoothOffs;            // Offset:  160
//       float4 vShadowsDesc;           // Offset:  176
//       float4 avCPlane[8];            // Offset:  192
//       float4 avCascadeZ[2];          // Offset:  320
//       float4 avUVTransform[8];       // Offset:  352
//       float4 avZTransformZF[8];      // Offset:  480
//
//   } g_ShadSettings;                  // Offset:    0 Size:   608
//   float4x4 g_mCloudsShadowsSpace;    // Offset:  608 Size:    64
//   float4 g_vCloudsShadowDesc;        // Offset:  672 Size:    16 [unused]
//   float4 specColor;                  // Offset:  688 Size:    16 [unused]
//   float4 ControlData;                // Offset:  704 Size:    16 [unused]
//   float4 difColor;                   // Offset:  720 Size:    16 [unused]
//   float4 ambient;                    // Offset:  736 Size:    16 [unused]
//   float4 lightCount;                 // Offset:  752 Size:    16
//   float4 g_avLightPos[4];            // Offset:  768 Size:    64
//   float4 g_avLightColor[4];          // Offset:  832 Size:    64
//   float4 g_avConeDir[4];             // Offset:  896 Size:    64
//   float4 g_vAmbientSettings;         // Offset:  960 Size:    16 [unused]
//   float4 g_avColorMask[2];           // Offset:  976 Size:    32 [unused]
//   float4 g_vParalaxMaskData;         // Offset: 1008 Size:    16
//   float4 Offset_Time;                // Offset: 1024 Size:    16
//   float AlphaDensity;                // Offset: 1040 Size:     4 [unused]
//      = 0x3c75c28f 
//   float4x4 ViewProjection;           // Offset: 1056 Size:    64
//   float4 RenderPos;                  // Offset: 1120 Size:    16
//   float4 g_vWorldPos;                // Offset: 1136 Size:    16
//   float4 GlobalK;                    // Offset: 1152 Size:    16
//   float4 g_vGrassSettings;           // Offset: 1168 Size:    16
//      = 0x3f333333 0x3f800000 0x00000000 0x00000000 
//   float4 g_avCapsules[32];           // Offset: 1184 Size:   512
//   float4 nc[4];                      // Offset: 1696 Size:    64 [unused]
//   float4 pc;                         // Offset: 1760 Size:    16
//   float4 pcInfo;                     // Offset: 1776 Size:    16
//   float4 TileUV;                     // Offset: 1792 Size:    16
//   float4 TreeShInfo;                 // Offset: 1808 Size:    16
//   float4 g_vMaxDistance;             // Offset: 1824 Size:    16
//   float4 g_vAsyncTexScale;           // Offset: 1840 Size:    16
//      = 0x3f800000 0x3f800000 0x00000000 0x00000000 
//   float PI;                          // Offset: 1856 Size:     4 [unused]
//      = 0x40490fdb 
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// $Globals                          cbuffer      NA          NA    0        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyz         0     NONE   float   xyz 
// TEXCOORD                 0   xyz         1     NONE   float   xyz 
// TEXCOORD                 1   xyz         2     NONE   float   xyz 
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float   xyzw
// TEXCOORD                 0   xyzw        1     NONE   float   xyzw
// TEXCOORD                 1   xy          2     NONE   float   xy  
// TEXCOORD                 2     zw        2     NONE   float     zw
// TEXCOORD                 3   xyzw        3     NONE   float   xyzw
// TEXCOORD                 4   xyzw        4     NONE   float   xyzw
// TEXCOORD                 5   xyzw        5     NONE   float   xyzw
// TEXCOORD                 6   xyz         6     NONE   float   xyz 
// TEXCOORD                 7   xyz         7     NONE   float   xyz 
// COLOR                    0   xy          8     NONE   float   xy  
//
vs_4_1
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[116], dynamicIndexed
dcl_input v0.xyz
dcl_input v1.xyz
dcl_input v2.xyz
dcl_output_siv o0.xyzw, position
dcl_output o1.xyzw
dcl_output o2.xy
dcl_output o2.zw
dcl_output o3.xyzw
dcl_output o4.xyzw
dcl_output o5.xyzw
dcl_output o6.xyz
dcl_output o7.xyz
dcl_output o8.xy
// dcl_temps updated : previous = dcl_temps 26
dcl_temps 29
// added 3dmigoto declaration
dcl_resource_texture1d (float,float,float,float) t120
ld_indexable(texture1d)(float,float,float,float) r27.xyzw, l(0, 0, 0, 0), t120.xyzw
mov r28.x, r27.w
mov r28.y, r27.w
mov r28.zw, l(1.0, 1.0)
// end of 3dmigoto declaration
lt r0.x, v2.z, cb0[72].x
if_nz r0.x
  dp3 r0.x, v1.xyzx, v1.xyzx
  rsq r0.x, r0.x
  mul r0.xyz, r0.xxxx, v1.xyzx
  add r0.w, v0.y, v0.y
  add r1.xy, v0.xzxx, cb0[71].xzxx
  lt r1.z, cb0[73].w, l(0.500000)
  if_nz r1.z
    mov r1.w, l(0)
  endif 
  if_z r1.z
    min r1.z, cb0[73].w, l(16.000000)
    ftoi r1.z, r1.z
    add r2.xyzw, -cb0[110].wwxx, cb0[110].yzzy
    ge r3.x, v0.y, l(0.000000)
    mul r3.y, v0.y, l(0.100000)
    mov r4.xz, v0.xxzx
    mov r4.y, l(0)
    mov r5.xz, -r4.xxzx
    mul r3.z, |v0.y|, l(0.200000)
    dp2 r3.w, r0.xzxx, r0.xzxx
    rsq r3.w, r3.w
    mul r6.xy, r0.xzxx, r3.wwww
    mov r7.w, l(0)
    mov r8.xz, r5.xxzx
    mov r9.w, l(0)
    mov r10.xz, r8.xxzx
    mov r11.w, l(0)
    mov r12.xyz, l(0,0,0,0)
    mov r13.xyz, l(0,0,0,0)
    mov r3.w, l(0)
    mov r1.w, l(0)
    mov r4.w, l(0)
    mov r5.y, l(0)
    loop 
      ige r6.z, r4.w, r1.z
      breakc_nz r6.z
      iadd r6.zw, r5.yyyy, l(0, 0, 1, 2)
      add r14.xyz, cb0[r5.y + 74].xyzx, cb0[r6.z + 74].xyzx
      add r15.xyz, -cb0[70].xyzx, cb0[r5.y + 74].xyzx
      add r14.xyz, r14.xyzx, -cb0[70].xyzx
      add r16.xy, r15.xzxx, -cb0[111].xzxx
      mad r16.xy, cb0[111].wwww, l(0.500000, 0.500000, 0.000000, 0.000000), r16.xyxx
      div r16.xy, r16.xyxx, cb0[111].wwww
      add r8.w, -r16.x, l(1.000000)
      lt r10.w, r8.w, r16.y
      if_nz r10.w
        mad r8.w, r8.w, r2.x, cb0[110].w
        add r10.w, -r16.y, l(1.000000)
        mad r8.w, r10.w, r2.y, r8.w
      else 
        mad r10.w, r16.x, r2.z, cb0[110].x
        mad r8.w, r16.y, r2.w, r10.w
      endif 
      add r8.w, r8.w, -cb0[71].y
      add r8.w, -r8.w, r15.y
      add r16.xy, r14.xzxx, -cb0[111].xzxx
      mad r16.xy, cb0[111].wwww, l(0.500000, 0.500000, 0.000000, 0.000000), r16.xyxx
      div r16.xy, r16.xyxx, cb0[111].wwww
      add r10.w, -r16.x, l(1.000000)
      lt r12.w, r10.w, r16.y
      if_nz r12.w
        mad r10.w, r10.w, r2.x, cb0[110].w
        add r12.w, -r16.y, l(1.000000)
        mad r10.w, r12.w, r2.y, r10.w
      else 
        mad r12.w, r16.x, r2.z, cb0[110].x
        mad r10.w, r16.y, r2.w, r12.w
      endif 
      add r10.w, r10.w, -cb0[71].y
      add r10.w, -r10.w, r14.y
      max r15.w, r8.w, l(0.000000)
      max r14.w, r10.w, l(0.000000)
      add r16.xyz, -r15.xwzx, r14.xwzx
      dp3 r8.w, r16.xyzx, r16.xyzx
      rsq r10.w, r8.w
      mul r16.xyz, r10.wwww, r16.xyzx
      mul r17.xyz, r16.xyzx, cb0[r6.z + 74].wwww
      add r18.xyz, -r15.zxwz, v0.zxyz
      dp3 r10.w, r18.xyzx, r18.xyzx
      sqrt r12.w, r10.w
      sqrt r8.w, r8.w
      add r8.w, r8.w, cb0[r5.y + 74].w
      div r8.w, r12.w, r8.w
      add_sat r8.w, -r8.w, l(1.000000)
      mul r17.xyz, r8.wwww, r17.xyzx
      dp3 r8.w, r18.yzxy, r16.xyzx
      lt r13.w, r8.w, l(0.000000)
      if_nz r13.w
        lt r13.w, cb0[r6.z + 74].w, l(0.000000)
        if_nz r13.w
          div r13.w, r12.w, cb0[r5.y + 74].w
          add_sat r13.w, -r13.w, l(1.000000)
          lt r14.y, l(0.000000), r13.w
          if_nz r14.y
            if_nz r3.x
              mul r19.xyz, r18.xyzx, l(1.000000, 0.000000, 0.000000, 0.000000)
              mad r19.xyz, r18.zxyz, l(0.000000, 0.000000, 1.000000, 0.000000), -r19.xyzx
              dp2 r14.y, r19.xzxx, r19.xzxx
              rsq r20.x, r14.y
              mul r20.yzw, r19.xxyz, r20.xxxx
              mul r19.xyz, r20.wyxw, l(1.000000, 0.000000, 0.000000, 0.000000)
              mad r19.xyz, r20.xwyx, l(0.000000, 0.000000, 1.000000, 0.000000), -r19.xyzx
              dp2 r14.y, r19.xzxx, r19.xzxx
              rsq r14.y, r14.y
              mul r19.xyz, r14.yyyy, r19.xyzx
              mul r21.xyz, r20.zwyz, r19.zxyz
              mad r21.xyz, r19.yzxy, r20.wyzw, -r21.xyzx
              add r22.xyz, r4.xyzx, -r15.xwzx
              mul r23.xyz, r0.yyyy, r21.xyzx
              mad r23.xyz, r19.xyzx, r0.xxxx, r23.xyzx
              mad r23.yzw, r20.yyzw, r0.zzzz, r23.xxyz
              mul r24.xyz, r18.zzzz, r21.xyzx
              mad r18.yzw, r19.xxyz, r18.yyyy, r24.xxyz
              mad r18.xyz, r20.yzwy, r18.xxxx, r18.yzwy
              mul r21.xz, r21.xxyx, r22.yyyy
              mad r19.yw, r19.xxxy, r22.xxxx, r21.xxxz
              mad r19.yw, r20.yyyz, r22.zzzz, r19.yyyw
              add r20.xz, r18.xxyx, -r19.yywy
              dp2 r14.y, r20.xzxx, r20.xzxx
              sqrt r15.y, r14.y
              max r16.w, r15.y, cb0[r5.y + 74].w
              min r17.w, r15.y, cb0[r5.y + 74].w
              mul r17.w, r17.w, r17.w
              mad r16.w, r16.w, r16.w, -r17.w
              sqrt r16.w, r16.w
              dp2 r17.w, r19.ywyy, r19.ywyy
              sqrt r18.w, r17.w
              rsq r21.x, r17.w
              mul r22.xy, r19.ywyy, r21.xxxx
              lt r21.x, r19.y, l(0.000000)
              if_nz r21.x
                mov r22.z, -r22.y
                mov r21.zw, -r22.zzzx
              else 
                mov r22.w, -r22.y
                mov r21.zw, r22.wwwx
              endif 
              lt r22.z, r16.w, r18.w
              lt r22.w, cb0[r5.y + 74].w, r15.y
              or r22.z, r22.w, r22.z
              if_nz r22.z
                add r17.w, r14.y, r17.w
                mul r22.z, cb0[r5.y + 74].w, cb0[r5.y + 74].w
                mad r17.w, -cb0[r5.y + 74].w, cb0[r5.y + 74].w, r17.w
                add r22.w, r18.w, r18.w
                div r17.w, r17.w, r22.w
                mad r17.w, -r17.w, r17.w, r14.y
                lt r22.w, l(0.000000), r17.w
                if_nz r22.w
                  sqrt r17.w, r17.w
                  mad r22.z, -r17.w, r17.w, r22.z
                  sqrt r22.z, r22.z
                  lt r16.w, r18.w, r16.w
                  if_nz r16.w
                    mov r22.z, -r22.z
                  endif 
                  mul r24.xy, r17.wwww, r21.zwzz
                  mad r18.xy, r22.xyxx, r22.zzzz, r24.xyxx
                endif 
              else 
                mad r18.xy, r21.zwzz, r15.yyyy, r19.ywyy
              endif 
              add r19.yw, -r19.yyyw, r18.xxxy
              rsq r14.y, r14.y
              mul r20.xz, r14.yyyy, r20.xxzx
              dp2 r14.y, r19.ywyy, r19.ywyy
              rsq r14.y, r14.y
              mul r19.yw, r14.yyyy, r19.yyyw
              dp2 r14.y, r20.xzxx, r19.ywyy
              add r15.y, -|r14.y|, l(1.000000)
              sqrt r15.y, r15.y
              mad r16.w, |r14.y|, l(-0.0187292993), l(0.074261)
              mad r16.w, r16.w, |r14.y|, l(-0.212114394)
              mad r16.w, r16.w, |r14.y|, l(1.57072878)
              mul r17.w, r15.y, r16.w
              mad r17.w, r17.w, l(-2.000000), l(3.14159274)
              lt r14.y, r14.y, -r14.y
              and r14.y, r14.y, r17.w
              mad r14.y, r16.w, r15.y, r14.y
              if_z r21.x
                mov r14.y, -r14.y
              endif 
              sincos r20.x, r21.x, r14.y
              mul r19.yw, r20.xxxx, r23.zzzy
              mad r23.x, r23.y, r21.x, -r19.y
              mad r14.y, r23.z, r21.x, r19.w
              dp2 r22.x, r19.xzxx, r18.xzxx
              mul r22.y, r18.y, r21.y
              dp2 r22.z, r20.ywyy, r18.xzxx
              add r18.xzw, r15.xxzw, r22.xxzy
              dp2 r19.x, r19.xzxx, r23.xwxx
              mul r19.y, r14.y, r21.y
              dp2 r19.z, r20.ywyy, r23.xwxx
              max r18.y, r3.y, r18.w
            else 
              mov r18.xyz, v0.xyzx
              mov r19.xyz, r0.xyzx
            endif 
          else 
            mov r18.xyz, v0.xyzx
            mov r19.xyz, r0.xyzx
          endif 
        else 
          div r12.w, r12.w, cb0[r5.y + 74].w
          add_sat r13.w, -r12.w, l(1.000000)
          lt r12.w, l(0.000000), r13.w
          if_nz r12.w
            mul r20.xyz, r13.wwww, r17.xyzx
            dp3 r12.w, r20.xyzx, r20.xyzx
            sqrt r12.w, r12.w
            mul r20.xyz, r20.xyzx, |v0.yyyy|
            mul r7.xyz, r20.xyzx, l(5.000000, 5.000000, 5.000000, 0.000000)
            mov r5.w, r7.y
            add r20.xyz, r5.xwzx, v0.xyzx
            add r7.xyz, r7.xwzx, r20.xyzx
            dp3 r5.w, r7.xyzx, r7.xyzx
            rsq r5.w, r5.w
            mul r7.xyz, r5.wwww, r7.xyzx
            mad r7.xyz, r7.xyzx, |v0.yyyy|, r4.xyzx
            max r18.y, r3.z, r7.y
            mad r5.w, cb0[64].z, l(300.000000), r7.x
            sincos null, r5.w, r5.w
            mul r20.xy, r6.xyxx, r5.wwww
            mul r20.xy, r12.wwww, r20.xyxx
            mul r20.xy, r18.yyyy, r20.xyxx
            mad r18.xz, r20.xxyx, l(0.500000, 0.000000, 0.500000, 0.000000), r7.xxzx
          else 
            mov r18.xyz, v0.xyzx
          endif 
          mov r19.xyz, r0.xyzx
        endif 
      else 
        add r7.xyz, -r14.xwzx, v0.xyzx
        dp3 r5.w, r7.xyzx, r16.xyzx
        lt r5.w, l(0.000000), r5.w
        if_nz r5.w
          lt r5.w, cb0[r6.z + 74].w, l(0.000000)
          if_nz r5.w
            dp3 r5.w, r7.xyzx, r7.xyzx
            sqrt r5.w, r5.w
            div r5.w, r5.w, cb0[r5.y + 74].w
            add_sat r13.w, -r5.w, l(1.000000)
            lt r5.w, l(0.000000), r13.w
            if_nz r5.w
              if_nz r3.x
                mul r20.xyz, r7.zxyz, l(1.000000, 0.000000, 0.000000, 0.000000)
                mad r20.xyz, r7.yzxy, l(0.000000, 0.000000, 1.000000, 0.000000), -r20.xyzx
                dp2 r5.w, r20.xzxx, r20.xzxx
                rsq r21.x, r5.w
                mul r21.yzw, r20.xxyz, r21.xxxx
                mul r20.xyz, r21.wyxw, l(1.000000, 0.000000, 0.000000, 0.000000)
                mad r20.xyz, r21.xwyx, l(0.000000, 0.000000, 1.000000, 0.000000), -r20.xyzx
                dp2 r5.w, r20.xzxx, r20.xzxx
                rsq r5.w, r5.w
                mul r20.xyz, r5.wwww, r20.xyzx
                mul r22.xyz, r21.zwyz, r20.zxyz
                mad r22.xyz, r20.yzxy, r21.wyzw, -r22.xyzx
                add r23.xyz, r4.xyzx, -r14.xwzx
                mul r24.xyz, r0.yyyy, r22.xyzx
                mad r24.xyz, r20.xyzx, r0.xxxx, r24.xyzx
                mad r24.yzw, r21.yyzw, r0.zzzz, r24.xxyz
                mul r25.xyz, r7.yyyy, r22.xyzx
                mad r25.xyz, r20.xyzx, r7.xxxx, r25.xyzx
                mad r25.xyz, r21.yzwy, r7.zzzz, r25.xyzx
                mul r22.xz, r22.xxyx, r23.yyyy
                mad r20.yw, r20.xxxy, r23.xxxx, r22.xxxz
                mad r20.yw, r21.yyyz, r23.zzzz, r20.yyyw
                add r21.xz, -r20.yywy, r25.xxyx
                dp2 r5.w, r21.xzxx, r21.xzxx
                sqrt r12.w, r5.w
                max r14.y, r12.w, cb0[r5.y + 74].w
                min r15.y, r12.w, cb0[r5.y + 74].w
                mul r15.y, r15.y, r15.y
                mad r14.y, r14.y, r14.y, -r15.y
                sqrt r14.y, r14.y
                dp2 r15.y, r20.ywyy, r20.ywyy
                sqrt r16.w, r15.y
                rsq r17.w, r15.y
                mul r23.xy, r17.wwww, r20.ywyy
                lt r17.w, r20.y, l(0.000000)
                if_nz r17.w
                  mov r23.z, -r23.y
                  mov r22.xz, -r23.zzxz
                else 
                  mov r23.w, -r23.y
                  mov r22.xz, r23.wwxw
                endif 
                lt r19.w, r14.y, r16.w
                lt r22.w, cb0[r5.y + 74].w, r12.w
                or r19.w, r19.w, r22.w
                if_nz r19.w
                  add r15.y, r5.w, r15.y
                  mul r19.w, cb0[r5.y + 74].w, cb0[r5.y + 74].w
                  mad r15.y, -cb0[r5.y + 74].w, cb0[r5.y + 74].w, r15.y
                  add r22.w, r16.w, r16.w
                  div r15.y, r15.y, r22.w
                  mad r15.y, -r15.y, r15.y, r5.w
                  lt r22.w, l(0.000000), r15.y
                  if_nz r22.w
                    sqrt r15.y, r15.y
                    mad r19.w, -r15.y, r15.y, r19.w
                    sqrt r19.w, r19.w
                    lt r14.y, r16.w, r14.y
                    if_nz r14.y
                      mov r19.w, -r19.w
                    endif 
                    mul r23.zw, r15.yyyy, r22.xxxz
                    mad r25.xy, r23.xyxx, r19.wwww, r23.zwzz
                  endif 
                else 
                  mad r25.xy, r22.xzxx, r12.wwww, r20.ywyy
                endif 
                add r20.yw, -r20.yyyw, r25.xxxy
                rsq r5.w, r5.w
                mul r21.xz, r5.wwww, r21.xxzx
                dp2 r5.w, r20.ywyy, r20.ywyy
                rsq r5.w, r5.w
                mul r20.yw, r5.wwww, r20.yyyw
                dp2 r5.w, r21.xzxx, r20.ywyy
                add r12.w, -|r5.w|, l(1.000000)
                sqrt r12.w, r12.w
                mad r14.y, |r5.w|, l(-0.0187292993), l(0.074261)
                mad r14.y, r14.y, |r5.w|, l(-0.212114394)
                mad r14.y, r14.y, |r5.w|, l(1.57072878)
                mul r15.y, r12.w, r14.y
                mad r15.y, r15.y, l(-2.000000), l(3.14159274)
                lt r5.w, r5.w, -r5.w
                and r5.w, r5.w, r15.y
                mad r5.w, r14.y, r12.w, r5.w
                if_z r17.w
                  mov r5.w, -r5.w
                endif 
                sincos r21.x, r22.x, r5.w
                mul r20.yw, r21.xxxx, r24.zzzy
                mad r24.x, r24.y, r22.x, -r20.y
                mad r5.w, r24.z, r22.x, r20.w
                dp2 r23.x, r20.xzxx, r25.xzxx
                mul r23.y, r22.y, r25.y
                dp2 r23.z, r21.ywyy, r25.xzxx
                add r18.xzw, r14.xxzw, r23.xxzy
                dp2 r19.x, r20.xzxx, r24.xwxx
                mul r19.y, r5.w, r22.y
                dp2 r19.z, r21.ywyy, r24.xwxx
                max r18.y, r3.y, r18.w
              else 
                mov r18.xyz, v0.xyzx
                mov r19.xyz, r0.xyzx
              endif 
            else 
              mov r18.xyz, v0.xyzx
              mov r19.xyz, r0.xyzx
            endif 
          else 
            dp3 r5.w, r7.xyzx, r7.xyzx
            sqrt r5.w, r5.w
            div r5.w, r5.w, cb0[r5.y + 74].w
            add_sat r13.w, -r5.w, l(1.000000)
            lt r5.w, l(0.000000), r13.w
            if_nz r5.w
              mul r7.xyz, r13.wwww, r17.xyzx
              dp3 r5.w, r7.xyzx, r7.xyzx
              sqrt r5.w, r5.w
              mul r7.xyz, r7.xyzx, |v0.yyyy|
              mul r9.xyz, r7.xyzx, l(5.000000, 5.000000, 5.000000, 0.000000)
              mov r8.y, r9.y
              add r7.xyz, r8.xyzx, v0.xyzx
              add r7.xyz, r9.xwzx, r7.xyzx
              dp3 r8.y, r7.xyzx, r7.xyzx
              rsq r8.y, r8.y
              mul r7.xyz, r7.xyzx, r8.yyyy
              mad r7.xyz, r7.xyzx, |v0.yyyy|, r4.xyzx
              max r18.y, r3.z, r7.y
              mad r7.y, cb0[64].z, l(300.000000), r7.x
              sincos null, r7.y, r7.y
              mul r9.xy, r6.xyxx, r7.yyyy
              mul r9.xy, r5.wwww, r9.xyxx
              mul r9.xy, r18.yyyy, r9.xyxx
              mad r18.xz, r9.xxyx, l(0.500000, 0.000000, 0.500000, 0.000000), r7.xxzx
            else 
              mov r18.xyz, v0.xyzx
            endif 
            mov r19.xyz, r0.xyzx
          endif 
        else 
          lt r5.w, cb0[r6.z + 74].w, l(0.000000)
          if_nz r5.w
            mad r5.w, -r8.w, r8.w, r10.w
            sqrt r5.w, r5.w
            div r5.w, r5.w, cb0[r5.y + 74].w
            add_sat r13.w, -r5.w, l(1.000000)
            lt r5.w, l(0.000000), r13.w
            if_nz r5.w
              if_nz r3.x
                mad r7.xyz, r16.xyzx, r8.wwww, r15.xwzx
                mul r9.xyz, r16.zxyz, l(1.000000, 0.000000, 0.000000, 0.000000)
                mad r9.xyz, r16.yzxy, l(0.000000, 0.000000, 1.000000, 0.000000), -r9.xyzx
                dp2 r5.w, r9.xzxx, r9.xzxx
                rsq r5.w, r5.w
                mul r9.xyz, r5.wwww, r9.xyzx
                mul r14.xyz, r16.yzxy, r9.zxyz
                mad r14.xyz, r9.yzxy, r16.zxyz, -r14.xyzx
                add r15.xyz, -r7.xyzx, v0.xyzx
                add r20.xyz, r4.xyzx, -r7.xyzx
                mul r21.xyz, r0.yyyy, r14.xyzx
                mad r21.xyz, r9.xyzx, r0.xxxx, r21.xyzx
                mad r21.yzw, r16.xxzy, r0.zzzz, r21.xxzy
                mul r22.xyz, r14.xyzx, r15.yyyy
                mad r15.xyw, r9.xyxz, r15.xxxx, r22.xyxz
                mad r15.xyz, r16.xyzx, r15.zzzz, r15.xywx
                mul r20.yw, r14.xxxy, r20.yyyy
                mad r20.xy, r9.xyxx, r20.xxxx, r20.ywyy
                mad r20.xy, r16.xyxx, r20.zzzz, r20.xyxx
                add r20.zw, r15.xxxy, -r20.xxxy
                dp2 r5.w, r20.zwzz, r20.zwzz
                sqrt r6.z, r5.w
                max r8.y, r6.z, cb0[r5.y + 74].w
                min r9.y, r6.z, cb0[r5.y + 74].w
                mul r9.y, r9.y, r9.y
                mad r8.y, r8.y, r8.y, -r9.y
                sqrt r8.y, r8.y
                dp2 r9.y, r20.xyxx, r20.xyxx
                sqrt r12.w, r9.y
                rsq r14.w, r9.y
                mul r22.xy, r14.wwww, r20.xyxx
                lt r14.w, r20.x, l(0.000000)
                if_nz r14.w
                  mov r22.z, -r22.y
                  mov r23.xy, -r22.zxzz
                else 
                  mov r22.w, -r22.y
                  mov r23.xy, r22.wxww
                endif 
                lt r15.w, r8.y, r12.w
                lt r16.w, cb0[r5.y + 74].w, r6.z
                or r15.w, r15.w, r16.w
                if_nz r15.w
                  add r9.y, r5.w, r9.y
                  mul r15.w, cb0[r5.y + 74].w, cb0[r5.y + 74].w
                  mad r9.y, -cb0[r5.y + 74].w, cb0[r5.y + 74].w, r9.y
                  add r16.w, r12.w, r12.w
                  div r9.y, r9.y, r16.w
                  mad r9.y, -r9.y, r9.y, r5.w
                  lt r16.w, l(0.000000), r9.y
                  if_nz r16.w
                    sqrt r9.y, r9.y
                    mad r15.w, -r9.y, r9.y, r15.w
                    sqrt r15.w, r15.w
                    lt r8.y, r12.w, r8.y
                    if_nz r8.y
                      mov r15.w, -r15.w
                    endif 
                    mul r22.zw, r9.yyyy, r23.xxxy
                    mad r15.xy, r22.xyxx, r15.wwww, r22.zwzz
                  endif 
                else 
                  mad r15.xy, r23.xyxx, r6.zzzz, r20.xyxx
                endif 
                add r20.xy, -r20.xyxx, r15.xyxx
                rsq r5.w, r5.w
                mul r20.zw, r5.wwww, r20.zzzw
                dp2 r5.w, r20.xyxx, r20.xyxx
                rsq r5.w, r5.w
                mul r20.xy, r5.wwww, r20.xyxx
                dp2 r5.w, r20.zwzz, r20.xyxx
                add r6.z, -|r5.w|, l(1.000000)
                sqrt r6.z, r6.z
                mad r8.y, |r5.w|, l(-0.0187292993), l(0.074261)
                mad r8.y, r8.y, |r5.w|, l(-0.212114394)
                mad r8.y, r8.y, |r5.w|, l(1.57072878)
                mul r9.y, r6.z, r8.y
                mad r9.y, r9.y, l(-2.000000), l(3.14159274)
                lt r5.w, r5.w, -r5.w
                and r5.w, r5.w, r9.y
                mad r5.w, r8.y, r6.z, r5.w
                if_z r14.w
                  mov r5.w, -r5.w
                endif 
                sincos r20.x, r22.x, r5.w
                mul r20.xy, r20.xxxx, r21.wyww
                mad r21.x, r21.y, r22.x, -r20.x
                mad r21.y, r21.w, r22.x, r20.y
                dp2 r20.x, r9.xzxx, r15.xzxx
                dp3 r20.y, r14.xyzx, r15.xyzx
                dp3 r20.z, r16.xyzx, r15.xyzx
                add r18.xzw, r7.xxzy, r20.xxzy
                dp2 r19.x, r9.xzxx, r21.xzxx
                dp3 r19.y, r14.xyzx, r21.xyzx
                dp3 r19.z, r16.xyzx, r21.xyzx
                max r18.y, r3.y, r18.w
              else 
                mov r18.xyz, v0.xyzx
                mov r19.xyz, r0.xyzx
              endif 
            else 
              mov r18.xyz, v0.xyzx
              mov r19.xyz, r0.xyzx
            endif 
          else 
            mad r5.w, -r8.w, r8.w, r10.w
            sqrt r5.w, r5.w
            div r5.w, r5.w, cb0[r5.y + 74].w
            add_sat r13.w, -r5.w, l(1.000000)
            lt r5.w, l(0.000000), r13.w
            if_nz r5.w
              mul r7.xyz, r13.wwww, r17.xyzx
              dp3 r5.w, r7.xyzx, r7.xyzx
              sqrt r5.w, r5.w
              mul r7.xyz, r7.xyzx, |v0.yyyy|
              mul r11.xyz, r7.xyzx, l(5.000000, 5.000000, 5.000000, 0.000000)
              mov r10.y, r11.y
              add r7.xyz, r10.xyzx, v0.xyzx
              add r7.xyz, r11.xwzx, r7.xyzx
              dp3 r6.z, r7.xyzx, r7.xyzx
              rsq r6.z, r6.z
              mul r7.xyz, r6.zzzz, r7.xyzx
              mad r7.xyz, r7.xyzx, |v0.yyyy|, r4.xyzx
              max r18.y, r3.z, r7.y
              mad r6.z, cb0[64].z, l(300.000000), r7.x
              sincos null, r6.z, r6.z
              mul r8.yw, r6.xxxy, r6.zzzz
              mul r8.yw, r5.wwww, r8.yyyw
              mul r8.yw, r18.yyyy, r8.yyyw
              mad r18.xz, r8.yywy, l(0.500000, 0.000000, 0.500000, 0.000000), r7.xxzx
            else 
              mov r18.xyz, v0.xyzx
            endif 
            mov r19.xyz, r0.xyzx
          endif 
        endif 
      endif 
      add r3.w, r3.w, r13.w
      mad r12.xyz, r18.xyzx, r13.wwww, r12.xyzx
      mad r13.xyz, r19.xyzx, r13.wwww, r13.xyzx
      max r1.w, r1.w, r13.w
      iadd r4.w, r4.w, l(1)
      mov r5.y, r6.w
    endloop 
    lt r1.z, l(0.000000), r3.w
    if_nz r1.z
      div r1.z, l(1.000000, 1.000000, 1.000000, 1.000000), r3.w
      mul r2.xyz, r1.zzzz, r12.xyzx
      mul r3.xyz, r1.zzzz, r13.xyzx
      dp3 r1.z, r3.xyzx, r3.xyzx
      rsq r1.z, r1.z
      mul r0.xyz, r1.zzzz, r3.xyzx
    else 
      mov r2.xyz, v0.xyzx
    endif 
  else 
    mov r2.xyz, v0.xyzx
  endif 
  add r3.xy, r2.xzxx, -cb0[111].xzxx
  mad r3.xy, cb0[111].wwww, l(0.500000, 0.500000, 0.000000, 0.000000), r3.xyxx
  div r3.xy, r3.xyxx, cb0[111].wwww
  add r1.z, -r3.x, l(1.000000)
  lt r2.w, r1.z, r3.y
  if_nz r2.w
    add r3.zw, -cb0[110].wwww, cb0[110].yyyz
    mad r1.z, r1.z, r3.z, cb0[110].w
    add r2.w, -r3.y, l(1.000000)
    mad r1.z, r2.w, r3.w, r1.z
  else 
    add r3.zw, -cb0[110].xxxx, cb0[110].zzzy
    mad r2.w, r3.x, r3.z, cb0[110].x
    mad r1.z, r3.y, r3.w, r2.w
  endif 
  add r1.z, r1.z, -cb0[71].y
  add r3.y, r1.z, r2.y
  add r1.z, -r1.w, l(1.000000)
  mad r1.w, cb0[64].z, l(1.800000), r2.x
  sincos null, r1.w, r1.w
  mul r1.z, r1.w, r1.z
  mul r0.w, r0.w, r1.z
  dp2 r1.z, r0.xzxx, r0.xzxx
  rsq r1.z, r1.z
  mul r1.zw, r0.xxxz, r1.zzzz
  mul r1.zw, r0.wwww, r1.zzzw
  mad r3.xz, r1.zzwz, l(0.050000, 0.000000, 0.050000, 0.000000), r2.xxzx
  add r2.xyz, r3.xyzx, cb0[70].xyzx
  dp3 r0.w, r2.xyzx, r2.xyzx
  rsq r0.w, r0.w
  mul r3.xyz, r0.wwww, r2.xyzx
  mov r2.w, l(1.000000)
  dp4 r0.w, r2.xyzw, r2.xyzw
  sqrt r0.w, r0.w
  add r1.zw, r1.xxxy, -cb0[113].xxxy
  div r1.zw, r1.zzzw, cb0[113].zzzz
  add o3.xy, -r1.zwzz, l(1.000000, 1.000000, 0.000000, 0.000000)
  add r1.zw, r2.xxxz, -cb0[63].xxxy
  div o3.zw, r1.zzzw, cb0[63].zzzz
  mul r1.zw, cb0[71].xxxz, l(0.000000, 0.000000, 0.0000781249983, 0.0000781249983)
  round_ni r1.zw, r1.zzzw
  mad_sat r1.xy, r1.xyxx, l(0.0000781249983, 0.0000781249983, 0.000000, 0.000000), -r1.zwzz
  add r1.z, -r1.x, l(1.000000)
  mad o2.xy, r1.yzyy, cb0[115].xyxx, cb0[115].zwzz
  mad r1.xy, cb0[71].wwww, l(-0.500000, 0.500000, 0.000000, 0.000000), l(0.010000, -0.010000, 0.000000, 0.000000)
  max r1.xz, r1.xxxx, v0.xxzx
  min r1.xy, r1.yyyy, r1.xzxx
  mul r1.zw, cb0[71].xxxz, l(0.000000, 0.000000, 0.001250, 0.001250)
  round_ni r1.zw, r1.zzzw
  mad r1.zw, -r1.zzzw, l(0.000000, 0.000000, 800.000000, 800.000000), cb0[71].xxxz
  add r1.xy, r1.zwzz, r1.xyxx
  mul r1.xy, r1.xyxx, l(0.001250, 0.001250, 0.000000, 0.000000)
  frc r1.xy, r1.xyxx
  mad o2.z, r1.x, cb0[112].z, cb0[112].y
  add r1.x, -r1.y, l(1.000000)
  mad o2.w, r1.x, cb0[112].z, cb0[112].x
// replacing matrix usage :  dp4 r1.x, r2.xyzw, cb0[66].xyzw
dp4 r26.x, r2.xyzw, cb0[66].xyzw
mul r1.x, r26.x, r28.x
// replacing matrix usage :  dp4 r1.y, r2.xyzw, cb0[67].xyzw
dp4 r26.y, r2.xyzw, cb0[67].xyzw
mul r1.y, r26.y, r28.y
  dp4 r1.z, r2.xyzw, cb0[68].xyzw
  dp4 r1.w, r2.xyzw, cb0[69].xyzw
  dp4 o1.z, r2.xyzw, cb0[38].xyzw
  dp4 o1.w, r2.xyzw, cb0[40].xyzw
  mul r4.xyz, r1.xwyx, l(0.500000, 0.500000, 0.500000, 0.000000)
  add o4.x, r4.y, r4.x
  mad o4.y, r1.w, l(0.500000), -r4.z
  mul r3.w, r0.w, cb0[114].y
  mul r3.w, r3.w, r3.w
  mad o8.x, -r3.w, r3.w, l(1.000000)
  add r0.w, r0.w, -cb0[11].x
  mul_sat o8.y, r0.w, cb0[11].y
  dp3 r0.w, -r3.xyzx, r0.xyzx
  lt r3.x, l(0.000000), r0.w
  lt r0.w, r0.w, l(0.000000)
  iadd r0.w, r0.w, -r3.x
  itof r0.w, r0.w
  mul r0.xyz, r0.wwww, r0.xyzx
  ftoi r0.w, cb0[47].x
  mov r4.xyz, l(0,0,0,0)
  mov r3.xyzw, l(0,0,0,0)
  loop 
    ige r4.w, r3.w, r0.w
    breakc_nz r4.w
    ge r5.xy, cb0[r3.w + 52].xyxx, l(100.000000, 100.000000, 0.000000, 0.000000)
    if_nz r5.x
      add r4.w, l(-100.000000), cb0[r3.w + 52].x
    else 
      mov r4.w, cb0[r3.w + 52].x
    endif 
    if_nz r5.y
      add r5.x, l(-100.000000), cb0[r3.w + 52].y
    else 
      mov r5.x, cb0[r3.w + 52].y
    endif 
    lt r5.y, l(1.000000), cb0[r3.w + 48].w
    if_nz r5.y
      add r5.yzw, -r2.xxyz, cb0[r3.w + 48].xxyz
      dp3 r6.x, r5.yzwy, r5.yzwy
      sqrt r6.y, r6.x
      div r5.yzw, r5.yyzw, r6.yyyy
      mad r6.x, r6.x, cb0[r3.w + 52].w, l(1.000000)
      div r6.x, l(1.000000, 1.000000, 1.000000, 1.000000), r6.x
      add r6.x, r6.x, l(-0.100000)
      mul_sat r6.x, r6.x, l(1.11111116)
      lt r6.y, l(2.000000), cb0[r3.w + 48].w
      if_nz r6.y
        add r6.y, l(-3.000000), cb0[r3.w + 48].w
        dp3 r6.z, r5.yzwy, cb0[r3.w + 56].xyzx
        add r6.w, -|r6.z|, l(1.000000)
        sqrt r6.w, r6.w
        mad r7.x, |r6.z|, l(-0.0187292993), l(0.074261)
        mad r7.x, r7.x, |r6.z|, l(-0.212114394)
        mad r7.x, r7.x, |r6.z|, l(1.57072878)
        mul r7.y, r6.w, r7.x
        mad r7.y, r7.y, l(-2.000000), l(3.14159274)
        lt r6.z, r6.z, -r6.z
        and r6.z, r6.z, r7.y
        mad r6.z, r7.x, r6.w, r6.z
        lt r6.w, r6.z, r6.y
        if_nz r6.w
          frc r6.w, cb0[r3.w + 56].w
          div r6.y, r6.z, r6.y
          add r6.y, -r6.w, r6.y
          add r6.z, -r6.w, l(1.000000)
          div_sat r6.y, r6.y, r6.z
          add r6.y, -r6.y, l(1.000000)
        else 
          mov r6.y, l(0)
        endif 
        mul r6.x, r6.y, r6.x
      endif 
    else 
      mov r5.yzw, -cb0[r3.w + 48].xxyz
      mov r6.x, l(1.000000)
    endif 
    dp3 r5.y, r5.yzwy, r0.xyzx
    max r5.y, r5.y, l(0.000000)
    add r5.y, -r5.y, l(1.000000)
    mad r5.y, -r5.y, l(0.500000), l(1.000000)
    mul r7.x, r4.w, r5.y
    mul r7.y, r5.y, r5.x
    mul r7.z, r5.y, cb0[r3.w + 52].z
    mul r5.xyz, r6.xxxx, r7.xyzx
    if_z r3.w
      mov r3.xyz, r5.xyzx
    else 
      mad r4.xyz, r7.xyzx, r6.xxxx, r4.xyzx
    endif 
    iadd r3.w, r3.w, l(1)
  endloop 
  mov o7.xyz, r4.xyzx
  mov_sat r0.x, -cb0[48].y
  sqrt r0.x, r0.x
  mul o6.xyz, r0.xxxx, r3.xyzx
  dp4 o5.x, r2.xyzw, cb0[4].xyzw
  dp4 o5.y, r2.xyzw, cb0[5].xyzw
  dp4 o5.z, r2.xyzw, cb0[6].xyzw
  mov o0.xyzw, r1.xyzw
  mov o1.xy, v2.xyxx
  mov o4.zw, r1.zzzw
  mov o5.w, r1.w
else 
  mov o0.xyzw, l(0,0,0,0)
  mov o1.xyzw, l(0,0,0,0)
  mov o2.xyzw, l(0,0,0,0)
  mov o3.xyzw, l(0,0,0,0)
  mov o4.xyzw, l(0,0,0,0)
  mov o5.xyzw, l(0,0,0,0)
  mov o6.xyz, l(0,0,0,0)
  mov o7.xyz, l(0,0,0,0)
  mov o8.xy, l(0,0,0,0)
endif 
ret 
// Approximately 725 instruction slots used
