#version 450
#if defined(GL_AMD_gpu_shader_half_float)
#extension GL_AMD_gpu_shader_half_float : require
#elif defined(GL_EXT_shader_explicit_arithmetic_types_float16)
#extension GL_EXT_shader_explicit_arithmetic_types_float16 : require
#else
#error No extension available for FP16.
#endif
#extension GL_EXT_shader_16bit_storage : require
#extension GL_EXT_shader_explicit_arithmetic_types_int16 : require
#extension GL_KHR_cooperative_matrix : require
#extension GL_KHR_memory_scope_semantics : require
#extension GL_EXT_bfloat16 : require
layout(local_size_x = 64, local_size_y = 1, local_size_z = 1) in;

coopmat<float, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA> _876;

layout(set = 0, binding = 0, std430) buffer SSBO32
{
    float data[];
} ssbo32;

layout(set = 0, binding = 0, std430) buffer SSBO16
{
    float16_t data[];
} ssbo16;

shared uint blah[512];

void main()
{
    uint _513 = 256u * gl_WorkGroupID.x;
    coopmat<float, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA> _518;
    coopMatLoad(_518, ssbo32.data, _513, 16u, gl_CooperativeMatrixLayoutColumnMajor);
    coopmat<float, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA> _507 = _518;
    uint _521 = 512u * gl_WorkGroupID.x;
    coopmat<float, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA> _526;
    coopMatLoad(_526, ssbo16.data, _521, 32u, gl_CooperativeMatrixLayoutRowMajor);
    _507 = _526;
    coopmat<float, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseB> _534;
    coopMatLoad(_534, ssbo32.data, _513, 16u, gl_CooperativeMatrixLayoutRowMajor);
    coopmat<float, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseB> _508 = _534;
    coopmat<float, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseB> _542;
    coopMatLoad(_542, ssbo16.data, _521, 32u, gl_CooperativeMatrixLayoutRowMajor);
    _508 = _542;
    coopmat<float, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseAccumulator> _550;
    coopMatLoad(_550, ssbo32.data, _513, 16u, gl_CooperativeMatrixLayoutRowMajor);
    coopmat<float, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseAccumulator> _509 = _550;
    coopmat<float, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseAccumulator> _558;
    coopMatLoad(_558, ssbo16.data, _521, 32u, gl_CooperativeMatrixLayoutRowMajor);
    _509 = _558;
    uint _565 = 128u * gl_WorkGroupID.x;
    coopmat<float16_t, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA> _570;
    coopMatLoad(_570, ssbo32.data, _565, 8u, gl_CooperativeMatrixLayoutRowMajor);
    coopmat<float16_t, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA> _559 = _570;
    coopmat<float16_t, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA> _578;
    coopMatLoad(_578, ssbo16.data, _513, 16u, gl_CooperativeMatrixLayoutRowMajor);
    _559 = _578;
    coopmat<float16_t, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseB> _586;
    coopMatLoad(_586, ssbo32.data, _565, 8u, gl_CooperativeMatrixLayoutRowMajor);
    coopmat<float16_t, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseB> _560 = _586;
    coopmat<float16_t, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseB> _594;
    coopMatLoad(_594, ssbo16.data, _513, 16u, gl_CooperativeMatrixLayoutRowMajor);
    _560 = _594;
    coopmat<float16_t, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseAccumulator> _602;
    coopMatLoad(_602, ssbo32.data, _565, 8u, gl_CooperativeMatrixLayoutRowMajor);
    coopmat<float16_t, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseAccumulator> _561 = _602;
    coopmat<float16_t, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseAccumulator> _610;
    coopMatLoad(_610, ssbo16.data, _513, 16u, gl_CooperativeMatrixLayoutRowMajor);
    _561 = _610;
    coopMatStore(coopmat<float, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA>(100.0), ssbo32.data, _565, 0u, gl_CooperativeMatrixLayoutColumnMajor);
    coopMatStore(coopmat<uint, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA>(100u), ssbo32.data, _565, 0u, gl_CooperativeMatrixLayoutRowMajor);
    coopMatStore(coopmat<int, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA>(-100), ssbo32.data, _565, 0u, gl_CooperativeMatrixLayoutRowMajor);
    coopMatStore(coopmat<float16_t, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA>(float16_t(100.0)), ssbo32.data, _565, 0u, gl_CooperativeMatrixLayoutRowMajor);
    coopMatStore(coopmat<int16_t, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA>(-100s), ssbo32.data, _565, 0u, gl_CooperativeMatrixLayoutRowMajor);
    coopMatStore(coopmat<uint16_t, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA>(100us), ssbo32.data, _565, 0u, gl_CooperativeMatrixLayoutRowMajor);
    int _654 = int(uint(coopmat<float, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA>(0).length()));
    _654 = int(uint(coopmat<float16_t, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseB>(0).length()));
    _654 = int(uint(coopmat<int, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseAccumulator>(0).length()));
    _654 = int(uint(coopmat<uint, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA>(0).length()));
    _654 = int(uint(coopmat<int16_t, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseB>(0).length()));
    _654 = int(uint(coopmat<uint16_t, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseAccumulator>(0).length()));
    coopmat<float, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA> _668 = coopmat<float, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA>(100.0);
    coopmat<uint, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA> _669 = coopmat<uint, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA>(100u);
    coopmat<int, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA> _673 = coopmat<int, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA>(coopmat<float, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA>(100.0));
    coopmat<int, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA> _670 = _673;
    _670 = coopmat<int, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA>(coopmat<uint, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA>(100u));
    coopmat<float, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA> _676 = coopmat<float, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA>(100.0);
    coopmat<int, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA> _677 = coopmat<int, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA>(100);
    coopmat<float, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA> _681 = (coopmat<float, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA>(100.0)) + (coopmat<float, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA>(100.0));
    _676 = _681;
    coopmat<float, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA> _684 = _681 - _681;
    _676 = _684;
    coopmat<float, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA> _687 = _684 * _684;
    _676 = _687;
    coopmat<float, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA> _690 = _687 / _687;
    _676 = _690;
    _676 = _690 * 100.0;
    coopmat<int, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA> _695 = (coopmat<int, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA>(100)) + (coopmat<int, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA>(100));
    _677 = _695;
    coopmat<int, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA> _698 = _695 - _695;
    _677 = _698;
    coopmat<int, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA> _701 = _698 * _698;
    _677 = _701;
    coopmat<int, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA> _704 = _701 / _701;
    _677 = _704;
    _677 = _704 * 100;
    coopmat<float, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA> _707 = coopmat<float, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA>(100.0);
    int _708 = 0;
    int _874 = 0;
    for (; _874 < int(uint(coopmat<float, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA>(0).length())); )
    {
        _707[_874] += 50.0;
        int _724 = _874 + 1;
        _708 = _724;
        _874 = _724;
        continue;
    }
    coopMatStore(_707, ssbo32.data, 0u, 16u, gl_CooperativeMatrixLayoutRowMajor);
    coopmat<uint, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA> _732 = coopmat<uint, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA>(gl_WorkGroupID.x);
    coopmat<uint, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA> _728 = _732;
    coopMatStore(_732, ssbo32.data, 0u, 16u, gl_CooperativeMatrixLayoutRowMajor);
    coopmat<float, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA> _782 = _876 * _876;
    coopmat<float, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA> _778 = _782;
    coopmat<float, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA> _735 = _782;
    coopmat<float, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA> _749;
    coopMatLoad(_749, ssbo32.data, _513, 16u, gl_CooperativeMatrixLayoutRowMajor);
    _735 = _749;
    coopmat<float, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseB> _757;
    coopMatLoad(_757, ssbo32.data, _513, 16u, gl_CooperativeMatrixLayoutRowMajor);
    coopmat<float, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseB> _737 = _757;
    coopmat<float, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseAccumulator> _765;
    coopMatLoad(_765, ssbo32.data, _513, 16u, gl_CooperativeMatrixLayoutRowMajor);
    coopmat<float, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseAccumulator> _738 = _765;
    coopmat<float, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseAccumulator> _769 = coopMatMulAdd(_749, _757, _765, 0);
    _738 = _769;
    coopmat<float, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseAccumulator> _773 = coopMatMulAdd(_749, _757, _769, 0);
    _738 = _773;
    _738 = coopMatMulAdd(_749, _757, _773, 16);
    coopmat<uint, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA> _794;
    coopMatLoad(_794, ssbo32.data, _513, 16u, gl_CooperativeMatrixLayoutRowMajor);
    coopmat<uint, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA> _783 = _794;
    coopmat<uint, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseB> _802;
    coopMatLoad(_802, ssbo32.data, _513, 16u, gl_CooperativeMatrixLayoutRowMajor);
    coopmat<uint, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseB> _784 = _802;
    coopmat<uint, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseAccumulator> _810;
    coopMatLoad(_810, ssbo32.data, _513, 16u, gl_CooperativeMatrixLayoutRowMajor);
    coopmat<uint, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseAccumulator> _785 = _810;
    _785 = coopMatMulAdd(_794, _802, _810, 31);
    coopmat<int, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA> _826;
    coopMatLoad(_826, ssbo32.data, _513, 16u, gl_CooperativeMatrixLayoutRowMajor);
    coopmat<int, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA> _815 = _826;
    coopmat<int, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseB> _834;
    coopMatLoad(_834, ssbo32.data, _513, 16u, gl_CooperativeMatrixLayoutRowMajor);
    coopmat<int, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseB> _816 = _834;
    coopmat<int, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseAccumulator> _842;
    coopMatLoad(_842, ssbo32.data, _513, 16u, gl_CooperativeMatrixLayoutRowMajor);
    coopmat<int, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseAccumulator> _817 = _842;
    _817 = coopMatMulAdd(_826, _834, _842, 31);
    coopmat<float, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA> _850;
    coopMatLoad(_850, blah, 0u, 16u, gl_CooperativeMatrixLayoutRowMajor);
    coopmat<float, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA> _847 = _850;
    coopMatStore(_850, blah, 0u, 16u, gl_CooperativeMatrixLayoutRowMajor);
    coopmat<float, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA> _854[4];
    int _853 = 0;
    int _877 = 0;
    for (; _877 < 4; )
    {
        _854[_877] = coopmat<float, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA>(float(_877));
        int _868 = _877 + 1;
        _853 = _868;
        _877 = _868;
        continue;
    }
    coopmat<float, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA> _870 = coopmat<float, gl_ScopeSubgroup, 16u, 16u, gl_MatrixUseA>(0.0);
    coopmat<float, gl_ScopeWorkgroup, 16u, 16u, gl_MatrixUseA> _871 = coopmat<float, gl_ScopeWorkgroup, 16u, 16u, gl_MatrixUseA>(0.0);
    coopmat<bfloat16_t, gl_ScopeWorkgroup, 16u, 16u, gl_MatrixUseA> _872 = coopmat<bfloat16_t, gl_ScopeWorkgroup, 16u, 16u, gl_MatrixUseA>(bfloat16_t(2.5));
}

