///////////////////////////////////////////////////////////////////////////////
//                                                                            /
// IAR 8051 C/C++ Compiler V7.30B/W32                   19/May/2010  09:38:53 /
// Copyright 2004-2007 IAR Systems. All rights reserved.                      /
//                                                                            /
//    Core               =  plain                                             /
//    Code model         =  banked                                            /
//    Data model         =  large                                             /
//    Calling convention =  xdata reentrant                                   /
//    Constant location  =  data                                              /
//    Dptr setup         =  1,16                                              /
//    Source file        =  C:\Texas Instruments\ZStack-1.4.3-1.2.1\Component /
//                          s\hal\common\hal_assert.c                         /
//    Command line       =  -f "C:\Texas Instruments\ZStack-1.4.3-1.2.1\Proje /
//                          cts\zstack\Samples\Location\CC2430DB\..\..\..\Too /
//                          ls\CC2430DB\f8wCoord.cfg" (-DCPU32MHZ             /
//                          -DFORCE_MAC_NEAR -DROOT=__near_func               /
//                          -DMAC_CFG_APP_PENDING_QUEUE=TRUE                  /
//                          -DZDO_COORDINATOR -DRTR_NWK -DBLINK_LEDS          /
//                          "-DCONST=const __code" -DGENERIC=__generic) -f    /
//                          "C:\Texas Instruments\ZStack-1.4.3-1.2.1\Projects /
//                          \zstack\Samples\Location\CC2430DB\..\..\..\Tools\ /
//                          CC2430DB\f8wConfig.cfg" (-DSECURE=1               /
//                          -DDEFAULT_CHANLIST=0x04000000                     /
//                          -DZDAPP_CONFIG_PAN_ID=0x00FF                      /
//                          -DNWK_START_DELAY=100 -DEXTENDED_JOINING_RANDOM_M /
//                          ASK=0x007F -DBEACON_REQUEST_DELAY=100             /
//                          -DBEACON_REQ_DELAY_MASK=0x00FF                    /
//                          -DROUTE_EXPIRY_TIME=30 -DAPSC_ACK_WAIT_DURATION_P /
//                          OLLED=3000 -DNWK_INDIRECT_MSG_TIMEOUT=7           /
//                          -DMAX_RREQ_ENTRIES=10 -DAPSC_MAX_FRAME_RETRIES=3  /
//                          -DNWK_MAX_DATA_RETRIES=2                          /
//                          -DMAX_POLL_FAILURE_RETRIES=2 -DMAX_BCAST=9        /
//                          -DAPS_MAX_GROUPS=16 -DMAX_RTG_ENTRIES=20          /
//                          -DNWK_MAX_BINDING_ENTRIES=10                      /
//                          -DMAX_BINDING_CLUSTER_IDS=5                       /
//                          "-DDEFAULT_KEY={0x02, 0x03, 0x05, 0x07, 0x09,     /
//                          0x0B, 0x0D, 0x0F, 0x00, 0x02, 0x04, 0x06, 0x08,   /
//                          0x0A, 0x0C, 0x0D}" -DRFD_RCVC_ALWAYS_ON=FALSE     /
//                          -DPOLL_RATE=1000 -DQUEUED_POLL_RATE=100           /
//                          -DRESPONSE_POLL_RATE=100) -DREJOIN_POLL_RATE=440  /
//                          "C:\Texas Instruments\ZStack-1.4.3-1.2.1\Componen /
//                          ts\hal\common\hal_assert.c" -D CC2430EB -D        /
//                          ZTOOL_P1 -D LOCATION_DONGLE -D MT_TASK -D         /
//                          xNV_RESTORE -D INT_HEAP_LEN=4608 -D               /
//                          HAL_UART_BIG_TX_BUF=1 -D                          /
//                          SPI_MGR_DEFAULT_MAX_TX_BUFF=1024 -D               /
//                          SPI_MGR_DEFAULT_OVERFLOW=1 -lC "C:\Texas          /
//                          Instruments\ZStack-1.4.3-1.2.1\Projects\zstack\Sa /
//                          mples\Location\CC2430DB\LocDongle\List\" -lA      /
//                          "C:\Texas Instruments\ZStack-1.4.3-1.2.1\Projects /
//                          \zstack\Samples\Location\CC2430DB\LocDongle\List\ /
//                          " --diag_suppress Pe001,Pa010 --diag_remark       /
//                          pe550 -o "C:\Texas Instruments\ZStack-1.4.3-1.2.1 /
//                          \Projects\zstack\Samples\Location\CC2430DB\LocDon /
//                          gle\Obj\" -e --require_prototypes -z9             /
//                          --no_code_motion --debug --core=plain             /
//                          --dptr=16,1 --data_model=large                    /
//                          --code_model=banked --calling_convention=xdata_re /
//                          entrant --place_constants=data --nr_virtual_regs  /
//                          8 -I "C:\Texas Instruments\ZStack-1.4.3-1.2.1\Pro /
//                          jects\zstack\Samples\Location\CC2430DB\" -I       /
//                          "C:\Texas Instruments\ZStack-1.4.3-1.2.1\Projects /
//                          \zstack\Samples\Location\CC2430DB\..\SOURCE\" -I  /
//                          "C:\Texas Instruments\ZStack-1.4.3-1.2.1\Projects /
//                          \zstack\Samples\Location\CC2430DB\..\..\..\ZMAIN\ /
//                          TI2430DB\" -I "C:\Texas                           /
//                          Instruments\ZStack-1.4.3-1.2.1\Projects\zstack\Sa /
//                          mples\Location\CC2430DB\..\..\..\..\WXL\INCLUDE\" /
//                           -I "C:\Texas Instruments\ZStack-1.4.3-1.2.1\Proj /
//                          ects\zstack\Samples\Location\CC2430DB\..\..\..\.. /
//                          \..\COMPONENTS\MT\" -I "C:\Texas                  /
//                          Instruments\ZStack-1.4.3-1.2.1\Projects\zstack\Sa /
//                          mples\Location\CC2430DB\..\..\..\..\..\COMPONENTS /
//                          \HAL\INCLUDE\" -I "C:\Texas                       /
//                          Instruments\ZStack-1.4.3-1.2.1\Projects\zstack\Sa /
//                          mples\Location\CC2430DB\..\..\..\..\..\COMPONENTS /
//                          \HAL\TARGET\CC2430EB\" -I "C:\Texas               /
//                          Instruments\ZStack-1.4.3-1.2.1\Projects\zstack\Sa /
//                          mples\Location\CC2430DB\..\..\..\..\..\COMPONENTS /
//                          \OSAL\MCU\CCSOC\" -I "C:\Texas                    /
//                          Instruments\ZStack-1.4.3-1.2.1\Projects\zstack\Sa /
//                          mples\Location\CC2430DB\..\..\..\..\..\COMPONENTS /
//                          \OSAL\INCLUDE\" -I "C:\Texas                      /
//                          Instruments\ZStack-1.4.3-1.2.1\Projects\zstack\Sa /
//                          mples\Location\CC2430DB\..\..\..\..\..\COMPONENTS /
//                          \STACK\AF\" -I "C:\Texas                          /
//                          Instruments\ZStack-1.4.3-1.2.1\Projects\zstack\Sa /
//                          mples\Location\CC2430DB\..\..\..\..\..\COMPONENTS /
//                          \STACK\NWK\" -I "C:\Texas                         /
//                          Instruments\ZStack-1.4.3-1.2.1\Projects\zstack\Sa /
//                          mples\Location\CC2430DB\..\..\..\..\..\COMPONENTS /
//                          \STACK\SEC\" -I "C:\Texas                         /
//                          Instruments\ZStack-1.4.3-1.2.1\Projects\zstack\Sa /
//                          mples\Location\CC2430DB\..\..\..\..\..\COMPONENTS /
//                          \STACK\SYS\" -I "C:\Texas                         /
//                          Instruments\ZStack-1.4.3-1.2.1\Projects\zstack\Sa /
//                          mples\Location\CC2430DB\..\..\..\..\..\COMPONENTS /
//                          \STACK\ZDO\" -I "C:\Texas                         /
//                          Instruments\ZStack-1.4.3-1.2.1\Projects\zstack\Sa /
//                          mples\Location\CC2430DB\..\..\..\..\..\COMPONENTS /
//                          \ZMAC\F8W\" -I "C:\Texas                          /
//                          Instruments\ZStack-1.4.3-1.2.1\Projects\zstack\Sa /
//                          mples\Location\CC2430DB\..\..\..\..\..\COMPONENTS /
//                          \ZMAC\" -I "C:\Texas Instruments\ZStack-1.4.3-1.2 /
//                          .1\Projects\zstack\Samples\Location\CC2430DB\..\. /
//                          .\..\..\..\COMPONENTS\SERVICES\SADDR\" -I         /
//                          "C:\Texas Instruments\ZStack-1.4.3-1.2.1\Projects /
//                          \zstack\Samples\Location\CC2430DB\..\..\..\..\..\ /
//                          COMPONENTS\SERVICES\SDATA\" -I "C:\Texas          /
//                          Instruments\ZStack-1.4.3-1.2.1\Projects\zstack\Sa /
//                          mples\Location\CC2430DB\..\..\..\..\..\COMPONENTS /
//                          \MAC\INCLUDE\" -I "C:\Texas                       /
//                          Instruments\ZStack-1.4.3-1.2.1\Projects\zstack\Sa /
//                          mples\Location\CC2430DB\..\..\..\..\..\COMPONENTS /
//                          \MAC\HIGH_LEVEL\" -I "C:\Texas                    /
//                          Instruments\ZStack-1.4.3-1.2.1\Projects\zstack\Sa /
//                          mples\Location\CC2430DB\..\..\..\..\..\COMPONENTS /
//                          \MAC\LOW_LEVEL\SRF03\" -I "C:\Texas               /
//                          Instruments\ZStack-1.4.3-1.2.1\Projects\zstack\Sa /
//                          mples\Location\CC2430DB\..\..\..\..\..\COMPONENTS /
//                          \MAC\LOW_LEVEL\SRF03\SINGLE_CHIP\" -I             /
//                          "C:\Program Files\IAR Systems\Embedded Workbench  /
//                          4.0 Evaluation version\8051\INC\" -I "C:\Program  /
//                          Files\IAR Systems\Embedded Workbench 4.0          /
//                          Evaluation version\8051\INC\CLIB\"                /
//    List file          =  C:\Texas Instruments\ZStack-1.4.3-1.2.1\Projects\ /
//                          zstack\Samples\Location\CC2430DB\LocDongle\List\h /
//                          al_assert.s51                                     /
//                                                                            /
//                                                                            /
///////////////////////////////////////////////////////////////////////////////

        NAME hal_assert

        RTMODEL "__calling_convention", "xdata_reentrant"
        RTMODEL "__code_model", "banked"
        RTMODEL "__core", "plain"
        RTMODEL "__data_model", "large"
        RTMODEL "__dptr_size", "16"
        RTMODEL "__extended_stack", "disabled"
        RTMODEL "__location_for_constants", "data"
        RTMODEL "__number_of_dptrs", "1"
        RTMODEL "__rt_version", "1"

        RSEG DOVERLAY:DATA:NOROOT(0)
        RSEG IOVERLAY:IDATA:NOROOT(0)
        RSEG ISTACK:IDATA:NOROOT(0)
        RSEG PSTACK:XDATA:NOROOT(0)
        RSEG XSTACK:XDATA:NOROOT(0)

        EXTERN ??halAssertHazardLights?relay
        EXTERN ?ALLOC_XSTACK8
        EXTERN ?BANKED_ENTER_XDATA
        EXTERN ?BANKED_LEAVE_XDATA
        EXTERN ?BDISPATCH
        EXTERN ?BRET
        EXTERN ?DEALLOC_XSTACK8
        EXTERN ?L_ADD_TO_X
        EXTERN ?L_MOV_TO_X
        EXTERN ?L_MOV_X
        EXTERN ?S_SHL
        EXTERN ?UL_GT_X
        EXTERN ?V0
        EXTERN ?XSP
        EXTERN ?XSTACK_DISP0_8
        EXTERN __INIT_XDATA_I
        EXTERN __INIT_XDATA_Z

        PUBLIC ??halAssertHandler?relay
        FUNCTION ??halAssertHandler?relay,0203H
        PUBLIC ??halAssertHazardLights?relay
        FUNCTION ??halAssertHazardLights?relay,0203H
        PUBWEAK CLKCON
        PUBWEAK P0INP
        PUBWEAK P1DIR
        PUBWEAK RFIM
        PUBWEAK SLEEP
        PUBWEAK _A_IEN0
        PUBWEAK _A_P0
        PUBWEAK _A_P1
        PUBWEAK __Constant_0
        PUBWEAK __Constant_1
        PUBWEAK __Constant_5800
        PUBLIC halAssertHandler
        FUNCTION halAssertHandler,021203H
        ARGFRAME XSTACK, 0, STACK
        LOCFRAME ISTACK, 2, STACK
        PUBLIC halAssertHazardLights
        FUNCTION halAssertHazardLights,080203H
        ARGFRAME XSTACK, 0, STACK
        ARGFRAME IOVERLAY, 0, STATIC
        ARGFRAME DOVERLAY, 0, STATIC
        LOCFRAME ISTACK, 2, STACK
        LOCFRAME XSTACK, 21, STACK
        
        CFI Names cfiNames0
        CFI StackFrame CFA_SP SP DATA
        CFI StackFrame CFA_PSP16 PSP16 XDATA
        CFI StackFrame CFA_XSP16 XSP16 XDATA
        CFI StaticOverlayFrame CFA_IOVERLAY IOVERLAY
        CFI StaticOverlayFrame CFA_DOVERLAY DOVERLAY
        CFI Resource `PSW.CY`:1, `B.BR0`:1, `B.BR1`:1, `B.BR2`:1, `B.BR3`:1
        CFI Resource `B.BR4`:1, `B.BR5`:1, `B.BR6`:1, `B.BR7`:1, `VB.BR8`:1
        CFI Resource `VB.BR9`:1, `VB.BR10`:1, `VB.BR11`:1, `VB.BR12`:1
        CFI Resource `VB.BR13`:1, `VB.BR14`:1, `VB.BR15`:1, VB:8, B:8, A:8
        CFI Resource PSW:8, DPL0:8, DPH0:8, R0:8, R1:8, R2:8, R3:8, R4:8, R5:8
        CFI Resource R6:8, R7:8, V0:8, V1:8, V2:8, V3:8, V4:8, V5:8, V6:8, V7:8
        CFI Resource SP:8, PSPH:8, PSPL:8, PSP16:16, XSPH:8, XSPL:8, XSP16:16
        CFI VirtualResource ?RET:24
        CFI Resource ?BRET_EXT:8
        CFI VirtualResource ?RET_HIGH:8, ?RET_LOW:8
        CFI ResourceParts PSP16 PSPH, PSPL
        CFI ResourceParts XSP16 XSPH, XSPL
        CFI ResourceParts ?RET ?BRET_EXT, ?RET_HIGH, ?RET_LOW
        CFI EndNames cfiNames0
        
        CFI Common cfiCommon0 Using cfiNames0
        CFI CodeAlign 1
        CFI DataAlign -1
        CFI ReturnAddress ?RET CODE
        CFI CFA_DOVERLAY Used
        CFI CFA_IOVERLAY Used
        CFI CFA_SP SP+-3
        CFI CFA_PSP16 PSP16+0
        CFI CFA_XSP16 XSP16+0
        CFI `PSW.CY` SameValue
        CFI `B.BR0` SameValue
        CFI `B.BR1` SameValue
        CFI `B.BR2` SameValue
        CFI `B.BR3` SameValue
        CFI `B.BR4` SameValue
        CFI `B.BR5` SameValue
        CFI `B.BR6` SameValue
        CFI `B.BR7` SameValue
        CFI `VB.BR8` SameValue
        CFI `VB.BR9` SameValue
        CFI `VB.BR10` SameValue
        CFI `VB.BR11` SameValue
        CFI `VB.BR12` SameValue
        CFI `VB.BR13` SameValue
        CFI `VB.BR14` SameValue
        CFI `VB.BR15` SameValue
        CFI VB SameValue
        CFI B Undefined
        CFI A Undefined
        CFI PSW SameValue
        CFI DPL0 SameValue
        CFI DPH0 SameValue
        CFI R0 Undefined
        CFI R1 Undefined
        CFI R2 Undefined
        CFI R3 Undefined
        CFI R4 Undefined
        CFI R5 Undefined
        CFI R6 SameValue
        CFI R7 SameValue
        CFI V0 SameValue
        CFI V1 SameValue
        CFI V2 SameValue
        CFI V3 SameValue
        CFI V4 SameValue
        CFI V5 SameValue
        CFI V6 SameValue
        CFI V7 SameValue
        CFI PSPH Undefined
        CFI PSPL Undefined
        CFI XSPH Undefined
        CFI XSPL Undefined
        CFI ?RET Concat
        CFI ?BRET_EXT Frame(CFA_SP, 3)
        CFI ?RET_HIGH Frame(CFA_SP, 2)
        CFI ?RET_LOW Frame(CFA_SP, 1)
        CFI EndCommon cfiCommon0
        
        
        CFI Common cfiCommon1 Using cfiNames0
        CFI CodeAlign 1
        CFI DataAlign -1
        CFI ReturnAddress ?RET CODE
        CFI CFA_DOVERLAY Used
        CFI CFA_IOVERLAY Used
        CFI CFA_SP SP+-2
        CFI CFA_PSP16 PSP16+0
        CFI CFA_XSP16 XSP16+0
        CFI `PSW.CY` SameValue
        CFI `B.BR0` SameValue
        CFI `B.BR1` SameValue
        CFI `B.BR2` SameValue
        CFI `B.BR3` SameValue
        CFI `B.BR4` SameValue
        CFI `B.BR5` SameValue
        CFI `B.BR6` SameValue
        CFI `B.BR7` SameValue
        CFI `VB.BR8` SameValue
        CFI `VB.BR9` SameValue
        CFI `VB.BR10` SameValue
        CFI `VB.BR11` SameValue
        CFI `VB.BR12` SameValue
        CFI `VB.BR13` SameValue
        CFI `VB.BR14` SameValue
        CFI `VB.BR15` SameValue
        CFI VB SameValue
        CFI B SameValue
        CFI A SameValue
        CFI PSW SameValue
        CFI DPL0 SameValue
        CFI DPH0 SameValue
        CFI R0 SameValue
        CFI R1 SameValue
        CFI R2 SameValue
        CFI R3 SameValue
        CFI R4 SameValue
        CFI R5 SameValue
        CFI R6 SameValue
        CFI R7 SameValue
        CFI V0 SameValue
        CFI V1 SameValue
        CFI V2 SameValue
        CFI V3 SameValue
        CFI V4 SameValue
        CFI V5 SameValue
        CFI V6 SameValue
        CFI V7 SameValue
        CFI PSPH Undefined
        CFI PSPL Undefined
        CFI XSPH Undefined
        CFI XSPL Undefined
        CFI ?RET Concat
        CFI ?BRET_EXT SameValue
        CFI ?RET_HIGH Frame(CFA_SP, 2)
        CFI ?RET_LOW Frame(CFA_SP, 1)
        CFI EndCommon cfiCommon1
        
halAssertHandler    SYMBOL "halAssertHandler"
??halAssertHandler?relay SYMBOL "?relay", halAssertHandler
halAssertHazardLights SYMBOL "halAssertHazardLights"
??halAssertHazardLights?relay SYMBOL "?relay", halAssertHazardLights

        EXTERN macRxActive
        EXTERN macTxActive

// C:\Texas Instruments\ZStack-1.4.3-1.2.1\Components\hal\common\hal_assert.c
//    1 /**************************************************************************************************
//    2   Filename:       hal_assert.c
//    3   Revised:        $Date: 2007-11-01 08:44:53 -0700 (Thu, 01 Nov 2007) $
//    4   Revision:       $Revision: 15821 $
//    5 
//    6   Description:    Describe the purpose and contents of the file.
//    7 
//    8 
//    9   Copyright 2006-2007 Texas Instruments Incorporated. All rights reserved.
//   10 
//   11   IMPORTANT: Your use of this Software is limited to those specific rights
//   12   granted under the terms of a software license agreement between the user
//   13   who downloaded the software, his/her employer (which must be your employer)
//   14   and Texas Instruments Incorporated (the "License").  You may not use this
//   15   Software unless you agree to abide by the terms of the License. The License
//   16   limits your use, and you acknowledge, that the Software may not be modified,
//   17   copied or distributed unless embedded on a Texas Instruments microcontroller
//   18   or used solely and exclusively in conjunction with a Texas Instruments radio
//   19   frequency transceiver, which is integrated into your product.  Other than for
//   20   the foregoing purpose, you may not use, reproduce, copy, prepare derivative
//   21   works of, modify, distribute, perform, display or sell this Software and/or
//   22   its documentation for any purpose.
//   23 
//   24   YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
//   25   PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, 
//   26   INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, 
//   27   NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
//   28   TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
//   29   NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
//   30   LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
//   31   INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
//   32   OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
//   33   OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
//   34   (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
//   35 
//   36   Should you have any questions regarding your right to use this Software,
//   37   contact Texas Instruments Incorporated at www.TI.com. 
//   38 **************************************************************************************************/
//   39 
//   40 
//   41 /* ------------------------------------------------------------------------------------------------
//   42  *                                          Includes
//   43  * ------------------------------------------------------------------------------------------------
//   44  */
//   45 #include "hal_assert.h"
//   46 #include "hal_types.h"
//   47 #include "hal_board.h"

        ASEGN SFR_AN:DATA:NOROOT,080H
// union <unnamed> volatile __sfr _A_P0
_A_P0:
        DS 1

        ASEGN SFR_AN:DATA:NOROOT,08fH
// unsigned char volatile __sfr P0INP
P0INP:
        DS 1

        ASEGN SFR_AN:DATA:NOROOT,090H
// union <unnamed> volatile __sfr _A_P1
_A_P1:
        DS 1

        ASEGN SFR_AN:DATA:NOROOT,091H
// unsigned char volatile __sfr RFIM
RFIM:
        DS 1

        ASEGN SFR_AN:DATA:NOROOT,0a8H
// union <unnamed> volatile __sfr _A_IEN0
_A_IEN0:
        DS 1

        ASEGN SFR_AN:DATA:NOROOT,0beH
// unsigned char volatile __sfr SLEEP
SLEEP:
        DS 1

        ASEGN SFR_AN:DATA:NOROOT,0c6H
// unsigned char volatile __sfr CLKCON
CLKCON:
        DS 1

        ASEGN SFR_AN:DATA:NOROOT,0feH
// unsigned char volatile __sfr P1DIR
P1DIR:
        DS 1
//   48 #include "hal_defs.h"
//   49 #include "hal_mcu.h"
//   50 
//   51 /* for access to debug data */
//   52 #include "mac_rx.h"
//   53 #include "mac_tx.h"
//   54 
//   55 
//   56 /* ------------------------------------------------------------------------------------------------
//   57  *                                       Local Prototypes
//   58  * ------------------------------------------------------------------------------------------------
//   59  */
//   60 void halAssertHazardLights(void);
//   61 
//   62 
//   63 /**************************************************************************************************
//   64  * @fn          halAssertHandler
//   65  *
//   66  * @brief       Logic to handle an assert.
//   67  *
//   68  * @param       none
//   69  *
//   70  * @return      none
//   71  **************************************************************************************************
//   72  */

        RSEG BANKED_CODE:CODE:NOROOT(0)
//   73 void halAssertHandler(void)
halAssertHandler:
        CFI Block cfiBlock0 Using cfiCommon0
        CFI Function halAssertHandler
//   74 {
        FUNCALL halAssertHandler, halAssertHazardLights
        LOCFRAME ISTACK, 2, STACK
        LOCFRAME PSTACK, 0, STACK
        LOCFRAME XSTACK, 0, STACK
        LOCFRAME IOVERLAY, 0, STATIC
        LOCFRAME DOVERLAY, 0, STATIC
        ARGFRAME ISTACK, 2, STACK
        ARGFRAME PSTACK, 0, STACK
        ARGFRAME XSTACK, 0, STACK
        ARGFRAME IOVERLAY, 0, STATIC
        ARGFRAME DOVERLAY, 0, STATIC
        PUSH    DPL
        CFI DPL0 Frame(CFA_SP, 4)
        CFI CFA_SP SP+-4
        PUSH    DPH
        CFI DPH0 Frame(CFA_SP, 5)
        CFI CFA_SP SP+-5
        ; Saved register size: 2
        ; Auto size: 0
//   75   /* execute code that handles asserts */
//   76 #ifdef ASSERT_RESET
//   77   HAL_SYSTEM_RESET();
//   78 #else
//   79   halAssertHazardLights();
        ; Setup parameters for call to function halAssertHazardLights
        LCALL   ??halAssertHazardLights?relay
//   80 #endif
//   81   
//   82 }
        POP     DPH
        CFI DPH0 SameValue
        CFI CFA_SP SP+-4
        POP     DPL
        CFI DPL0 SameValue
        CFI CFA_SP SP+-3
        LJMP    ?BRET
        CFI EndBlock cfiBlock0
//   83 
//   84 
//   85 /**************************************************************************************************
//   86  * @fn          halAssertHazardLights
//   87  *
//   88  * @brief       Blink LEDs to indicate an error.
//   89  *
//   90  * @param       none
//   91  *
//   92  * @return      none
//   93  **************************************************************************************************
//   94  */

        RSEG BANKED_CODE:CODE:NOROOT(0)
//   95 void halAssertHazardLights(void)
halAssertHazardLights:
        CFI Block cfiBlock1 Using cfiCommon0
        CFI Function halAssertHazardLights
//   96 {
        MOV     A,#-0xc
        LCALL   ?BANKED_ENTER_XDATA
        CFI DPH0 load(1, XDATA, add(CFA_XSP16, literal(-1)))
        CFI DPL0 load(1, XDATA, add(CFA_XSP16, literal(-2)))
        CFI ?BRET_EXT load(1, XDATA, add(CFA_XSP16, literal(-3)))
        CFI ?RET_HIGH load(1, XDATA, add(CFA_XSP16, literal(-4)))
        CFI ?RET_LOW load(1, XDATA, add(CFA_XSP16, literal(-5)))
        CFI R7 load(1, XDATA, add(CFA_XSP16, literal(-6)))
        CFI V3 load(1, XDATA, add(CFA_XSP16, literal(-7)))
        CFI V2 load(1, XDATA, add(CFA_XSP16, literal(-8)))
        CFI V1 load(1, XDATA, add(CFA_XSP16, literal(-9)))
        CFI V0 load(1, XDATA, add(CFA_XSP16, literal(-10)))
        CFI VB load(1, XDATA, add(CFA_XSP16, literal(-11)))
        CFI R6 load(1, XDATA, add(CFA_XSP16, literal(-12)))
        CFI CFA_SP SP+0
        CFI CFA_XSP16 add(XSP16, 12)
        ; Saved register size: 12
        ; Auto size: 9
        MOV     A,#-0x9
        LCALL   ?ALLOC_XSTACK8
        CFI CFA_XSP16 add(XSP16, 21)
//   97   enum
//   98   {
//   99     DEBUG_DATA_RSTACK_HIGH_OFS,
//  100     DEBUG_DATA_RSTACK_LOW_OFS,
//  101     DEBUG_DATA_TX_ACTIVE_OFS,
//  102     DEBUG_DATA_RX_ACTIVE_OFS,
//  103     DEBUG_DATA_INT_MASK_OFS,
//  104     DEBUG_DATA_SIZE
//  105   };
//  106 
//  107   uint8 buttonHeld;
//  108   uint8 debugData[DEBUG_DATA_SIZE];
//  109 
//  110   /* disable all interrupts before anything else */
//  111   HAL_DISABLE_INTERRUPTS();
        CLR     0xa8.7
//  112     
//  113   /*-------------------------------------------------------------------------------
//  114    *  Initialize LEDs and turn them off.
//  115    */
//  116   HAL_BOARD_INIT();
        ANL     0xbe,#0xfb
??halAssertHazardLights_0:
        MOV     A,0xbe
        MOV     C,0xE0 /* A   */.6
        JNC     ??halAssertHazardLights_0
        NOP
        MOV     R0,#-0x8
        MOV     R1,#0x1
??halAssertHazardLights_1:
        NOP
        MOV     A,R0
        ADD     A,#-0x1
        DEC     R0
        MOV     A,R1
        ADDC    A,#-0x1
        MOV     R1,A
        MOV     A,R0
        JNZ     ??halAssertHazardLights_2
        MOV     A,R1
??halAssertHazardLights_2:
        JNZ     ??halAssertHazardLights_1
        MOV     0xc6,#0x0
??halAssertHazardLights_3:
        MOV     A,0xc6
        JNZ     ??halAssertHazardLights_3
        ORL     0xbe,#0x4
        ORL     0xfe,#0x1
        ORL     0xfe,#0x2
        ORL     0x8f,#0x20
//  117 
//  118   HAL_TURN_OFF_LED1();
        SETB    0x90.0
//  119   HAL_TURN_OFF_LED2();
        SETB    0x90.1
//  120   HAL_TURN_OFF_LED3();
        SETB    0x90.1
        LJMP    ??halAssertHazardLights_4 & 0xFFFF
//  121   HAL_TURN_OFF_LED4();
//  122 
//  123   /*-------------------------------------------------------------------------------
//  124    *  Master infinite loop.
//  125    */
//  126   for (;;)
//  127   {
//  128     buttonHeld = 0;
//  129 
//  130     /*-------------------------------------------------------------------------------
//  131      *  "Hazard lights" loop.  A held keypress will exit this loop.
//  132      */
//  133     do
//  134     {
//  135       HAL_LED_BLINK_DELAY();
//  136 
//  137       /* toggle LEDS, the #ifdefs are in case HAL has logically remapped non-existent LEDs */
//  138 #if (HAL_NUM_LEDS >= 1)
//  139       HAL_TOGGLE_LED1();
//  140 #if (HAL_NUM_LEDS >= 2)
//  141       HAL_TOGGLE_LED2();
//  142 #if (HAL_NUM_LEDS >= 3)
//  143       HAL_TOGGLE_LED3();
//  144 #if (HAL_NUM_LEDS >= 4)
//  145       HAL_TOGGLE_LED4();
//  146 #endif
//  147 #endif
//  148 #endif
//  149 #endif
//  150 
//  151       /* escape hatch to continue execution, set escape to '1' to continue execution */
//  152       {
//  153         static uint8 escape = 0;
//  154         if (escape)
//  155         {
//  156           escape = 0;
//  157           return;
//  158         }
//  159       }
//  160 
//  161       /* break out of loop if button is held long enough */
//  162       if (HAL_PUSH_BUTTON1())
//  163       {
//  164         buttonHeld++;
??halAssertHazardLights_5:
        INC     R2
//  165       }
//  166       else
//  167       {
//  168         buttonHeld = 0;
//  169       }
//  170     }
//  171     while (buttonHeld != 10);  /* loop until button is held specified number of loops */
        MOV     A,#0xa
        XRL     A,R2
        JZ      ??halAssertHazardLights_6
??halAssertHazardLights_7:
        MOV     DPTR,#__Constant_0
        MOV     R0,#?V0 + 0
        LCALL   ?L_MOV_X
        MOV     A,#0x5
        LCALL   ?XSTACK_DISP0_8
        MOV     R0,#?V0 + 0
        LCALL   ?L_MOV_TO_X
        SJMP    ??halAssertHazardLights_8
??halAssertHazardLights_9:
        MOV     DPTR,#__Constant_1
        MOV     R0,#?V0 + 0
        LCALL   ?L_MOV_X
        MOV     A,#0x5
        LCALL   ?XSTACK_DISP0_8
        MOV     R0,#?V0 + 0
        LCALL   ?L_ADD_TO_X
??halAssertHazardLights_8:
        MOV     A,#0x5
        LCALL   ?XSTACK_DISP0_8
        PUSH    DPL
        CFI CFA_SP SP+-1
        PUSH    DPH
        CFI CFA_SP SP+-2
        MOV     DPTR,#__Constant_5800
        MOV     R0,#?V0 + 0
        LCALL   ?L_MOV_X
        POP     DPH
        CFI CFA_SP SP+-1
        POP     DPL
        CFI CFA_SP SP+0
        MOV     R0,#?V0 + 0
        LCALL   ?UL_GT_X
        JC      ??halAssertHazardLights_9
        MOV     C,0x90.0
        JNC     ??halAssertHazardLights_10
        CLR     0x90.0
        SJMP    ??halAssertHazardLights_11
??halAssertHazardLights_10:
        SETB    0x90.0
??halAssertHazardLights_11:
        MOV     C,0x90.1
        JNC     ??halAssertHazardLights_12
        CLR     0x90.1
        SJMP    ??halAssertHazardLights_13
??halAssertHazardLights_12:
        SETB    0x90.1
??halAssertHazardLights_13:
        MOV     DPTR,#??escape
        MOVX    A,@DPTR
        JZ      ??halAssertHazardLights_14
        CLR     A
        MOVX    @DPTR,A
        MOV     A,#0x9
        LCALL   ?DEALLOC_XSTACK8
        CFI CFA_XSP16 add(XSP16, 12)
        MOV     R7,#0x4
        LJMP    ?BANKED_LEAVE_XDATA
        CFI CFA_XSP16 add(XSP16, 21)
??halAssertHazardLights_14:
        MOV     C,0x80.0
        JNC     ??halAssertHazardLights_5
??halAssertHazardLights_15:
        MOV     R2,#0x0
        SJMP    ??halAssertHazardLights_7
//  172 
//  173     /*-------------------------------------------------------------------------------
//  174      *  Just exited from "hazard lights" loop.
//  175      */
//  176 
//  177     /* turn off all LEDs */
//  178     HAL_TURN_OFF_LED1();
??halAssertHazardLights_6:
        SETB    0x90.0
//  179     HAL_TURN_OFF_LED2();
        SETB    0x90.1
//  180     HAL_TURN_OFF_LED3();
        SETB    0x90.1
//  181     HAL_TURN_OFF_LED4();
        SETB    0x90.0
//  182 
//  183     /* wait for button release */
//  184     HAL_DEBOUNCE(!HAL_PUSH_BUTTON1());
        MOV     R0,#0x0
        MOV     R1,#0x0
??halAssertHazardLights_16:
        MOV     C,0x80.0
        JC      ??halAssertHazardLights_17
        MOV     R0,#0x0
        MOV     R1,#0x0
??halAssertHazardLights_17:
        LCALL   ?Subroutine0 & 0xFFFF
??CrossCallReturnLabel_0:
        JC      ??halAssertHazardLights_16
//  185 
//  186     /*-------------------------------------------------------------------------------
//  187      *  Load debug data into memory.
//  188      */
//  189 #ifdef HAL_MCU_AVR
//  190     {
//  191       uint8 * pStack;
//  192       pStack = (uint8 *) SP;
//  193       pStack++; /* point to return address on stack */
//  194       debugData[DEBUG_DATA_RSTACK_HIGH_OFS] = *pStack;
//  195       pStack++;
//  196       debugData[DEBUG_DATA_RSTACK_LOW_OFS] = *pStack;
//  197     }
//  198     debugData[DEBUG_DATA_INT_MASK_OFS] = EIMSK;
//  199 #endif
//  200 
//  201 #ifdef HAL_MCU_CC2430
//  202     debugData[DEBUG_DATA_INT_MASK_OFS] = RFIM;
        MOV     A,0x91
        PUSH    A
        CFI CFA_SP SP+-1
        MOV     A,#0x4
        LCALL   ?XSTACK_DISP0_8
        POP     A
        CFI CFA_SP SP+0
        MOVX    @DPTR,A
//  203 #endif
//  204 
//  205     debugData[DEBUG_DATA_TX_ACTIVE_OFS] = macTxActive;
        MOV     DPTR,#macTxActive
        MOVX    A,@DPTR
        PUSH    A
        CFI CFA_SP SP+-1
        MOV     A,#0x2
        LCALL   ?XSTACK_DISP0_8
        POP     A
        CFI CFA_SP SP+0
        MOVX    @DPTR,A
//  206     debugData[DEBUG_DATA_RX_ACTIVE_OFS] = macRxActive;
        MOV     DPTR,#macRxActive
        MOVX    A,@DPTR
        PUSH    A
        CFI CFA_SP SP+-1
        MOV     A,#0x3
        LCALL   ?XSTACK_DISP0_8
        POP     A
        CFI CFA_SP SP+0
        MOVX    @DPTR,A
//  207 
//  208    /* initialize for data dump loop */
//  209     {
//  210       uint8 iBit;
//  211       uint8 iByte;
//  212 
//  213       iBit  = 0;
        MOV     R4,#0x0
//  214       iByte = 0;
        MOV     R3,#0x0
//  215 
//  216       /*-------------------------------------------------------------------------------
//  217        *  Data dump loop.  A button press cycles data bits to an LED.
//  218        */
//  219       while (iByte < DEBUG_DATA_SIZE)
//  220       {
//  221         /* wait for key press */
//  222         while(!HAL_PUSH_BUTTON1());
??halAssertHazardLights_18:
        MOV     C,0x80.0
        JC      ??halAssertHazardLights_18
//  223 
//  224         /* turn on all LEDs for first bit of byte, turn on three LEDs if not first bit */
//  225         HAL_TURN_ON_LED1();
        CLR     0x90.0
//  226         HAL_TURN_ON_LED2();
        CLR     0x90.1
//  227         HAL_TURN_ON_LED3();
        CLR     0x90.1
//  228         if (iBit == 0)
        MOV     A,R4
        JNZ     ??halAssertHazardLights_19
//  229         {
//  230           HAL_TURN_ON_LED4();
        CLR     0x90.0
        SJMP    ??halAssertHazardLights_20
//  231         }
//  232         else
//  233         {
//  234           HAL_TURN_OFF_LED4();
??halAssertHazardLights_19:
        SETB    0x90.0
//  235         }
//  236 
//  237         /* wait for debounced key release */
//  238         HAL_DEBOUNCE(!HAL_PUSH_BUTTON1());
??halAssertHazardLights_20:
        MOV     R0,#0x0
        MOV     R1,#0x0
??halAssertHazardLights_21:
        MOV     C,0x80.0
        JC      ??halAssertHazardLights_22
        MOV     R0,#0x0
        MOV     R1,#0x0
??halAssertHazardLights_22:
        LCALL   ?Subroutine0 & 0xFFFF
??CrossCallReturnLabel_1:
        JC      ??halAssertHazardLights_21
//  239 
//  240         /* turn off all LEDs */
//  241         HAL_TURN_OFF_LED1();
        SETB    0x90.0
//  242         HAL_TURN_OFF_LED2();
        SETB    0x90.1
//  243         HAL_TURN_OFF_LED3();
        SETB    0x90.1
//  244         HAL_TURN_OFF_LED4();
        SETB    0x90.0
//  245 
//  246         /* output value of data bit to LED1 */
//  247         if (debugData[iByte] & (1 << (7 - iBit)))
        MOV     ?V0 + 0,#0x1
        MOV     ?V0 + 1,#0x0
        MOV     A,#0x7
        CLR     C
        SUBB    A,R4
        MOV     R0,#?V0 + 0
        LCALL   ?S_SHL
        PUSH    ?V0 + 0
        CFI CFA_SP SP+-1
        MOV     ?V0 + 0,R3
        MOV     DPL,?XSP + 0
        MOV     DPH,?XSP + 1
        MOV     A,DPL
        ADD     A,?V0 + 0
        MOV     DPL,A
        MOV     A,DPH
        ADDC    A,#0x0
        MOV     DPH,A
        POP     A
        CFI CFA_SP SP+0
        MOV     R2,A
        MOVX    A,@DPTR
        ANL     A,R2
        JZ      ??halAssertHazardLights_23
//  248         {
//  249           HAL_TURN_ON_LED1();
        CLR     0x90.0
        SJMP    ??halAssertHazardLights_24
//  250         }
//  251         else
//  252         {
//  253           HAL_TURN_OFF_LED1();
??halAssertHazardLights_23:
        SETB    0x90.0
//  254         }
//  255 
//  256         /* advance to next bit */
//  257         iBit++;
??halAssertHazardLights_24:
        INC     R4
//  258         if (iBit == 8)
        MOV     A,#0x8
        XRL     A,R4
        JNZ     ??halAssertHazardLights_18
//  259         {
//  260           iBit = 0;
        MOV     R4,#0x0
//  261           iByte++;
        INC     R3
//  262         }
//  263       }
        MOV     A,R3
        CLR     C
        SUBB    A,#0x5
        JC      ??halAssertHazardLights_18
//  264     }
//  265 
//  266     /*
//  267      *  About to enter "hazard lights" loop again.  Turn off LED1 in case the last bit
//  268      *  displayed happened to be one.  This guarantees all LEDs are off at the start of
//  269      *  the flashing loop which uses a toggle operation to change LED states.
//  270      */
//  271     HAL_TURN_OFF_LED1();
??halAssertHazardLights_4:
        SETB    0x90.0
        LJMP    ??halAssertHazardLights_15 & 0xFFFF
        CFI EndBlock cfiBlock1
        REQUIRE _A_P0
        REQUIRE P0INP
        REQUIRE _A_P1
        REQUIRE RFIM
        REQUIRE _A_IEN0
        REQUIRE SLEEP
        REQUIRE CLKCON
        REQUIRE P1DIR
//  272   }
//  273 }

        RSEG BANKED_CODE:CODE:NOROOT(0)
?Subroutine0:
        CFI Block cfiCond2 Using cfiCommon0
        CFI NoFunction
        CFI Conditional ??CrossCallReturnLabel_0
        CFI R6 load(1, XDATA, add(CFA_XSP16, literal(-12)))
        CFI VB load(1, XDATA, add(CFA_XSP16, literal(-11)))
        CFI V0 load(1, XDATA, add(CFA_XSP16, literal(-10)))
        CFI V1 load(1, XDATA, add(CFA_XSP16, literal(-9)))
        CFI V2 load(1, XDATA, add(CFA_XSP16, literal(-8)))
        CFI V3 load(1, XDATA, add(CFA_XSP16, literal(-7)))
        CFI R7 load(1, XDATA, add(CFA_XSP16, literal(-6)))
        CFI ?RET_LOW load(1, XDATA, add(CFA_XSP16, literal(-5)))
        CFI ?RET_HIGH load(1, XDATA, add(CFA_XSP16, literal(-4)))
        CFI ?BRET_EXT load(1, XDATA, add(CFA_XSP16, literal(-3)))
        CFI DPL0 load(1, XDATA, add(CFA_XSP16, literal(-2)))
        CFI DPH0 load(1, XDATA, add(CFA_XSP16, literal(-1)))
        CFI CFA_SP SP+0
        CFI CFA_XSP16 add(XSP16, 21)
        CFI Block cfiCond3 Using cfiCommon0
        CFI (cfiCond3) NoFunction
        CFI (cfiCond3) Conditional ??CrossCallReturnLabel_1
        CFI (cfiCond3) R6 load(1, XDATA, add(CFA_XSP16, literal(-12)))
        CFI (cfiCond3) VB load(1, XDATA, add(CFA_XSP16, literal(-11)))
        CFI (cfiCond3) V0 load(1, XDATA, add(CFA_XSP16, literal(-10)))
        CFI (cfiCond3) V1 load(1, XDATA, add(CFA_XSP16, literal(-9)))
        CFI (cfiCond3) V2 load(1, XDATA, add(CFA_XSP16, literal(-8)))
        CFI (cfiCond3) V3 load(1, XDATA, add(CFA_XSP16, literal(-7)))
        CFI (cfiCond3) R7 load(1, XDATA, add(CFA_XSP16, literal(-6)))
        CFI (cfiCond3) ?RET_LOW load(1, XDATA, add(CFA_XSP16, literal(-5)))
        CFI (cfiCond3) ?RET_HIGH load(1, XDATA, add(CFA_XSP16, literal(-4)))
        CFI (cfiCond3) ?BRET_EXT load(1, XDATA, add(CFA_XSP16, literal(-3)))
        CFI (cfiCond3) DPL0 load(1, XDATA, add(CFA_XSP16, literal(-2)))
        CFI (cfiCond3) DPH0 load(1, XDATA, add(CFA_XSP16, literal(-1)))
        CFI (cfiCond3) CFA_SP SP+0
        CFI (cfiCond3) CFA_XSP16 add(XSP16, 21)
        CFI Block cfiPicker4 Using cfiCommon1
        CFI (cfiPicker4) NoFunction
        CFI (cfiPicker4) Picker
        MOV     A,R0
        ADD     A,#0x1
        INC     R0
        MOV     A,R1
        ADDC    A,#0x0
        MOV     R1,A
        CLR     C
        MOV     A,R0
        SUBB    A,#-0xc
        MOV     A,R1
        SUBB    A,#0x1
        MOV     C,0xD0 /* PSW */.2
        XRL     A,PSW
        RLC     A
        RET
        CFI EndBlock cfiCond2
        CFI EndBlock cfiCond3
        CFI EndBlock cfiPicker4

        RSEG XDATA_Z:XDATA:NOROOT(0)
??escape:
        DS 1
        REQUIRE __INIT_XDATA_Z

        RSEG XDATA_I:XDATA:NOROOT(0)
        DATA
__Constant_0:
        DS 4
        REQUIRE `?<Initializer for __Constant_0>`
        REQUIRE __INIT_XDATA_I

        RSEG XDATA_ID:CODE:NOROOT(0)
        DATA
`?<Initializer for __Constant_0>`:
        DD 0

        RSEG XDATA_I:XDATA:NOROOT(0)
        DATA
__Constant_1:
        DS 4
        REQUIRE `?<Initializer for __Constant_1>`
        REQUIRE __INIT_XDATA_I

        RSEG XDATA_ID:CODE:NOROOT(0)
        DATA
`?<Initializer for __Constant_1>`:
        DD 1

        RSEG XDATA_I:XDATA:NOROOT(0)
        DATA
__Constant_5800:
        DS 4
        REQUIRE `?<Initializer for __Constant_5800>`
        REQUIRE __INIT_XDATA_I

        RSEG XDATA_ID:CODE:NOROOT(0)
        DATA
`?<Initializer for __Constant_5800>`:
        DD 22528

        RSEG BANK_RELAYS:CODE:REORDER:NOROOT(0)
??halAssertHandler?relay:
        LCALL   ?BDISPATCH
        DATA
        DC24    halAssertHandler

        RSEG BANK_RELAYS:CODE:REORDER:NOROOT(0)
??halAssertHazardLights?relay:
        LCALL   ?BDISPATCH
        DATA
        DC24    halAssertHazardLights

        END
//  274 
//  275 
//  276 /* ------------------------------------------------------------------------------------------------
//  277  *                                    Compile Time Assertions
//  278  * ------------------------------------------------------------------------------------------------
//  279  */
//  280 
//  281 /* integrity check of type sizes */
//  282 HAL_ASSERT_SIZE(  int8, 1);
//  283 HAL_ASSERT_SIZE( uint8, 1);
//  284 HAL_ASSERT_SIZE( int16, 2);
//  285 HAL_ASSERT_SIZE(uint16, 2);
//  286 HAL_ASSERT_SIZE( int32, 4);
//  287 HAL_ASSERT_SIZE(uint32, 4);
//  288 
//  289 
//  290 /**************************************************************************************************
//  291 */
// 
// 405 bytes in segment BANKED_CODE
//  12 bytes in segment BANK_RELAYS
//   8 bytes in segment SFR_AN
//  12 bytes in segment XDATA_I
//  12 bytes in segment XDATA_ID
//   1 byte  in segment XDATA_Z
// 
// 417 bytes of CODE  memory (+ 12 bytes shared)
//   0 bytes of DATA  memory (+  8 bytes shared)
//   1 byte  of XDATA memory (+ 12 bytes shared)
//
//Errors: none
//Warnings: none
