
_interrupt:

;GSM_PIC_clicker.mpas,95 :: 		begin
;GSM_PIC_clicker.mpas,98 :: 		if (USBIF_bit) then begin
	BTFSS       USBIF_bit+0, BitPos(USBIF_bit+0) 
	GOTO        L__interrupt2
;GSM_PIC_clicker.mpas,99 :: 		USB_Interrupt_Proc();
	CALL        _USB_Interrupt_Proc+0, 0
;GSM_PIC_clicker.mpas,100 :: 		end;
L__interrupt2:
;GSM_PIC_clicker.mpas,104 :: 		if (T0IF_bit) then begin  // 1ms Interrupt
	BTFSS       T0IF_bit+0, BitPos(T0IF_bit+0) 
	GOTO        L__interrupt5
;GSM_PIC_clicker.mpas,108 :: 		TMR0H := 0xD1;
	MOVLW       209
	MOVWF       TMR0H+0 
;GSM_PIC_clicker.mpas,109 :: 		TMR0L := 0x20;
	MOVLW       32
	MOVWF       TMR0L+0 
;GSM_PIC_clicker.mpas,110 :: 		gsm1msPing();
	CALL        _gsm1msPing+0, 0
;GSM_PIC_clicker.mpas,111 :: 		if (wrdButtonTmr < 65535) then begin Inc(wrdButtonTmr); end;
	MOVLW       255
	SUBWF       _wrdButtonTmr+1, 0 
	BTFSS       STATUS+0, 2 
	GOTO        L__interrupt104
	MOVLW       255
	SUBWF       _wrdButtonTmr+0, 0 
L__interrupt104:
	BTFSC       STATUS+0, 0 
	GOTO        L__interrupt8
	INFSNZ      _wrdButtonTmr+0, 1 
	INCF        _wrdButtonTmr+1, 1 
L__interrupt8:
;GSM_PIC_clicker.mpas,112 :: 		T0IF_bit := 0; // Clear interrupt flag
	BCF         T0IF_bit+0, BitPos(T0IF_bit+0) 
;GSM_PIC_clicker.mpas,113 :: 		end;
L__interrupt5:
;GSM_PIC_clicker.mpas,115 :: 		end;
L_end_interrupt:
L__interrupt103:
	RETFIE      1
; end of _interrupt

_setup:

;GSM_PIC_clicker.mpas,118 :: 		begin
;GSM_PIC_clicker.mpas,119 :: 		ANCON0 := %11111111; //All pins digital
	MOVLW       255
	MOVWF       ANCON0+0 
;GSM_PIC_clicker.mpas,120 :: 		ANCON1 := %00011111; //All pins digital
	MOVLW       31
	MOVWF       ANCON1+0 
;GSM_PIC_clicker.mpas,121 :: 		btn1_Dir := 1; // Input
	BSF         TRISD3_bit+0, BitPos(TRISD3_bit+0) 
;GSM_PIC_clicker.mpas,122 :: 		btn2_Dir := 1; // Input
	BSF         TRISD2_bit+0, BitPos(TRISD2_bit+0) 
;GSM_PIC_clicker.mpas,123 :: 		led1_Dir := 0; // Output
	BCF         TRISA0_bit+0, BitPos(TRISA0_bit+0) 
;GSM_PIC_clicker.mpas,124 :: 		led2_Dir := 0; // Output
	BCF         TRISA1_bit+0, BitPos(TRISA1_bit+0) 
;GSM_PIC_clicker.mpas,125 :: 		TRISD5_bit := 1; //UART Rx
	BSF         TRISD5_bit+0, BitPos(TRISD5_bit+0) 
;GSM_PIC_clicker.mpas,126 :: 		TRISD6_bit := 0; //UART Tx
	BCF         TRISD6_bit+0, BitPos(TRISD6_bit+0) 
;GSM_PIC_clicker.mpas,127 :: 		GSM_Pwr_Key_Dir := 0;
	BCF         TRISB2_bit+0, BitPos(TRISB2_bit+0) 
;GSM_PIC_clicker.mpas,128 :: 		GSM_Stat_Dir := 1;
	BSF         TRISA2_bit+0, BitPos(TRISA2_bit+0) 
;GSM_PIC_clicker.mpas,130 :: 		Unlock_IOLOCK();
	CALL        _Unlock_IOLOCK+0, 0
;GSM_PIC_clicker.mpas,131 :: 		PPS_Mapping_NoLock(22, _INPUT, _RX2_DT2);
	MOVLW       22
	MOVWF       FARG_PPS_Mapping_NoLock_rp_num+0 
	MOVLW       1
	MOVWF       FARG_PPS_Mapping_NoLock_input_output+0 
	MOVLW       12
	MOVWF       FARG_PPS_Mapping_NoLock_funct_name+0 
	CALL        _PPS_Mapping_NoLock+0, 0
;GSM_PIC_clicker.mpas,132 :: 		PPS_Mapping_NoLock(23, _OUTPUT, _TX2_CK2);
	MOVLW       23
	MOVWF       FARG_PPS_Mapping_NoLock_rp_num+0 
	CLRF        FARG_PPS_Mapping_NoLock_input_output+0 
	MOVLW       6
	MOVWF       FARG_PPS_Mapping_NoLock_funct_name+0 
	CALL        _PPS_Mapping_NoLock+0, 0
;GSM_PIC_clicker.mpas,133 :: 		Lock_IOLOCK();
	CALL        _Lock_IOLOCK+0, 0
;GSM_PIC_clicker.mpas,134 :: 		IPEN_bit := 0; //Interrupt priority disable
	BCF         IPEN_bit+0, BitPos(IPEN_bit+0) 
;GSM_PIC_clicker.mpas,135 :: 		GIE_bit := 1; //Global interrupt enable
	BSF         GIE_bit+0, BitPos(GIE_bit+0) 
;GSM_PIC_clicker.mpas,136 :: 		PEIE_bit := 1; //Peripheral interrupt enable
	BSF         PEIE_bit+0, BitPos(PEIE_bit+0) 
;GSM_PIC_clicker.mpas,138 :: 		HID_Enable(@USBin,@USBout); // Enable HID communication
	MOVLW       _USBin+0
	MOVWF       FARG_HID_Enable_readbuff+0 
	MOVLW       hi_addr(_USBin+0)
	MOVWF       FARG_HID_Enable_readbuff+1 
	MOVLW       _USBout+0
	MOVWF       FARG_HID_Enable_writebuff+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_HID_Enable_writebuff+1 
	CALL        _HID_Enable+0, 0
;GSM_PIC_clicker.mpas,141 :: 		T0CON := %10001000; //Timer0 On, 16-bit, internal clock, pre-scaler not assgnd
	MOVLW       136
	MOVWF       T0CON+0 
;GSM_PIC_clicker.mpas,142 :: 		T0IE_bit := 1; //Enable Timer0 overflow interrupts
	BSF         T0IE_bit+0, BitPos(T0IE_bit+0) 
;GSM_PIC_clicker.mpas,143 :: 		end;
L_end_setup:
	RETURN      0
; end of _setup

_startup:

;GSM_PIC_clicker.mpas,146 :: 		begin
;GSM_PIC_clicker.mpas,147 :: 		led1 := 0;
	BCF         LATA0_bit+0, BitPos(LATA0_bit+0) 
;GSM_PIC_clicker.mpas,148 :: 		led2 := 0;
	BCF         LATA1_bit+0, BitPos(LATA1_bit+0) 
;GSM_PIC_clicker.mpas,149 :: 		UART_Remappable_Init(9600);
	BSF         BAUDCON2+0, 3, 0
	MOVLW       4
	MOVWF       SPBRGH2+0 
	MOVLW       225
	MOVWF       SPBRG2+0 
	BSF         TXSTA2+0, 2, 0
	CALL        _UART_Remappable_Init+0, 0
;GSM_PIC_clicker.mpas,150 :: 		gsmInit();
	CALL        _gsmInit+0, 0
;GSM_PIC_clicker.mpas,151 :: 		gsm_MS_Init();
	CALL        _gsm_MS_Init+0, 0
;GSM_PIC_clicker.mpas,152 :: 		gsm_Msg_Init(); // Requires GSM_Msg module
	CALL        _gsm_Msg_Init+0, 0
;GSM_PIC_clicker.mpas,153 :: 		strDestID := '';
	CLRF        _strDestID+0 
;GSM_PIC_clicker.mpas,154 :: 		wrdButtonTmr := 65535;
	MOVLW       255
	MOVWF       _wrdButtonTmr+0 
	MOVLW       255
	MOVWF       _wrdButtonTmr+1 
;GSM_PIC_clicker.mpas,155 :: 		bitRTCC_Set := 0;
	BCF         _bitRTCC_Set+0, BitPos(_bitRTCC_Set+0) 
;GSM_PIC_clicker.mpas,156 :: 		end;
L_end_startup:
	RETURN      0
; end of _startup

_msgSend:

;GSM_PIC_clicker.mpas,159 :: 		begin
;GSM_PIC_clicker.mpas,162 :: 		strcpy(USBout, 'Sending message to ');
	MOVLW       _USBout+0
	MOVWF       FARG_strcpy_s1+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strcpy_s1+1 
	MOVLW       83
	MOVWF       ?LocalText_msgSend_0+0 
	MOVLW       101
	MOVWF       ?LocalText_msgSend_0+1 
	MOVLW       110
	MOVWF       ?LocalText_msgSend_0+2 
	MOVLW       100
	MOVWF       ?LocalText_msgSend_0+3 
	MOVLW       105
	MOVWF       ?LocalText_msgSend_0+4 
	MOVLW       110
	MOVWF       ?LocalText_msgSend_0+5 
	MOVLW       103
	MOVWF       ?LocalText_msgSend_0+6 
	MOVLW       32
	MOVWF       ?LocalText_msgSend_0+7 
	MOVLW       109
	MOVWF       ?LocalText_msgSend_0+8 
	MOVLW       101
	MOVWF       ?LocalText_msgSend_0+9 
	MOVLW       115
	MOVWF       ?LocalText_msgSend_0+10 
	MOVLW       115
	MOVWF       ?LocalText_msgSend_0+11 
	MOVLW       97
	MOVWF       ?LocalText_msgSend_0+12 
	MOVLW       103
	MOVWF       ?LocalText_msgSend_0+13 
	MOVLW       101
	MOVWF       ?LocalText_msgSend_0+14 
	MOVLW       32
	MOVWF       ?LocalText_msgSend_0+15 
	MOVLW       116
	MOVWF       ?LocalText_msgSend_0+16 
	MOVLW       111
	MOVWF       ?LocalText_msgSend_0+17 
	MOVLW       32
	MOVWF       ?LocalText_msgSend_0+18 
	CLRF        ?LocalText_msgSend_0+19 
	MOVLW       ?LocalText_msgSend_0+0
	MOVWF       FARG_strcpy_s2+0 
	MOVLW       hi_addr(?LocalText_msgSend_0+0)
	MOVWF       FARG_strcpy_s2+1 
	CALL        _strcpy+0, 0
;GSM_PIC_clicker.mpas,163 :: 		strcat(USBout, strDestID);
	MOVLW       _USBout+0
	MOVWF       FARG_strcat_s1+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strcat_s1+1 
	MOVLW       _strDestID+0
	MOVWF       FARG_strcat_s2+0 
	MOVLW       hi_addr(_strDestID+0)
	MOVWF       FARG_strcat_s2+1 
	CALL        _strcat+0, 0
;GSM_PIC_clicker.mpas,164 :: 		strcat(USBout, ':' + Chr(13) + Chr(10));
	MOVLW       _USBout+0
	MOVWF       FARG_strcat_s1+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strcat_s1+1 
	MOVLW       58
	MOVWF       ?LocalText_msgSend_1+0 
	MOVLW       13
	MOVWF       ?LocalText_msgSend_1+1 
	MOVLW       10
	MOVWF       ?LocalText_msgSend_1+2 
	MOVLW       0
	MOVWF       ?LocalText_msgSend_1+3 
	MOVLW       ?LocalText_msgSend_1+0
	MOVWF       FARG_strcat_s2+0 
	MOVLW       hi_addr(?LocalText_msgSend_1+0)
	MOVWF       FARG_strcat_s2+1 
	CALL        _strcat+0, 0
;GSM_PIC_clicker.mpas,165 :: 		HID_Write(@USBout, 64);
	MOVLW       _USBout+0
	MOVWF       FARG_HID_Write_writebuff+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_HID_Write_writebuff+1 
	MOVLW       64
	MOVWF       FARG_HID_Write_len+0 
	CALL        _HID_Write+0, 0
;GSM_PIC_clicker.mpas,166 :: 		strncpyExNewLine(USBout, strMsgSendTxt, 64);
	MOVLW       _USBout+0
	MOVWF       FARG_strncpyExNewLine_dest+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strncpyExNewLine_dest+1 
	MOVLW       _strMsgSendTxt+0
	MOVWF       FARG_strncpyExNewLine_from+0 
	MOVLW       hi_addr(_strMsgSendTxt+0)
	MOVWF       FARG_strncpyExNewLine_from+1 
	MOVLW       64
	MOVWF       FARG_strncpyExNewLine_size+0 
	CALL        _strncpyExNewLine+0, 0
;GSM_PIC_clicker.mpas,167 :: 		HID_Write(@USBout, 64);
	MOVLW       _USBout+0
	MOVWF       FARG_HID_Write_writebuff+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_HID_Write_writebuff+1 
	MOVLW       64
	MOVWF       FARG_HID_Write_len+0 
	CALL        _HID_Write+0, 0
;GSM_PIC_clicker.mpas,169 :: 		if (strDestID[0] <> 0) then begin
	MOVF        _strDestID+0, 0 
	XORLW       0
	BTFSC       STATUS+0, 2 
	GOTO        L__msgSend14
;GSM_PIC_clicker.mpas,170 :: 		if (gsmMsgSendPending() = 1) then begin gsmMsgSendCancel(); end; // Cancel any message waiting to be sent
	CALL        _gsmMsgSendPending+0, 0
	MOVF        R0, 0 
	XORLW       1
	BTFSS       STATUS+0, 2 
	GOTO        L__msgSend17
	CALL        _gsmMsgSendCancel+0, 0
L__msgSend17:
;GSM_PIC_clicker.mpas,171 :: 		gsmMsgSend(strMsgSendTxt, strDestID); // Send the message
	MOVLW       _strMsgSendTxt+0
	MOVWF       FARG_gsmMsgSend_MessageText+0 
	MOVLW       hi_addr(_strMsgSendTxt+0)
	MOVWF       FARG_gsmMsgSend_MessageText+1 
	MOVLW       _strDestID+0
	MOVWF       FARG_gsmMsgSend_DestinationID+0 
	MOVLW       hi_addr(_strDestID+0)
	MOVWF       FARG_gsmMsgSend_DestinationID+1 
	CALL        _gsmMsgSend+0, 0
;GSM_PIC_clicker.mpas,172 :: 		end;
L__msgSend14:
;GSM_PIC_clicker.mpas,173 :: 		end;
L_end_msgSend:
	RETURN      0
; end of _msgSend

_gsmMissedCall:

;GSM_PIC_clicker.mpas,176 :: 		begin
;GSM_PIC_clicker.mpas,177 :: 		led1 := not led1; // Toggle LED1
	BTG         LATA0_bit+0, BitPos(LATA0_bit+0) 
;GSM_PIC_clicker.mpas,178 :: 		if (strDestID[0] = 0) then begin  // If the destination ID has not yet been set then
	MOVF        _strDestID+0, 0 
	XORLW       0
	BTFSS       STATUS+0, 2 
	GOTO        L__gsmMissedCall21
;GSM_PIC_clicker.mpas,179 :: 		strcpy(strDestID, OriginatorID); // Copy it from the originator ID
	MOVLW       _strDestID+0
	MOVWF       FARG_strcpy_s1+0 
	MOVLW       hi_addr(_strDestID+0)
	MOVWF       FARG_strcpy_s1+1 
	MOVF        FARG_gsmMissedCall_OriginatorID+0, 0 
	MOVWF       FARG_strcpy_s2+0 
	MOVF        FARG_gsmMissedCall_OriginatorID+1, 0 
	MOVWF       FARG_strcpy_s2+1 
	CALL        _strcpy+0, 0
;GSM_PIC_clicker.mpas,180 :: 		end;
L__gsmMissedCall21:
;GSM_PIC_clicker.mpas,181 :: 		end;
L_end_gsmMissedCall:
	RETURN      0
; end of _gsmMissedCall

_gsmMsgRcvd:

;GSM_PIC_clicker.mpas,184 :: 		begin
;GSM_PIC_clicker.mpas,185 :: 		if (strDestID[0] = 0) then begin  // If the destination ID has not yet been set then
	MOVF        _strDestID+0, 0 
	XORLW       0
	BTFSS       STATUS+0, 2 
	GOTO        L__gsmMsgRcvd25
;GSM_PIC_clicker.mpas,186 :: 		strcpy(strDestID, OriginatorID); // Copy it from the originator ID
	MOVLW       _strDestID+0
	MOVWF       FARG_strcpy_s1+0 
	MOVLW       hi_addr(_strDestID+0)
	MOVWF       FARG_strcpy_s1+1 
	MOVF        FARG_gsmMsgRcvd_OriginatorID+0, 0 
	MOVWF       FARG_strcpy_s2+0 
	MOVF        FARG_gsmMsgRcvd_OriginatorID+1, 0 
	MOVWF       FARG_strcpy_s2+1 
	CALL        _strcpy+0, 0
;GSM_PIC_clicker.mpas,187 :: 		end;                                   // (reply to sender)
L__gsmMsgRcvd25:
;GSM_PIC_clicker.mpas,188 :: 		if (gsmMsgJustArrived() = 1) then begin
	CALL        _gsmMsgJustArrived+0, 0
	MOVF        R0, 0 
	XORLW       1
	BTFSS       STATUS+0, 2 
	GOTO        L__gsmMsgRcvd28
;GSM_PIC_clicker.mpas,191 :: 		if (not bitRTCC_Set) then begin
	BTFSC       _bitRTCC_Set+0, BitPos(_bitRTCC_Set+0) 
	GOTO        L__gsmMsgRcvd110
	BSF         4056, 0 
	GOTO        L__gsmMsgRcvd111
L__gsmMsgRcvd110:
	BCF         4056, 0 
L__gsmMsgRcvd111:
	BTFSS       4056, 0 
	GOTO        L__gsmMsgRcvd31
;GSM_PIC_clicker.mpas,192 :: 		dtmRTCC := dtmGsmEvent;
	MOVLW       _dtmRTCC+0
	MOVWF       FSR1 
	MOVLW       hi_addr(_dtmRTCC+0)
	MOVWF       FSR1H 
	MOVLW       _dtmGsmEvent+0
	MOVWF       FSR2 
	MOVLW       hi_addr(_dtmGsmEvent+0)
	MOVWF       FSR2H 
	MOVLW       6
	MOVWF       R0 
	MOVLW       0
	MOVWF       R1 
	CALL        ___CA2AW+0, 0
;GSM_PIC_clicker.mpas,194 :: 		gsmDateTimeWrite();
	CALL        _gsmDateTimeWrite+0, 0
;GSM_PIC_clicker.mpas,195 :: 		end;
L__gsmMsgRcvd31:
;GSM_PIC_clicker.mpas,196 :: 		end;
L__gsmMsgRcvd28:
;GSM_PIC_clicker.mpas,197 :: 		lcase(MessageText); // Convert the entire message to lower case
	MOVF        FARG_gsmMsgRcvd_MessageText+0, 0 
	MOVWF       FARG_lcase_str+0 
	MOVF        FARG_gsmMsgRcvd_MessageText+1, 0 
	MOVWF       FARG_lcase_str+1 
	CALL        _lcase+0, 0
;GSM_PIC_clicker.mpas,199 :: 		if (MessageText[1] = 'n') then begin  // Looking for 'on'
	MOVLW       1
	ADDWF       FARG_gsmMsgRcvd_MessageText+0, 0 
	MOVWF       FSR0 
	MOVLW       0
	ADDWFC      FARG_gsmMsgRcvd_MessageText+1, 0 
	MOVWF       FSR0H 
	MOVF        POSTINC0+0, 0 
	XORLW       110
	BTFSS       STATUS+0, 2 
	GOTO        L__gsmMsgRcvd34
;GSM_PIC_clicker.mpas,200 :: 		if (MessageText[2] = '1') then begin // "on1"
	MOVLW       2
	ADDWF       FARG_gsmMsgRcvd_MessageText+0, 0 
	MOVWF       FSR0 
	MOVLW       0
	ADDWFC      FARG_gsmMsgRcvd_MessageText+1, 0 
	MOVWF       FSR0H 
	MOVF        POSTINC0+0, 0 
	XORLW       49
	BTFSS       STATUS+0, 2 
	GOTO        L__gsmMsgRcvd37
;GSM_PIC_clicker.mpas,201 :: 		LED1 := 1;
	BSF         LATA0_bit+0, BitPos(LATA0_bit+0) 
;GSM_PIC_clicker.mpas,202 :: 		end else if (MessageText[2] = '2') then begin // "on2"
	GOTO        L__gsmMsgRcvd38
L__gsmMsgRcvd37:
	MOVLW       2
	ADDWF       FARG_gsmMsgRcvd_MessageText+0, 0 
	MOVWF       FSR0 
	MOVLW       0
	ADDWFC      FARG_gsmMsgRcvd_MessageText+1, 0 
	MOVWF       FSR0H 
	MOVF        POSTINC0+0, 0 
	XORLW       50
	BTFSS       STATUS+0, 2 
	GOTO        L__gsmMsgRcvd40
;GSM_PIC_clicker.mpas,203 :: 		LED2 := 1;
	BSF         LATA1_bit+0, BitPos(LATA1_bit+0) 
;GSM_PIC_clicker.mpas,204 :: 		end else begin // just "on" (both)
	GOTO        L__gsmMsgRcvd41
L__gsmMsgRcvd40:
;GSM_PIC_clicker.mpas,205 :: 		LED1 := 1;
	BSF         LATA0_bit+0, BitPos(LATA0_bit+0) 
;GSM_PIC_clicker.mpas,206 :: 		LED2 := 1;
	BSF         LATA1_bit+0, BitPos(LATA1_bit+0) 
;GSM_PIC_clicker.mpas,207 :: 		end;
L__gsmMsgRcvd41:
L__gsmMsgRcvd38:
;GSM_PIC_clicker.mpas,208 :: 		end else if (MessageText[1] = 'f') then begin  // Looking for 'off'
	GOTO        L__gsmMsgRcvd35
L__gsmMsgRcvd34:
	MOVLW       1
	ADDWF       FARG_gsmMsgRcvd_MessageText+0, 0 
	MOVWF       FSR0 
	MOVLW       0
	ADDWFC      FARG_gsmMsgRcvd_MessageText+1, 0 
	MOVWF       FSR0H 
	MOVF        POSTINC0+0, 0 
	XORLW       102
	BTFSS       STATUS+0, 2 
	GOTO        L__gsmMsgRcvd43
;GSM_PIC_clicker.mpas,209 :: 		if (MessageText[3] = '1') then begin // "off1"
	MOVLW       3
	ADDWF       FARG_gsmMsgRcvd_MessageText+0, 0 
	MOVWF       FSR0 
	MOVLW       0
	ADDWFC      FARG_gsmMsgRcvd_MessageText+1, 0 
	MOVWF       FSR0H 
	MOVF        POSTINC0+0, 0 
	XORLW       49
	BTFSS       STATUS+0, 2 
	GOTO        L__gsmMsgRcvd46
;GSM_PIC_clicker.mpas,210 :: 		LED1 := 0;
	BCF         LATA0_bit+0, BitPos(LATA0_bit+0) 
;GSM_PIC_clicker.mpas,211 :: 		end else if (MessageText[3] = '2') then begin // "off2"
	GOTO        L__gsmMsgRcvd47
L__gsmMsgRcvd46:
	MOVLW       3
	ADDWF       FARG_gsmMsgRcvd_MessageText+0, 0 
	MOVWF       FSR0 
	MOVLW       0
	ADDWFC      FARG_gsmMsgRcvd_MessageText+1, 0 
	MOVWF       FSR0H 
	MOVF        POSTINC0+0, 0 
	XORLW       50
	BTFSS       STATUS+0, 2 
	GOTO        L__gsmMsgRcvd49
;GSM_PIC_clicker.mpas,212 :: 		LED2 := 0;
	BCF         LATA1_bit+0, BitPos(LATA1_bit+0) 
;GSM_PIC_clicker.mpas,213 :: 		end else begin // just "off" (both)
	GOTO        L__gsmMsgRcvd50
L__gsmMsgRcvd49:
;GSM_PIC_clicker.mpas,214 :: 		LED1 := 0;
	BCF         LATA0_bit+0, BitPos(LATA0_bit+0) 
;GSM_PIC_clicker.mpas,215 :: 		LED2 := 0;
	BCF         LATA1_bit+0, BitPos(LATA1_bit+0) 
;GSM_PIC_clicker.mpas,216 :: 		end;
L__gsmMsgRcvd50:
L__gsmMsgRcvd47:
;GSM_PIC_clicker.mpas,217 :: 		end else if (strncmp(MessageText, 'please call ', 12) = 0) then begin  // 'Please Call Me'
	GOTO        L__gsmMsgRcvd44
L__gsmMsgRcvd43:
	MOVF        FARG_gsmMsgRcvd_MessageText+0, 0 
	MOVWF       FARG_strncmp_s1+0 
	MOVF        FARG_gsmMsgRcvd_MessageText+1, 0 
	MOVWF       FARG_strncmp_s1+1 
	MOVLW       112
	MOVWF       ?LocalText_gsmMsgRcvd_2+0 
	MOVLW       108
	MOVWF       ?LocalText_gsmMsgRcvd_2+1 
	MOVLW       101
	MOVWF       ?LocalText_gsmMsgRcvd_2+2 
	MOVLW       97
	MOVWF       ?LocalText_gsmMsgRcvd_2+3 
	MOVLW       115
	MOVWF       ?LocalText_gsmMsgRcvd_2+4 
	MOVLW       101
	MOVWF       ?LocalText_gsmMsgRcvd_2+5 
	MOVLW       32
	MOVWF       ?LocalText_gsmMsgRcvd_2+6 
	MOVLW       99
	MOVWF       ?LocalText_gsmMsgRcvd_2+7 
	MOVLW       97
	MOVWF       ?LocalText_gsmMsgRcvd_2+8 
	MOVLW       108
	MOVWF       ?LocalText_gsmMsgRcvd_2+9 
	MOVLW       108
	MOVWF       ?LocalText_gsmMsgRcvd_2+10 
	MOVLW       32
	MOVWF       ?LocalText_gsmMsgRcvd_2+11 
	CLRF        ?LocalText_gsmMsgRcvd_2+12 
	MOVLW       ?LocalText_gsmMsgRcvd_2+0
	MOVWF       FARG_strncmp_s2+0 
	MOVLW       hi_addr(?LocalText_gsmMsgRcvd_2+0)
	MOVWF       FARG_strncmp_s2+1 
	MOVLW       12
	MOVWF       FARG_strncmp_len+0 
	MOVLW       0
	MOVWF       FARG_strncmp_len+1 
	CALL        _strncmp+0, 0
	MOVLW       0
	XORWF       R1, 0 
	BTFSS       STATUS+0, 2 
	GOTO        L__gsmMsgRcvd112
	MOVLW       0
	XORWF       R0, 0 
L__gsmMsgRcvd112:
	BTFSS       STATUS+0, 2 
	GOTO        L__gsmMsgRcvd52
;GSM_PIC_clicker.mpas,218 :: 		LED2 := not LED2;
	BTG         LATA1_bit+0, BitPos(LATA1_bit+0) 
;GSM_PIC_clicker.mpas,219 :: 		end;
L__gsmMsgRcvd52:
L__gsmMsgRcvd44:
L__gsmMsgRcvd35:
;GSM_PIC_clicker.mpas,220 :: 		end;
L_end_gsmMsgRcvd:
	RETURN      0
; end of _gsmMsgRcvd

_gsmEvent:

;GSM_PIC_clicker.mpas,223 :: 		begin
;GSM_PIC_clicker.mpas,225 :: 		gsmevntPIN_Request: begin
	MOVF        FARG_gsmEvent_GsmEventType+0, 0 
	XORLW       30
	BTFSS       STATUS+0, 2 
	GOTO        L__gsmEvent58
;GSM_PIC_clicker.mpas,228 :: 		end;
	GOTO        L__gsmEvent55
L__gsmEvent58:
;GSM_PIC_clicker.mpas,229 :: 		gsmevntPIN_Fail: begin
	MOVF        FARG_gsmEvent_GsmEventType+0, 0 
	XORLW       31
	BTFSS       STATUS+0, 2 
	GOTO        L__gsmEvent61
;GSM_PIC_clicker.mpas,231 :: 		strcpy(USBout, 'PIN entry failed' + Chr(13) + Chr(10));
	MOVLW       _USBout+0
	MOVWF       FARG_strcpy_s1+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strcpy_s1+1 
	MOVLW       80
	MOVWF       ?LocalText_gsmEvent_3+0 
	MOVLW       73
	MOVWF       ?LocalText_gsmEvent_3+1 
	MOVLW       78
	MOVWF       ?LocalText_gsmEvent_3+2 
	MOVLW       32
	MOVWF       ?LocalText_gsmEvent_3+3 
	MOVLW       101
	MOVWF       ?LocalText_gsmEvent_3+4 
	MOVLW       110
	MOVWF       ?LocalText_gsmEvent_3+5 
	MOVLW       116
	MOVWF       ?LocalText_gsmEvent_3+6 
	MOVLW       114
	MOVWF       ?LocalText_gsmEvent_3+7 
	MOVLW       121
	MOVWF       ?LocalText_gsmEvent_3+8 
	MOVLW       32
	MOVWF       ?LocalText_gsmEvent_3+9 
	MOVLW       102
	MOVWF       ?LocalText_gsmEvent_3+10 
	MOVLW       97
	MOVWF       ?LocalText_gsmEvent_3+11 
	MOVLW       105
	MOVWF       ?LocalText_gsmEvent_3+12 
	MOVLW       108
	MOVWF       ?LocalText_gsmEvent_3+13 
	MOVLW       101
	MOVWF       ?LocalText_gsmEvent_3+14 
	MOVLW       100
	MOVWF       ?LocalText_gsmEvent_3+15 
	MOVLW       13
	MOVWF       ?LocalText_gsmEvent_3+16 
	MOVLW       10
	MOVWF       ?LocalText_gsmEvent_3+17 
	MOVLW       0
	MOVWF       ?LocalText_gsmEvent_3+18 
	MOVLW       ?LocalText_gsmEvent_3+0
	MOVWF       FARG_strcpy_s2+0 
	MOVLW       hi_addr(?LocalText_gsmEvent_3+0)
	MOVWF       FARG_strcpy_s2+1 
	CALL        _strcpy+0, 0
;GSM_PIC_clicker.mpas,232 :: 		HID_Write(@USBout, 64);
	MOVLW       _USBout+0
	MOVWF       FARG_HID_Write_writebuff+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_HID_Write_writebuff+1 
	MOVLW       64
	MOVWF       FARG_HID_Write_len+0 
	CALL        _HID_Write+0, 0
;GSM_PIC_clicker.mpas,234 :: 		end;
	GOTO        L__gsmEvent55
L__gsmEvent61:
;GSM_PIC_clicker.mpas,235 :: 		gsmevntMissedCall: begin
	MOVF        FARG_gsmEvent_GsmEventType+0, 0 
	XORLW       70
	BTFSS       STATUS+0, 2 
	GOTO        L__gsmEvent64
;GSM_PIC_clicker.mpas,236 :: 		gsmMissedCall(pstrGsmEventOriginatorID);
	MOVF        _pstrGsmEventOriginatorID+0, 0 
	MOVWF       FARG_gsmMissedCall_OriginatorID+0 
	MOVF        _pstrGsmEventOriginatorID+1, 0 
	MOVWF       FARG_gsmMissedCall_OriginatorID+1 
	CALL        _gsmMissedCall+0, 0
;GSM_PIC_clicker.mpas,237 :: 		end;
	GOTO        L__gsmEvent55
L__gsmEvent64:
;GSM_PIC_clicker.mpas,238 :: 		gsmevntMsgRcvd: begin
	MOVF        FARG_gsmEvent_GsmEventType+0, 0 
	XORLW       80
	BTFSS       STATUS+0, 2 
	GOTO        L__gsmEvent67
;GSM_PIC_clicker.mpas,239 :: 		gsmMsgRcvd(pstrGsmEventData, pstrGsmEventOriginatorID);
	MOVF        _pstrGsmEventData+0, 0 
	MOVWF       FARG_gsmMsgRcvd_MessageText+0 
	MOVF        _pstrGsmEventData+1, 0 
	MOVWF       FARG_gsmMsgRcvd_MessageText+1 
	MOVF        _pstrGsmEventOriginatorID+0, 0 
	MOVWF       FARG_gsmMsgRcvd_OriginatorID+0 
	MOVF        _pstrGsmEventOriginatorID+1, 0 
	MOVWF       FARG_gsmMsgRcvd_OriginatorID+1 
	CALL        _gsmMsgRcvd+0, 0
;GSM_PIC_clicker.mpas,240 :: 		end;
	GOTO        L__gsmEvent55
L__gsmEvent67:
;GSM_PIC_clicker.mpas,241 :: 		gsmevntMsgSent: begin
	MOVF        FARG_gsmEvent_GsmEventType+0, 0 
	XORLW       83
	BTFSS       STATUS+0, 2 
	GOTO        L__gsmEvent70
;GSM_PIC_clicker.mpas,243 :: 		strcpy(USBout, 'Message sent' + Chr(13) + Chr(10));
	MOVLW       _USBout+0
	MOVWF       FARG_strcpy_s1+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strcpy_s1+1 
	MOVLW       77
	MOVWF       ?LocalText_gsmEvent_4+0 
	MOVLW       101
	MOVWF       ?LocalText_gsmEvent_4+1 
	MOVLW       115
	MOVWF       ?LocalText_gsmEvent_4+2 
	MOVLW       115
	MOVWF       ?LocalText_gsmEvent_4+3 
	MOVLW       97
	MOVWF       ?LocalText_gsmEvent_4+4 
	MOVLW       103
	MOVWF       ?LocalText_gsmEvent_4+5 
	MOVLW       101
	MOVWF       ?LocalText_gsmEvent_4+6 
	MOVLW       32
	MOVWF       ?LocalText_gsmEvent_4+7 
	MOVLW       115
	MOVWF       ?LocalText_gsmEvent_4+8 
	MOVLW       101
	MOVWF       ?LocalText_gsmEvent_4+9 
	MOVLW       110
	MOVWF       ?LocalText_gsmEvent_4+10 
	MOVLW       116
	MOVWF       ?LocalText_gsmEvent_4+11 
	MOVLW       13
	MOVWF       ?LocalText_gsmEvent_4+12 
	MOVLW       10
	MOVWF       ?LocalText_gsmEvent_4+13 
	MOVLW       0
	MOVWF       ?LocalText_gsmEvent_4+14 
	MOVLW       ?LocalText_gsmEvent_4+0
	MOVWF       FARG_strcpy_s2+0 
	MOVLW       hi_addr(?LocalText_gsmEvent_4+0)
	MOVWF       FARG_strcpy_s2+1 
	CALL        _strcpy+0, 0
;GSM_PIC_clicker.mpas,244 :: 		HID_Write(@USBout, 64);
	MOVLW       _USBout+0
	MOVWF       FARG_HID_Write_writebuff+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_HID_Write_writebuff+1 
	MOVLW       64
	MOVWF       FARG_HID_Write_len+0 
	CALL        _HID_Write+0, 0
;GSM_PIC_clicker.mpas,246 :: 		end;
	GOTO        L__gsmEvent55
L__gsmEvent70:
;GSM_PIC_clicker.mpas,247 :: 		gsmevntMsgDiscarded, gsmevntMsgSendFailed: begin
	MOVF        FARG_gsmEvent_GsmEventType+0, 0 
	XORLW       82
	BTFSS       STATUS+0, 2 
	GOTO        L__gsmEvent73
	GOTO        L__gsmEvent71
L__gsmEvent73:
	MOVF        FARG_gsmEvent_GsmEventType+0, 0 
	XORLW       84
	BTFSS       STATUS+0, 2 
	GOTO        L__gsmEvent74
L__gsmEvent71:
;GSM_PIC_clicker.mpas,249 :: 		strcpy(USBout, 'Message send failed' + Chr(13) + Chr(10));
	MOVLW       _USBout+0
	MOVWF       FARG_strcpy_s1+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strcpy_s1+1 
	MOVLW       77
	MOVWF       ?LocalText_gsmEvent_5+0 
	MOVLW       101
	MOVWF       ?LocalText_gsmEvent_5+1 
	MOVLW       115
	MOVWF       ?LocalText_gsmEvent_5+2 
	MOVLW       115
	MOVWF       ?LocalText_gsmEvent_5+3 
	MOVLW       97
	MOVWF       ?LocalText_gsmEvent_5+4 
	MOVLW       103
	MOVWF       ?LocalText_gsmEvent_5+5 
	MOVLW       101
	MOVWF       ?LocalText_gsmEvent_5+6 
	MOVLW       32
	MOVWF       ?LocalText_gsmEvent_5+7 
	MOVLW       115
	MOVWF       ?LocalText_gsmEvent_5+8 
	MOVLW       101
	MOVWF       ?LocalText_gsmEvent_5+9 
	MOVLW       110
	MOVWF       ?LocalText_gsmEvent_5+10 
	MOVLW       100
	MOVWF       ?LocalText_gsmEvent_5+11 
	MOVLW       32
	MOVWF       ?LocalText_gsmEvent_5+12 
	MOVLW       102
	MOVWF       ?LocalText_gsmEvent_5+13 
	MOVLW       97
	MOVWF       ?LocalText_gsmEvent_5+14 
	MOVLW       105
	MOVWF       ?LocalText_gsmEvent_5+15 
	MOVLW       108
	MOVWF       ?LocalText_gsmEvent_5+16 
	MOVLW       101
	MOVWF       ?LocalText_gsmEvent_5+17 
	MOVLW       100
	MOVWF       ?LocalText_gsmEvent_5+18 
	MOVLW       13
	MOVWF       ?LocalText_gsmEvent_5+19 
	MOVLW       10
	MOVWF       ?LocalText_gsmEvent_5+20 
	MOVLW       0
	MOVWF       ?LocalText_gsmEvent_5+21 
	MOVLW       ?LocalText_gsmEvent_5+0
	MOVWF       FARG_strcpy_s2+0 
	MOVLW       hi_addr(?LocalText_gsmEvent_5+0)
	MOVWF       FARG_strcpy_s2+1 
	CALL        _strcpy+0, 0
;GSM_PIC_clicker.mpas,250 :: 		HID_Write(@USBout, 64);
	MOVLW       _USBout+0
	MOVWF       FARG_HID_Write_writebuff+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_HID_Write_writebuff+1 
	MOVLW       64
	MOVWF       FARG_HID_Write_len+0 
	CALL        _HID_Write+0, 0
;GSM_PIC_clicker.mpas,252 :: 		end;
	GOTO        L__gsmEvent55
L__gsmEvent74:
;GSM_PIC_clicker.mpas,253 :: 		gsmevntDateTimeRead: begin
	MOVF        FARG_gsmEvent_GsmEventType+0, 0 
	XORLW       150
	BTFSS       STATUS+0, 2 
	GOTO        L__gsmEvent77
;GSM_PIC_clicker.mpas,254 :: 		if (dtmGsmEvent.Year > 10) then begin  // If the GSM modules date/time is valid
	MOVF        _dtmGsmEvent+0, 0 
	SUBLW       10
	BTFSC       STATUS+0, 0 
	GOTO        L__gsmEvent79
;GSM_PIC_clicker.mpas,258 :: 		strcpy(USBout, 'Date/Time: ');
	MOVLW       _USBout+0
	MOVWF       FARG_strcpy_s1+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strcpy_s1+1 
	MOVLW       68
	MOVWF       ?LocalText_gsmEvent_6+0 
	MOVLW       97
	MOVWF       ?LocalText_gsmEvent_6+1 
	MOVLW       116
	MOVWF       ?LocalText_gsmEvent_6+2 
	MOVLW       101
	MOVWF       ?LocalText_gsmEvent_6+3 
	MOVLW       47
	MOVWF       ?LocalText_gsmEvent_6+4 
	MOVLW       84
	MOVWF       ?LocalText_gsmEvent_6+5 
	MOVLW       105
	MOVWF       ?LocalText_gsmEvent_6+6 
	MOVLW       109
	MOVWF       ?LocalText_gsmEvent_6+7 
	MOVLW       101
	MOVWF       ?LocalText_gsmEvent_6+8 
	MOVLW       58
	MOVWF       ?LocalText_gsmEvent_6+9 
	MOVLW       32
	MOVWF       ?LocalText_gsmEvent_6+10 
	CLRF        ?LocalText_gsmEvent_6+11 
	MOVLW       ?LocalText_gsmEvent_6+0
	MOVWF       FARG_strcpy_s2+0 
	MOVLW       hi_addr(?LocalText_gsmEvent_6+0)
	MOVWF       FARG_strcpy_s2+1 
	CALL        _strcpy+0, 0
;GSM_PIC_clicker.mpas,259 :: 		pstr := @USBout + 11; //Point past the first 11 characters of the string
	MOVLW       11
	MOVWF       R0 
	MOVLW       0
	MOVWF       R1 
	MOVLW       _USBout+0
	ADDWF       R0, 1 
	MOVLW       hi_addr(_USBout+0)
	ADDWFC      R1, 1 
	MOVF        R0, 0 
	MOVWF       _pstr+0 
	MOVF        R1, 0 
	MOVWF       _pstr+1 
;GSM_PIC_clicker.mpas,260 :: 		RTCC_GenerateString(dtmGsmEvent, pstr);
	MOVLW       _dtmGsmEvent+0
	MOVWF       FARG_RTCC_GenerateString_dt+0 
	MOVLW       hi_addr(_dtmGsmEvent+0)
	MOVWF       FARG_RTCC_GenerateString_dt+1 
	MOVF        R0, 0 
	MOVWF       FARG_RTCC_GenerateString_rtccstring+0 
	MOVF        R1, 0 
	MOVWF       FARG_RTCC_GenerateString_rtccstring+1 
	CALL        _RTCC_GenerateString+0, 0
;GSM_PIC_clicker.mpas,261 :: 		strcat(USBout, '' + Chr(13) + Chr(10));
	MOVLW       _USBout+0
	MOVWF       FARG_strcat_s1+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strcat_s1+1 
	MOVLW       13
	MOVWF       ?LocalText_gsmEvent_7+0 
	MOVLW       10
	MOVWF       ?LocalText_gsmEvent_7+1 
	MOVLW       0
	MOVWF       ?LocalText_gsmEvent_7+2 
	MOVLW       ?LocalText_gsmEvent_7+0
	MOVWF       FARG_strcat_s2+0 
	MOVLW       hi_addr(?LocalText_gsmEvent_7+0)
	MOVWF       FARG_strcat_s2+1 
	CALL        _strcat+0, 0
;GSM_PIC_clicker.mpas,262 :: 		HID_Write(@USBout, 64);
	MOVLW       _USBout+0
	MOVWF       FARG_HID_Write_writebuff+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_HID_Write_writebuff+1 
	MOVLW       64
	MOVWF       FARG_HID_Write_len+0 
	CALL        _HID_Write+0, 0
;GSM_PIC_clicker.mpas,264 :: 		dtmRTCC := dtmGsmEvent;
	MOVLW       _dtmRTCC+0
	MOVWF       FSR1 
	MOVLW       hi_addr(_dtmRTCC+0)
	MOVWF       FSR1H 
	MOVLW       _dtmGsmEvent+0
	MOVWF       FSR2 
	MOVLW       hi_addr(_dtmGsmEvent+0)
	MOVWF       FSR2H 
	MOVLW       6
	MOVWF       R0 
	MOVLW       0
	MOVWF       R1 
	CALL        ___CA2AW+0, 0
;GSM_PIC_clicker.mpas,265 :: 		bitRTCC_Set := 1;
	BSF         _bitRTCC_Set+0, BitPos(_bitRTCC_Set+0) 
;GSM_PIC_clicker.mpas,266 :: 		end else begin
	GOTO        L__gsmEvent80
L__gsmEvent79:
;GSM_PIC_clicker.mpas,268 :: 		strcpy(USBout, 'Date/Time not yet set.' + Chr(13) + Chr(10));
	MOVLW       _USBout+0
	MOVWF       FARG_strcpy_s1+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strcpy_s1+1 
	MOVLW       68
	MOVWF       ?LocalText_gsmEvent_8+0 
	MOVLW       97
	MOVWF       ?LocalText_gsmEvent_8+1 
	MOVLW       116
	MOVWF       ?LocalText_gsmEvent_8+2 
	MOVLW       101
	MOVWF       ?LocalText_gsmEvent_8+3 
	MOVLW       47
	MOVWF       ?LocalText_gsmEvent_8+4 
	MOVLW       84
	MOVWF       ?LocalText_gsmEvent_8+5 
	MOVLW       105
	MOVWF       ?LocalText_gsmEvent_8+6 
	MOVLW       109
	MOVWF       ?LocalText_gsmEvent_8+7 
	MOVLW       101
	MOVWF       ?LocalText_gsmEvent_8+8 
	MOVLW       32
	MOVWF       ?LocalText_gsmEvent_8+9 
	MOVLW       110
	MOVWF       ?LocalText_gsmEvent_8+10 
	MOVLW       111
	MOVWF       ?LocalText_gsmEvent_8+11 
	MOVLW       116
	MOVWF       ?LocalText_gsmEvent_8+12 
	MOVLW       32
	MOVWF       ?LocalText_gsmEvent_8+13 
	MOVLW       121
	MOVWF       ?LocalText_gsmEvent_8+14 
	MOVLW       101
	MOVWF       ?LocalText_gsmEvent_8+15 
	MOVLW       116
	MOVWF       ?LocalText_gsmEvent_8+16 
	MOVLW       32
	MOVWF       ?LocalText_gsmEvent_8+17 
	MOVLW       115
	MOVWF       ?LocalText_gsmEvent_8+18 
	MOVLW       101
	MOVWF       ?LocalText_gsmEvent_8+19 
	MOVLW       116
	MOVWF       ?LocalText_gsmEvent_8+20 
	MOVLW       46
	MOVWF       ?LocalText_gsmEvent_8+21 
	MOVLW       13
	MOVWF       ?LocalText_gsmEvent_8+22 
	MOVLW       10
	MOVWF       ?LocalText_gsmEvent_8+23 
	MOVLW       0
	MOVWF       ?LocalText_gsmEvent_8+24 
	MOVLW       ?LocalText_gsmEvent_8+0
	MOVWF       FARG_strcpy_s2+0 
	MOVLW       hi_addr(?LocalText_gsmEvent_8+0)
	MOVWF       FARG_strcpy_s2+1 
	CALL        _strcpy+0, 0
;GSM_PIC_clicker.mpas,269 :: 		HID_Write(@USBout, 64);
	MOVLW       _USBout+0
	MOVWF       FARG_HID_Write_writebuff+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_HID_Write_writebuff+1 
	MOVLW       64
	MOVWF       FARG_HID_Write_len+0 
	CALL        _HID_Write+0, 0
;GSM_PIC_clicker.mpas,271 :: 		end;
L__gsmEvent80:
;GSM_PIC_clicker.mpas,272 :: 		end;
	GOTO        L__gsmEvent55
L__gsmEvent77:
;GSM_PIC_clicker.mpas,273 :: 		gsmevntDateTimeWrite: begin
	MOVF        FARG_gsmEvent_GsmEventType+0, 0 
	XORLW       151
	BTFSS       STATUS+0, 2 
	GOTO        L__gsmEvent83
;GSM_PIC_clicker.mpas,275 :: 		dtmGsmEvent := dtmRTCC;
	MOVLW       _dtmGsmEvent+0
	MOVWF       FSR1 
	MOVLW       hi_addr(_dtmGsmEvent+0)
	MOVWF       FSR1H 
	MOVLW       _dtmRTCC+0
	MOVWF       FSR2 
	MOVLW       hi_addr(_dtmRTCC+0)
	MOVWF       FSR2H 
	MOVLW       6
	MOVWF       R0 
	MOVLW       0
	MOVWF       R1 
	CALL        ___CA2AW+0, 0
;GSM_PIC_clicker.mpas,276 :: 		end;
	GOTO        L__gsmEvent55
L__gsmEvent83:
;GSM_PIC_clicker.mpas,277 :: 		gsmevntIMEI_Read: begin
	MOVF        FARG_gsmEvent_GsmEventType+0, 0 
	XORLW       20
	BTFSS       STATUS+0, 2 
	GOTO        L__gsmEvent86
;GSM_PIC_clicker.mpas,279 :: 		strcpy(USBout, 'IMEI: ');
	MOVLW       _USBout+0
	MOVWF       FARG_strcpy_s1+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strcpy_s1+1 
	MOVLW       73
	MOVWF       ?LocalText_gsmEvent_9+0 
	MOVLW       77
	MOVWF       ?LocalText_gsmEvent_9+1 
	MOVLW       69
	MOVWF       ?LocalText_gsmEvent_9+2 
	MOVLW       73
	MOVWF       ?LocalText_gsmEvent_9+3 
	MOVLW       58
	MOVWF       ?LocalText_gsmEvent_9+4 
	MOVLW       32
	MOVWF       ?LocalText_gsmEvent_9+5 
	CLRF        ?LocalText_gsmEvent_9+6 
	MOVLW       ?LocalText_gsmEvent_9+0
	MOVWF       FARG_strcpy_s2+0 
	MOVLW       hi_addr(?LocalText_gsmEvent_9+0)
	MOVWF       FARG_strcpy_s2+1 
	CALL        _strcpy+0, 0
;GSM_PIC_clicker.mpas,280 :: 		strcat(USBout, pstrGsmEventData);
	MOVLW       _USBout+0
	MOVWF       FARG_strcat_s1+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strcat_s1+1 
	MOVF        _pstrGsmEventData+0, 0 
	MOVWF       FARG_strcat_s2+0 
	MOVF        _pstrGsmEventData+1, 0 
	MOVWF       FARG_strcat_s2+1 
	CALL        _strcat+0, 0
;GSM_PIC_clicker.mpas,281 :: 		strcat(USBout, '' + Chr(13) + Chr(10));
	MOVLW       _USBout+0
	MOVWF       FARG_strcat_s1+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_strcat_s1+1 
	MOVLW       13
	MOVWF       ?LocalText_gsmEvent_10+0 
	MOVLW       10
	MOVWF       ?LocalText_gsmEvent_10+1 
	MOVLW       0
	MOVWF       ?LocalText_gsmEvent_10+2 
	MOVLW       ?LocalText_gsmEvent_10+0
	MOVWF       FARG_strcat_s2+0 
	MOVLW       hi_addr(?LocalText_gsmEvent_10+0)
	MOVWF       FARG_strcat_s2+1 
	CALL        _strcat+0, 0
;GSM_PIC_clicker.mpas,282 :: 		HID_Write(@USBout, 64);
	MOVLW       _USBout+0
	MOVWF       FARG_HID_Write_writebuff+0 
	MOVLW       hi_addr(_USBout+0)
	MOVWF       FARG_HID_Write_writebuff+1 
	MOVLW       64
	MOVWF       FARG_HID_Write_len+0 
	CALL        _HID_Write+0, 0
;GSM_PIC_clicker.mpas,284 :: 		end;
	GOTO        L__gsmEvent55
L__gsmEvent86:
L__gsmEvent55:
;GSM_PIC_clicker.mpas,286 :: 		end;
L_end_gsmEvent:
	RETURN      0
; end of _gsmEvent

_main:

;GSM_PIC_clicker.mpas,288 :: 		begin
;GSM_PIC_clicker.mpas,289 :: 		setup();
	CALL        _setup+0, 0
;GSM_PIC_clicker.mpas,290 :: 		startup();
	CALL        _startup+0, 0
;GSM_PIC_clicker.mpas,291 :: 		gsmDateTimeRead();
	CALL        _gsmDateTimeRead+0, 0
;GSM_PIC_clicker.mpas,292 :: 		while (1) do begin
L__main89:
;GSM_PIC_clicker.mpas,293 :: 		gsmPoll();
	CALL        _gsmPoll+0, 0
;GSM_PIC_clicker.mpas,296 :: 		if (wrdButtonTmr > 10000) then begin
	MOVF        _wrdButtonTmr+1, 0 
	SUBLW       39
	BTFSS       STATUS+0, 2 
	GOTO        L__main115
	MOVF        _wrdButtonTmr+0, 0 
	SUBLW       16
L__main115:
	BTFSC       STATUS+0, 0 
	GOTO        L__main94
;GSM_PIC_clicker.mpas,297 :: 		if (btn1 = 0) then begin
	BTFSC       RD3_bit+0, BitPos(RD3_bit+0) 
	GOTO        L__main97
;GSM_PIC_clicker.mpas,298 :: 		strcpy(strMsgSendTxt, 'Button T1 pressed.');
	MOVLW       _strMsgSendTxt+0
	MOVWF       FARG_strcpy_s1+0 
	MOVLW       hi_addr(_strMsgSendTxt+0)
	MOVWF       FARG_strcpy_s1+1 
	MOVLW       66
	MOVWF       ?LocalText_main_11+0 
	MOVLW       117
	MOVWF       ?LocalText_main_11+1 
	MOVLW       116
	MOVWF       ?LocalText_main_11+2 
	MOVLW       116
	MOVWF       ?LocalText_main_11+3 
	MOVLW       111
	MOVWF       ?LocalText_main_11+4 
	MOVLW       110
	MOVWF       ?LocalText_main_11+5 
	MOVLW       32
	MOVWF       ?LocalText_main_11+6 
	MOVLW       84
	MOVWF       ?LocalText_main_11+7 
	MOVLW       49
	MOVWF       ?LocalText_main_11+8 
	MOVLW       32
	MOVWF       ?LocalText_main_11+9 
	MOVLW       112
	MOVWF       ?LocalText_main_11+10 
	MOVLW       114
	MOVWF       ?LocalText_main_11+11 
	MOVLW       101
	MOVWF       ?LocalText_main_11+12 
	MOVLW       115
	MOVWF       ?LocalText_main_11+13 
	MOVLW       115
	MOVWF       ?LocalText_main_11+14 
	MOVLW       101
	MOVWF       ?LocalText_main_11+15 
	MOVLW       100
	MOVWF       ?LocalText_main_11+16 
	MOVLW       46
	MOVWF       ?LocalText_main_11+17 
	CLRF        ?LocalText_main_11+18 
	MOVLW       ?LocalText_main_11+0
	MOVWF       FARG_strcpy_s2+0 
	MOVLW       hi_addr(?LocalText_main_11+0)
	MOVWF       FARG_strcpy_s2+1 
	CALL        _strcpy+0, 0
;GSM_PIC_clicker.mpas,299 :: 		msgSend();
	CALL        _msgSend+0, 0
;GSM_PIC_clicker.mpas,300 :: 		wrdButtonTmr := 0;
	CLRF        _wrdButtonTmr+0 
	CLRF        _wrdButtonTmr+1 
;GSM_PIC_clicker.mpas,301 :: 		end else if (btn2 = 0) then begin
	GOTO        L__main98
L__main97:
	BTFSC       RD2_bit+0, BitPos(RD2_bit+0) 
	GOTO        L__main100
;GSM_PIC_clicker.mpas,302 :: 		strcpy(strMsgSendTxt, 'Button T2 pressed.');
	MOVLW       _strMsgSendTxt+0
	MOVWF       FARG_strcpy_s1+0 
	MOVLW       hi_addr(_strMsgSendTxt+0)
	MOVWF       FARG_strcpy_s1+1 
	MOVLW       66
	MOVWF       ?LocalText_main_12+0 
	MOVLW       117
	MOVWF       ?LocalText_main_12+1 
	MOVLW       116
	MOVWF       ?LocalText_main_12+2 
	MOVLW       116
	MOVWF       ?LocalText_main_12+3 
	MOVLW       111
	MOVWF       ?LocalText_main_12+4 
	MOVLW       110
	MOVWF       ?LocalText_main_12+5 
	MOVLW       32
	MOVWF       ?LocalText_main_12+6 
	MOVLW       84
	MOVWF       ?LocalText_main_12+7 
	MOVLW       50
	MOVWF       ?LocalText_main_12+8 
	MOVLW       32
	MOVWF       ?LocalText_main_12+9 
	MOVLW       112
	MOVWF       ?LocalText_main_12+10 
	MOVLW       114
	MOVWF       ?LocalText_main_12+11 
	MOVLW       101
	MOVWF       ?LocalText_main_12+12 
	MOVLW       115
	MOVWF       ?LocalText_main_12+13 
	MOVLW       115
	MOVWF       ?LocalText_main_12+14 
	MOVLW       101
	MOVWF       ?LocalText_main_12+15 
	MOVLW       100
	MOVWF       ?LocalText_main_12+16 
	MOVLW       46
	MOVWF       ?LocalText_main_12+17 
	CLRF        ?LocalText_main_12+18 
	MOVLW       ?LocalText_main_12+0
	MOVWF       FARG_strcpy_s2+0 
	MOVLW       hi_addr(?LocalText_main_12+0)
	MOVWF       FARG_strcpy_s2+1 
	CALL        _strcpy+0, 0
;GSM_PIC_clicker.mpas,303 :: 		msgSend();
	CALL        _msgSend+0, 0
;GSM_PIC_clicker.mpas,304 :: 		wrdButtonTmr := 0;
	CLRF        _wrdButtonTmr+0 
	CLRF        _wrdButtonTmr+1 
;GSM_PIC_clicker.mpas,305 :: 		end;
L__main100:
L__main98:
;GSM_PIC_clicker.mpas,306 :: 		end;
L__main94:
;GSM_PIC_clicker.mpas,307 :: 		end; // (while)
	GOTO        L__main89
;GSM_PIC_clicker.mpas,308 :: 		end.
L_end_main:
	GOTO        $+0
; end of _main
