require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_EXT_OPT_RANDOM_H)) {
    eval 'sub _EXT_OPT_RANDOM_H () {1;}' unless defined(&_EXT_OPT_RANDOM_H);
    if(defined(&__ARM_NEON)) {
	if(defined(&__ARM_BIG_ENDIAN)) {
	    eval 'sub __VEXT {
	        my($_A,$_B,$_C) = @_;
    		eval q( &__builtin_shuffle ($_A, $_B, ( &__Uint8x16_t) {16-$_C, 17-$_C, 18-$_C, 19-$_C, 20-$_C, 21-$_C, 22-$_C, 23-$_C, 24-$_C, 25-$_C, 26-$_C, 27-$_C, 28-$_C, 29-$_C, 30-$_C, 31-$_C}));
	    }' unless defined(&__VEXT);
	} else {
	    eval 'sub __VEXT {
	        my($_A,$_B,$_C) = @_;
    		eval q( &__builtin_shuffle ($_B, $_A, ( &__Uint8x16_t) {$_C, $_C+1, $_C+2, $_C+3, $_C+4, $_C+5, $_C+6, $_C+7, $_C+8, $_C+9, $_C+10, $_C+11, $_C+12, $_C+13, $_C+14, $_C+15}));
	    }' unless defined(&__VEXT);
	}
	if((defined(&__BYTE_ORDER__) ? &__BYTE_ORDER__ : undef) == (defined(&__ORDER_LITTLE_ENDIAN__) ? &__ORDER_LITTLE_ENDIAN__ : undef)) {
	    eval 'sub _GLIBCXX_OPT_HAVE_RANDOM_SFMT_GEN_READ () {1;}' unless defined(&_GLIBCXX_OPT_HAVE_RANDOM_SFMT_GEN_READ);
	    eval 'sub _GLIBCXX_OPT_HAVE_RANDOM_SFMT_OPERATOREQUAL () {1;}' unless defined(&_GLIBCXX_OPT_HAVE_RANDOM_SFMT_OPERATOREQUAL);
	}
    }
}
1;
