// GLSL shader autogenerated by cg2glsl.py.
#if defined(VERTEX)

#if __VERSION__ >= 130
#define COMPAT_VARYING out
#define COMPAT_ATTRIBUTE in
#define COMPAT_TEXTURE texture
#else
#define COMPAT_VARYING varying
#define COMPAT_ATTRIBUTE attribute
#define COMPAT_TEXTURE texture2D
#endif

#ifdef GL_ES
#define COMPAT_PRECISION mediump
#else
#define COMPAT_PRECISION
#endif
COMPAT_VARYING     vec4 _t7;
COMPAT_VARYING     vec4 _t6;
COMPAT_VARYING     vec4 _t5;
COMPAT_VARYING     vec4 _t4;
COMPAT_VARYING     vec4 _t3;
COMPAT_VARYING     vec4 _t2;
COMPAT_VARYING     vec4 _t1;
COMPAT_VARYING     vec2 _texCoord1;
COMPAT_VARYING     vec4 _color1;
COMPAT_VARYING     vec4 _position1;
COMPAT_VARYING     float _frame_rotation;
struct input_dummy {
    vec2 _video_size;
    vec2 _texture_size;
    vec2 _output_dummy_size;
    float _frame_count;
    float _frame_direction;
    float _frame_rotation;
};
struct out_vertex {
    vec4 _position1;
    vec4 _color1;
    vec2 _texCoord1;
    vec4 _t1;
    vec4 _t2;
    vec4 _t3;
    vec4 _t4;
    vec4 _t5;
    vec4 _t6;
    vec4 _t7;
};
out_vertex _ret_0;
input_dummy _IN1;
vec4 _r0008;
COMPAT_ATTRIBUTE vec4 VertexCoord;
COMPAT_ATTRIBUTE vec4 COLOR;
COMPAT_ATTRIBUTE vec4 TexCoord;
COMPAT_VARYING vec4 COL0;
COMPAT_VARYING vec4 TEX0;
COMPAT_VARYING vec4 TEX1;
COMPAT_VARYING vec4 TEX2;
COMPAT_VARYING vec4 TEX3;
COMPAT_VARYING vec4 TEX4;
COMPAT_VARYING vec4 TEX5;
COMPAT_VARYING vec4 TEX6;
COMPAT_VARYING vec4 TEX7;
 
uniform mat4 MVPMatrix;
uniform int FrameDirection;
uniform int FrameCount;
uniform COMPAT_PRECISION vec2 OutputSize;
uniform COMPAT_PRECISION vec2 TextureSize;
uniform COMPAT_PRECISION vec2 InputSize;
void main()
{
    out_vertex _OUT;
    vec2 _ps;
    _r0008 = VertexCoord.x*MVPMatrix[0];
    _r0008 = _r0008 + VertexCoord.y*MVPMatrix[1];
    _r0008 = _r0008 + VertexCoord.z*MVPMatrix[2];
    _r0008 = _r0008 + VertexCoord.w*MVPMatrix[3];
    _ps = vec2(1.00000000E+00/TextureSize.x, 1.00000000E+00/TextureSize.y);
    _OUT._t1 = TexCoord.xxxy + vec4(-_ps.x, 0.00000000E+00, _ps.x, -2.00000000E+00*_ps.y);
    _OUT._t2 = TexCoord.xxxy + vec4(-_ps.x, 0.00000000E+00, _ps.x, -_ps.y);
    _OUT._t3 = TexCoord.xxxy + vec4(-_ps.x, 0.00000000E+00, _ps.x, 0.00000000E+00);
    _OUT._t4 = TexCoord.xxxy + vec4(-_ps.x, 0.00000000E+00, _ps.x, _ps.y);
    _OUT._t5 = TexCoord.xxxy + vec4(-_ps.x, 0.00000000E+00, _ps.x, 2.00000000E+00*_ps.y);
    _OUT._t6 = TexCoord.xyyy + vec4(-2.00000000E+00*_ps.x, -_ps.y, 0.00000000E+00, _ps.y);
    _OUT._t7 = TexCoord.xyyy + vec4(2.00000000E+00*_ps.x, -_ps.y, 0.00000000E+00, _ps.y);
    _ret_0._position1 = _r0008;
    _ret_0._color1 = COLOR;
    _ret_0._texCoord1 = TexCoord.xy;
    _ret_0._t1 = _OUT._t1;
    _ret_0._t2 = _OUT._t2;
    _ret_0._t3 = _OUT._t3;
    _ret_0._t4 = _OUT._t4;
    _ret_0._t5 = _OUT._t5;
    _ret_0._t6 = _OUT._t6;
    _ret_0._t7 = _OUT._t7;
    gl_Position = _r0008;
    COL0 = COLOR;
    TEX0.xy = TexCoord.xy;
    TEX1 = _OUT._t1;
    TEX2 = _OUT._t2;
    TEX3 = _OUT._t3;
    TEX4 = _OUT._t4;
    TEX5 = _OUT._t5;
    TEX6 = _OUT._t6;
    TEX7 = _OUT._t7;
    return;
    COL0 = _ret_0._color1;
    TEX0.xy = _ret_0._texCoord1;
    TEX1 = _ret_0._t1;
    TEX2 = _ret_0._t2;
    TEX3 = _ret_0._t3;
    TEX4 = _ret_0._t4;
    TEX5 = _ret_0._t5;
    TEX6 = _ret_0._t6;
    TEX7 = _ret_0._t7;
} 
#elif defined(FRAGMENT)

#if __VERSION__ >= 130
#define COMPAT_VARYING in
#define COMPAT_TEXTURE texture
out vec4 FragColor;
#else
#define COMPAT_VARYING varying
#define FragColor gl_FragColor
#define COMPAT_TEXTURE texture2D
#endif

#ifdef GL_ES
#ifdef GL_FRAGMENT_PRECISION_HIGH
precision highp float;
#else
precision mediump float;
#endif
#define COMPAT_PRECISION mediump
#else
#define COMPAT_PRECISION
#endif
COMPAT_VARYING     vec4 _t7;
COMPAT_VARYING     vec4 _t6;
COMPAT_VARYING     vec4 _t5;
COMPAT_VARYING     vec4 _t4;
COMPAT_VARYING     vec4 _t3;
COMPAT_VARYING     vec4 _t2;
COMPAT_VARYING     vec4 _t1;
COMPAT_VARYING     vec2 _texCoord;
COMPAT_VARYING     vec4 _color;
COMPAT_VARYING     float _frame_rotation;
struct input_dummy {
    vec2 _video_size;
    vec2 _texture_size;
    vec2 _output_dummy_size;
    float _frame_count;
    float _frame_direction;
    float _frame_rotation;
};
struct out_vertex {
    vec4 _color;
    vec2 _texCoord;
    vec4 _t1;
    vec4 _t2;
    vec4 _t3;
    vec4 _t4;
    vec4 _t5;
    vec4 _t6;
    vec4 _t7;
};
vec4 _ret_0;
vec4 _TMP33;
vec4 _TMP32;
bvec4 _TMP31;
bvec4 _TMP30;
bvec4 _TMP29;
bvec4 _TMP28;
bvec4 _TMP27;
bvec4 _TMP26;
bvec4 _TMP25;
bvec4 _TMP24;
bvec4 _TMP23;
bvec4 _TMP22;
bvec4 _TMP21;
vec4 _TMP20;
vec4 _TMP19;
vec4 _TMP18;
vec4 _TMP17;
vec4 _TMP16;
vec4 _TMP15;
vec4 _TMP14;
vec4 _TMP13;
vec4 _TMP12;
vec4 _TMP11;
vec4 _TMP10;
vec4 _TMP9;
vec4 _TMP8;
vec4 _TMP7;
vec4 _TMP6;
vec4 _TMP5;
vec4 _TMP4;
vec4 _TMP3;
vec4 _TMP2;
vec4 _TMP1;
vec4 _TMP0;
uniform sampler2D Texture;
vec4 _r0134;
vec4 _r0144;
vec4 _r0154;
vec4 _r0164;
vec4 _r0174;
vec4 _r0184;
vec4 _TMP195;
vec4 _a0198;
vec4 _TMP201;
vec4 _a0204;
vec4 _TMP207;
vec4 _a0210;
vec4 _TMP213;
vec4 _a0216;
vec4 _TMP219;
vec4 _a0222;
vec4 _TMP225;
vec4 _a0228;
vec4 _TMP231;
vec4 _a0234;
vec4 _TMP237;
vec4 _a0240;
vec4 _TMP243;
vec4 _a0246;
vec4 _TMP249;
vec4 _a0252;
vec4 _TMP255;
vec4 _a0258;
vec4 _TMP261;
vec4 _a0264;
vec4 _TMP265;
vec4 _a0268;
vec4 _TMP269;
vec4 _a0272;
vec4 _TMP273;
vec4 _a0276;
vec4 _TMP277;
vec4 _a0280;
vec4 _TMP283;
vec4 _a0286;
vec4 _TMP287;
vec4 _a0290;
vec4 _TMP291;
vec4 _a0294;
vec4 _TMP295;
vec4 _a0298;
vec4 _TMP299;
vec4 _a0302;
vec4 _TMP303;
vec4 _a0306;
vec4 _TMP307;
vec4 _a0310;
vec4 _TMP311;
vec4 _a0314;
vec4 _TMP315;
vec4 _a0318;
vec4 _TMP319;
vec4 _a0322;
vec4 _TMP323;
vec4 _a0326;
vec4 _TMP327;
vec4 _a0330;
vec4 _TMP331;
vec4 _a0334;
vec4 _TMP335;
vec4 _a0338;
vec4 _TMP339;
vec4 _a0342;
vec4 _r0344;
vec4 _r0346;
COMPAT_VARYING vec4 TEX1;
COMPAT_VARYING vec4 TEX2;
COMPAT_VARYING vec4 TEX3;
COMPAT_VARYING vec4 TEX4;
COMPAT_VARYING vec4 TEX5;
COMPAT_VARYING vec4 TEX6;
COMPAT_VARYING vec4 TEX7;
 
uniform int FrameDirection;
uniform int FrameCount;
uniform COMPAT_PRECISION vec2 OutputSize;
uniform COMPAT_PRECISION vec2 TextureSize;
uniform COMPAT_PRECISION vec2 InputSize;
void main()
{
    bvec4 _edr;
    bvec4 _edr_left;
    bvec4 _edr_up;
    bvec4 _edr3_left;
    bvec4 _edr3_up;
    bvec4 _px;
    bvec4 _interp_restriction_lv1;
    bvec4 _interp_restriction_lv2_left;
    bvec4 _interp_restriction_lv2_up;
    bvec4 _interp_restriction_lv3_left;
    bvec4 _interp_restriction_lv3_up;
    bvec2 _px0;
    bvec2 _px1;
    bvec2 _px2;
    bvec2 _px3;
    bvec4 _lin0;
    bvec4 _lin1;
    bvec4 _lin2;
    bvec4 _lin3;
    bvec4 _interp_restriction_lv0;
    bvec4 _edr0;
    vec4 _info;
    vec4 _TMP81[4];
    vec4 _TMP82[4];
    _TMP0 = COMPAT_TEXTURE(Texture, TEX1.xw);
    _TMP1 = COMPAT_TEXTURE(Texture, TEX1.yw);
    _TMP2 = COMPAT_TEXTURE(Texture, TEX1.zw);
    _TMP3 = COMPAT_TEXTURE(Texture, TEX2.xw);
    _TMP4 = COMPAT_TEXTURE(Texture, TEX2.yw);
    _TMP5 = COMPAT_TEXTURE(Texture, TEX2.zw);
    _TMP6 = COMPAT_TEXTURE(Texture, TEX3.xw);
    _TMP7 = COMPAT_TEXTURE(Texture, TEX3.yw);
    _TMP8 = COMPAT_TEXTURE(Texture, TEX3.zw);
    _TMP9 = COMPAT_TEXTURE(Texture, TEX4.xw);
    _TMP10 = COMPAT_TEXTURE(Texture, TEX4.yw);
    _TMP11 = COMPAT_TEXTURE(Texture, TEX4.zw);
    _TMP12 = COMPAT_TEXTURE(Texture, TEX5.xw);
    _TMP13 = COMPAT_TEXTURE(Texture, TEX5.yw);
    _TMP14 = COMPAT_TEXTURE(Texture, TEX5.zw);
    _TMP15 = COMPAT_TEXTURE(Texture, TEX6.xy);
    _TMP16 = COMPAT_TEXTURE(Texture, TEX6.xz);
    _TMP17 = COMPAT_TEXTURE(Texture, TEX6.xw);
    _TMP18 = COMPAT_TEXTURE(Texture, TEX7.xy);
    _TMP19 = COMPAT_TEXTURE(Texture, TEX7.xz);
    _TMP20 = COMPAT_TEXTURE(Texture, TEX7.xw);
    _r0134.x = dot(_TMP4.xyz, vec3( 1.43519993E+01, 2.81760006E+01, 5.47200012E+00));
    _r0134.y = dot(_TMP6.xyz, vec3( 1.43519993E+01, 2.81760006E+01, 5.47200012E+00));
    _r0134.z = dot(_TMP10.xyz, vec3( 1.43519993E+01, 2.81760006E+01, 5.47200012E+00));
    _r0134.w = dot(_TMP8.xyz, vec3( 1.43519993E+01, 2.81760006E+01, 5.47200012E+00));
    _r0144.x = dot(_TMP5.xyz, vec3( 1.43519993E+01, 2.81760006E+01, 5.47200012E+00));
    _r0144.y = dot(_TMP3.xyz, vec3( 1.43519993E+01, 2.81760006E+01, 5.47200012E+00));
    _r0144.z = dot(_TMP9.xyz, vec3( 1.43519993E+01, 2.81760006E+01, 5.47200012E+00));
    _r0144.w = dot(_TMP11.xyz, vec3( 1.43519993E+01, 2.81760006E+01, 5.47200012E+00));
    _r0154.x = dot(_TMP7.xyz, vec3( 1.43519993E+01, 2.81760006E+01, 5.47200012E+00));
    _r0154.y = dot(_TMP7.xyz, vec3( 1.43519993E+01, 2.81760006E+01, 5.47200012E+00));
    _r0154.z = dot(_TMP7.xyz, vec3( 1.43519993E+01, 2.81760006E+01, 5.47200012E+00));
    _r0154.w = dot(_TMP7.xyz, vec3( 1.43519993E+01, 2.81760006E+01, 5.47200012E+00));
    _r0164.x = dot(_TMP20.xyz, vec3( 1.43519993E+01, 2.81760006E+01, 5.47200012E+00));
    _r0164.y = dot(_TMP2.xyz, vec3( 1.43519993E+01, 2.81760006E+01, 5.47200012E+00));
    _r0164.z = dot(_TMP15.xyz, vec3( 1.43519993E+01, 2.81760006E+01, 5.47200012E+00));
    _r0164.w = dot(_TMP12.xyz, vec3( 1.43519993E+01, 2.81760006E+01, 5.47200012E+00));
    _r0174.x = dot(_TMP14.xyz, vec3( 1.43519993E+01, 2.81760006E+01, 5.47200012E+00));
    _r0174.y = dot(_TMP18.xyz, vec3( 1.43519993E+01, 2.81760006E+01, 5.47200012E+00));
    _r0174.z = dot(_TMP0.xyz, vec3( 1.43519993E+01, 2.81760006E+01, 5.47200012E+00));
    _r0174.w = dot(_TMP17.xyz, vec3( 1.43519993E+01, 2.81760006E+01, 5.47200012E+00));
    _r0184.x = dot(_TMP13.xyz, vec3( 1.43519993E+01, 2.81760006E+01, 5.47200012E+00));
    _r0184.y = dot(_TMP19.xyz, vec3( 1.43519993E+01, 2.81760006E+01, 5.47200012E+00));
    _r0184.z = dot(_TMP1.xyz, vec3( 1.43519993E+01, 2.81760006E+01, 5.47200012E+00));
    _r0184.w = dot(_TMP16.xyz, vec3( 1.43519993E+01, 2.81760006E+01, 5.47200012E+00));
    _interp_restriction_lv0 = bvec4(_r0154.x != _r0134.w && _r0154.x != _r0134.z, _r0154.y != _r0134.x && _r0154.y != _r0134.w, _r0154.z != _r0134.y && _r0154.z != _r0134.x, _r0154.w != _r0134.z && _r0154.w != _r0134.y);
    _a0198 = _r0134.wxyz - _r0134;
    _TMP195 = abs(_a0198);
    _TMP21 = bvec4(_TMP195.x < 1.50000000E+01, _TMP195.y < 1.50000000E+01, _TMP195.z < 1.50000000E+01, _TMP195.w < 1.50000000E+01);
    _a0204 = _r0134.wxyz - _r0144;
    _TMP201 = abs(_a0204);
    _TMP22 = bvec4(_TMP201.x < 1.50000000E+01, _TMP201.y < 1.50000000E+01, _TMP201.z < 1.50000000E+01, _TMP201.w < 1.50000000E+01);
    _a0210 = _r0134.zwxy - _r0134.yzwx;
    _TMP207 = abs(_a0210);
    _TMP23 = bvec4(_TMP207.x < 1.50000000E+01, _TMP207.y < 1.50000000E+01, _TMP207.z < 1.50000000E+01, _TMP207.w < 1.50000000E+01);
    _a0216 = _r0134.zwxy - _r0144.zwxy;
    _TMP213 = abs(_a0216);
    _TMP24 = bvec4(_TMP213.x < 1.50000000E+01, _TMP213.y < 1.50000000E+01, _TMP213.z < 1.50000000E+01, _TMP213.w < 1.50000000E+01);
    _a0222 = _r0154 - _r0144.wxyz;
    _TMP219 = abs(_a0222);
    _TMP25 = bvec4(_TMP219.x < 1.50000000E+01, _TMP219.y < 1.50000000E+01, _TMP219.z < 1.50000000E+01, _TMP219.w < 1.50000000E+01);
    _a0228 = _r0134.wxyz - _r0184.yzwx;
    _TMP225 = abs(_a0228);
    _TMP26 = bvec4(_TMP225.x < 1.50000000E+01, _TMP225.y < 1.50000000E+01, _TMP225.z < 1.50000000E+01, _TMP225.w < 1.50000000E+01);
    _a0234 = _r0134.wxyz - _r0164;
    _TMP231 = abs(_a0234);
    _TMP27 = bvec4(_TMP231.x < 1.50000000E+01, _TMP231.y < 1.50000000E+01, _TMP231.z < 1.50000000E+01, _TMP231.w < 1.50000000E+01);
    _a0240 = _r0134.zwxy - _r0184;
    _TMP237 = abs(_a0240);
    _TMP28 = bvec4(_TMP237.x < 1.50000000E+01, _TMP237.y < 1.50000000E+01, _TMP237.z < 1.50000000E+01, _TMP237.w < 1.50000000E+01);
    _a0246 = _r0134.zwxy - _r0174;
    _TMP243 = abs(_a0246);
    _TMP29 = bvec4(_TMP243.x < 1.50000000E+01, _TMP243.y < 1.50000000E+01, _TMP243.z < 1.50000000E+01, _TMP243.w < 1.50000000E+01);
    _a0252 = _r0154 - _r0144.zwxy;
    _TMP249 = abs(_a0252);
    _TMP30 = bvec4(_TMP249.x < 1.50000000E+01, _TMP249.y < 1.50000000E+01, _TMP249.z < 1.50000000E+01, _TMP249.w < 1.50000000E+01);
    _a0258 = _r0154 - _r0144;
    _TMP255 = abs(_a0258);
    _TMP31 = bvec4(_TMP255.x < 1.50000000E+01, _TMP255.y < 1.50000000E+01, _TMP255.z < 1.50000000E+01, _TMP255.w < 1.50000000E+01);
    _interp_restriction_lv1 = bvec4(!_TMP21.x && !_TMP22.x || !_TMP23.x && !_TMP24.x || _TMP25.x && (!_TMP26.x && !_TMP27.x || !_TMP28.x && !_TMP29.x) || _TMP30.x || _TMP31.x, !_TMP21.y && !_TMP22.y || !_TMP23.y && !_TMP24.y || _TMP25.y && (!_TMP26.y && !_TMP27.y || !_TMP28.y && !_TMP29.y) || _TMP30.y || _TMP31.y, !_TMP21.z && !_TMP22.z || !_TMP23.z && !_TMP24.z || _TMP25.z && (!_TMP26.z && !_TMP27.z || !_TMP28.z && !_TMP29.z) || _TMP30.z || _TMP31.z, !_TMP21.w && !_TMP22.w || !_TMP23.w && !_TMP24.w || _TMP25.w && (!_TMP26.w && !_TMP27.w || !_TMP28.w && !_TMP29.w) || _TMP30.w || _TMP31.w);
    _interp_restriction_lv2_left = bvec4(_r0154.x != _r0144.z && _r0134.y != _r0144.z, _r0154.y != _r0144.w && _r0134.z != _r0144.w, _r0154.z != _r0144.x && _r0134.w != _r0144.x, _r0154.w != _r0144.y && _r0134.x != _r0144.y);
    _interp_restriction_lv2_up = bvec4(_r0154.x != _r0144.x && _r0134.x != _r0144.x, _r0154.y != _r0144.y && _r0134.y != _r0144.y, _r0154.z != _r0144.z && _r0134.z != _r0144.z, _r0154.w != _r0144.w && _r0134.w != _r0144.w);
    _interp_restriction_lv3_left = bvec4(_r0154.x != _r0174.w && _r0184.w != _r0174.w, _r0154.y != _r0174.x && _r0184.x != _r0174.x, _r0154.z != _r0174.y && _r0184.y != _r0174.y, _r0154.w != _r0174.z && _r0184.z != _r0174.z);
    _interp_restriction_lv3_up = bvec4(_r0154.x != _r0164.y && _r0184.z != _r0164.y, _r0154.y != _r0164.z && _r0184.w != _r0164.z, _r0154.z != _r0164.w && _r0184.x != _r0164.w, _r0154.w != _r0164.x && _r0184.y != _r0164.x);
    _a0264 = _r0154 - _r0144;
    _TMP261 = abs(_a0264);
    _a0268 = _r0154 - _r0144.zwxy;
    _TMP265 = abs(_a0268);
    _a0272 = _r0144.wxyz - _r0184;
    _TMP269 = abs(_a0272);
    _a0276 = _r0144.wxyz - _r0184.yzwx;
    _TMP273 = abs(_a0276);
    _a0280 = _r0134.zwxy - _r0134.wxyz;
    _TMP277 = abs(_a0280);
    _TMP32 = _TMP261 + _TMP265 + _TMP269 + _TMP273 + 4.00000000E+00*_TMP277;
    _a0286 = _r0134.zwxy - _r0134.yzwx;
    _TMP283 = abs(_a0286);
    _a0290 = _r0134.zwxy - _r0174;
    _TMP287 = abs(_a0290);
    _a0294 = _r0134.wxyz - _r0164;
    _TMP291 = abs(_a0294);
    _a0298 = _r0134.wxyz - _r0134;
    _TMP295 = abs(_a0298);
    _a0302 = _r0154 - _r0144.wxyz;
    _TMP299 = abs(_a0302);
    _TMP33 = _TMP283 + _TMP287 + _TMP291 + _TMP295 + 4.00000000E+00*_TMP299;
    _edr0 = bvec4(_TMP32.x < _TMP33.x && _interp_restriction_lv0.x, _TMP32.y < _TMP33.y && _interp_restriction_lv0.y, _TMP32.z < _TMP33.z && _interp_restriction_lv0.z, _TMP32.w < _TMP33.w && _interp_restriction_lv0.w);
    _edr = bvec4(_edr0.x && _interp_restriction_lv1.x, _edr0.y && _interp_restriction_lv1.y, _edr0.z && _interp_restriction_lv1.z, _edr0.w && _interp_restriction_lv1.w);
    _a0306 = _r0134.wxyz - _r0144.zwxy;
    _TMP303 = abs(_a0306);
    _a0310 = _r0134.zwxy - _r0144;
    _TMP307 = abs(_a0310);
    _edr_left = bvec4((2.00000000E+00*_TMP303).x <= _TMP307.x && _interp_restriction_lv2_left.x && _edr.x, (2.00000000E+00*_TMP303).y <= _TMP307.y && _interp_restriction_lv2_left.y && _edr.y, (2.00000000E+00*_TMP303).z <= _TMP307.z && _interp_restriction_lv2_left.z && _edr.z, (2.00000000E+00*_TMP303).w <= _TMP307.w && _interp_restriction_lv2_left.w && _edr.w);
    _a0314 = _r0134.wxyz - _r0144.zwxy;
    _TMP311 = abs(_a0314);
    _a0318 = _r0134.zwxy - _r0144;
    _TMP315 = abs(_a0318);
    _edr_up = bvec4(_TMP311.x >= (2.00000000E+00*_TMP315).x && _interp_restriction_lv2_up.x && _edr.x, _TMP311.y >= (2.00000000E+00*_TMP315).y && _interp_restriction_lv2_up.y && _edr.y, _TMP311.z >= (2.00000000E+00*_TMP315).z && _interp_restriction_lv2_up.z && _edr.z, _TMP311.w >= (2.00000000E+00*_TMP315).w && _interp_restriction_lv2_up.w && _edr.w);
    _a0322 = _r0134.wxyz - _r0174.wxyz;
    _TMP319 = abs(_a0322);
    _a0326 = _r0134.zwxy - _r0164.yzwx;
    _TMP323 = abs(_a0326);
    _edr3_left = bvec4((4.00000000E+00*_TMP319).x <= _TMP323.x && _interp_restriction_lv3_left.x && _edr_left.x, (4.00000000E+00*_TMP319).y <= _TMP323.y && _interp_restriction_lv3_left.y && _edr_left.y, (4.00000000E+00*_TMP319).z <= _TMP323.z && _interp_restriction_lv3_left.z && _edr_left.z, (4.00000000E+00*_TMP319).w <= _TMP323.w && _interp_restriction_lv3_left.w && _edr_left.w);
    _a0330 = _r0134.wxyz - _r0174.wxyz;
    _TMP327 = abs(_a0330);
    _a0334 = _r0134.zwxy - _r0164.yzwx;
    _TMP331 = abs(_a0334);
    _edr3_up = bvec4(_TMP327.x >= (4.00000000E+00*_TMP331).x && _interp_restriction_lv3_up.x && _edr_up.x, _TMP327.y >= (4.00000000E+00*_TMP331).y && _interp_restriction_lv3_up.y && _edr_up.y, _TMP327.z >= (4.00000000E+00*_TMP331).z && _interp_restriction_lv3_up.z && _edr_up.z, _TMP327.w >= (4.00000000E+00*_TMP331).w && _interp_restriction_lv3_up.w && _edr_up.w);
    _a0338 = _r0154 - _r0134.wxyz;
    _TMP335 = abs(_a0338);
    _a0342 = _r0154 - _r0134.zwxy;
    _TMP339 = abs(_a0342);
    _px = bvec4(_TMP335.x <= _TMP339.x, _TMP335.y <= _TMP339.y, _TMP335.z <= _TMP339.z, _TMP335.w <= _TMP339.w);
    _lin3 = bvec4(true, true, true, true);
    _lin2 = bvec4(true, true, true, true);
    _lin1 = bvec4(true, true, true, true);
    _lin0 = bvec4(true, true, true, true);
    if (_edr_left.x && !_edr_up.x) { 
        _px0 = bvec2(false, _px.x);
        _px3 = bvec2(_px.x, true);
        if (_edr3_left.x) { 
            _lin0 = bvec4(false, true, false, false);
            _lin3 = bvec4(true, false, false, false);
        } else {
            _lin0 = bvec4(false, false, true, false);
            _lin3 = bvec4(false, true, true, false);
        } 
    } else {
        if (_edr_up.x && !_edr_left.x) { 
            _px0 = bvec2(false, _px.x);
            _px1 = bvec2(!_px.x, false);
            if (_edr3_up.x) { 
                _lin0 = bvec4(false, true, false, true);
                _lin1 = bvec4(true, false, false, true);
            } else {
                _lin0 = bvec4(false, false, true, true);
                _lin1 = bvec4(false, true, true, true);
            } 
        } else {
            if (_edr.x) { 
                _edr3_up.x = false;
                _edr3_left.x = false;
                _px0 = bvec2(false, _px.x);
                _lin0 = bvec4(false, false, false, true);
            } else {
                if (_edr0.x) { 
                    _edr3_up.x = false;
                    _edr3_left.x = false;
                    _px0 = bvec2(false, _px.x);
                    _lin0 = bvec4(false, false, false, false);
                } 
            } 
        } 
    } 
    if (_edr_left.y && !_edr_up.y) { 
        _px1 = bvec2(false, _px.y);
        _px0 = bvec2(_px.y, true);
        if (_edr3_left.y) { 
            _lin1 = bvec4(false, true, false, false);
            _lin0 = bvec4(true, false, false, false);
        } else {
            _lin1 = bvec4(false, false, true, false);
            _lin0 = bvec4(false, true, true, false);
        } 
    } else {
        if (_edr_up.y && !_edr_left.y) { 
            _px1 = bvec2(false, _px.y);
            _px2 = bvec2(!_px.y, false);
            if (_edr3_up.y) { 
                _lin1 = bvec4(false, true, false, true);
                _lin2 = bvec4(true, false, false, true);
            } else {
                _lin1 = bvec4(false, false, true, true);
                _lin2 = bvec4(false, true, true, true);
            } 
        } else {
            if (_edr.y) { 
                _edr3_up.y = false;
                _edr3_left.y = false;
                _px1 = bvec2(false, _px.y);
                _lin1 = bvec4(false, false, false, true);
            } else {
                if (_edr0.y) { 
                    _edr3_up.y = false;
                    _edr3_left.y = false;
                    _px1 = bvec2(false, _px.y);
                    _lin1 = bvec4(false, false, false, false);
                } 
            } 
        } 
    } 
    if (_edr_left.z && !_edr_up.z) { 
        _px2 = bvec2(false, _px.z);
        _px1 = bvec2(_px.z, true);
        if (_edr3_left.z) { 
            _lin2 = bvec4(false, true, false, false);
            _lin1 = bvec4(true, false, false, false);
        } else {
            _lin2 = bvec4(false, false, true, false);
            _lin1 = bvec4(false, true, true, false);
        } 
    } else {
        if (_edr_up.z && !_edr_left.z) { 
            _px2 = bvec2(false, _px.z);
            _px3 = bvec2(!_px.z, false);
            if (_edr3_up.z) { 
                _lin2 = bvec4(false, true, false, true);
                _lin3 = bvec4(true, false, false, true);
            } else {
                _lin2 = bvec4(false, false, true, true);
                _lin3 = bvec4(false, true, true, true);
            } 
        } else {
            if (_edr.z) { 
                _edr3_up.z = false;
                _edr3_left.z = false;
                _px2 = bvec2(false, _px.z);
                _lin2 = bvec4(false, false, false, true);
            } else {
                if (_edr0.z) { 
                    _edr3_up.z = false;
                    _edr3_left.z = false;
                    _px2 = bvec2(false, _px.z);
                    _lin2 = bvec4(false, false, false, false);
                } 
            } 
        } 
    } 
    if (_edr_left.w && !_edr_up.w) { 
        _px3 = bvec2(false, _px.w);
        _px2 = bvec2(_px.w, true);
        if (_edr3_left.w) { 
            _lin3 = bvec4(false, true, false, false);
            _lin2 = bvec4(true, false, false, false);
        } else {
            _lin3 = bvec4(false, false, true, false);
            _lin2 = bvec4(false, true, true, false);
        } 
    } else {
        if (_edr_up.w && !_edr_left.w) { 
            _px3 = bvec2(false, _px.w);
            _px0 = bvec2(!_px.w, false);
            if (_edr3_up.w) { 
                _lin3 = bvec4(false, true, false, true);
                _lin0 = bvec4(true, false, false, true);
            } else {
                _lin3 = bvec4(false, false, true, true);
                _lin0 = bvec4(false, true, true, true);
            } 
        } else {
            if (_edr.w) { 
                _edr3_up.w = false;
                _edr3_left.w = false;
                _px3 = bvec2(false, _px.w);
                _lin3 = bvec4(false, false, false, true);
            } else {
                if (_edr0.w) { 
                    _edr3_up.w = false;
                    _edr3_left.w = false;
                    _px3 = bvec2(false, _px.w);
                    _lin3 = bvec4(false, false, false, false);
                } 
            } 
        } 
    } 
    _TMP82[0] = vec4(float(_edr3_left.x), float(_edr3_left.y), float(_edr3_left.z), float(_edr3_left.w));
    _TMP82[1] = vec4(float(_edr3_up.x), float(_edr3_up.y), float(_edr3_up.z), float(_edr3_up.w));
    _TMP82[2] = vec4(float(_px0.x), float(_px1.x), float(_px2.x), float(_px3.x));
    _TMP82[3] = vec4(float(_px0.y), float(_px1.y), float(_px2.y), float(_px3.y));
    _r0344 = _TMP82[0] + 2.00000000E+00*_TMP82[1];
    _r0344 = _r0344 + 4.00000000E+00*_TMP82[2];
    _r0344 = _r0344 + 8.00000000E+00*_TMP82[3];
    _TMP81[0] = vec4(float(_lin0.x), float(_lin1.x), float(_lin2.x), float(_lin3.x));
    _TMP81[1] = vec4(float(_lin0.y), float(_lin1.y), float(_lin2.y), float(_lin3.y));
    _TMP81[2] = vec4(float(_lin0.z), float(_lin1.z), float(_lin2.z), float(_lin3.z));
    _TMP81[3] = vec4(float(_lin0.w), float(_lin1.w), float(_lin2.w), float(_lin3.w));
    _r0346 = 1.60000000E+01*_TMP81[0];
    _r0346 = _r0346 + 3.20000000E+01*_TMP81[1];
    _r0346 = _r0346 + 6.40000000E+01*_TMP81[2];
    _r0346 = _r0346 + 1.28000000E+02*_TMP81[3];
    _info = _r0344 + _r0346;
    _ret_0 = _info/vec4( 2.55000000E+02, 2.55000000E+02, 2.55000000E+02, 2.55000000E+02);
    FragColor = _ret_0;
    return;
} 
#endif
