Given these C code,
/* pixel values /
typedef union
{
struct {
uint8_t red;
uint8_t green;
uint8_t blue;
uint8_t alpha;
};
uint8_t channels[4];
uint32_t concatenated_pixel_values;
} qoi_pixel_t;

/ Compares two pixels for the same color /
static bool qoi_cmp_pixel(qoi_pixel_t pixel1, qoi_pixel_t pixel2, const uint8_t channels)
{
bool is_same_pixel = ( / Compare three channels for a pixel /
pixel1.red == pixel2.red &&
pixel1.green == pixel2.green &&
pixel1.blue == pixel2.blue);

if (channels > 3) / RGB pixels have three channels; RGBA pixels have four channels for the alpha channel /
is_same_pixel = is_same_pixel && (pixel1.alpha == pixel2.alpha); / Compare the value of alpha for a pixel */

return is_same_pixel;
}

using only bitwise operators, can you create a branchless version of checking if channel is greater than 4 then set the channel to 4 else set the channel to 3
then create a branchless version of checking if the channel is 4 then check the pixels else check red, green, and blue values