/****Copyright (c) 1997-2009 All rights reserved
 ****A. V. Gerbessiotis 
 ****Permission to use, copy, modify, and distribute this software,
 ****and to incorporate it, in whole or in part, into 
 ****other software,is hereby granted without fee, provided that
 ****  (1) the above copyright notice and this permission 
 ****      notice appear in all copies of the source code, and 
 ****      the above copyright notice appear in clearly visible 
 ****      form on all supporting documentation and distribution 
 ****      media, and
 ****     (2) any redistribution of the software, in original
 ****         or modified form, be without fee and subject to
 ****         these same conditions.
 ****   No guarantee, whatsoever, is offered that the code works as
 ****   advertised or is absent of any, even damaging,
 ****   side-effects. Use this code at your own personal risk.
 ****/

#include <memory.h>
#include <limits.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
typedef int data;
/* Date: Jun 23, 2005 */
#ifndef TRUE
#define TRUE            1
#endif
#ifndef FALSE
#define	FALSE		0
#endif
#ifndef MIN
#define	MIN(x,y)	((x)<=(y)?(x):(y)) 
#endif
#ifndef MAX
#define	MAX(x,y)	((x)>=(y)?(x):(y))
#endif

void check_if_null(void *, char *, char *); /* in inulchk.c */
#undef MEMCPY
#define MEMCPY(X,Y,SIZE)  memcpy((X),(Y),(SIZE))
#undef  MEMCPY
#define MEMCPY(XX,YY,SS) {DES=(XX);SRC=(YY);M=(SS); do {*DES++=*SRC++;} while (--M); }
#undef ALTERNATIVE
#undef  IMEMCPY
#define IMEMCPY(XX,YY,SS) {DES=(XX);SRC=(YY);M=(SS>>2); do {*DES++=*SRC++;} while (--M);}
void gmerge(void *, void *, int , int , int , int (*)(const void *,const void *));
void gmerge1(void *, void *, int , int , int , int (*)(const void *,const void *));
void gmerge11(void *, void *, int , int , int , int (*)(const void *,const void *));
void gmerge21(void *, void *, int , int , int , int (*)(const void *,const void *));
void gmerge2(void *, void *, int , int , int , int (*)(const void *,const void *));
void gmerge12(void *, void *, int , int , int , int (*)(const void *,const void *));
void gmerge3(void *, void *, int , int , int , int (*)(const void *,const void *));
void gmerge13(void *, void *, int , int , int , int (*)(const void *,const void *));
void gmerge23(void *, void *, int , int , int , int (*)(const void *,const void *));

void  imerge(data *, data *, int , int);
void  imerge1(data *, data *, int , int);
void  imerge11(data *, data *, int , int);
void  imerge21(data *, data *, int , int);
void  imerge2(data *, data *, int , int);
void  imerge12(data *, data *, int , int);
void  imerge22(data *, data *, int , int);
void  imerge3(data *, data *, int , int);
void  imerge13(data *, data *, int , int);
