#version 450
#if defined(GL_ARB_gpu_shader_int64)
#extension GL_ARB_gpu_shader_int64 : require
#else
#error No extension available for 64-bit integers.
#endif
#extension GL_EXT_buffer_reference2 : require
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

layout(buffer_reference) buffer Node;
layout(buffer_reference, buffer_reference_align = 16, std430) buffer Node
{
    layout(offset = 0) int value;
    layout(offset = 16) Node next;
    layout(offset = 32) Node prev;
};

layout(set = 0, binding = 0, std430) restrict buffer LinkedList
{
    Node head1;
    Node head2;
} _50;

void main()
{
    Node _114;
    if (gl_WorkGroupID.x < 4u)
    {
        _114 = _50.head1;
    }
    else
    {
        _114 = _50.head2;
    }
    _114.next.value = _50.head1.value + _50.head2.value;
    _50.head1.value = 20;
    _50.head1.value = _50.head2.value * 10;
}

