#include <metal_stdlib>
#include <simd/simd.h>

using namespace metal;

struct recurs;

struct recurs
{
    int m1;
    device recurs* m2;
};

struct recurs_1
{
    int m1;
    device recurs_1* m2;
};

constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u);

struct spvDescriptorSetBuffer0
{
    device recurs* nums [[id(0)]];
    texture2d<uint, access::write> tex [[id(1)]];
};

kernel void main0(constant void* spvDescriptorSet0_vp [[buffer(0)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]])
{
    constant auto& spvDescriptorSet0 = *(constant spvDescriptorSetBuffer0*)spvDescriptorSet0_vp;
    spvDescriptorSet0.tex.write(uint4(uint(((*spvDescriptorSet0.nums).m1 + (*spvDescriptorSet0.nums).m2->m1) + (*spvDescriptorSet0.nums).m2->m2->m1), 0u, 0u, 1u), uint2(int2(gl_GlobalInvocationID.xy)));
}

