#include "common.h"
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>

#ifdef __cplusplus
extern "C" {
#endif

int
LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
    size_t i = 0;

    double double_eq_const_0_0;
    double double_eq_const_1_0;
    double double_eq_const_2_0;
    double double_eq_const_3_0;
    double double_eq_const_4_0;
    double double_eq_const_5_0;
    double double_eq_const_6_0;
    double double_eq_const_7_0;
    double double_eq_const_8_0;

    if (size < 72)
        return TEPHRA_EXIT_FAILURE;


    memcpy(&double_eq_const_0_0, &data[i], 8);
    i += 8;
    memcpy(&double_eq_const_1_0, &data[i], 8);
    i += 8;
    memcpy(&double_eq_const_2_0, &data[i], 8);
    i += 8;
    memcpy(&double_eq_const_3_0, &data[i], 8);
    i += 8;
    memcpy(&double_eq_const_4_0, &data[i], 8);
    i += 8;
    memcpy(&double_eq_const_5_0, &data[i], 8);
    i += 8;
    memcpy(&double_eq_const_6_0, &data[i], 8);
    i += 8;
    memcpy(&double_eq_const_7_0, &data[i], 8);
    i += 8;
    memcpy(&double_eq_const_8_0, &data[i], 8);
    i += 8;


    if (double_eq_const_0_0 == -4.505711984959802E166)
    if (double_eq_const_1_0 == 5.969389547017555E-46)
    if (double_eq_const_2_0 == 7.194018356325724E-145)
    if (double_eq_const_3_0 == 6.800259155498145E-178)
    if (double_eq_const_4_0 == -3.0478850692273797E116)
    if (double_eq_const_5_0 == 1.4898837411803473E24)
    if (double_eq_const_6_0 == 9.411721712304089E-169)
    if (double_eq_const_7_0 == 3.0116612345167073E-174)
    if (double_eq_const_8_0 == -3.260110779278396E-106)
        BOOM();

    return TEPHRA_EXIT_SUCCESS;
}

#ifdef __cplusplus
}
#endif
