/*	This file was automatically created by
 *	Reverse Engineering Compiler 1.4a (C) Giampiero Caprino (Nov 22 1998)
 *	Input file: 'hdg.x'
 */

/*	Procedure: 0x01000000 - 0x01000007
 *	Argument size: 0
 *	Local size: 0
 *	Save regs size: 0
 */

crt0_start()
{



    return(main());
}

/*	Procedure: 0x01000008 - 0x01000023
 *	Argument size: 0
 *	Local size: 0
 *	Save regs size: 0
 */

L01000008()
{



    *a2 = *(a0 + d3 + 6);
    a2 = a2 + -4;
    *16777262 = *16777262 + 4;
    *a2 = *(a0 + d3 + 6);
    d0 = d0 + 4;
    d0 = *a0;
    a0 = a0 + -4;
    d0 = *a0;
    a0 = a0 + -4;
    d6 = 0;
    d6 = 0;
    *(a2 + -4 + 20054) = *(a3 + d0);
}

/*	Procedure: 0x01000024 - 0x0100019F
 *	Argument size: -80
 *	Local size: 92
 *	Save regs size: 4
 */

dumpline(unsigned char * p, unsigned long  offset, int cnt)
{
	char  buff[80];
	int c;
	int len;



    sprintf( & buff, 16777224, offset, d2);
    if(16 < cnt) {
        cnt = 16;
    }
    c = 0;
    while(c < cnt) {
        d0 = c;
        sprintf( & buff + d0 + d0 + d0 + 9, 16777231, *(p + c) & 0);
        c = c + 1;
    }
L0100009c:
    d0 = c;
    c = c + 1;
    if(15 >= d0) {
        strcat( & buff, 16777238);
        goto L0100009c;
    }
    len = strlen( & buff);
    strcpy( & buff + len, 16777242);
    c = 0;
    while(c < cnt) {
        d0 = len + c;
        a0 = & buff;
        if(*(p + c) > 31) {
            if(*(p + c) <= 126) {
                goto L0100012c;
            }
        }
        d1 = 46;
        goto L01000132;
L0100012c:
        d1 = *(p + c);
L01000132:
        *(a0 + d0) = d1;
        c = c + 1;
    }
    while(15 >= c) {
        *( & buff + len + c) = 32;
        c = c + 1;
    }
    strcpy( & buff + len + c, 16777246);
    d2 = *(a6 + -96);
    return(printf(16777248, & buff));
}

/*	Procedure: 0x010001A0 - 0x01000263
 *	Argument size: -88
 *	Local size: 92
 *	Save regs size: 0
 */

hexdump(char * fname)
{
	unsigned char  buff[16];
	unsigned long  offset;
	FILE* fp;
	struct stat st;
	int cnt;



    if(stat(fname, & st) != 0) {
        fp = fopen(fname, 16777628);
        if(fp != 0) {
            offset = 0;
L010001fa:
            if(offset < Vffffffbc) {
                cnt = fread( & buff, 1, 16, fp);
                if(cnt != 0) {
                    dumpline( & buff, offset, cnt);
                    offset = offset + cnt;
                    goto L010001fa;
                }
            } else {
            }
            fclose(fp);
            d0 = 0;
        } else {
            perror(fname);
            d0 = 1;
        }
    } else {
        perror(fname);
        d0 = 1;
    }
}

/*	Procedure: 0x01000264 - 0x010002B9
 *	Argument size: -4
 *	Local size: 12
 *	Save regs size: 4
 */

main(int argc, char ** argv)
{
	int i;
	int errs;



    __main();
    errs = 0;
    i = 1;
    while(i < argc) {
        errs = errs + hexdump( *(argv + (i << 2)));
        i = i + 1;
    }
    d1 = errs;
    d0 = d1;
}

/*	Procedure: 0x010002BA - 0x010002EF
 *	Argument size: 4
 *	Local size: 4
 *	Save regs size: 4
 */

stat(char * __path, struct stat* __statbuf)
{



    (save)d2;
    d0 = _xstat(1, __path, __statbuf);
    d2 = *(a6 + -8);
}

/*	Procedure: 0x010002F0 - 0x01000303
 *	Argument size: 0
 *	Local size: 0
 *	Save regs size: 0
 */

_start()
{



    main();
L010002fe:
    goto L010002fe;
}

/*	Procedure: 0x01000304 - 0x0100030B
 *	Argument size: 0
 *	Local size: 0
 *	Save regs size: 0
 */

__main()
{



    }
}

/*	Procedure: 0x0100030C - 0x01000313
 *	Argument size: 8
 *	Local size: 0
 *	Save regs size: 0
 */

printf(char * fmt)
{



    }
}

/*	Procedure: 0x01000314 - 0x0100031B
 *	Argument size: 16
 *	Local size: 0
 *	Save regs size: 0
 */

fprintf(FILE* fp, char * fmt)
{



    }
}

/*	Procedure: 0x0100031C - 0x01000323
 *	Argument size: 16
 *	Local size: 0
 *	Save regs size: 0
 */

sprintf(char * dst, char * fmt)
{



    }
}

/*	Procedure: 0x01000324 - 0x0100032B
 *	Argument size: 32
 *	Local size: 0
 *	Save regs size: 0
 */

fread(void * b, size_t i, size_t l, FILE* p)
{



    }
}

/*	Procedure: 0x0100032C - 0x01000333
 *	Argument size: 32
 *	Local size: 0
 *	Save regs size: 0
 */

fwrite(void * b, size_t i, size_t l, FILE* p)
{



    }
}

/*	Procedure: 0x01000334 - 0x0100033B
 *	Argument size: 16
 *	Local size: 0
 *	Save regs size: 0
 */

fopen(char * n, char * m)
{



    }
}

/*	Procedure: 0x0100033C - 0x01000349
 *	Argument size: 8
 *	Local size: 0
 *	Save regs size: 0
 */

fclose(FILE* fp)
{



    d0 = 0;
}

/*	Procedure: 0x0100034A - 0x01000351
 *	Argument size: 8
 *	Local size: 0
 *	Save regs size: 0
 */

perror(char * p)
{



    }
}

/*	Procedure: 0x01000352 - 0x01000361
 *	Argument size: 8
 *	Local size: 0
 *	Save regs size: 0
 */

exit(int x)
{



L0100035c:
    goto L0100035c;
}

/*	Procedure: 0x01000362 - 0x01000369
 *	Argument size: 16
 *	Local size: 0
 *	Save regs size: 0
 */

__overflow(/* unknown */ void * f, int x)
{



    }
}

/*	Procedure: 0x0100036A - 0x01000377
 *	Argument size: 16
 *	Local size: 0
 *	Save regs size: 0
 */

open(char * name, int mode)
{



    d0 = -1;
}

/*	Procedure: 0x01000378 - 0x01000385
 *	Argument size: 24
 *	Local size: 0
 *	Save regs size: 0
 */

read(int fd, char * buff, int size)
{



    d0 = 0;
}

/*	Procedure: 0x01000386 - 0x01000393
 *	Argument size: 24
 *	Local size: 0
 *	Save regs size: 0
 */

write(int fd, char * buff, int size)
{



    d0 = 0;
}

/*	Procedure: 0x01000394 - 0x0100039B
 *	Argument size: 0
 *	Local size: 0
 *	Save regs size: 0
 */

_fxstat()
{



    }
}

/*	Procedure: 0x0100039C - 0x010003A3
 *	Argument size: 0
 *	Local size: 0
 *	Save regs size: 0
 */

_xstat()
{



    }
}

/*	Procedure: 0x010003A4 - 0x010003D7
 *	Argument size: 12
 *	Local size: 4
 *	Save regs size: 0
 */

strcpy(char * dst, char * src)
{
	char * d;



    d = dst;
L010003ae:
    d0 = *src;
    *dst = d0;
    src = src + 1;
    dst = dst + 1;
    if(*dst != 0) {
        goto L010003ae;
    }
    d1 = d;
    d0 = d1;
}

/*	Procedure: 0x010003D8 - 0x0100040D
 *	Argument size: 12
 *	Local size: 4
 *	Save regs size: 0
 */

strcat(char * dst, char * src)
{
	char * d;



    d = dst;
    while(*dst != 0) {
        dst = dst + 1;
    }
    strcpy(dst, src);
    d1 = d;
    d0 = d1;
}

/*	Procedure: 0x0100040E - 0x0100043B
 *	Argument size: 4
 *	Local size: 4
 *	Save regs size: 0
 */

strlen(char * src)
{
	int len;



    len = 0;
    while(*src != 0) {
        src = src + 1;
        len = len + 1;
    }
    d0 = len;
}

/*	Procedure: 0x0100043C - 0x0100043B
 *	Argument size: 0
 *	Local size: 0
 *	Save regs size: 0
 */

__CTOR_LIST__()
{



}

/*	Procedure: 0x0100043C - 0x01000443
 *	Argument size: 0
 *	Local size: 0
 *	Save regs size: 0
 */

etext()
{



}

/*	Procedure: 0x01000444 - 0x01000443
 *	Argument size: 0
 *	Local size: 0
 *	Save regs size: 0
 */

__CTOR_END__()
{



}

/*	Procedure: 0x01000444 - 0x0100044B
 *	Argument size: 0
 *	Local size: 0
 *	Save regs size: 0
 */

__DTOR_LIST__()
{



}

/*	Procedure: 0x0100044C - 0x00000000
 *	Argument size: 0
 *	Local size: 0
 *	Save regs size: 0
 */

__DTOR_END__()
{



}

/* address  size  */
/* 0x00000000       0 */ struct _IO_FILE_plus	IO_stdin_;
/* 0x00000000       0 */ struct _IO_FILE_plus	IO_stdout_;
/* 0x00000000       0 */ struct _IO_FILE_plus	IO_stderr_;
/* 0x00000000       0 */ FILE	_iob;
/* 0x00000008       0 */ /* unknown */ void 	fake;
/* 0x00000018       0 */ /* unknown */ void 	hd.c;
/* 0x00000027       0 */ /* unknown */ void 	lib.c;
/* 0x01000000       0 */ /* unknown */ void 	crt0_start;
/* 0x01000008       0 */ /* unknown */ void 	/home/cg/usr/src/cmd/wrec/ex68k/;
/* 0x01000008       0 */ /* unknown */ void 	hd.c;
/* 0x01000024       0 */ void 	dumpline(unsigned char *, unsigned long , int);
/* 0x010001a0       0 */ int	hexdump(char *);
/* 0x01000264       0 */ int	main(int, char **);
/* 0x010002ba       0 */ int	stat(char *, struct stat*);
/* 0x010002f0       0 */ int	_start();
/* 0x010002f0       0 */ /* unknown */ void 	;
/* 0x010002f0       0 */ /* unknown */ void 	/home/cg/usr/gcc68k/lib/;
/* 0x010002f0       0 */ /* unknown */ void 	lib.c;
/* 0x01000304       0 */ int	__main();
/* 0x01000394       0 */ int	_fxstat();
/* 0x0100039c       0 */ int	_xstat();
/* 0x0100043a       0 */ /* unknown */ void 	;
/* 0x0100043c       0 */ /* unknown */ void 	__CTOR_LIST__;
/* 0x0100043c       0 */ /* unknown */ void 	etext;
/* 0x01000444       0 */ /* unknown */ void 	__CTOR_END__;
/* 0x01000444       0 */ /* unknown */ void 	__DTOR_LIST__;
/* 0x0100044c       0 */ /* unknown */ void 	_IO_stdout_;
/* 0x0100044c       0 */ /* unknown */ void 	__DTOR_END__;
/* 0x0100044c       0 */ /* unknown */ void 	edata;
/* 0x0100044c       0 */ /* unknown */ void 	__bss_start;
/* 0x01000450       0 */ /* unknown */ void 	_IO_stderr_;
/* 0x01000454       0 */ /* unknown */ void 	_IO_stdin_;
/* 0x01000458       0 */ /* unknown */ void 	__iob;
/* 0x01002398       0 */ /* unknown */ void 	end;
/* 0x01002398       0 */ /* unknown */ void 	_end;
/* 0x01000378       0 */ int	read(int, char *, int);
/* 0x01000386       0 */ int	write(int, char *, int);
/* 0x010003a4       0 */ char *	strcpy(char *, char *);
/* 0x010003d8       0 */ char *	strcat(char *, char *);
/* 0x0100040e       0 */ int	strlen(char *);
/* 0x0100033c       0 */ int	fclose(FILE*);
/* 0x01000334       0 */ FILE*	fopen(char *, char *);
/* 0x01000314       0 */ int	fprintf(FILE*, char *);
/* 0x01000324       0 */ size_t	fread(void *, size_t, size_t, FILE*);
/* 0x0100032c       0 */ size_t	fwrite(void *, size_t, size_t, FILE*);
/* 0x0100034a       0 */ void 	perror(char *);
/* 0x0100030c       0 */ int	printf(char *);
/* 0x0100031c       0 */ int	sprintf(char *, char *);
/* 0x01000362       0 */ int	__overflow(/* unknown */ void *, int);
/* 0x01000352       0 */ int	exit(int);
/* 0x0100036a       0 */ int	open(char *, int);
#if 0 /* auxiliary information */
# Current option values:
option: -compactcalls
option: +compactexprs
option: +compactifs
option: +compset
option: -dfoproc
option: -disasmonly
option: -displaylabels
option: +docase
option: +dofor
option: +doifs
option: -doloops
option: +donullgotos
option: +dopackloops
option: +dopackstmt
option: -doremlabs
option: +dosimplify
option: +dosort
option: +dostmts
option: +doswitch
option: +dowhile
option: -dumpaddrs
option: -dumpcall
option: -dumpcomments
option: -dumpdfo
option: -dumpsblocks
option: -dumpsets
option: -dumpsizes
option: -flag16
option: +fullscreen
option: -getpattern
option: -help
option: -hexconst
option: -html
option: +insertlabels
option: -int16
option: +int32
option: -interactive
option: +locals
option: -nohtmltabs
option: -okclone
option: -outprocs
option: -outrefs
option: -overrule
option: +rdonly
option: -showjump
option: -showlabel
option: -showprotosym
option: -showreg
option: -showstring
option: -silent
option: +simplifyexprs
option: -strallregions
option: -traceall
option: -tracesets
option: -types
option: +usesymtab
option: -validatebr
option: -validatereg
option: +validatestr
#endif