  impur
sccs_id	equ	*
	db	y'25',y'5A',y'25',y'25',y'4D',y'25',y'20',y'20'
	db	y'20',y'20',y'9',y'25',y'49',y'25',y'9',y'25'
	db	y'59',y'25',y'20',y'25',y'55',y'25',y'20',y'2D'
	db	y'20',y'25',y'45',y'25',y'20',y'0'
  align adc
canonb	comn
	ds	256
	ends
rootdir	comn
	ds	4
	ends
runq	comn
	ds	4
	ends
cputype	comn
	ds	4
	ends
lbolt	comn
	ds	4
	ends
time	comn
	ds	4
	ends
timezone	comn
	ds	4
	ends
dstflag	comn
	ds	4
	ends
nblkdev	comn
	ds	4
	ends
nchrdev	comn
	ds	4
	ends
mpid	comn
	ds	4
	ends
runin	comn
	ds	4
	ends
runout	comn
	ds	4
	ends
runrun	comn
	ds	4
	ends
curpri	comn
	ds	4
	ends
maxmem	comn
	ds	4
	ends
memtop	comn
	ds	4
	ends
freemem	comn
	ds	4
	ends
lks	comn
	ds	4
	ends
swplo	comn
	ds	4
	ends
nswap	comn
	ds	4
	ends
updlock	comn
	ds	4
	ends
rablock	comn
	ds	4
	ends
msgbuf	comn
	ds	4
	ends
msgbufMS	comn
	ds	4
	ends
msgbufp	comn
	ds	4
	ends
rootdev	comn
	ds	4
	ends
swapdev	comn
	ds	4
	ends
pipedev	comn
	ds	4
	ends
dk_busy	comn
	ds	4
	ends
dk_time	comn
	ds	256
	ends
dk_numb	comn
	ds	16
	ends
dk_wds	comn
	ds	16
	ends
tk_nin	comn
	ds	4
	ends
tk_nout	comn
	ds	4
	ends
mpxip	comn
	ds	4
	ends
buffers	comn
	ds	4
	ends
io_info	comn
	ds	24
	ends
  entry ihash
  impur
ihash	equ	*

*@24 struct  inode   *ihash[INOHSZ] = { 0 };

	dc	y'0'
	ds	252
ifreelis	comn
	ds	4
	ends
  entry ihinit
  pure
  title ihinit
ihinit	equ	*
~~ihinit equ *
	sai	7,L.0
	stm	8,L.0-32(7)
	ldar	14,7
~i sym 20,13
~ip sym 20,12

*@36 	ifreelist = &inode[0];

	l	0,inode
	st	0,ifreelis

*@37 	for(ip = inode; ip < &inodeNINODE[-1]; ip++)

	l	12,inode
L4	equ	*
	l	0,inodeNIN
	ai	0,-y'48'
	clr	0,12
	bnp	L5

*@38 		ip->i_link = ip + 1;

	lr	0,12
	ai	0,y'48'
	st	0,68(12)
L6	equ	*

*@37 		ip->i_link = ip + 1;

	ai	12,y'48'
	b	L4
L5	equ	*

*@39 	ip->i_link = (struct inode *) NULL;

	li	0,y'0'
	st	0,68(12)

*@40 	for(i = 0; i < INOHSZ; i++)

	li	13,y'0'
L7	equ	*
	ci	13,y'40'
	bnl	L8

*@41 		ihash[i] = (struct inode *) NULL;

	lr	1,13
	slal	1,y'2'
	li	15,y'0'
	st	15,ihash(1)
L9	equ	*

*@40 		ihash[i] = (struct inode *) NULL;

	ai	13,y'1'
	b	L7
L8	equ	*
L2	equ	*

*@0 		ihash[i] = (struct inode *) NULL;

L3	equ	*
	lm	8,L.0-32(14)
	aai	7,L.0
	br	15
L.0 equ 40
  entry ifind
  pure
  title ifind
ifind	equ	*
~~ifind equ *
	sai	7,L.1
	stm	8,L.1-32(7)
	ldar	14,7
~dev equ 2
~ino equ 6
~ip sym 20,13

*@56 	for (ip = ihash[INOHASH(dev,ino)]; ip != NULL;

	lhl	1,L.1+6(14)
	ah	1,L.1+2(14)
	ni	1,y'3F'
	slal	1,y'2'
	l	13,ihash(1)
L12	equ	*
	lr	0,13
	be	L13

*@63 			return (ip);

	lhl	0,L.1+6(14)
	lhl	1,4(13)
	cr	0,1
	bne	L15
	lh	0,L.1+2(14)
	ch	0,2(13)
	bne	L15
	lr	0,13
	b	L11
L15	equ	*
L14	equ	*

*@57 			return (ip);

	l	13,68(13)
	b	L12
L13	equ	*

*@64 	return ((struct inode *)0);

	li	0,y'0'
	b	L11
L10	equ	*

*@0 	return ((struct inode *)0);

L11	equ	*
	lm	8,L.1-32(14)
	aai	7,L.1
	br	15
L.1 equ 40
  entry iget
  pure
  title iget
iget	equ	*
~~iget equ *
	sai	7,L.2
	stm	8,L.2-32(7)
	ldar	14,7
~dev equ 2
~ino equ 6
~ip sym 20,13
~mp sym 20,12
~slot sym 20,11
~bp sym 20,10
~dp sym 20,9
L18	equ	*

*@103 	slot = INOHASH(dev, ino);

	lhl	11,L.2+6(14)
	ah	11,L.2+2(14)
	ni	11,y'3F'

*@104 	ip = ihash[slot];

	lr	1,11
	slal	1,y'2'
	l	13,ihash(1)
L19	equ	*

*@105 	while (ip != NULL) {

	lr	0,13
	be	L20

*@113 		if(ino == ip->i_number && dev == ip->i_dev) {

	lhl	0,L.2+6(14)
	lhl	1,4(13)
	cr	0,1
	bne	L21
	lh	0,L.2+2(14)
	ch	0,2(13)
	bne	L21
L22	equ	*

*@118 			if((ip->i_flag&ILOCK) != 0) {

	lb	0,0(13)
	ni	0,y'1'
	be	L23

*@119 				ip->i_flag |= IWANT;

	lb	0,0(13)
	oi	0,y'10'
	stb	0,0(13)

*@120 				sleep((caddr_t)ip, PINOD);

	li	0,y'A'
	st	0,4(7)
	st	13,0(7)
	bal	15,sleep

*@128 					goto again;

	lhl	0,L.2+6(14)
	lhl	1,4(13)
	cr	0,1
	bne	L10000
	lh	0,L.2+2(14)
	ch	0,2(13)
	be	L22
L10000	equ	*
	b	L18
L23	equ	*

*@132 			if((ip->i_flag&IMOUNT) != 0) {

	lb	0,0(13)
	ni	0,y'8'
	be	L24

*@133 				for(mp = &mount[0]; mp < mountNMOUNT; mp++)

	l	12,mount
L25	equ	*
	cl	12,mountNMO
	bnl	L26

*@134 				if(mp->m_inodp == ip) {

	l	0,8(12)
	cr	0,13
	bne	L28

*@135 					dev = mp->m_dev;

	lh	0,0(12)
	sth	0,L.2+2(14)

*@136 					ino = ROOTINO;

	li	0,y'2'
	sth	0,L.2+6(14)
	b	L18
L28	equ	*
L27	equ	*

*@133 					ino = ROOTINO;

	ai	12,y'C'
	b	L25
L26	equ	*

*@139 				panic("no imt");

	ldai	0,L29
	st	0,0(7)
	bal	15,panic
L24	equ	*

*@141 			ip->i_count++;

	lb	0,1(13)
	ai	0,y'1'
	stb	0,1(13)

*@142 			ip->i_flag |= ILOCK;

	lb	0,0(13)
	oi	0,y'1'
	stb	0,0(13)

*@144 			return(ip);

	lr	0,13
	b	L17
L21	equ	*

*@147 		ip = ip->i_link;

	l	13,68(13)
	b	L19
L20	equ	*

*@154 	if (ifreelist == NULL) {

	l	0,ifreelis
	bne	L30

*@159 		printf("Inode table overflow\n");

	ldai	0,L31
	st	0,0(7)
	bal	15,printf

*@160 		u.u_error = ENFILE;

	li	0,y'17'
	stb	0,u+141

*@162 		return(NULL);

	li	0,y'0'
	b	L17
L30	equ	*

*@165 	ip = ifreelist;

	l	13,ifreelis

*@166 	ifreelist = ip->i_link;

	l	0,68(13)
	st	0,ifreelis

*@167 	ip->i_link = ihash[slot];

	lr	1,11
	slal	1,y'2'
	l	1,ihash(1)
	st	1,68(13)

*@168 	ihash[slot] = ip;

	lr	1,11
	slal	1,y'2'
	st	13,ihash(1)

*@170 	ip->i_dev = dev;

	lh	0,L.2+2(14)
	sth	0,2(13)

*@171 	ip->i_number = ino;

	lhl	0,L.2+6(14)
	sth	0,4(13)

*@172 	ip->i_flag = ILOCK;

	li	0,y'1'
	stb	0,0(13)

*@173 	ip->i_count++;

	lb	0,1(13)
	ai	0,y'1'
	stb	0,1(13)

*@174 	ip->i_un.i_lastr = 0;

	li	0,y'0'
	st	0,48(13)

*@182 	bp = bread(dev, itod(ino));

	lhl	1,L.2+6(14)
	ai	1,y'1F'
	li	15,y'10'
	ldar	0,1
	sraa	0,31
	dar	0,15
	st	1,4(7)
	lh	0,L.2+2(14)
	st	0,0(7)
	bal	15,bread
	ldar	10,0

*@186 	if((bp->b_flags&B_ERROR) != 0) {

	li	0,y'4'
	n	0,0(10)
	be	L32

*@187 		brelse(bp);

	st	10,0(7)
	bal	15,brelse

*@188 		iput(ip);

	st	13,0(7)
	bal	15,iput

*@190 		return(NULL);

	li	0,y'0'
	b	L17
L32	equ	*

*@192 	dp = bp->b_un.b_dino;

	l	9,28(10)

*@193 	dp += itoo(ino);

	lhl	1,L.2+6(14)
	ai	1,y'1F'
	li	15,y'10'
	ldar	0,1
	sraa	0,31
	dar	0,15
	slal	0,y'6'
	aar	9,0

*@194 	iexpand(ip, dp);

	st	9,4(7)
	st	13,0(7)
	bal	15,iexpand

*@195 	brelse(bp);

	st	10,0(7)
	bal	15,brelse

*@197 	return(ip);

	lr	0,13
	b	L17
L16	equ	*

*@0 	return(ip);

L17	equ	*
	lm	8,L.2-32(14)
	aai	7,L.2
	br	15
L.2 equ 40
  entry iexpand
  pure
  title iexpand
iexpand	equ	*
~~iexpand equ *
	sai	7,L.3
	stm	8,L.3-32(7)
	ldar	14,7

*@203 {

	l	13,L.3+0(14)
~ip sym 20,13
	l	12,L.3+4(14)
~dp sym 20,12
~p1 sym 20,11
~p2 equ -36
~i equ -40

*@219 	ip->i_mode = dp->di_mode;

	lhl	0,0(12)
	sth	0,6(13)

*@221 	ip->i_nlink = dp->di_nlink;

	lh	0,2(12)
	sth	0,8(13)

*@222 	ip->i_uid = dp->di_uid;

	lh	0,4(12)
	sth	0,10(13)

*@223 	ip->i_gid = dp->di_gid;

	lh	0,6(12)
	sth	0,12(13)

*@233 	ip->i_size = dp->di_size;

	l	0,8(12)
	st	0,16(13)

*@234 	p1 = (char *)ip->i_un.i_addr;

	lr	11,13
	ai	11,y'14'

*@235 	p2 = (char *)dp->di_addr;

	lr	0,12
	ai	0,y'C'
	st	0,L.3-36(14)

*@236 	for(i=0; i<NADDR; i++) {

	li	0,y'0'
	st	0,L.3-40(14)
L35	equ	*
	l	0,L.3-40(14)
	ci	0,y'7'
	bnl	L36

*@241 		*p1++ = 0;

	li	0,y'0'
	stb	0,0(11)
	ai	11,y'1'

*@242 		*p1++ = *p2++;

	l	1,L.3-36(14)
	ldar	15,1
	ai	15,y'1'
	st	15,L.3-36(14)
	lb	1,0(1)
	lr	0,1
	stb	0,0(11)
	ai	11,y'1'

*@244 		*p1++ = *p2++;

	l	1,L.3-36(14)
	ldar	15,1
	ai	15,y'1'
	st	15,L.3-36(14)
	lb	1,0(1)
	lr	0,1
	stb	0,0(11)
	ai	11,y'1'

*@245 		*p1++ = *p2++;

	l	1,L.3-36(14)
	ldar	15,1
	ai	15,y'1'
	st	15,L.3-36(14)
	lb	1,0(1)
	lr	0,1
	stb	0,0(11)
	ai	11,y'1'
L37	equ	*

*@236 		*p1++ = *p2++;

	li	0,y'1'
	am	0,L.3-40(14)
	b	L35
L36	equ	*
L33	equ	*

*@0 		*p1++ = *p2++;

L34	equ	*
	lm	8,L.3-32(14)
	aai	7,L.3
	br	15
L.3 equ 48
  entry iput
  pure
  title iput
iput	equ	*
~~iput equ *
	sai	7,L.4
	stm	8,L.4-32(7)
	ldar	14,7

*@259 {

	l	13,L.4+0(14)
~ip sym 20,13
~jp sym 20,12
~i sym 20,11

*@280 	if(ip->i_count == 1) {

	lb	0,1(13)
	cli	0,y'1'
	bne	L40

*@281 		ip->i_flag |= ILOCK;

	lb	0,0(13)
	oi	0,y'1'
	stb	0,0(13)

*@282 		if(ip->i_nlink <= 0) {

	lh	0,8(13)
	bp	L41

*@283 			itrunc(ip);

	st	13,0(7)
	bal	15,itrunc

*@284 			ip->i_mode = 0;

	li	0,y'0'
	sth	0,6(13)

*@285 			ip->i_flag |= IUPD|ICHG;

	lb	0,0(13)
	oi	0,y'42'
	stb	0,0(13)

*@286 			ifree(ip->i_dev, ip->i_number);

	lhl	0,4(13)
	st	0,4(7)
	lh	0,2(13)
	st	0,0(7)
	bal	15,ifree
L41	equ	*

*@302 		iupdat(ip, &time, &time);

	sis	7,4
	ldai	0,time
	st	0,8(7)
	ldai	0,time
	st	0,4(7)
	st	13,0(7)
	bal	15,iupdat
	ais	7,4

*@304 		prele(ip);

	st	13,0(7)
	bal	15,prele

*@306 		i = INOHASH(ip->i_dev, ip->i_number);

	lhl	11,4(13)
	ah	11,2(13)
	ni	11,y'3F'

*@308 			ihash[i] = ip->i_link;

	lr	1,11
	slal	1,y'2'
	l	1,ihash(1)
	cr	1,13
	bne	L42
	l	0,68(13)
	lr	1,11
	slal	1,y'2'
	st	0,ihash(1)
	b	L43
L42	equ	*

*@310 			for (jp = ihash[i]; jp != NULL; jp = jp->i_link)

	lr	1,11
	slal	1,y'2'
	l	12,ihash(1)
L44	equ	*
	lr	0,12
	be	L45

*@311 				if (jp->i_link == ip) {

	l	0,68(12)
	cr	0,13
	bne	L47

*@312 					jp->i_link = ip->i_link;

	l	0,68(13)
	st	0,68(12)
	b	L48
L47	equ	*
L46	equ	*

*@310 					jp->i_link = ip->i_link;

	l	12,68(12)
	b	L44
L45	equ	*

*@315 			panic("iput");

	ldai	0,L49
	st	0,0(7)
	bal	15,panic
L43	equ	*
L48	equ	*

*@318 		ip->i_link = ifreelist;

	l	0,ifreelis
	st	0,68(13)

*@319 		ifreelist = ip;

	st	13,ifreelis

*@321 		ip->i_flag = 0;

	li	0,y'0'
	stb	0,0(13)

*@322 		ip->i_number = 0;

	li	0,y'0'
	sth	0,4(13)
	b	L50
L40	equ	*

*@326 		prele(ip);

	st	13,0(7)
	bal	15,prele
L50	equ	*

*@327 	ip->i_count--;

	lb	0,1(13)
	ai	0,-y'1'
	stb	0,1(13)
L38	equ	*

*@0 	ip->i_count--;

L39	equ	*
	lm	8,L.4-32(14)
	aai	7,L.4
	br	15
L.4 equ 40
  entry iupdat
  pure
  title iupdat
iupdat	equ	*
~~iupdat equ *
	sai	7,L.5
	stm	8,L.5-32(7)
	ldar	14,7

*@360 {

	l	13,L.5+0(14)
~ip sym 20,13
~ta equ 4
~tm equ 8
~bp sym 20,12
~dp equ -36
~p1 sym 20,11
~p2 equ -40
~i equ -44

*@367 	if((ip->i_flag&(IUPD|IACC|ICHG)) != 0) {

	lb	0,0(13)
	ni	0,y'46'
	be	L53

*@369 			return;

	lh	0,2(13)
	st	0,0(7)
	bal	15,getfs
	lr	1,0
	lb	1,y'3A1'(1)
	lr	1,1
	bne	L51

*@370 		bp = bread(ip->i_dev, itod(ip->i_number));

	lhl	1,4(13)
	ai	1,y'1F'
	li	15,y'10'
	ldar	0,1
	sraa	0,31
	dar	0,15
	st	1,4(7)
	lh	0,2(13)
	st	0,0(7)
	bal	15,bread
	ldar	12,0

*@371 		if (bp->b_flags & B_ERROR) {

	li	0,y'4'
	n	0,0(12)
	be	L54

*@372 			brelse(bp);

	st	12,0(7)
	bal	15,brelse
	b	L51
L54	equ	*

*@375 		dp = bp->b_un.b_dino;

	l	0,28(12)
	st	0,L.5-36(14)

*@376 		dp += itoo(ip->i_number);

	lhl	1,4(13)
	ai	1,y'1F'
	li	15,y'10'
	ldar	0,1
	sraa	0,31
	dar	0,15
	slal	0,y'6'
	am	0,L.5-36(14)

*@384 		dp->di_mode = ip->i_mode;

	lhl	0,6(13)
	l	1,L.5-36(14)
	sth	0,0(1)

*@386 		dp->di_nlink = ip->i_nlink;

	lh	0,8(13)
	l	1,L.5-36(14)
	sth	0,y'2'(1)

*@387 		dp->di_uid = ip->i_uid;

	lh	0,10(13)
	l	1,L.5-36(14)
	sth	0,y'4'(1)

*@388 		dp->di_gid = ip->i_gid;

	lh	0,12(13)
	l	1,L.5-36(14)
	sth	0,y'6'(1)

*@402 		dp->di_size = ip->i_size;

	l	0,16(13)
	l	1,L.5-36(14)
	st	0,y'8'(1)

*@403 		p1 = (char *)dp->di_addr;

	l	11,L.5-36(14)
	ai	11,y'C'

*@404 		p2 = (char *)ip->i_un.i_addr;

	lr	0,13
	ai	0,y'14'
	st	0,L.5-40(14)

*@405 		for(i=0; i<NADDR; i++) {

	li	0,y'0'
	st	0,L.5-44(14)
L55	equ	*
	l	0,L.5-44(14)
	ci	0,y'7'
	bnl	L56

*@421 				printf("iaddress > 2^24\n");

	l	1,L.5-40(14)
	ldar	15,1
	ai	15,y'1'
	st	15,L.5-40(14)
	lb	1,0(1)
	lr	1,1
	be	L58
	lhl	0,6(13)
	ni	0,y'F000'
	ci	0,y'3000'
	be	L58
	lhl	0,6(13)
	ni	0,y'F000'
	ci	0,y'7000'
	be	L58
	ldai	0,L59
	st	0,0(7)
	bal	15,printf
L58	equ	*

*@423 			*p1++ = *p2++;

	l	1,L.5-40(14)
	ldar	15,1
	ai	15,y'1'
	st	15,L.5-40(14)
	lb	1,0(1)
	lr	0,1
	stb	0,0(11)
	ai	11,y'1'

*@425 			*p1++ = *p2++;

	l	1,L.5-40(14)
	ldar	15,1
	ai	15,y'1'
	st	15,L.5-40(14)
	lb	1,0(1)
	lr	0,1
	stb	0,0(11)
	ai	11,y'1'

*@426 			*p1++ = *p2++;

	l	1,L.5-40(14)
	ldar	15,1
	ai	15,y'1'
	st	15,L.5-40(14)
	lb	1,0(1)
	lr	0,1
	stb	0,0(11)
	ai	11,y'1'
L57	equ	*

*@405 			*p1++ = *p2++;

	li	0,y'1'
	am	0,L.5-44(14)
	b	L55
L56	equ	*

*@429 			dp->di_atime = *ta;

	lb	0,0(13)
	ni	0,y'4'
	be	L60
	l	1,L.5+4(14)
	l	1,0(1)
	l	2,L.5-36(14)
	st	1,y'34'(2)
L60	equ	*

*@431 			dp->di_mtime = *tm;

	lb	0,0(13)
	ni	0,y'2'
	be	L61
	l	1,L.5+8(14)
	l	1,0(1)
	l	2,L.5-36(14)
	st	1,y'38'(2)
L61	equ	*

*@433 			dp->di_ctime = time;

	lb	0,0(13)
	ni	0,y'40'
	be	L62
	l	0,time
	l	1,L.5-36(14)
	st	0,y'3C'(1)
L62	equ	*

*@435 		ip->i_flag &= ~(IUPD|IACC|ICHG);

	lb	0,0(13)
	ni	0,-y'47'
	stb	0,0(13)

*@442 		bdwrite(bp);

	st	12,0(7)
	bal	15,bdwrite
L53	equ	*
L51	equ	*

*@0 		bdwrite(bp);

L52	equ	*
	lm	8,L.5-32(14)
	aai	7,L.5
	br	15
L.5 equ 52
  entry itrunc
  pure
  title itrunc
itrunc	equ	*
~~itrunc equ *
	sai	7,L.6
	stm	8,L.6-32(7)
	ldar	14,7

*@494 {

	l	13,L.6+0(14)
~ip sym 20,13
~i sym 20,12
~dev equ -36
~bn equ -40

*@502 	i = ip->i_mode & IFMT;

	lhl	12,6(13)
	ni	12,y'F000'

*@504 		return;

	ci	12,y'8000'
	be	L10001
	ci	12,y'4000'
	bne	L63
L10001	equ	*

*@524 	dev = ip->i_dev;

	lh	0,2(13)
	sth	0,L.6-36(14)

*@525 	for(i=NADDR-1; i>=0; i--) {

	li	12,y'6'
L65	equ	*
	lr	0,12
	bm	L66

*@526 		bn = ip->i_un.i_addr[i];

	lr	1,12
	slal	1,y'2'
	ar	1,13
	l	1,y'14'(1)
	st	1,L.6-40(14)

*@528 			continue;

	l	0,L.6-40(14)
	be	L67

*@529 		ip->i_un.i_addr[i] = (daddr_t)0;

	lr	1,12
	slal	1,y'2'
	ar	1,13
	li	15,y'0'
	st	15,y'14'(1)

*@530 		switch(i) {

	lr	0,12
	b	L69
L70	equ	*

*@536 			free(dev, bn);

	l	0,L.6-40(14)
	st	0,4(7)
	lh	0,L.6-36(14)
	st	0,0(7)
	bal	15,free
	b	L68
L71	equ	*

*@544 			tloop(dev, bn, 0, 0);

	sis	7,8
	li	0,y'0'
	st	0,12(7)
	li	0,y'0'
	st	0,8(7)
	l	0,L.6-40(14)
	st	0,4(7)
	lh	0,L.6-36(14)
	st	0,0(7)
	bal	15,tloop
	ais	7,8
	b	L68
L72	equ	*

*@552 			tloop(dev, bn, 1, 0);

	sis	7,8
	li	0,y'0'
	st	0,12(7)
	li	0,y'1'
	st	0,8(7)
	l	0,L.6-40(14)
	st	0,4(7)
	lh	0,L.6-36(14)
	st	0,0(7)
	bal	15,tloop
	ais	7,8
	b	L68
L73	equ	*

*@560 			tloop(dev, bn, 1, 1);

	sis	7,8
	li	0,y'1'
	st	0,12(7)
	li	0,y'1'
	st	0,8(7)
	l	0,L.6-40(14)
	st	0,4(7)
	lh	0,L.6-36(14)
	st	0,0(7)
	bal	15,tloop
	ais	7,8
	b	L68
L69	equ	*
* dirsw
	sai	0,y'4'
	cai	0,y'2'
	bp	L70
	ldar	1,0
	bm	L70
	slal	1,ladc
	lda	1,L10003(1)
	br	1
  impur
*<
L10003	equ	*
	dc	L71
	dc	L72
	dc	L73
*>
  pure
L68	equ	*
L67	equ	*

*@525 			tloop(dev, bn, 1, 1);

	ai	12,-y'1'
	b	L65
L66	equ	*

*@564 	ip->i_size = 0;

	li	0,y'0'
	st	0,16(13)

*@566 	ip->i_flag |= ICHG|IUPD;

	lb	0,0(13)
	oi	0,y'42'
	stb	0,0(13)
L63	equ	*

*@0 	ip->i_flag |= ICHG|IUPD;

L64	equ	*
	lm	8,L.6-32(14)
	aai	7,L.6
	br	15
L.6 equ 48
  entry tloop
  pure
  title tloop
tloop	equ	*
~~tloop equ *
	sai	7,L.7
	stm	8,L.7-32(7)
	ldar	14,7
~dev equ 2
~bn equ 4
~f1 equ 8
~f2 equ 12
~i sym 20,13
~bp sym 20,12
~bap sym 20,11
~nb equ -36

*@591 	bp = NULL;

	li	12,y'0'

*@592 	for(i=NINDIR-1; i>=0; i--) {

	li	13,y'FF'
L76	equ	*
	lr	0,13
	bm	L77

*@593 		if(bp == NULL) {

	lr	0,12
	bne	L79

*@594 			bp = bread(dev, bn);

	l	0,L.7+4(14)
	st	0,4(7)
	lh	0,L.7+2(14)
	st	0,0(7)
	bal	15,bread
	ldar	12,0

*@595 			if (bp->b_flags & B_ERROR) {

	li	0,y'4'
	n	0,0(12)
	be	L80

*@596 				brelse(bp);

	st	12,0(7)
	bal	15,brelse
	b	L74
L80	equ	*

*@599 			bap = bp->b_un.b_daddr;

	l	11,28(12)
L79	equ	*

*@601 		nb = bap[i];

	lr	1,13
	slal	1,y'2'
	ar	1,11
	l	1,0(1)
	st	1,L.7-36(14)

*@603 			continue;

	l	0,L.7-36(14)
	be	L78

*@604 		if(f1) {

	l	0,L.7+8(14)
	be	L81

*@605 			brelse(bp);

	st	12,0(7)
	bal	15,brelse

*@606 			bp = NULL;

	li	12,y'0'

*@610 			tloop(dev, nb, f2, 0);

	sis	7,8
	li	0,y'0'
	st	0,12(7)
	l	0,L.7+12(14)
	st	0,8(7)
	l	0,L.7-36(14)
	st	0,4(7)
	lh	0,L.7+2(14)
	st	0,0(7)
	bal	15,tloop
	ais	7,8
	b	L82
L81	equ	*

*@616 			free(dev, nb);

	l	0,L.7-36(14)
	st	0,4(7)
	lh	0,L.7+2(14)
	st	0,0(7)
	bal	15,free
L82	equ	*
L78	equ	*

*@592 			free(dev, nb);

	ai	13,-y'1'
	b	L76
L77	equ	*

*@620 		brelse(bp);

	lr	0,12
	be	L83
	st	12,0(7)
	bal	15,brelse
L83	equ	*

*@624 	free(dev, bn);

	l	0,L.7+4(14)
	st	0,4(7)
	lh	0,L.7+2(14)
	st	0,0(7)
	bal	15,free
L74	equ	*

*@0 	free(dev, bn);

L75	equ	*
	lm	8,L.7-32(14)
	aai	7,L.7
	br	15
L.7 equ 44
  entry maknode
  pure
  title maknode
maknode	equ	*
~~maknode equ *
	sai	7,L.8
	stm	8,L.8-32(7)
	ldar	14,7
~mode equ 0
~ip sym 20,13

*@637 	ip = ialloc(u.u_pdir->i_dev);

	l	1,u+224
	lh	1,y'2'(1)
	st	1,0(7)
	bal	15,ialloc
	ldar	13,0

*@638 	if(ip == NULL) {

	lr	0,13
	bne	L86

*@639 		iput(u.u_pdir);

	l	0,u+224
	st	0,0(7)
	bal	15,iput

*@640 		return(NULL);

	li	0,y'0'
	b	L85
L86	equ	*

*@642 	ip->i_flag |= IACC|IUPD|ICHG;

	lb	0,0(13)
	oi	0,y'46'
	stb	0,0(13)

*@644 		mode |= IFREG;

	li	0,y'F000'
	n	0,L.8+0(14)
	bne	L87
	l	0,L.8+0(14)
	oi	0,y'8000'
	st	0,L.8+0(14)
L87	equ	*

*@645 	ip->i_mode = mode & ~u.u_cmask;

	lcs	0,1
	xh	0,u+1628
	n	0,L.8+0(14)
	sth	0,6(13)

*@646 	ip->i_nlink = 1;

	li	0,y'1'
	sth	0,8(13)

*@647 	ip->i_uid = u.u_uid;

	lh	0,u+142
	sth	0,10(13)

*@648 	ip->i_gid = u.u_gid;

	lh	0,u+144
	sth	0,12(13)

*@657 	wdir(ip);

	st	13,0(7)
	bal	15,wdir

*@658 	return(ip);

	lr	0,13
	b	L85
L84	equ	*

*@0 	return(ip);

L85	equ	*
	lm	8,L.8-32(14)
	aai	7,L.8
	br	15
L.8 equ 40
  entry wdir
  pure
  title wdir
wdir	equ	*
~~wdir equ *
	sai	7,L.9
	stm	8,L.9-32(7)
	ldar	14,7
~ip equ 0

*@670 	if (u.u_pdir->i_nlink <= 0) {

	l	1,u+224
	lh	1,y'8'(1)
	bp	L90

*@671 		u.u_error = ENOTDIR;

	li	0,y'14'
	stb	0,u+141
	b	L91
L90	equ	*

*@674 	u.u_dent.d_ino = ip->i_number;

	l	1,L.9+0(14)
	lhl	1,y'4'(1)
	sth	1,u+208

*@675 	bcopy((caddr_t)u.u_dbuf, (caddr_t)u.u_dent.d_name, DIRSIZ);

	sis	7,4
	li	0,y'E'
	st	0,8(7)
	ldai	0,u+210
	st	0,4(7)
	ldai	0,u+188
	st	0,0(7)
	bal	15,bcopy
	ais	7,4

*@676 	u.u_count = sizeof(struct direct);

	li	0,y'10'
	st	0,u+172

*@677 	u.u_segflg = 1;

	li	0,y'1'
	stb	0,u+140

*@678 	u.u_base = (caddr_t)&u.u_dent;

	ldai	0,u+208
	st	0,u+168

*@679 	writei(u.u_pdir);

	l	0,u+224
	st	0,0(7)
	bal	15,writei
L91	equ	*

*@688 	iput(u.u_pdir);

	l	0,u+224
	st	0,0(7)
	bal	15,iput
L88	equ	*

*@0 	iput(u.u_pdir);

L89	equ	*
	lm	8,L.9-32(14)
	aai	7,L.9
	br	15
L.9 equ 40
  align adc
  impur
L29	equ	*
	db	y'6E',y'6F',y'20',y'69',y'6D',y'74',y'0'
L31	equ	*
	db	y'49',y'6E',y'6F',y'64',y'65',y'20',y'74',y'61'
	db	y'62',y'6C',y'65',y'20',y'6F',y'76',y'65',y'72'
	db	y'66',y'6C',y'6F',y'77',y'A',y'0'
L49	equ	*
	db	y'69',y'70',y'75',y'74',y'0'
L59	equ	*
	db	y'69',y'61',y'64',y'64',y'72',y'65',y'73',y'73'
	db	y'20',y'3E',y'20',y'32',y'5E',y'32',y'34',y'A'
	db	y'0'
  extrn freemem
  extrn dk_numb
  extrn dstflag
  extrn nblkdev
  extrn nchrdev
  extrn getmdev
  extrn pipedev
  extrn szicode
  extrn updlock
  extrn dk_busy
  extrn msgbufp
  extrn cmapsiz
  extrn msgbufs
  extrn swapdev
  extrn maxuprc
  extrn rootdir
  extrn rootdev
  extrn tk_nout
  extrn smapsiz
  extrn cputype
  extrn inodeNIN
  extrn mountNMO
  extrn buffers
  extrn msgbufMS
  extrn io_info
  extrn bdwrite
  extrn bfreelis
  extrn u
  extrn ifreelis
  extrn timezone
  extrn buf
  extrn lks
  extrn bmap
  extrn free
  extrn getf
  extrn mpid
  extrn nbuf
  extrn time
  extrn runq
  extrn bread
  extrn icode
  extrn ncall
  extrn namei
  extrn alloc
  extrn nfile
  extrn uchar
  extrn inode
  extrn getfs
  extrn lbolt
  extrn sleep
  extrn nproc
  extrn panic
  extrn ifree
  extrn prele
  extrn bcopy
  extrn nswap
  extrn owner
  extrn runin
  extrn mpxip
  extrn ntext
  extrn swplo
  extrn mount
  extrn breada
  extrn bufNBUF
  extrn canonb
  extrn falloc
  extrn ialloc
  extrn getblk
  extrn regloc
  extrn ninode
  extrn dk_wds
  extrn tk_nin
  extrn msgbuf
  extrn maxmem
  extrn nclist
  extrn memtop
  extrn curpri
  extrn bdevsw
  extrn nmount
  extrn cdevsw
  extrn sysent
  extrn runrun
  extrn runout
  extrn linesw
  extrn printf
  extrn brelse
  extrn writei
  extrn dk_time
  extrn rablock
  extrn geteblk
  end
