// MANUALLY DUMPED [ShaderRegexHalo2] P5S. Fixed in 7d0137e6a0a4e91b-ps_replace.txt. But fixed for o3 here.
//
// Generated by Microsoft (R) HLSL Shader Compiler 6.3.9600.16384
//
//   using 3Dmigoto v1.3.16 on Sat Mar 05 11:17:08 2022
//
//
// Buffer Definitions:
//
// cbuffer $Globals
// {
//
//   float4 vEye;                       // Index:   27.xyzw           Components:     4
//   row_major float4x4 mW2P;           // Index:    0 1 2 3          Components:    16
//   float4 vDPort;                     // Index:   24.xyzw           Components:     4
//   float4 vSPort;                     // Index:   28.xyzw           Components:     4
//
// }
//
//
// 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   xyzw        0     NONE   float   xyzw
// NORMAL                   0   xyz         1     NONE   float   xyz
// COLOR                    0   xyzw        2     NONE   float   xyzw
// TEXCOORD                 0   xy          3     NONE   float   xy
// TANGENT                  0   xyzw        4     NONE   float   xyzw
// BLENDWEIGHT              0   xyzw        5     NONE   float   xyzw
// BLENDINDICES             0   xyzw        6     NONE   float   xyzw
// BINORMAL                 0   xyzw        7     NONE   float   xyzw
// COLOR                    1   xyzw        8     NONE     int   xyzw
// TEXCOORD                 3   xyzw        9     NONE     int   xyzw
//
//
// 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   xyzw        2     NONE   float   xyzw
// TEXCOORD                 2   xyzw        3     NONE   float   xyzw
// TEXCOORD                 3   xyzw        4     NONE   float   xyzw
// TEXCOORD                 4   xyz         5     NONE   float   xyz
// TEXCOORD                 5   xyz         6     NONE   float   xyz
// TEXCOORD                 6   xyz         7     NONE   float   xyz
// TEXCOORD                 7   xyz         8     NONE   float   xyz
// TEXCOORD                 8   xy          9     NONE   float   xy
//
vs_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb0[29], immediateIndexed
dcl_input v0.xyzw
dcl_input v1.xyz
dcl_input v2.xyzw
dcl_input v3.xy
dcl_input v4.xyzw
dcl_input v5.xyzw
dcl_input v6.xyzw
dcl_input v7.xyzw
dcl_input v8.xyzw
dcl_input v9.xyzw
dcl_output_siv o0.xyzw, position

dcl_output o1.xyzw
dcl_output o2.xyzw
dcl_output o3.xyzw
dcl_output o4.xyzw
dcl_output o5.xyz
dcl_output o6.xyz
dcl_output o7.xyz
dcl_output o8.xyz
dcl_output o9.xy
dcl_temps 7
dcl_resource_texture2d (float,float,float,float) t125
dp4 r0.y, v0.xyzw, v6.xyzw
mul r1.xyzw, r0.yyyy, cb0[1].xyzw
dp4 r0.x, v0.xyzw, v5.xyzw
mad r1.xyzw, r0.xxxx, cb0[0].xyzw, r1.xyzw
dp4 r0.z, v0.xyzw, v7.xyzw
mad r1.xyzw, r0.zzzz, cb0[2].xyzw, r1.xyzw
mad r1.xyzw, v0.wwww, cb0[3].xyzw, r1.xyzw

mov o0.xyzw, r1.xyzw

ld_indexable(texture2d)(float,float,float,float) r6.xyzw, l(0, 0, 0, 0), t125.xyzw
add r6.w, r1.w, -r6.y
mad r1.x, r6.x, r6.w, r1.x
mov o1.xyz, r0.xyzx
add r0.xyz, -r0.xyzx, cb0[27].xyzx
mov o1.w, v0.w
itof r2.xyzw, v8.xyzw
mul r3.xyzw, r2.xyzw, l(0.00390625000, 0.00390625000, 0.00390625000, 0.00390625000)
frc r3.xyzw, r3.xyzw
mul r4.xyzw, r3.xyzw, v2.xyzw
mul r4.xyzw, r4.xyzw, l(1.00392163, 1.00392163, 1.00392163, 1.00392163)
mov_sat r4.xyz, r4.xyzx
log r4.xyz, r4.xyzx
lt r5.xyzw, r2.xyzw, l(0.000000, 0.000000, 0.000000, 0.000000)
and r5.xyzw, r5.xyzw, l(0x43800000, 0x43800000, 0x43800000, 0x43800000)
mad r2.xyzw, r2.xyzw, l(0.00390625000, 0.00390625000, 0.00390625000, 0.00390625000), r5.xyzw
add r2.xyzw, -r3.xyzw, r2.xyzw
ge r0.w, r2.x, l(128.000000)
movc r1.z, r0.w, l(2.200000), l(1.000000)
mul r3.xyz, r4.xyzx, r1.zzzz
exp o2.xyz, r3.xyzx
lt r1.z, l(0.500000), r2.w
dp3 r2.w, r0.xyzx, r0.xyzx
rsq r2.w, r2.w
mul r3.xyz, r0.xyzx, r2.wwww
mul r4.xyz, v6.zxyz, v7.yzxy
mad r4.xyz, v6.yzxy, v7.zxyz, -r4.xyzx
dp3 r4.x, v1.xyzx, r4.xyzx
mul r5.xyz, v5.yzxy, v7.zxyz
mad r5.xyz, v7.yzxy, v5.zxyz, -r5.xyzx
dp3 r4.y, v1.xyzx, r5.xyzx
mul r5.xyz, v5.zxyz, v6.yzxy
mad r5.xyz, v5.yzxy, v6.zxyz, -r5.xyzx
dp3 r4.z, v1.xyzx, r5.xyzx
dp3 r2.w, r4.xyzx, r4.xyzx
rsq r2.w, r2.w
mul r4.xyz, r2.wwww, r4.xyzx
dp3 r2.w, r4.xyzx, r3.xyzx
movc r1.z, r1.z, |r2.w|, l(1.000000)
mul o2.w, r1.z, r4.w
mad r1.z, r2.y, l(0.00196078443), l(0.500000)
add r2.yz, r2.xxzx, l(0.000000, -128.000000, -128.000000, 0.000000)
movc r0.w, r0.w, r2.y, r2.x
exp r2.x, r2.z
mul r1.z, r1.z, r2.x
div o3.w, l(1.000000, 1.000000, 1.000000, 1.000000), r1.z
dp2 o3.x, cb0[24].xyxx, r1.xwxx
dp2 o3.y, cb0[24].zwzz, r1.ywyy
mov o3.z, r1.w

mad r1.x, -r6.x, r6.w, r1.x

mul r2.xyz, r4.yyyy, cb0[1].xywx
mad r2.xyz, r4.xxxx, cb0[0].xywx, r2.xyzx
mad r2.xyz, r4.zzzz, cb0[2].xywx, r2.xyzx
dp2 o4.x, cb0[28].xyxx, r2.xzxx
dp2 o4.y, cb0[28].zwzz, r2.yzyy
mov o4.z, r2.z
dp3 r1.z, r4.xyzx, r0.xyzx
mov o4.w, |r1.z|
dp3 r2.x, v4.xyzx, v5.xyzx
dp3 r2.y, v4.xyzx, v6.xyzx
dp3 r2.z, v4.xyzx, v7.xyzx
dp3 r1.z, r2.xyzx, r2.xyzx
rsq r1.z, r1.z
mul r2.xyz, r1.zzzz, r2.xyzx
mul r3.xyz, r2.yyyy, cb0[1].xywx
mad r3.xyz, r2.xxxx, cb0[0].xywx, r3.xyzx
mad r3.xyz, r2.zzzz, cb0[2].xywx, r3.xyzx
dp2 o5.x, cb0[28].xyxx, r3.xzxx
dp2 o5.y, cb0[28].zwzz, r3.yzyy
mov o5.z, r3.z
mul r3.xyz, r4.yzxy, r2.zxyz
mad r3.xyz, r2.yzxy, r4.zxyz, -r3.xyzx
dp3 r4.z, r4.xyzx, -r0.xyzx
dp3 r4.y, r2.xyzx, -r0.xyzx
mul r2.xyz, r3.xyzx, v4.wwww
mul r3.xyz, r2.yyyy, cb0[1].xywx
mad r3.xyz, r2.xxxx, cb0[0].xywx, r3.xyzx
mad r3.xyz, r2.zzzz, cb0[2].xywx, r3.xyzx
dp3 r4.x, r2.xyzx, -r0.xyzx
dp2 o6.x, cb0[28].xyxx, r3.xzxx
dp2 o6.y, cb0[28].zwzz, r3.yzyy
mov o6.z, r3.z
mul r0.x, r0.w, l(0.00784313772)
mad r0.y, -r0.w, l(0.00784313772), l(2.000000)
mul r0.yzw, r1.xxyw, r0.yyyy
mul o7.xyz, r0.xxxx, r4.xyzx
dp2 o8.x, cb0[28].xyxx, r0.ywyy
dp2 o8.y, cb0[28].zwzz, r0.zwzz
mov o8.z, r0.w
itof r0.xyzw, v9.xyzw
mul r0.xyzw, r0.xyzw, l(0.000244140625, 0.000244140625, 0.000244140625, 0.000244140625)
mad o9.xy, v3.xyxx, r0.zwzz, r0.xyxx
ret
// Approximately 97 instruction slots used
