// ---- Created with 3Dmigoto v1.2.35 on Tue Apr 26 22:30:56 2016

cbuffer gcbSceneParam : register(b9)
{
  float4 m_gBaseColor : packoffset(c0);
  float4 m_gNearFar : packoffset(c1);
  float4 m_gBlendParam : packoffset(c2);
  int4 m_gScaleFlag : packoffset(c3);
  float4 m_gCameraFadeParam : packoffset(c4);
  float4 m_gCameraPosition : packoffset(c5);
  int4 m_gLayerFlag : packoffset(c6);
  float4 m_gUvCropInfo : packoffset(c7);
  float4 m_gMotionBlurParam : packoffset(c8);
  float4x4 m_gBillBoardMatrix : packoffset(c9);
  float4x4 m_gViewProjMatrix : packoffset(c13);
  float4x4 m_gViewMatrix : packoffset(c17);
  float4x4 m_gCameraMatrix : packoffset(c21);
  float4 m_gTransrancyPower : packoffset(c25);
  int4 m_gTraceInfo : packoffset(c26);
  float4 m_gTraceParam : packoffset(c27);
}



// 3Dmigoto declarations
#define cmp -
Texture1D<float4> IniParams : register(t120);
Texture2D<float4> StereoParams : register(t125);


[maxvertexcount(4)]
void main( 
  inout TriangleStream<float> m0,
  float4 v0 : SV_Position0,
  float4 v1 : TEXCOORD0,
  uint4 v2 : TEXCOORD1,
  uint4 v3 : TEXCOORD2,
  uint4 v4 : TEXCOORD3,
  out float4 o0 : SV_Position0,
  out float4 o1 : TEXCOORD0,
  out float4 o2 : TEXCOORD1,
  out float4 o3 : TEXCOORD2,
  out uint4 o4 : TEXCORRD3,
  out float4 o5 : TEXCOORD4,
  out float4 o6 : TEXCOORD5)
{
// Needs manual fix for instruction: 
// unknown dcl_: dcl_input_siv v[1][0].xyzw, position
  float4 r0,r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12;
  uint4 bitmask, uiDest;
  float4 fDest;

// Needs manual fix for instruction: 
// unknown dcl_: dcl_inputprimitive point 
// Needs manual fix for instruction:  
//dcl_stream m0
// Needs manual fix for instruction: 
// unknown dcl_: dcl_outputtopology trianglestrip 
  r0.xyz = v[0][0].xyz + -m_gCameraPosition.xyz;
  r0.x = dot(r0.xyz, r0.xyz);
  r0.x = sqrt(r0.x);
  r0.yz = cmp(float2(0,0) < m_gCameraFadeParam.yw);
  r0.w = m_gCameraFadeParam.x + -r0.x;
  r0.w = saturate(r0.w / m_gCameraFadeParam.y);
  r0.w = 1 + -r0.w;
  r1.x = 0.5 + -r0.x;
  r1.x = saturate(2.5 * r1.x);
  r1.x = 1 + -r1.x;
  r0.y = r0.y ? r0.w : r1.x;
  r0.x = -m_gCameraFadeParam.z + r0.x;
  r0.x = saturate(r0.x / m_gCameraFadeParam.y);
  r0.x = 1 + -r0.x;
  r0.x = r0.z ? r0.x : 1;
  r0.x = r0.y * r0.x;
  r0.y = (uint)v[0][2].w >> 16;
  r1.w = f16tof32(r0.y);
  r0.y = r1.w * r0.x;
  r0.y = cmp(0 < r0.y);
  if (r0.y != 0) {
    r0.yzw = int3(0,0,0) & (int3)v[0][2].zwx;
    r2.xy = (uint2)v[0][2].zx >> int2(16,16);
    r2.z = 0x0000ffff & (int)v[0][4].w;
    r2.z = f16tof32(r2.z);
    r0.yzw = f16tof32(r0.yzw);
    r1.xy = f16tof32(r2.yx);
    r2.xyw = int3(0,0,0) & (int3)v[0][3].xzw;
    r3.xyz = (uint3)v[0][3].xzw >> int3(16,16,16);
    r4.xyz = f16tof32(r2.xyw);
    r3.xyz = f16tof32(r3.xzy);
    r2.x = 0.5 * r0.w;
    r2.y = 0.5 * r1.x;
    r0.w = r0.w * 0.5 + r2.y;
    r2.w = 0.5 * r0.w;
    r5.x = cmp(0 < (int)m_gScaleFlag.x);
    r5.xy = r5.xx ? r2.ww : r2.xy;
    sincos(r2.z, r2.x, r6.x);
    r7.x = -r2.x;
    r7.y = r6.x;
    r6.x = dot(-r5.yx, r7.xy);
    r7.z = r2.x;
    r6.y = dot(-r5.yx, r7.yz);
    r6.zw = float2(1,1);
    r2.x = dot(r6.xyz, m_gBillBoardMatrix._m00_m10_m30);
    r2.y = dot(r6.xyz, m_gBillBoardMatrix._m01_m11_m31);
    r2.z = dot(r6.xyz, m_gBillBoardMatrix._m02_m12_m32);
    r5.zw = -r5.yx;
    r6.x = dot(r5.zx, r7.xy);
    r6.y = dot(r5.zx, r7.yz);
    r6.z = 1;
    r8.x = dot(r6.xyz, m_gBillBoardMatrix._m00_m10_m30);
    r8.y = dot(r6.xyz, m_gBillBoardMatrix._m01_m11_m31);
    r8.z = dot(r6.xyz, m_gBillBoardMatrix._m02_m12_m32);
    r6.x = dot(r5.yw, r7.xy);
    r5.zw = float2(-1,1) * r5.xy;
    r6.y = dot(r5.wz, r7.yz);
    r6.z = 1;
    r9.x = dot(r6.xyz, m_gBillBoardMatrix._m00_m10_m30);
    r9.y = dot(r6.xyz, m_gBillBoardMatrix._m01_m11_m31);
    r9.z = dot(r6.xyz, m_gBillBoardMatrix._m02_m12_m32);
    r6.x = dot(r5.yx, r7.xy);
    r6.y = dot(r5.yx, r7.yz);
    r6.z = 1;
    r5.x = dot(r6.xyz, m_gBillBoardMatrix._m00_m10_m30);
    r5.y = dot(r6.xyz, m_gBillBoardMatrix._m01_m11_m31);
    r5.z = dot(r6.xyz, m_gBillBoardMatrix._m02_m12_m32);
    r6.xyz = v[0][0].xyz + r2.xyz;
    r7.xyz = v[0][0].xyz + r8.xyz;
    r8.xyz = v[0][0].xyz + r9.xyz;
    r5.xyz = v[0][0].xyz + r5.xyz;
    r4.w = r3.x;
    r3.xw = r4.zy;
    r2.xy = r4.xw + r3.wz;
    r3.xw = r4.xw + r3.xy;
    r9.x = -v[0][0].x + m_gCameraMatrix._m30;
    r9.y = -v[0][0].y + m_gCameraMatrix._m31;
    r9.z = -v[0][0].z + m_gCameraMatrix._m32;
    r10.x = dot(r6.xyzw, m_gViewProjMatrix._m00_m10_m20_m30);
    r10.y = dot(r6.xyzw, m_gViewProjMatrix._m01_m11_m21_m31);
    r2.z = dot(r6.xyzw, m_gViewProjMatrix._m03_m13_m23_m33);
    r1.xz = r0.yz;
    r1.xyzw = m_gBaseColor.xyzw * r1.xyzw;
    r6.y = r1.w * r0.x;
    r0.x = -r0.w * 0.25 + r2.z;
    r0.yz = r10.xy / r2.zz;
    r0.yz = r0.yz * float2(0.5,-0.5) + float2(0.5,0.5);
    r1.w = r2.z / r0.x;
    r4.xw = m_gNearFar.zx / m_gNearFar.yz;
    r9.w = r4.x * r0.x + -r4.w;
    r6.w = r9.w * r1.w;
    r1.w = cmp(r0.x < m_gNearFar.w);
    r9.w = cmp(m_gNearFar.w < r2.z);
    r1.w = r1.w ? r9.w : 0;
    r9.w = r2.z + -r0.x;
    r10.z = m_gNearFar.w + -r0.x;
    r9.w = 1 / r9.w;
    r9.w = saturate(r10.z * r9.w);
    r10.z = r9.w * -2 + 3;
    r9.w = r9.w * r9.w;
    r9.w = -r10.z * r9.w + 1;
    r11.y = r9.w * r6.y;
    r11.xz = float2(0,0);
    r10.zw = r1.ww ? r11.xy : r6.wy;
    r12.xyzw = f32tof16(m_gNearFar.xyzw);
    r11.xy = mad((int2)r12.yw, int2(0,0), (int2)r12.xz);
    o0.xy = r10.xy;
    o0.z = r10.z;
    o0.w = r2.z;
    o1.xyz = v[0][1].xyz;
    o2.xz = r4.yz;
    o2.yw = r3.zy;
    o3.xyz = r1.xyz;
    o3.w = r10.w;
    o4.xy = v[0][4].xy;
    o4.zw = r11.xy;
    o5.xyz = r9.xyz;
    o5.w = 0;
    o6.xy = r0.yz;
    o6.z = r0.x;
    o6.w = r2.w;
  // Needs manual fix for instruction, maybe. 
//    emit_stream m0
  m0.Append(0); 
    r7.w = 1;
    r0.x = dot(r7.xyzw, m_gViewProjMatrix._m00_m10_m20_m30);
    r0.y = dot(r7.xyzw, m_gViewProjMatrix._m01_m11_m21_m31);
    r0.z = dot(r7.xyzw, m_gViewProjMatrix._m03_m13_m23_m33);
    r1.w = -r0.w * 0.25 + r0.z;
    r7.xy = r0.xy / r0.zz;
    r7.xy = r7.xy * float2(0.5,-0.5) + float2(0.5,0.5);
    r2.z = r0.z / r1.w;
    r6.w = r4.x * r1.w + -r4.w;
    r6.z = r6.w * r2.z;
    r2.z = cmp(r1.w < m_gNearFar.w);
    r6.w = cmp(m_gNearFar.w < r0.z);
    r2.z = r2.z ? r6.w : 0;
    r6.w = -r1.w + r0.z;
    r7.z = m_gNearFar.w + -r1.w;
    r6.w = 1 / r6.w;
    r6.w = saturate(r7.z * r6.w);
    r7.z = r6.w * -2 + 3;
    r6.w = r6.w * r6.w;
    r6.w = -r7.z * r6.w + 1;
    r11.w = r6.y * r6.w;
    r6.zw = r2.zz ? r11.zw : r6.zy;
    o0.xy = r0.xy;
    o0.z = r6.z;
    o0.w = r0.z;
    o1.xyz = v[0][1].xyz;
    o2.x = r2.x;
    o2.yw = r3.zy;
    o2.z = r3.x;
    o3.xyz = r1.xyz;
    o3.w = r6.w;
    o4.xy = v[0][4].xy;
    o4.zw = r11.xy;
    o5.xyz = r9.xyz;
    o5.w = 0;
    o6.xy = r7.xy;
    o6.z = r1.w;
    o6.w = r2.w;
  // Needs manual fix for instruction, maybe. 
//    emit_stream m0
  m0.Append(0); 
    r8.w = 1;
    r0.x = dot(r8.xyzw, m_gViewProjMatrix._m00_m10_m20_m30);
    r0.y = dot(r8.xyzw, m_gViewProjMatrix._m01_m11_m21_m31);
    r0.z = dot(r8.xyzw, m_gViewProjMatrix._m03_m13_m23_m33);
    r1.w = -r0.w * 0.25 + r0.z;
    r3.yz = r0.xy / r0.zz;
    r3.yz = r3.yz * float2(0.5,-0.5) + float2(0.5,0.5);
    r2.z = r0.z / r1.w;
    r6.z = r4.x * r1.w + -r4.w;
    r6.x = r6.z * r2.z;
    r2.z = cmp(r1.w < m_gNearFar.w);
    r6.z = cmp(m_gNearFar.w < r0.z);
    r2.z = r2.z ? r6.z : 0;
    r6.z = -r1.w + r0.z;
    r6.w = m_gNearFar.w + -r1.w;
    r6.z = 1 / r6.z;
    r6.z = saturate(r6.w * r6.z);
    r6.w = r6.z * -2 + 3;
    r6.z = r6.z * r6.z;
    r6.z = -r6.w * r6.z + 1;
    r7.y = r6.y * r6.z;
    r7.xz = float2(0,0);
    r6.zw = r2.zz ? r7.xy : r6.xy;
    o0.xy = r0.xy;
    o0.z = r6.z;
    o0.w = r0.z;
    o1.xyz = v[0][1].xyz;
    o2.xz = r4.yz;
    o2.y = r2.y;
    o2.w = r3.w;
    o3.xyz = r1.xyz;
    o3.w = r6.w;
    o4.xy = v[0][4].xy;
    o4.zw = r11.xy;
    o5.xyz = r9.xyz;
    o5.w = 0;
    o6.xy = r3.yz;
    o6.z = r1.w;
    o6.w = r2.w;
  // Needs manual fix for instruction, maybe. 
//    emit_stream m0
  m0.Append(0); 
    r5.w = 1;
    r0.x = dot(r5.xyzw, m_gViewProjMatrix._m00_m10_m20_m30);
    r0.y = dot(r5.xyzw, m_gViewProjMatrix._m01_m11_m21_m31);
    r0.z = dot(r5.xyzw, m_gViewProjMatrix._m03_m13_m23_m33);
    r0.w = -r0.w * 0.25 + r0.z;
    r3.yz = r0.xy / r0.zz;
    r3.yz = r3.yz * float2(0.5,-0.5) + float2(0.5,0.5);
    r1.w = r0.z / r0.w;
    r2.z = r4.x * r0.w + -r4.w;
    r6.x = r2.z * r1.w;
    r1.w = cmp(r0.w < m_gNearFar.w);
    r2.z = cmp(m_gNearFar.w < r0.z);
    r1.w = r1.w ? r2.z : 0;
    r2.z = r0.z + -r0.w;
    r4.x = m_gNearFar.w + -r0.w;
    r2.z = 1 / r2.z;
    r2.z = saturate(r4.x * r2.z);
    r4.x = r2.z * -2 + 3;
    r2.z = r2.z * r2.z;
    r2.z = -r4.x * r2.z + 1;
    r7.w = r6.y * r2.z;
    r4.xy = r1.ww ? r7.zw : r6.xy;
    o0.xy = r0.xy;
    o0.z = r4.x;
    o0.w = r0.z;
    o1.xyz = v[0][1].xyz;
    o2.xy = r2.xy;
    o2.zw = r3.xw;
    o3.xyz = r1.xyz;
    o3.w = r4.y;
    o4.xy = v[0][4].xy;
    o4.zw = r11.xy;
    o5.xyz = r9.xyz;
    o5.w = 0;
    o6.xy = r3.yz;
    o6.z = r0.w;
    o6.w = r2.w;
  // Needs manual fix for instruction, maybe. 
//    emit_stream m0
  m0.Append(0); 
  // Needs manual fix for instruction, maybe. 
//    cut_stream m0
  m0.RestartStrip(); 
  }
  return;
}

/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Original ASM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.30.9200.20546
//
//
// Buffer Definitions: 
//
// cbuffer gcbSceneParam
// {
//
//   float4 m_gBaseColor;               // Offset:    0 Size:    16
//   float4 m_gNearFar;                 // Offset:   16 Size:    16
//   float4 m_gBlendParam;              // Offset:   32 Size:    16 [unused]
//   int4 m_gScaleFlag;                 // Offset:   48 Size:    16
//   float4 m_gCameraFadeParam;         // Offset:   64 Size:    16
//   float4 m_gCameraPosition;          // Offset:   80 Size:    16
//   int4 m_gLayerFlag;                 // Offset:   96 Size:    16 [unused]
//   float4 m_gUvCropInfo;              // Offset:  112 Size:    16 [unused]
//   float4 m_gMotionBlurParam;         // Offset:  128 Size:    16 [unused]
//   float4x4 m_gBillBoardMatrix;       // Offset:  144 Size:    64
//   float4x4 m_gViewProjMatrix;        // Offset:  208 Size:    64
//   float4x4 m_gViewMatrix;            // Offset:  272 Size:    64 [unused]
//   float4x4 m_gCameraMatrix;          // Offset:  336 Size:    64
//   float4 m_gTransrancyPower;         // Offset:  400 Size:    16 [unused]
//   int4 m_gTraceInfo;                 // Offset:  416 Size:    16 [unused]
//   float4 m_gTraceParam;              // Offset:  432 Size:    16 [unused]
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// gcbSceneParam                     cbuffer      NA          NA    9        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float   xyz 
// TEXCOORD                 0   xyz         1     NONE   float   xyz 
// TEXCOORD                 1   xyzw        2     NONE    uint   x zw
// TEXCOORD                 2   xyzw        3     NONE    uint   x zw
// TEXCOORD                 3   xyzw        4     NONE    uint   xy w
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Position              0   xyzw        0      POS   float   xyzw
// TEXCOORD                 0   xyz         1     NONE   float   xyz 
// TEXCOORD                 1   xyzw        2     NONE   float   xyzw
// TEXCOORD                 2   xyzw        3     NONE   float   xyzw
// TEXCORRD                 3   xyzw        4     NONE    uint   xyzw
// TEXCOORD                 4   xyzw        5     NONE   float   xyzw
// TEXCOORD                 5   xyzw        6     NONE   float   xyzw
//
gs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb9[24], immediateIndexed
dcl_input_siv v[1][0].xyzw, position
dcl_input v[1][1].xyz
dcl_input v[1][2].xyzw
dcl_input v[1][3].xyzw
dcl_input v[1][4].xyzw
dcl_temps 13
dcl_inputprimitive point 
dcl_stream m0
dcl_outputtopology trianglestrip 
dcl_output_siv o0.xyzw, position
dcl_output o1.xyz
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_output o4.xyzw
dcl_output o5.xyzw
dcl_output o6.xyzw
dcl_maxout 4
add r0.xyz, -cb9[5].xyzx, v[0][0].xyzx
dp3 r0.x, r0.xyzx, r0.xyzx
sqrt r0.x, r0.x
lt r0.yz, l(0.000000, 0.000000, 0.000000, 0.000000), cb9[4].yywy
add r0.w, -r0.x, cb9[4].x
div_sat r0.w, r0.w, cb9[4].y
add r0.w, -r0.w, l(1.000000)
add r1.x, -r0.x, l(0.500000)
mul_sat r1.x, r1.x, l(2.500000)
add r1.x, -r1.x, l(1.000000)
movc r0.y, r0.y, r0.w, r1.x
add r0.x, r0.x, -cb9[4].z
div_sat r0.x, r0.x, cb9[4].y
add r0.x, -r0.x, l(1.000000)
movc r0.x, r0.z, r0.x, l(1.000000)
mul r0.x, r0.x, r0.y
ushr r0.y, v[0][2].w, l(16)
f16tof32 r1.w, r0.y
mul r0.y, r0.x, r1.w
lt r0.y, l(0.000000), r0.y
if_nz r0.y
  and r0.yzw, l(0, 0x0000ffff, 0x0000ffff, 0x0000ffff), v[0][2].zzwx
  ushr r2.xy, v[0][2].zxzz, l(16, 16, 0, 0)
  and r2.z, l(0x0000ffff), v[0][4].w
  f16tof32 r2.z, r2.z
  f16tof32 r0.yzw, r0.yyzw
  f16tof32 r1.xy, r2.yxyy
  and r2.xyw, l(0x0000ffff, 0x0000ffff, 0, 0x0000ffff), v[0][3].xzxw
  ushr r3.xyz, v[0][3].xzwx, l(16, 16, 16, 0)
  f16tof32 r4.xyz, r2.xywx
  f16tof32 r3.xyz, r3.xzyx
  mul r2.x, r0.w, l(0.500000)
  mul r2.y, r1.x, l(0.500000)
  mad r0.w, r0.w, l(0.500000), r2.y
  mul r2.w, r0.w, l(0.500000)
  ilt r5.x, l(0), cb9[3].x
  movc r5.xy, r5.xxxx, r2.wwww, r2.xyxx
  sincos r2.x, r6.x, r2.z
  mov r7.x, -r2.x
  mov r7.y, r6.x
  dp2 r6.x, -r5.yxyy, r7.xyxx
  mov r7.z, r2.x
  dp2 r6.y, -r5.yxyy, r7.yzyy
  mov r6.zw, l(0,0,1.000000,1.000000)
  dp3 r2.x, r6.xyzx, cb9[9].xywx
  dp3 r2.y, r6.xyzx, cb9[10].xywx
  dp3 r2.z, r6.xyzx, cb9[11].xywx
  mov r5.zw, -r5.yyyx
  dp2 r6.x, r5.zxzz, r7.xyxx
  dp2 r6.y, r5.zxzz, r7.yzyy
  mov r6.z, l(1.000000)
  dp3 r8.x, r6.xyzx, cb9[9].xywx
  dp3 r8.y, r6.xyzx, cb9[10].xywx
  dp3 r8.z, r6.xyzx, cb9[11].xywx
  dp2 r6.x, r5.ywyy, r7.xyxx
  mul r5.zw, r5.xxxy, l(0.000000, 0.000000, -1.000000, 1.000000)
  dp2 r6.y, r5.wzww, r7.yzyy
  mov r6.z, l(1.000000)
  dp3 r9.x, r6.xyzx, cb9[9].xywx
  dp3 r9.y, r6.xyzx, cb9[10].xywx
  dp3 r9.z, r6.xyzx, cb9[11].xywx
  dp2 r6.x, r5.yxyy, r7.xyxx
  dp2 r6.y, r5.yxyy, r7.yzyy
  mov r6.z, l(1.000000)
  dp3 r5.x, r6.xyzx, cb9[9].xywx
  dp3 r5.y, r6.xyzx, cb9[10].xywx
  dp3 r5.z, r6.xyzx, cb9[11].xywx
  add r6.xyz, r2.xyzx, v[0][0].xyzx
  add r7.xyz, r8.xyzx, v[0][0].xyzx
  add r8.xyz, r9.xyzx, v[0][0].xyzx
  add r5.xyz, r5.xyzx, v[0][0].xyzx
  mov r4.w, r3.x
  mov r3.xw, r4.zzzy
  add r2.xy, r3.wzww, r4.xwxx
  add r3.xw, r3.xxxy, r4.xxxw
  add r9.x, cb9[21].w, -v[0][0].x
  add r9.y, cb9[22].w, -v[0][0].y
  add r9.z, cb9[23].w, -v[0][0].z
  dp4 r10.x, r6.xyzw, cb9[13].xyzw
  dp4 r10.y, r6.xyzw, cb9[14].xyzw
  dp4 r2.z, r6.xyzw, cb9[16].xyzw
  mov r1.xz, r0.yyzy
  mul r1.xyzw, r1.xyzw, cb9[0].xyzw
  mul r6.y, r0.x, r1.w
  mad r0.x, -r0.w, l(0.250000), r2.z
  div r0.yz, r10.xxyx, r2.zzzz
  mad r0.yz, r0.yyzy, l(0.000000, 0.500000, -0.500000, 0.000000), l(0.000000, 0.500000, 0.500000, 0.000000)
  div r1.w, r2.z, r0.x
  div r4.xw, cb9[1].zzzx, cb9[1].yyyz
  mad r9.w, r4.x, r0.x, -r4.w
  mul r6.w, r1.w, r9.w
  lt r1.w, r0.x, cb9[1].w
  lt r9.w, cb9[1].w, r2.z
  and r1.w, r1.w, r9.w
  add r9.w, -r0.x, r2.z
  add r10.z, -r0.x, cb9[1].w
  div r9.w, l(1.000000, 1.000000, 1.000000, 1.000000), r9.w
  mul_sat r9.w, r9.w, r10.z
  mad r10.z, r9.w, l(-2.000000), l(3.000000)
  mul r9.w, r9.w, r9.w
  mad r9.w, -r10.z, r9.w, l(1.000000)
  mul r11.y, r6.y, r9.w
  mov r11.xz, l(0,0,0,0)
  movc r10.zw, r1.wwww, r11.xxxy, r6.wwwy
  f32tof16 r12.xyzw, cb9[1].xyzw
  imad r11.xy, r12.ywyy, l(0x00010000, 0x00010000, 0, 0), r12.xzxx
  mov o0.xy, r10.xyxx
  mov o0.z, r10.z
  mov o0.w, r2.z
  mov o1.xyz, v[0][1].xyzx
  mov o2.xz, r4.yyzy
  mov o2.yw, r3.zzzy
  mov o3.xyz, r1.xyzx
  mov o3.w, r10.w
  mov o4.xy, v[0][4].xyxx
  mov o4.zw, r11.xxxy
  mov o5.xyz, r9.xyzx
  mov o5.w, l(0)
  mov o6.xy, r0.yzyy
  mov o6.z, r0.x
  mov o6.w, r2.w
  emit_stream m0
  mov r7.w, l(1.000000)
  dp4 r0.x, r7.xyzw, cb9[13].xyzw
  dp4 r0.y, r7.xyzw, cb9[14].xyzw
  dp4 r0.z, r7.xyzw, cb9[16].xyzw
  mad r1.w, -r0.w, l(0.250000), r0.z
  div r7.xy, r0.xyxx, r0.zzzz
  mad r7.xy, r7.xyxx, l(0.500000, -0.500000, 0.000000, 0.000000), l(0.500000, 0.500000, 0.000000, 0.000000)
  div r2.z, r0.z, r1.w
  mad r6.w, r4.x, r1.w, -r4.w
  mul r6.z, r2.z, r6.w
  lt r2.z, r1.w, cb9[1].w
  lt r6.w, cb9[1].w, r0.z
  and r2.z, r2.z, r6.w
  add r6.w, r0.z, -r1.w
  add r7.z, -r1.w, cb9[1].w
  div r6.w, l(1.000000, 1.000000, 1.000000, 1.000000), r6.w
  mul_sat r6.w, r6.w, r7.z
  mad r7.z, r6.w, l(-2.000000), l(3.000000)
  mul r6.w, r6.w, r6.w
  mad r6.w, -r7.z, r6.w, l(1.000000)
  mul r11.w, r6.w, r6.y
  movc r6.zw, r2.zzzz, r11.zzzw, r6.zzzy
  mov o0.xy, r0.xyxx
  mov o0.z, r6.z
  mov o0.w, r0.z
  mov o1.xyz, v[0][1].xyzx
  mov o2.x, r2.x
  mov o2.yw, r3.zzzy
  mov o2.z, r3.x
  mov o3.xyz, r1.xyzx
  mov o3.w, r6.w
  mov o4.xy, v[0][4].xyxx
  mov o4.zw, r11.xxxy
  mov o5.xyz, r9.xyzx
  mov o5.w, l(0)
  mov o6.xy, r7.xyxx
  mov o6.z, r1.w
  mov o6.w, r2.w
  emit_stream m0
  mov r8.w, l(1.000000)
  dp4 r0.x, r8.xyzw, cb9[13].xyzw
  dp4 r0.y, r8.xyzw, cb9[14].xyzw
  dp4 r0.z, r8.xyzw, cb9[16].xyzw
  mad r1.w, -r0.w, l(0.250000), r0.z
  div r3.yz, r0.xxyx, r0.zzzz
  mad r3.yz, r3.yyzy, l(0.000000, 0.500000, -0.500000, 0.000000), l(0.000000, 0.500000, 0.500000, 0.000000)
  div r2.z, r0.z, r1.w
  mad r6.z, r4.x, r1.w, -r4.w
  mul r6.x, r2.z, r6.z
  lt r2.z, r1.w, cb9[1].w
  lt r6.z, cb9[1].w, r0.z
  and r2.z, r2.z, r6.z
  add r6.z, r0.z, -r1.w
  add r6.w, -r1.w, cb9[1].w
  div r6.z, l(1.000000, 1.000000, 1.000000, 1.000000), r6.z
  mul_sat r6.z, r6.z, r6.w
  mad r6.w, r6.z, l(-2.000000), l(3.000000)
  mul r6.z, r6.z, r6.z
  mad r6.z, -r6.w, r6.z, l(1.000000)
  mul r7.y, r6.z, r6.y
  mov r7.xz, l(0,0,0,0)
  movc r6.zw, r2.zzzz, r7.xxxy, r6.xxxy
  mov o0.xy, r0.xyxx
  mov o0.z, r6.z
  mov o0.w, r0.z
  mov o1.xyz, v[0][1].xyzx
  mov o2.xz, r4.yyzy
  mov o2.y, r2.y
  mov o2.w, r3.w
  mov o3.xyz, r1.xyzx
  mov o3.w, r6.w
  mov o4.xy, v[0][4].xyxx
  mov o4.zw, r11.xxxy
  mov o5.xyz, r9.xyzx
  mov o5.w, l(0)
  mov o6.xy, r3.yzyy
  mov o6.z, r1.w
  mov o6.w, r2.w
  emit_stream m0
  mov r5.w, l(1.000000)
  dp4 r0.x, r5.xyzw, cb9[13].xyzw
  dp4 r0.y, r5.xyzw, cb9[14].xyzw
  dp4 r0.z, r5.xyzw, cb9[16].xyzw
  mad r0.w, -r0.w, l(0.250000), r0.z
  div r3.yz, r0.xxyx, r0.zzzz
  mad r3.yz, r3.yyzy, l(0.000000, 0.500000, -0.500000, 0.000000), l(0.000000, 0.500000, 0.500000, 0.000000)
  div r1.w, r0.z, r0.w
  mad r2.z, r4.x, r0.w, -r4.w
  mul r6.x, r1.w, r2.z
  lt r1.w, r0.w, cb9[1].w
  lt r2.z, cb9[1].w, r0.z
  and r1.w, r1.w, r2.z
  add r2.z, -r0.w, r0.z
  add r4.x, -r0.w, cb9[1].w
  div r2.z, l(1.000000, 1.000000, 1.000000, 1.000000), r2.z
  mul_sat r2.z, r2.z, r4.x
  mad r4.x, r2.z, l(-2.000000), l(3.000000)
  mul r2.z, r2.z, r2.z
  mad r2.z, -r4.x, r2.z, l(1.000000)
  mul r7.w, r2.z, r6.y
  movc r4.xy, r1.wwww, r7.zwzz, r6.xyxx
  mov o0.xy, r0.xyxx
  mov o0.z, r4.x
  mov o0.w, r0.z
  mov o1.xyz, v[0][1].xyzx
  mov o2.xy, r2.xyxx
  mov o2.zw, r3.xxxw
  mov o3.xyz, r1.xyzx
  mov o3.w, r4.y
  mov o4.xy, v[0][4].xyxx
  mov o4.zw, r11.xxxy
  mov o5.xyz, r9.xyzx
  mov o5.w, l(0)
  mov o6.xy, r3.yzyy
  mov o6.z, r0.w
  mov o6.w, r2.w
  emit_stream m0
  cut_stream m0
endif 
ret 
// Approximately 242 instruction slots used

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
