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

extern "C" void inner_loop_110(struct loop_110_data *data) {
    cint8_t *a = data->a0; cint8_t *b = data->b0; cint32_t *c = data->c0;
    uint64_t size = data->size;
    for (uint64_t i = 0; i < size; i++) {
        c[i].re = (int32_t)(((a[2*i].re * b[2*i].re) - (a[2*i].im * b[2*i].im)) +
                            ((a[2*i+1].re * b[2*i+1].re) - (a[2*i+1].im * b[2*i+1].im)));
        c[i].im = (int32_t)(((a[2*i].im * b[2*i].re) + (a[2*i].re * b[2*i].im)) +
                            ((a[2*i+1].im * b[2*i+1].re) + (a[2*i+1].re * b[2*i+1].im)));
    }
}