// language: metal1.2
#include <metal_stdlib>
#include <simd/simd.h>

using metal::uint;


kernel void main_(
) {
    int i = 0;
    metal::int2 i2_ = metal::int2(0);
    metal::int3 i3_ = metal::int3(0);
    metal::int4 i4_ = metal::int4(0);
    uint u = 0u;
    metal::uint2 u2_ = metal::uint2(0u);
    metal::uint3 u3_ = metal::uint3(0u);
    metal::uint4 u4_ = metal::uint4(0u);
    metal::float2 f2_ = metal::float2(0.0);
    metal::float4 f4_ = metal::float4(0.0);
    metal::float4 _e28 = f4_;
    u = metal::pack_float_to_snorm4x8(_e28);
    metal::float4 _e30 = f4_;
    u = metal::pack_float_to_unorm4x8(_e30);
    metal::float2 _e32 = f2_;
    u = metal::pack_float_to_snorm2x16(_e32);
    metal::float2 _e34 = f2_;
    u = metal::pack_float_to_unorm2x16(_e34);
    metal::float2 _e36 = f2_;
    u = as_type<uint>(half2(_e36));
    metal::int4 _e38 = i4_;
    u = uint((_e38[0] & 0xFF) | ((_e38[1] & 0xFF) << 8) | ((_e38[2] & 0xFF) << 16) | ((_e38[3] & 0xFF) << 24));
    metal::uint4 _e40 = u4_;
    u = (_e40[0] & 0xFF) | ((_e40[1] & 0xFF) << 8) | ((_e40[2] & 0xFF) << 16) | ((_e40[3] & 0xFF) << 24);
    uint _e42 = u;
    f4_ = metal::unpack_snorm4x8_to_float(_e42);
    uint _e44 = u;
    f4_ = metal::unpack_unorm4x8_to_float(_e44);
    uint _e46 = u;
    f2_ = metal::unpack_snorm2x16_to_float(_e46);
    uint _e48 = u;
    f2_ = metal::unpack_unorm2x16_to_float(_e48);
    uint _e50 = u;
    f2_ = float2(as_type<half2>(_e50));
    uint _e52 = u;
    i4_ = (int4(_e52, _e52 >> 8, _e52 >> 16, _e52 >> 24) << 24 >> 24);
    uint _e54 = u;
    u4_ = (uint4(_e54, _e54 >> 8, _e54 >> 16, _e54 >> 24) << 24 >> 24);
    int _e56 = i;
    int _e57 = i;
    i = metal::insert_bits(_e56, _e57, metal::min(5u, 32u), metal::min(10u, 32u - metal::min(5u, 32u)));
    metal::int2 _e61 = i2_;
    metal::int2 _e62 = i2_;
    i2_ = metal::insert_bits(_e61, _e62, metal::min(5u, 32u), metal::min(10u, 32u - metal::min(5u, 32u)));
    metal::int3 _e66 = i3_;
    metal::int3 _e67 = i3_;
    i3_ = metal::insert_bits(_e66, _e67, metal::min(5u, 32u), metal::min(10u, 32u - metal::min(5u, 32u)));
    metal::int4 _e71 = i4_;
    metal::int4 _e72 = i4_;
    i4_ = metal::insert_bits(_e71, _e72, metal::min(5u, 32u), metal::min(10u, 32u - metal::min(5u, 32u)));
    uint _e76 = u;
    uint _e77 = u;
    u = metal::insert_bits(_e76, _e77, metal::min(5u, 32u), metal::min(10u, 32u - metal::min(5u, 32u)));
    metal::uint2 _e81 = u2_;
    metal::uint2 _e82 = u2_;
    u2_ = metal::insert_bits(_e81, _e82, metal::min(5u, 32u), metal::min(10u, 32u - metal::min(5u, 32u)));
    metal::uint3 _e86 = u3_;
    metal::uint3 _e87 = u3_;
    u3_ = metal::insert_bits(_e86, _e87, metal::min(5u, 32u), metal::min(10u, 32u - metal::min(5u, 32u)));
    metal::uint4 _e91 = u4_;
    metal::uint4 _e92 = u4_;
    u4_ = metal::insert_bits(_e91, _e92, metal::min(5u, 32u), metal::min(10u, 32u - metal::min(5u, 32u)));
    int _e96 = i;
    i = metal::extract_bits(_e96, metal::min(5u, 32u), metal::min(10u, 32u - metal::min(5u, 32u)));
    metal::int2 _e100 = i2_;
    i2_ = metal::extract_bits(_e100, metal::min(5u, 32u), metal::min(10u, 32u - metal::min(5u, 32u)));
    metal::int3 _e104 = i3_;
    i3_ = metal::extract_bits(_e104, metal::min(5u, 32u), metal::min(10u, 32u - metal::min(5u, 32u)));
    metal::int4 _e108 = i4_;
    i4_ = metal::extract_bits(_e108, metal::min(5u, 32u), metal::min(10u, 32u - metal::min(5u, 32u)));
    uint _e112 = u;
    u = metal::extract_bits(_e112, metal::min(5u, 32u), metal::min(10u, 32u - metal::min(5u, 32u)));
    metal::uint2 _e116 = u2_;
    u2_ = metal::extract_bits(_e116, metal::min(5u, 32u), metal::min(10u, 32u - metal::min(5u, 32u)));
    metal::uint3 _e120 = u3_;
    u3_ = metal::extract_bits(_e120, metal::min(5u, 32u), metal::min(10u, 32u - metal::min(5u, 32u)));
    metal::uint4 _e124 = u4_;
    u4_ = metal::extract_bits(_e124, metal::min(5u, 32u), metal::min(10u, 32u - metal::min(5u, 32u)));
    int _e128 = i;
    i = (((metal::ctz(_e128) + 1) % 33) - 1);
    metal::uint2 _e130 = u2_;
    u2_ = (((metal::ctz(_e130) + 1) % 33) - 1);
    metal::int3 _e132 = i3_;
    i3_ = metal::select(31 - metal::clz(metal::select(_e132, ~_e132, _e132 < 0)), int3(-1), _e132 == 0 || _e132 == -1);
    metal::uint3 _e134 = u3_;
    u3_ = metal::select(31 - metal::clz(_e134), uint3(-1), _e134 == 0 || _e134 == -1);
    int _e136 = i;
    i = metal::select(31 - metal::clz(metal::select(_e136, ~_e136, _e136 < 0)), int(-1), _e136 == 0 || _e136 == -1);
    uint _e138 = u;
    u = metal::select(31 - metal::clz(_e138), uint(-1), _e138 == 0 || _e138 == -1);
    int _e140 = i;
    i = metal::popcount(_e140);
    metal::int2 _e142 = i2_;
    i2_ = metal::popcount(_e142);
    metal::int3 _e144 = i3_;
    i3_ = metal::popcount(_e144);
    metal::int4 _e146 = i4_;
    i4_ = metal::popcount(_e146);
    uint _e148 = u;
    u = metal::popcount(_e148);
    metal::uint2 _e150 = u2_;
    u2_ = metal::popcount(_e150);
    metal::uint3 _e152 = u3_;
    u3_ = metal::popcount(_e152);
    metal::uint4 _e154 = u4_;
    u4_ = metal::popcount(_e154);
    int _e156 = i;
    i = metal::reverse_bits(_e156);
    metal::int2 _e158 = i2_;
    i2_ = metal::reverse_bits(_e158);
    metal::int3 _e160 = i3_;
    i3_ = metal::reverse_bits(_e160);
    metal::int4 _e162 = i4_;
    i4_ = metal::reverse_bits(_e162);
    uint _e164 = u;
    u = metal::reverse_bits(_e164);
    metal::uint2 _e166 = u2_;
    u2_ = metal::reverse_bits(_e166);
    metal::uint3 _e168 = u3_;
    u3_ = metal::reverse_bits(_e168);
    metal::uint4 _e170 = u4_;
    u4_ = metal::reverse_bits(_e170);
    return;
}
