#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;
    double double_eq_const_9_0;

    if (size < 80)
        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;
    memcpy(&double_eq_const_9_0, &data[i], 8);
    i += 8;


    if (double_eq_const_0_0 == -6.701453812617535E-150)
    if (double_eq_const_1_0 == 2.146565076023484E-214)
    if (double_eq_const_2_0 == -2.7012557836122814E253)
    if (double_eq_const_3_0 == -85.16377126583812)
    if (double_eq_const_4_0 == 3.7097987460197195E267)
    if (double_eq_const_5_0 == -1.4589026484857478E-77)
    if (double_eq_const_6_0 == 5.6940375161695754E-300)
    if (double_eq_const_7_0 == -3.0301249503369198E-304)
    if (double_eq_const_8_0 == -8.356630188990597E195)
    if (double_eq_const_9_0 == -1.3345964711274485E12)
        BOOM();

    return TEPHRA_EXIT_SUCCESS;
}

#ifdef __cplusplus
}
#endif
