#ifndef PRL_IAR_FI_H
#define PRL_IAR_FI_H

/* Any other items that may be required in a "force-include" file should be placed below. */

/* To prevent #error in IAR Systems/Embedded Workbench\ 8.2/arm/inc/c/stdarg.h */
#ifdef __ICCARM__
#define __ICCARM_OLD_DEFINED_VAARGS__
#endif

/* Dedicated section operators */
void *__section_begin(char const * section);
void *__section_end(char const * section);
PRQA_SIZE_T __section_size(char const * section);

// Used in type_traits
// Taken from Stub/prlforceinclude/050_prlg++.h
template<typename __type>
struct __qacpp_remove_cv
{
  typedef __type type;
};

template<typename __type>
struct __qacpp_remove_cv<const __type>
{
  typedef __type type;
};

template<typename __type>
struct __qacpp_remove_cv<volatile __type>
{
  typedef __type type;
};

template<typename __type>
struct __qacpp_remove_cv<const volatile __type>
{
  typedef __type type;
};

#define __is_union(x) __qacpp_is_union(x)
#define __is_class(x) __qacpp_is_class(x)
#define __is_convertible_to(x,y) __qacpp_is_convertible(x,y)
#define __is_enum(x) __qacpp_is_enum(x)
#define __has_trivial_constructor(x) __qacpp_has_trivial_constructor(x)
#define __is_pod(x) __qacpp_is_pod(x)
#define __is_empty(x) __qacpp_is_empty(x)
#define __is_polymorphic(x) __qacpp_is_polymorphic(x)
#define __is_abstract(x) __qacpp_is_abstract(x)
#define __is_standard_layout(x) __qacpp_is_standard_layout(x)
#if __QACPP_MAJOR__ < 42
#define __is_literal_type(x) false
#else
#define __is_literal_type(x) __qacpp_is_literal(x)
#endif
#define __has_trivial_copy(x) __qacpp_has_trivial_copy(x)
#define __has_trivial_destructor(x) __qacpp_has_trivial_destructor(x)
#define __is_trivial(x) (__has_trivial_constructor(x) && __has_trivial_copy(x) && __has_trivial_destructor(x))
#if __QACPP_MAJOR__ < 42
#define __is_final(x) false
#else
#define __is_final(x) __qacpp_is_final(x)
#endif
#define __has_virtual_destructor(x) __qacpp_has_virtual_destructor(x)
#if __QACPP_MAJOR__ < 42
#define __is_trivially_copyable(x)                (__has_trivial_copy(x) && __has_trivial_destructor(x))
#define __is_trivially_constructible(x,y)         false
#define __is_trivially_assignable(x,y)            false
#else
#define __is_trivially_copyable(x)                __qacpp_is_trivially_copyable(x)
#define __is_trivially_constructible(x,y)         __qacpp_is_trivially_constructible(x, y)
#define __is_trivially_assignable(x,y)            __qacpp_is_trivially_assignable(x, y)
#endif
#define __has_trivial_assign(x)                   __qacpp_has_trivial_assign(x)
#define __has_nothrow_constructor(x)              __qacpp_has_nothrow_constructor(x)
#define __has_nothrow_assign(x)                   __qacpp_has_nothrow_assign(x)
#if __QACPP_MAJOR__ < 40
#define __underlying_type(x)                      int
#else
#define __underlying_type(x)                      __qacpp_underlying_type(x)
#endif
#define __is_base_of(x,y)                         __qacpp_is_base_of(x,y) || (!__qacpp_is_union(x) && __qacpp_is_same(typename __qacpp_remove_cv<x>::type, typename __qacpp_remove_cv<y>::type))

// Taken from Stub/prlforceinclude/600_qacpp_type_traits.h
#define __is_constructible(X, ...) (::__qacpp_helpers::is_constructible<X, ## __VA_ARGS__>::value)
#define __is_destructible(X, ...) (::__qacpp_helpers::is_destructible<X, ## __VA_ARGS__>::value)
#define __is_nothrow_constructible(X, ...) (::__qacpp_helpers::is_nothrow_constructible<X, ## __VA_ARGS__>::value)

namespace __qacpp_helpers
{
  struct __yes_type { char c[1]; };
  struct __no_type { char c[2]; };

  template <class T, T v> struct integral_constant
  {
    static const T value = v;
    typedef T value_type;
    typedef integral_constant<T,v> type;
    operator value_type() { return value; }
  };

  typedef integral_constant<bool, true> true_type;
  typedef integral_constant<bool, false> false_type;

  template <class __type>
  struct add_rvalue_reference
  {
    typedef __type && type;
  };

  template<typename T>
  typename add_rvalue_reference<T>::type declval() noexcept;

  struct __is_destructible_impl
  {
    template<typename T, typename = decltype(declval<T&>().~T())>
    static __yes_type test(int);
    template<typename>
    static __no_type test(...);
  };

  template <class T> struct is_destructible : public integral_constant<bool, sizeof(__is_destructible_impl::test<T>(0)) == sizeof(__yes_type)> { };

  struct __is_default_constructible_impl
  {
    template<typename _Tp, typename = decltype(_Tp())>
    static __yes_type test(int);

    template<typename>
    static __no_type test(...);
  };

  template <class T> struct is_default_constructible : public integral_constant<bool, sizeof(__is_default_constructible_impl::test<T>(0)) == sizeof(__yes_type)> { };
  template <class T, PRQA_SIZE_T N> struct is_default_constructible<T[N]> : public is_default_constructible<T> { };
  template <class T> struct is_default_constructible<T[]> : public is_default_constructible<T> { };
  template <class T> struct is_default_constructible<T&> : public integral_constant<bool, false> { };
  template <class T> struct is_default_constructible<T&&> : public integral_constant<bool, false> { };
  template <> struct is_default_constructible<void> : public integral_constant<bool, false> { };
  template <> struct is_default_constructible<void const> : public integral_constant<bool, false> { };
  template <> struct is_default_constructible<void volatile> : public integral_constant<bool, false> { };
  template <> struct is_default_constructible<void const volatile> : public integral_constant<bool, false> { };

  struct __is_constructible_impl
  {
    template<typename T, typename ...TheArgs, typename = decltype(T(declval<TheArgs>()...))>
    static __yes_type test(int);
    template<typename, typename...>
    static __no_type test(...);

    template<typename T, typename Arg, typename = decltype(::new T(declval<Arg>()))>
    static __yes_type test1(int);
    template<typename, typename>
    static __no_type test1(...);

    template <typename T>
    static __yes_type ref_test(T);
    template <typename T>
    static __no_type ref_test(...);
  };

  template <class T, class ...Args> struct is_constructible : public integral_constant<bool, sizeof(__is_constructible_impl::test<T, Args...>(0)) == sizeof(__yes_type)> { };
  template <class T, class Arg> struct is_constructible<T, Arg> : public integral_constant<bool, is_destructible<T>::value && sizeof(__is_constructible_impl::test1<T, Arg>(0)) == sizeof(__yes_type)> { };
  template <class Ref, class Arg> struct is_constructible<Ref&, Arg> : public integral_constant<bool, sizeof(__is_constructible_impl::ref_test<Ref&>(declval<Arg>())) == sizeof(__yes_type)> { };
  template <class Ref, class Arg> struct is_constructible<Ref&&, Arg> : public integral_constant<bool, sizeof(__is_constructible_impl::ref_test<Ref&&>(declval<Arg>())) == sizeof(__yes_type)> { };

  template <> struct is_constructible<void> : public false_type{};
  template <> struct is_constructible<void const> : public false_type{};
  template <> struct is_constructible<void const volatile> : public false_type{};
  template <> struct is_constructible<void volatile> : public false_type{};

  template <class T> struct is_constructible<T> : public is_default_constructible<T>{};
/*
#define integral_constant __qacpp_helpers::integral_constant
#define add_rvalue_reference __qacpp_helpers::add_rvalue_reference
#define true_type __qacpp_helpers::true_type
#define false_type __qacpp_helpers::false_type
*/

// Taken from Stub/gcc/5.1/type_traits, this may be more than required and needs
// review

  // Meta programming helper types.

  template <bool, class T, class F> struct conditional { typedef F type; };
  template <class T, class F> struct conditional<true, T, F> { typedef T type; };
  template<typename...>
    struct __or_;

  template<>
    struct __or_<>
    : public false_type
    { };

  template<typename _B1>
    struct __or_<_B1>
    : public _B1
    { };

  template<typename _B1, typename _B2>
    struct __or_<_B1, _B2>
    : public conditional<_B1::value, _B1, _B2>::type
    { };

  template<typename _B1, typename _B2, typename _B3, typename... _Bn>
    struct __or_<_B1, _B2, _B3, _Bn...>
    : public conditional<_B1::value, _B1, __or_<_B2, _B3, _Bn...>>::type
    { };

  template<typename...>
    struct __and_;

  template<>
    struct __and_<>
    : public true_type
    { };

  template<typename _B1>
    struct __and_<_B1>
    : public _B1
    { };

  template<typename _B1, typename _B2>
    struct __and_<_B1, _B2>
    : public conditional<_B1::value, _B2, _B1>::type
    { };

  template<typename _B1, typename _B2, typename _B3, typename... _Bn>
    struct __and_<_B1, _B2, _B3, _Bn...>
    : public conditional<_B1::value, __and_<_B2, _B3, _Bn...>, _B1>::type
    { };

  template<typename _Pp>
    struct __not_
    : public integral_constant<bool, !_Pp::value>
    { };

  /// is_array
  template<typename>
    struct is_array
    : public false_type { };

//  template<typename _Tp, std::size_t _Size>
  template<typename _Tp, PRQA_SIZE_T _Size>
    struct is_array<_Tp[_Size]>
    : public true_type { };

  template<typename _Tp>
    struct is_array<_Tp[]>
    : public true_type { };

  // Utility to detect referenceable types ([defns.referenceable]).

  template<typename _Tp>
    struct __is_referenceable
// I gave up here    : public __or_<is_object<_Tp>, is_reference<_Tp>>::type
    : public true_type
    { };

  template<typename _Res, typename... _Args>
    struct __is_referenceable<_Res(_Args...)>
    : public true_type
    { };

  template<typename _Res, typename... _Args>
    struct __is_referenceable<_Res(_Args......)>
    : public true_type
    { };

  /**
   *  @brief  Utility to simplify expressions used in unevaluated operands
   *  @ingroup utilities
   */
  template<typename _Tp>
    typename add_rvalue_reference<_Tp>::type declval() noexcept;

  template<typename, unsigned = 0>
    struct extent;

  template<typename>
    struct remove_all_extents;

  template<typename _Tp>
    struct __is_array_known_bounds
    : public integral_constant<bool, (extent<_Tp>::value > 0)>
    { };

  template<typename _Tp>
    struct __is_array_unknown_bounds
    : public __and_<is_array<_Tp>, __not_<extent<_Tp>>>::type
    { };

  template<typename _Tp>
    struct __is_nt_default_constructible_atom
    : public integral_constant<bool, noexcept(_Tp())>
    { };

  template<typename _Tp, bool = is_array<_Tp>::value>
    struct __is_nt_default_constructible_impl;

  template<typename _Tp>
    struct __is_nt_default_constructible_impl<_Tp, true>
    : public __and_<__is_array_known_bounds<_Tp>,
                    __is_nt_default_constructible_atom<typename
                      remove_all_extents<_Tp>::type>>::type
    { };

  template<typename _Tp>
    struct __is_nt_default_constructible_impl<_Tp, false>
    : public __is_nt_default_constructible_atom<_Tp>
    { };

  /// is_nothrow_default_constructible
  template<typename _Tp>
    struct is_nothrow_default_constructible
    : public __and_<is_default_constructible<_Tp>,
                    __is_nt_default_constructible_impl<_Tp>>::type
    { };

  template<typename _Tp, typename... _Args>
    struct __is_nt_constructible_impl
    : public integral_constant<bool, noexcept(_Tp(declval<_Args>()...))>
    { };

  template<typename _Tp, typename _Arg>
    struct __is_nt_constructible_impl<_Tp, _Arg>
    : public integral_constant<bool,
                               noexcept(static_cast<_Tp>(declval<_Arg>()))>
    { };

  template<typename _Tp>
    struct __is_nt_constructible_impl<_Tp>
    : public is_nothrow_default_constructible<_Tp>
    { };

  /// is_nothrow_constructible
  template<typename _Tp, typename... _Args>
    struct is_nothrow_constructible
    : public __and_<is_constructible<_Tp, _Args...>,
                    __is_nt_constructible_impl<_Tp, _Args...>>::type
    { };

  template<typename _Tp, bool = __is_referenceable<_Tp>::value>
    struct __is_nothrow_copy_constructible_impl;

  template<typename _Tp>
    struct __is_nothrow_copy_constructible_impl<_Tp, false>
    : public false_type { };

  template<typename _Tp>
    struct __is_nothrow_copy_constructible_impl<_Tp, true>
    : public is_nothrow_constructible<_Tp, const _Tp&>
    { };

  /// is_nothrow_copy_constructible
  template<typename _Tp>
    struct is_nothrow_copy_constructible
    : public __is_nothrow_copy_constructible_impl<_Tp>
    { };

  template<typename _Tp, bool = __is_referenceable<_Tp>::value>
    struct __is_nothrow_move_constructible_impl;

  template<typename _Tp>
    struct __is_nothrow_move_constructible_impl<_Tp, false>
    : public false_type { };

  template<typename _Tp>
    struct __is_nothrow_move_constructible_impl<_Tp, true>
    : public is_nothrow_constructible<_Tp, _Tp&&>
    { };

  /// is_nothrow_move_constructible
  template<typename _Tp>
    struct is_nothrow_move_constructible
    : public __is_nothrow_move_constructible_impl<_Tp>
    { };

  template<typename _Tp, typename _Up>
    class __is_assignable_helper
    {
      template<typename _Tp1, typename _Up1,
               typename = decltype(declval<_Tp1>() = declval<_Up1>())>
        static true_type
        __test(int);

      template<typename, typename>
        static false_type
        __test(...);

    public:
      typedef decltype(__test<_Tp, _Up>(0)) type;
    };
}

// Used in limits.h
long double operator ""Infinity(long double);
long double operator ""NaN(long double);

#if __QACPP_MAJOR__ < 44
// C '1x
#define _Pragma _ignore_paren
#endif

#if __QACPP_MAJOR__ < 42
#define __ALIGNOF__(x) (sizeof(char))
#else
#define __ALIGNOF__ alignof
#endif

#define __noreturn

#ifdef __ICCARM__
#define __absolute
#define __arm
#define __big_endian
#define __cmse_nonsecure_call
#define __cmse_nonsecure_entry
#define __fiq
#define __interwork
#define __intrinsic
#define __irq
#define __little_endian
#define __nested
#define __no_alloc
#define __no_alloc16
#define __no_alloc_str
#define __no_alloc_str16
#define __no_init
#define __packed
#define __pcrel
#define __ramfunc
#define __ro_placement
#define __root
#define __sbrel
#define __stackless
#define __swi
#define __task
#define __thumb
#define __weak

__FTF float __aeabi_fadd ( float x, float y );
__FTF float __aeabi_fsub ( float x, float y );
__FTF float __aeabi_frsub( float x, float y );
__FTF float __aeabi_fmul ( float x, float y );
__FTF float __aeabi_fdiv ( float x, float y );
__FTF int __aeabi_fcmpeq( float x, float y );
__FTF int __aeabi_fcmplt( float x, float y );
__FTF int __aeabi_fcmple( float x, float y );
__FTF int __aeabi_fcmpgt( float x, float y );
__FTF int __aeabi_fcmpge( float x, float y );
__FTF int __aeabi_fcmpun( float x, float y );
__FTF void __aeabi_cfcmpeq( float x, float y );
__FTF void __aeabi_cfcmple( float x, float y );
__FTF void __aeabi_cfrcmple( float x, float y );
__FTF float __aeabi_i2f( int x );
__FTF float __aeabi_ui2f( unsigned int x );
__FTF int __aeabi_f2iz( float x );
__FTF unsigned int __aeabi_f2uiz( float x );
__FTF float __aeabi_l2f( long long x );
__FTF float __aeabi_ul2f( unsigned long long x );
__FTF long long __aeabi_f2lz( float x );
__FTF unsigned long long __aeabi_f2ulz( float x );
__FTF double __aeabi_dadd( double x, double y );
__FTF double __aeabi_dsub( double x, double y );
__FTF double __aeabi_drsub( double x, double y );
__FTF double __aeabi_dmul( double x, double y );
__FTF double __aeabi_ddiv( double x, double y );
__FTF int __aeabi_dcmpeq( double x, double y );
__FTF int __aeabi_dcmplt( double x, double y );
__FTF int __aeabi_dcmple( double x, double y );
__FTF int __aeabi_dcmpge( double x, double y );
__FTF int __aeabi_dcmpgt( double x, double y );
__FTF int __aeabi_dcmpun( double x, double y );
__FTF void __aeabi_cdcmpeq( double x, double y );
__FTF void __aeabi_cdcmple( double x, double y );
__FTF void __aeabi_cdrcmple( double x, double y );
__FTF double __aeabi_i2d( int x );
__FTF double __aeabi_ui2d( unsigned int x );
__FTF int __aeabi_d2iz( double d );
__FTF unsigned int __aeabi_d2uiz( double d );
__FTF double __aeabi_f2d( float f );
__FTF float __aeabi_d2f( double d );
__FTF double __aeabi_l2d( long long x );
__FTF double __aeabi_ul2d( unsigned long long x );
__FTF long long __aeabi_d2lz( double d );
__FTF unsigned long long __aeabi_d2ulz( double d );
__FTF __fp16 __aeabi_f2h( float f );
__FTF float  __aeabi_h2f( __fp16 f );
__FTF __fp16 __aeabi_d2h( double d );
__FTC long long __aeabi_lmul(long long, long long); 
__FTC long long __aeabi_llsl(long long, int); 
__FTC long long __aeabi_llsr(long long, int); 
__FTC long long __aeabi_lasr(long long, int); 
__FTC int __aeabi_lcmp(long long, long long); 
__FTC int __aeabi_ulcmp(unsigned long long, unsigned long long); 
__EFF_NENW1 __FTC int __aeabi_uread4(void *address); 
__EFF_NENR1 __FTC int __aeabi_uwrite4(int value, void *address); 
__EFF_NENW1 __FTC long long __aeabi_uread8(void *address); 
__EFF_NENR1 __FTC long long __aeabi_uwrite8(long long value, void *address); 
__EFF_NENR1NW2 __FTC void __aeabi_memcpy8 (void *d, const void *src, __SIZE_T_TYPE__ n); 
__EFF_NENR1NW2 __FTC void __aeabi_memcpy4 (void *d, const void *src, __SIZE_T_TYPE__ n); 
__EFF_NENR1NW2 __FTC void __aeabi_memcpy  (void *d, const void *src, __SIZE_T_TYPE__ n); 
__EFF_NENR1NW2 __FTC void __aeabi_memmove8(void *d, const void *src, __SIZE_T_TYPE__ n); 
__EFF_NENR1NW2 __FTC void __aeabi_memmove4(void *d, const void *src, __SIZE_T_TYPE__ n); 
__EFF_NENR1NW2 __FTC void __aeabi_memmove (void *d, const void *src, __SIZE_T_TYPE__ n); 
__EFF_NENR1 __FTC void __aeabi_memset8 (void *d, __SIZE_T_TYPE__ n, int c); 
__EFF_NENR1 __FTC void __aeabi_memset4 (void *d, __SIZE_T_TYPE__ n, int c); 
__EFF_NENR1 __FTC void __aeabi_memset  (void *d, __SIZE_T_TYPE__ n, int c); 
__EFF_NENR1 __FTC void __aeabi_memclr8 (void *d, __SIZE_T_TYPE__ n); 
__EFF_NENR1 __FTC void __aeabi_memclr4 (void *d, __SIZE_T_TYPE__ n); 
__EFF_NENR1 __FTC void __aeabi_memclr  (void *d, __SIZE_T_TYPE__ n); 
__FT unsigned int __get_SP( void ); 
__FT unsigned int __get_LR( void ); 
__FT unsigned int __get_PC( void ); 
__FT void __set_SP( unsigned int ); 
__FT void __set_LR( unsigned int ); 
__FT unsigned int __get_return_address( void ); 
__intrinsic int __semihosting( unsigned int id, void *p ); 
__intrinsic int __semihosting2( unsigned int id, unsigned int id2, void *p ); 
__EFF_XXX __FT void *__aeabi_read_tp(void); /* return the value of $tp */
#ifndef __iar_fp2bits32
__EFF_XXX __FT unsigned int __iar_fp2bits32(float);
#endif
#ifndef __iar_fp2bits64
__EFF_XXX __FT unsigned long long __iar_fp2bits64(double);
#endif
#ifndef __iar_fpgethi64
__EFF_XXX __FT unsigned int __iar_fpgethi64(double);
#endif
__EFF_XXX __FT unsigned int __iar_fpgetlow64(double);
__EFF_XXX __FT double __iar_fpsethi64(double, unsigned int);
__EFF_XXX __FT double __iar_fpsetlow64(double, unsigned int);
__EFF_XXX __FT float __iar_bits2fp32(unsigned int);
__EFF_XXX __FT double __iar_bits2fp64(unsigned long long);
__FT __noreturn void __stack_chk_fail(void);
#endif /* __ICCARM__ */

#ifdef __ICCAVR__
#define __eeprom
#define __ext_io
#define __far
#define __farflash
#define __farfunc
#define __flash
#define __generic
#define __huge
#define __hugeflash
#define __interrupt
#define __intrinsic
#define __io
#define __monitor
#define __near
#define __nearfunc
#define __nested
#define __no_alloc
#define __no_alloc16
#define __no_alloc_str
#define __no_alloc_str16
#define __no_init
#define __no_runtime_init
#define __raw
#define __regvar
#define __root
#define __ro_placement
#define __task
#define __tiny
#define __tinyflash
#define __version_1
#define __version_2
#define __version_4
#define __x
#define __x_z
#define __z
#define __z_x

#ifdef __TINY_AVR__
__intrinsic   signed int  __reverse_1(  signed int );
__intrinsic unsigned int  __reverse_2(unsigned int );
__intrinsic void __farflash  * __reverse_3(void __farflash  *);
__intrinsic void __hugeflash * __reverse_4(void __hugeflash *);
__intrinsic void __far  * __reverse_5(void __far  *);
__intrinsic void __huge * __reverse_6(void __huge *);
__intrinsic   signed long __reverse_7(  signed long);
__intrinsic unsigned long __reverse_8(unsigned long);
#else
__intrinsic   signed int  __reverse_1(  signed int );
__intrinsic   unsigned int __reverse_2(unsigned int );
__intrinsic void __farflash  * __reverse_3(void __farflash  *);
__intrinsic void __hugeflash * __reverse_4(void __hugeflash *);
__intrinsic void __far  * __reverse_5(void __far  *);
__intrinsic void __huge * __reverse_6(void __huge *);
__intrinsic signed long   __reverse_7(  signed long);
__intrinsic unsigned long __reverse_8(unsigned long);
__intrinsic __x double __dadd(double, double const* );
__intrinsic __x double __dsub(double, double const* );
__intrinsic __x double __dmul(double, double const* );
__intrinsic __x double __ddiv(double, double const* );
__intrinsic __x unsigned char __dcmp_ge(double, double const* );
__intrinsic __x unsigned char __dcmp_lt(double, double const* );
__intrinsic __x unsigned char __dcmp_eq(double, double const* );
__intrinsic __x unsigned char __dcmp_ne(double, double const* );
__intrinsic __z unsigned char __ullcmp_ge(unsigned long long, unsigned long long const* );
__intrinsic __z unsigned char __ullcmp_lt(unsigned long long, unsigned long long const* );
__intrinsic __z unsigned char __ullcmp_eq(unsigned long long, unsigned long long const* );
__intrinsic __z unsigned char __ullcmp_ne(unsigned long long, unsigned long long const* );
__intrinsic __z unsigned char __sllcmp_ge(signed long long, signed long long const* );
__intrinsic __z unsigned char __sllcmp_lt(signed long long, signed long long const* );
__intrinsic __z unsigned char __sllcmp_eq(signed long long, signed long long const* );
__intrinsic __z unsigned char __sllcmp_ne(signed long long, signed long long const* );
__intrinsic __z unsigned long long __ulland(unsigned long long, unsigned long long const* );
__intrinsic __z unsigned long long __ullior(unsigned long long, unsigned long long const* );
__intrinsic __z unsigned long long __ullxor(unsigned long long, unsigned long long const* );
__intrinsic __z unsigned long long __ulladd(unsigned long long, unsigned long long const* );
__intrinsic __z unsigned long long __ullsub(unsigned long long, unsigned long long const* );
__intrinsic __z signed long long __slland(signed long long, signed long long const* );
__intrinsic __z signed long long __sllior(signed long long, signed long long const* );
__intrinsic __z signed long long __sllxor(signed long long, signed long long const* );
__intrinsic __z signed long long __slladd(signed long long, signed long long const* );
__intrinsic __z signed long long __sllsub(signed long long, signed long long const* );
__intrinsic __x unsigned long long __ullmul(unsigned long long, unsigned long long const* );
__intrinsic __x unsigned long long __ulldiv(unsigned long long, unsigned long long const* );
__intrinsic __x unsigned long long __ullmod(unsigned long long, unsigned long long const* );
__intrinsic __x signed long long __sllmul(signed long long, signed long long const* );
__intrinsic __x signed long long __slldiv(signed long long, signed long long const* );
__intrinsic __x signed long long __sllmod(signed long long, signed long long const* );
#endif /* __TINY_AVR__ */
#endif /* __ICCAVR__ */

#ifdef __ICCRL78__
#define __callt
#define __far
#define __far_func
#define __huge
#define __interrupt
#define __intrinsic
#define __monitor
#define __near
#define __near_func
#define __no_alloc
#define __no_alloc16
#define __no_alloc_str
#define __no_alloc_str16
#define __no_bit_access
#define __no_init
#define __no_save
#define __packed
#define __root
#define __ro_placement
#define __saddr
#define __sfr
#define __v1_call
#define __v2_call
#define __weak

__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call long __iar_ladd (long a, long b);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call long __iar_lsub (long a, long b);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v2_call long _COM_lmul  (long a, long b);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v2_call long _COM_sldiv (long a, long b);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v2_call long _COM_uldiv (long a, long b);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v2_call long _COM_slrem (long a, long b);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v2_call long _COM_ulrem (long a, long b);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call char _CmpEq32   (long a, long b);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call char _CmpNe32   (long a, long b);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call char _CmpGes32  (long a, long b);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call char _CmpGeu32  (long a, long b);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call char _CmpLts32  (long a, long b);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call char _CmpLtu32  (long a, long b);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call long __iar_land (long a, long b);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call long __iar_lxor (long a, long b);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call long __iar_lior (long a, long b);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v2_call float _COM_fadd (float a, float b);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v2_call float _COM_fsub (float a, float b);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v2_call float _COM_fmul (float a, float b);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v2_call float _COM_fdiv (float a, float b);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v2_call float __iar_fmex(float a, float b);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v2_call float __iar_fdex(float a, float b);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v2_call signed char _COM_feq (float a, float b);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v2_call signed char _COM_fne (float a, float b);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v2_call signed char _COM_fge (float a, float b);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v2_call signed char _COM_flt (float a, float b);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v2_call signed char _COM_fgt (float a, float b);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v2_call signed char _COM_fle (float a, float b);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call double    __iari_dneg(void __near *p, double a);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call double    __iar_dneg(void __near *p, double a);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call char __iar_deq(double __near const *p, double __near const *q);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call char __iar_dne(double __near const *p, double __near const *q);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call char __iar_dlt(double __near const *p, double __near const *q);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call char __iar_dge(double __near const *p, double __near const *q);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v2_call double __near * __iar_dadd(double __near const *p, double __near const *q, double __near const *r);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v2_call double __near * __iar_dsub(double __near const *p, double __near const *q, double __near const *r);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v2_call double __near * __iar_dmul(double __near const *p, double __near const *q, double __near const *r);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v2_call double __near * __iar_ddiv(double __near const *p, double __near const *q, double __near const *r);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v2_call double __near * __iar_dmex(double __near const *p, double __near const *q, double r);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v2_call double __near * __iar_ddex(double __near const *p, double __near const *q, double r);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v2_call long   __iar_dtosl(double __near const *p);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v2_call long   __iar_dtoul(double __near const *p);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v2_call long long __near * __iar_dtosll(long long __near const *p, double __near const *q);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v2_call long long __near * __iar_dtoull(long long __near const *p, double __near const *q);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v2_call float  __iar_dtof(double __near const *p);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v2_call double __near * __iar_sltod(double __near const *p, long q);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v2_call double __near * __iar_ultod(double __near const *p, long q);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v2_call double __near * __iar_slltod(double __near const *p, long long __near const *q);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v2_call double __near * __iar_ulltod(double __near const *p, long long __near const *q);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v2_call double __near * __iar_ftod(double __near const *p, float q);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v2_call signed char _COM_deq (double a, double b);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v2_call signed char _COM_dne (double a, double b);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v2_call signed char _COM_dge (double a, double b);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v2_call signed char _COM_dlt (double a, double b);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v2_call signed char _COM_dgt (double a, double b);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v2_call signed char _COM_dle (double a, double b);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v2_call signed char _COM_dunordered (double a, double b);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call long long __near * _Add64 (long long __near const *p, long long __near const *q, long long __near const *r);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call long long __near * _Sub64 (long long __near const *p, long long __near const *q, long long __near const *r);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call long long __near * _Mul64 (long long __near const *p, long long __near const *q, long long __near const *r);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call long long __near * _Divs64 (long long __near const *p, long long __near const *q, long long __near const *r);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call long long __near * _Divu64 (long long __near const *p, long long __near const *q, long long __near const *r);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call long long __near * _Mods64 (long long __near const *p, long long __near const *q, long long __near const *r);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call long long __near * _Modu64 (long long __near const *p, long long __near const *q, long long __near const *r);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call long long __near * _And64 (long long __near const *p, long long __near const *q, long long __near const *r);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call long long __near * _Ior64 (long long __near const *p, long long __near const *q, long long __near const *r);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call long long __near * _Xor64 (long long __near const *p, long long __near const *q, long long __near const *r);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call long long __near * _Not64 (long long __near const *p, long long __near const *q);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call long long __near * _Neg64 (long long __near const *p, long long __near const *q);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call long long __near * _Lsl64 (long long __near const *p, long long __near const *q, unsigned char r);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call long long __near * _Asr64 (long long __near const *p, long long __near const *q, unsigned char r);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call long long __near * _Lsr64 (long long __near const *p, long long __near const *q, unsigned char r);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call char _CmpEq64 (long long __near const *p, long long __near const *q);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call char _CmpNe64 (long long __near const *p, long long __near const *q);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call char _CmpLts64 (long long __near const *p, long long __near const *q);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call char _CmpGes64 (long long __near const *p, long long __near const *q);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call char _CmpLtu64 (long long __near const *p, long long __near const *q);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call char _CmpGeu64 (long long __near const *p, long long __near const *q);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call long long __near * _L2LLS (long long __near const *p, signed long q);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call long long __near * _L2LLU (long long __near const *p, unsigned long q);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call long long __near * _F2LLS (long long __near const *p, float q);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call long long __near * _F2LLU (long long __near const *p, float q);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call long _LLS2L (long long __near const *p);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call long _LLU2L (long long __near const *p);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call short _LLS2S (long long __near const *p);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call short _LLU2S (long long __near const *p);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call char _LLU2C (long long __near const *p);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call float _LLS2F (long long __near const *p);
__intrinsic __FAR_RUNTIME_ATTRIBUTE__ __v1_call float _LLU2F (long long __near const *p);
__intrinsic void __IAR_SignExtend( long long __near *d, long long const __near *p, char bit );
__intrinsic __noreturn void __stack_chk_fail(void);
#endif /* __ICCRL78__ */

#ifdef __ICCV850__
#define __brel
#define __brel23
#define __callt
#define __flat
#define __huge
#define __interrupt
#define __intrinsic
#define __monitor
#define __near
#define __no_bit_access
#define __no_init
#define __root
#define __saddr
#define __syscall
#define __task
#define __trap
#endif /* __ICCV850__ */

#ifdef __ICCSTM8__
#define __eeprom
#define __far
#define __far_func
#define __huge
#define __huge_func
#define __interrupt
#define __intrinsic
#define __monitor
#define __near
#define __near_func
#define __no_init
#define __ramfunc
#define __root
#define __task
#define __tiny
#define __weak

typedef int __istate_t;

void __disable_interrupt(void);
void __enable_interrupt(void);
__istate_t __get_interrupt_state(void);
void __halt(void);
void __no_operation(void);
void __set_interrupt_state(__istate_t);
void __trap(void);
void __wait_for_exception(void);
void __wait_for_interrupt(void);
#endif /* __ICCSTM8__ */

#ifdef __ICC8051__
#define __banked_func
#define __banked_func_ext2
#define __bdata
#define __bit
#define __code
#define __data
#define __data_overlay
#define __ext_stack_reentrant
#define __far
#define __far_code
#define __far_func
#define __far_rom
#define __far22
#define __far22_code
#define __far22_rom
#define __generic
#define __huge
#define __huge_code
#define __huge_rom
#define __idata
#define __idata_overlay
#define __idata_reentrant
#define __ixdata
#define __interrupt
#define __intrinsic
#define __monitor
#define __near_func
#define __no_init
#define __overlay_near_func
#define __pdata
#define __pdata_reentrant
#define __root
#define __sfr
#define __task
#define __xdata
#define __xdata_reentrant
#define __xdata_rom

typedef int __istate_t;

void __disable_interrupt(void);
void __enable_interrupt(void);
__istate_t __get_interrupt_state(void);
void __no_operation(void);
char __parity(char);
void __set_interrupt_state(__istate_t);
int __tbac(int bitvar);
#endif /* __ICC8051__ */

#else
#error "Multiple include"
#endif  /* ifndef PRL_IAR_FI_H */

