require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&v0)) {
    sub v0 () {	$0;}
}
unless(defined(&t0)) {
    sub t0 () {	$1;}
}
unless(defined(&t1)) {
    sub t1 () {	$2;}
}
unless(defined(&t2)) {
    sub t2 () {	$3;}
}
unless(defined(&t3)) {
    sub t3 () {	$4;}
}
unless(defined(&t4)) {
    sub t4 () {	$5;}
}
unless(defined(&t5)) {
    sub t5 () {	$6;}
}
unless(defined(&t6)) {
    sub t6 () {	$7;}
}
unless(defined(&t7)) {
    sub t7 () {	$8;}
}
unless(defined(&s0)) {
    sub s0 () {	$9;}
}
unless(defined(&s1)) {
    sub s1 () {	$10;}
}
unless(defined(&s2)) {
    sub s2 () {	$11;}
}
unless(defined(&s3)) {
    sub s3 () {	$12;}
}
unless(defined(&s4)) {
    sub s4 () {	$13;}
}
unless(defined(&s5)) {
    sub s5 () {	$14;}
}
unless(defined(&s6)) {
    sub s6 () {	$15;}
}
unless(defined(&a0)) {
    sub a0 () {	$16;}
}
unless(defined(&a1)) {
    sub a1 () {	$17;}
}
unless(defined(&a2)) {
    sub a2 () {	$18;}
}
unless(defined(&a3)) {
    sub a3 () {	$19;}
}
unless(defined(&a4)) {
    sub a4 () {	$20;}
}
unless(defined(&a5)) {
    sub a5 () {	$21;}
}
unless(defined(&t8)) {
    sub t8 () {	$22;}
}
unless(defined(&t9)) {
    sub t9 () {	$23;}
}
unless(defined(&t10)) {
    sub t10 () {	$24;}
}
unless(defined(&t11)) {
    sub t11 () {	$25;}
}
unless(defined(&ra)) {
    sub ra () {	$26;}
}
unless(defined(&t12)) {
    sub t12 () {	$27;}
}
unless(defined(&at_reg)) {
    sub at_reg () {	$28;}
}
unless(defined(&gp)) {
    sub gp () {	$29;}
}
unless(defined(&sp)) {
    sub sp () {	$30;}
}
unless(defined(&zero)) {
    sub zero () {	$31;}
}
unless(defined(&fv0)) {
    sub fv0 () {	$ &f0;}
}
unless(defined(&fv1)) {
    sub fv1 () {	$ &f1;}
}
unless(defined(&ft0)) {
    sub ft0 () {	 &fv1;}
}
unless(defined(&fs0)) {
    sub fs0 () {	$ &f2;}
}
unless(defined(&fs1)) {
    sub fs1 () {	$ &f3;}
}
unless(defined(&fs2)) {
    sub fs2 () {	$ &f4;}
}
unless(defined(&fs3)) {
    sub fs3 () {	$ &f5;}
}
unless(defined(&fs4)) {
    sub fs4 () {	$ &f6;}
}
unless(defined(&fs5)) {
    sub fs5 () {	$ &f7;}
}
unless(defined(&fs6)) {
    sub fs6 () {	$ &f8;}
}
unless(defined(&fs7)) {
    sub fs7 () {	$ &f9;}
}
unless(defined(&ft1)) {
    sub ft1 () {	$ &f10;}
}
unless(defined(&ft2)) {
    sub ft2 () {	$ &f11;}
}
unless(defined(&ft3)) {
    sub ft3 () {	$ &f12;}
}
unless(defined(&ft4)) {
    sub ft4 () {	$ &f13;}
}
unless(defined(&ft5)) {
    sub ft5 () {	$ &f14;}
}
unless(defined(&ft6)) {
    sub ft6 () {	$ &f15;}
}
unless(defined(&fa0)) {
    sub fa0 () {	$ &f16;}
}
unless(defined(&fa1)) {
    sub fa1 () {	$ &f17;}
}
unless(defined(&fa2)) {
    sub fa2 () {	$ &f18;}
}
unless(defined(&fa3)) {
    sub fa3 () {	$ &f19;}
}
unless(defined(&fa4)) {
    sub fa4 () {	$ &f20;}
}
unless(defined(&fa5)) {
    sub fa5 () {	$ &f21;}
}
unless(defined(&ft7)) {
    sub ft7 () {	$ &f22;}
}
unless(defined(&ft8)) {
    sub ft8 () {	$ &f23;}
}
unless(defined(&ft9)) {
    sub ft9 () {	$ &f24;}
}
unless(defined(&ft10)) {
    sub ft10 () {	$ &f25;}
}
unless(defined(&ft11)) {
    sub ft11 () {	$ &f26;}
}
unless(defined(&ft12)) {
    sub ft12 () {	$ &f27;}
}
unless(defined(&ft13)) {
    sub ft13 () {	$ &f28;}
}
unless(defined(&ft14)) {
    sub ft14 () {	$ &f29;}
}
unless(defined(&ft15)) {
    sub ft15 () {	$ &f30;}
}
unless(defined(&fzero)) {
    sub fzero () {	$ &f31;}
}
unless(defined(&ai)) {
    sub ai () {	$25;}
}
unless(defined(&pv)) {
    sub pv () {	$27;}
}
if(defined(&__STDC__)) {
    eval 'sub __CONCAT {
        my($a,$b) = @_;
	    eval q($a  $b);
    }' unless defined(&__CONCAT);
} else {
    eval 'sub __CONCAT {
        my($a,$b) = @_;
	    eval q($a $b);
    }' unless defined(&__CONCAT);
}
unless(defined(&___CONCAT)) {
    sub ___CONCAT {
	my($a,$b) = @_;
	eval q( &__CONCAT($a,$b));
    }
}
unless(defined(&LLABEL)) {
    sub LLABEL {
	my($name,$num) = @_;
	eval q( &___CONCAT( &___CONCAT( &L,$name),$num));
    }
}
unless(defined(&GPROF)) {
    eval 'sub MCOUNT () {1;}' unless defined(&MCOUNT);
} else {
    eval 'sub MCOUNT () {. &set  &noat;  &jsr  &at_reg, &_mcount; . &set  &at;}' unless defined(&MCOUNT);
}
unless(defined(&PALVECT)) {
    sub PALVECT {
	my($_name_) = @_;
	eval q( &ESETUP($_name_);  &ERSAVE());
    }
}
unless(defined(&ESETUP)) {
    sub ESETUP {
	my($_name_) = @_;
	eval q(. &globl $_name_; . &ent $_name_ 0; $_name_:; . &set  &noat;  &lda  &sp,-( &FRAME_SW_SIZE*8)( &sp); . &frame $30,( &FRAME_SW_SIZE+6)*8,$26,0; . &mask 0x4000000,-0x28; . &set  &at);
    }
}
unless(defined(&ERSAVE)) {
    sub ERSAVE () {
	eval q(. &set  &noat;  &stq  &at_reg,( &FRAME_AT*8)( &sp); . &set  &at;  &stq  &ra,( &FRAME_RA*8)( &sp);  &bsr  &ra, &exception_save_regs);
    }
}
unless(defined(&LEAF)) {
    sub LEAF {
	my($_name_,$_n_args_) = @_;
	eval q(. &globl $_name_; . &ent $_name_ 0; $_name_:; . &frame  &sp,0, &ra;  &MCOUNT);
    }
}
unless(defined(&LEAF_NOPROFILE)) {
    sub LEAF_NOPROFILE {
	my($_name_,$_n_args_) = @_;
	eval q(. &globl $_name_; . &ent $_name_ 0; $_name_:; . &frame  &sp,0, &ra);
    }
}
unless(defined(&STATIC_LEAF)) {
    sub STATIC_LEAF {
	my($_name_,$_n_args_) = @_;
	eval q(. &ent $_name_ 0; $_name_:; . &frame  &sp,0, &ra;  &MCOUNT);
    }
}
unless(defined(&XLEAF)) {
    sub XLEAF {
	my($_name_,$_n_args_) = @_;
	eval q(. &globl $_name_; . &aent $_name_ 0; $_name_:);
    }
}
unless(defined(&STATIC_XLEAF)) {
    sub STATIC_XLEAF {
	my($_name_,$_n_args_) = @_;
	eval q(. &aent $_name_ 0; $_name_:);
    }
}
unless(defined(&NESTED)) {
    sub NESTED {
	my($_name_, $_n_args_, $_framesize_, $_pc_reg_, $_i_mask_, $_f_mask_ ) = @_;
	eval q(. &globl $_name_; . &ent $_name_ 0; $_name_:; . &frame  &sp,$_framesize_,$_pc_reg_; . &livereg $_i_mask_,$_f_mask_;  &MCOUNT);
    }
}
unless(defined(&NESTED_NOPROFILE)) {
    sub NESTED_NOPROFILE {
	my($_name_, $_n_args_, $_framesize_, $_pc_reg_, $_i_mask_, $_f_mask_ ) = @_;
	eval q(. &globl $_name_; . &ent $_name_ 0; $_name_:; . &frame  &sp,$_framesize_,$_pc_reg_; . &livereg $_i_mask_,$_f_mask_);
    }
}
unless(defined(&STATIC_NESTED)) {
    sub STATIC_NESTED {
	my($_name_, $_n_args_, $_framesize_, $_pc_reg_, $_i_mask_, $_f_mask_ ) = @_;
	eval q(. &ent $_name_ 0; $_name_:; . &frame  &sp,$_framesize_,$_pc_reg_; . &livereg $_i_mask_,$_f_mask_;  &MCOUNT);
    }
}
unless(defined(&XNESTED)) {
    sub XNESTED {
	my($_name_,$_n_args_) = @_;
	eval q(. &globl $_name_; . &aent $_name_ 0; $_name_:);
    }
}
unless(defined(&STATIC_XNESTED)) {
    sub STATIC_XNESTED {
	my($_name_,$_n_args_) = @_;
	eval q(. &aent $_name_ 0; $_name_:);
    }
}
unless(defined(&END)) {
    sub END {
	my($_name_) = @_;
	eval q(. &end $_name_);
    }
}
unless(defined(&CALL)) {
    sub CALL {
	my($_name_) = @_;
	eval q( &jsr  &ra,$_name_;  &ldgp  &gp,0( &ra));
    }
}
unless(defined(&RET)) {
    sub RET () {	 &ret  &zero,( &ra),1;}
}
unless(defined(&EXPORT)) {
    sub EXPORT {
	my($_name_) = @_;
	eval q(. &globl $_name_; $_name_:);
    }
}
unless(defined(&IMPORT)) {
    sub IMPORT {
	my($_name_, $_size_) = @_;
	eval q(. &extern $_name_,$_size_);
    }
}
unless(defined(&ABS)) {
    sub ABS {
	my($_name_, $_value_) = @_;
	eval q(. &globl $_name_; $_name_ = $_value_);
    }
}
unless(defined(&BSS)) {
    sub BSS {
	my($_name_,$_numbytes_) = @_;
	eval q(. &comm $_name_,$_numbytes_);
    }
}
unless(defined(&VECTOR)) {
    sub VECTOR {
	my($_name_, $_i_mask_) = @_;
	eval q(. &globl $_name_; . &ent $_name_ 0; $_name_:; . &mask $_i_mask_| &IM_EXC,0; . &frame  &sp, &MSS_SIZE, &ra;);
    }
}
unless(defined(&ASCIZ)) {
    sub ASCIZ () {	. &asciz;}
}
unless(defined(&MSG)) {
    sub MSG {
	my($msg,$reg,$label) = @_;
	eval q( &lda $reg, $label; . &data; $label:  &ASCIZ $msg; . &text;);
    }
}
unless(defined(&PRINTF)) {
    sub PRINTF {
	my($msg,$label) = @_;
	eval q( &MSG($msg, &a0,$label);  &CALL( &printf));
    }
}
unless(defined(&PANIC)) {
    sub PANIC {
	my($msg,$label) = @_;
	eval q( &MSG($msg, &a0,$label);  &CALL( &panic));
    }
}
unless(defined(&IM_EXC)) {
    sub IM_EXC () {	0x80000000;}
}
unless(defined(&IM_SP)) {
    sub IM_SP () {	0x40000000;}
}
unless(defined(&IM_GP)) {
    sub IM_GP () {	0x20000000;}
}
unless(defined(&IM_AT)) {
    sub IM_AT () {	0x10000000;}
}
unless(defined(&IM_T12)) {
    sub IM_T12 () {	0x8000000;}
}
unless(defined(&IM_PV)) {
    sub IM_PV () {	 &IM_T4;}
}
unless(defined(&IM_RA)) {
    sub IM_RA () {	0x4000000;}
}
unless(defined(&IM_T11)) {
    sub IM_T11 () {	0x2000000;}
}
unless(defined(&IM_AI)) {
    sub IM_AI () {	 &IM_T3;}
}
unless(defined(&IM_T10)) {
    sub IM_T10 () {	0x1000000;}
}
unless(defined(&IM_T9)) {
    sub IM_T9 () {	0x800000;}
}
unless(defined(&IM_T8)) {
    sub IM_T8 () {	0x400000;}
}
unless(defined(&IM_A5)) {
    sub IM_A5 () {	0x200000;}
}
unless(defined(&IM_A4)) {
    sub IM_A4 () {	0x100000;}
}
unless(defined(&IM_A3)) {
    sub IM_A3 () {	0x80000;}
}
unless(defined(&IM_A2)) {
    sub IM_A2 () {	0x40000;}
}
unless(defined(&IM_A1)) {
    sub IM_A1 () {	0x20000;}
}
unless(defined(&IM_A0)) {
    sub IM_A0 () {	0x10000;}
}
unless(defined(&IM_S6)) {
    sub IM_S6 () {	0x8000;}
}
unless(defined(&IM_S5)) {
    sub IM_S5 () {	0x4000;}
}
unless(defined(&IM_S4)) {
    sub IM_S4 () {	0x2000;}
}
unless(defined(&IM_S3)) {
    sub IM_S3 () {	0x1000;}
}
unless(defined(&IM_S2)) {
    sub IM_S2 () {	0x800;}
}
unless(defined(&IM_S1)) {
    sub IM_S1 () {	0x400;}
}
unless(defined(&IM_S0)) {
    sub IM_S0 () {	0x200;}
}
unless(defined(&IM_T7)) {
    sub IM_T7 () {	0x100;}
}
unless(defined(&IM_T6)) {
    sub IM_T6 () {	0x80;}
}
unless(defined(&IM_T5)) {
    sub IM_T5 () {	0x40;}
}
unless(defined(&IM_T4)) {
    sub IM_T4 () {	0x20;}
}
unless(defined(&IM_T3)) {
    sub IM_T3 () {	0x10;}
}
unless(defined(&IM_T2)) {
    sub IM_T2 () {	0x8;}
}
unless(defined(&IM_T1)) {
    sub IM_T1 () {	0x4;}
}
unless(defined(&IM_T0)) {
    sub IM_T0 () {	0x2;}
}
unless(defined(&IM_V0)) {
    sub IM_V0 () {	0x1;}
}
unless(defined(&FM_T15)) {
    sub FM_T15 () {	0x40000000;}
}
unless(defined(&FM_T14)) {
    sub FM_T14 () {	0x20000000;}
}
unless(defined(&FM_T13)) {
    sub FM_T13 () {	0x10000000;}
}
unless(defined(&FM_T12)) {
    sub FM_T12 () {	0x8000000;}
}
unless(defined(&FM_T11)) {
    sub FM_T11 () {	0x4000000;}
}
unless(defined(&FM_T10)) {
    sub FM_T10 () {	0x2000000;}
}
unless(defined(&FM_T9)) {
    sub FM_T9 () {	0x1000000;}
}
unless(defined(&FM_T8)) {
    sub FM_T8 () {	0x800000;}
}
unless(defined(&FM_T7)) {
    sub FM_T7 () {	0x400000;}
}
unless(defined(&FM_A5)) {
    sub FM_A5 () {	0x200000;}
}
unless(defined(&FM_A4)) {
    sub FM_A4 () {	0x100000;}
}
unless(defined(&FM_A3)) {
    sub FM_A3 () {	0x80000;}
}
unless(defined(&FM_A2)) {
    sub FM_A2 () {	0x40000;}
}
unless(defined(&FM_A1)) {
    sub FM_A1 () {	0x20000;}
}
unless(defined(&FM_A0)) {
    sub FM_A0 () {	0x10000;}
}
unless(defined(&FM_T6)) {
    sub FM_T6 () {	0x8000;}
}
unless(defined(&FM_T5)) {
    sub FM_T5 () {	0x4000;}
}
unless(defined(&FM_T4)) {
    sub FM_T4 () {	0x2000;}
}
unless(defined(&FM_T3)) {
    sub FM_T3 () {	0x1000;}
}
unless(defined(&FM_T2)) {
    sub FM_T2 () {	0x800;}
}
unless(defined(&FM_T1)) {
    sub FM_T1 () {	0x400;}
}
unless(defined(&FM_S7)) {
    sub FM_S7 () {	0x200;}
}
unless(defined(&FM_S6)) {
    sub FM_S6 () {	0x100;}
}
unless(defined(&FM_S5)) {
    sub FM_S5 () {	0x80;}
}
unless(defined(&FM_S4)) {
    sub FM_S4 () {	0x40;}
}
unless(defined(&FM_S3)) {
    sub FM_S3 () {	0x20;}
}
unless(defined(&FM_S2)) {
    sub FM_S2 () {	0x10;}
}
unless(defined(&FM_S1)) {
    sub FM_S1 () {	0x8;}
}
unless(defined(&FM_S0)) {
    sub FM_S0 () {	0x4;}
}
unless(defined(&FM_T0)) {
    sub FM_T0 () {	0x2;}
}
unless(defined(&FM_V1)) {
    sub FM_V1 () {	 &FM_T0;}
}
unless(defined(&FM_V0)) {
    sub FM_V0 () {	0x1;}
}
require 'machine/pal.ph';
unless(defined(&SYSCALLNUM)) {
    sub SYSCALLNUM {
	my($name) = @_;
	eval q( &___CONCAT( &SYS_,$name));
    }
}
unless(defined(&CALLSYS_NOERROR)) {
    sub CALLSYS_NOERROR {
	my($name) = @_;
	eval q( &ldiq  &v0,  &SYSCALLNUM($name);  &call_pal  &PAL_OSF1_callsys);
    }
}
unless(defined(&NETBSD_SYSCALLNUM)) {
    sub NETBSD_SYSCALLNUM {
	my($name) = @_;
	eval q( &___CONCAT( &NETBSD_SYS_,$name));
    }
}
unless(defined(&NETBSD_CALLSYS_NOERROR)) {
    sub NETBSD_CALLSYS_NOERROR {
	my($name) = @_;
	eval q( &ldiq  &v0,  &NETBSD_SYSCALLNUM($name);  &call_pal  &PAL_OSF1_callsys);
    }
}
unless(defined(&LDGP)) {
    sub LDGP {
	my($reg) = @_;
	eval q( &ldgp  &gp, 0($reg));
    }
}
if(defined(&__ELF__)) {
    eval 'sub WEAK_ALIAS {
        my($alias,$sym) = @_;
	    eval q(. &weak $alias; $alias = $sym);
    }' unless defined(&WEAK_ALIAS);
}
if(defined(&__ELF__)) {
    if(defined(&__STDC__)) {
	eval 'sub WARN_REFERENCES {
	    my($_sym,$_msg) = @_;
    	    eval q(. &section . ($gnu->{warning}).  $_sym ; . &ascii $_msg ; . &text);
	}' unless defined(&WARN_REFERENCES);
    } else {
	eval 'sub WARN_REFERENCES {
	    my($_sym,$_msg) = @_;
    	    eval q(. &section . ($gnu->{warning}). $_sym ; . &ascii $_msg ; . &text);
	}' unless defined(&WARN_REFERENCES);
    }
}
if(defined(&_KERNEL)) {
    if(defined(&__ELF__)) {
	eval 'sub __KERNEL_SECTIONSTRING {
	    my($_sec, $_str) = @_;
    	    eval q(. &section $_sec ; . &asciz $_str ; . &text);
	}' unless defined(&__KERNEL_SECTIONSTRING);
    } else {
	eval 'sub __KERNEL_SECTIONSTRING {
	    my($_sec, $_str) = @_;
    	    eval q(. &data ; . &asciz $_str ; . &align 3; . &text);
	}' unless defined(&__KERNEL_SECTIONSTRING);
    }
    eval 'sub __KERNEL_RCSID {
        my($_n, $_s) = @_;
	    eval q( &__KERNEL_SECTIONSTRING(. &ident, $_s));
    }' unless defined(&__KERNEL_RCSID);
    eval 'sub __KERNEL_COPYRIGHT {
        my($_n, $_s) = @_;
	    eval q( &__KERNEL_SECTIONSTRING(. &copyright, $_s));
    }' unless defined(&__KERNEL_COPYRIGHT);
    if(defined(&NO_KERNEL_RCSIDS)) {
	undef(&__KERNEL_RCSID) if defined(&__KERNEL_RCSID);
	eval 'sub __KERNEL_RCSID {
	    my($_n, $_s) = @_;
    	    eval q();
	}' unless defined(&__KERNEL_RCSID);
    }
}
1;
