require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_PMMINTRIN_H_INCLUDED)) {
    eval 'sub _PMMINTRIN_H_INCLUDED () {1;}' unless defined(&_PMMINTRIN_H_INCLUDED);
    if(defined(&__SSE3__)) {
	require 'xmmintrin.ph';
	require 'emmintrin.ph';
	eval 'sub _MM_DENORMALS_ZERO_MASK () {0x40;}' unless defined(&_MM_DENORMALS_ZERO_MASK);
	eval 'sub _MM_DENORMALS_ZERO_ON () {0x40;}' unless defined(&_MM_DENORMALS_ZERO_ON);
	eval 'sub _MM_DENORMALS_ZERO_OFF () {0x;}' unless defined(&_MM_DENORMALS_ZERO_OFF);
	eval 'sub _MM_SET_DENORMALS_ZERO_MODE {
	    local($mode) = @_;
    	    eval q( &_mm_setcsr (( &_mm_getcsr () & ~ &_MM_DENORMALS_ZERO_MASK) | ($mode)));
	}' unless defined(&_MM_SET_DENORMALS_ZERO_MODE);
	eval 'sub _MM_GET_DENORMALS_ZERO_MODE () {
	    eval q(( &_mm_getcsr() &  &_MM_DENORMALS_ZERO_MASK));
	}' unless defined(&_MM_GET_DENORMALS_ZERO_MODE);
	eval 'sub _mm_addsub_ps {
	    local($__X,$__Y) = @_;
    	    eval q({ ( &__m128)  &__builtin_ia32_addsubps (( &__v4sf)$__X, ( &__v4sf)$__Y); });
	}' unless defined(&_mm_addsub_ps);
	eval 'sub _mm_hadd_ps {
	    local($__X,$__Y) = @_;
    	    eval q({ ( &__m128)  &__builtin_ia32_haddps (( &__v4sf)$__X, ( &__v4sf)$__Y); });
	}' unless defined(&_mm_hadd_ps);
	eval 'sub _mm_hsub_ps {
	    local($__X,$__Y) = @_;
    	    eval q({ ( &__m128)  &__builtin_ia32_hsubps (( &__v4sf)$__X, ( &__v4sf)$__Y); });
	}' unless defined(&_mm_hsub_ps);
	eval 'sub _mm_movehdup_ps {
	    local($__X) = @_;
    	    eval q({ ( &__m128)  &__builtin_ia32_movshdup (( &__v4sf)$__X); });
	}' unless defined(&_mm_movehdup_ps);
	eval 'sub _mm_moveldup_ps {
	    local($__X) = @_;
    	    eval q({ ( &__m128)  &__builtin_ia32_movsldup (( &__v4sf)$__X); });
	}' unless defined(&_mm_moveldup_ps);
	eval 'sub _mm_addsub_pd {
	    local($__X,$__Y) = @_;
    	    eval q({ ( &__m128d)  &__builtin_ia32_addsubpd (( &__v2df)$__X, ( &__v2df)$__Y); });
	}' unless defined(&_mm_addsub_pd);
	eval 'sub _mm_hadd_pd {
	    local($__X,$__Y) = @_;
    	    eval q({ ( &__m128d)  &__builtin_ia32_haddpd (( &__v2df)$__X, ( &__v2df)$__Y); });
	}' unless defined(&_mm_hadd_pd);
	eval 'sub _mm_hsub_pd {
	    local($__X,$__Y) = @_;
    	    eval q({ ( &__m128d)  &__builtin_ia32_hsubpd (( &__v2df)$__X, ( &__v2df)$__Y); });
	}' unless defined(&_mm_hsub_pd);
	eval 'sub _mm_loaddup_pd {
	    local($__P) = @_;
    	    eval q({ ( &__m128d)  &__builtin_ia32_loadddup ($__P); });
	}' unless defined(&_mm_loaddup_pd);
	eval 'sub _mm_movedup_pd {
	    local($__X) = @_;
    	    eval q({ ( &__m128d)  &__builtin_ia32_movddup (( &__v2df)$__X); });
	}' unless defined(&_mm_movedup_pd);
	eval 'sub _mm_lddqu_si128 {
	    local($__P) = @_;
    	    eval q({ ( &__m128i)  &__builtin_ia32_lddqu ((\'char\'  &const *)$__P); });
	}' unless defined(&_mm_lddqu_si128);
	if(0) {
	    eval 'sub _mm_monitor {
	        local($__P,$__E,$__H) = @_;
    		eval q({  &__builtin_ia32_monitor ($__P, $__E, $__H); });
	    }' unless defined(&_mm_monitor);
	    eval 'sub _mm_mwait {
	        local($__E,$__H) = @_;
    		eval q({  &__builtin_ia32_mwait ($__E, $__H); });
	    }' unless defined(&_mm_mwait);
	} else {
	    eval 'sub _mm_monitor {
	        local($P, $E, $H) = @_;
    		eval q( &__builtin_ia32_monitor (($P), ($E), ($H)));
	    }' unless defined(&_mm_monitor);
	    eval 'sub _mm_mwait {
	        local($E, $H) = @_;
    		eval q( &__builtin_ia32_mwait (($E), ($H)));
	    }' unless defined(&_mm_mwait);
	}
    }
}
1;
