7F0B2F2C:	E7A5C	determines endpoint of clipping file
	accepts: A0=p->clipping file, A1=?, A2=?
LUI	T0,8008
ADDIU	T0,T0,B120	;T0=8007B120: table of pointers to room tiles
SW	A0,0000 (T0)	;A0->8007B120: save start of file
LW	T6,0004 (A0)	;T6=A0+4: p->first room
SUBU	V0,A2,A1
LUI	AT,8004
ADDU	T7,T6,V0
ADDIU	T8,T7,FF80	;T8=T7-0x80: base pointer for connection values
SW	T8,0F58 (AT)	;T8->80040F58: save base pointer for all connection values
LW	T9,0004 (A0)	;T9=A0+4: p->first room
LUI	AT,8004
LUI	A2,8004
ADDU	T1,T9,V0
SW	T1,0F5C (AT)	;T1->80040F5C: p->first room (actual tile list start)
LW	T2,0004 (A0)	;T2=A0+4: p->first room
ADDIU	A3,A0,0004	;A3=A0+4
ADDIU	A2,A2,0F4C	;A2=80040F4C: list of tile sizes
BEQ	T2,R0,7F0B2F94	;branch if no stan exceptions present
LUI	A1,8004
LW	V1,0000 (A3)	;V1=p->first room
ADDU	T3,V1,V0
//7F0B2F80:	loop for each of the exception entries
LW	V1,0004 (A3)
SW	T3,0000 (A3)
ADDIU	A3,A3,0004
BNEL	V1,R0,7F0B2F80
ADDU	T3,V1,V0
//7F0B2F94:	grab first tile
ADDIU	V0,A3,0004	;V0=p->tile
LW	T4,0000 (V0)	;T4=tile name and room
ADDIU	A1,A1,0F60	;A1=80040F60: p->final tile
BEQ	T4,R0,7F0B2FD0	;kill if "unstric"
NOP
//7F0B2FA8:	loop for each tile
SW	V0,0000 (A1)	;V0->80040F60: save current tile as final
LH	V1,0006 (V0)	;V1=V0+6: side and division halfword
SRA	T5,V1,0xC	;T5=V1>>C: #sides
ANDI	T6,T5,000F	;T6=#sides
ADDU	T7,A2,T6	;T7=80040F4C+#sides: p->offset for next tile
LBU	T8,0000 (T7)	;T8=offset to next tile
ADDU	V0,T8,V0	;V0+=offset
LW	T9,0000 (V0)	;T9=next tile's name and room
BNEL	T9,R0,7F0B2FAC	;branch if not "unstric"
SW	V0,0000 (A1)
//7F0B2FD0:	return
JR	RA
SW	A0,0000 (T0)	;p->start of stan tile list -> 8007B120

