#version 450
#extension GL_EXT_spirv_intrinsics : require

layout(location = 0) in mediump vec4 A;
layout(location = 1) in mediump vec4 B;
layout(location = 2) in mediump vec4 C;
layout(location = 0) out mediump vec4 SV_Target;

spirv_instruction(set = "GLSL.std.450", id = 79) float spvNMin(float, float);
spirv_instruction(set = "GLSL.std.450", id = 79) vec2 spvNMin(vec2, vec2);
spirv_instruction(set = "GLSL.std.450", id = 79) vec3 spvNMin(vec3, vec3);
spirv_instruction(set = "GLSL.std.450", id = 79) vec4 spvNMin(vec4, vec4);
spirv_instruction(set = "GLSL.std.450", id = 80) float spvNMax(float, float);
spirv_instruction(set = "GLSL.std.450", id = 80) vec2 spvNMax(vec2, vec2);
spirv_instruction(set = "GLSL.std.450", id = 80) vec3 spvNMax(vec3, vec3);
spirv_instruction(set = "GLSL.std.450", id = 80) vec4 spvNMax(vec4, vec4);
spirv_instruction(set = "GLSL.std.450", id = 81) float spvNClamp(float, float, float);
spirv_instruction(set = "GLSL.std.450", id = 81) vec2 spvNClamp(vec2, vec2, vec2);
spirv_instruction(set = "GLSL.std.450", id = 81) vec3 spvNClamp(vec3, vec3, vec3);
spirv_instruction(set = "GLSL.std.450", id = 81) vec4 spvNClamp(vec4, vec4, vec4);

mediump float spvNMinRelaxed(mediump float a, mediump float b)
{
    mediump float res = spvNMin(a, b);
    return res;
}

mediump vec2 spvNMinRelaxed(mediump vec2 a, mediump vec2 b)
{
    mediump vec2 res = spvNMin(a, b);
    return res;
}

mediump vec3 spvNMinRelaxed(mediump vec3 a, mediump vec3 b)
{
    mediump vec3 res = spvNMin(a, b);
    return res;
}

mediump vec4 spvNMinRelaxed(mediump vec4 a, mediump vec4 b)
{
    mediump vec4 res = spvNMin(a, b);
    return res;
}

mediump float spvNMaxRelaxed(mediump float a, mediump float b)
{
    mediump float res = spvNMax(a, b);
    return res;
}

mediump vec2 spvNMaxRelaxed(mediump vec2 a, mediump vec2 b)
{
    mediump vec2 res = spvNMax(a, b);
    return res;
}

mediump vec3 spvNMaxRelaxed(mediump vec3 a, mediump vec3 b)
{
    mediump vec3 res = spvNMax(a, b);
    return res;
}

mediump vec4 spvNMaxRelaxed(mediump vec4 a, mediump vec4 b)
{
    mediump vec4 res = spvNMax(a, b);
    return res;
}

mediump float spvNClampRelaxed(mediump float a, mediump float b, mediump float c)
{
    mediump float res = spvNClamp(a, b, c);
    return res;
}

mediump vec2 spvNClampRelaxed(mediump vec2 a, mediump vec2 b, mediump vec2 c)
{
    mediump vec2 res = spvNClamp(a, b, c);
    return res;
}

mediump vec3 spvNClampRelaxed(mediump vec3 a, mediump vec3 b, mediump vec3 c)
{
    mediump vec3 res = spvNClamp(a, b, c);
    return res;
}

mediump vec4 spvNClampRelaxed(mediump vec4 a, mediump vec4 b, mediump vec4 c)
{
    mediump vec4 res = spvNClamp(a, b, c);
    return res;
}

void main()
{
    mediump float _48 = spvNMaxRelaxed(A.x, B.x);
    mediump float _49 = spvNMaxRelaxed(A.y, B.y);
    mediump float _50 = spvNMaxRelaxed(A.z, B.z);
    mediump float _51 = spvNMaxRelaxed(A.w, B.w);
    SV_Target.x = (_48 + spvNMinRelaxed(A.x, B.x)) + spvNClampRelaxed(A.x, _48, C.x);
    SV_Target.y = (_49 + spvNMinRelaxed(A.y, B.y)) + spvNClampRelaxed(A.y, _49, C.y);
    SV_Target.z = (_50 + spvNMinRelaxed(A.z, B.z)) + spvNClampRelaxed(A.z, _50, C.z);
    SV_Target.w = (_51 + spvNMinRelaxed(A.w, B.w)) + spvNClampRelaxed(A.w, _51, C.w);
}

