// File: kernel.cpp
#include "loop_108.h"
#include <stdint.h>

extern "C" void inner_loop_108(struct loop_108_data *data) {
    uint32_t *rgba = data->rgba;
    uint8_t *y = data->y;
    int64_t n = data->n;
    for (int64_t i = 0; i < n; i++) {
        y[i] = (rgba[i] >> 24) >> 2;
        y[i] += ((rgba[i] >> 16) & 0xff) >> 1;
        y[i] += ((rgba[i] >> 16) & 0xff) >> 3;
        y[i] += ((rgba[i] >> 8) & 0xff) >> 3;
    }
}