u_int end_index;  end_index = index + 1 + ahc->msgout_buf[index + 1]; if (ahc->msgout_buf[index+2] == msgval && type == AHCMSG_EXT) {
if (ahc->msgout_buf[index+2] == msgtype) { u_int end_index;  end_index = index + 1 + ahc->msgout_buf[index + 1];
ahc_sent_msg(struct ahc_softc *ahc, ahc_msgtype type, u_int msgval, int full){	int found;	u_int index;	found = FALSE;	index = 0;	while (index < ahc->msgout_len) {		if (ahc->msgout_buf[index] == MSG_EXTENDED) {			u_int end_index;			end_index = index + 1 + ahc->msgout_buf[index + 1];			if (ahc->msgout_buf[index+2] == msgval			 && type == AHCMSG_EXT) {				if (full) {					if (ahc->msgout_index > end_index)						found = TRUE;				} else if (ahc->msgout_index > index)					found = TRUE;			}			index = end_index;		} else if (ahc->msgout_buf[index] >= MSG_SIMPLE_TASK			&& ahc->msgout_buf[index] <= MSG_IGN_WIDE_RESIDUE) {			/* Skip tag type and tag id or residue param*/			index += 2;		} else {			/* Single byte message */			if (type == AHCMSG_1B			 && ahc->msgout_buf[index] == msgval			 && ahc->msgout_index > index)				found = TRUE;			index++;		}		if (found)			break;	}	return (found);}