2021-03-01 06:03 CET

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001634Frama-CPlug-in > E-ACSLpublic2014-03-25 14:17
ReporterThomasJ 
Assigned Tosignoles 
PrioritynormalSeveritycrashReproducibilityalways
StatusclosedResolutionfixed 
Platformx86_64OSUbuntuOS Version12.04 LTS
Product VersionFrama-C Fluorine-20130601 
Target VersionFixed in VersionFrama-C Neon-20140301 
Summary0001634: e-acsl translation: unexpected error
DescriptionI'm trying to create a E-ACSL code for ARM Processors. Therefore i use the arm-gcc instead of the usual gcc. Preprocessing works fine but the e-acsl translation fails.


journal.ml included in project.
Steps To Reproduceframa-c -journal-enable -journal-name blink4500 -e-acsl -cpp-command 'arm-linux-gnueabi-gcc-4.6 -C -E -DUC_ID=4503 -mfloat-abi=softfp -Wall -std=gnu99 -fmessage-length=0 -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mthumb -g3 -gdwarf-2 -I. -IXMC4500 -I/usr/arm-linux-gnueabi/include/' Blinky.c LED.c System_XMC4500.c -then-on e-acsl -print -ocode monitored_arm.c
Additional Information[e-acsl] beginning translation.
[kernel] Current source was: System_XMC4500.c:347
         The full backtrace is:
         Called from file "error.ml", line 53, characters 4-7
         Called from file "visit.ml", line 574, characters 6-55
         Called from file "visit.ml", line 588, characters 3-41
         Called from file "cil/src/cil.ml", line 2832, characters 5-52
         Called from file "cil/src/cil.ml", line 2958, characters 14-21
         Called from file "cil/src/cil.ml", line 1847, characters 21-41
         Called from file "cil/src/cil.ml", line 2876, characters 5-86
         Called from file "cil/src/cil.ml", line 1871, characters 13-16
         Called from file "cil/src/cil.ml", line 3009, characters 16-40
         Called from file "cil/src/cil.ml", line 1847, characters 21-41
         Called from file "cil/src/cil.ml", line 3223, characters 14-39
         Called from file "cil/src/cil.ml", line 1847, characters 21-41
         Called from file "cil/src/cil.ml", line 3195, characters 5-91
         Called from file "cil/src/cil.ml", line 3275, characters 16-38
         Called from file "cil/src/cil.ml", line 1871, characters 13-16
         Called from file "cil/src/cil.ml", line 1916, characters 24-57
         Called from file "cil/src/cil.ml", line 3269, characters 5-53
         Called from file "cil/src/cil.ml", line 5895, characters 17-37
         Called from file "cil/src/cil.ml", line 5902, characters 3-20
         Called from file "cil/src/cil.ml", line 1847, characters 21-41
         Called from file "src/kernel/file.ml", line 1948, characters 14-42
         Called from file "src/kernel/file.ml", line 1977, characters 2-48
         Called from file "main.ml", line 152, characters 12-55
         Called from file "src/project/project.ml", line 345, characters 12-15
         Called from file "src/project/project.ml", line 350, characters 17-22
         Re-raised at file "src/project/project.ml", line 350, characters 56-57
         Called from file "main.ml", line 146, characters 5-572
         Called from file "src/project/project.ml", line 345, characters 12-15
         Called from file "src/project/project.ml", line 350, characters 17-22
         Re-raised at file "src/project/project.ml", line 350, characters 56-57
         Called from file "main.ml", line 116, characters 12-34
         Called from file "src/project/state_builder.ml", line 556, characters 17-22
         Called from file "src/kernel/journal.ml", line 434, characters 21-32
         Re-raised at file "src/kernel/journal.ml", line 449, characters 18-19
         Called from file "main.ml", line 199, characters 11-56
         Called from file "queue.ml", line 134, characters 6-20
         Called from file "src/kernel/boot.ml", line 37, characters 4-20
         Called from file "src/kernel/cmdline.ml", line 732, characters 2-9
         Called from file "src/kernel/cmdline.ml", line 212, characters 4-8
         
         Unexpected error (File "pre_analysis.ml", line 694, characters 18-24: Assertion failed).
TagsNo tags attached.
Attached Files
  • zip file icon Blinky_ARM.zip (517,998 bytes) 2014-01-27 15:21
  • ? file icon preprocessed.i (117,444 bytes) 2014-01-28 11:04 -
    /* Generated by Frama-C */
    enum __anonenum_IRQn_Type_6 {
        Reset_IRQn = -15,
        NonMaskableInt_IRQn = -14,
        HardFault_IRQn = -13,
        MemoryManagement_IRQn = -12,
        BusFault_IRQn = -11,
        UsageFault_IRQn = -10,
        SVCall_IRQn = -5,
        DebugMonitor_IRQn = -4,
        PendSV_IRQn = -2,
        SysTick_IRQn = -1,
        SCU_0_IRQn = 0,
        ERU0_0_IRQn = 1,
        ERU0_1_IRQn = 2,
        ERU0_2_IRQn = 3,
        ERU0_3_IRQn = 4,
        ERU1_0_IRQn = 5,
        ERU1_1_IRQn = 6,
        ERU1_2_IRQn = 7,
        ERU1_3_IRQn = 8,
        PMU0_0_IRQn = 12,
        VADC0_C0_0_IRQn = 14,
        VADC0_C0_1_IRQn = 15,
        VADC0_C0_2_IRQn = 16,
        VADC0_C0_3_IRQn = 17,
        VADC0_G0_0_IRQn = 18,
        VADC0_G0_1_IRQn = 19,
        VADC0_G0_2_IRQn = 20,
        VADC0_G0_3_IRQn = 21,
        VADC0_G1_0_IRQn = 22,
        VADC0_G1_1_IRQn = 23,
        VADC0_G1_2_IRQn = 24,
        VADC0_G1_3_IRQn = 25,
        VADC0_G2_0_IRQn = 26,
        VADC0_G2_1_IRQn = 27,
        VADC0_G2_2_IRQn = 28,
        VADC0_G2_3_IRQn = 29,
        VADC0_G3_0_IRQn = 30,
        VADC0_G3_1_IRQn = 31,
        VADC0_G3_2_IRQn = 32,
        VADC0_G3_3_IRQn = 33,
        DSD0_M_0_IRQn = 34,
        DSD0_M_1_IRQn = 35,
        DSD0_M_2_IRQn = 36,
        DSD0_M_3_IRQn = 37,
        DSD0_A_4_IRQn = 38,
        DSD0_A_5_IRQn = 39,
        DSD0_A_6_IRQn = 40,
        DSD0_A_7_IRQn = 41,
        DAC0_0_IRQn = 42,
        DAC0_1_IRQn = 43,
        CCU40_0_IRQn = 44,
        CCU40_1_IRQn = 45,
        CCU40_2_IRQn = 46,
        CCU40_3_IRQn = 47,
        CCU41_0_IRQn = 48,
        CCU41_1_IRQn = 49,
        CCU41_2_IRQn = 50,
        CCU41_3_IRQn = 51,
        CCU42_0_IRQn = 52,
        CCU42_1_IRQn = 53,
        CCU42_2_IRQn = 54,
        CCU42_3_IRQn = 55,
        CCU43_0_IRQn = 56,
        CCU43_1_IRQn = 57,
        CCU43_2_IRQn = 58,
        CCU43_3_IRQn = 59,
        CCU80_0_IRQn = 60,
        CCU80_1_IRQn = 61,
        CCU80_2_IRQn = 62,
        CCU80_3_IRQn = 63,
        CCU81_0_IRQn = 64,
        CCU81_1_IRQn = 65,
        CCU81_2_IRQn = 66,
        CCU81_3_IRQn = 67,
        POSIF0_0_IRQn = 68,
        POSIF0_1_IRQn = 69,
        POSIF1_0_IRQn = 70,
        POSIF1_1_IRQn = 71,
        CAN0_0_IRQn = 76,
        CAN0_1_IRQn = 77,
        CAN0_2_IRQn = 78,
        CAN0_3_IRQn = 79,
        CAN0_4_IRQn = 80,
        CAN0_5_IRQn = 81,
        CAN0_6_IRQn = 82,
        CAN0_7_IRQn = 83,
        USIC0_0_IRQn = 84,
        USIC0_1_IRQn = 85,
        USIC0_2_IRQn = 86,
        USIC0_3_IRQn = 87,
        USIC0_4_IRQn = 88,
        USIC0_5_IRQn = 89,
        USIC1_0_IRQn = 90,
        USIC1_1_IRQn = 91,
        USIC1_2_IRQn = 92,
        USIC1_3_IRQn = 93,
        USIC1_4_IRQn = 94,
        USIC1_5_IRQn = 95,
        USIC2_0_IRQn = 96,
        USIC2_1_IRQn = 97,
        USIC2_2_IRQn = 98,
        USIC2_3_IRQn = 99,
        USIC2_4_IRQn = 100,
        USIC2_5_IRQn = 101,
        LEDTS0_0_IRQn = 102,
        FCE0_0_IRQn = 104,
        GPDMA0_0_IRQn = 105,
        SDMMC0_0_IRQn = 106,
        USB0_0_IRQn = 107,
        ETH0_0_IRQn = 108,
        GPDMA1_0_IRQn = 110
    };
    typedef enum __anonenum_IRQn_Type_6 IRQn_Type;
    typedef int int32_t;
    typedef unsigned char uint8_t;
    typedef unsigned short uint16_t;
    typedef unsigned int uint32_t;
    struct __anonstruct_NVIC_Type_15 {
       uint32_t volatile ISER[8] ;
       uint32_t RESERVED0[24] ;
       uint32_t volatile ICER[8] ;
       uint32_t RSERVED1[24] ;
       uint32_t volatile ISPR[8] ;
       uint32_t RESERVED2[24] ;
       uint32_t volatile ICPR[8] ;
       uint32_t RESERVED3[24] ;
       uint32_t volatile IABR[8] ;
       uint32_t RESERVED4[56] ;
       uint8_t volatile IP[240] ;
       uint32_t RESERVED5[644] ;
       uint32_t volatile STIR ;
    };
    typedef struct __anonstruct_NVIC_Type_15 NVIC_Type;
    struct __anonstruct_SCB_Type_16 {
       uint32_t const volatile CPUID ;
       uint32_t volatile ICSR ;
       uint32_t volatile VTOR ;
       uint32_t volatile AIRCR ;
       uint32_t volatile SCR ;
       uint32_t volatile CCR ;
       uint8_t volatile SHP[12] ;
       uint32_t volatile SHCSR ;
       uint32_t volatile CFSR ;
       uint32_t volatile HFSR ;
       uint32_t volatile DFSR ;
       uint32_t volatile MMFAR ;
       uint32_t volatile BFAR ;
       uint32_t volatile AFSR ;
       uint32_t const volatile PFR[2] ;
       uint32_t const volatile DFR ;
       uint32_t const volatile ADR ;
       uint32_t const volatile MMFR[4] ;
       uint32_t const volatile ISAR[5] ;
       uint32_t RESERVED0[5] ;
       uint32_t volatile CPACR ;
    };
    typedef struct __anonstruct_SCB_Type_16 SCB_Type;
    struct __anonstruct_SysTick_Type_18 {
       uint32_t volatile CTRL ;
       uint32_t volatile LOAD ;
       uint32_t volatile VAL ;
       uint32_t const volatile CALIB ;
    };
    typedef struct __anonstruct_SysTick_Type_18 SysTick_Type;
    union __anonunion_PORT_20 {
       uint8_t volatile u8 ;
       uint16_t volatile u16 ;
       uint32_t volatile u32 ;
    };
    struct __anonstruct_ITM_Type_19 {
       union __anonunion_PORT_20 volatile PORT[32] ;
       uint32_t RESERVED0[864] ;
       uint32_t volatile TER ;
       uint32_t RESERVED1[15] ;
       uint32_t volatile TPR ;
       uint32_t RESERVED2[15] ;
       uint32_t volatile TCR ;
       uint32_t RESERVED3[29] ;
       uint32_t volatile IWR ;
       uint32_t const volatile IRR ;
       uint32_t volatile IMCR ;
       uint32_t RESERVED4[43] ;
       uint32_t volatile LAR ;
       uint32_t const volatile LSR ;
       uint32_t RESERVED5[6] ;
       uint32_t const volatile PID4 ;
       uint32_t const volatile PID5 ;
       uint32_t const volatile PID6 ;
       uint32_t const volatile PID7 ;
       uint32_t const volatile PID0 ;
       uint32_t const volatile PID1 ;
       uint32_t const volatile PID2 ;
       uint32_t const volatile PID3 ;
       uint32_t const volatile CID0 ;
       uint32_t const volatile CID1 ;
       uint32_t const volatile CID2 ;
       uint32_t const volatile CID3 ;
    };
    typedef struct __anonstruct_ITM_Type_19 ITM_Type;
    struct __anonstruct_TPI_Type_22 {
       uint32_t volatile SSPSR ;
       uint32_t volatile CSPSR ;
       uint32_t RESERVED0[2] ;
       uint32_t volatile ACPR ;
       uint32_t RESERVED1[55] ;
       uint32_t volatile SPPR ;
       uint32_t RESERVED2[131] ;
       uint32_t const volatile FFSR ;
       uint32_t volatile FFCR ;
       uint32_t const volatile FSCR ;
       uint32_t RESERVED3[759] ;
       uint32_t const volatile TRIGGER ;
       uint32_t const volatile FIFO0 ;
       uint32_t const volatile ITATBCTR2 ;
       uint32_t RESERVED4[1] ;
       uint32_t const volatile ITATBCTR0 ;
       uint32_t const volatile FIFO1 ;
       uint32_t volatile ITCTRL ;
       uint32_t RESERVED5[39] ;
       uint32_t volatile CLAIMSET ;
       uint32_t volatile CLAIMCLR ;
       uint32_t RESERVED7[8] ;
       uint32_t const volatile DEVID ;
       uint32_t const volatile DEVTYPE ;
    };
    typedef struct __anonstruct_TPI_Type_22 TPI_Type;
    struct __anonstruct_CoreDebug_Type_25 {
       uint32_t volatile DHCSR ;
       uint32_t volatile DCRSR ;
       uint32_t volatile DCRDR ;
       uint32_t volatile DEMCR ;
    };
    typedef struct __anonstruct_CoreDebug_Type_25 CoreDebug_Type;
    struct __anonstruct_PORT2_Type_92 {
       uint32_t volatile OUT ;
       uint32_t volatile OMR ;
       uint32_t const volatile RESERVED0[2] ;
       uint32_t volatile IOCR0 ;
       uint32_t volatile IOCR4 ;
       uint32_t volatile IOCR8 ;
       uint32_t volatile IOCR12 ;
       uint32_t const volatile RESERVED1 ;
       uint32_t const volatile IN ;
       uint32_t const volatile RESERVED2[6] ;
       uint32_t volatile PDR0 ;
       uint32_t volatile PDR1 ;
       uint32_t const volatile RESERVED3[6] ;
       uint32_t const volatile PDISC ;
       uint32_t const volatile RESERVED4[3] ;
       uint32_t volatile PPS ;
       uint32_t volatile HWSEL ;
    };
    typedef struct __anonstruct_PORT2_Type_92 PORT2_Type;
    struct __anonstruct_PORT1_Type_86 {
       uint32_t volatile OUT ;
       uint32_t volatile OMR ;
       uint32_t const volatile RESERVED0[2] ;
       uint32_t volatile IOCR0 ;
       uint32_t volatile IOCR4 ;
       uint32_t volatile IOCR8 ;
       uint32_t volatile IOCR12 ;
       uint32_t const volatile RESERVED1 ;
       uint32_t const volatile IN ;
       uint32_t const volatile RESERVED2[6] ;
       uint32_t volatile PDR0 ;
       uint32_t volatile PDR1 ;
       uint32_t const volatile RESERVED3[6] ;
       uint32_t const volatile PDISC ;
       uint32_t const volatile RESERVED4[3] ;
       uint32_t volatile PPS ;
       uint32_t volatile HWSEL ;
    };
    typedef struct __anonstruct_PORT1_Type_86 PORT1_Type;
    struct __anonstruct_FLASH0_GLOBAL_TypeDef_32 {
       uint32_t const volatile RESERVED0[1026] ;
       uint32_t const volatile ID ;
       uint32_t const volatile RESERVED1 ;
       uint32_t const volatile FSR ;
       uint32_t volatile FCON ;
       uint32_t volatile MARP ;
       uint32_t const volatile RESERVED2 ;
       uint32_t const volatile PROCON0 ;
       uint32_t const volatile PROCON1 ;
       uint32_t const volatile PROCON2 ;
    };
    typedef struct __anonstruct_FLASH0_GLOBAL_TypeDef_32 FLASH0_GLOBAL_TypeDef;
    struct __anonstruct_WDT_GLOBAL_TypeDef_35 {
       uint32_t const volatile ID ;
       uint32_t volatile CTR ;
       uint32_t volatile SRV ;
       uint32_t const volatile TIM ;
       uint32_t volatile WLB ;
       uint32_t volatile WUB ;
       uint32_t const volatile WDTSTS ;
       uint32_t volatile WDTCLR ;
    };
    typedef struct __anonstruct_WDT_GLOBAL_TypeDef_35 WDT_GLOBAL_TypeDef;
    struct __anonstruct_SCU_CLK_TypeDef_37 {
       uint32_t const volatile CLKSTAT ;
       uint32_t volatile CLKSET ;
       uint32_t volatile CLKCLR ;
       uint32_t volatile SYSCLKCR ;
       uint32_t volatile CPUCLKCR ;
       uint32_t volatile PBCLKCR ;
       uint32_t volatile USBCLKCR ;
       uint32_t volatile EBUCLKCR ;
       uint32_t volatile CCUCLKCR ;
       uint32_t volatile WDTCLKCR ;
       uint32_t volatile EXTCLKCR ;
       uint32_t const volatile RESERVED0 ;
       uint32_t volatile SLEEPCR ;
       uint32_t volatile DSLEEPCR ;
    };
    typedef struct __anonstruct_SCU_CLK_TypeDef_37 SCU_CLK_TypeDef;
    struct __anonstruct_SCU_OSC_TypeDef_38 {
       uint32_t const volatile OSCHPSTAT ;
       uint32_t volatile OSCHPCTRL ;
       uint32_t const volatile RESERVED0 ;
       uint32_t volatile CLKCALCONST ;
    };
    typedef struct __anonstruct_SCU_OSC_TypeDef_38 SCU_OSC_TypeDef;
    struct __anonstruct_SCU_PLL_TypeDef_39 {
       uint32_t const volatile PLLSTAT ;
       uint32_t volatile PLLCON0 ;
       uint32_t volatile PLLCON1 ;
       uint32_t volatile PLLCON2 ;
       uint32_t const volatile USBPLLSTAT ;
       uint32_t volatile USBPLLCON ;
       uint32_t const volatile RESERVED0[4] ;
       uint32_t const volatile CLKMXSTAT ;
    };
    typedef struct __anonstruct_SCU_PLL_TypeDef_39 SCU_PLL_TypeDef;
    struct __anonstruct_SCU_GENERAL_TypeDef_40 {
       uint32_t const volatile ID ;
       uint32_t const volatile IDCHIP ;
       uint32_t const volatile IDMANUF ;
       uint32_t const volatile RESERVED0 ;
       uint32_t volatile STCON ;
       uint32_t const volatile RESERVED1[6] ;
       uint32_t volatile GPR[2] ;
       uint32_t const volatile RESERVED2[6] ;
       uint32_t volatile CCUCON ;
       uint32_t const volatile RESERVED3[15] ;
       uint32_t volatile DTSCON ;
       uint32_t const volatile DTSSTAT ;
       uint32_t const volatile RESERVED4[2] ;
       uint32_t volatile SDMMCDEL ;
       uint32_t volatile GORCEN[2] ;
       uint32_t const volatile RESERVED5[7] ;
       uint32_t const volatile MIRRSTS ;
       uint32_t volatile RMACR ;
       uint32_t volatile RMDATA ;
    };
    typedef struct __anonstruct_SCU_GENERAL_TypeDef_40 SCU_GENERAL_TypeDef;
    struct __anonstruct_SCU_TRAP_TypeDef_43 {
       uint32_t const volatile TRAPSTAT ;
       uint32_t const volatile TRAPRAW ;
       uint32_t volatile TRAPDIS ;
       uint32_t volatile TRAPCLR ;
       uint32_t volatile TRAPSET ;
    };
    typedef struct __anonstruct_SCU_TRAP_TypeDef_43 SCU_TRAP_TypeDef;
    struct __anonstruct_SCU_HIBERNATE_TypeDef_44 {
       uint32_t const volatile HDSTAT ;
       uint32_t volatile HDCLR ;
       uint32_t volatile HDSET ;
       uint32_t volatile HDCR ;
       uint32_t const volatile RESERVED0 ;
       uint32_t volatile OSCSICTRL ;
       uint32_t const volatile OSCULSTAT ;
       uint32_t volatile OSCULCTRL ;
    };
    typedef struct __anonstruct_SCU_HIBERNATE_TypeDef_44 SCU_HIBERNATE_TypeDef;
    struct __anonstruct_SCU_POWER_TypeDef_45 {
       uint32_t const volatile PWRSTAT ;
       uint32_t volatile PWRSET ;
       uint32_t volatile PWRCLR ;
       uint32_t const volatile RESERVED0 ;
       uint32_t const volatile EVRSTAT ;
       uint32_t const volatile EVRVADCSTAT ;
       uint32_t const volatile RESERVED1[5] ;
       uint32_t volatile PWRMON ;
    };
    typedef struct __anonstruct_SCU_POWER_TypeDef_45 SCU_POWER_TypeDef;
    struct __anonstruct_SCU_RESET_TypeDef_46 {
       uint32_t const volatile RSTSTAT ;
       uint32_t volatile RSTSET ;
       uint32_t volatile RSTCLR ;
       uint32_t const volatile PRSTAT0 ;
       uint32_t volatile PRSET0 ;
       uint32_t volatile PRCLR0 ;
       uint32_t const volatile PRSTAT1 ;
       uint32_t volatile PRSET1 ;
       uint32_t volatile PRCLR1 ;
       uint32_t const volatile PRSTAT2 ;
       uint32_t volatile PRSET2 ;
       uint32_t volatile PRCLR2 ;
       uint32_t const volatile PRSTAT3 ;
       uint32_t volatile PRSET3 ;
       uint32_t volatile PRCLR3 ;
    };
    typedef struct __anonstruct_SCU_RESET_TypeDef_46 SCU_RESET_TypeDef;
    extern int printf(char const * __restrict __format , ...);
    
    __inline static void ( __attribute__((__always_inline__)) __NOP)(void)
    {
      __asm__ volatile ("nop":);
      return;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __WFI)(void)
    {
      __asm__ volatile ("wfi":);
      return;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __WFE)(void)
    {
      __asm__ volatile ("wfe":);
      return;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __SEV)(void)
    {
      __asm__ volatile ("sev":);
      return;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __ISB)(void)
    {
      __asm__ volatile ("isb":);
      return;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __DSB)(void)
    {
      __asm__ volatile ("dsb":);
      return;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __DMB)(void)
    {
      __asm__ volatile ("dmb":);
      return;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __REV)(
    uint32_t value)
    {
      uint32_t result;
      __asm__ volatile ("rev %0, %1": "=r" (result): "r"(value));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __REV16)(
    uint32_t value)
    {
      uint32_t result;
      __asm__ volatile ("rev16 %0, %1": "=r" (result): "r"(value));
      return result;
    }
    
    __inline static int32_t ( __attribute__((__always_inline__)) __REVSH)(
    int32_t value)
    {
      int32_t __retres;
      uint32_t result;
      __asm__ volatile ("revsh %0, %1": "=r" (result): "r"(value));
      __retres = (int)result;
      return __retres;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __ROR)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t __retres;
      __retres = (op1 >> op2) | (op1 << ((uint32_t)32 - op2));
      return __retres;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __RBIT)(
    uint32_t value)
    {
      uint32_t result;
      __asm__ volatile ("rbit %0, %1": "=r" (result): "r"(value));
      return result;
    }
    
    __inline static uint8_t ( __attribute__((__always_inline__)) __LDREXB)(
    uint8_t volatile *addr)
    {
      uint8_t __retres;
      uint32_t result;
      __asm__ volatile ("ldrexb %0, [%1]": "=r" (result): "r"(addr): "memory");
      __retres = (unsigned char)result;
      return __retres;
    }
    
    __inline static uint16_t ( __attribute__((__always_inline__)) __LDREXH)(
    uint16_t volatile *addr)
    {
      uint16_t __retres;
      uint32_t result;
      __asm__ volatile ("ldrexh %0, [%1]": "=r" (result): "r"(addr): "memory");
      __retres = (unsigned short)result;
      return __retres;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __LDREXW)(
    uint32_t volatile *addr)
    {
      uint32_t result;
      __asm__ volatile ("ldrex %0, %1": "=r" (result): "Q"(*addr));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __STREXB)(
    uint8_t value, uint8_t volatile *addr)
    {
      uint32_t result;
      __asm__ volatile ("strexb %0, %2, %1": "=&r" (result), "=Q" (*addr): 
                        "r"(value));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __STREXH)(
    uint16_t value, uint16_t volatile *addr)
    {
      uint32_t result;
      __asm__ volatile ("strexh %0, %2, %1": "=&r" (result), "=Q" (*addr): 
                        "r"(value));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __STREXW)(
    uint32_t value, uint32_t volatile *addr)
    {
      uint32_t result;
      __asm__ volatile ("strex %0, %2, %1": "=&r" (result), "=Q" (*addr): 
                        "r"(value));
      return result;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __CLREX)(void)
    {
      __asm__ volatile ("clrex": : : "memory");
      return;
    }
    
    __inline static uint8_t ( __attribute__((__always_inline__)) __CLZ)(uint32_t value)
    {
      uint8_t __retres;
      uint32_t result;
      __asm__ volatile ("clz %0, %1": "=r" (result): "r"(value));
      __retres = (unsigned char)result;
      return __retres;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __enable_irq)(
    void)
    {
      __asm__ volatile ("cpsie i": : : "memory");
      return;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __disable_irq)(
    void)
    {
      __asm__ volatile ("cpsid i": : : "memory");
      return;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __get_CONTROL)(
    void)
    {
      uint32_t result;
      __asm__ volatile ("MRS %0, control": "=r" (result));
      return result;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __set_CONTROL)(
    uint32_t control)
    {
      __asm__ volatile ("MSR control, %0": : "r"(control): "memory");
      return;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __get_IPSR)(
    void)
    {
      uint32_t result;
      __asm__ volatile ("MRS %0, ipsr": "=r" (result));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __get_APSR)(
    void)
    {
      uint32_t result;
      __asm__ volatile ("MRS %0, apsr": "=r" (result));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __get_xPSR)(
    void)
    {
      uint32_t result;
      __asm__ volatile ("MRS %0, xpsr": "=r" (result));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __get_PSP)(
    void)
    {
      register uint32_t result;
      __asm__ volatile ("MRS %0, psp\n": "=r" (result));
      return result;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __set_PSP)(
    uint32_t topOfProcStack)
    {
      __asm__ volatile ("MSR psp, %0\n": : "r"(topOfProcStack): "sp");
      return;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __get_MSP)(
    void)
    {
      register uint32_t result;
      __asm__ volatile ("MRS %0, msp\n": "=r" (result));
      return result;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __set_MSP)(
    uint32_t topOfMainStack)
    {
      __asm__ volatile ("MSR msp, %0\n": : "r"(topOfMainStack): "sp");
      return;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __get_PRIMASK)(
    void)
    {
      uint32_t result;
      __asm__ volatile ("MRS %0, primask": "=r" (result));
      return result;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __set_PRIMASK)(
    uint32_t priMask)
    {
      __asm__ volatile ("MSR primask, %0": : "r"(priMask): "memory");
      return;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __enable_fault_irq)(
    void)
    {
      __asm__ volatile ("cpsie f": : : "memory");
      return;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __disable_fault_irq)(
    void)
    {
      __asm__ volatile ("cpsid f": : : "memory");
      return;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __get_BASEPRI)(
    void)
    {
      uint32_t result;
      __asm__ volatile ("MRS %0, basepri_max": "=r" (result));
      return result;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __set_BASEPRI)(
    uint32_t value)
    {
      __asm__ volatile ("MSR basepri, %0": : "r"(value): "memory");
      return;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __get_FAULTMASK)(
    void)
    {
      uint32_t result;
      __asm__ volatile ("MRS %0, faultmask": "=r" (result));
      return result;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __set_FAULTMASK)(
    uint32_t faultMask)
    {
      __asm__ volatile ("MSR faultmask, %0": : "r"(faultMask): "memory");
      return;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __get_FPSCR)(
    void)
    {
      uint32_t result;
      __asm__ volatile ("":);
      __asm__ volatile ("VMRS %0, fpscr": "=r" (result));
      __asm__ volatile ("":);
      return result;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __set_FPSCR)(
    uint32_t fpscr)
    {
      __asm__ volatile ("":);
      __asm__ volatile ("VMSR fpscr, %0": : "r"(fpscr): "vfpcc");
      __asm__ volatile ("":);
      return;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SADD8)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("sadd8 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __QADD8)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("qadd8 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SHADD8)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("shadd8 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UADD8)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uadd8 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UQADD8)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uqadd8 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UHADD8)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uhadd8 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SSUB8)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("ssub8 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __QSUB8)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("qsub8 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SHSUB8)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("shsub8 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __USUB8)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("usub8 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UQSUB8)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uqsub8 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UHSUB8)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uhsub8 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SADD16)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("sadd16 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __QADD16)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("qadd16 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SHADD16)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("shadd16 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UADD16)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uadd16 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UQADD16)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uqadd16 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UHADD16)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uhadd16 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SSUB16)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("ssub16 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __QSUB16)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("qsub16 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SHSUB16)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("shsub16 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __USUB16)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("usub16 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UQSUB16)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uqsub16 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UHSUB16)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uhsub16 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SASX)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("sasx %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __QASX)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("qasx %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SHASX)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("shasx %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UASX)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uasx %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UQASX)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uqasx %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UHASX)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uhasx %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SSAX)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("ssax %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __QSAX)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("qsax %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SHSAX)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("shsax %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __USAX)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("usax %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UQSAX)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uqsax %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UHSAX)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uhsax %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __USAD8)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("usad8 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __USADA8)(
    uint32_t op1, uint32_t op2, uint32_t op3)
    {
      uint32_t result;
      __asm__ volatile ("usada8 %0, %1, %2, %3": "=r" (result): "r"(op1),
                                                                "r"(op2),
                                                                "r"(op3));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UXTB16)(
    uint32_t op1)
    {
      uint32_t result;
      __asm__ volatile ("uxtb16 %0, %1": "=r" (result): "r"(op1));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UXTAB16)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uxtab16 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SXTB16)(
    uint32_t op1)
    {
      uint32_t result;
      __asm__ volatile ("sxtb16 %0, %1": "=r" (result): "r"(op1));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SXTAB16)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("sxtab16 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SMUAD)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("smuad %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SMUADX)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("smuadx %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SMLAD)(
    uint32_t op1, uint32_t op2, uint32_t op3)
    {
      uint32_t result;
      __asm__ volatile ("smlad %0, %1, %2, %3": "=r" (result): "r"(op1),
                                                               "r"(op2), "r"(op3));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SMLADX)(
    uint32_t op1, uint32_t op2, uint32_t op3)
    {
      uint32_t result;
      __asm__ volatile ("smladx %0, %1, %2, %3": "=r" (result): "r"(op1),
                                                                "r"(op2),
                                                                "r"(op3));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SMUSD)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("smusd %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SMUSDX)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("smusdx %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SMLSD)(
    uint32_t op1, uint32_t op2, uint32_t op3)
    {
      uint32_t result;
      __asm__ volatile ("smlsd %0, %1, %2, %3": "=r" (result): "r"(op1),
                                                               "r"(op2), "r"(op3));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SMLSDX)(
    uint32_t op1, uint32_t op2, uint32_t op3)
    {
      uint32_t result;
      __asm__ volatile ("smlsdx %0, %1, %2, %3": "=r" (result): "r"(op1),
                                                                "r"(op2),
                                                                "r"(op3));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SEL)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("sel %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __QADD)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("qadd %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __QSUB)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("qsub %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SMMLA)(
    int32_t op1, int32_t op2, int32_t op3)
    {
      uint32_t __retres;
      int32_t result;
      __asm__ volatile ("smmla %0, %1, %2, %3": "=r" (result): "r"(op1),
                                                               "r"(op2), "r"(op3));
      __retres = (unsigned int)result;
      return __retres;
    }
    
    __inline static void NVIC_SetPriorityGrouping(uint32_t PriorityGroup)
    {
      uint32_t reg_value;
      uint32_t PriorityGroupTmp;
      PriorityGroupTmp = PriorityGroup & (unsigned int)0x07;
      reg_value = ((SCB_Type *)(0xE000E000UL + 0x0D00UL))->AIRCR;
      reg_value = (unsigned int)((unsigned long)reg_value & ~ ((0xFFFFUL << 16) | (
                                                               7UL << 8)));
      reg_value = (reg_value | ((unsigned int)0x5FA << 16)) | (PriorityGroupTmp << 8);
      ((SCB_Type *)(0xE000E000UL + 0x0D00UL))->AIRCR = reg_value;
      return;
    }
    
    __inline static uint32_t NVIC_GetPriorityGrouping(void)
    {
      uint32_t __retres;
      __retres = (unsigned int)(((unsigned long)((SCB_Type *)(0xE000E000UL + 0x0D00UL))->AIRCR & (
                                 7UL << 8)) >> 8);
      return __retres;
    }
    
    __inline static void NVIC_EnableIRQ(IRQn_Type IRQn)
    {
      ((NVIC_Type *)(0xE000E000UL + 0x0100UL))->ISER[(unsigned int)((int)IRQn) >> 5] = (unsigned int)(
      1 << ((unsigned int)((int)IRQn) & (unsigned int)0x1F));
      return;
    }
    
    __inline static void NVIC_DisableIRQ(IRQn_Type IRQn)
    {
      ((NVIC_Type *)(0xE000E000UL + 0x0100UL))->ICER[(unsigned int)IRQn >> 5] = (unsigned int)(
      1 << ((unsigned int)IRQn & (unsigned int)0x1F));
      return;
    }
    
    __inline static uint32_t NVIC_GetPendingIRQ(IRQn_Type IRQn)
    {
      uint32_t __retres;
      int tmp;
      if (((NVIC_Type *)(0xE000E000UL + 0x0100UL))->ISPR[(unsigned int)IRQn >> 5] & (unsigned int)(
          1 << ((unsigned int)IRQn & (unsigned int)0x1F))) tmp = 1;
      else tmp = 0;
      __retres = (unsigned int)tmp;
      return __retres;
    }
    
    __inline static void NVIC_SetPendingIRQ(IRQn_Type IRQn)
    {
      ((NVIC_Type *)(0xE000E000UL + 0x0100UL))->ISPR[(unsigned int)IRQn >> 5] = (unsigned int)(
      1 << ((unsigned int)IRQn & (unsigned int)0x1F));
      return;
    }
    
    __inline static void NVIC_ClearPendingIRQ(IRQn_Type IRQn)
    {
      ((NVIC_Type *)(0xE000E000UL + 0x0100UL))->ICPR[(unsigned int)IRQn >> 5] = (unsigned int)(
      1 << ((unsigned int)IRQn & (unsigned int)0x1F));
      return;
    }
    
    __inline static uint32_t NVIC_GetActive(IRQn_Type IRQn)
    {
      uint32_t __retres;
      int tmp;
      if (((NVIC_Type *)(0xE000E000UL + 0x0100UL))->IABR[(unsigned int)IRQn >> 5] & (unsigned int)(
          1 << ((unsigned int)IRQn & (unsigned int)0x1F))) tmp = 1;
      else tmp = 0;
      __retres = (unsigned int)tmp;
      return __retres;
    }
    
    __inline static void NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority)
    {
      if (IRQn < 0) ((SCB_Type *)(0xE000E000UL + 0x0D00UL))->SHP[((unsigned int)IRQn & (unsigned int)0xF) - (unsigned int)4] = (unsigned char)(
                    (priority << (8 - 6)) & (unsigned int)0xff);
      else ((NVIC_Type *)(0xE000E000UL + 0x0100UL))->IP[(unsigned int)IRQn] = (unsigned char)(
           (priority << (8 - 6)) & (unsigned int)0xff);
      return;
    }
    
    __inline static uint32_t NVIC_GetPriority(IRQn_Type IRQn)
    {
      uint32_t __retres;
      if (IRQn < 0) {
        __retres = (unsigned int)((int)((SCB_Type *)(0xE000E000UL + 0x0D00UL))->SHP[
                                  ((unsigned int)IRQn & (unsigned int)0xF) - (unsigned int)4] >> (
                                  8 - 6));
        goto return_label;
      }
      else {
        __retres = (unsigned int)((int)((NVIC_Type *)(0xE000E000UL + 0x0100UL))->IP[(unsigned int)IRQn] >> (
                                  8 - 6));
        goto return_label;
      }
      return_label: /* internal */ return __retres;
    }
    
    __inline static uint32_t NVIC_EncodePriority(uint32_t PriorityGroup,
                                                 uint32_t PreemptPriority,
                                                 uint32_t SubPriority)
    {
      uint32_t __retres;
      uint32_t PriorityGroupTmp;
      uint32_t PreemptPriorityBits;
      uint32_t SubPriorityBits;
      PriorityGroupTmp = PriorityGroup & (unsigned int)0x07;
      if ((uint32_t)7 - PriorityGroupTmp > (uint32_t)6) PreemptPriorityBits = (unsigned int)6;
      else PreemptPriorityBits = (uint32_t)7 - PriorityGroupTmp;
      if (PriorityGroupTmp + (uint32_t)6 < (uint32_t)7) SubPriorityBits = (unsigned int)0;
      else SubPriorityBits = (PriorityGroupTmp - (uint32_t)7) + (uint32_t)6;
      __retres = ((PreemptPriority & (unsigned int)((1 << PreemptPriorityBits) - 1)) << SubPriorityBits) | (
                 SubPriority & (unsigned int)((1 << SubPriorityBits) - 1));
      return __retres;
    }
    
    __inline static void NVIC_DecodePriority(uint32_t Priority,
                                             uint32_t PriorityGroup,
                                             uint32_t *pPreemptPriority,
                                             uint32_t *pSubPriority)
    {
      uint32_t PriorityGroupTmp;
      uint32_t PreemptPriorityBits;
      uint32_t SubPriorityBits;
      PriorityGroupTmp = PriorityGroup & (unsigned int)0x07;
      if ((uint32_t)7 - PriorityGroupTmp > (uint32_t)6) PreemptPriorityBits = (unsigned int)6;
      else PreemptPriorityBits = (uint32_t)7 - PriorityGroupTmp;
      if (PriorityGroupTmp + (uint32_t)6 < (uint32_t)7) SubPriorityBits = (unsigned int)0;
      else SubPriorityBits = (PriorityGroupTmp - (uint32_t)7) + (uint32_t)6;
      *pPreemptPriority = (Priority >> SubPriorityBits) & (unsigned int)(
                          (1 << PreemptPriorityBits) - 1);
      *pSubPriority = Priority & (unsigned int)((1 << SubPriorityBits) - 1);
      return;
    }
    
    __inline static void NVIC_SystemReset(void)
    {
      __DSB();
      ((SCB_Type *)(0xE000E000UL + 0x0D00UL))->AIRCR = (unsigned int)(((unsigned long)(
                                                                       0x5FA << 16) | (
                                                                       (unsigned long)((SCB_Type *)(
                                                                       0xE000E000UL + 0x0D00UL))->AIRCR & (
                                                                       7UL << 8))) | (
                                                                      1UL << 2));
      __DSB();
      while (1) ;
      return;
    }
    
    __inline static uint32_t SysTick_Config(uint32_t ticks_0)
    {
      uint32_t __retres;
      if ((unsigned long)(ticks_0 - (uint32_t)1) > 0xFFFFFFUL << 0) {
        __retres = (unsigned int)1;
        goto return_label;
      }
      ((SysTick_Type *)(0xE000E000UL + 0x0010UL))->LOAD = ticks_0 - (uint32_t)1;
      NVIC_SetPriority(SysTick_IRQn,(unsigned int)((1 << 6) - 1));
      ((SysTick_Type *)(0xE000E000UL + 0x0010UL))->VAL = (unsigned int)0;
      ((SysTick_Type *)(0xE000E000UL + 0x0010UL))->CTRL = (unsigned int)(
      ((1UL << 2) | (1UL << 1)) | (1UL << 0));
      __retres = (unsigned int)0;
      return_label: /* internal */ return __retres;
    }
    
    extern int32_t volatile ITM_RxBuffer;
    
    __inline static uint32_t ITM_SendChar(uint32_t ch)
    {
      if ((unsigned long)((ITM_Type *)0xE0000000UL)->TCR & (1UL << 0)) 
        if ((unsigned long)((ITM_Type *)0xE0000000UL)->TER & (1UL << 0)) {
          while (((ITM_Type *)0xE0000000UL)->PORT[0].u32 == (uint32_t)0) ;
          ((ITM_Type *)0xE0000000UL)->PORT[0].u8 = (unsigned char)ch;
        }
      return ch;
    }
    
    __inline static int32_t ITM_ReceiveChar(void)
    {
      int32_t ch;
      ch = -1;
      if (ITM_RxBuffer != 0x5AA55AA5) {
        ch = ITM_RxBuffer;
        ITM_RxBuffer = 0x5AA55AA5;
      }
      return ch;
    }
    
    __inline static int32_t ITM_CheckChar(void)
    {
      int32_t __retres;
      if (ITM_RxBuffer == 0x5AA55AA5) {
        __retres = 0;
        goto return_label;
      }
      else {
        __retres = 1;
        goto return_label;
      }
      return_label: /* internal */ return __retres;
    }
    
    uint32_t SystemCoreClock;
    
    void SystemCoreClockUpdate(void);
    
    void LED_Init(void);
    
    void LED_On(unsigned int num);
    
    void LED_Off(unsigned int num);
    
    uint32_t volatile msTicks;
    int _write(int file, char *buf, int nbytes)
    {
      int i;
      i = 0;
      while (i < nbytes) {
        {
          char *tmp;
          {
            /*undefined sequence*/
            tmp = buf;
            buf ++;
            ;
          }
          ITM_SendChar((unsigned int)*tmp);
        }
        i ++;
      }
      return nbytes;
    }
    
    void SysTick_Handler(void);
    
    static uint32_t ticks = (unsigned int)0;
    void SysTick_Handler(void)
    {
      ticks ++;
      msTicks += (uint32_t)1;
      if (ticks == (uint32_t)1000) {
        printf("x\n");
        ticks = (unsigned int)0;
      }
      return;
    }
    
    void Init_SWO(void)
    {
      ((PORT2_Type *)0x48028200UL)->HWSEL = (unsigned int)((unsigned long)((PORT2_Type *)0x48028200UL)->HWSEL & ~ (
                                                           0x03UL << 2));
      ((PORT2_Type *)0x48028200UL)->HWSEL = (unsigned int)((unsigned long)((PORT2_Type *)0x48028200UL)->HWSEL | (
                                                           0x01UL << 2));
      ((CoreDebug_Type *)0xE000EDF0UL)->DEMCR = (unsigned int)((unsigned long)((CoreDebug_Type *)0xE000EDF0UL)->DEMCR | (
                                                               1UL << 24));
      ((TPI_Type *)0xE0040000UL)->SPPR = (unsigned int)0x2UL;
      ((TPI_Type *)0xE0040000UL)->ACPR = (unsigned int)119UL;
      ((ITM_Type *)0xE0000000UL)->LAR = 0xC5ACCE55;
      ((ITM_Type *)0xE0000000UL)->TCR = (unsigned int)((unsigned long)((ITM_Type *)0xE0000000UL)->TCR | (
                                                       1UL << 0));
      ((ITM_Type *)0xE0000000UL)->TER = 0xFFFFFFFF;
      ((TPI_Type *)0xE0040000UL)->FFCR = (unsigned int)((unsigned long)((TPI_Type *)0xE0040000UL)->FFCR & ~ (
                                                        0x1UL << 1));
      return;
    }
    
    void Delay(uint32_t dlyTicks)
    {
      uint32_t curTicks;
      curTicks = msTicks;
      while (msTicks - curTicks < dlyTicks) __NOP();
      return;
    }
    
    int main(void)
    {
      int __retres;
      int x;
      uint32_t tmp;
      x = 0;
      /*@ assert x ≡ 0; */ ;
      Init_SWO();
      SystemCoreClockUpdate();
      tmp = SysTick_Config(SystemCoreClock / (uint32_t)1000);
      if (tmp) 
        while (1) __NOP();
      printf("init\n");
      LED_Init();
      while (1) {
        LED_On((unsigned int)0);
        LED_Off((unsigned int)1);
        Delay((unsigned int)500);
        LED_On((unsigned int)1);
        LED_Off((unsigned int)0);
        Delay((unsigned int)500);
        printf("#");
      }
      return __retres;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __NOP_0)(void)
    {
      __asm__ volatile ("nop":);
      return;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __WFI_0)(void)
    {
      __asm__ volatile ("wfi":);
      return;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __WFE_0)(void)
    {
      __asm__ volatile ("wfe":);
      return;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __SEV_0)(void)
    {
      __asm__ volatile ("sev":);
      return;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __ISB_0)(void)
    {
      __asm__ volatile ("isb":);
      return;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __DSB_0)(void)
    {
      __asm__ volatile ("dsb":);
      return;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __DMB_0)(void)
    {
      __asm__ volatile ("dmb":);
      return;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __REV_0)(
    uint32_t value)
    {
      uint32_t result;
      __asm__ volatile ("rev %0, %1": "=r" (result): "r"(value));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __REV16_0)(
    uint32_t value)
    {
      uint32_t result;
      __asm__ volatile ("rev16 %0, %1": "=r" (result): "r"(value));
      return result;
    }
    
    __inline static int32_t ( __attribute__((__always_inline__)) __REVSH_0)(
    int32_t value)
    {
      int32_t __retres;
      uint32_t result;
      __asm__ volatile ("revsh %0, %1": "=r" (result): "r"(value));
      __retres = (int)result;
      return __retres;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __ROR_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t __retres;
      __retres = (op1 >> op2) | (op1 << ((uint32_t)32 - op2));
      return __retres;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __RBIT_0)(
    uint32_t value)
    {
      uint32_t result;
      __asm__ volatile ("rbit %0, %1": "=r" (result): "r"(value));
      return result;
    }
    
    __inline static uint8_t ( __attribute__((__always_inline__)) __LDREXB_0)(
    uint8_t volatile *addr)
    {
      uint8_t __retres;
      uint32_t result;
      __asm__ volatile ("ldrexb %0, [%1]": "=r" (result): "r"(addr): "memory");
      __retres = (unsigned char)result;
      return __retres;
    }
    
    __inline static uint16_t ( __attribute__((__always_inline__)) __LDREXH_0)(
    uint16_t volatile *addr)
    {
      uint16_t __retres;
      uint32_t result;
      __asm__ volatile ("ldrexh %0, [%1]": "=r" (result): "r"(addr): "memory");
      __retres = (unsigned short)result;
      return __retres;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __LDREXW_0)(
    uint32_t volatile *addr)
    {
      uint32_t result;
      __asm__ volatile ("ldrex %0, %1": "=r" (result): "Q"(*addr));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __STREXB_0)(
    uint8_t value, uint8_t volatile *addr)
    {
      uint32_t result;
      __asm__ volatile ("strexb %0, %2, %1": "=&r" (result), "=Q" (*addr): 
                        "r"(value));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __STREXH_0)(
    uint16_t value, uint16_t volatile *addr)
    {
      uint32_t result;
      __asm__ volatile ("strexh %0, %2, %1": "=&r" (result), "=Q" (*addr): 
                        "r"(value));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __STREXW_0)(
    uint32_t value, uint32_t volatile *addr)
    {
      uint32_t result;
      __asm__ volatile ("strex %0, %2, %1": "=&r" (result), "=Q" (*addr): 
                        "r"(value));
      return result;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __CLREX_0)(
    void)
    {
      __asm__ volatile ("clrex": : : "memory");
      return;
    }
    
    __inline static uint8_t ( __attribute__((__always_inline__)) __CLZ_0)(
    uint32_t value)
    {
      uint8_t __retres;
      uint32_t result;
      __asm__ volatile ("clz %0, %1": "=r" (result): "r"(value));
      __retres = (unsigned char)result;
      return __retres;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __enable_irq_0)(
    void)
    {
      __asm__ volatile ("cpsie i": : : "memory");
      return;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __disable_irq_0)(
    void)
    {
      __asm__ volatile ("cpsid i": : : "memory");
      return;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __get_CONTROL_0)(
    void)
    {
      uint32_t result;
      __asm__ volatile ("MRS %0, control": "=r" (result));
      return result;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __set_CONTROL_0)(
    uint32_t control)
    {
      __asm__ volatile ("MSR control, %0": : "r"(control): "memory");
      return;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __get_IPSR_0)(
    void)
    {
      uint32_t result;
      __asm__ volatile ("MRS %0, ipsr": "=r" (result));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __get_APSR_0)(
    void)
    {
      uint32_t result;
      __asm__ volatile ("MRS %0, apsr": "=r" (result));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __get_xPSR_0)(
    void)
    {
      uint32_t result;
      __asm__ volatile ("MRS %0, xpsr": "=r" (result));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __get_PSP_0)(
    void)
    {
      register uint32_t result;
      __asm__ volatile ("MRS %0, psp\n": "=r" (result));
      return result;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __set_PSP_0)(
    uint32_t topOfProcStack)
    {
      __asm__ volatile ("MSR psp, %0\n": : "r"(topOfProcStack): "sp");
      return;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __get_MSP_0)(
    void)
    {
      register uint32_t result;
      __asm__ volatile ("MRS %0, msp\n": "=r" (result));
      return result;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __set_MSP_0)(
    uint32_t topOfMainStack)
    {
      __asm__ volatile ("MSR msp, %0\n": : "r"(topOfMainStack): "sp");
      return;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __get_PRIMASK_0)(
    void)
    {
      uint32_t result;
      __asm__ volatile ("MRS %0, primask": "=r" (result));
      return result;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __set_PRIMASK_0)(
    uint32_t priMask)
    {
      __asm__ volatile ("MSR primask, %0": : "r"(priMask): "memory");
      return;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __enable_fault_irq_0)(
    void)
    {
      __asm__ volatile ("cpsie f": : : "memory");
      return;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __disable_fault_irq_0)(
    void)
    {
      __asm__ volatile ("cpsid f": : : "memory");
      return;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __get_BASEPRI_0)(
    void)
    {
      uint32_t result;
      __asm__ volatile ("MRS %0, basepri_max": "=r" (result));
      return result;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __set_BASEPRI_0)(
    uint32_t value)
    {
      __asm__ volatile ("MSR basepri, %0": : "r"(value): "memory");
      return;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __get_FAULTMASK_0)(
    void)
    {
      uint32_t result;
      __asm__ volatile ("MRS %0, faultmask": "=r" (result));
      return result;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __set_FAULTMASK_0)(
    uint32_t faultMask)
    {
      __asm__ volatile ("MSR faultmask, %0": : "r"(faultMask): "memory");
      return;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __get_FPSCR_0)(
    void)
    {
      uint32_t result;
      __asm__ volatile ("":);
      __asm__ volatile ("VMRS %0, fpscr": "=r" (result));
      __asm__ volatile ("":);
      return result;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __set_FPSCR_0)(
    uint32_t fpscr)
    {
      __asm__ volatile ("":);
      __asm__ volatile ("VMSR fpscr, %0": : "r"(fpscr): "vfpcc");
      __asm__ volatile ("":);
      return;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SADD8_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("sadd8 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __QADD8_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("qadd8 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SHADD8_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("shadd8 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UADD8_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uadd8 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UQADD8_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uqadd8 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UHADD8_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uhadd8 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SSUB8_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("ssub8 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __QSUB8_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("qsub8 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SHSUB8_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("shsub8 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __USUB8_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("usub8 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UQSUB8_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uqsub8 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UHSUB8_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uhsub8 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SADD16_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("sadd16 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __QADD16_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("qadd16 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SHADD16_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("shadd16 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UADD16_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uadd16 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UQADD16_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uqadd16 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UHADD16_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uhadd16 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SSUB16_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("ssub16 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __QSUB16_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("qsub16 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SHSUB16_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("shsub16 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __USUB16_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("usub16 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UQSUB16_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uqsub16 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UHSUB16_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uhsub16 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SASX_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("sasx %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __QASX_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("qasx %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SHASX_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("shasx %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UASX_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uasx %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UQASX_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uqasx %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UHASX_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uhasx %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SSAX_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("ssax %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __QSAX_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("qsax %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SHSAX_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("shsax %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __USAX_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("usax %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UQSAX_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uqsax %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UHSAX_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uhsax %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __USAD8_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("usad8 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __USADA8_0)(
    uint32_t op1, uint32_t op2, uint32_t op3)
    {
      uint32_t result;
      __asm__ volatile ("usada8 %0, %1, %2, %3": "=r" (result): "r"(op1),
                                                                "r"(op2),
                                                                "r"(op3));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UXTB16_0)(
    uint32_t op1)
    {
      uint32_t result;
      __asm__ volatile ("uxtb16 %0, %1": "=r" (result): "r"(op1));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UXTAB16_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uxtab16 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SXTB16_0)(
    uint32_t op1)
    {
      uint32_t result;
      __asm__ volatile ("sxtb16 %0, %1": "=r" (result): "r"(op1));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SXTAB16_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("sxtab16 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SMUAD_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("smuad %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SMUADX_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("smuadx %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SMLAD_0)(
    uint32_t op1, uint32_t op2, uint32_t op3)
    {
      uint32_t result;
      __asm__ volatile ("smlad %0, %1, %2, %3": "=r" (result): "r"(op1),
                                                               "r"(op2), "r"(op3));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SMLADX_0)(
    uint32_t op1, uint32_t op2, uint32_t op3)
    {
      uint32_t result;
      __asm__ volatile ("smladx %0, %1, %2, %3": "=r" (result): "r"(op1),
                                                                "r"(op2),
                                                                "r"(op3));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SMUSD_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("smusd %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SMUSDX_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("smusdx %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SMLSD_0)(
    uint32_t op1, uint32_t op2, uint32_t op3)
    {
      uint32_t result;
      __asm__ volatile ("smlsd %0, %1, %2, %3": "=r" (result): "r"(op1),
                                                               "r"(op2), "r"(op3));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SMLSDX_0)(
    uint32_t op1, uint32_t op2, uint32_t op3)
    {
      uint32_t result;
      __asm__ volatile ("smlsdx %0, %1, %2, %3": "=r" (result): "r"(op1),
                                                                "r"(op2),
                                                                "r"(op3));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SEL_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("sel %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __QADD_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("qadd %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __QSUB_0)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("qsub %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SMMLA_0)(
    int32_t op1, int32_t op2, int32_t op3)
    {
      uint32_t __retres;
      int32_t result;
      __asm__ volatile ("smmla %0, %1, %2, %3": "=r" (result): "r"(op1),
                                                               "r"(op2), "r"(op3));
      __retres = (unsigned int)result;
      return __retres;
    }
    
    __inline static void NVIC_SetPriorityGrouping_0(uint32_t PriorityGroup)
    {
      uint32_t reg_value;
      uint32_t PriorityGroupTmp;
      PriorityGroupTmp = PriorityGroup & (unsigned int)0x07;
      reg_value = ((SCB_Type *)(0xE000E000UL + 0x0D00UL))->AIRCR;
      reg_value = (unsigned int)((unsigned long)reg_value & ~ ((0xFFFFUL << 16) | (
                                                               7UL << 8)));
      reg_value = (reg_value | ((unsigned int)0x5FA << 16)) | (PriorityGroupTmp << 8);
      ((SCB_Type *)(0xE000E000UL + 0x0D00UL))->AIRCR = reg_value;
      return;
    }
    
    __inline static uint32_t NVIC_GetPriorityGrouping_0(void)
    {
      uint32_t __retres;
      __retres = (unsigned int)(((unsigned long)((SCB_Type *)(0xE000E000UL + 0x0D00UL))->AIRCR & (
                                 7UL << 8)) >> 8);
      return __retres;
    }
    
    __inline static void NVIC_EnableIRQ_0(IRQn_Type IRQn)
    {
      ((NVIC_Type *)(0xE000E000UL + 0x0100UL))->ISER[(unsigned int)((int)IRQn) >> 5] = (unsigned int)(
      1 << ((unsigned int)((int)IRQn) & (unsigned int)0x1F));
      return;
    }
    
    __inline static void NVIC_DisableIRQ_0(IRQn_Type IRQn)
    {
      ((NVIC_Type *)(0xE000E000UL + 0x0100UL))->ICER[(unsigned int)IRQn >> 5] = (unsigned int)(
      1 << ((unsigned int)IRQn & (unsigned int)0x1F));
      return;
    }
    
    __inline static uint32_t NVIC_GetPendingIRQ_0(IRQn_Type IRQn)
    {
      uint32_t __retres;
      int tmp;
      if (((NVIC_Type *)(0xE000E000UL + 0x0100UL))->ISPR[(unsigned int)IRQn >> 5] & (unsigned int)(
          1 << ((unsigned int)IRQn & (unsigned int)0x1F))) tmp = 1;
      else tmp = 0;
      __retres = (unsigned int)tmp;
      return __retres;
    }
    
    __inline static void NVIC_SetPendingIRQ_0(IRQn_Type IRQn)
    {
      ((NVIC_Type *)(0xE000E000UL + 0x0100UL))->ISPR[(unsigned int)IRQn >> 5] = (unsigned int)(
      1 << ((unsigned int)IRQn & (unsigned int)0x1F));
      return;
    }
    
    __inline static void NVIC_ClearPendingIRQ_0(IRQn_Type IRQn)
    {
      ((NVIC_Type *)(0xE000E000UL + 0x0100UL))->ICPR[(unsigned int)IRQn >> 5] = (unsigned int)(
      1 << ((unsigned int)IRQn & (unsigned int)0x1F));
      return;
    }
    
    __inline static uint32_t NVIC_GetActive_0(IRQn_Type IRQn)
    {
      uint32_t __retres;
      int tmp;
      if (((NVIC_Type *)(0xE000E000UL + 0x0100UL))->IABR[(unsigned int)IRQn >> 5] & (unsigned int)(
          1 << ((unsigned int)IRQn & (unsigned int)0x1F))) tmp = 1;
      else tmp = 0;
      __retres = (unsigned int)tmp;
      return __retres;
    }
    
    __inline static void NVIC_SetPriority_0(IRQn_Type IRQn, uint32_t priority)
    {
      if (IRQn < 0) ((SCB_Type *)(0xE000E000UL + 0x0D00UL))->SHP[((unsigned int)IRQn & (unsigned int)0xF) - (unsigned int)4] = (unsigned char)(
                    (priority << (8 - 6)) & (unsigned int)0xff);
      else ((NVIC_Type *)(0xE000E000UL + 0x0100UL))->IP[(unsigned int)IRQn] = (unsigned char)(
           (priority << (8 - 6)) & (unsigned int)0xff);
      return;
    }
    
    __inline static uint32_t NVIC_GetPriority_0(IRQn_Type IRQn)
    {
      uint32_t __retres;
      if (IRQn < 0) {
        __retres = (unsigned int)((int)((SCB_Type *)(0xE000E000UL + 0x0D00UL))->SHP[
                                  ((unsigned int)IRQn & (unsigned int)0xF) - (unsigned int)4] >> (
                                  8 - 6));
        goto return_label;
      }
      else {
        __retres = (unsigned int)((int)((NVIC_Type *)(0xE000E000UL + 0x0100UL))->IP[(unsigned int)IRQn] >> (
                                  8 - 6));
        goto return_label;
      }
      return_label: /* internal */ return __retres;
    }
    
    __inline static uint32_t NVIC_EncodePriority_0(uint32_t PriorityGroup,
                                                   uint32_t PreemptPriority,
                                                   uint32_t SubPriority)
    {
      uint32_t __retres;
      uint32_t PriorityGroupTmp;
      uint32_t PreemptPriorityBits;
      uint32_t SubPriorityBits;
      PriorityGroupTmp = PriorityGroup & (unsigned int)0x07;
      if ((uint32_t)7 - PriorityGroupTmp > (uint32_t)6) PreemptPriorityBits = (unsigned int)6;
      else PreemptPriorityBits = (uint32_t)7 - PriorityGroupTmp;
      if (PriorityGroupTmp + (uint32_t)6 < (uint32_t)7) SubPriorityBits = (unsigned int)0;
      else SubPriorityBits = (PriorityGroupTmp - (uint32_t)7) + (uint32_t)6;
      __retres = ((PreemptPriority & (unsigned int)((1 << PreemptPriorityBits) - 1)) << SubPriorityBits) | (
                 SubPriority & (unsigned int)((1 << SubPriorityBits) - 1));
      return __retres;
    }
    
    __inline static void NVIC_DecodePriority_0(uint32_t Priority,
                                               uint32_t PriorityGroup,
                                               uint32_t *pPreemptPriority,
                                               uint32_t *pSubPriority)
    {
      uint32_t PriorityGroupTmp;
      uint32_t PreemptPriorityBits;
      uint32_t SubPriorityBits;
      PriorityGroupTmp = PriorityGroup & (unsigned int)0x07;
      if ((uint32_t)7 - PriorityGroupTmp > (uint32_t)6) PreemptPriorityBits = (unsigned int)6;
      else PreemptPriorityBits = (uint32_t)7 - PriorityGroupTmp;
      if (PriorityGroupTmp + (uint32_t)6 < (uint32_t)7) SubPriorityBits = (unsigned int)0;
      else SubPriorityBits = (PriorityGroupTmp - (uint32_t)7) + (uint32_t)6;
      *pPreemptPriority = (Priority >> SubPriorityBits) & (unsigned int)(
                          (1 << PreemptPriorityBits) - 1);
      *pSubPriority = Priority & (unsigned int)((1 << SubPriorityBits) - 1);
      return;
    }
    
    __inline static void NVIC_SystemReset_0(void)
    {
      __DSB_0();
      ((SCB_Type *)(0xE000E000UL + 0x0D00UL))->AIRCR = (unsigned int)(((unsigned long)(
                                                                       0x5FA << 16) | (
                                                                       (unsigned long)((SCB_Type *)(
                                                                       0xE000E000UL + 0x0D00UL))->AIRCR & (
                                                                       7UL << 8))) | (
                                                                      1UL << 2));
      __DSB_0();
      while (1) ;
      return;
    }
    
    __inline static uint32_t SysTick_Config_0(uint32_t ticks_0)
    {
      uint32_t __retres;
      if ((unsigned long)(ticks_0 - (uint32_t)1) > 0xFFFFFFUL << 0) {
        __retres = (unsigned int)1;
        goto return_label;
      }
      ((SysTick_Type *)(0xE000E000UL + 0x0010UL))->LOAD = ticks_0 - (uint32_t)1;
      NVIC_SetPriority_0(SysTick_IRQn,(unsigned int)((1 << 6) - 1));
      ((SysTick_Type *)(0xE000E000UL + 0x0010UL))->VAL = (unsigned int)0;
      ((SysTick_Type *)(0xE000E000UL + 0x0010UL))->CTRL = (unsigned int)(
      ((1UL << 2) | (1UL << 1)) | (1UL << 0));
      __retres = (unsigned int)0;
      return_label: /* internal */ return __retres;
    }
    
    __inline static uint32_t ITM_SendChar_0(uint32_t ch)
    {
      if ((unsigned long)((ITM_Type *)0xE0000000UL)->TCR & (1UL << 0)) 
        if ((unsigned long)((ITM_Type *)0xE0000000UL)->TER & (1UL << 0)) {
          while (((ITM_Type *)0xE0000000UL)->PORT[0].u32 == (uint32_t)0) ;
          ((ITM_Type *)0xE0000000UL)->PORT[0].u8 = (unsigned char)ch;
        }
      return ch;
    }
    
    __inline static int32_t ITM_ReceiveChar_0(void)
    {
      int32_t ch;
      ch = -1;
      if (ITM_RxBuffer != 0x5AA55AA5) {
        ch = ITM_RxBuffer;
        ITM_RxBuffer = 0x5AA55AA5;
      }
      return ch;
    }
    
    __inline static int32_t ITM_CheckChar_0(void)
    {
      int32_t __retres;
      if (ITM_RxBuffer == 0x5AA55AA5) {
        __retres = 0;
        goto return_label;
      }
      else {
        __retres = 1;
        goto return_label;
      }
      return_label: /* internal */ return __retres;
    }
    
    void LED_Out(unsigned int value);
    
    unsigned long const led_mask[2] = {1UL << 1, 1UL << 0};
    void LED_Init(void)
    {
      int x;
      x = 0;
      /*@ assert x ≡ 0; */ ;
      ((PORT1_Type *)0x48028100UL)->IOCR0 = (unsigned int)((unsigned long)((PORT1_Type *)0x48028100UL)->IOCR0 & ~ (
                                                           (0xFFUL << 0) | (
                                                           0xFFUL << 8)));
      ((PORT1_Type *)0x48028100UL)->IOCR0 = (unsigned int)((unsigned long)((PORT1_Type *)0x48028100UL)->IOCR0 | (
                                                           (0x80UL << 0) | (
                                                           0x80UL << 8)));
      ((PORT1_Type *)0x48028100UL)->PDR0 = (unsigned int)((unsigned long)((PORT1_Type *)0x48028100UL)->PDR0 & ~ (
                                                          (0x07UL << 0) | (
                                                          0x07UL << 4)));
      ((PORT1_Type *)0x48028100UL)->PDR0 = (unsigned int)((unsigned long)((PORT1_Type *)0x48028100UL)->PDR0 | (
                                                          (0x02UL << 0) | (
                                                          0x02UL << 4)));
      LED_Out((unsigned int)0);
      return;
    }
    
    void LED_On(unsigned int num)
    {
      if (num < (unsigned int)2) ((PORT1_Type *)0x48028100UL)->OMR = (unsigned int)led_mask[num];
      return;
    }
    
    void LED_Off(unsigned int num)
    {
      if (num < (unsigned int)2) ((PORT1_Type *)0x48028100UL)->OMR = (unsigned int)(
                                 led_mask[num] << 16);
      return;
    }
    
    void LED_Out(unsigned int value)
    {
      int i;
      i = 0;
      while (i < 2) {
        if (value & (unsigned int)(1 << i)) LED_On((unsigned int)i);
        else LED_Off((unsigned int)i);
        i ++;
      }
      return;
    }
    
    void SystemInit(void);
    
    extern uint32_t AllowPLLInitByStartup(void);
    
    __inline static void ( __attribute__((__always_inline__)) __NOP_1)(void)
    {
      __asm__ volatile ("nop":);
      return;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __WFI_1)(void)
    {
      __asm__ volatile ("wfi":);
      return;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __WFE_1)(void)
    {
      __asm__ volatile ("wfe":);
      return;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __SEV_1)(void)
    {
      __asm__ volatile ("sev":);
      return;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __ISB_1)(void)
    {
      __asm__ volatile ("isb":);
      return;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __DSB_1)(void)
    {
      __asm__ volatile ("dsb":);
      return;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __DMB_1)(void)
    {
      __asm__ volatile ("dmb":);
      return;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __REV_1)(
    uint32_t value)
    {
      uint32_t result;
      __asm__ volatile ("rev %0, %1": "=r" (result): "r"(value));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __REV16_1)(
    uint32_t value)
    {
      uint32_t result;
      __asm__ volatile ("rev16 %0, %1": "=r" (result): "r"(value));
      return result;
    }
    
    __inline static int32_t ( __attribute__((__always_inline__)) __REVSH_1)(
    int32_t value)
    {
      int32_t __retres;
      uint32_t result;
      __asm__ volatile ("revsh %0, %1": "=r" (result): "r"(value));
      __retres = (int)result;
      return __retres;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __ROR_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t __retres;
      __retres = (op1 >> op2) | (op1 << ((uint32_t)32 - op2));
      return __retres;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __RBIT_1)(
    uint32_t value)
    {
      uint32_t result;
      __asm__ volatile ("rbit %0, %1": "=r" (result): "r"(value));
      return result;
    }
    
    __inline static uint8_t ( __attribute__((__always_inline__)) __LDREXB_1)(
    uint8_t volatile *addr)
    {
      uint8_t __retres;
      uint32_t result;
      __asm__ volatile ("ldrexb %0, [%1]": "=r" (result): "r"(addr): "memory");
      __retres = (unsigned char)result;
      return __retres;
    }
    
    __inline static uint16_t ( __attribute__((__always_inline__)) __LDREXH_1)(
    uint16_t volatile *addr)
    {
      uint16_t __retres;
      uint32_t result;
      __asm__ volatile ("ldrexh %0, [%1]": "=r" (result): "r"(addr): "memory");
      __retres = (unsigned short)result;
      return __retres;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __LDREXW_1)(
    uint32_t volatile *addr)
    {
      uint32_t result;
      __asm__ volatile ("ldrex %0, %1": "=r" (result): "Q"(*addr));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __STREXB_1)(
    uint8_t value, uint8_t volatile *addr)
    {
      uint32_t result;
      __asm__ volatile ("strexb %0, %2, %1": "=&r" (result), "=Q" (*addr): 
                        "r"(value));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __STREXH_1)(
    uint16_t value, uint16_t volatile *addr)
    {
      uint32_t result;
      __asm__ volatile ("strexh %0, %2, %1": "=&r" (result), "=Q" (*addr): 
                        "r"(value));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __STREXW_1)(
    uint32_t value, uint32_t volatile *addr)
    {
      uint32_t result;
      __asm__ volatile ("strex %0, %2, %1": "=&r" (result), "=Q" (*addr): 
                        "r"(value));
      return result;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __CLREX_1)(
    void)
    {
      __asm__ volatile ("clrex": : : "memory");
      return;
    }
    
    __inline static uint8_t ( __attribute__((__always_inline__)) __CLZ_1)(
    uint32_t value)
    {
      uint8_t __retres;
      uint32_t result;
      __asm__ volatile ("clz %0, %1": "=r" (result): "r"(value));
      __retres = (unsigned char)result;
      return __retres;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __enable_irq_1)(
    void)
    {
      __asm__ volatile ("cpsie i": : : "memory");
      return;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __disable_irq_1)(
    void)
    {
      __asm__ volatile ("cpsid i": : : "memory");
      return;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __get_CONTROL_1)(
    void)
    {
      uint32_t result;
      __asm__ volatile ("MRS %0, control": "=r" (result));
      return result;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __set_CONTROL_1)(
    uint32_t control)
    {
      __asm__ volatile ("MSR control, %0": : "r"(control): "memory");
      return;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __get_IPSR_1)(
    void)
    {
      uint32_t result;
      __asm__ volatile ("MRS %0, ipsr": "=r" (result));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __get_APSR_1)(
    void)
    {
      uint32_t result;
      __asm__ volatile ("MRS %0, apsr": "=r" (result));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __get_xPSR_1)(
    void)
    {
      uint32_t result;
      __asm__ volatile ("MRS %0, xpsr": "=r" (result));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __get_PSP_1)(
    void)
    {
      register uint32_t result;
      __asm__ volatile ("MRS %0, psp\n": "=r" (result));
      return result;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __set_PSP_1)(
    uint32_t topOfProcStack)
    {
      __asm__ volatile ("MSR psp, %0\n": : "r"(topOfProcStack): "sp");
      return;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __get_MSP_1)(
    void)
    {
      register uint32_t result;
      __asm__ volatile ("MRS %0, msp\n": "=r" (result));
      return result;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __set_MSP_1)(
    uint32_t topOfMainStack)
    {
      __asm__ volatile ("MSR msp, %0\n": : "r"(topOfMainStack): "sp");
      return;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __get_PRIMASK_1)(
    void)
    {
      uint32_t result;
      __asm__ volatile ("MRS %0, primask": "=r" (result));
      return result;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __set_PRIMASK_1)(
    uint32_t priMask)
    {
      __asm__ volatile ("MSR primask, %0": : "r"(priMask): "memory");
      return;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __enable_fault_irq_1)(
    void)
    {
      __asm__ volatile ("cpsie f": : : "memory");
      return;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __disable_fault_irq_1)(
    void)
    {
      __asm__ volatile ("cpsid f": : : "memory");
      return;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __get_BASEPRI_1)(
    void)
    {
      uint32_t result;
      __asm__ volatile ("MRS %0, basepri_max": "=r" (result));
      return result;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __set_BASEPRI_1)(
    uint32_t value)
    {
      __asm__ volatile ("MSR basepri, %0": : "r"(value): "memory");
      return;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __get_FAULTMASK_1)(
    void)
    {
      uint32_t result;
      __asm__ volatile ("MRS %0, faultmask": "=r" (result));
      return result;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __set_FAULTMASK_1)(
    uint32_t faultMask)
    {
      __asm__ volatile ("MSR faultmask, %0": : "r"(faultMask): "memory");
      return;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __get_FPSCR_1)(
    void)
    {
      uint32_t result;
      __asm__ volatile ("":);
      __asm__ volatile ("VMRS %0, fpscr": "=r" (result));
      __asm__ volatile ("":);
      return result;
    }
    
    __inline static void ( __attribute__((__always_inline__)) __set_FPSCR_1)(
    uint32_t fpscr)
    {
      __asm__ volatile ("":);
      __asm__ volatile ("VMSR fpscr, %0": : "r"(fpscr): "vfpcc");
      __asm__ volatile ("":);
      return;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SADD8_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("sadd8 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __QADD8_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("qadd8 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SHADD8_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("shadd8 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UADD8_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uadd8 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UQADD8_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uqadd8 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UHADD8_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uhadd8 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SSUB8_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("ssub8 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __QSUB8_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("qsub8 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SHSUB8_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("shsub8 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __USUB8_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("usub8 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UQSUB8_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uqsub8 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UHSUB8_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uhsub8 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SADD16_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("sadd16 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __QADD16_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("qadd16 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SHADD16_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("shadd16 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UADD16_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uadd16 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UQADD16_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uqadd16 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UHADD16_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uhadd16 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SSUB16_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("ssub16 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __QSUB16_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("qsub16 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SHSUB16_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("shsub16 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __USUB16_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("usub16 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UQSUB16_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uqsub16 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UHSUB16_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uhsub16 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SASX_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("sasx %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __QASX_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("qasx %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SHASX_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("shasx %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UASX_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uasx %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UQASX_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uqasx %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UHASX_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uhasx %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SSAX_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("ssax %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __QSAX_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("qsax %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SHSAX_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("shsax %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __USAX_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("usax %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UQSAX_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uqsax %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UHSAX_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uhsax %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __USAD8_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("usad8 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __USADA8_1)(
    uint32_t op1, uint32_t op2, uint32_t op3)
    {
      uint32_t result;
      __asm__ volatile ("usada8 %0, %1, %2, %3": "=r" (result): "r"(op1),
                                                                "r"(op2),
                                                                "r"(op3));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UXTB16_1)(
    uint32_t op1)
    {
      uint32_t result;
      __asm__ volatile ("uxtb16 %0, %1": "=r" (result): "r"(op1));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __UXTAB16_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("uxtab16 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SXTB16_1)(
    uint32_t op1)
    {
      uint32_t result;
      __asm__ volatile ("sxtb16 %0, %1": "=r" (result): "r"(op1));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SXTAB16_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("sxtab16 %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SMUAD_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("smuad %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SMUADX_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("smuadx %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SMLAD_1)(
    uint32_t op1, uint32_t op2, uint32_t op3)
    {
      uint32_t result;
      __asm__ volatile ("smlad %0, %1, %2, %3": "=r" (result): "r"(op1),
                                                               "r"(op2), "r"(op3));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SMLADX_1)(
    uint32_t op1, uint32_t op2, uint32_t op3)
    {
      uint32_t result;
      __asm__ volatile ("smladx %0, %1, %2, %3": "=r" (result): "r"(op1),
                                                                "r"(op2),
                                                                "r"(op3));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SMUSD_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("smusd %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SMUSDX_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("smusdx %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SMLSD_1)(
    uint32_t op1, uint32_t op2, uint32_t op3)
    {
      uint32_t result;
      __asm__ volatile ("smlsd %0, %1, %2, %3": "=r" (result): "r"(op1),
                                                               "r"(op2), "r"(op3));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SMLSDX_1)(
    uint32_t op1, uint32_t op2, uint32_t op3)
    {
      uint32_t result;
      __asm__ volatile ("smlsdx %0, %1, %2, %3": "=r" (result): "r"(op1),
                                                                "r"(op2),
                                                                "r"(op3));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SEL_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("sel %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __QADD_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("qadd %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __QSUB_1)(
    uint32_t op1, uint32_t op2)
    {
      uint32_t result;
      __asm__ volatile ("qsub %0, %1, %2": "=r" (result): "r"(op1), "r"(op2));
      return result;
    }
    
    __inline static uint32_t ( __attribute__((__always_inline__)) __SMMLA_1)(
    int32_t op1, int32_t op2, int32_t op3)
    {
      uint32_t __retres;
      int32_t result;
      __asm__ volatile ("smmla %0, %1, %2, %3": "=r" (result): "r"(op1),
                                                               "r"(op2), "r"(op3));
      __retres = (unsigned int)result;
      return __retres;
    }
    
    __inline static void NVIC_SetPriorityGrouping_1(uint32_t PriorityGroup)
    {
      uint32_t reg_value;
      uint32_t PriorityGroupTmp;
      PriorityGroupTmp = PriorityGroup & (unsigned int)0x07;
      reg_value = ((SCB_Type *)(0xE000E000UL + 0x0D00UL))->AIRCR;
      reg_value = (unsigned int)((unsigned long)reg_value & ~ ((0xFFFFUL << 16) | (
                                                               7UL << 8)));
      reg_value = (reg_value | ((unsigned int)0x5FA << 16)) | (PriorityGroupTmp << 8);
      ((SCB_Type *)(0xE000E000UL + 0x0D00UL))->AIRCR = reg_value;
      return;
    }
    
    __inline static uint32_t NVIC_GetPriorityGrouping_1(void)
    {
      uint32_t __retres;
      __retres = (unsigned int)(((unsigned long)((SCB_Type *)(0xE000E000UL + 0x0D00UL))->AIRCR & (
                                 7UL << 8)) >> 8);
      return __retres;
    }
    
    __inline static void NVIC_EnableIRQ_1(IRQn_Type IRQn)
    {
      ((NVIC_Type *)(0xE000E000UL + 0x0100UL))->ISER[(unsigned int)((int)IRQn) >> 5] = (unsigned int)(
      1 << ((unsigned int)((int)IRQn) & (unsigned int)0x1F));
      return;
    }
    
    __inline static void NVIC_DisableIRQ_1(IRQn_Type IRQn)
    {
      ((NVIC_Type *)(0xE000E000UL + 0x0100UL))->ICER[(unsigned int)IRQn >> 5] = (unsigned int)(
      1 << ((unsigned int)IRQn & (unsigned int)0x1F));
      return;
    }
    
    __inline static uint32_t NVIC_GetPendingIRQ_1(IRQn_Type IRQn)
    {
      uint32_t __retres;
      int tmp;
      if (((NVIC_Type *)(0xE000E000UL + 0x0100UL))->ISPR[(unsigned int)IRQn >> 5] & (unsigned int)(
          1 << ((unsigned int)IRQn & (unsigned int)0x1F))) tmp = 1;
      else tmp = 0;
      __retres = (unsigned int)tmp;
      return __retres;
    }
    
    __inline static void NVIC_SetPendingIRQ_1(IRQn_Type IRQn)
    {
      ((NVIC_Type *)(0xE000E000UL + 0x0100UL))->ISPR[(unsigned int)IRQn >> 5] = (unsigned int)(
      1 << ((unsigned int)IRQn & (unsigned int)0x1F));
      return;
    }
    
    __inline static void NVIC_ClearPendingIRQ_1(IRQn_Type IRQn)
    {
      ((NVIC_Type *)(0xE000E000UL + 0x0100UL))->ICPR[(unsigned int)IRQn >> 5] = (unsigned int)(
      1 << ((unsigned int)IRQn & (unsigned int)0x1F));
      return;
    }
    
    __inline static uint32_t NVIC_GetActive_1(IRQn_Type IRQn)
    {
      uint32_t __retres;
      int tmp;
      if (((NVIC_Type *)(0xE000E000UL + 0x0100UL))->IABR[(unsigned int)IRQn >> 5] & (unsigned int)(
          1 << ((unsigned int)IRQn & (unsigned int)0x1F))) tmp = 1;
      else tmp = 0;
      __retres = (unsigned int)tmp;
      return __retres;
    }
    
    __inline static void NVIC_SetPriority_1(IRQn_Type IRQn, uint32_t priority)
    {
      if (IRQn < 0) ((SCB_Type *)(0xE000E000UL + 0x0D00UL))->SHP[((unsigned int)IRQn & (unsigned int)0xF) - (unsigned int)4] = (unsigned char)(
                    (priority << (8 - 6)) & (unsigned int)0xff);
      else ((NVIC_Type *)(0xE000E000UL + 0x0100UL))->IP[(unsigned int)IRQn] = (unsigned char)(
           (priority << (8 - 6)) & (unsigned int)0xff);
      return;
    }
    
    __inline static uint32_t NVIC_GetPriority_1(IRQn_Type IRQn)
    {
      uint32_t __retres;
      if (IRQn < 0) {
        __retres = (unsigned int)((int)((SCB_Type *)(0xE000E000UL + 0x0D00UL))->SHP[
                                  ((unsigned int)IRQn & (unsigned int)0xF) - (unsigned int)4] >> (
                                  8 - 6));
        goto return_label;
      }
      else {
        __retres = (unsigned int)((int)((NVIC_Type *)(0xE000E000UL + 0x0100UL))->IP[(unsigned int)IRQn] >> (
                                  8 - 6));
        goto return_label;
      }
      return_label: /* internal */ return __retres;
    }
    
    __inline static uint32_t NVIC_EncodePriority_1(uint32_t PriorityGroup,
                                                   uint32_t PreemptPriority,
                                                   uint32_t SubPriority)
    {
      uint32_t __retres;
      uint32_t PriorityGroupTmp;
      uint32_t PreemptPriorityBits;
      uint32_t SubPriorityBits;
      PriorityGroupTmp = PriorityGroup & (unsigned int)0x07;
      if ((uint32_t)7 - PriorityGroupTmp > (uint32_t)6) PreemptPriorityBits = (unsigned int)6;
      else PreemptPriorityBits = (uint32_t)7 - PriorityGroupTmp;
      if (PriorityGroupTmp + (uint32_t)6 < (uint32_t)7) SubPriorityBits = (unsigned int)0;
      else SubPriorityBits = (PriorityGroupTmp - (uint32_t)7) + (uint32_t)6;
      __retres = ((PreemptPriority & (unsigned int)((1 << PreemptPriorityBits) - 1)) << SubPriorityBits) | (
                 SubPriority & (unsigned int)((1 << SubPriorityBits) - 1));
      return __retres;
    }
    
    __inline static void NVIC_DecodePriority_1(uint32_t Priority,
                                               uint32_t PriorityGroup,
                                               uint32_t *pPreemptPriority,
                                               uint32_t *pSubPriority)
    {
      uint32_t PriorityGroupTmp;
      uint32_t PreemptPriorityBits;
      uint32_t SubPriorityBits;
      PriorityGroupTmp = PriorityGroup & (unsigned int)0x07;
      if ((uint32_t)7 - PriorityGroupTmp > (uint32_t)6) PreemptPriorityBits = (unsigned int)6;
      else PreemptPriorityBits = (uint32_t)7 - PriorityGroupTmp;
      if (PriorityGroupTmp + (uint32_t)6 < (uint32_t)7) SubPriorityBits = (unsigned int)0;
      else SubPriorityBits = (PriorityGroupTmp - (uint32_t)7) + (uint32_t)6;
      *pPreemptPriority = (Priority >> SubPriorityBits) & (unsigned int)(
                          (1 << PreemptPriorityBits) - 1);
      *pSubPriority = Priority & (unsigned int)((1 << SubPriorityBits) - 1);
      return;
    }
    
    __inline static void NVIC_SystemReset_1(void)
    {
      __DSB_1();
      ((SCB_Type *)(0xE000E000UL + 0x0D00UL))->AIRCR = (unsigned int)(((unsigned long)(
                                                                       0x5FA << 16) | (
                                                                       (unsigned long)((SCB_Type *)(
                                                                       0xE000E000UL + 0x0D00UL))->AIRCR & (
                                                                       7UL << 8))) | (
                                                                      1UL << 2));
      __DSB_1();
      while (1) ;
      return;
    }
    
    __inline static uint32_t SysTick_Config_1(uint32_t ticks_0)
    {
      uint32_t __retres;
      if ((unsigned long)(ticks_0 - (uint32_t)1) > 0xFFFFFFUL << 0) {
        __retres = (unsigned int)1;
        goto return_label;
      }
      ((SysTick_Type *)(0xE000E000UL + 0x0010UL))->LOAD = ticks_0 - (uint32_t)1;
      NVIC_SetPriority_1(SysTick_IRQn,(unsigned int)((1 << 6) - 1));
      ((SysTick_Type *)(0xE000E000UL + 0x0010UL))->VAL = (unsigned int)0;
      ((SysTick_Type *)(0xE000E000UL + 0x0010UL))->CTRL = (unsigned int)(
      ((1UL << 2) | (1UL << 1)) | (1UL << 0));
      __retres = (unsigned int)0;
      return_label: /* internal */ return __retres;
    }
    
    __inline static uint32_t ITM_SendChar_1(uint32_t ch)
    {
      if ((unsigned long)((ITM_Type *)0xE0000000UL)->TCR & (1UL << 0)) 
        if ((unsigned long)((ITM_Type *)0xE0000000UL)->TER & (1UL << 0)) {
          while (((ITM_Type *)0xE0000000UL)->PORT[0].u32 == (uint32_t)0) ;
          ((ITM_Type *)0xE0000000UL)->PORT[0].u8 = (unsigned char)ch;
        }
      return ch;
    }
    
    __inline static int32_t ITM_ReceiveChar_1(void)
    {
      int32_t ch;
      ch = -1;
      if (ITM_RxBuffer != 0x5AA55AA5) {
        ch = ITM_RxBuffer;
        ITM_RxBuffer = 0x5AA55AA5;
      }
      return ch;
    }
    
    __inline static int32_t ITM_CheckChar_1(void)
    {
      int32_t __retres;
      if (ITM_RxBuffer == 0x5AA55AA5) {
        __retres = 0;
        goto return_label;
      }
      else {
        __retres = 1;
        goto return_label;
      }
      return_label: /* internal */ return __retres;
    }
    
    uint32_t SystemCoreClock = (unsigned int)120000000;
    static int SystemClockSetup(void);
    
    void SystemInit(void)
    {
      int temp;
      ((SCB_Type *)(0xE000E000UL + 0x0D00UL))->CPACR = (unsigned int)((unsigned long)((SCB_Type *)(
                                                                      0xE000E000UL + 0x0D00UL))->CPACR | (
                                                                      (3UL << 
                                                                       10 * 2) | (
                                                                      3UL << 
                                                                      11 * 2)));
      ((SCB_Type *)(0xE000E000UL + 0x0D00UL))->CCR = (unsigned int)((unsigned long)((SCB_Type *)(
                                                                    0xE000E000UL + 0x0D00UL))->CCR & ~ (
                                                                    1UL << 3));
      ((WDT_GLOBAL_TypeDef *)0x50008000UL)->CTR &= (unsigned int)(~ 0x00000001);
      temp = (int)((FLASH0_GLOBAL_TypeDef *)0x58001000UL)->FCON;
      temp = (int)((unsigned long)temp & ~ (0x0fUL << 0));
      temp |= 0x00000000 + 3;
      ((FLASH0_GLOBAL_TypeDef *)0x58001000UL)->FCON = (unsigned int)temp;
      SystemClockSetup();
      SystemCoreClockUpdate();
      return;
    }
    
    void SystemCoreClockUpdate(void)
    {
      unsigned int PDIV;
      unsigned int NDIV;
      unsigned int K2DIV;
      unsigned long VCO;
      if (((SCU_CLK_TypeDef *)0x50004600UL)->SYSCLKCR == (uint32_t)0x00010000) {
        if ((unsigned long)((SCU_PLL_TypeDef *)0x50004710UL)->PLLSTAT & (
            0x01UL << 2)) {
          PDIV = (unsigned int)((((unsigned long)((SCU_PLL_TypeDef *)0x50004710UL)->PLLCON1 & (
                                  0x0fUL << 24)) >> 24) + (unsigned long)1);
          NDIV = (unsigned int)((((unsigned long)((SCU_PLL_TypeDef *)0x50004710UL)->PLLCON1 & (
                                  0x7fUL << 8)) >> 8) + (unsigned long)1);
          K2DIV = (unsigned int)((((unsigned long)((SCU_PLL_TypeDef *)0x50004710UL)->PLLCON1 & (
                                   0x7fUL << 16)) >> 16) + (unsigned long)1);
          if ((unsigned long)((SCU_PLL_TypeDef *)0x50004710UL)->PLLCON2 & (
              0x01UL << 0)) {
            VCO = (unsigned long)(((unsigned int)24000000 / PDIV) * NDIV);
            SystemCoreClock = (unsigned int)(VCO / (unsigned long)K2DIV);
            SystemCoreClock = (unsigned int)((unsigned long)SystemCoreClock / (
                                             ((unsigned long)((SCU_CLK_TypeDef *)0x50004600UL)->SYSCLKCR & (
                                              0x000000ffUL << 0)) + (unsigned long)1));
          }
          else {
            VCO = (unsigned long)(((unsigned int)12000000 / PDIV) * NDIV);
            SystemCoreClock = (unsigned int)(VCO / (unsigned long)K2DIV);
            SystemCoreClock = (unsigned int)((unsigned long)SystemCoreClock / (
                                             ((unsigned long)((SCU_CLK_TypeDef *)0x50004600UL)->SYSCLKCR & (
                                              0x000000ffUL << 0)) + (unsigned long)1));
          }
        }
      }
      else SystemCoreClock = (unsigned int)24000000;
      return;
    }
    
    static int SystemClockSetup(void)
    {
      int __retres;
      int temp;
      unsigned long VCO;
      int stepping_K2DIV;
      uint32_t tmp;
      tmp = AllowPLLInitByStartup();
      if (tmp) {
        if (((unsigned long)((SCU_PLL_TypeDef *)0x50004710UL)->PLLCON0 & (
             (0x01UL << 1) | (0x01UL << 16))) != (unsigned long)0) ((SCU_PLL_TypeDef *)0x50004710UL)->PLLCON0 = (unsigned int)(
                                                                   (unsigned long)((SCU_PLL_TypeDef *)0x50004710UL)->PLLCON0 & ~ (
                                                                   (0x01UL << 1) | (
                                                                   0x01UL << 16)));
        if (1 == 1) {
          if ((unsigned long)((SCU_OSC_TypeDef *)0x50004700UL)->OSCHPCTRL & (
              0x03UL << 4)) {
            ((SCU_OSC_TypeDef *)0x50004700UL)->OSCHPCTRL &= (unsigned int)(~ 0xF0);
            ((SCU_OSC_TypeDef *)0x50004700UL)->OSCHPCTRL |= (unsigned int)(
            2 << 16);
            ((SCU_PLL_TypeDef *)0x50004710UL)->PLLCON2 = (unsigned int)((unsigned long)((SCU_PLL_TypeDef *)0x50004710UL)->PLLCON2 & ~ (
                                                                        0x01UL << 0));
            ((SCU_PLL_TypeDef *)0x50004710UL)->PLLCON0 = (unsigned int)((unsigned long)((SCU_PLL_TypeDef *)0x50004710UL)->PLLCON0 & ~ (
                                                                        0x01UL << 17));
            ((SysTick_Type *)(0xE000E000UL + 0x0010UL))->LOAD = (unsigned int)(
            ((unsigned long)(5000000 + 100) & (0xFFFFFFUL << 0)) - (unsigned long)1);
            ((SysTick_Type *)(0xE000E000UL + 0x0010UL))->VAL = (unsigned int)0;
            ((SysTick_Type *)(0xE000E000UL + 0x0010UL))->CTRL = (unsigned int)(
            (1UL << 2) | (1UL << 0));
            while (1) 
              if (((unsigned long)((SCU_PLL_TypeDef *)0x50004710UL)->PLLSTAT & (
                   ((0x01UL << 8) | (0x01UL << 7)) | (0x01UL << 9))) != (unsigned long)0x380) {
                if (! (((SysTick_Type *)(0xE000E000UL + 0x0010UL))->VAL >= (uint32_t)500)) 
                  break;
              }
              else break;
            ((SysTick_Type *)(0xE000E000UL + 0x0010UL))->CTRL = (unsigned int)(
            (unsigned long)((SysTick_Type *)(0xE000E000UL + 0x0010UL))->CTRL & ~ (
            1UL << 0));
            if (((unsigned long)((SCU_PLL_TypeDef *)0x50004710UL)->PLLSTAT & (
                 ((0x01UL << 8) | (0x01UL << 7)) | (0x01UL << 9))) != (unsigned long)0x380) {
              __retres = 0;
              goto return_label;
            }
          }
        }
        else 
          if (1 == 2) ((SCU_PLL_TypeDef *)0x50004710UL)->PLLCON2 = (unsigned int)(
                      (unsigned long)((SCU_PLL_TypeDef *)0x50004710UL)->PLLCON2 | (
                      0x01UL << 0));
          else 
            if (1 == 3) {
              if (((unsigned long)((SCU_POWER_TypeDef *)0x50004200UL)->PWRSTAT & (
                   0x01UL << 0)) == (unsigned long)0) ((SCU_POWER_TypeDef *)0x50004200UL)->PWRSET = (unsigned int)(
                                                      (unsigned long)((SCU_POWER_TypeDef *)0x50004200UL)->PWRSET | (
                                                      0x01UL << 0));
              if (((unsigned long)((SCU_RESET_TypeDef *)0x50004400UL)->RSTSTAT & (
                   0x01UL << 9)) == (unsigned long)1) ((SCU_RESET_TypeDef *)0x50004400UL)->RSTCLR = (unsigned int)(
                                                      (unsigned long)((SCU_RESET_TypeDef *)0x50004400UL)->RSTCLR | (
                                                      0x01UL << 9));
              ((SCU_PLL_TypeDef *)0x50004710UL)->PLLCON2 = (unsigned int)(
              (unsigned long)((SCU_PLL_TypeDef *)0x50004710UL)->PLLCON2 | (
              0x01UL << 0));
              if (2 == 1) {
                ((SCU_HIBERNATE_TypeDef *)0x50004300UL)->HDCR = (unsigned int)(
                (unsigned long)((SCU_HIBERNATE_TypeDef *)0x50004300UL)->HDCR & ~ (
                0x01UL << 7));
                ((SCU_PLL_TypeDef *)0x50004710UL)->PLLCON0 = (unsigned int)(
                (unsigned long)((SCU_PLL_TypeDef *)0x50004710UL)->PLLCON0 & ~ (
                0x01UL << 20));
                temp = 0;
                while (temp <= 0xFFFF) temp ++;
                ((SCU_PLL_TypeDef *)0x50004710UL)->PLLCON0 = (unsigned int)(
                (unsigned long)((SCU_PLL_TypeDef *)0x50004710UL)->PLLCON0 | (
                0x01UL << 19));
              }
              else 
                if (2 == 2) {
                  if (((unsigned long)((SCU_HIBERNATE_TypeDef *)0x50004300UL)->OSCULCTRL & (
                       0x03UL << 4)) != (unsigned long)0) {
                    while ((unsigned long)((SCU_GENERAL_TypeDef *)0x50004000UL)->MIRRSTS & (
                           0x01UL << 7)) ;
                    ((SCU_HIBERNATE_TypeDef *)0x50004300UL)->OSCULCTRL = (unsigned int)(
                    (unsigned long)((SCU_HIBERNATE_TypeDef *)0x50004300UL)->OSCULCTRL & ~ (
                    0x03UL << 4));
                    ((SCU_HIBERNATE_TypeDef *)0x50004300UL)->HDCR = (unsigned int)(
                    (unsigned long)((SCU_HIBERNATE_TypeDef *)0x50004300UL)->HDCR | (
                    0x01UL << 6));
                    while ((unsigned long)((SCU_GENERAL_TypeDef *)0x50004000UL)->MIRRSTS & (
                           0x01UL << 3)) ;
                    ((SCU_HIBERNATE_TypeDef *)0x50004300UL)->HDCR = (unsigned int)(
                    (unsigned long)((SCU_HIBERNATE_TypeDef *)0x50004300UL)->HDCR | (
                    0x01UL << 3));
                    while ((unsigned long)((SCU_GENERAL_TypeDef *)0x50004000UL)->MIRRSTS & (
                           0x01UL << 3)) ;
                    while (1) {
                      ((SCU_HIBERNATE_TypeDef *)0x50004300UL)->HDCLR = (unsigned int)(
                      (unsigned long)((SCU_HIBERNATE_TypeDef *)0x50004300UL)->HDCLR | (
                      0x01UL << 3));
                      while ((unsigned long)((SCU_GENERAL_TypeDef *)0x50004000UL)->MIRRSTS & (
                             0x01UL << 1)) ;
                      temp = 0;
                      while (temp <= 0xFFFF) temp ++;
                      if (! (((unsigned long)((SCU_HIBERNATE_TypeDef *)0x50004300UL)->HDSTAT & (
                              0x01UL << 3)) == 0x01UL << 3)) break;
                    }
                    ((SCU_HIBERNATE_TypeDef *)0x50004300UL)->HDCLR = (unsigned int)(
                    (unsigned long)((SCU_HIBERNATE_TypeDef *)0x50004300UL)->HDCLR | (
                    0x01UL << 3));
                    while ((unsigned long)((SCU_GENERAL_TypeDef *)0x50004000UL)->MIRRSTS & (
                           0x01UL << 1)) ;
                  }
                  ((SCU_HIBERNATE_TypeDef *)0x50004300UL)->HDCR = (unsigned int)(
                  (unsigned long)((SCU_HIBERNATE_TypeDef *)0x50004300UL)->HDCR | (
                  0x01UL << 7));
                  while ((unsigned long)((SCU_GENERAL_TypeDef *)0x50004000UL)->MIRRSTS & (
                         0x01UL << 3)) ;
                  ((SCU_PLL_TypeDef *)0x50004710UL)->PLLCON0 = (unsigned int)(
                  (unsigned long)((SCU_PLL_TypeDef *)0x50004710UL)->PLLCON0 & ~ (
                  0x01UL << 20));
                  temp = 0;
                  while (temp <= 0xFFFF) temp ++;
                  ((SCU_PLL_TypeDef *)0x50004710UL)->PLLCON0 = (unsigned int)(
                  (unsigned long)((SCU_PLL_TypeDef *)0x50004710UL)->PLLCON0 | (
                  0x01UL << 19));
                  temp = 0;
                  while (temp <= 0xFFFF) temp ++;
                }
            }
        if (! ((unsigned long)((SCU_PLL_TypeDef *)0x50004710UL)->PLLSTAT & (
               0x01UL << 2))) {
          if (((unsigned long)((SCU_CLK_TypeDef *)0x50004600UL)->SYSCLKCR & (
               0x01UL << 16)) != (unsigned long)0x0) ((SCU_CLK_TypeDef *)0x50004600UL)->SYSCLKCR = (unsigned int)(
                                                     (unsigned long)((SCU_CLK_TypeDef *)0x50004600UL)->SYSCLKCR & ~ (
                                                     0x01UL << 16));
          if (1 == 1) VCO = (unsigned long)((12000000 / (1 + 1)) * (79 + 1));
          if (1 == 3) VCO = (unsigned long)((24000000 / (1 + 1)) * (79 + 1));
          else 
            if (1 == 2) VCO = (unsigned long)((24000000 / (1 + 1)) * (79 + 1));
          stepping_K2DIV = (int)(VCO / (unsigned long)24000000 - (unsigned long)1);
          ((SCU_PLL_TypeDef *)0x50004710UL)->PLLCON0 = (unsigned int)((unsigned long)((SCU_PLL_TypeDef *)0x50004710UL)->PLLCON0 | (
                                                                      0x01UL << 0));
          ((SCU_PLL_TypeDef *)0x50004710UL)->PLLCON0 = (unsigned int)((unsigned long)((SCU_PLL_TypeDef *)0x50004710UL)->PLLCON0 | (
                                                                      0x01UL << 4));
          ((SCU_PLL_TypeDef *)0x50004710UL)->PLLCON1 = (unsigned int)(((1 | (
                                                                        79 << 8)) | (
                                                                       stepping_K2DIV << 16)) | (
                                                                      1 << 24));
          ((SCU_PLL_TypeDef *)0x50004710UL)->PLLCON0 = (unsigned int)((unsigned long)((SCU_PLL_TypeDef *)0x50004710UL)->PLLCON0 | (
                                                                      0x01UL << 6));
          ((SCU_PLL_TypeDef *)0x50004710UL)->PLLCON0 = (unsigned int)((unsigned long)((SCU_PLL_TypeDef *)0x50004710UL)->PLLCON0 & ~ (
                                                                      0x01UL << 4));
          ((SCU_PLL_TypeDef *)0x50004710UL)->PLLCON0 = (unsigned int)((unsigned long)((SCU_PLL_TypeDef *)0x50004710UL)->PLLCON0 | (
                                                                      0x01UL << 18));
          ((SysTick_Type *)(0xE000E000UL + 0x0010UL))->LOAD = (unsigned int)(
          ((unsigned long)(5000000 + 100) & (0xFFFFFFUL << 0)) - (unsigned long)1);
          ((SysTick_Type *)(0xE000E000UL + 0x0010UL))->VAL = (unsigned int)0;
          ((SysTick_Type *)(0xE000E000UL + 0x0010UL))->CTRL = (unsigned int)(
          (1UL << 2) | (1UL << 0));
          while (1) 
            if (! ((unsigned long)((SCU_PLL_TypeDef *)0x50004710UL)->PLLSTAT & (
                   0x01UL << 2))) {
              if (! (((SysTick_Type *)(0xE000E000UL + 0x0010UL))->VAL >= (uint32_t)500)) 
                break;
            }
            else break;
          ((SysTick_Type *)(0xE000E000UL + 0x0010UL))->CTRL = (unsigned int)(
          (unsigned long)((SysTick_Type *)(0xE000E000UL + 0x0010UL))->CTRL & ~ (
          1UL << 0));
          if (((unsigned long)((SCU_PLL_TypeDef *)0x50004710UL)->PLLSTAT & (
               0x01UL << 2)) == 0x01UL << 2) ((SCU_PLL_TypeDef *)0x50004710UL)->PLLCON0 = (unsigned int)(
                                             (unsigned long)((SCU_PLL_TypeDef *)0x50004710UL)->PLLCON0 & ~ (
                                             0x01UL << 0));
          else {
            __retres = 0;
            goto return_label;
          }
          ((SCU_CLK_TypeDef *)0x50004600UL)->CPUCLKCR = (unsigned int)0x00000000;
          ((SCU_CLK_TypeDef *)0x50004600UL)->PBCLKCR = (unsigned int)0x00000000;
          ((SCU_CLK_TypeDef *)0x50004600UL)->CCUCLKCR = (unsigned int)0x00000000;
          ((SCU_CLK_TypeDef *)0x50004600UL)->SYSCLKCR |= (unsigned int)0x00010000;
          ((SCU_PLL_TypeDef *)0x50004710UL)->PLLCON0 = (unsigned int)((unsigned long)((SCU_PLL_TypeDef *)0x50004710UL)->PLLCON0 & ~ (
                                                                      0x01UL << 6));
          ((SysTick_Type *)(0xE000E000UL + 0x0010UL))->LOAD = (unsigned int)(
          ((unsigned long)(1250 + 100) & (0xFFFFFFUL << 0)) - (unsigned long)1);
          ((SysTick_Type *)(0xE000E000UL + 0x0010UL))->VAL = (unsigned int)0;
          ((SysTick_Type *)(0xE000E000UL + 0x0010UL))->CTRL = (unsigned int)(
          (1UL << 2) | (1UL << 0));
          while (((SysTick_Type *)(0xE000E000UL + 0x0010UL))->VAL >= (uint32_t)100) ;
          ((SysTick_Type *)(0xE000E000UL + 0x0010UL))->CTRL = (unsigned int)(
          (unsigned long)((SysTick_Type *)(0xE000E000UL + 0x0010UL))->CTRL & ~ (
          1UL << 0));
          if (120000000 > 60000000) {
            if (1 == 1) VCO = (unsigned long)((12000000 / (1 + 1)) * (79 + 1));
            if (1 == 3) VCO = (unsigned long)((24000000 / (1 + 1)) * (79 + 1));
            else 
              if (1 == 2) VCO = (unsigned long)((24000000 / (1 + 1)) * (79 + 1));
            stepping_K2DIV = (int)(VCO / (unsigned long)60000000 - (unsigned long)1);
            ((SCU_PLL_TypeDef *)0x50004710UL)->PLLCON1 = (unsigned int)((
                                                                        (
                                                                        1 | (
                                                                        79 << 8)) | (
                                                                        stepping_K2DIV << 16)) | (
                                                                        1 << 24));
          }
          else {
            ((SCU_PLL_TypeDef *)0x50004710UL)->PLLCON1 = (unsigned int)((
                                                                        (
                                                                        1 | (
                                                                        79 << 8)) | (
                                                                        3 << 16)) | (
                                                                        1 << 24));
            ((SCU_TRAP_TypeDef *)0x50004160UL)->TRAPCLR = (unsigned int)(
            (0x01UL << 0) | (0x01UL << 2));
            __retres = 1;
            goto return_label;
          }
          ((SysTick_Type *)(0xE000E000UL + 0x0010UL))->LOAD = (unsigned int)(
          ((unsigned long)(3000 + 100) & (0xFFFFFFUL << 0)) - (unsigned long)1);
          ((SysTick_Type *)(0xE000E000UL + 0x0010UL))->VAL = (unsigned int)0;
          ((SysTick_Type *)(0xE000E000UL + 0x0010UL))->CTRL = (unsigned int)(
          (1UL << 2) | (1UL << 0));
          while (((SysTick_Type *)(0xE000E000UL + 0x0010UL))->VAL >= (uint32_t)100) ;
          ((SysTick_Type *)(0xE000E000UL + 0x0010UL))->CTRL = (unsigned int)(
          (unsigned long)((SysTick_Type *)(0xE000E000UL + 0x0010UL))->CTRL & ~ (
          1UL << 0));
          if (120000000 > 90000000) {
            if (1 == 1) VCO = (unsigned long)((12000000 / (1 + 1)) * (79 + 1));
            if (1 == 3) VCO = (unsigned long)((24000000 / (1 + 1)) * (79 + 1));
            else 
              if (1 == 2) VCO = (unsigned long)((24000000 / (1 + 1)) * (79 + 1));
            stepping_K2DIV = (int)(VCO / (unsigned long)90000000 - (unsigned long)1);
            ((SCU_PLL_TypeDef *)0x50004710UL)->PLLCON1 = (unsigned int)((
                                                                        (
                                                                        1 | (
                                                                        79 << 8)) | (
                                                                        stepping_K2DIV << 16)) | (
                                                                        1 << 24));
          }
          else {
            ((SCU_PLL_TypeDef *)0x50004710UL)->PLLCON1 = (unsigned int)((
                                                                        (
                                                                        1 | (
                                                                        79 << 8)) | (
                                                                        3 << 16)) | (
                                                                        1 << 24));
            ((SCU_TRAP_TypeDef *)0x50004160UL)->TRAPCLR = (unsigned int)(
            (0x01UL << 0) | (0x01UL << 2));
            __retres = 1;
            goto return_label;
          }
          ((SysTick_Type *)(0xE000E000UL + 0x0010UL))->LOAD = (unsigned int)(
          ((unsigned long)(4800 + 100) & (0xFFFFFFUL << 0)) - (unsigned long)1);
          ((SysTick_Type *)(0xE000E000UL + 0x0010UL))->VAL = (unsigned int)0;
          ((SysTick_Type *)(0xE000E000UL + 0x0010UL))->CTRL = (unsigned int)(
          (1UL << 2) | (1UL << 0));
          while (((SysTick_Type *)(0xE000E000UL + 0x0010UL))->VAL >= (uint32_t)100) ;
          ((SysTick_Type *)(0xE000E000UL + 0x0010UL))->CTRL = (unsigned int)(
          (unsigned long)((SysTick_Type *)(0xE000E000UL + 0x0010UL))->CTRL & ~ (
          1UL << 0));
          ((SCU_PLL_TypeDef *)0x50004710UL)->PLLCON1 = (unsigned int)(((1 | (
                                                                        79 << 8)) | (
                                                                       3 << 16)) | (
                                                                      1 << 24));
          ((SCU_TRAP_TypeDef *)0x50004160UL)->TRAPCLR = (unsigned int)((0x01UL << 0) | (
                                                                       0x01UL << 2));
        }
      }
      __retres = 1;
      return_label: /* internal */ return __retres;
    }
    
    
    
    ? file icon preprocessed.i (117,444 bytes) 2014-01-28 11:04 +

-Relationships
+Relationships

-Notes

~0004449

ThomasJ (reporter)

Last edited: 2014-01-28 10:33

View 2 revisions

Using gcc for preprocessing didn't fix the problem:

frama-c -e-acsl -cpp-command 'gcc -C -E -DUC_ID=4503 -Wall -std=gnu99 -fmessage-length=0 -g3 -gdwarf-2 -I. -IXMC4500' Blinky.c LED.c System_XMC4500.c -then-on e-acsl -print -ocode monitored_arm.c

~0004450

signoles (manager)

I guess the bug is not preprocessor-dependent. Unfortunately I cannot reproduce your issue because some system files are missing.

Could you please provide me a single already-preprocessed .i file? One way to generate such a file is to run:

$ frama-c -cpp-command="your_preprocessor_flags" your_c_files -print -ocode preprocessed.i

~0004451

ThomasJ (reporter)

Thanks for the quick response, preprocessed file uploaded. It's quite big for a simple "blink LED" program because of the ARM system functions...

~0004452

signoles (manager)

Last edited: 2014-01-28 11:26

View 2 revisions

Fixed in the dev version. Here is a small patch you can apply against pre_analysis.ml of E-ACSL v0.3:

693c693,694
< | UnOp _ | Const _ | SizeOf _ | SizeOfE _ | SizeOfStr _ | AlignOf _
---
> | Const _ -> (* possible in case of static address *) false
> | UnOp _ | SizeOf _ | SizeOfE _ | SizeOfStr _ | AlignOf _

~0004953

signoles (manager)

Fixed in E-ACSL 0.4
+Notes

-Issue History
Date Modified Username Field Change
2014-01-27 15:21 ThomasJ New Issue
2014-01-27 15:21 ThomasJ Status new => assigned
2014-01-27 15:21 ThomasJ Assigned To => signoles
2014-01-27 15:21 ThomasJ File Added: Blinky_ARM.zip
2014-01-28 10:33 ThomasJ Note Added: 0004449
2014-01-28 10:33 ThomasJ Note Edited: 0004449 View Revisions
2014-01-28 10:44 signoles Note Added: 0004450
2014-01-28 10:44 signoles Status assigned => feedback
2014-01-28 11:04 ThomasJ File Added: preprocessed.i
2014-01-28 11:06 ThomasJ Note Added: 0004451
2014-01-28 11:06 ThomasJ Status feedback => assigned
2014-01-28 11:24 signoles Note Added: 0004452
2014-01-28 11:24 signoles Status assigned => resolved
2014-01-28 11:24 signoles Resolution open => fixed
2014-01-28 11:26 signoles Note Edited: 0004452 View Revisions
2014-03-13 15:58 signoles Note Added: 0004953
2014-03-13 15:58 signoles Status resolved => closed
2014-03-13 15:58 signoles Fixed in Version => Frama-C Neon-20140301
2014-03-25 14:17 signoles Source_changeset_attached => e-acsl stable/neon 18540e4b
+Issue History