node {
void evaluate(Context ctx) {
int64_t var1;
int64_t var2;
float p;
int32_t adc_P = getValue<input_adc_P>(ctx);
int32_t t_fine = getValue<input_t_FINE>(ctx);
uint16_t dig_P1 = getValue<input_dig_P1>(ctx);
int16_t dig_P2 = getValue<input_dig_P2>(ctx);
int16_t dig_P3 = getValue<input_dig_P3>(ctx);
int16_t dig_P4 = getValue<input_dig_P4>(ctx);
int16_t dig_P5 = getValue<input_dig_P5>(ctx);
int16_t dig_P6 = getValue<input_dig_P6>(ctx);
int16_t dig_P7 = getValue<input_dig_P7>(ctx);
int16_t dig_P8 = getValue<input_dig_P8>(ctx);
int16_t dig_P9 = getValue<input_dig_P9>(ctx);
var1 = ((int64_t)t_fine) - 128000;
var2 = var1 * var1 * (int64_t)dig_P6;
var2 = var2 + ((var1 * (int64_t)dig_P5) << 17);
var2 = var2 + (((int64_t)dig_P4) << 35);
var1 = ((var1 * var1 * (int64_t)dig_P3) >> 8) + ((var1 * (int64_t)dig_P2) << 12);
var1 = (((((int64_t)1) << 47) + var1)) * ((int64_t)dig_P1) >> 33;
if (var1 == 0) {
return;
}
p = 1048576.0 - adc_P;
p = ((((int64_t)p << 31) - var2) * 3125.0) / var1;
var1 = (dig_P9 * ((int64_t)p >> 13) * ((int64_t)p >> 13)) >> 25;
var2 = (dig_P8 * (int64_t)p) >> 19;
p = ((((int64_t)p + var1 + var2) >> 8) + (dig_P7 << 4)) >> 8;
emitValue<output_PRES>(ctx, p);
emitValue<output_DONE>(ctx, true);
}
}