require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_SYS_RAS_H_)) {
    eval 'sub _SYS_RAS_H_ () {1;}' unless defined(&_SYS_RAS_H_);
    unless(defined(&__ASSEMBLER__)) {
	require 'sys/types.ph';
	require 'sys/queue.ph';
	eval 'sub RAS_INSTALL () {0;}' unless defined(&RAS_INSTALL);
	eval 'sub RAS_PURGE () {1;}' unless defined(&RAS_PURGE);
	eval 'sub RAS_PURGE_ALL () {2;}' unless defined(&RAS_PURGE_ALL);
    } else {
	require 'sys/cdefs.ph';
    }
    if(defined(&_KERNEL)) {
	unless(defined(&__ASSEMBLER__)) {
	}
    } else {
	unless(defined(&RAS_DECL)) {
	    eval 'sub RAS_DECL {
	        my($name) = @_;
    		eval q( &extern  &void  &__CONCAT($name, &_ras_start( &void)),  &__CONCAT($name, &_ras_end( &void)));
	    }' unless defined(&RAS_DECL);
	}
	eval 'sub RAS_START {
	    my($name) = @_;
    	    eval q( &__asm  &volatile(\\".globl \\"  &___STRING($name) \\"_ras_start\\\\n\\"  &___STRING($name) \\"_ras_start:\\" ::: \\"memory\\"));
	}' unless defined(&RAS_START);
	eval 'sub RAS_END {
	    my($name) = @_;
    	    eval q( &__asm  &volatile(\\".globl \\"  &___STRING($name) \\"_ras_end\\\\n\\"  &___STRING($name) \\"_ras_end:\\" ::: \\"memory\\"));
	}' unless defined(&RAS_END);
	eval 'sub RAS_ADDR {
	    my($name) = @_;
    	    eval q((( &void *)( &uintptr_t)  &__CONCAT($name, &_ras_start)));
	}' unless defined(&RAS_ADDR);
	eval 'sub RAS_SIZE {
	    my($name) = @_;
    	    eval q(((( &uintptr_t)  &__CONCAT($name, &_ras_end) - ( &uintptr_t)  &__CONCAT($name, &_ras_start))));
	}' unless defined(&RAS_SIZE);
	unless(defined(&__ASSEMBLER__)) {
	} else {
	    unless(defined(&_ASM_LS_CHAR)) {
		eval 'sub _ASM_LS_CHAR () {;;}' unless defined(&_ASM_LS_CHAR);
	    }
	    eval 'sub RAS_START_ASM {
	        my($name) = @_;
    		eval q(. &globl  &_C_LABEL( &__CONCAT($name, &_ras_start))  &_ASM_LS_CHAR  &_C_LABEL( &__CONCAT($name, &_ras_start)):);
	    }' unless defined(&RAS_START_ASM);
	    eval 'sub RAS_END_ASM {
	        my($name) = @_;
    		eval q(. &globl  &_C_LABEL( &__CONCAT($name, &_ras_end))  &_ASM_LS_CHAR  &_C_LABEL( &__CONCAT($name, &_ras_end)):);
	    }' unless defined(&RAS_END_ASM);
	    eval 'sub RAS_START_ASM_HIDDEN {
	        my($name) = @_;
    		eval q(. &globl  &_C_LABEL( &__CONCAT($name, &_ras_start))  &_ASM_LS_CHAR . &hidden  &_C_LABEL( &__CONCAT($name, &_ras_start))  &_ASM_LS_CHAR  &_C_LABEL( &__CONCAT($name, &_ras_start)):);
	    }' unless defined(&RAS_START_ASM_HIDDEN);
	    eval 'sub RAS_END_ASM_HIDDEN {
	        my($name) = @_;
    		eval q(. &globl  &_C_LABEL( &__CONCAT($name, &_ras_end))  &_ASM_LS_CHAR . &hidden  &_C_LABEL( &__CONCAT($name, &_ras_end))  &_ASM_LS_CHAR  &_C_LABEL( &__CONCAT($name, &_ras_end)):);
	    }' unless defined(&RAS_END_ASM_HIDDEN);
	}
    }
}
1;
