RWByteAddressBuffer u0_counter : register(u1);
RWBuffer<uint> u0 : register(u0);

static uint3 gl_GlobalInvocationID;
struct SPIRV_Cross_Input
{
    uint3 gl_GlobalInvocationID : SV_DispatchThreadID;
};

void comp_main()
{
    uint _24;
    u0_counter.InterlockedAdd(0, -1, _24);
    u0[asint(asfloat(_24))] = uint(int(gl_GlobalInvocationID.x)).x;
}

[numthreads(4, 1, 1)]
void main(SPIRV_Cross_Input stage_input)
{
    gl_GlobalInvocationID = stage_input.gl_GlobalInvocationID;
    comp_main();
}
