#version 450
#extension GL_EXT_mesh_shader : require
layout(local_size_x = 2, local_size_y = 3, local_size_z = 4) in;
layout(max_vertices = 24, max_primitives = 8, triangles) out;

struct _12
{
    float _m0;
};

layout(location = 1) out vec4 B[24];
layout(location = 3) perprimitiveEXT out vec4 C[8];
shared float _32[64];
taskPayloadSharedEXT _12 _38;

void main()
{
    _32[gl_LocalInvocationIndex] = float(gl_LocalInvocationIndex);
    barrier();
    SetMeshOutputsEXT(24u, 8u);
    gl_MeshVerticesEXT[gl_LocalInvocationIndex].gl_Position.x = _32[gl_LocalInvocationIndex];
    gl_MeshVerticesEXT[gl_LocalInvocationIndex].gl_Position.y = _32[gl_LocalInvocationIndex];
    gl_MeshVerticesEXT[gl_LocalInvocationIndex].gl_Position.z = _32[gl_LocalInvocationIndex];
    gl_MeshVerticesEXT[gl_LocalInvocationIndex].gl_Position.w = _32[gl_LocalInvocationIndex];
    float _59 = _38._m0 + _32[gl_LocalInvocationIndex ^ 1u];
    B[gl_LocalInvocationIndex].x = _59;
    B[gl_LocalInvocationIndex].y = _59;
    B[gl_LocalInvocationIndex].z = _59;
    B[gl_LocalInvocationIndex].w = _59;
    if (gl_LocalInvocationIndex < 8u)
    {
        uint _65 = gl_LocalInvocationIndex * 3u;
        gl_PrimitiveTriangleIndicesEXT[gl_LocalInvocationIndex] = uvec3(_65, _65 + 1u, _65 + 2u);
        gl_MeshPrimitivesEXT[gl_LocalInvocationIndex].gl_CullPrimitiveEXT = (gl_LocalInvocationIndex & 1u) != 0u;
        gl_MeshPrimitivesEXT[gl_LocalInvocationIndex].gl_PrimitiveID = int(gl_LocalInvocationIndex);
        gl_MeshPrimitivesEXT[gl_LocalInvocationIndex].gl_Layer = int(gl_LocalInvocationIndex);
        uint _78 = gl_LocalInvocationIndex ^ 2u;
        C[gl_LocalInvocationIndex].x = _32[_78];
        C[gl_LocalInvocationIndex].y = _32[_78];
        C[gl_LocalInvocationIndex].z = _32[_78];
        C[gl_LocalInvocationIndex].w = _32[_78];
    }
}

