
_main:

;HID_Read_Write_Polling.c,35 :: 		void main(void){
;HID_Read_Write_Polling.c,36 :: 		int Count = 0;
	CLRF        main_Count_L0+0 
	CLRF        main_Count_L0+1 
;HID_Read_Write_Polling.c,37 :: 		TRISB.RB1 = 0; PORTB.RB1 = 0;
	BCF         TRISB+0, 1 
	BCF         PORTB+0, 1 
;HID_Read_Write_Polling.c,38 :: 		ADCON1 |= 0x0F;                         // Configure all ports with analog function as digital
	MOVLW       15
	IORWF       ADCON1+0, 1 
;HID_Read_Write_Polling.c,39 :: 		CMCON  |= 7;                            // Disable comparators
	MOVLW       7
	IORWF       CMCON+0, 1 
;HID_Read_Write_Polling.c,41 :: 		HID_Enable(&readbuff,&writebuff);       // Enable HID communication
	MOVLW       _readbuff+0
	MOVWF       FARG_HID_Enable_readbuff+0 
	MOVLW       hi_addr(_readbuff+0)
	MOVWF       FARG_HID_Enable_readbuff+1 
	MOVLW       _writebuff+0
	MOVWF       FARG_HID_Enable_writebuff+0 
	MOVLW       hi_addr(_writebuff+0)
	MOVWF       FARG_HID_Enable_writebuff+1 
	CALL        _HID_Enable+0, 0
;HID_Read_Write_Polling.c,43 :: 		while(1){                               // USB servicing is done inside the while loop
L_main0:
;HID_Read_Write_Polling.c,44 :: 		USB_Polling_Proc();                   // Call this routine periodically
	CALL        _USB_Polling_Proc+0, 0
;HID_Read_Write_Polling.c,45 :: 		kk = HID_Read();
	CALL        _HID_Read+0, 0
	MOVF        R0, 0 
	MOVWF       _kk+0 
;HID_Read_Write_Polling.c,46 :: 		if(kk != 0){
	MOVF        R0, 0 
	XORLW       0
	BTFSC       STATUS+0, 2 
	GOTO        L_main2
;HID_Read_Write_Polling.c,47 :: 		for(cnt=0;cnt<64;cnt++)
	CLRF        _cnt+0 
L_main3:
	MOVLW       64
	SUBWF       _cnt+0, 0 
	BTFSC       STATUS+0, 0 
	GOTO        L_main4
;HID_Read_Write_Polling.c,48 :: 		writebuff[cnt]=readbuff[cnt];
	MOVLW       _writebuff+0
	MOVWF       FSR1 
	MOVLW       hi_addr(_writebuff+0)
	MOVWF       FSR1H 
	MOVF        _cnt+0, 0 
	ADDWF       FSR1, 1 
	BTFSC       STATUS+0, 0 
	INCF        FSR1H, 1 
	MOVLW       _readbuff+0
	MOVWF       FSR0 
	MOVLW       hi_addr(_readbuff+0)
	MOVWF       FSR0H 
	MOVF        _cnt+0, 0 
	ADDWF       FSR0, 1 
	BTFSC       STATUS+0, 0 
	INCF        FSR0H, 1 
	MOVF        POSTINC0+0, 0 
	MOVWF       POSTINC1+0 
;HID_Read_Write_Polling.c,47 :: 		for(cnt=0;cnt<64;cnt++)
	INCF        _cnt+0, 1 
;HID_Read_Write_Polling.c,48 :: 		writebuff[cnt]=readbuff[cnt];
	GOTO        L_main3
L_main4:
;HID_Read_Write_Polling.c,50 :: 		PORTB.RB1 = readbuff[63];
	BTFSC       1343, 0 
	GOTO        L__main7
	BCF         PORTB+0, 1 
	GOTO        L__main8
L__main7:
	BSF         PORTB+0, 1 
L__main8:
;HID_Read_Write_Polling.c,51 :: 		writebuff[0] = ++Count;
	INFSNZ      main_Count_L0+0, 1 
	INCF        main_Count_L0+1, 1 
	MOVF        main_Count_L0+0, 0 
	MOVWF       1344 
;HID_Read_Write_Polling.c,53 :: 		HID_Write(&writebuff,64);
	MOVLW       _writebuff+0
	MOVWF       FARG_HID_Write_writebuff+0 
	MOVLW       hi_addr(_writebuff+0)
	MOVWF       FARG_HID_Write_writebuff+1 
	MOVLW       64
	MOVWF       FARG_HID_Write_len+0 
	CALL        _HID_Write+0, 0
;HID_Read_Write_Polling.c,54 :: 		}
L_main2:
;HID_Read_Write_Polling.c,55 :: 		}
	GOTO        L_main0
;HID_Read_Write_Polling.c,56 :: 		}
L_end_main:
	GOTO        $+0
; end of _main
