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

using namespace metal;

struct foo
{
    int a;
};

struct bar
{
    int b;
};

kernel void main0(device foo& x [[buffer(0)]], device bar& y [[buffer(1)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]])
{
    device int* _46 = (gl_GlobalInvocationID.x != 0u) ? &x.a : &y.b;
    device int* _40 = _46;
    device int* _33 = _46;
    int _37 = x.a;
    *_46 = 0;
    y.b = _37 + _37;
}

