I like these lines of code:
const double left1 = inst1->x + inst1->bbox_left, top1 = inst1->x + inst1->bbox_top,
right1 = inst1->x + inst1->bbox_right, bottom1 = inst1->x + inst1->bbox_bottom;
const double left2 = inst2->x + inst2->bbox_left, top2 = inst2->x + inst2->bbox_top,
right2 = inst2->x + inst2->bbox_right, bottom2 = inst2->x + inst2->bbox_bottom;
const double left1 = inst1->x + inst1->bbox_left, top1 = inst1->x + inst1->bbox_top,
right1 = inst1->x + inst1->bbox_right, bottom1 = inst1->x + inst1->bbox_bottom;
const double left2 = inst2->x + inst2->bbox_left, top2 = inst2->x + inst2->bbox_top,
right2 = inst2->x + inst2->bbox_right, bottom2 = inst2->x + inst2->bbox_bottom;